From 07111ae79abd847aab7ff427a6260e4c84e535fe Mon Sep 17 00:00:00 2001 From: Eugene Akentyev Date: Thu, 19 Jan 2017 21:22:42 +0300 Subject: [PATCH] Edit expr --- src/Expr.agda | 14 +++++++++----- src/Variable.agda | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) 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 -- 2.50.1