summaryrefslogtreecommitdiff
path: root/src/GF/Canon/SkelGFC.hs
blob: a1d9331d8fa087a45ef0e440c73f5079cdb7c3fd (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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
module GF.Canon.SkelGFC where

-- Haskell module generated by the BNF converter

import GF.Canon.AbsGFC
import GF.Data.ErrM
import GF.Infra.Ident

type Result = Err String

failure :: Show a => a -> Result
failure x = Bad $ "Undefined case: " ++ show x

transIdent :: Ident -> Result
transIdent x = case x of
  Ident str  -> failure x


transCanon :: Canon -> Result
transCanon x = case x of
  MGr ids id modules  -> failure x
  Gr modules  -> failure x


transLine :: Line -> Result
transLine x = case x of
  LMulti ids id  -> failure x
  LHeader modtype extend open  -> failure x
  LFlag flag  -> failure x
  LDef def  -> failure x
  LEnd  -> failure x


transModule :: Module -> Result
transModule x = case x of
  Mod modtype extend open flags defs  -> failure x


transModType :: ModType -> Result
transModType x = case x of
  MTAbs id  -> failure x
  MTCnc id0 id  -> failure x
  MTRes id  -> failure x
  MTTrans id0 id1 id  -> failure x


transExtend :: Extend -> Result
transExtend x = case x of
  Ext ids  -> failure x
  NoExt  -> failure x


transOpen :: Open -> Result
transOpen x = case x of
  Opens ids  -> failure x
  NoOpens  -> failure x


transFlag :: Flag -> Result
transFlag x = case x of
  Flg id0 id  -> failure x


transDef :: Def -> Result
transDef x = case x of
  AbsDCat id decls cidents  -> failure x
  AbsDFun id exp0 exp  -> failure x
  AbsDTrans id exp  -> failure x
  ResDPar id pardefs  -> failure x
  ResDOper id ctype term  -> failure x
  CncDCat id ctype term0 term  -> failure x
  CncDFun id cident argvars term0 term  -> failure x
  AnyDInd id0 status id  -> failure x


transParDef :: ParDef -> Result
transParDef x = case x of
  ParD id ctypes  -> failure x


transStatus :: Status -> Result
transStatus x = case x of
  Canon  -> failure x
  NonCan  -> failure x


transCIdent :: CIdent -> Result
transCIdent x = case x of
  CIQ id0 id  -> failure x


transExp :: Exp -> Result
transExp x = case x of
  EApp exp0 exp  -> failure x
  EProd id exp0 exp  -> failure x
  EAbs id exp  -> failure x
  EAtom atom  -> failure x
  EData  -> failure x
  EEq equations  -> failure x


transSort :: Sort -> Result
transSort x = case x of
  SType  -> failure x


transEquation :: Equation -> Result
transEquation x = case x of
  Equ apatts exp  -> failure x


transAPatt :: APatt -> Result
transAPatt x = case x of
  APC cident apatts  -> failure x
  APV id  -> failure x
  APS str  -> failure x
  API n  -> failure x
  APW  -> failure x


transAtom :: Atom -> Result
transAtom x = case x of
  AC cident  -> failure x
  AD cident  -> failure x
  AV id  -> failure x
  AM n  -> failure x
  AS str  -> failure x
  AI n  -> failure x
  AT sort  -> failure x


transDecl :: Decl -> Result
transDecl x = case x of
  Decl id exp  -> failure x


transCType :: CType -> Result
transCType x = case x of
  RecType labellings  -> failure x
  Table ctype0 ctype  -> failure x
  Cn cident  -> failure x
  TStr  -> failure x
  TInts n  -> failure x


transLabelling :: Labelling -> Result
transLabelling x = case x of
  Lbg label ctype  -> failure x


transTerm :: Term -> Result
transTerm x = case x of
  Arg argvar  -> failure x
  I cident  -> failure x
  Par cident terms  -> failure x
  LI id  -> failure x
  R assigns  -> failure x
  P term label  -> failure x
  T ctype cases  -> failure x
  V ctype terms  -> failure x
  S term0 term  -> failure x
  C term0 term  -> failure x
  FV terms  -> failure x
  EInt n  -> failure x
  K tokn  -> failure x
  E  -> failure x


transTokn :: Tokn -> Result
transTokn x = case x of
  KS str  -> failure x
  KP strs variants  -> failure x
  KM str  -> failure x


transAssign :: Assign -> Result
transAssign x = case x of
  Ass label term  -> failure x


transCase :: Case -> Result
transCase x = case x of
  Cas patts term  -> failure x


transVariant :: Variant -> Result
transVariant x = case x of
  Var strs0 strs  -> failure x


transLabel :: Label -> Result
transLabel x = case x of
  L id  -> failure x
  LV n  -> failure x


transArgVar :: ArgVar -> Result
transArgVar x = case x of
  A id n  -> failure x
  AB id n0 n  -> failure x


transPatt :: Patt -> Result
transPatt x = case x of
  PC cident patts  -> failure x
  PV id  -> failure x
  PW  -> failure x
  PR pattassigns  -> failure x
  PI n  -> failure x


transPattAssign :: PattAssign -> Result
transPattAssign x = case x of
  PAss label patt  -> failure x