- data TypeVar
- data TypeScheme = ForAll [(TypeVar, [Constraint])] Type
- data Constraint
- data Type
- data TypeVarRef = TypeVarRef TypeVar [Constraint] PType
- prettyPrintTypes :: [Type] -> [Doc]
- freshTypeVar :: MonadIO m => m Type
- freshTypeVarWithConstraints :: MonadIO m => [Constraint] -> m Type
- type SymbolTable = PartialFunction Name TypeScheme
- type PSymbolTable = IORef SymbolTable
- freshPSymbolTable :: MonadIO m => m PSymbolTable
- readPSymbolTable :: MonadIO m => PSymbolTable -> m SymbolTable
- setPSymbolTable :: MonadIO m => PSymbolTable -> SymbolTable -> m ()
- type PType = IORef (Maybe Type)
- freshPType :: MonadIO m => m PType
- readPType :: MonadIO m => PType -> m (Maybe Type)
- setPType :: MonadIO m => PType -> Type -> m ()
Data Structures
data TypeScheme Source
ForAll [(TypeVar, [Constraint])] Type |
data Constraint Source
TVar TypeVarRef | |
TProc | |
TInt | |
TBool | |
TEvent | |
TEventable | |
TSet Type | |
TSeq Type | |
TDot Type Type | |
TTuple [Type] | |
TFunction [Type] Type | |
TDotable Type Type | |
TDatatype Name |
Eq Type | |
Show Type | |
PrettyPrintable Type | |
TypeCheckable Literal Type | |
TypeCheckable TCExp Type | |
TypeCheckable TCPat Type | |
TypeCheckable TCMatch Type | |
TypeCheckable TCDecl [(Name, Type)] | |
TypeCheckable TCDataTypeClause (Name, [Type]) | |
TypeCheckable (Pat Name) Type | |
TypeCheckable (Match Name) Type | |
TypeCheckable (Exp Name) Type | |
TypeCheckable (Decl Name) [(Name, Type)] | |
TypeCheckable (DataTypeClause Name) (Name, [Type]) | |
Desugarable a => Desugarable (Annotated Type a) | |
Compressable a => Compressable (Annotated (Maybe Type, PType) a) |
prettyPrintTypes :: [Type] -> [Doc]Source
Pretty prints several types using the same variable substitutions
Creation of Types
freshTypeVar :: MonadIO m => m TypeSource
freshTypeVarWithConstraints :: MonadIO m => [Constraint] -> m TypeSource
Symbol Tables
type PSymbolTable = IORef SymbolTableSource
freshPSymbolTable :: MonadIO m => m PSymbolTableSource
readPSymbolTable :: MonadIO m => PSymbolTable -> m SymbolTableSource
setPSymbolTable :: MonadIO m => PSymbolTable -> SymbolTable -> m ()Source
Type Pointers
freshPType :: MonadIO m => m PTypeSource