-- File generated by the BNF Converter. -- Templates for pattern matching on abstract syntax {-# OPTIONS_GHC -fno-warn-unused-matches #-} module SkelGF where import Prelude (($), Either(..), String, (++), Show, show) import qualified AbsGF type Err = Either String type Result = Err String failure :: Show a => a -> Result failure x = Left $ "Undefined case: " ++ show x transIdent :: AbsGF.Ident -> Result transIdent x = case x of AbsGF.Ident string -> failure x transLString :: AbsGF.LString -> Result transLString x = case x of AbsGF.LString string -> failure x transGrammar :: AbsGF.Grammar -> Result transGrammar x = case x of AbsGF.Gr modDefs -> failure x transModDef :: AbsGF.ModDef -> Result transModDef x = case x of AbsGF.MMain x1 x2 concSpecs -> failure x AbsGF.MModule complMod modType modBody -> failure x transConcSpec :: AbsGF.ConcSpec -> Result transConcSpec x = case x of AbsGF.ConcSpecC x concExp -> failure x transConcExp :: AbsGF.ConcExp -> Result transConcExp x = case x of AbsGF.ConcExpC x transfers -> failure x transTransfer :: AbsGF.Transfer -> Result transTransfer x = case x of AbsGF.TransferIn openDecl -> failure x AbsGF.TransferOut openDecl -> failure x transModType :: AbsGF.ModType -> Result transModType x = case x of AbsGF.MTAbstract x -> failure x AbsGF.MTConcrete x1 x2 -> failure x AbsGF.MTInstance x1 x2 -> failure x AbsGF.MTInterface x -> failure x AbsGF.MTResource x -> failure x AbsGF.MTTransfer x openDecl1 openDecl2 -> failure x transModBody :: AbsGF.ModBody -> Result transModBody x = case x of AbsGF.MBody extend opens topDefs -> failure x AbsGF.MReuse x -> failure x AbsGF.MUnion includeds -> failure x AbsGF.MWith x openDecls -> failure x AbsGF.MWithE includeds x openDecls -> failure x transExtend :: AbsGF.Extend -> Result transExtend x = case x of AbsGF.Ext includeds -> failure x AbsGF.NoExt -> failure x transOpens :: AbsGF.Opens -> Result transOpens x = case x of AbsGF.NoOpens -> failure x AbsGF.OpenIn openDecls -> failure x transOpenDecl :: AbsGF.OpenDecl -> Result transOpenDecl x = case x of AbsGF.OName x -> failure x AbsGF.OQual qualOpen x1 x2 -> failure x AbsGF.OQualQO qualOpen x -> failure x transComplMod :: AbsGF.ComplMod -> Result transComplMod x = case x of AbsGF.CMCompl -> failure x AbsGF.CMIncompl -> failure x transQualOpen :: AbsGF.QualOpen -> Result transQualOpen x = case x of AbsGF.QOCompl -> failure x AbsGF.QOIncompl -> failure x AbsGF.QOInterface -> failure x transIncluded :: AbsGF.Included -> Result transIncluded x = case x of AbsGF.IAll x -> failure x AbsGF.IMinus x idents -> failure x AbsGF.ISome x idents -> failure x transDef :: AbsGF.Def -> Result transDef x = case x of AbsGF.DDeclC names exp -> failure x AbsGF.DDef names exp -> failure x AbsGF.DFull names exp1 exp2 -> failure x AbsGF.DPatt name patts exp -> failure x transTopDef :: AbsGF.TopDef -> Result transTopDef x = case x of AbsGF.DefCat catDefs -> failure x AbsGF.DefData dataDefs -> failure x AbsGF.DefDef defs -> failure x AbsGF.DefFlag flagDefs -> failure x AbsGF.DefFun funDefs -> failure x AbsGF.DefFunData funDefs -> failure x AbsGF.DefLin defs -> failure x AbsGF.DefLincat printDefs -> failure x AbsGF.DefLindef defs -> failure x AbsGF.DefLintype defs -> failure x AbsGF.DefOper defs -> failure x AbsGF.DefPackage x topDefs -> failure x AbsGF.DefPar parDefs -> failure x AbsGF.DefPattern defs -> failure x AbsGF.DefPrintCat printDefs -> failure x AbsGF.DefPrintFun printDefs -> failure x AbsGF.DefPrintOld printDefs -> failure x AbsGF.DefTokenizer x -> failure x AbsGF.DefTrans defs -> failure x AbsGF.DefVars defs -> failure x transCatDef :: AbsGF.CatDef -> Result transCatDef x = case x of AbsGF.ListCatDefC x dDecls -> failure x AbsGF.ListSizeCatDef x dDecls n -> failure x AbsGF.SimpleCatDef x dDecls -> failure x transFunDef :: AbsGF.FunDef -> Result transFunDef x = case x of AbsGF.FunDefC idents exp -> failure x transDataDef :: AbsGF.DataDef -> Result transDataDef x = case x of AbsGF.DataDefC x dataConstrs -> failure x transDataConstr :: AbsGF.DataConstr -> Result transDataConstr x = case x of AbsGF.DataId x -> failure x AbsGF.DataQId x1 x2 -> failure x transParDef :: AbsGF.ParDef -> Result transParDef x = case x of AbsGF.ParDefAbs x -> failure x AbsGF.ParDefDir x parConstrs -> failure x AbsGF.ParDefIndir x1 x2 -> failure x transParConstr :: AbsGF.ParConstr -> Result transParConstr x = case x of AbsGF.ParConstrC x dDecls -> failure x transPrintDef :: AbsGF.PrintDef -> Result transPrintDef x = case x of AbsGF.PrintDefC names exp -> failure x transFlagDef :: AbsGF.FlagDef -> Result transFlagDef x = case x of AbsGF.FlagDefC x1 x2 -> failure x transName :: AbsGF.Name -> Result transName x = case x of AbsGF.IdentName x -> failure x AbsGF.ListNameC x -> failure x transLocDef :: AbsGF.LocDef -> Result transLocDef x = case x of AbsGF.LDDecl idents exp -> failure x AbsGF.LDDef idents exp -> failure x AbsGF.LDFull idents exp1 exp2 -> failure x transExp :: AbsGF.Exp -> Result transExp x = case x of AbsGF.EAbstr binds exp -> failure x AbsGF.EApp exp1 exp2 -> failure x AbsGF.ECTable binds exp -> failure x AbsGF.ECase exp cases -> failure x AbsGF.EConAt x exp -> failure x AbsGF.EConcat exp1 exp2 -> failure x AbsGF.ECons x -> failure x AbsGF.EConstr x -> failure x AbsGF.EData -> failure x AbsGF.EEmpty -> failure x AbsGF.EEqs equations -> failure x AbsGF.EExtend exp1 exp2 -> failure x AbsGF.EGlue exp1 exp2 -> failure x AbsGF.EIdent x -> failure x AbsGF.EIndir x -> failure x AbsGF.EInt n -> failure x AbsGF.ELString lString -> failure x AbsGF.ELet locDefs exp -> failure x AbsGF.ELetb locDefs exp -> failure x AbsGF.ELin x -> failure x AbsGF.EList x exps -> failure x AbsGF.EMeta -> failure x AbsGF.EPre exp alterns -> failure x AbsGF.EProd decl exp -> failure x AbsGF.EProj exp label -> failure x AbsGF.EQCons x1 x2 -> failure x AbsGF.EQConstr x1 x2 -> failure x AbsGF.ERecord locDefs -> failure x AbsGF.ESelect exp1 exp2 -> failure x AbsGF.ESort sort -> failure x AbsGF.EString str -> failure x AbsGF.EStrings str -> failure x AbsGF.EStrs exps -> failure x AbsGF.ETTable exp cases -> failure x AbsGF.ETType exp1 exp2 -> failure x AbsGF.ETable cases -> failure x AbsGF.ETupTyp exp1 exp2 -> failure x AbsGF.ETuple tupleComps -> failure x AbsGF.ETyped exp1 exp2 -> failure x AbsGF.EVTable exp exps -> failure x AbsGF.EVariants exps -> failure x AbsGF.EWhere exp locDefs -> failure x transExps :: AbsGF.Exps -> Result transExps x = case x of AbsGF.ConsExp exp exps -> failure x AbsGF.NilExp -> failure x transPatt :: AbsGF.Patt -> Result transPatt x = case x of AbsGF.PC x patts -> failure x AbsGF.PCon x -> failure x AbsGF.PInt n -> failure x AbsGF.PQ x1 x2 -> failure x AbsGF.PQC x1 x2 patts -> failure x AbsGF.PR pattAsss -> failure x AbsGF.PStr str -> failure x AbsGF.PTup pattTupleComps -> failure x AbsGF.PV x -> failure x AbsGF.PW -> failure x transPattAss :: AbsGF.PattAss -> Result transPattAss x = case x of AbsGF.PA idents patt -> failure x transLabel :: AbsGF.Label -> Result transLabel x = case x of AbsGF.LIdent x -> failure x AbsGF.LVar n -> failure x transSort :: AbsGF.Sort -> Result transSort x = case x of AbsGF.Sort_PType -> failure x AbsGF.Sort_Str -> failure x AbsGF.Sort_Strs -> failure x AbsGF.Sort_Tok -> failure x AbsGF.Sort_Type -> failure x transPattAlt :: AbsGF.PattAlt -> Result transPattAlt x = case x of AbsGF.AltP patt -> failure x transBind :: AbsGF.Bind -> Result transBind x = case x of AbsGF.BIdent x -> failure x AbsGF.BWild -> failure x transDecl :: AbsGF.Decl -> Result transDecl x = case x of AbsGF.DDec binds exp -> failure x AbsGF.DExp exp -> failure x transTupleComp :: AbsGF.TupleComp -> Result transTupleComp x = case x of AbsGF.TComp exp -> failure x transPattTupleComp :: AbsGF.PattTupleComp -> Result transPattTupleComp x = case x of AbsGF.PTComp patt -> failure x transCase :: AbsGF.Case -> Result transCase x = case x of AbsGF.CaseC pattAlts exp -> failure x transEquation :: AbsGF.Equation -> Result transEquation x = case x of AbsGF.Equ patts exp -> failure x transAltern :: AbsGF.Altern -> Result transAltern x = case x of AbsGF.Alt exp1 exp2 -> failure x transDDecl :: AbsGF.DDecl -> Result transDDecl x = case x of AbsGF.DDDec binds exp -> failure x AbsGF.DDExp exp -> failure x transOldGrammar :: AbsGF.OldGrammar -> Result transOldGrammar x = case x of AbsGF.OldGr includeDecl topDefs -> failure x transIncludeDecl :: AbsGF.IncludeDecl -> Result transIncludeDecl x = case x of AbsGF.Incl fileNames -> failure x AbsGF.NoIncl -> failure x transFileName :: AbsGF.FileName -> Result transFileName x = case x of AbsGF.FAddId x fileName -> failure x AbsGF.FDot fileName -> failure x AbsGF.FIdent x -> failure x AbsGF.FMinus fileName -> failure x AbsGF.FSlash fileName -> failure x AbsGF.FString str -> failure x