--- /dev/null
+% Given two items with different names and equal values...
+a += 0.
+b += 0.
+
+% ==
+by_evl_refl := a == a. % True
+by_evl_cross := a == b. % True
+
+% =
+by_syn_refl := a = a. % &a is the same as &a
+by_syn_cross := a = b. % ... but not the same as &b.
+
+% is
+by_is_0a := 0 is a. % That's right, a evaluates to 0.
+by_is_ab := a is b. % b does not evaluate to &a, so this is
+ % a unification failure and the head
+ % remains null (not false).
go ("<=",2) = Just $ PDBS $ infixOp "<="
go ("<",2) = Just $ PDBS $ infixOp "<"
- go ("=",2) = Just $ PDBS $ infixOp "="
- -- XXX "==" means something else in Dyna
+ go ("=",2) = Just $ PDBS $ infixOp "=="
go ("==",2) = Just $ PDBS $ infixOp "=="
go (">=",2) = Just $ PDBS $ infixOp ">="
go (">",2) = Just $ PDBS $ infixOp ">"
-- will be broken. ;)
test_End_To_End :: [Test]
test_End_To_End = map mkExample
- [ "simple", "fib-limit", "dijkstra", "papa2", "matrixops" ]
+ [ "simple", "equalities", "fib-limit", "dijkstra", "papa2", "matrixops" ]
test_REPL :: [Test]
test_REPL = map (\n -> testProgramRuns n ("./test/repl/"++n) [])
, ("<=" ,[(4,PFIn AssocNone ) ])
, ("<" ,[(4,PFIn AssocNone ) ])
, ("=" ,[(4,PFIn AssocNone ) ])
+ , ("==" ,[(4,PFIn AssocNone ) ])
, (">=" ,[(4,PFIn AssocNone ) ])
, (">" ,[(4,PFIn AssocNone ) ])
, ("!=" ,[(4,PFIn AssocNone ) ])
-- There are, however, even in this case a few terms we would prefer to
-- behave structurally by default.
dt = M.fromList [
- (("pair" ,2),(SDQuote,[ADEval,ADEval]))
+ (("=" ,2),(SDEval ,[ADQuote,ADQuote]))
+ , (("pair" ,2),(SDQuote,[ADEval ,ADEval ]))
, (("true" ,0),(SDQuote,[]))
, (("false",0),(SDQuote,[]))
]