-- File generated by the BNF Converter. -- Templates for pattern matching on abstract syntax {-# LANGUAGE GADTs #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} module SkelFstStudio where import Prelude (($), Either(..), String, (++), Show, show) import qualified AbsFstStudio type Err = Either String type Result = Err String failure :: Show a => a -> Result failure x = Left $ "Undefined case: " ++ show x transTree :: AbsFstStudio.Tree c -> Result transTree t = case t of AbsFstStudio.Prog defs -> failure t AbsFstStudio.Declaration x idents exp -> failure t AbsFstStudio.Import idents -> failure t AbsFstStudio.Main exp -> failure t AbsFstStudio.Any -> failure t AbsFstStudio.AppDecl x exps -> failure t AbsFstStudio.Boundary -> failure t AbsFstStudio.CReplacement exp1 exp2 exp3 exp4 -> failure t AbsFstStudio.CSReplacement exp1 exp2 exp3 exp4 -> failure t AbsFstStudio.Complement exp -> failure t AbsFstStudio.Composition exp1 exp2 -> failure t AbsFstStudio.Concat exp1 exp2 -> failure t AbsFstStudio.Concats str -> failure t AbsFstStudio.Containment exp -> failure t AbsFstStudio.CrossProduct exp1 exp2 -> failure t AbsFstStudio.Epsilon -> failure t AbsFstStudio.Intersect exp1 exp2 -> failure t AbsFstStudio.LongReplace exp1 exp2 -> failure t AbsFstStudio.Markup exp1 exp2 -> failure t AbsFstStudio.Minus exp1 exp2 -> failure t AbsFstStudio.NConcat exp n -> failure t AbsFstStudio.Plus exp -> failure t AbsFstStudio.Relation str1 str2 -> failure t AbsFstStudio.Replacement exp1 exp2 -> failure t AbsFstStudio.Restriction exp1 exp2 exp3 -> failure t AbsFstStudio.Star exp -> failure t AbsFstStudio.Symbol str -> failure t AbsFstStudio.TComplement exp -> failure t AbsFstStudio.Union exp1 exp2 -> failure t AbsFstStudio.Variable x -> failure t transIdent :: AbsFstStudio.Ident -> Result transIdent x = case x of AbsFstStudio.Ident string -> failure x transProgram :: AbsFstStudio.Program -> Result transProgram x = case x of AbsFstStudio.Prog defs -> failure x transDef :: AbsFstStudio.Def -> Result transDef x = case x of AbsFstStudio.Declaration x idents exp -> failure x AbsFstStudio.Import idents -> failure x AbsFstStudio.Main exp -> failure x transExp :: AbsFstStudio.Exp -> Result transExp x = case x of AbsFstStudio.Any -> failure x AbsFstStudio.AppDecl x exps -> failure x AbsFstStudio.Boundary -> failure x AbsFstStudio.CReplacement exp1 exp2 exp3 exp4 -> failure x AbsFstStudio.CSReplacement exp1 exp2 exp3 exp4 -> failure x AbsFstStudio.Complement exp -> failure x AbsFstStudio.Composition exp1 exp2 -> failure x AbsFstStudio.Concat exp1 exp2 -> failure x AbsFstStudio.Concats str -> failure x AbsFstStudio.Containment exp -> failure x AbsFstStudio.CrossProduct exp1 exp2 -> failure x AbsFstStudio.Epsilon -> failure x AbsFstStudio.Intersect exp1 exp2 -> failure x AbsFstStudio.LongReplace exp1 exp2 -> failure x AbsFstStudio.Markup exp1 exp2 -> failure x AbsFstStudio.Minus exp1 exp2 -> failure x AbsFstStudio.NConcat exp n -> failure x AbsFstStudio.Plus exp -> failure x AbsFstStudio.Relation str1 str2 -> failure x AbsFstStudio.Replacement exp1 exp2 -> failure x AbsFstStudio.Restriction exp1 exp2 exp3 -> failure x AbsFstStudio.Star exp -> failure x AbsFstStudio.Symbol str -> failure x AbsFstStudio.TComplement exp -> failure x AbsFstStudio.Union exp1 exp2 -> failure x AbsFstStudio.Variable x -> failure x