aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/macro/poly
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/macro/poly/equivalence.lux36
-rw-r--r--stdlib/source/test/lux/macro/poly/functor.lux10
-rw-r--r--stdlib/source/test/lux/macro/poly/json.lux28
3 files changed, 37 insertions, 37 deletions
diff --git a/stdlib/source/test/lux/macro/poly/equivalence.lux b/stdlib/source/test/lux/macro/poly/equivalence.lux
index 16903ebc2..51315ec1e 100644
--- a/stdlib/source/test/lux/macro/poly/equivalence.lux
+++ b/stdlib/source/test/lux/macro/poly/equivalence.lux
@@ -41,43 +41,43 @@
#tuple [Int Frac Text]
#recursive Recursive})
-(def: gen-recursive
+(def: gen_recursive
(Random Recursive)
- (random.rec (function (_ gen-recursive)
- (random.or random.safe-frac
- (random.and random.safe-frac
- gen-recursive)))))
+ (random.rec (function (_ gen_recursive)
+ (random.or random.safe_frac
+ (random.and random.safe_frac
+ gen_recursive)))))
-(def: gen-record
+(def: gen_record
(Random Record)
(do {! random.monad}
[size (\ ! map (n.% 2) random.nat)
- #let [gen-int (|> random.int (\ ! map (|>> i.abs (i.% +1,000,000))))]]
+ #let [gen_int (|> random.int (\ ! map (|>> i.abs (i.% +1,000,000))))]]
($_ random.and
random.bit
- gen-int
- random.safe-frac
+ gen_int
+ random.safe_frac
(random.unicode size)
- (random.maybe gen-int)
- (random.list size gen-int)
+ (random.maybe gen_int)
+ (random.list size gen_int)
($_ random.or
random.bit
- gen-int
- random.safe-frac)
+ gen_int
+ random.safe_frac)
($_ random.and
- gen-int
- random.safe-frac
+ gen_int
+ random.safe_frac
(random.unicode size))
- gen-recursive)))
+ gen_recursive)))
(derived: equivalence
(/.equivalence Record))
(def: #export test
Test
- (<| (_.context (%.name (name-of /._)))
+ (<| (_.context (%.name (name_of /._)))
(do random.monad
- [sample gen-record
+ [sample gen_record
#let [(^open "/\.") ..equivalence]]
(_.test "Every instance equals itself."
(/\= sample sample)))))
diff --git a/stdlib/source/test/lux/macro/poly/functor.lux b/stdlib/source/test/lux/macro/poly/functor.lux
index 85d24bc5b..3f2b4db50 100644
--- a/stdlib/source/test/lux/macro/poly/functor.lux
+++ b/stdlib/source/test/lux/macro/poly/functor.lux
@@ -15,13 +15,13 @@
[macro
[poly (#+ derived:)]]])
-(derived: maybe-functor (/.functor .Maybe))
-(derived: list-functor (/.functor .List))
-(derived: state-functor (/.functor state.State))
-(derived: identity-functor (/.functor identity.Identity))
+(derived: maybe_functor (/.functor .Maybe))
+(derived: list_functor (/.functor .List))
+(derived: state_functor (/.functor state.State))
+(derived: identity_functor (/.functor identity.Identity))
(def: #export test
Test
- (<| (_.context (%.name (name-of /._)))
+ (<| (_.context (%.name (name_of /._)))
(_.test "Can derive functors automatically."
true)))
diff --git a/stdlib/source/test/lux/macro/poly/json.lux b/stdlib/source/test/lux/macro/poly/json.lux
index 4b6718577..b6b3a29e2 100644
--- a/stdlib/source/test/lux/macro/poly/json.lux
+++ b/stdlib/source/test/lux/macro/poly/json.lux
@@ -75,32 +75,32 @@
#date tda.Date
#grams (unit.Qty unit.Gram)})
-(def: gen-recursive
+(def: gen_recursive
(Random Recursive)
(random.rec
- (function (_ gen-recursive)
- (random.or random.safe-frac
- (random.and random.safe-frac
- gen-recursive)))))
+ (function (_ gen_recursive)
+ (random.or random.safe_frac
+ (random.and random.safe_frac
+ gen_recursive)))))
(def: qty
(All [unit] (Random (unit.Qty unit)))
(|> random.int (\ random.monad map unit.in)))
-(def: gen-record
+(def: gen_record
(Random Record)
(do {! random.monad}
[size (\ ! map (n.% 2) random.nat)]
($_ random.and
random.bit
- random.safe-frac
+ random.safe_frac
(random.unicode size)
- (random.maybe random.safe-frac)
- (random.list size random.safe-frac)
- (random.dictionary text.hash size (random.unicode size) random.safe-frac)
- ($_ random.or random.bit (random.unicode size) random.safe-frac)
- ($_ random.and random.bit (random.unicode size) random.safe-frac)
- ..gen-recursive
+ (random.maybe random.safe_frac)
+ (random.list size random.safe_frac)
+ (random.dictionary text.hash size (random.unicode size) random.safe_frac)
+ ($_ random.or random.bit (random.unicode size) random.safe_frac)
+ ($_ random.and random.bit (random.unicode size) random.safe_frac)
+ ..gen_recursive
## _instant.instant
## _duration.duration
_date.date
@@ -117,4 +117,4 @@
Test
(<| (_.covering /._)
(_.for [/.codec]
- ($codec.spec ..equivalence ..codec ..gen-record))))
+ ($codec.spec ..equivalence ..codec ..gen_record))))