Module FlatCurry.Typed.Build

Some operations to construct type-annotated FlatCurry programs.

Author: Michael Hanus

Version: May 2021

Summary of exported operations:

baseType :: (String,String) -> TypeExpr  Deterministic 
A base FlatCurry type.
(~>) :: TypeExpr -> TypeExpr -> TypeExpr  Deterministic 
A function type.
unitType :: TypeExpr  Deterministic 
Type () as a FlatCurry type.
charType :: TypeExpr  Deterministic 
Type Char as a FlatCurry type.
boolType :: TypeExpr  Deterministic 
Type Bool as a FlatCurry type.
listType :: TypeExpr -> TypeExpr  Deterministic 
Constructs a list type from an element type.
stringType :: TypeExpr  Deterministic 
Type String as a FlatCurry type.
tupleType :: [TypeExpr] -> TypeExpr  Deterministic 
Constructs a tuple type from list of component types.
tupleCons :: Int -> (String,String)  Deterministic 
Generates an n-ary tuple constructor (only meaningful for n>1).
tupleExpr :: [AExpr TypeExpr] -> AExpr TypeExpr  Deterministic 
Constructs a tuple expression.
string2TAFCY :: String -> AExpr TypeExpr  Deterministic 

Exported operations:

baseType :: (String,String) -> TypeExpr  Deterministic 

A base FlatCurry type.

Further infos:
  • solution complete, i.e., able to compute all solutions

(~>) :: TypeExpr -> TypeExpr -> TypeExpr  Deterministic 

A function type.

Further infos:
  • defined as right-associative infix operator with precedence 9
  • solution complete, i.e., able to compute all solutions

unitType :: TypeExpr  Deterministic 

Type () as a FlatCurry type.

Further infos:
  • solution complete, i.e., able to compute all solutions

charType :: TypeExpr  Deterministic 

Type Char as a FlatCurry type.

Further infos:
  • solution complete, i.e., able to compute all solutions

boolType :: TypeExpr  Deterministic 

Type Bool as a FlatCurry type.

Further infos:
  • solution complete, i.e., able to compute all solutions

listType :: TypeExpr -> TypeExpr  Deterministic 

Constructs a list type from an element type.

Further infos:
  • solution complete, i.e., able to compute all solutions

stringType :: TypeExpr  Deterministic 

Type String as a FlatCurry type.

Further infos:
  • solution complete, i.e., able to compute all solutions

tupleType :: [TypeExpr] -> TypeExpr  Deterministic 

Constructs a tuple type from list of component types.

tupleCons :: Int -> (String,String)  Deterministic 

Generates an n-ary tuple constructor (only meaningful for n>1).

tupleExpr :: [AExpr TypeExpr] -> AExpr TypeExpr  Deterministic 

Constructs a tuple expression.

string2TAFCY :: String -> AExpr TypeExpr  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions