slime.absynt
Class UnitType

java.lang.Object
  extended byslime.absynt.Absynt
      extended byslime.absynt.Type
          extended byslime.absynt.UnitType
All Implemented Interfaces:
java.io.Serializable

public class UnitType
extends Type
implements java.io.Serializable

Type for well-type program side-effect constructs. It can be seen as the type for statements, i.e., the programs constructs that do not give back a value (for instance transitions). In these cases the type checker reports the type Unit. It is not for use in programs. The choice of Unit was made (instead of OK or something else) because this is a standard choice int more laborate situations (such as languages combining functions and imperative statements. The statement ``skip'' can be seen as the unit-value. C-programmer (or Java-programmer etc) can think of the type as Void.

Version:
$Id: UnitType.java,v 1.3 2002/07/10 17:04:30 swprakt Exp $
Author:
Martin Steffen and Karsten Stahl.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class slime.absynt.Absynt
pos
 
Constructor Summary
UnitType()
           
 
Method Summary
 java.lang.Object accept(Visitors.IType ask)
          visitor acceptor
 boolean equals(Type t)
          type equality.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitType

public UnitType()
Method Detail

accept

public java.lang.Object accept(Visitors.IType ask)
                        throws java.lang.Exception
visitor acceptor

Overrides:
accept in class Type
Throws:
java.lang.Exception

equals

public boolean equals(Type t)
type equality.

Specified by:
equals in class Type