content: -- File generated by the BNF Converter (bnfc 2.9.4.1).
  
  -- Templates for pattern matching on abstract syntax
  
  {-# OPTIONS_GHC -fno-warn-unused-matches #-}
  
  module Lang.SkelLang where
  
  import Prelude (($), Either(..), String, (++), Show, show)
  import qualified Lang.AbsLang
  
  type Err = Either String
  type Result = Err String
  
  failure :: Show a => a -> Result
  failure x = Left $ "Undefined case: " ++ show x
  
  transIdent :: Lang.AbsLang.Ident -> Result
  transIdent x = case x of
    Lang.AbsLang.Ident string -> failure x
  
  transProgram :: Lang.AbsLang.Program -> Result
  transProgram x = case x of
    Lang.AbsLang.Prog toplevels -> failure x
  
  transTopLevel :: Lang.AbsLang.TopLevel -> Result
  transTopLevel x = case x of
    Lang.AbsLang.TopDecl decl -> failure x
    Lang.AbsLang.TopSub subdef -> failure x
  
  transDecl :: Lang.AbsLang.Decl -> Result
  transDecl x = case x of
    Lang.AbsLang.NameDecl ident -> failure x
    Lang.AbsLang.ProtocolDecl protocol -> failure x
    Lang.AbsLang.FlavorDecl string -> failure x
    Lang.AbsLang.StateDecl stateaspects -> failure x
    Lang.AbsLang.ActionTypeDecl actiontypename actiontype -> failure x
    Lang.AbsLang.ActionDecl actionname actiontype actionarrayinfo provider protocol -> failure x
    Lang.AbsLang.GlobalVarDecl vardecl -> failure x
    Lang.AbsLang.TypeDecl typename typecompiledefinition -> failure x
    Lang.AbsLang.TypeAliasDecl typename type_ -> failure x
    Lang.AbsLang.FieldsDecl typename fielddefs -> failure x
    Lang.AbsLang.NumericDecl typename integer -> failure x
    Lang.AbsLang.DefineDecl definename defineparams exp -> failure x
  
  transVarDecl :: Lang.AbsLang.VarDecl -> Result
  transVarDecl x = case x of
    Lang.AbsLang.MkVarDecl type_ varnames -> failure x
  
  transStateAspects :: Lang.AbsLang.StateAspects -> Result
  transStateAspects x = case x of
    Lang.AbsLang.StateAspectList stateaspects -> failure x
  
  transActionArrayInfo :: Lang.AbsLang.ActionArrayInfo -> Result
  transActionArrayInfo x = case x of
    Lang.AbsLang.ActionSingle -> failure x
    Lang.AbsLang.ActionArray exp -> failure x
  
  transProvider :: Lang.AbsLang.Provider -> Result
  transProvider x = case x of
    Lang.AbsLang.ProviderExternal -> failure x
    Lang.AbsLang.ProviderModule string -> failure x
    Lang.AbsLang.ProviderModuleShare string actionnames -> failure x
  
  transProtocol :: Lang.AbsLang.Protocol -> Result
  transProtocol x = case x of
    Lang.AbsLang.ProtocolAuto -> failure x
    Lang.AbsLang.ProtocolGiven exp -> failure x
  
  transTypeCompileDefinition :: Lang.AbsLang.TypeCompileDefinition -> Result
  transTypeCompileDefinition x = case x of
    Lang.AbsLang.TypeCompileString string -> failure x
    Lang.AbsLang.TypeCompileInfer -> failure x
  
  transFieldDef :: Lang.AbsLang.FieldDef -> Result
  transFieldDef x = case x of
    Lang.AbsLang.MkFieldDef fieldname type_ -> failure x
  
  transFieldName :: Lang.AbsLang.FieldName -> Result
  transFieldName x = case x of
    Lang.AbsLang.FieldNameIdent ident -> failure x
    Lang.AbsLang.FieldNameString string -> failure x
  
  transFunPat :: Lang.AbsLang.FunPat -> Result
  transFunPat x = case x of
    Lang.AbsLang.FunPatPat pattern_ -> failure x
    Lang.AbsLang.FunPatFun pattern_ funpat -> failure x
  
  transPattern :: Lang.AbsLang.Pattern -> Result
  transPattern x = case x of
    Lang.AbsLang.PatternParam param -> failure x
    Lang.AbsLang.PatternTupleEmpty -> failure x
    Lang.AbsLang.PatternTupleTwoPlus pattern_ patterns -> failure x
  
  transParam :: Lang.AbsLang.Param -> Result
  transParam x = case x of
    Lang.AbsLang.MkParam ident type_ -> failure x
  
  transActionType :: Lang.AbsLang.ActionType -> Result
  transActionType x = case x of
    Lang.AbsLang.ActionTypeRaw funpat stateaspects1 stateaspects2 -> failure x
    Lang.AbsLang.ActionTypeNamed actiontypename -> failure x
  
  transType :: Lang.AbsLang.Type -> Result
  transType x = case x of
    Lang.AbsLang.FunType type_1 type_2 -> failure x
    Lang.AbsLang.NamedType ident -> failure x
    Lang.AbsLang.TupleZeroType -> failure x
    Lang.AbsLang.TupleTwoPlusType type_ types -> failure x
  
  transSubDef :: Lang.AbsLang.SubDef -> Result
  transSubDef x = case x of
    Lang.AbsLang.MkSub subflags subroutinename funpat sublines -> failure x
  
  transSubFlag :: Lang.AbsLang.SubFlag -> Result
  transSubFlag x = case x of
    Lang.AbsLang.Inline -> failure x
  
  transSubLine :: Lang.AbsLang.SubLine -> Result
  transSubLine x = case x of
    Lang.AbsLang.SubVarDecl vardecl -> failure x
    Lang.AbsLang.SubStm stm -> failure x
  
  transStm :: Lang.AbsLang.Stm -> Result
  transStm x = case x of
    Lang.AbsLang.Normal normalstm -> failure x
    Lang.AbsLang.Abnormal abnormalstm -> failure x
  
  transNormalStm :: Lang.AbsLang.NormalStm -> Result
  transNormalStm x = case x of
    Lang.AbsLang.Assign assignish -> failure x
    Lang.AbsLang.Return -> failure x
    Lang.AbsLang.Goto gotolabel -> failure x
    Lang.AbsLang.HintPower power actionname -> failure x
  
  transPower :: Lang.AbsLang.Power -> Result
  transPower x = case x of
    Lang.AbsLang.PowerOn -> failure x
    Lang.AbsLang.PowerOff -> failure x
  
  transAssignish :: Lang.AbsLang.Assignish -> Result
  transAssignish x = case x of
    Lang.AbsLang.WithLhs exp1 exp2 -> failure x
    Lang.AbsLang.WithoutLhs exp -> failure x
    Lang.AbsLang.PlusEquals exp1 exp2 -> failure x
    Lang.AbsLang.MinusEquals exp1 exp2 -> failure x
    Lang.AbsLang.Increment exp -> failure x
    Lang.AbsLang.Decrement exp -> failure x
  
  transAbnormalStm :: Lang.AbsLang.AbnormalStm -> Result
  transAbnormalStm x = case x of
    Lang.AbsLang.Label gotolabel -> failure x
    Lang.AbsLang.Scissors -> failure x
    Lang.AbsLang.While exp stmblock -> failure x
    Lang.AbsLang.For assignish1 exp assignish2 stmblock -> failure x
    Lang.AbsLang.ForEach varname exp1 exp2 stmblock -> failure x
    Lang.AbsLang.Block stmblock -> failure x
    Lang.AbsLang.IfLike iflikestm -> failure x
  
  transIfLikeStm :: Lang.AbsLang.IfLikeStm -> Result
  transIfLikeStm x = case x of
    Lang.AbsLang.IfElse exp stmblock postelsestm -> failure x
    Lang.AbsLang.IfOnly exp stmblock -> failure x
  
  transPostElseStm :: Lang.AbsLang.PostElseStm -> Result
  transPostElseStm x = case x of
    Lang.AbsLang.ElseIf iflikestm -> failure x
    Lang.AbsLang.ElseBlock stmblock -> failure x
  
  transStmBlock :: Lang.AbsLang.StmBlock -> Result
  transStmBlock x = case x of
    Lang.AbsLang.MkBlock stms -> failure x
  
  transStateAspect :: Lang.AbsLang.StateAspect -> Result
  transStateAspect x = case x of
    Lang.AbsLang.MkStateAspect ident -> failure x
  
  transTypeName :: Lang.AbsLang.TypeName -> Result
  transTypeName x = case x of
    Lang.AbsLang.MkTypeName ident -> failure x
  
  transVarName :: Lang.AbsLang.VarName -> Result
  transVarName x = case x of
    Lang.AbsLang.MkVarName ident -> failure x
  
  transActionTypeName :: Lang.AbsLang.ActionTypeName -> Result
  transActionTypeName x = case x of
    Lang.AbsLang.MkActionTypeName ident -> failure x
  
  transActionName :: Lang.AbsLang.ActionName -> Result
  transActionName x = case x of
    Lang.AbsLang.MkActionName ident -> failure x
  
  transDefineName :: Lang.AbsLang.DefineName -> Result
  transDefineName x = case x of
    Lang.AbsLang.MkDefineName ident -> failure x
  
  transDefineParam :: Lang.AbsLang.DefineParam -> Result
  transDefineParam x = case x of
    Lang.AbsLang.MkDefineParam ident -> failure x
  
  transSubroutineName :: Lang.AbsLang.SubroutineName -> Result
  transSubroutineName x = case x of
    Lang.AbsLang.MkSubroutineName ident -> failure x
  
  transGotoLabel :: Lang.AbsLang.GotoLabel -> Result
  transGotoLabel x = case x of
    Lang.AbsLang.MkGotoLabel ident -> failure x
  
  transCall :: Lang.AbsLang.Call -> Result
  transCall x = case x of
    Lang.AbsLang.ActionCall actionname args -> failure x
    Lang.AbsLang.SubCall subroutinename args -> failure x
  
  transArgs :: Lang.AbsLang.Args -> Result
  transArgs x = case x of
    Lang.AbsLang.MkArgs exps -> failure x
  
  transDict :: Lang.AbsLang.Dict -> Result
  transDict x = case x of
    Lang.AbsLang.MkDict dictassigs -> failure x
  
  transDictAssig :: Lang.AbsLang.DictAssig -> Result
  transDictAssig x = case x of
    Lang.AbsLang.MkDictAssig ident exp -> failure x
  
  transExp :: Lang.AbsLang.Exp -> Result
  transExp x = case x of
    Lang.AbsLang.EIfThenElse exp1 exp2 exp3 -> failure x
    Lang.AbsLang.EOr exp1 exp2 -> failure x
    Lang.AbsLang.EAnd exp1 exp2 -> failure x
    Lang.AbsLang.EXor exp1 exp2 -> failure x
    Lang.AbsLang.EEq exp1 exp2 -> failure x
    Lang.AbsLang.ENeq exp1 exp2 -> failure x
    Lang.AbsLang.ELt exp1 exp2 -> failure x
    Lang.AbsLang.EGt exp1 exp2 -> failure x
    Lang.AbsLang.ELte exp1 exp2 -> failure x
    Lang.AbsLang.EGte exp1 exp2 -> failure x
    Lang.AbsLang.EPlus exp1 exp2 -> failure x
    Lang.AbsLang.EMinus exp1 exp2 -> failure x
    Lang.AbsLang.ETimes exp1 exp2 -> failure x
    Lang.AbsLang.EDiv exp1 exp2 -> failure x
    Lang.AbsLang.EMod exp1 exp2 -> failure x
    Lang.AbsLang.EShiftL exp1 exp2 -> failure x
    Lang.AbsLang.EShiftR exp1 exp2 -> failure x
    Lang.AbsLang.EArithShiftR exp1 exp2 -> failure x
    Lang.AbsLang.ENot exp -> failure x
    Lang.AbsLang.ECall call -> failure x
    Lang.AbsLang.EApp exp1 exp2 -> failure x
    Lang.AbsLang.ETypeAnn exp type_ -> failure x
    Lang.AbsLang.EBlob string -> failure x
    Lang.AbsLang.EVar varname -> failure x
    Lang.AbsLang.EIntLit integer -> failure x
    Lang.AbsLang.EField exp fieldname -> failure x
    Lang.AbsLang.ETupleZero -> failure x
    Lang.AbsLang.ETupleTwoPlus exp exps -> failure x
    Lang.AbsLang.EProj exp integer -> failure x
    Lang.AbsLang.EIgnore -> failure x
    Lang.AbsLang.EStr string -> failure x
    Lang.AbsLang.EDict dict -> failure x
  