aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source
diff options
context:
space:
mode:
authorEduardo Julian2016-12-12 22:33:22 -0400
committerEduardo Julian2016-12-12 22:33:22 -0400
commit02f78b1ff29982bea8c93fe6252593ba3942f38b (patch)
treebbd7902fb8251848f9ce6ac6dd9f98bbcb5f71b8 /stdlib/source
parent6095c8149a4f0c47333d50186f0758d286d30dec (diff)
- Renamed "==" function to "is".
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux.lux6
-rw-r--r--stdlib/source/lux/concurrency/stm.lux8
-rw-r--r--stdlib/source/lux/data/struct/dict.lux4
-rw-r--r--stdlib/source/lux/type/check.lux2
4 files changed, 10 insertions, 10 deletions
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<Maybe> 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<K> 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<K> 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)]