💕 Adding assignment 2

This commit is contained in:
2024-09-12 13:54:13 +02:00
parent 3722040d09
commit b061522fd1
9 changed files with 321 additions and 0 deletions

View File

@ -0,0 +1,24 @@
module APL.AST
( VName,
Exp (..),
)
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)