-- File generated by the BNF Converter. -- Templates for pattern matching on abstract syntax {-# LANGUAGE GADTs #-} {-# 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 transTree :: AbsGF.Tree c -> Result transTree t = case t of AbsGF.Gr modDefs -> failure t AbsGF.MMain x1 x2 concSpecs -> failure t AbsGF.MModule complMod modType modBody -> failure t AbsGF.ConcSpecC x concExp -> failure t AbsGF.ConcExpC x transfers -> failure t AbsGF.TransferIn openDecl -> failure t AbsGF.TransferOut openDecl -> failure t AbsGF.MTAbstract x -> failure t AbsGF.MTConcrete x1 x2 -> failure t AbsGF.MTInstance x1 x2 -> failure t AbsGF.MTInterface x -> failure t AbsGF.MTResource x -> failure t AbsGF.MTTransfer x openDecl1 openDecl2 -> failure t AbsGF.MBody extend opens topDefs -> failure t AbsGF.MReuse x -> failure t AbsGF.MUnion includeds -> failure t AbsGF.MWith x openDecls -> failure t AbsGF.MWithE includeds x openDecls -> failure t AbsGF.Ext includeds -> failure t AbsGF.NoExt -> failure t AbsGF.NoOpens -> failure t AbsGF.OpenIn openDecls -> failure t AbsGF.OName x -> failure t AbsGF.OQual qualOpen x1 x2 -> failure t AbsGF.OQualQO qualOpen x -> failure t AbsGF.CMCompl -> failure t AbsGF.CMIncompl -> failure t AbsGF.QOCompl -> failure t AbsGF.QOIncompl -> failure t AbsGF.QOInterface -> failure t AbsGF.IAll x -> failure t AbsGF.IMinus x idents -> failure t AbsGF.ISome x idents -> failure t AbsGF.DDeclC names exp -> failure t AbsGF.DDef names exp -> failure t AbsGF.DFull names exp1 exp2 -> failure t AbsGF.DPatt name patts exp -> failure t AbsGF.DefCat catDefs -> failure t AbsGF.DefData dataDefs -> failure t AbsGF.DefDef defs -> failure t AbsGF.DefFlag flagDefs -> failure t AbsGF.DefFun funDefs -> failure t AbsGF.DefFunData funDefs -> failure t AbsGF.DefLin defs -> failure t AbsGF.DefLincat printDefs -> failure t AbsGF.DefLindef defs -> failure t AbsGF.DefLintype defs -> failure t AbsGF.DefOper defs -> failure t AbsGF.DefPackage x topDefs -> failure t AbsGF.DefPar parDefs -> failure t AbsGF.DefPattern defs -> failure t AbsGF.DefPrintCat printDefs -> failure t AbsGF.DefPrintFun printDefs -> failure t AbsGF.DefPrintOld printDefs -> failure t AbsGF.DefTokenizer x -> failure t AbsGF.DefTrans defs -> failure t AbsGF.DefVars defs -> failure t AbsGF.ListCatDefC x dDecls -> failure t AbsGF.ListSizeCatDef x dDecls n -> failure t AbsGF.SimpleCatDef x dDecls -> failure t AbsGF.FunDefC idents exp -> failure t AbsGF.DataDefC x dataConstrs -> failure t AbsGF.DataId x -> failure t AbsGF.DataQId x1 x2 -> failure t AbsGF.ParDefAbs x -> failure t AbsGF.ParDefDir x parConstrs -> failure t AbsGF.ParDefIndir x1 x2 -> failure t AbsGF.ParConstrC x dDecls -> failure t AbsGF.PrintDefC names exp -> failure t AbsGF.FlagDefC x1 x2 -> failure t AbsGF.IdentName x -> failure t AbsGF.ListNameC x -> failure t AbsGF.LDDecl idents exp -> failure t AbsGF.LDDef idents exp -> failure t AbsGF.LDFull idents exp1 exp2 -> failure t AbsGF.EAbstr binds exp -> failure t AbsGF.EApp exp1 exp2 -> failure t AbsGF.ECTable binds exp -> failure t AbsGF.ECase exp cases -> failure t AbsGF.EConAt x exp -> failure t AbsGF.EConcat exp1 exp2 -> failure t AbsGF.ECons x -> failure t AbsGF.EConstr x -> failure t AbsGF.EData -> failure t AbsGF.EEmpty -> failure t AbsGF.EEqs equations -> failure t AbsGF.EExtend exp1 exp2 -> failure t AbsGF.EGlue exp1 exp2 -> failure t AbsGF.EIdent x -> failure t AbsGF.EIndir x -> failure t AbsGF.EInt n -> failure t AbsGF.ELString lString -> failure t AbsGF.ELet locDefs exp -> failure t AbsGF.ELetb locDefs exp -> failure t AbsGF.ELin x -> failure t AbsGF.EList x exps -> failure t AbsGF.EMeta -> failure t AbsGF.EPre exp alterns -> failure t AbsGF.EProd decl exp -> failure t AbsGF.EProj exp label -> failure t AbsGF.EQCons x1 x2 -> failure t AbsGF.EQConstr x1 x2 -> failure t AbsGF.ERecord locDefs -> failure t AbsGF.ESelect exp1 exp2 -> failure t AbsGF.ESort sort -> failure t AbsGF.EString str -> failure t AbsGF.EStrings str -> failure t AbsGF.EStrs exps -> failure t AbsGF.ETTable exp cases -> failure t AbsGF.ETType exp1 exp2 -> failure t AbsGF.ETable cases -> failure t AbsGF.ETupTyp exp1 exp2 -> failure t AbsGF.ETuple tupleComps -> failure t AbsGF.ETyped exp1 exp2 -> failure t AbsGF.EVTable exp exps -> failure t AbsGF.EVariants exps -> failure t AbsGF.EWhere exp locDefs -> failure t AbsGF.ConsExp exp exps -> failure t AbsGF.NilExp -> failure t AbsGF.PC x patts -> failure t AbsGF.PCon x -> failure t AbsGF.PInt n -> failure t AbsGF.PQ x1 x2 -> failure t AbsGF.PQC x1 x2 patts -> failure t AbsGF.PR pattAsss -> failure t AbsGF.PStr str -> failure t AbsGF.PTup pattTupleComps -> failure t AbsGF.PV x -> failure t AbsGF.PW -> failure t AbsGF.PA idents patt -> failure t AbsGF.LIdent x -> failure t AbsGF.LVar n -> failure t AbsGF.Sort_PType -> failure t AbsGF.Sort_Str -> failure t AbsGF.Sort_Strs -> failure t AbsGF.Sort_Tok -> failure t AbsGF.Sort_Type -> failure t AbsGF.AltP patt -> failure t AbsGF.BIdent x -> failure t AbsGF.BWild -> failure t AbsGF.DDec binds exp -> failure t AbsGF.DExp exp -> failure t AbsGF.TComp exp -> failure t AbsGF.PTComp patt -> failure t AbsGF.CaseC pattAlts exp -> failure t AbsGF.Equ patts exp -> failure t AbsGF.Alt exp1 exp2 -> failure t AbsGF.DDDec binds exp -> failure t AbsGF.DDExp exp -> failure t AbsGF.OldGr includeDecl topDefs -> failure t AbsGF.Incl fileNames -> failure t AbsGF.NoIncl -> failure t AbsGF.FAddId x fileName -> failure t AbsGF.FDot fileName -> failure t AbsGF.FIdent x -> failure t AbsGF.FMinus fileName -> failure t AbsGF.FSlash fileName -> failure t AbsGF.FString str -> failure t 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