This library contains a version of FlatCurry's abstract syntax tree which can be annotated with arbitrary information due to a polymorphic type parameter. For instance, this could be used to annotate function declarations and expressions with their corresponding type.
For more information about the abstract syntax tree of FlatCurry,
see the documentation of the respective module.
data AProg a
Annotated FlatCurry program (corresponds to a module)
Constructors:
Known instances:
type Arity
= Int
Arity of a function declaration
data AFuncDecl a
Annotated function declaration
Constructors:
AFunc
:: QName -> Arity -> Visibility -> TypeExpr -> (ARule a) -> AFuncDecl a
Known instances:
Eq a => Eq (AFuncDecl a)
Ord a => Ord (AFuncDecl a)
Read a => Read (AFuncDecl a)
Show a => Show (AFuncDecl a)
data ARule a
Annotated function rule
Constructors:
Known instances:
data AExpr a
Annotated expression
Constructors:
AVar
:: a -> VarIndex -> AExpr a
ALit
:: a -> Literal -> AExpr a
AComb
:: a -> CombType -> (QName, a) -> [AExpr a] -> AExpr a
ALet
:: a -> [((VarIndex, a), AExpr a)] -> (AExpr a) -> AExpr a
AFree
:: a -> [(VarIndex, a)] -> (AExpr a) -> AExpr a
AOr
:: a -> (AExpr a) -> (AExpr a) -> AExpr a
ACase
:: a -> CaseType -> (AExpr a) -> [ABranchExpr a] -> AExpr a
ATyped
:: a -> (AExpr a) -> TypeExpr -> AExpr a
Known instances:
data ABranchExpr a
Annotated case branch
Constructors:
Known instances:
Eq a => Eq (ABranchExpr a)
Ord a => Ord (ABranchExpr a)
Read a => Read (ABranchExpr a)
Show a => Show (ABranchExpr a)
data APattern a
Annotated pattern
Constructors:
APattern
:: a -> (QName, a) -> [(VarIndex, a)] -> APattern a
ALPattern
:: a -> Literal -> APattern a
Known instances:
Eq a => Eq (APattern a)
Ord a => Ord (APattern a)
Read a => Read (APattern a)
Show a => Show (APattern a)