Files
2024B1-AP/a1/src/APL/AST.hs
2024-09-06 14:14:44 +02:00

29 lines
420 B
Haskell

module APL.AST
( VName,
Exp (..),
printExp,
)
where
type VName = String
data Exp
= CstInt Integer
| CstBool Bool
| Add Exp Exp
| Sub Exp Exp
| Mul Exp Exp
| Div Exp Exp
| Pow Exp Exp
| Eql Exp Exp
| If Exp Exp Exp
| Var VName
| Let VName Exp Exp
| Lambda VName Exp
| Apply Exp Exp
| TryCatch Exp Exp
deriving (Eq, Show)
printExp :: Exp -> String
printExp = undefined -- TODO