💕 Adding assignment 3

This commit is contained in:
2024-09-24 14:22:53 +02:00
parent db1f22e983
commit ff778af26f
8 changed files with 432 additions and 0 deletions

View File

@ -0,0 +1,27 @@
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
| Print String Exp
| KvPut Exp Exp
| KvGet Exp
deriving (Eq, Show)