From: Eugene Akentyev Date: Thu, 19 Jan 2017 18:22:42 +0000 (+0300) Subject: Edit expr X-Git-Url: https://git.xn--bdkaa.com/?a=commitdiff_plain;h=07111ae79abd847aab7ff427a6260e4c84e535fe;p=jolie.agda.git Edit expr --- diff --git a/src/Expr.agda b/src/Expr.agda index 1cdf67c..5f55c6e 100644 --- a/src/Expr.agda +++ b/src/Expr.agda @@ -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 diff --git a/src/Variable.agda b/src/Variable.agda index f3b08cc..39628a8 100644 --- a/src/Variable.agda +++ b/src/Variable.agda @@ -14,6 +14,6 @@ data Value : Set where string : String → Value int : ℤ → Value bool : Bool → Value - double : ℤ × ℤ → Value + double : ℤ → ℤ → Value long : ℤ → Value void : Value