From 914598e3e98497a6c2cfcb31b407d9c0374421e6 Mon Sep 17 00:00:00 2001 From: nisstyre56 Date: Sun, 1 Jun 2014 16:08:01 -0400 Subject: [PATCH] start moving operator definitions to prelude.jl --- prelude.jl | 14 ++++++++++++++ representation.js | 5 +++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/prelude.jl b/prelude.jl index f94ff6c..1826fe1 100644 --- a/prelude.jl +++ b/prelude.jl @@ -55,3 +55,17 @@ deftype (Either a b) ;; I/O functions (print :: (String -> (IO Void))) + +;; Operator definitions + +defop 3 Left (a + b) + (add a b) + +defop 3 Left (a - b) + (minus a b) + +defop 4 Left (a * b) + (mul a b) + +defop 4 Left (a / b) + (div a b) diff --git a/representation.js b/representation.js index 3d843d3..c669882 100644 --- a/representation.js +++ b/representation.js @@ -370,10 +370,11 @@ var gensym = makeGensym(); //console.log(isTypeExpr(new Name("T"))); -OPInfo = {"+" : [3, "Left"], +OPInfo = { + /*"+" : [3, "Left"], "-" : [3, "Left"], "*" : [4, "Left"], - "/" : [4, "Left"], + "/" : [4, "Left"],*/ "^" : [5, "Right"], "++" : [3, "Left"], "==" : [2, "Left"],