diff options
author | Eduardo Julian | 2022-04-05 07:16:43 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-04-05 07:16:43 -0400 |
commit | a2d994a3f7a39964452df7523f69e16b10b266f9 (patch) | |
tree | aa533a9dd218a9c14332d4c4697c25bc35f07a4d /stdlib/source/test | |
parent | 14f18c100c2f8c3ec9c60c14330d926cd2d6f639 (diff) |
Properly handling variance for remaining mutable types.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/control/concurrency/frp.lux | 10 | ||||
-rw-r--r-- | stdlib/source/test/lux/control/thread.lux | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/stdlib/source/test/lux/control/concurrency/frp.lux b/stdlib/source/test/lux/control/concurrency/frp.lux index 3c804559e..90d5f17fe 100644 --- a/stdlib/source/test/lux/control/concurrency/frp.lux +++ b/stdlib/source/test/lux/control/concurrency/frp.lux @@ -19,7 +19,9 @@ [math ["[0]" random] [number - ["n" nat]]]]] + ["n" nat]]] + [type + ["[0]" variance]]]] [\\library ["[0]" / [// @@ -41,7 +43,7 @@ (in (case [?left ?right] [{.#Some {.#Some [left _]}} {.#Some {.#Some [right _]}}] - (== left right) + (== (variance.read left) (variance.read right)) _ false)))))) @@ -59,7 +61,7 @@ (in {.#End}) {.#Some [head tail]} - (# ! each (|>> {.#Item head}) + (# ! each (|>> {.#Item (variance.read head)}) (take_amount (-- amount_of_polls) [channel sink])))))) (def: .public test @@ -97,7 +99,7 @@ [?actual (async.value channel)] (in (case ?actual {.#Some {.#Some [actual _]}} - (n.= sample actual) + (n.= sample (variance.read actual)) _ false)))) diff --git a/stdlib/source/test/lux/control/thread.lux b/stdlib/source/test/lux/control/thread.lux index 5da8a5e95..cfff55018 100644 --- a/stdlib/source/test/lux/control/thread.lux +++ b/stdlib/source/test/lux/control/thread.lux @@ -77,6 +77,6 @@ (/.result (is (All (_ !) (Thread ! Nat)) (do /.monad [box (/.box sample) - old (/.update! (n.* factor) box)] - (/.read! box)))))))) + [old new] (/.update! (n.* factor) box)] + (in new)))))))) )))) |