blob: 005ae92b192cd145814dc6eecf7a91958efd3c0d (
plain)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
module Transfer.Core.Skel where
-- Haskell module generated by the BNF converter
import Transfer.Core.Abs
import Transfer.ErrM
type Result = Err String
failure :: Show a => a -> Result
failure x = Bad $ "Undefined case: " ++ show x
transTree :: Tree c -> Result
transTree t = case t of
Module decls -> failure t
DataDecl cident exp consdecls -> failure t
TypeDecl cident exp -> failure t
ValueDecl cident exp -> failure t
ConsDecl cident exp -> failure t
PCons cident patterns -> failure t
PVar patternvariable -> failure t
PRec fieldpatterns -> failure t
PStr str -> failure t
PInt n -> failure t
FieldPattern cident pattern -> failure t
PVVar cident -> failure t
PVWild -> failure t
ELet letdefs exp -> failure t
ECase exp cases -> failure t
EAbs patternvariable exp -> failure t
EPi patternvariable exp0 exp1 -> failure t
EApp exp0 exp1 -> failure t
EProj exp cident -> failure t
ERecType fieldtypes -> failure t
ERec fieldvalues -> failure t
EVar cident -> failure t
EType -> failure t
EStr str -> failure t
EInteger n -> failure t
EDouble d -> failure t
EMeta tmeta -> failure t
LetDef cident exp -> failure t
Case pattern exp0 exp1 -> failure t
FieldType cident exp -> failure t
FieldValue cident exp -> failure t
TMeta str -> failure t
CIdent str -> failure t
transModule :: Module -> Result
transModule t = case t of
Module decls -> failure t
transDecl :: Decl -> Result
transDecl t = case t of
DataDecl cident exp consdecls -> failure t
TypeDecl cident exp -> failure t
ValueDecl cident exp -> failure t
transConsDecl :: ConsDecl -> Result
transConsDecl t = case t of
ConsDecl cident exp -> failure t
transPattern :: Pattern -> Result
transPattern t = case t of
PCons cident patterns -> failure t
PVar patternvariable -> failure t
PRec fieldpatterns -> failure t
PStr str -> failure t
PInt n -> failure t
transFieldPattern :: FieldPattern -> Result
transFieldPattern t = case t of
FieldPattern cident pattern -> failure t
transPatternVariable :: PatternVariable -> Result
transPatternVariable t = case t of
PVVar cident -> failure t
PVWild -> failure t
transExp :: Exp -> Result
transExp t = case t of
ELet letdefs exp -> failure t
ECase exp cases -> failure t
EAbs patternvariable exp -> failure t
EPi patternvariable exp0 exp1 -> failure t
EApp exp0 exp1 -> failure t
EProj exp cident -> failure t
ERecType fieldtypes -> failure t
ERec fieldvalues -> failure t
EVar cident -> failure t
EType -> failure t
EStr str -> failure t
EInteger n -> failure t
EDouble d -> failure t
EMeta tmeta -> failure t
transLetDef :: LetDef -> Result
transLetDef t = case t of
LetDef cident exp -> failure t
transCase :: Case -> Result
transCase t = case t of
Case pattern exp0 exp1 -> failure t
transFieldType :: FieldType -> Result
transFieldType t = case t of
FieldType cident exp -> failure t
transFieldValue :: FieldValue -> Result
transFieldValue t = case t of
FieldValue cident exp -> failure t
transTMeta :: TMeta -> Result
transTMeta t = case t of
TMeta str -> failure t
transCIdent :: CIdent -> Result
transCIdent t = case t of
CIdent str -> failure t
|