diff options
author | Eduardo Julian | 2017-08-02 23:21:54 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-08-02 23:21:54 -0400 |
commit | ae8306fe81376eefb7416a1d5c6b8d2ed3cd8f6c (patch) | |
tree | a6a8702e7182d890de6084da1ea40cefd44ec017 /stdlib/test | |
parent | 42b367849a584132fa301992c2f91ae71f5606a1 (diff) |
- Re-implemented polytypic matchers in terms of lux/control/parser.
Diffstat (limited to '')
-rw-r--r-- | stdlib/test/test/lux/macro/poly/eq.lux | 4 | ||||
-rw-r--r-- | stdlib/test/test/lux/macro/poly/functor.lux | 25 |
2 files changed, 12 insertions, 17 deletions
diff --git a/stdlib/test/test/lux/macro/poly/eq.lux b/stdlib/test/test/lux/macro/poly/eq.lux index 44ecbff1e..367ac1674 100644 --- a/stdlib/test/test/lux/macro/poly/eq.lux +++ b/stdlib/test/test/lux/macro/poly/eq.lux @@ -6,7 +6,9 @@ (data text/format [bool] [number "i/" Number<Int>] - [text]) + [text] + [maybe] + (coll [list])) ["r" math/random] [macro] (macro [poly #+ derived:] diff --git a/stdlib/test/test/lux/macro/poly/functor.lux b/stdlib/test/test/lux/macro/poly/functor.lux index 11cdcf824..45e54bae7 100644 --- a/stdlib/test/test/lux/macro/poly/functor.lux +++ b/stdlib/test/test/lux/macro/poly/functor.lux @@ -3,11 +3,13 @@ (lux [io] (control [monad #+ do Monad] [functor] - [eq #+ Eq]) + [eq #+ Eq] + [state]) (data text/format [bool] [number "i/" Number<Int>] - [text]) + [text] + [identity]) ["r" math/random] [macro] (macro [poly #+ derived:] @@ -15,23 +17,14 @@ lux/test) ## [Utils] -(type: (My-Maybe a) - #My-None - (#My-Some a)) +(derived: (&;Functor<?> ;Maybe)) -(type: (My-List a) - #My-Nil - (#My-Cons [a (My-List a)])) +(derived: (&;Functor<?> ;List)) -(type: (My-State s a) - (-> s [s a])) +(derived: (&;Functor<?> state;State)) -(derived: (&;Functor<?> My-Maybe)) - -(derived: (&;Functor<?> My-List)) - -(derived: (&;Functor<?> My-State)) +(derived: (&;Functor<?> identity;Identity)) ## [Tests] -(context: "Functor polytypism" +(context: "Functor polytypism." (test "" true)) |