repos / jolie.agda.git


commit
07111ae
parent
326ef04
author
Eugene Akentyev
date
2017-01-19 22:22:42 +0400 +04
Edit expr
2 files changed,  +10, -6
M src/Expr.agda
+9, -5
 1@@ -3,13 +3,17 @@ module Expr where
 2 open import Variable
 3 
 4 
 5-data BinOp : Set where
 6-  -- Arithmetics
 7-  plus minus mult div power : BinOp
 8+data BinaryOp : Set where
 9+  -- Arithmetical
10+  plus minus mult div power : BinaryOp
11   -- Logical operations
12-  and or : BinOp
13+  equal and or : BinaryOp
14+
15+data UnaryOp : Set where
16+  not : UnaryOp
17 
18 data Expr : Set where
19   var : Variable → Expr
20-  binary : BinOp → Expr → Expr → Expr
21+  binary : BinaryOp → Expr → Expr → Expr
22+  unary : UnaryOp → Expr → Expr
23   constant : Value → Expr
M src/Variable.agda
+1, -1
1@@ -14,6 +14,6 @@ data Value : Set where
2   string : String → Value
3   int : ℤ → Value
4   bool : Bool → Value
5-  double : ℤ × ℤ → Value
6+  double : ℤ → ℤ → Value
7   long : ℤ → Value
8   void : Value