Types for representing ICurry programs
Author: Marc Andre Wittorf
An ICurry qualified name
Type synonym: IQName = (String,String)
An ICurry arity
Type synonym: IArity = Int
An ICurry variable (numerical index)
Type synonym: IVarIndex = Int
An ICurry type variable (numerical index)
Type synonym: ITVarIndex = Int
An ICurry assignment
Type synonym: IAssign = (IVarIndex,IExpr)
A Literal
Constructors:
IInt
:: Int -> ILiteral
: an integer literal
IChar
:: Char -> ILiteral
: a char literal
IFloat
:: Float -> ILiteral
: a float literal
An ICurry module
Constructors:
An ICurry visibility
Constructors:
Public
:: IVisibility
: Visible and usable from other modules
Private
:: IVisibility
: Invisible and not usable from other modules
An ICurry data type
Type synonym: IDataType = (IQName,IVisibility,[ITVarIndex],[IConstructor])
An ICurry constructor
Constructors:
IConstructor
:: IQName -> IVisibility -> [ITExpr] -> IConstructor
An ICurry type expression
Constructors:
ITVar
:: ITVarIndex -> ITExpr
: a type argument
ITFunc
:: ITExpr -> ITExpr -> ITExpr
: a functional type
ITCons
:: IQName -> [ITExpr] -> ITExpr
: a type application
An ICurry function
Constructors:
IFunction
:: IQName -> IVisibility -> IFuncBody -> IFunction
An ICurry function's behavior
Constructors:
IExternal
:: IArity -> String -> IFuncBody
: the function is externally defined
IFuncBody
:: [IVarIndex] -> IBlock -> IFuncBody
: the function is defined here
An ICurry block
Constructors:
ISimpleBlock
:: [IAssign] -> IExpr -> IBlock
: unconditional evaluation
ICaseConsBlock
:: [IAssign] -> IVarIndex -> [IConsBranch] -> IBlock
: conditional evaluation over constructor terms
ICaseLitBlock
:: [IAssign] -> IVarIndex -> [ILitBranch] -> IBlock
: conditional evaluation over literals
An ICurry branch over constructors
Constructors:
An ICurry branch over literals
Constructors:
An ICurry expression
Constructors:
IVar
:: IVarIndex -> IExpr
: a variable
ILit
:: ILiteral -> IExpr
: a literal
IFCall
:: IQName -> [IExpr] -> IExpr
: a function call
ICCall
:: IQName -> [IExpr] -> IExpr
: a constructor call
IOr
:: [IExpr] -> IExpr
: -deterministic choice
A mapping from functions to its signature and a number of type variables it needs to be completely defined
Type synonym: NeededMapping = (QName,(TypeExpr,[TVarIndex]))