aboutsummaryrefslogtreecommitdiff
path: root/stdlib/test
diff options
context:
space:
mode:
authorEduardo Julian2017-08-01 18:07:16 -0400
committerEduardo Julian2017-08-01 18:07:16 -0400
commit42b367849a584132fa301992c2f91ae71f5606a1 (patch)
tree1c2075b4cd0927d28d078913aac63ec2fee97b4f /stdlib/test
parentb802e8efe275ee75473b755429b1805c5c83abbd (diff)
- Removed polytipic text-encoders.
- Simplified a lot of polytypism.
Diffstat (limited to '')
-rw-r--r--stdlib/test/test/lux/macro/poly/text-encoder.lux54
-rw-r--r--stdlib/test/tests.lux3
2 files changed, 1 insertions, 56 deletions
diff --git a/stdlib/test/test/lux/macro/poly/text-encoder.lux b/stdlib/test/test/lux/macro/poly/text-encoder.lux
deleted file mode 100644
index d5a871e5c..000000000
--- a/stdlib/test/test/lux/macro/poly/text-encoder.lux
+++ /dev/null
@@ -1,54 +0,0 @@
-(;module:
- lux
- (lux [io]
- (control [monad #+ do Monad]
- [eq #+ Eq])
- (data text/format
- [bool]
- [number "i/" Number<Int>]
- [text])
- ["r" math/random]
- [macro]
- (macro [poly #+ derived:]
- ["&" poly/text-encoder]))
- lux/test)
-
-## [Utils]
-(type: Variant
- (#Case0 Bool)
- (#Case1 Int)
- (#Case2 Real))
-
-(type: Record
- {#unit Unit
- #bool Bool
- #int Int
- #real Real
- #text Text
- #maybe (Maybe Int)
- #list (List Int)
- #variant Variant
- #tuple [Int Real Text]})
-
-(def: gen-record
- (r;Random Record)
- (do r;Monad<Random>
- [size (:: @ map (n.% +2) r;nat)
- #let [gen-int (|> r;int (:: @ map (|>. i/abs (i.% 1_000_000))))]]
- ($_ r;seq
- (:: @ wrap [])
- r;bool
- gen-int
- r;real
- (r;text size)
- (r;maybe gen-int)
- (r;list size gen-int)
- ($_ r;alt r;bool gen-int r;real)
- ($_ r;seq gen-int r;real (r;text size))
- )))
-
-(derived: (&;Codec<Text,?>::encode Record))
-
-## [Tests]
-(context: "Text-encoding polytypism"
- (test "" true))
diff --git a/stdlib/test/tests.lux b/stdlib/test/tests.lux
index b6dbdfcd2..39ac02d5e 100644
--- a/stdlib/test/tests.lux
+++ b/stdlib/test/tests.lux
@@ -63,7 +63,6 @@
(macro ["_;" code]
["_;" syntax]
(poly ["poly_;" eq]
- ["poly_;" text-encoder]
["poly_;" functor]))
["_;" type]
(type ["_;" check]
@@ -71,7 +70,7 @@
["_;" object])
))
(lux (control [contract]
- ["_;" concatenative])
+ [concatenative])
(data [env]
[trace]
[store]