From 02f78b1ff29982bea8c93fe6252593ba3942f38b Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 12 Dec 2016 22:33:22 -0400 Subject: - Renamed "==" function to "is". --- stdlib/source/lux.lux | 6 +++--- stdlib/source/lux/concurrency/stm.lux | 8 ++++---- stdlib/source/lux/data/struct/dict.lux | 4 ++-- stdlib/source/lux/type/check.lux | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'stdlib/source') diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index dd8e70ab6..168afa397 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -5352,14 +5352,14 @@ _ (fail "Wrong syntax for $"))) -(def: #export (== left right) +(def: #export (is left right) {#;doc (doc "Tests whether the 2 values are identical (not just \"equal\")." "This one should succeed:" (let [value 5] - (== 5 5)) + (is 5 5)) "This one should fail:" - (== 5 (i.+ 2 3)))} + (is 5 (i.+ 2 3)))} (All [a] (-> a a Bool)) (_lux_proc ["lux" "=="] [left right])) diff --git a/stdlib/source/lux/concurrency/stm.lux b/stdlib/source/lux/concurrency/stm.lux index 89bbab2af..c3e5fad3a 100644 --- a/stdlib/source/lux/concurrency/stm.lux +++ b/stdlib/source/lux/concurrency/stm.lux @@ -55,7 +55,7 @@ (All [a] (-> (Var a) Tx (Maybe a))) (|> tx (find (lambda [[_var _original _current]] - (== (:! (Var Unit) var) + (is (:! (Var Unit) var) (:! (Var Unit) _var)))) (:: Monad map (lambda [[_var _original _current]] _current)) @@ -87,7 +87,7 @@ #;Nil (#;Cons [_var _original _current] tx') - (if (== (:! (Var ($ +0)) var) + (if (is (:! (Var ($ +0)) var) (:! (Var ($ +0)) _var)) (#;Cons [(:! (Var ($ +0)) _var) (:! ($ +0) _original) @@ -201,12 +201,12 @@ (def: (can-commit? tx) (-> Tx Bool) (every? (lambda [[_var _original _current]] - (== _original (raw-read _var))) + (is _original (raw-read _var))) tx)) (def: (commit-var [_var _original _current]) (-> (Ex [a] (Tx-Frame a)) Unit) - (if (== _original _current) + (if (is _original _current) [] (io;run (write! _current _var)))) diff --git a/stdlib/source/lux/data/struct/dict.lux b/stdlib/source/lux/data/struct/dict.lux index d4cbaa7ec..38cfe7efa 100644 --- a/stdlib/source/lux/data/struct/dict.lux +++ b/stdlib/source/lux/data/struct/dict.lux @@ -397,7 +397,7 @@ (#;Some sub-node) (let [sub-node' (remove' (level-up level) hash key Hash sub-node)] ## Then check if a removal was actually done. - (if (== sub-node sub-node') + (if (is sub-node sub-node') ## If not, then there's nothing to change here either. node ## But if the sub-removal yielded an empty sub-node... @@ -426,7 +426,7 @@ (#;Some (#;Left sub-node)) (let [sub-node' (remove' (level-up level) hash key Hash sub-node)] ## Verify that it was removed. - (if (== sub-node sub-node') + (if (is sub-node sub-node') ## If not, there's also nothing to change here. node ## But if it came out empty... diff --git a/stdlib/source/lux/type/check.lux b/stdlib/source/lux/type/check.lux index 88f165cb3..951586bb0 100644 --- a/stdlib/source/lux/type/check.lux +++ b/stdlib/source/lux/type/check.lux @@ -359,7 +359,7 @@ (def: #export (check expected actual) (-> Type Type (Check [])) - (if (== expected actual) + (if (is expected actual) success (case [expected actual] [(#;VarT e-id) (#;VarT a-id)] -- cgit v1.2.3