Browse Source

start moving operator definitions to prelude.jl

pull/20/head
nisstyre56 10 years ago
parent
commit
914598e3e9
  1. 14
      prelude.jl
  2. 5
      representation.js

14
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)

5
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"],

Loading…
Cancel
Save