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