diff options
Diffstat (limited to 'stdlib/source')
-rw-r--r-- | stdlib/source/lux.lux | 6 | ||||
-rw-r--r-- | stdlib/source/lux/concurrency/stm.lux | 12 | ||||
-rw-r--r-- | stdlib/source/lux/data/coll/bits.lux | 6 | ||||
-rw-r--r-- | stdlib/source/lux/data/coll/dict.lux | 4 | ||||
-rw-r--r-- | stdlib/source/lux/data/coll/ordered/dict.lux | 2 | ||||
-rw-r--r-- | stdlib/source/lux/data/coll/tree/parser.lux | 2 | ||||
-rw-r--r-- | stdlib/source/lux/data/error.lux | 8 | ||||
-rw-r--r-- | stdlib/source/lux/lang/type/check.lux | 2 | ||||
-rw-r--r-- | stdlib/source/lux/test.lux | 8 |
9 files changed, 25 insertions, 25 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 7fa2ea692..ec9ac013e 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -5688,14 +5688,14 @@ _ (fail "Wrong syntax for $"))) -(def: #export (is reference sample) +(def: #export (is? reference sample) {#.doc (doc "Tests whether the 2 values are identical (not just \"equal\")." "This one should succeed:" (let [value 5] - (is value value)) + (is? value value)) "This one should fail:" - (is 5 (i/+ 2 3)))} + (is? 5 (i/+ 2 3)))} (All [a] (-> a a Bool)) ("lux is" reference sample)) diff --git a/stdlib/source/lux/concurrency/stm.lux b/stdlib/source/lux/concurrency/stm.lux index 69a36461a..a62a35677 100644 --- a/stdlib/source/lux/concurrency/stm.lux +++ b/stdlib/source/lux/concurrency/stm.lux @@ -76,8 +76,8 @@ (All [a] (-> (Var a) Tx (Maybe a))) (|> tx (list.find (function [[_var _original _current]] - (is (:! (Var Unit) var) - (:! (Var Unit) _var)))) + (is? (:! (Var Unit) var) + (:! (Var Unit) _var)))) (:: maybe.Monad<Maybe> map (function [[_var _original _current]] _current)) (:!!) @@ -102,8 +102,8 @@ #.Nil (#.Cons [_var _original _current] tx') - (if (is (:! (Var Unit) var) - (:! (Var Unit) _var)) + (if (is? (:! (Var Unit) var) + (:! (Var Unit) _var)) (#.Cons {#var (:! (Var Unit) _var) #original (:! Unit _original) #current (:! Unit value)} @@ -165,12 +165,12 @@ (def: (can-commit? tx) (-> Tx Bool) (list.every? (function [[_var _original _current]] - (is _original (read!! _var))) + (is? _original (read!! _var))) tx)) (def: (commit-var! [_var _original _current]) (-> (Ex [a] (Tx-Frame a)) Unit) - (if (is _original _current) + (if (is? _original _current) [] (io.run (write! _current _var)))) diff --git a/stdlib/source/lux/data/coll/bits.lux b/stdlib/source/lux/data/coll/bits.lux index 64d404c1a..9a081c254 100644 --- a/stdlib/source/lux/data/coll/bits.lux +++ b/stdlib/source/lux/data/coll/bits.lux @@ -70,7 +70,7 @@ no-op) chunk - (|> (if (is ..empty output) + (|> (if (is? ..empty output) (: Bits (array.new size|output)) output) (array.write idx|output chunk) @@ -111,7 +111,7 @@ chunk (if (n/> +0 size|output) - (|> (if (is ..empty output) + (|> (if (is? ..empty output) (: Bits (array.new size|output)) output) (array.write idx chunk) @@ -136,7 +136,7 @@ (recur (n/dec size|output) output) chunk - (|> (if (is ..empty output) + (|> (if (is? ..empty output) (: Bits (array.new size|output)) output) (array.write idx chunk) diff --git a/stdlib/source/lux/data/coll/dict.lux b/stdlib/source/lux/data/coll/dict.lux index 1091100b6..4c25216c4 100644 --- a/stdlib/source/lux/data/coll/dict.lux +++ b/stdlib/source/lux/data/coll/dict.lux @@ -389,7 +389,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 (is 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... @@ -418,7 +418,7 @@ (#.Some (#.Left sub-node)) (let [sub-node' (remove' (level-up level) hash key Hash<k> sub-node)] ## Verify that it was removed. - (if (is 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/data/coll/ordered/dict.lux b/stdlib/source/lux/data/coll/ordered/dict.lux index 3b19c232a..81e6a3be4 100644 --- a/stdlib/source/lux/data/coll/ordered/dict.lux +++ b/stdlib/source/lux/data/coll/ordered/dict.lux @@ -255,7 +255,7 @@ [(<comp> reference key) (let [side-root (get@ <tag> root) outcome (recur side-root)] - (if (is side-root outcome) + (if (is? side-root outcome) ?root (#.Some (<add> (maybe.assume outcome) root))))] diff --git a/stdlib/source/lux/data/coll/tree/parser.lux b/stdlib/source/lux/data/coll/tree/parser.lux index 726a04146..c9bf542f3 100644 --- a/stdlib/source/lux/data/coll/tree/parser.lux +++ b/stdlib/source/lux/data/coll/tree/parser.lux @@ -34,7 +34,7 @@ (All [t] (Parser t [])) (function [zipper] (let [next (<direction> zipper)] - (if (is zipper next) + (if (is? zipper next) (ex.throw Cannot-Move-Further []) (#E.Success [next []])))))] diff --git a/stdlib/source/lux/data/error.lux b/stdlib/source/lux/data/error.lux index 773724321..b619dc1ad 100644 --- a/stdlib/source/lux/data/error.lux +++ b/stdlib/source/lux/data/error.lux @@ -81,10 +81,10 @@ (macro: #export (default tokens compiler) {#.doc (doc "Allows you to provide a default value that will be used" "if a (Error x) value turns out to be #Error." - (is 10 - (default 20 (#Success 10))) - (is 20 - (default 20 (#Error "KABOOM!"))))} + (is? 10 + (default 20 (#Success 10))) + (is? 20 + (default 20 (#Error "KABOOM!"))))} (case tokens (^ (list else error)) (#Success [compiler (list (` (case (~ error) diff --git a/stdlib/source/lux/lang/type/check.lux b/stdlib/source/lux/lang/type/check.lux index 59f27ad43..ccb7780e2 100644 --- a/stdlib/source/lux/lang/type/check.lux +++ b/stdlib/source/lux/lang/type/check.lux @@ -516,7 +516,7 @@ (def: #export (check' expected actual assumptions) {#.doc "Type-check to ensure that the 'expected' type subsumes the 'actual' type."} (-> Type Type (List Assumption) (Check (List Assumption))) - (if (is expected actual) + (if (is? expected actual) (check/wrap assumptions) (with-error-stack (function [_] (ex.construct Type-Check-Failed [expected actual])) diff --git a/stdlib/source/lux/test.lux b/stdlib/source/lux/test.lux index e000f6130..d18c74df8 100644 --- a/stdlib/source/lux/test.lux +++ b/stdlib/source/lux/test.lux @@ -147,11 +147,11 @@ false))) (test "Can have defaults for Maybe values." - (and (is "yolo" (maybe.default "yolo" - #.None)) + (and (is? "yolo" (maybe.default "yolo" + #.None)) - (is "lol" (maybe.default "yolo" - (#.Some "lol"))))) + (is? "lol" (maybe.default "yolo" + (#.Some "lol"))))) )) "Also works with random generation of values for property-based testing." |