-- File generated by the BNF Converter. -- Templates for pattern matching on abstract syntax {-# OPTIONS_GHC -fno-warn-unused-matches #-} module SkelCalc where import Prelude (($), Either(..), String, (++), Show, show) import qualified AbsCalc type Err = Either String type Result = Err String failure :: Show a => a -> Result failure x = Left $ "Undefined case: " ++ show x transExp :: AbsCalc.Exp -> Result transExp x = case x of AbsCalc.EAdd exp1 exp2 -> failure x AbsCalc.EDiv exp1 exp2 -> failure x AbsCalc.EInt n -> failure x AbsCalc.EMul exp1 exp2 -> failure x AbsCalc.ESub exp1 exp2 -> failure x