]> git.xn--bdkaa.com Git - jolie.agda.git/commitdiff
Edit expr
authorEugene Akentyev <ak3ntev@gmail.com>
Thu, 19 Jan 2017 18:22:42 +0000 (21:22 +0300)
committerEugene Akentyev <ak3ntev@gmail.com>
Thu, 19 Jan 2017 18:22:42 +0000 (21:22 +0300)
src/Expr.agda
src/Variable.agda

index 1cdf67c1f2e573b522e65bdf4ec281c307e50ae6..5f55c6e6bddd78c41c183512c29d2420a5760a84 100644 (file)
@@ -3,13 +3,17 @@ module Expr where
 open import Variable
 
 
-data BinOp : Set where
-  -- Arithmetics
-  plus minus mult div power : BinOp
+data BinaryOp : Set where
+  -- Arithmetical
+  plus minus mult div power : BinaryOp
   -- Logical operations
-  and or : BinOp
+  equal and or : BinaryOp
+
+data UnaryOp : Set where
+  not : UnaryOp
 
 data Expr : Set where
   var : Variable → Expr
-  binary : BinOp → Expr → Expr → Expr
+  binary : BinaryOp → Expr → Expr → Expr
+  unary : UnaryOp → Expr → Expr
   constant : Value → Expr
index f3b08cc1d4bc45bd97cbd53f5d877f33f52ab133..39628a81a15b1c1a965f052a3ae88f62bc173e48 100644 (file)
@@ -14,6 +14,6 @@ data Value : Set where
   string : String → Value
   int : ℤ → Value
   bool : Bool → Value
-  double : ℤ × ℤ → Value
+  double : ℤ  ℤ → Value
   long : ℤ → Value
   void : Value