diff options
Diffstat (limited to 'stdlib/source/lux/data/lazy.lux')
-rw-r--r-- | stdlib/source/lux/data/lazy.lux | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/stdlib/source/lux/data/lazy.lux b/stdlib/source/lux/data/lazy.lux index c8f5746b1..dc889675a 100644 --- a/stdlib/source/lux/data/lazy.lux +++ b/stdlib/source/lux/data/lazy.lux @@ -4,9 +4,10 @@ [control [functor (#+ Functor)] [apply (#+ Apply)] - [monad (#+ Monad do)]] - [concurrency - ["." atom]] + [monad (#+ Monad do)] + [equivalence (#+ Equivalence)] + [concurrency + ["." atom]]] [macro (#+ with-gensyms) ["s" syntax (#+ syntax:)]] [type @@ -36,6 +37,11 @@ (with-gensyms [g!_] (wrap (list (` ((~! freeze') (function ((~ g!_) (~ g!_)) (~ expr)))))))) +(structure: #export (equivalence (^open "_@.")) + (All [a] (-> (Equivalence a) (Equivalence (Lazy a)))) + (def: (= left right) + (_@= (..thaw left) (..thaw right)))) + (structure: #export functor (Functor Lazy) (def: (map f fa) (freeze (f (thaw fa))))) |