1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
module FlatCurry.Annotated.Types
( module FlatCurry.Annotated.Types
, module FlatCurry.Types
) where
import FlatCurry.Types ( QName, VarIndex, Visibility (..), TVarIndex
, TypeDecl (..), OpDecl (..), Fixity (..)
, TypeExpr (..), ConsDecl (..)
, Literal (..), CombType (..), CaseType (..)
)
data AProg a = AProg String [String] [TypeDecl] [AFuncDecl a] [OpDecl]
type Arity = Int
data AFuncDecl a = AFunc QName Arity Visibility TypeExpr (ARule a)
data ARule a
= ARule a [(VarIndex, a)] (AExpr a)
| AExternal a String
data AExpr a
= AVar a VarIndex
| ALit a Literal
| AComb a CombType (QName, a) [AExpr a]
| ALet a [((VarIndex, a), AExpr a)] (AExpr a)
| AFree a [(VarIndex, a)] (AExpr a)
| AOr a (AExpr a) (AExpr a)
| ACase a CaseType (AExpr a) [ABranchExpr a]
| ATyped a (AExpr a) TypeExpr
data ABranchExpr a = ABranch (APattern a) (AExpr a)
data APattern a
= APattern a (QName, a) [(VarIndex, a)]
| ALPattern a Literal
|