Module ICurry.Types

Types for representing ICurry programs

Author: Marc Andre Wittorf

Summary of exported operations:

Exported datatypes:


IQName

An ICurry qualified name

Type synonym: IQName = (String,String)


IArity

An ICurry arity

Type synonym: IArity = Int


IVarIndex

An ICurry variable (numerical index)

Type synonym: IVarIndex = Int


ITVarIndex

An ICurry type variable (numerical index)

Type synonym: ITVarIndex = Int


IAssign

An ICurry assignment

Type synonym: IAssign = (IVarIndex,IExpr)


ILiteral

A Literal

Constructors:

  • IInt :: Int -> ILiteral : an integer literal
  • IChar :: Char -> ILiteral : a char literal
  • IFloat :: Float -> ILiteral : a float literal

IProg

An ICurry module

Constructors:


IVisibility

An ICurry visibility

Constructors:

  • Public :: IVisibility : Visible and usable from other modules
  • Private :: IVisibility : Invisible and not usable from other modules

IDataType

An ICurry data type

Type synonym: IDataType = (IQName,IVisibility,[ITVarIndex],[IConstructor])


IConstructor

An ICurry constructor

Constructors:


ITExpr

An ICurry type expression

Constructors:


IFunction

An ICurry function

Constructors:


IFuncBody

An ICurry function's behavior

Constructors:

  • IExternal :: IArity -> String -> IFuncBody : the function is externally defined
  • IFuncBody :: [IVarIndex] -> IBlock -> IFuncBody : the function is defined here

IBlock

An ICurry block

Constructors:


IConsBranch

An ICurry branch over constructors

Constructors:


ILitBranch

An ICurry branch over literals

Constructors:


IExpr

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

NeededMapping

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]))


Exported operations: