aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Julian2018-07-11 20:20:24 -0400
committerEduardo Julian2018-07-11 20:20:24 -0400
commitf861af6c6bd57677ba4af2ee3275c69b11f68beb (patch)
tree2262674a11d1507fe2f8eeb3bbc4a42b178a3e0f
parent86238e5f3753cd6e751f1fa73367530a54c49577 (diff)
- Re-named "lux/macro/poly.this" to "exactly" and "lux/macro/poly.like" to "similar".
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/language/compiler/default/repl/type.lux10
-rw-r--r--stdlib/source/lux/macro/poly.lux4
-rw-r--r--stdlib/source/lux/macro/poly/equivalence.lux22
-rw-r--r--stdlib/source/lux/macro/poly/json.lux48
-rw-r--r--stdlib/source/lux/type/quotient.lux2
-rw-r--r--stdlib/source/lux/type/refinement.lux2
6 files changed, 44 insertions, 44 deletions
diff --git a/stdlib/source/lux/language/compiler/default/repl/type.lux b/stdlib/source/lux/language/compiler/default/repl/type.lux
index a9342ab6a..84f063e0c 100644
--- a/stdlib/source/lux/language/compiler/default/repl/type.lux
+++ b/stdlib/source/lux/language/compiler/default/repl/type.lux
@@ -32,12 +32,12 @@
(Poly Representation)
(`` ($_ p.either
(do p.Monad<Parser>
- [_ (poly.this Any)]
+ [_ (poly.exactly Any)]
(wrap (function.constant "[]")))
(~~ (do-template [<type> <formatter>]
[(do p.Monad<Parser>
- [_ (poly.like <type>)]
+ [_ (poly.similar <type>)]
(wrap (|>> (:coerce <type>) <formatter>)))]
[Bool %b]
@@ -52,7 +52,7 @@
(`` ($_ p.either
(~~ (do-template [<type> <formatter>]
[(do p.Monad<Parser>
- [_ (poly.like <type>)]
+ [_ (poly.similar <type>)]
(wrap (|>> (:coerce <type>) <formatter>)))]
[Type %type]
@@ -64,12 +64,12 @@
[XML %xml]))
(do p.Monad<Parser>
- [[_ elemT] (poly.apply (p.seq (poly.this List) poly.any))
+ [[_ elemT] (poly.apply (p.seq (poly.exactly List) poly.any))
elemR (poly.local (list elemT) representation)]
(wrap (|>> (:coerce (List Any)) (%list elemR))))
(do p.Monad<Parser>
- [[_ elemT] (poly.apply (p.seq (poly.this Maybe) poly.any))
+ [[_ elemT] (poly.apply (p.seq (poly.exactly Maybe) poly.any))
elemR (poly.local (list elemT) representation)]
(wrap (|>> (:coerce (Maybe Any))
(case> #.None
diff --git a/stdlib/source/lux/macro/poly.lux b/stdlib/source/lux/macro/poly.lux
index 8fec440cf..7a7375e12 100644
--- a/stdlib/source/lux/macro/poly.lux
+++ b/stdlib/source/lux/macro/poly.lux
@@ -212,8 +212,8 @@
"Expected: " (type.to-text expected) "\n"
" Actual: " (type.to-text actual))))))]
- [this type/=]
- [like check.checks?]
+ [exactly type/=]
+ [similar check.checks?]
)
(def: (adjusted-idx env idx)
diff --git a/stdlib/source/lux/macro/poly/equivalence.lux b/stdlib/source/lux/macro/poly/equivalence.lux
index d3e28b5e7..189179e13 100644
--- a/stdlib/source/lux/macro/poly/equivalence.lux
+++ b/stdlib/source/lux/macro/poly/equivalence.lux
@@ -49,17 +49,17 @@
(wrap (` (: (~ (@Equivalence inputT))
<eq>))))]
- [(poly.this Any) (function ((~ g!_) (~ g!_) (~ g!_)) true)]
- [(poly.like Bool) bool.Equivalence<Bool>]
- [(poly.like Nat) number.Equivalence<Nat>]
- [(poly.like Int) number.Equivalence<Int>]
- [(poly.like Rev) number.Equivalence<Rev>]
- [(poly.like Frac) number.Equivalence<Frac>]
- [(poly.like Text) text.Equivalence<Text>]))
+ [(poly.exactly Any) (function ((~ g!_) (~ g!_) (~ g!_)) true)]
+ [(poly.similar Bool) bool.Equivalence<Bool>]
+ [(poly.similar Nat) number.Equivalence<Nat>]
+ [(poly.similar Int) number.Equivalence<Int>]
+ [(poly.similar Rev) number.Equivalence<Rev>]
+ [(poly.similar Frac) number.Equivalence<Frac>]
+ [(poly.similar Text) text.Equivalence<Text>]))
## Composite types
(~~ (do-template [<name> <eq>]
[(do @
- [[_ argC] (poly.apply (p.seq (poly.this <name>)
+ [[_ argC] (poly.apply (p.seq (poly.exactly <name>)
Equivalence<?>))]
(wrap (` (: (~ (@Equivalence inputT))
(<eq> (~ argC))))))]
@@ -74,7 +74,7 @@
))
(do @
[[_ _ valC] (poly.apply ($_ p.seq
- (poly.this dict.Dictionary)
+ (poly.exactly dict.Dictionary)
poly.any
Equivalence<?>))]
(wrap (` (: (~ (@Equivalence inputT))
@@ -82,7 +82,7 @@
## Models
(~~ (do-template [<type> <eq>]
[(do @
- [_ (poly.this <type>)]
+ [_ (poly.exactly <type>)]
(wrap (` (: (~ (@Equivalence inputT))
<eq>))))]
@@ -92,7 +92,7 @@
[da.Day da.Equivalence<Day>]
[da.Month da.Equivalence<Month>]))
(do @
- [_ (poly.apply (p.seq (poly.this unit.Qty)
+ [_ (poly.apply (p.seq (poly.exactly unit.Qty)
poly.any))]
(wrap (` (: (~ (@Equivalence inputT))
unit.Equivalence<Qty>))))
diff --git a/stdlib/source/lux/macro/poly/json.lux b/stdlib/source/lux/macro/poly/json.lux
index e6da2b602..2745ad592 100644
--- a/stdlib/source/lux/macro/poly/json.lux
+++ b/stdlib/source/lux/macro/poly/json.lux
@@ -91,15 +91,15 @@
(wrap (` (: (~ (@JSON//encode inputT))
<encoder>))))]
- [(poly.this Any) (function ((~ g!_) (~ (code.symbol ["" "0"]))) #//.Null)]
- [(poly.like Bool) (|>> #//.Boolean)]
- [(poly.like Nat) (:: (~! ..Codec<JSON,Nat>) (~' encode))]
- [(poly.like Int) (:: (~! ..Codec<JSON,Int>) (~' encode))]
- [(poly.like Frac) (|>> #//.Number)]
- [(poly.like Text) (|>> #//.String)])
+ [(poly.exactly Any) (function ((~ g!_) (~ (code.symbol ["" "0"]))) #//.Null)]
+ [(poly.similar Bool) (|>> #//.Boolean)]
+ [(poly.similar Nat) (:: (~! ..Codec<JSON,Nat>) (~' encode))]
+ [(poly.similar Int) (:: (~! ..Codec<JSON,Int>) (~' encode))]
+ [(poly.similar Frac) (|>> #//.Number)]
+ [(poly.similar Text) (|>> #//.String)])
<time> (do-template [<type> <codec>]
[(do @
- [_ (poly.this <type>)]
+ [_ (poly.exactly <type>)]
(wrap (` (: (~ (@JSON//encode inputT))
(|>> (:: <codec> (~' encode)) #//.String)))))]
@@ -118,7 +118,7 @@
<basic>
<time>
(do @
- [unitT (poly.apply (p.after (poly.this unit.Qty)
+ [unitT (poly.apply (p.after (poly.exactly unit.Qty)
poly.any))]
(wrap (` (: (~ (@JSON//encode inputT))
(:: (~! Codec<JSON,Qty>) (~' encode))))))
@@ -127,8 +127,8 @@
g!key (code.local-symbol "_______key")
g!val (code.local-symbol "_______val")]
[_ _ =val=] (poly.apply ($_ p.seq
- (poly.this d.Dictionary)
- (poly.this .Text)
+ (poly.exactly d.Dictionary)
+ (poly.exactly .Text)
Codec<JSON,?>//encode))]
(wrap (` (: (~ (@JSON//encode inputT))
(|>> d.entries
@@ -138,13 +138,13 @@
#//.Object)))))
(do @
[[_ =sub=] (poly.apply ($_ p.seq
- (poly.this .Maybe)
+ (poly.exactly .Maybe)
Codec<JSON,?>//encode))]
(wrap (` (: (~ (@JSON//encode inputT))
((~! ..nullable) (~ =sub=))))))
(do @
[[_ =sub=] (poly.apply ($_ p.seq
- (poly.this .List)
+ (poly.exactly .List)
Codec<JSON,?>//encode))]
(wrap (` (: (~ (@JSON//encode inputT))
(|>> ((~! list/map) (~ =sub=)) row.from-list #//.Array)))))
@@ -207,15 +207,15 @@
(wrap (` (: (~ (@JSON//decode inputT))
<decoder>))))]
- [(poly.this Any) //.null]
- [(poly.like Bool) //.boolean]
- [(poly.like Nat) (p.codec (~! ..Codec<JSON,Nat>) //.any)]
- [(poly.like Int) (p.codec (~! ..Codec<JSON,Int>) //.any)]
- [(poly.like Frac) //.number]
- [(poly.like Text) //.string])
+ [(poly.exactly Any) //.null]
+ [(poly.similar Bool) //.boolean]
+ [(poly.similar Nat) (p.codec (~! ..Codec<JSON,Nat>) //.any)]
+ [(poly.similar Int) (p.codec (~! ..Codec<JSON,Int>) //.any)]
+ [(poly.similar Frac) //.number]
+ [(poly.similar Text) //.string])
<time> (do-template [<type> <codec>]
[(do @
- [_ (poly.this <type>)]
+ [_ (poly.exactly <type>)]
(wrap (` (: (~ (@JSON//decode inputT))
(p.codec <codec> //.string)))))]
@@ -234,24 +234,24 @@
<basic>
<time>
(do @
- [unitT (poly.apply (p.after (poly.this unit.Qty)
+ [unitT (poly.apply (p.after (poly.exactly unit.Qty)
poly.any))]
(wrap (` (: (~ (@JSON//decode inputT))
(p.codec (~! Codec<JSON,Qty>) //.any)))))
(do @
[[_ _ valC] (poly.apply ($_ p.seq
- (poly.this d.Dictionary)
- (poly.this .Text)
+ (poly.exactly d.Dictionary)
+ (poly.exactly .Text)
Codec<JSON,?>//decode))]
(wrap (` (: (~ (@JSON//decode inputT))
(//.object (~ valC))))))
(do @
- [[_ subC] (poly.apply (p.seq (poly.this .Maybe)
+ [[_ subC] (poly.apply (p.seq (poly.exactly .Maybe)
Codec<JSON,?>//decode))]
(wrap (` (: (~ (@JSON//decode inputT))
(//.nullable (~ subC))))))
(do @
- [[_ subC] (poly.apply (p.seq (poly.this .List)
+ [[_ subC] (poly.apply (p.seq (poly.exactly .List)
Codec<JSON,?>//decode))]
(wrap (` (: (~ (@JSON//decode inputT))
(//.array (p.some (~ subC)))))))
diff --git a/stdlib/source/lux/type/quotient.lux b/stdlib/source/lux/type/quotient.lux
index 5fd91f5f0..a2aeeaeec 100644
--- a/stdlib/source/lux/type/quotient.lux
+++ b/stdlib/source/lux/type/quotient.lux
@@ -53,7 +53,7 @@
(-> Type (Error Type))
(<| (poly.run constructor-type)
(do p.Monad<Parser>
- [[valueT classT quotient-ex] (<| poly.apply (p.after (poly.this ..Class))
+ [[valueT classT quotient-ex] (<| poly.apply (p.after (poly.exactly ..Class))
($_ p.seq poly.any poly.any poly.existential))]
(wrap (.type (..Quotient valueT classT (:~ (#.Ex quotient-ex))))))))
diff --git a/stdlib/source/lux/type/refinement.lux b/stdlib/source/lux/type/refinement.lux
index 79bd80d71..bc8f92dae 100644
--- a/stdlib/source/lux/type/refinement.lux
+++ b/stdlib/source/lux/type/refinement.lux
@@ -87,7 +87,7 @@
(-> Type (Error Type))
(<| (poly.run constructor-type)
(do p.Monad<Parser>
- [[un-refinedT refined-ex] (poly.apply (p.after (poly.this ..Refiner)
+ [[un-refinedT refined-ex] (poly.apply (p.after (poly.exactly ..Refiner)
(p.seq poly.any poly.existential)))]
(wrap (.type (..Refined un-refinedT (#.Ex refined-ex)))))))