aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/macro/poly/eq.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-10-16 18:13:12 -0400
committerEduardo Julian2017-10-16 18:13:12 -0400
commit9d0eaa97963d4e37a6afbe30f62c5bb9991ef49e (patch)
tree293a89b9f8f4ce78caf5ac9d1d57ae45a1ddcc5d /stdlib/source/lux/macro/poly/eq.lux
parentc3470e9d3eff01a5bbd180e449ac04f659c061f7 (diff)
- Moved Array type to lux.lux.
- Re-named some array functions. - Minor refactorings.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/macro/poly/eq.lux24
1 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/lux/macro/poly/eq.lux b/stdlib/source/lux/macro/poly/eq.lux
index d8da515f4..b0b9fbce7 100644
--- a/stdlib/source/lux/macro/poly/eq.lux
+++ b/stdlib/source/lux/macro/poly/eq.lux
@@ -5,7 +5,7 @@
["p" parser])
(data [text "text/" Monoid<Text>]
text/format
- (coll [list "L/" Monad<List>]
+ (coll [list "list/" Monad<List>]
[vector]
[array]
[queue]
@@ -66,7 +66,7 @@
[;Maybe maybe;Eq<Maybe>]
[;List list;Eq<List>]
[vector;Vector vector;Eq<Vector>]
- [array;Array array;Eq<Array>]
+ [;Array array;Eq<Array>]
[queue;Queue queue;Eq<Queue>]
[set;Set set;Eq<Set>]
[seq;Seq seq;Eq<Seq>]
@@ -106,24 +106,24 @@
(wrap (` (: (~ (@Eq inputT))
(function [(~ g!left) (~ g!right)]
(case [(~ g!left) (~ g!right)]
- (~@ (L/join (L/map (function [[tag g!eq]]
- (list (` [((~ (code;nat tag)) (~ g!left))
- ((~ (code;nat tag)) (~ g!right))])
- (` ((~ g!eq) (~ g!left) (~ g!right)))))
- (list;enumerate members))))
+ (~@ (list/join (list/map (function [[tag g!eq]]
+ (list (` [((~ (code;nat tag)) (~ g!left))
+ ((~ (code;nat tag)) (~ g!right))])
+ (` ((~ g!eq) (~ g!left) (~ g!right)))))
+ (list;enumerate members))))
(~ g!_)
false))))))
## Tuples
(do @
[g!eqs (poly;tuple (p;many Eq<?>))
#let [indices (|> (list;size g!eqs) n.dec (list;n.range +0))
- g!lefts (L/map (|>. nat/encode (text/compose "left") code;local-symbol) indices)
- g!rights (L/map (|>. nat/encode (text/compose "right") code;local-symbol) indices)]]
+ g!lefts (list/map (|>. nat/encode (text/compose "left") code;local-symbol) indices)
+ g!rights (list/map (|>. nat/encode (text/compose "right") code;local-symbol) indices)]]
(wrap (` (: (~ (@Eq inputT))
(function [[(~@ g!lefts)] [(~@ g!rights)]]
(and (~@ (|> (list;zip3 g!eqs g!lefts g!rights)
- (L/map (function [[g!eq g!left g!right]]
- (` ((~ g!eq) (~ g!left) (~ g!right)))))))))))))
+ (list/map (function [[g!eq g!left g!right]]
+ (` ((~ g!eq) (~ g!left) (~ g!right)))))))))))))
## Type recursion
(do @
[[g!self bodyC] (poly;recursive Eq<?>)]
@@ -141,7 +141,7 @@
(do @
[[funcC varsC bodyC] (poly;polymorphic Eq<?>)]
(wrap (` (: (All [(~@ varsC)]
- (-> (~@ (L/map (|>. (~) eq;Eq (`)) varsC))
+ (-> (~@ (list/map (|>. (~) eq;Eq (`)) varsC))
(eq;Eq ((~ (poly;to-ast *env* inputT)) (~@ varsC)))))
(function (~ funcC) [(~@ varsC)]
(~ bodyC))))))