diff options
author | Paweł Dybiec <pawel.to.malpa@gmail.com> | 2020-01-20 02:29:06 +0100 |
---|---|---|
committer | Paweł Dybiec <pawel.to.malpa@gmail.com> | 2020-01-20 02:29:06 +0100 |
commit | 372d2f6ba7c0758f9bfb223acedce6b3a2fa6ea7 (patch) | |
tree | 694ad15e2cd396774838bbfde7abb4d85f0e28ca /src/Syntax.hs | |
parent | Add Except monad, and destructors for records and variants (diff) |
Fix variants typing, add wellformedness for commands
Diffstat (limited to 'src/Syntax.hs')
-rw-r--r-- | src/Syntax.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Syntax.hs b/src/Syntax.hs index bbd8cbe..f5d9c2d 100644 --- a/src/Syntax.hs +++ b/src/Syntax.hs @@ -17,7 +17,7 @@ data Expr = Var Idnt | Mult Expr Expr | Neg Expr | Deref Expr - | Match Expr [(Idnt, Expr)] + | Match Expr [(Idnt, Idnt, Expr)] -- Variant,Binder, Expression | Proj Idnt Expr deriving(Eq,Show) data Com = Skip @@ -26,9 +26,9 @@ data Com = Skip | While Expr Com | Asgn Idnt Expr | Decl Idnt Expr Com - | Alloc Idnt Expr + | Alloc Idnt Expr Com | Save Idnt Expr - | SMatch Expr [(Idnt, Expr)] + | SMatch Expr [(Idnt, Idnt, Com)] deriving(Eq,Show) data FuncDecl = Func Idnt [Idnt] [(Idnt,Expr)] Com Expr |