Moved code out of handout directory

This commit is contained in:
2024-09-05 15:29:54 +02:00
parent f9f949ea19
commit 1627f4c6aa
9 changed files with 0 additions and 0 deletions

26
a1/src/APL/AST.hs Normal file
View File

@ -0,0 +1,26 @@
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
-- TODO: add cases
deriving (Eq, Show)
printExp :: Exp -> String
printExp = undefined -- TODO