[Types-sig] updated prototype

Greg Stein gstein@lyra.org
Wed, 26 Jan 2000 07:50:49 -0800 (PST)

Hi all!

I've updated my prototype type checker. Some new (visible) features:

- A new "decl" form in the interface parser:

    decl intrinsic __add__: def(Any)->Any

  This form is used to state that the object using this interface supports
  addition, but NOT the __add__ attribute. These "intrinsic" methods are
  used by the builtin types.

- Added a default search for "builtins.pi" to define interfaces for the
  builtin types. I've added ListType in there for now. The names for the
  interfaces should correspond to the names found in the "types" module.

- Binary operators have "real" type checking: the arguments are checked
  and the result type is defined.
  [ sequence concatenation and repetition is incomplete ]

- The interface parser now uses '|' rather than 'or'
  [ note: builtins.pi uses list notation (i.e. [Any]) but the parser
    does not see the brackets at the moment ]

- "not" operator's return type is always Int

My type system pages are at:


A snapshot is available via that page or at:


The CVS repository can be browsed at:


(the link is also available via the type system page)

Comments, suggestions, criticisms, etc are well-appreciated!


Greg Stein, http://www.lyra.org/