diff options
Diffstat (limited to '')
156 files changed, 551 insertions, 588 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 4710b022b..6d1f9e106 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -4055,7 +4055,7 @@ #Nothing) (type: Openings - [Text (List Ident)]) + [Text (List Text)]) (type: Refer {#refer-defs Referrals @@ -4115,17 +4115,20 @@ (def: (parse-short-referrals tokens) (-> (List Code) (Meta [Referrals (List Code)])) (case tokens - (^ (list& [_ (#Form (list& [_ (#Tag "" "+")] defs))] tokens')) + (^or (^ (list& [_ (#Form (list& [_ (#Tag ["" "+"])] defs))] tokens')) + (^ (list& [_ (#Form (list& [_ (#Tag ["" "only"])] defs))] tokens'))) (do Monad<Meta> [defs' (extract-defs defs)] (return [(#Only defs') tokens'])) - (^ (list& [_ (#Form (list& [_ (#Tag "" "-")] defs))] tokens')) + (^or (^ (list& [_ (#Form (list& [_ (#Tag ["" "-"])] defs))] tokens')) + (^ (list& [_ (#Form (list& [_ (#Tag ["" "exclude"])] defs))] tokens'))) (do Monad<Meta> [defs' (extract-defs defs)] (return [(#Exclude defs') tokens'])) - (^ (list& [_ (#Tag "" "*")] tokens')) + (^or (^ (list& [_ (#Tag ["" "*"])] tokens')) + (^ (list& [_ (#Tag ["" "all"])] tokens'))) (return [#All tokens']) _ @@ -4160,7 +4163,7 @@ [_ (#Text prefix)] (list& [prefix (list)] openings) - [_ (#Symbol struct-name)] + [_ (#Symbol ["" struct-name])] (case openings #Nil (list ["" (list struct-name)]) @@ -4180,36 +4183,28 @@ (def: (parse-short-openings parts) (-> (List Code) (Meta [(List Openings) (List Code)])) - (if (|> parts - (list/map (: (-> Code Bool) - (function (_ part) - (case part - (^or [_ (#Text _)] [_ (#Symbol _)]) - true + (case parts + #.Nil + (return [#.Nil #.Nil]) - _ - false)))) - (list/fold (function (_ r l) (and l r)) true)) - (let [openings (list/fold (: (-> Code (List Openings) (List Openings)) - (function (_ part openings) - (case part - [_ (#Text prefix)] - (list& [prefix (list)] openings) - - [_ (#Symbol struct-name)] - (case openings - #Nil - (list ["" (list struct-name)]) - - (#Cons [prefix structs] openings') - (#Cons [prefix (#Cons struct-name structs)] openings')) + (^ (list& [_ (#Form (list& [_ (#Text prefix)] structs))] parts')) + (do Monad<Meta> + [structs' (monad/map Monad<Meta> + (function (_ struct) + (case struct + [_ (#Symbol ["" struct-name])] + (return struct-name) - _ - openings))) - (: (List Openings) (list)) - parts)] - (return [openings (list)])) - (fail "Expected all parts of opening form to be of either prefix (text) or struct (symbol)."))) + _ + (fail "Expected all structures of opening form to be symbols."))) + structs) + next+remainder (parse-short-openings parts')] + (let [[next remainder] next+remainder] + (return [(#.Cons [prefix structs'] next) + remainder]))) + + _ + (return [#.Nil parts]))) (def: (decorate-sub-importations super-name) (-> Text (List Importation) (List Importation)) @@ -4877,7 +4872,7 @@ defs') openings (join-map (: (-> Openings (List Code)) (function (_ [prefix structs]) - (list/map (function (_ [_ name]) + (list/map (function (_ name) (` (open: (~ (text$ prefix)) (~ (symbol$ [module-name name]))))) structs))) r-opens)]] @@ -4912,7 +4907,7 @@ #Nothing (list))) =opens (join-map (function (_ [prefix structs]) - (list& (text$ prefix) (list/map symbol$ structs))) + (list& (text$ prefix) (list/map (|>> [""] symbol$) structs))) r-opens)] (` (..refer (~ (text$ module-name)) (~+ =defs) diff --git a/stdlib/source/lux/cli.lux b/stdlib/source/lux/cli.lux index 00b39aed1..0f7659fff 100644 --- a/stdlib/source/lux/cli.lux +++ b/stdlib/source/lux/cli.lux @@ -2,8 +2,8 @@ lux (lux (control monad ["p" parser]) - (data (collection [list "list/" Monoid<List> Monad<List>]) - [text "text/" Equivalence<Text>] + (data (collection [list ("list/" Monoid<List> Monad<List>)]) + [text ("text/" Equivalence<Text>)] text/format ["E" error]) [io] diff --git a/stdlib/source/lux/concurrency/actor.lux b/stdlib/source/lux/concurrency/actor.lux index 609e649d1..792b65dfc 100644 --- a/stdlib/source/lux/concurrency/actor.lux +++ b/stdlib/source/lux/concurrency/actor.lux @@ -3,11 +3,11 @@ (lux (control monad ["p" parser] ["ex" exception (#+ exception:)]) - [io (#- run) "io/" Monad<IO>] + [io (#- run) ("io/" Monad<IO>)] (data [product] ["e" error] text/format - (collection [list "list/" Monoid<List> Monad<List> Fold<List>])) + (collection [list ("list/" Monoid<List> Monad<List> Fold<List>)])) [macro (#+ with-gensyms Monad<Meta>)] (macro [code] ["s" syntax (#+ syntax: Syntax)] @@ -16,7 +16,7 @@ ["csw" writer]))) (type abstract)) (// [atom (#+ Atom atom)] - [promise (#+ Promise promise) "promise/" Monad<Promise>] + [promise (#+ Promise promise) ("promise/" Monad<Promise>)] [task (#+ Task)])) (exception: #export poisoned) diff --git a/stdlib/source/lux/concurrency/frp.lux b/stdlib/source/lux/concurrency/frp.lux index 6b78d875a..0ecaf9266 100644 --- a/stdlib/source/lux/concurrency/frp.lux +++ b/stdlib/source/lux/concurrency/frp.lux @@ -4,7 +4,7 @@ [apply (#+ Apply)] [monad (#+ do Monad)]) [io (#+ IO io)] - (data (collection [list "list/" Monoid<List>])) + (data (collection [list ("list/" Monoid<List>)])) (type abstract)) (// [atom (#+ Atom atom)] [promise (#+ Promise)])) diff --git a/stdlib/source/lux/concurrency/stm.lux b/stdlib/source/lux/concurrency/stm.lux index 8039738df..1478c55e3 100644 --- a/stdlib/source/lux/concurrency/stm.lux +++ b/stdlib/source/lux/concurrency/stm.lux @@ -6,10 +6,10 @@ [io (#+ IO io)] (data [product] [maybe] - (collection [list "list/" Functor<List> Fold<List>])) + (collection [list ("list/" Functor<List> Fold<List>)])) (concurrency [atom (#+ Atom atom)] [promise (#+ Promise promise)] - [frp "frp/" Functor<Channel>]) + [frp ("frp/" Functor<Channel>)]) (type abstract))) (abstract: #export (Var a) diff --git a/stdlib/source/lux/control/comonad.lux b/stdlib/source/lux/control/comonad.lux index 557cd3b7b..a154a89a2 100644 --- a/stdlib/source/lux/control/comonad.lux +++ b/stdlib/source/lux/control/comonad.lux @@ -1,6 +1,6 @@ (.module: lux - (lux (data (collection [list "list/" Fold<List>]))) + (lux (data (collection [list ("list/" Fold<List>)]))) ["F" //functor]) ## [Signatures] diff --git a/stdlib/source/lux/control/concatenative.lux b/stdlib/source/lux/control/concatenative.lux index 05e74accc..449449b97 100644 --- a/stdlib/source/lux/control/concatenative.lux +++ b/stdlib/source/lux/control/concatenative.lux @@ -3,12 +3,12 @@ i/+ i/- i/* i// i/% i/= i/< i/<= i/> i/>= r/+ r/- r/* r// r/% r/= r/< r/<= r/> r/>= f/+ f/- f/* f// f/% f/= f/< f/<= f/> f/>=)] - (lux (control ["p" parser "p/" Monad<Parser>] + (lux (control ["p" parser ("parser/" Monad<Parser>)] [monad]) (data [text] text/format - [maybe "maybe/" Monad<Maybe>] - (collection [list "list/" Fold<List> Functor<List>])) + [maybe ("maybe/" Monad<Maybe>)] + (collection [list ("list/" Fold<List> Functor<List>)])) [macro (#+ with-gensyms Monad<Meta>)] (macro [code] ["s" syntax (#+ syntax:)] @@ -38,8 +38,8 @@ (s.Syntax Stack) (p.either (p.seq (p.maybe bottom^) (s.tuple (p.some s.any))) - (p.seq (|> bottom^ (p/map (|>> #.Some))) - (p/wrap (list))))) + (p.seq (|> bottom^ (parser/map (|>> #.Some))) + (parser/wrap (list))))) (def: (stack-fold tops bottom) (-> (List Code) Code Code) diff --git a/stdlib/source/lux/control/exception.lux b/stdlib/source/lux/control/exception.lux index 559324fd2..ab1b27e94 100644 --- a/stdlib/source/lux/control/exception.lux +++ b/stdlib/source/lux/control/exception.lux @@ -5,8 +5,8 @@ (data ["/" error (#+ Error)] [maybe] [product] - [text "text/" Monoid<Text>] - (collection [list "list/" Functor<List> Fold<List>])) + [text ("text/" Monoid<Text>)] + (collection [list ("list/" Functor<List> Fold<List>)])) [macro] (macro [code] ["s" syntax (#+ syntax: Syntax)] diff --git a/stdlib/source/lux/control/monad/indexed.lux b/stdlib/source/lux/control/monad/indexed.lux index cf5039593..cbed38690 100644 --- a/stdlib/source/lux/control/monad/indexed.lux +++ b/stdlib/source/lux/control/monad/indexed.lux @@ -2,7 +2,7 @@ lux (lux (control [monad] ["p" parser]) - (data (collection [list "list/" Functor<List> Fold<List>])) + (data (collection [list ("list/" Functor<List> Fold<List>)])) [macro] (macro ["s" syntax (#+ Syntax syntax:)]))) diff --git a/stdlib/source/lux/control/parser.lux b/stdlib/source/lux/control/parser.lux index 0fe19babd..e25115d80 100644 --- a/stdlib/source/lux/control/parser.lux +++ b/stdlib/source/lux/control/parser.lux @@ -4,7 +4,7 @@ [apply (#+ Apply)] [monad (#+ do Monad)] [codec]) - (data (collection [list "list/" Functor<List> Monoid<List>]) + (data (collection [list ("list/" Functor<List> Monoid<List>)]) [product] ["e" error (#+ Error)]))) diff --git a/stdlib/source/lux/control/pipe.lux b/stdlib/source/lux/control/pipe.lux index b5ac74975..82c2b5a2c 100644 --- a/stdlib/source/lux/control/pipe.lux +++ b/stdlib/source/lux/control/pipe.lux @@ -3,7 +3,7 @@ (lux (control [monad (#+ do)] ["p" parser]) (data ["e" error] - (collection [list "list/" Fold<List> Monad<List>])) + (collection [list ("list/" Fold<List> Monad<List>)])) [macro (#+ with-gensyms)] (macro ["s" syntax (#+ syntax: Syntax)] [code]) diff --git a/stdlib/source/lux/control/region.lux b/stdlib/source/lux/control/region.lux index 51dcfc3d3..089bf9587 100644 --- a/stdlib/source/lux/control/region.lux +++ b/stdlib/source/lux/control/region.lux @@ -6,7 +6,7 @@ ["ex" exception (#+ Exception exception:)]) (data ["e" error (#+ Error)] text/format - (collection [list "list/" Fold<List>])))) + (collection [list ("list/" Fold<List>)])))) (type: (Cleaner r m) (-> r (m (Error Any)))) diff --git a/stdlib/source/lux/data/collection/array.lux b/stdlib/source/lux/data/collection/array.lux index eb4c24033..fa261318f 100644 --- a/stdlib/source/lux/data/collection/array.lux +++ b/stdlib/source/lux/data/collection/array.lux @@ -4,7 +4,7 @@ [functor (#+ Functor)] [equivalence (#+ Equivalence)] fold) - (data (collection [list "list/" Fold<List>]) + (data (collection [list ("list/" Fold<List>)]) [product]) )) diff --git a/stdlib/source/lux/data/collection/bits.lux b/stdlib/source/lux/data/collection/bits.lux index c0c644e00..74a3e4189 100644 --- a/stdlib/source/lux/data/collection/bits.lux +++ b/stdlib/source/lux/data/collection/bits.lux @@ -4,7 +4,7 @@ pipe) (data [maybe] [bit] - (collection [array "array/" Fold<Array>]) + (collection [array ("array/" Fold<Array>)]) text/format))) (type: #export Chunk I64) diff --git a/stdlib/source/lux/data/collection/dictionary.lux b/stdlib/source/lux/data/collection/dictionary.lux index 69f858502..6712b57fb 100644 --- a/stdlib/source/lux/data/collection/dictionary.lux +++ b/stdlib/source/lux/data/collection/dictionary.lux @@ -3,8 +3,8 @@ (lux (control hash [equivalence (#+ Equivalence)]) (data [maybe] - (collection [list "list/" Fold<List> Functor<List> Monoid<List>] - [array "array/" Functor<Array> Fold<Array>]) + (collection [list ("list/" Fold<List> Functor<List> Monoid<List>)] + [array ("array/" Functor<Array> Fold<Array>)]) [bit] [product] [number]) diff --git a/stdlib/source/lux/data/collection/dictionary/ordered.lux b/stdlib/source/lux/data/collection/dictionary/ordered.lux index e10526e2c..6c0b645fc 100644 --- a/stdlib/source/lux/data/collection/dictionary/ordered.lux +++ b/stdlib/source/lux/data/collection/dictionary/ordered.lux @@ -3,7 +3,7 @@ (lux (control [monad (#+ do Monad)] equivalence [order (#+ Order)]) - (data (collection [list "L/" Monad<List> Monoid<List> Fold<List>]) + (data (collection [list ("list/" Monoid<List> Fold<List>)]) ["p" product] [maybe]) [macro] @@ -527,10 +527,10 @@ (def: #export (from-list Order<l> list) (All [k v] (-> (Order k) (List [k v]) (Dictionary k v))) - (L/fold (function (_ [key value] dict) - (put key value dict)) - (new Order<l>) - list)) + (list/fold (function (_ [key value] dict) + (put key value dict)) + (new Order<l>) + list)) (do-template [<name> <type> <output>] [(def: #export (<name> dict) @@ -541,7 +541,7 @@ (list) (#.Some node') - ($_ L/compose + ($_ list/compose (recur (get@ #left node')) (list <output>) (recur (get@ #right node'))))))] diff --git a/stdlib/source/lux/data/collection/dictionary/plist.lux b/stdlib/source/lux/data/collection/dictionary/plist.lux index c483a3287..6ef26d51d 100644 --- a/stdlib/source/lux/data/collection/dictionary/plist.lux +++ b/stdlib/source/lux/data/collection/dictionary/plist.lux @@ -1,6 +1,6 @@ (.module: lux - (lux (data [text "text/" Equivalence<Text>]))) + (lux (data [text ("text/" Equivalence<Text>)]))) (type: #export (PList a) (List [Text a])) diff --git a/stdlib/source/lux/data/collection/list.lux b/stdlib/source/lux/data/collection/list.lux index 90380dd50..549074d99 100644 --- a/stdlib/source/lux/data/collection/list.lux +++ b/stdlib/source/lux/data/collection/list.lux @@ -6,7 +6,7 @@ [monad (#+ do Monad)] [equivalence (#+ Equivalence)] [fold]) - (data [number "nat/" Codec<Text,Nat>] + (data [number ("nat/" Codec<Text,Nat>)] bool [product]))) diff --git a/stdlib/source/lux/data/collection/queue.lux b/stdlib/source/lux/data/collection/queue.lux index d05095ead..bbb2c8721 100644 --- a/stdlib/source/lux/data/collection/queue.lux +++ b/stdlib/source/lux/data/collection/queue.lux @@ -2,7 +2,7 @@ lux (lux (control [equivalence (#+ Equivalence)] ["F" functor]) - (data (collection [list "L/" Monoid<List> Functor<List>])))) + (data (collection [list ("list/" Monoid<List> Functor<List>)])))) (type: #export (Queue a) {#front (List a) @@ -21,7 +21,7 @@ (def: #export (to-list queue) (All [a] (-> (Queue a) (List a))) (let [(^slots [#front #rear]) queue] - (L/compose front (list.reverse rear)))) + (list/compose front (list.reverse rear)))) (def: #export peek (All [a] (-> (Queue a) (Maybe a))) @@ -74,5 +74,5 @@ (structure: #export _ (F.Functor Queue) (def: (map f fa) - {#front (|> fa (get@ #front) (L/map f)) - #rear (|> fa (get@ #rear) (L/map f))})) + {#front (|> fa (get@ #front) (list/map f)) + #rear (|> fa (get@ #rear) (list/map f))})) diff --git a/stdlib/source/lux/data/collection/queue/priority.lux b/stdlib/source/lux/data/collection/queue/priority.lux index 75a7e46dc..ba087428c 100644 --- a/stdlib/source/lux/data/collection/queue/priority.lux +++ b/stdlib/source/lux/data/collection/queue/priority.lux @@ -3,7 +3,7 @@ (lux (control [equivalence (#+ Equivalence)] [monad (#+ do Monad)]) (data (collection (tree [finger (#+ Tree)])) - [number "nat/" Interval<Nat>] + [number ("nat/" Interval<Nat>)] [maybe]))) (type: #export Priority Nat) diff --git a/stdlib/source/lux/data/collection/row.lux b/stdlib/source/lux/data/collection/row.lux index 13fb474e5..a32b08aae 100644 --- a/stdlib/source/lux/data/collection/row.lux +++ b/stdlib/source/lux/data/collection/row.lux @@ -8,8 +8,8 @@ fold ["p" parser]) (data [maybe] - (collection [list "list/" Fold<List> Functor<List> Monoid<List>] - [array "array/" Functor<Array> Fold<Array>]) + (collection [list ("list/" Fold<List> Functor<List> Monoid<List>)] + [array ("array/" Functor<Array> Fold<Array>)]) [bit] [product]) [macro (#+ with-gensyms)] diff --git a/stdlib/source/lux/data/collection/sequence.lux b/stdlib/source/lux/data/collection/sequence.lux index 439a70672..a148d745c 100644 --- a/stdlib/source/lux/data/collection/sequence.lux +++ b/stdlib/source/lux/data/collection/sequence.lux @@ -8,7 +8,7 @@ [macro (#+ with-gensyms)] (macro [code] ["s" syntax (#+ syntax: Syntax)]) - (data (collection [list "List/" Monad<List>]) + (data (collection [list ("list/" Monad<List>)]) bool))) ## [Types] @@ -138,7 +138,7 @@ (let [(^sequence& x y z _tail) (some-sequence-func 1 2 3)] (func x y z)))} (with-gensyms [g!sequence] - (let [body+ (` (let [(~+ (List/join (List/map (function (_ pattern) + (let [body+ (` (let [(~+ (list/join (list/map (function (_ pattern) (list (` [(~ pattern) (~ g!sequence)]) (` ((~! continuation.run) (~ g!sequence))))) patterns)))] diff --git a/stdlib/source/lux/data/collection/set.lux b/stdlib/source/lux/data/collection/set.lux index 94a569e6b..39585982a 100644 --- a/stdlib/source/lux/data/collection/set.lux +++ b/stdlib/source/lux/data/collection/set.lux @@ -3,7 +3,7 @@ (lux (control [equivalence (#+ Equivalence)] [hash (#+ Hash)]) (data (collection ["dict" dictionary (#+ Dictionary)] - [list "list/" Fold<List>])) + [list ("list/" Fold<List>)])) (type abstract))) (abstract: #export (Set a) diff --git a/stdlib/source/lux/data/collection/set/multi.lux b/stdlib/source/lux/data/collection/set/multi.lux index 9dbab718d..0695bd0ff 100644 --- a/stdlib/source/lux/data/collection/set/multi.lux +++ b/stdlib/source/lux/data/collection/set/multi.lux @@ -7,7 +7,7 @@ (language [type (#+ :share)]) (type abstract)) (//// [maybe]) - (/// [list "list/" Fold<List>] + (/// [list ("list/" Fold<List>)] [dictionary (#+ Dictionary)]) [//]) diff --git a/stdlib/source/lux/data/collection/set/ordered.lux b/stdlib/source/lux/data/collection/set/ordered.lux index a3344fff6..5ec88fb4a 100644 --- a/stdlib/source/lux/data/collection/set/ordered.lux +++ b/stdlib/source/lux/data/collection/set/ordered.lux @@ -2,7 +2,7 @@ lux (lux (control [equivalence (#+ Equivalence)] [order (#+ Order)]) - (data (collection [list "list/" Fold<List>] + (data (collection [list ("list/" Fold<List>)] (dictionary ["//" ordered]))) (type abstract))) diff --git a/stdlib/source/lux/data/collection/tree/rose.lux b/stdlib/source/lux/data/collection/tree/rose.lux index f09c50f07..72b2bf340 100644 --- a/stdlib/source/lux/data/collection/tree/rose.lux +++ b/stdlib/source/lux/data/collection/tree/rose.lux @@ -5,7 +5,7 @@ equivalence ["p" parser] fold) - (data (collection [list "L/" Monad<List> Fold<List>])) + (data (collection [list ("list/" Monad<List> Fold<List>)])) [macro] (macro [code] ["s" syntax (#+ syntax: Syntax)]))) @@ -19,7 +19,7 @@ (def: #export (flatten tree) (All [a] (-> (Tree a) (List a))) (#.Cons (get@ #value tree) - (L/join (L/map flatten (get@ #children tree))))) + (list/join (list/map flatten (get@ #children tree))))) (def: #export (leaf value) (All [a] (-> a (Tree a))) @@ -51,7 +51,7 @@ 40 {}}]))} (wrap (list (` (~ (loop [[value children] root] (` {#value (~ value) - #children (list (~+ (L/map recur children)))}))))))) + #children (list (~+ (list/map recur children)))}))))))) ## [Structs] (structure: #export (Equivalence<Tree> Equivalence<a>) (All [a] (-> (Equivalence a) (Equivalence (Tree a)))) @@ -62,12 +62,12 @@ (structure: #export _ (Functor Tree) (def: (map f fa) {#value (f (get@ #value fa)) - #children (L/map (map f) - (get@ #children fa))})) + #children (list/map (map f) + (get@ #children fa))})) (structure: #export _ (Fold Tree) (def: (fold f init tree) - (L/fold (function (_ tree' init') (fold f init' tree')) - (f (get@ #value tree) - init) - (get@ #children tree)))) + (list/fold (function (_ tree' init') (fold f init' tree')) + (f (get@ #value tree) + init) + (get@ #children tree)))) diff --git a/stdlib/source/lux/data/collection/tree/rose/zipper.lux b/stdlib/source/lux/data/collection/tree/rose/zipper.lux index 1cacab2aa..8c8d67007 100644 --- a/stdlib/source/lux/data/collection/tree/rose/zipper.lux +++ b/stdlib/source/lux/data/collection/tree/rose/zipper.lux @@ -2,10 +2,10 @@ lux (lux (control functor comonad) - (data (collection [list "L/" Monad<List> Fold<List> Monoid<List>] - (tree [rose (#+ Tree) "T/" Functor<Tree>]) + (data (collection [list ("list/" Functor<List> Fold<List> Monoid<List>)] + (tree [rose (#+ Tree) ("tree/" Functor<Tree>)]) [stack (#+ Stack)]) - [maybe "M/" Monad<Maybe>]) + [maybe ("maybe/" Monad<Maybe>)]) [macro] (macro [code] ["s" syntax (#+ syntax: Syntax)]))) @@ -85,14 +85,14 @@ ## TODO: Remove once new-luxc becomes the standard compiler. (update@ #node (: (-> (Tree ($ +0)) (Tree ($ +0))) (function (_ node) - (set@ #rose.children (L/compose (list.reverse (get@ #lefts zipper)) - (#.Cons (get@ #node zipper) - (get@ #rights zipper))) + (set@ #rose.children (list/compose (list.reverse (get@ #lefts zipper)) + (#.Cons (get@ #node zipper) + (get@ #rights zipper))) node)))) ## (update@ #node (function (_ node) - ## (set@ #rose.children (L/compose (list.reverse (get@ #lefts zipper)) - ## (#.Cons (get@ #node zipper) - ## (get@ #rights zipper))) + ## (set@ #rose.children (list/compose (list.reverse (get@ #lefts zipper)) + ## (#.Cons (get@ #node zipper) + ## (get@ #rights zipper))) ## node))) ))) @@ -119,7 +119,7 @@ (def: #export (<all-name> zipper) (All [a] (-> (Zipper a) (Zipper a))) - (L/fold (function (_ _) <one-name>) zipper (get@ <side> zipper)))] + (list/fold (function (_ _) <one-name>) zipper (get@ <side> zipper)))] [right rightmost #rights #lefts] [left leftmost #lefts #rights] @@ -164,12 +164,12 @@ (All [a] (-> a (Zipper a) (Zipper a))) (update@ [#node #rose.children] (function (_ children) - (L/compose children - ## TODO: Remove once new-luxc becomes the standard compiler. - (list (: (Tree ($ +0)) - (rose.tree [value {}]))) - ## (list (rose.tree [value {}])) - )) + (list/compose children + ## TODO: Remove once new-luxc becomes the standard compiler. + (list (: (Tree ($ +0)) + (rose.tree [value {}]))) + ## (list (rose.tree [value {}])) + )) zipper)) (def: #export (remove zipper) @@ -213,10 +213,10 @@ (structure: #export _ (Functor Zipper) (def: (map f fa) - {#parent (|> fa (get@ #parent) (M/map (map f))) - #lefts (|> fa (get@ #lefts) (L/map (T/map f))) - #rights (|> fa (get@ #rights) (L/map (T/map f))) - #node (T/map f (get@ #node fa))})) + {#parent (|> fa (get@ #parent) (maybe/map (map f))) + #lefts (|> fa (get@ #lefts) (list/map (tree/map f))) + #rights (|> fa (get@ #rights) (list/map (tree/map f))) + #node (tree/map f (get@ #node fa))})) ## TODO: Add again once new-luxc becomes the standard compiler. ## (structure: #export _ (CoMonad Zipper) @@ -227,9 +227,9 @@ ## (def: (split wa) ## (let [tree-splitter (function (tree-splitter tree) ## {#rose.value (zip tree) -## #rose.children (L/map tree-splitter +## #rose.children (list/map tree-splitter ## (get@ #rose.children tree))})] -## {#parent (|> wa (get@ #parent) (M/map split)) -## #lefts (|> wa (get@ #lefts) (L/map tree-splitter)) -## #rights (|> wa (get@ #rights) (L/map tree-splitter)) +## {#parent (|> wa (get@ #parent) (maybe/map split)) +## #lefts (|> wa (get@ #lefts) (list/map tree-splitter)) +## #rights (|> wa (get@ #rights) (list/map tree-splitter)) ## #node (|> fa (get@ #node) tree-splitter)}))) diff --git a/stdlib/source/lux/data/color.lux b/stdlib/source/lux/data/color.lux index bf11c378a..9312429b8 100644 --- a/stdlib/source/lux/data/color.lux +++ b/stdlib/source/lux/data/color.lux @@ -1,7 +1,7 @@ (.module: lux (lux (control ["eq" equivalence]) - (data (collection [list "L/" Functor<List>])) + (data (collection [list ("list/" Functor<List>)])) [math] (type abstract))) @@ -284,11 +284,11 @@ (list) (let [[hue saturation luminance] (to-hsl color) slice (normalize slice)] - (L/map (function (_ idx) - (from-hsl [(|> idx .int int-to-frac (f/* slice) (f/+ hue) normalize) - saturation - luminance])) - (list.n/range +0 (dec results)))))) + (list/map (function (_ idx) + (from-hsl [(|> idx .int int-to-frac (f/* slice) (f/+ hue) normalize) + saturation + luminance])) + (list.n/range +0 (dec results)))))) (def: #export (monochromatic results color) (-> Nat Color (List Color)) @@ -297,9 +297,9 @@ (let [[hue saturation brightness] (to-hsb color) slice (|> 1.0 (f// (|> results .int int-to-frac)))] (|> (list.n/range +0 (dec results)) - (L/map (|>> .int int-to-frac - (f/* slice) - (f/+ brightness) - normalize - [hue saturation] - from-hsb)))))) + (list/map (|>> .int int-to-frac + (f/* slice) + (f/+ brightness) + normalize + [hue saturation] + from-hsb)))))) diff --git a/stdlib/source/lux/data/format/css.lux b/stdlib/source/lux/data/format/css.lux index 56046ad2f..3ef030241 100644 --- a/stdlib/source/lux/data/format/css.lux +++ b/stdlib/source/lux/data/format/css.lux @@ -4,7 +4,7 @@ [number] [text] text/format - (collection [list "L/" Functor<List> Monoid<List>])))) + (collection [list ("list/" Functor<List> Monoid<List>)])))) (type: #export Selector Text) @@ -25,16 +25,16 @@ (def: #export (inline style) (-> Style Text) (|> style - (L/map (function (_ [key val]) (format key ": " val))) + (list/map (function (_ [key val]) (format key ": " val))) (text.join-with "; "))) (def: #export (css sheet) (-> Sheet CSS) (|> sheet - (L/map (function (_ [selector style]) - (if (list.empty? style) - "" - (format selector "{" (inline style) "}")))) + (list/map (function (_ [selector style]) + (if (list.empty? style) + "" + (format selector "{" (inline style) "}")))) (text.join-with "\n"))) (def: #export (rgb color) @@ -59,14 +59,14 @@ (def: #export (rule selector style children) (-> Selector Style Sheet Sheet) (list& [selector style] - (L/map (function (_ [sub-selector sub-style]) - [(format selector sub-selector) sub-style]) - children))) + (list/map (function (_ [sub-selector sub-style]) + [(format selector sub-selector) sub-style]) + children))) (do-template [<name> <type>] [(def: #export <name> (-> <type> <type> <type>) - L/compose)] + list/compose)] [merge Style] [cascade Sheet] diff --git a/stdlib/source/lux/data/format/html.lux b/stdlib/source/lux/data/format/html.lux index 20e301b3b..c3821027d 100644 --- a/stdlib/source/lux/data/format/html.lux +++ b/stdlib/source/lux/data/format/html.lux @@ -2,7 +2,7 @@ [lux (#- comment)] (lux (data [text] text/format - (collection [list "L/" Functor<List>])))) + (collection [list ("list/" Functor<List>)])))) (type: #export Attributes {#.doc "Attributes for an HTML tag."} @@ -27,7 +27,7 @@ (def: attrs-to-text (-> Attributes Text) - (|>> (L/map (function (_ [key val]) (format key "=" "\"" (text val) "\""))) + (|>> (list/map (function (_ [key val]) (format key "=" "\"" (text val) "\""))) (text.join-with " "))) (def: #export (tag name attrs children) diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux index 71cde90f7..cd7b82be0 100644 --- a/stdlib/source/lux/data/format/json.lux +++ b/stdlib/source/lux/data/format/json.lux @@ -5,17 +5,17 @@ (lux (control [monad (#+ do Monad)] [equivalence (#+ Equivalence)] codec - ["p" parser "parser/" Monad<Parser>]) + ["p" parser ("parser/" Monad<Parser>)]) (data [bool] - [text "text/" Equivalence<Text> Monoid<Text>] + [text ("text/" Equivalence<Text> Monoid<Text>)] (text ["l" lexer]) - [number "frac/" Codec<Text,Frac> "nat/" Codec<Text,Nat>] + [number ("frac/" Codec<Text,Frac>) ("nat/" Codec<Text,Nat>)] [maybe] ["e" error] [sum] [product] - (collection [list "list/" Fold<List> Monad<List>] - [row (#+ Row row) "row/" Monad<Row>] + (collection [list ("list/" Fold<List> Monad<List>)] + [row (#+ Row row) ("row/" Monad<Row>)] ["dict" dictionary (#+ Dictionary)])) [macro (#+ Monad<Meta> with-gensyms)] (macro ["s" syntax (#+ syntax:)] diff --git a/stdlib/source/lux/data/format/xml.lux b/stdlib/source/lux/data/format/xml.lux index ae3f6e929..76b4b1710 100644 --- a/stdlib/source/lux/data/format/xml.lux +++ b/stdlib/source/lux/data/format/xml.lux @@ -3,16 +3,15 @@ (lux (control monad [equivalence (#+ Equivalence)] codec - ["p" parser "p/" Monad<Parser>] + ["p" parser ("parser/" Monad<Parser>)] ["ex" exception (#+ exception:)]) - (data [text "text/" Equivalence<Text> Monoid<Text>] + (data [text ("text/" Equivalence<Text> Monoid<Text>)] (text ["l" lexer]) [number] ["E" error] [product] - [maybe "m/" Monad<Maybe>] - [ident "ident/" Equivalence<Ident> Codec<Text,Ident>] - (collection [list "list/" Monad<List>] + [ident ("ident/" Equivalence<Ident> Codec<Text,Ident>)] + (collection [list ("list/" Monad<List>)] ["d" dictionary])))) (type: #export Tag Ident) @@ -27,11 +26,11 @@ (def: xml-standard-escape-char^ (l.Lexer Text) ($_ p.either - (p.after (l.this "<") (p/wrap "<")) - (p.after (l.this ">") (p/wrap ">")) - (p.after (l.this "&") (p/wrap "&")) - (p.after (l.this "'") (p/wrap "'")) - (p.after (l.this """) (p/wrap "\"")))) + (p.after (l.this "<") (parser/wrap "<")) + (p.after (l.this ">") (parser/wrap ">")) + (p.after (l.this "&") (parser/wrap "&")) + (p.after (l.this "'") (parser/wrap "'")) + (p.after (l.this """) (parser/wrap "\"")))) (def: xml-unicode-escape-char^ (l.Lexer Text) @@ -139,7 +138,7 @@ (l.Lexer XML) (|> (p.either cdata^ (l.many xml-char^)) - (p/map (|>> #Text)))) + (parser/map (|>> #Text)))) (def: xml^ (l.Lexer XML) diff --git a/stdlib/source/lux/data/ident.lux b/stdlib/source/lux/data/ident.lux index e4a7545f0..ce2c08042 100644 --- a/stdlib/source/lux/data/ident.lux +++ b/stdlib/source/lux/data/ident.lux @@ -3,7 +3,7 @@ (lux (control [equivalence (#+ Equivalence)] [codec (#+ Codec)] hash) - (data [text "text/" Monoid<Text> Equivalence<Text>]))) + (data [text ("text/" Monoid<Text> Equivalence<Text>)]))) ## [Types] ## (type: Ident diff --git a/stdlib/source/lux/data/number/complex.lux b/stdlib/source/lux/data/number/complex.lux index 4666626af..58818de8c 100644 --- a/stdlib/source/lux/data/number/complex.lux +++ b/stdlib/source/lux/data/number/complex.lux @@ -6,10 +6,10 @@ codec ["M" monad (#+ do Monad)] ["p" parser]) - (data [number "frac/" Number<Frac> "f/" Codec<Text,Frac>] - [text "text/" Monoid<Text>] + (data [number ("frac/" Number<Frac>)] + [text ("text/" Monoid<Text>)] [maybe] - (collection [list "L/" Monad<List>])) + (collection [list ("list/" Functor<List>)])) [macro] (macro [code] ["s" syntax (#+ syntax: Syntax)]))) @@ -295,13 +295,13 @@ nth-phi (|> input argument (f// r-nth)) slice (|> math.pi (f/* 2.0) (f// r-nth))] (|> (list.n/range +0 (dec nth)) - (L/map (function (_ nth') - (let [inner (|> nth' .int int-to-frac - (f/* slice) - (f/+ nth-phi)) - real (f/* nth-root-of-abs - (math.cos inner)) - imaginary (f/* nth-root-of-abs - (math.sin inner))] - {#real real - #imaginary imaginary}))))))) + (list/map (function (_ nth') + (let [inner (|> nth' .int int-to-frac + (f/* slice) + (f/+ nth-phi)) + real (f/* nth-root-of-abs + (math.cos inner)) + imaginary (f/* nth-root-of-abs + (math.sin inner))] + {#real real + #imaginary imaginary}))))))) diff --git a/stdlib/source/lux/data/number/ratio.lux b/stdlib/source/lux/data/number/ratio.lux index a3a123ffb..b364dec92 100644 --- a/stdlib/source/lux/data/number/ratio.lux +++ b/stdlib/source/lux/data/number/ratio.lux @@ -7,8 +7,8 @@ codec monad ["p" parser]) - (data [number "nat/" Codec<Text,Nat>] - [text "text/" Monoid<Text>] + (data [number ("nat/" Codec<Text,Nat>)] + [text ("text/" Monoid<Text>)] text/format ["E" error] [product] diff --git a/stdlib/source/lux/data/text/buffer.lux b/stdlib/source/lux/data/text/buffer.lux index f1b9b770b..5b8f8e56e 100644 --- a/stdlib/source/lux/data/text/buffer.lux +++ b/stdlib/source/lux/data/text/buffer.lux @@ -2,7 +2,7 @@ lux (lux (data [product] text/format - (collection [row (#+ Row) "row/" Fold<Row>])) + (collection [row (#+ Row) ("row/" Fold<Row>)])) (language ["_" host]) (type abstract) [host (#+ import:)]) diff --git a/stdlib/source/lux/data/text/format.lux b/stdlib/source/lux/data/text/format.lux index ab04746c9..977592479 100644 --- a/stdlib/source/lux/data/text/format.lux +++ b/stdlib/source/lux/data/text/format.lux @@ -6,7 +6,7 @@ [number] [text] [ident] - (collection [list "list/" Monad<List>]) + (collection [list ("list/" Monad<List>)]) (format [xml] [json])) (time [instant] diff --git a/stdlib/source/lux/data/text/lexer.lux b/stdlib/source/lux/data/text/lexer.lux index 3821c0081..c45361800 100644 --- a/stdlib/source/lux/data/text/lexer.lux +++ b/stdlib/source/lux/data/text/lexer.lux @@ -2,7 +2,7 @@ [lux (#- not)] (lux (control [monad (#+ do Monad)] ["p" parser]) - (data [text "text/" Monoid<Text>] + (data [text ("text/" Monoid<Text>)] [product] [maybe] ["e" error] diff --git a/stdlib/source/lux/data/text/regex.lux b/stdlib/source/lux/data/text/regex.lux index d2cc4e725..6a71ca24d 100644 --- a/stdlib/source/lux/data/text/regex.lux +++ b/stdlib/source/lux/data/text/regex.lux @@ -1,15 +1,15 @@ (.module: lux (lux (control monad - ["p" parser "p/" Monad<Parser>]) + ["p" parser ("parser/" Monad<Parser>)]) (data [text] ["l" text/lexer] text/format - [number "int/" Codec<Text,Int>] + [number ("int/" Codec<Text,Int>)] [product] ["e" error] [maybe] - (collection [list "list/" Fold<List> Monad<List>])) + (collection [list ("list/" Fold<List> Monad<List>)])) [macro (#+ with-gensyms)] (macro [code] ["s" syntax (#+ syntax:)]))) @@ -41,7 +41,7 @@ (def: (copy reference) (-> Text (l.Lexer Text)) - (p.after (l.this reference) (p/wrap reference))) + (p.after (l.this reference) (parser/wrap reference))) (def: (join-text^ part^) (-> (l.Lexer (List Text)) (l.Lexer Text)) @@ -64,10 +64,10 @@ (def: (identifier^ current-module) (-> Text (l.Lexer Ident)) ($_ p.either - (p.seq (p/wrap current-module) (p.after (l.this "..") identifier-part^)) + (p.seq (parser/wrap current-module) (p.after (l.this "..") identifier-part^)) (p.seq identifier-part^ (p.after (l.this ".") identifier-part^)) - (p.seq (p/wrap "lux") (p.after (l.this ".") identifier-part^)) - (p.seq (p/wrap "") identifier-part^))) + (p.seq (parser/wrap "lux") (p.after (l.this ".") identifier-part^)) + (p.seq (parser/wrap "") identifier-part^))) (def: (re-var^ current-module) (-> Text (l.Lexer Code)) @@ -181,7 +181,7 @@ (l.Lexer Nat) (|> (l.many l.decimal) (p.codec number.Codec<Text,Int>) - (p/map .nat))) + (parser/map .nat))) (def: re-back-reference^ (l.Lexer Code) diff --git a/stdlib/source/lux/data/text/unicode.lux b/stdlib/source/lux/data/text/unicode.lux index 2bea5dbe2..5c946c84f 100644 --- a/stdlib/source/lux/data/text/unicode.lux +++ b/stdlib/source/lux/data/text/unicode.lux @@ -2,7 +2,7 @@ lux (lux (control [interval (#+ Interval)] [monoid (#+ Monoid)]) - (data [number (#+ hex) "nat/" Interval<Nat>] + (data [number (#+ hex) ("nat/" Interval<Nat>)] (collection [list] (tree [finger (#+ Tree)]))) (type abstract))) diff --git a/stdlib/source/lux/host.js.lux b/stdlib/source/lux/host.js.lux index 04b6f6ad2..a9a486e29 100644 --- a/stdlib/source/lux/host.js.lux +++ b/stdlib/source/lux/host.js.lux @@ -2,7 +2,7 @@ lux (lux (control monad ["p" parser]) - (data (collection [list #* "list/" Fold<List>])) + (data (collection [list #* ("list/" Fold<List>)])) [macro (#+ with-gensyms)] (macro [code] ["s" syntax (#+ syntax: Syntax)]) diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux index 9187ee54c..50ac06f0b 100644 --- a/stdlib/source/lux/host.jvm.lux +++ b/stdlib/source/lux/host.jvm.lux @@ -5,17 +5,17 @@ ["p" parser]) [io (#+ IO Monad<IO> io)] function - (data (collection [list "list/" Monad<List> Fold<List> Monoid<List>]) + (data (collection [list ("list/" Monad<List> Fold<List> Monoid<List>)]) number [maybe] [product] - [text "text/" Equivalence<Text> Monoid<Text>] + [text ("text/" Equivalence<Text> Monoid<Text>)] text/format - [bool "bool/" Codec<Text,Bool>]) + [bool ("bool/" Codec<Text,Bool>)]) [macro (#+ with-gensyms Functor<Meta> Monad<Meta>)] (macro [code] ["s" syntax (#+ syntax: Syntax)]) - (language [type "type/" Equivalence<Type>]) + (language [type ("type/" Equivalence<Type>)]) )) (do-template [<name> <op> <from> <to>] diff --git a/stdlib/source/lux/language/compiler/analysis.lux b/stdlib/source/lux/language/compiler/analysis.lux index 82dc69f0d..c8dd643de 100644 --- a/stdlib/source/lux/language/compiler/analysis.lux +++ b/stdlib/source/lux/language/compiler/analysis.lux @@ -2,8 +2,8 @@ [lux (#- nat int rev)] (lux (data [product] [error] - [text "text/" Equivalence<Text>] - (collection [list "list/" Fold<List>])) + [text ("text/" Equivalence<Text>)] + (collection [list ("list/" Fold<List>)])) [function]) [///reference (#+ Register Variable Reference)] [//]) diff --git a/stdlib/source/lux/language/compiler/analysis/case.lux b/stdlib/source/lux/language/compiler/analysis/case.lux index ebf2ba864..6644fdabe 100644 --- a/stdlib/source/lux/language/compiler/analysis/case.lux +++ b/stdlib/source/lux/language/compiler/analysis/case.lux @@ -6,7 +6,7 @@ [error] [maybe] text/format - (collection [list "list/" Fold<List> Monoid<List> Functor<List>])) + (collection [list ("list/" Fold<List> Monoid<List> Functor<List>)])) [macro] (macro [code])) (//// [type] diff --git a/stdlib/source/lux/language/compiler/analysis/case/coverage.lux b/stdlib/source/lux/language/compiler/analysis/case/coverage.lux index 4a15e372c..c01a7303a 100644 --- a/stdlib/source/lux/language/compiler/analysis/case/coverage.lux +++ b/stdlib/source/lux/language/compiler/analysis/case/coverage.lux @@ -3,14 +3,14 @@ (lux (control [monad (#+ do)] ["ex" exception (#+ exception:)] equivalence) - (data [bool "bool/" Equivalence<Bool>] + (data [bool ("bool/" Equivalence<Bool>)] [number] - ["e" error "error/" Monad<Error>] + ["e" error ("error/" Monad<Error>)] [maybe] text/format - (collection [list "list/" Fold<List>] + (collection [list ("list/" Fold<List>)] ["dict" dictionary (#+ Dictionary)]))) - [//// "operation/" Monad<Operation>] + [//// ("operation/" Monad<Operation>)] [/// (#+ Pattern Variant Operation)]) (def: cases diff --git a/stdlib/source/lux/language/compiler/analysis/function.lux b/stdlib/source/lux/language/compiler/analysis/function.lux index da9c223a4..833e32eaf 100644 --- a/stdlib/source/lux/language/compiler/analysis/function.lux +++ b/stdlib/source/lux/language/compiler/analysis/function.lux @@ -5,7 +5,7 @@ (data [maybe] [text] text/format - (collection [list "list/" Fold<List> Monoid<List> Monad<List>])) + (collection [list ("list/" Fold<List> Monoid<List> Monad<List>)])) [macro] (macro [code]) (language [type] diff --git a/stdlib/source/lux/language/compiler/analysis/inference.lux b/stdlib/source/lux/language/compiler/analysis/inference.lux index 12f5f0e6d..187b6bb5c 100644 --- a/stdlib/source/lux/language/compiler/analysis/inference.lux +++ b/stdlib/source/lux/language/compiler/analysis/inference.lux @@ -5,11 +5,11 @@ (data [maybe] [text] text/format - (collection [list "list/" Functor<List>])) + (collection [list ("list/" Functor<List>)])) [macro]) (//// [type] (type ["tc" check])) - [/// "operation/" Monad<Operation>] + [/// ("operation/" Monad<Operation>)] [// (#+ Tag Analysis Operation Compiler)] [//type]) diff --git a/stdlib/source/lux/language/compiler/analysis/reference.lux b/stdlib/source/lux/language/compiler/analysis/reference.lux index 814f0c47e..4e73c410f 100644 --- a/stdlib/source/lux/language/compiler/analysis/reference.lux +++ b/stdlib/source/lux/language/compiler/analysis/reference.lux @@ -5,7 +5,7 @@ [macro] (macro [code]) (language (type ["tc" check])) - (data [text "text/" Equivalence<Text>] + (data [text ("text/" Equivalence<Text>)] text/format)) [///] [// (#+ Analysis Operation)] diff --git a/stdlib/source/lux/language/compiler/analysis/structure.lux b/stdlib/source/lux/language/compiler/analysis/structure.lux index 49c412e05..53ccecd50 100644 --- a/stdlib/source/lux/language/compiler/analysis/structure.lux +++ b/stdlib/source/lux/language/compiler/analysis/structure.lux @@ -6,7 +6,7 @@ [number] [product] [maybe] - (collection [list "list/" Functor<List>] + (collection [list ("list/" Functor<List>)] ["dict" dictionary (#+ Dictionary)]) text/format) [macro] diff --git a/stdlib/source/lux/language/compiler/extension/analysis.lux b/stdlib/source/lux/language/compiler/extension/analysis.lux index 205a65312..a34dcae77 100644 --- a/stdlib/source/lux/language/compiler/extension/analysis.lux +++ b/stdlib/source/lux/language/compiler/extension/analysis.lux @@ -1,7 +1,7 @@ (.module: lux (lux (data [text] - (collection [list "list/" Functor<List>] + (collection [list ("list/" Functor<List>)] ["dict" dictionary (#+ Dictionary)]))) [///analysis (#+ Analysis State)] [///synthesis (#+ Synthesis)] diff --git a/stdlib/source/lux/language/compiler/extension/analysis/common.lux b/stdlib/source/lux/language/compiler/extension/analysis/common.lux index dc0bdf740..c099a9648 100644 --- a/stdlib/source/lux/language/compiler/extension/analysis/common.lux +++ b/stdlib/source/lux/language/compiler/extension/analysis/common.lux @@ -6,7 +6,7 @@ (concurrency [atom (#+ Atom)]) (data [text] text/format - (collection [list "list/" Functor<List>] + (collection [list ("list/" Functor<List>)] [array] ["dict" dictionary (#+ Dictionary)])) [language] diff --git a/stdlib/source/lux/language/compiler/extension/analysis/host.jvm.lux b/stdlib/source/lux/language/compiler/extension/analysis/host.jvm.lux index 7b5e358cb..1985706c2 100644 --- a/stdlib/source/lux/language/compiler/extension/analysis/host.jvm.lux +++ b/stdlib/source/lux/language/compiler/extension/analysis/host.jvm.lux @@ -6,14 +6,14 @@ (data ["e" error] [maybe] [product] - [bool "bool/" Equivalence<Bool>] - [text "text/" Equivalence<Text>] + [bool ("bool/" Equivalence<Bool>)] + [text ("text/" Equivalence<Text>)] (text format ["l" lexer]) - (collection [list "list/" Fold<List> Functor<List> Monoid<List>] + (collection [list ("list/" Fold<List> Functor<List> Monoid<List>)] [array] ["dict" dictionary (#+ Dictionary)])) - [macro "macro/" Monad<Meta>] + [macro ("macro/" Monad<Meta>)] (macro [code] ["s" syntax]) [language] diff --git a/stdlib/source/lux/language/compiler/extension/bundle.lux b/stdlib/source/lux/language/compiler/extension/bundle.lux index 677f32792..57bae70ed 100644 --- a/stdlib/source/lux/language/compiler/extension/bundle.lux +++ b/stdlib/source/lux/language/compiler/extension/bundle.lux @@ -4,7 +4,7 @@ ["ex" exception (#+ exception:)]) (data [text] text/format - (collection [list "list/" Functor<List>] + (collection [list ("list/" Functor<List>)] ["dict" dictionary (#+ Dictionary)]))) [//]) diff --git a/stdlib/source/lux/language/compiler/meta/cache.lux b/stdlib/source/lux/language/compiler/meta/cache.lux index 295f7bc38..e2de04813 100644 --- a/stdlib/source/lux/language/compiler/meta/cache.lux +++ b/stdlib/source/lux/language/compiler/meta/cache.lux @@ -3,14 +3,14 @@ (lux (control [monad (#+ Monad do)] ["ex" exception (#+ exception:)] pipe) - (data [bool "bool/" Equivalence<Bool>] + (data [bool ("bool/" Equivalence<Bool>)] [maybe] [error] [product] (format [binary (#+ Binary)]) [text] text/format - (collection [list "list/" Functor<List> Fold<List>] + (collection [list ("list/" Functor<List> Fold<List>)] ["dict" dictionary (#+ Dictionary)] [set (#+ Set)])) (world [file (#+ File System)])) diff --git a/stdlib/source/lux/language/compiler/meta/cache/dependency.lux b/stdlib/source/lux/language/compiler/meta/cache/dependency.lux index 22c989519..be61f963f 100644 --- a/stdlib/source/lux/language/compiler/meta/cache/dependency.lux +++ b/stdlib/source/lux/language/compiler/meta/cache/dependency.lux @@ -1,7 +1,7 @@ (.module: [lux (#- Module)] (lux (data [text] - (collection [list "list/" Functor<List> Fold<List>] + (collection [list ("list/" Functor<List> Fold<List>)] ["dict" dictionary (#+ Dictionary)]))) [///io (#+ Module)] [///archive (#+ Archive)]) diff --git a/stdlib/source/lux/language/compiler/synthesis/case.lux b/stdlib/source/lux/language/compiler/synthesis/case.lux index 092424ec8..10c41d428 100644 --- a/stdlib/source/lux/language/compiler/synthesis/case.lux +++ b/stdlib/source/lux/language/compiler/synthesis/case.lux @@ -4,13 +4,13 @@ pipe [monad (#+ do)]) (data [product] - [bool "bool/" Equivalence<Bool>] - [text "text/" Equivalence<Text>] + [bool ("bool/" Equivalence<Bool>)] + [text ("text/" Equivalence<Text>)] text/format - [number "frac/" Equivalence<Frac>] - (collection [list "list/" Fold<List> Monoid<List>]))) + [number ("frac/" Equivalence<Frac>)] + (collection [list ("list/" Fold<List> Monoid<List>)]))) [///reference] - [///compiler (#+ Operation) "operation/" Monad<Operation>] + [///compiler (#+ Operation) ("operation/" Monad<Operation>)] [///analysis (#+ Pattern Match Analysis)] [// (#+ Path Synthesis)] [//function]) diff --git a/stdlib/source/lux/language/compiler/synthesis/expression.lux b/stdlib/source/lux/language/compiler/synthesis/expression.lux index a1171baef..33c64109d 100644 --- a/stdlib/source/lux/language/compiler/synthesis/expression.lux +++ b/stdlib/source/lux/language/compiler/synthesis/expression.lux @@ -3,10 +3,10 @@ (lux (control [monad (#+ do)] ["ex" exception (#+ exception:)]) (data [maybe] - (collection [list "list/" Functor<List>] + (collection [list ("list/" Functor<List>)] ["dict" dictionary (#+ Dictionary)]))) [///reference] - [///compiler "operation/" Monad<Operation>] + [///compiler ("operation/" Monad<Operation>)] [///analysis (#+ Analysis)] [///extension (#+ Extension)] [// (#+ Synthesis)] diff --git a/stdlib/source/lux/language/compiler/synthesis/function.lux b/stdlib/source/lux/language/compiler/synthesis/function.lux index 6e2ee638c..40e8f30c3 100644 --- a/stdlib/source/lux/language/compiler/synthesis/function.lux +++ b/stdlib/source/lux/language/compiler/synthesis/function.lux @@ -4,9 +4,9 @@ [state] pipe ["ex" exception (#+ exception:)]) - (data [maybe "maybe/" Monad<Maybe>] + (data [maybe ("maybe/" Monad<Maybe>)] [error] - (collection [list "list/" Functor<List> Monoid<List> Fold<List>] + (collection [list ("list/" Functor<List> Monoid<List> Fold<List>)] ["dict" dictionary (#+ Dictionary)]))) [///reference (#+ Variable)] [///compiler (#+ Operation)] diff --git a/stdlib/source/lux/language/compiler/synthesis/loop.lux b/stdlib/source/lux/language/compiler/synthesis/loop.lux index 898bb916b..1a017b893 100644 --- a/stdlib/source/lux/language/compiler/synthesis/loop.lux +++ b/stdlib/source/lux/language/compiler/synthesis/loop.lux @@ -2,8 +2,8 @@ [lux (#- loop)] (lux (control [monad (#+ do)] ["p" parser]) - (data [maybe "maybe/" Monad<Maybe>] - (collection [list "list/" Functor<List>])) + (data [maybe ("maybe/" Monad<Maybe>)] + (collection [list ("list/" Functor<List>)])) (macro [code] [syntax])) [///] diff --git a/stdlib/source/lux/language/compiler/translation.lux b/stdlib/source/lux/language/compiler/translation.lux index d2114d9a2..19b7045ac 100644 --- a/stdlib/source/lux/language/compiler/translation.lux +++ b/stdlib/source/lux/language/compiler/translation.lux @@ -2,7 +2,7 @@ lux (lux (control ["ex" exception (#+ exception:)] [monad (#+ do)]) - (data [maybe "maybe/" Functor<Maybe>] + (data [maybe ("maybe/" Functor<Maybe>)] [error (#+ Error)] [text] text/format diff --git a/stdlib/source/lux/language/compiler/translation/scheme/case.jvm.lux b/stdlib/source/lux/language/compiler/translation/scheme/case.jvm.lux index e20296d82..d075c1138 100644 --- a/stdlib/source/lux/language/compiler/translation/scheme/case.jvm.lux +++ b/stdlib/source/lux/language/compiler/translation/scheme/case.jvm.lux @@ -5,11 +5,11 @@ (data [number] [text] text/format - (collection [list "list/" Functor<List> Fold<List>] + (collection [list ("list/" Functor<List> Fold<List>)] [set (#+ Set)]))) (///// [reference (#+ Register)] (host ["_" scheme (#+ Expression Computation Var)]) - [compiler "operation/" Monad<Operation>] + [compiler ("operation/" Monad<Operation>)] (compiler [synthesis (#+ Synthesis Path)])) [//runtime (#+ Operation Translator)] [//reference]) diff --git a/stdlib/source/lux/language/compiler/translation/scheme/extension.jvm.lux b/stdlib/source/lux/language/compiler/translation/scheme/extension.jvm.lux index f746bc142..770d365cf 100644 --- a/stdlib/source/lux/language/compiler/translation/scheme/extension.jvm.lux +++ b/stdlib/source/lux/language/compiler/translation/scheme/extension.jvm.lux @@ -7,7 +7,7 @@ (collection ["dict" dictionary (#+ Dictionary)]))) (///// [reference (#+ Register Variable)] (host ["_" scheme (#+ Computation)]) - [compiler "operation/" Monad<Operation>] + [compiler ("operation/" Monad<Operation>)] (compiler [synthesis (#+ Synthesis)])) [//runtime (#+ Operation Translator)] [/common] diff --git a/stdlib/source/lux/language/compiler/translation/scheme/extension/common.jvm.lux b/stdlib/source/lux/language/compiler/translation/scheme/extension/common.jvm.lux index c8b66a745..79f39e9d4 100644 --- a/stdlib/source/lux/language/compiler/translation/scheme/extension/common.jvm.lux +++ b/stdlib/source/lux/language/compiler/translation/scheme/extension/common.jvm.lux @@ -7,7 +7,7 @@ [text] text/format [number (#+ hex)] - (collection [list "list/" Functor<List>] + (collection [list ("list/" Functor<List>)] ["dict" dictionary (#+ Dictionary)])) [macro (#+ with-gensyms)] (macro [code] diff --git a/stdlib/source/lux/language/compiler/translation/scheme/function.jvm.lux b/stdlib/source/lux/language/compiler/translation/scheme/function.jvm.lux index 04ec5cae2..acd639bdf 100644 --- a/stdlib/source/lux/language/compiler/translation/scheme/function.jvm.lux +++ b/stdlib/source/lux/language/compiler/translation/scheme/function.jvm.lux @@ -4,11 +4,11 @@ pipe) (data [product] text/format - (collection [list "list/" Functor<List>]))) + (collection [list ("list/" Functor<List>)]))) (///// [reference (#+ Register Variable)] [name] (host ["_" scheme (#+ Expression Computation Var)]) - [compiler "operation/" Monad<Operation>] + [compiler ("operation/" Monad<Operation>)] (compiler [analysis (#+ Variant Tuple Environment Arity Abstraction Application Analysis)] [synthesis (#+ Synthesis)])) [///] diff --git a/stdlib/source/lux/language/compiler/translation/scheme/loop.jvm.lux b/stdlib/source/lux/language/compiler/translation/scheme/loop.jvm.lux index d78e9e965..4fb90a51e 100644 --- a/stdlib/source/lux/language/compiler/translation/scheme/loop.jvm.lux +++ b/stdlib/source/lux/language/compiler/translation/scheme/loop.jvm.lux @@ -4,7 +4,7 @@ (data [product] [text] text/format - (collection [list "list/" Functor<List>])) + (collection [list ("list/" Functor<List>)])) [macro]) (///// (host ["_" scheme (#+ Computation Var)]) [compiler] diff --git a/stdlib/source/lux/language/compiler/translation/scheme/primitive.jvm.lux b/stdlib/source/lux/language/compiler/translation/scheme/primitive.jvm.lux index e0e7a2e54..2546fd41c 100644 --- a/stdlib/source/lux/language/compiler/translation/scheme/primitive.jvm.lux +++ b/stdlib/source/lux/language/compiler/translation/scheme/primitive.jvm.lux @@ -1,7 +1,7 @@ (.module: [lux (#- i64)] [/// (#+ State)] - (///// [compiler "operation/" Monad<Operation>] + (///// [compiler ("operation/" Monad<Operation>)] (host ["_" scheme (#+ Expression)])) [//runtime (#+ Operation)]) diff --git a/stdlib/source/lux/language/compiler/translation/scheme/reference.jvm.lux b/stdlib/source/lux/language/compiler/translation/scheme/reference.jvm.lux index 3d9b7eb85..3babc137d 100644 --- a/stdlib/source/lux/language/compiler/translation/scheme/reference.jvm.lux +++ b/stdlib/source/lux/language/compiler/translation/scheme/reference.jvm.lux @@ -5,7 +5,7 @@ (///// [reference (#+ Register Variable Reference)] [name] (host ["_" scheme (#+ Expression Var)]) - [compiler "operation/" Monad<Operation>] + [compiler ("operation/" Monad<Operation>)] (compiler [analysis (#+ Variant Tuple)] [synthesis (#+ Synthesis)])) [//runtime (#+ Operation Translator)] diff --git a/stdlib/source/lux/language/compiler/translation/scheme/runtime.jvm.lux b/stdlib/source/lux/language/compiler/translation/scheme/runtime.jvm.lux index 9d22394d4..f068478d2 100644 --- a/stdlib/source/lux/language/compiler/translation/scheme/runtime.jvm.lux +++ b/stdlib/source/lux/language/compiler/translation/scheme/runtime.jvm.lux @@ -1,10 +1,10 @@ (.module: lux - (lux (control ["p" parser "p/" Monad<Parser>] + (lux (control ["p" parser ("parser/" Monad<Parser>)] [monad (#+ do)]) (data [number (#+ hex)] text/format - (collection [list "list/" Monad<List>])) + (collection [list ("list/" Monad<List>)])) [function] (macro [code] ["s" syntax (#+ syntax:)])) @@ -62,7 +62,7 @@ (def: declaration (s.Syntax [Text (List Text)]) - (p.either (p.seq s.local-symbol (p/wrap (list))) + (p.either (p.seq s.local-symbol (parser/wrap (list))) (s.form (p.seq s.local-symbol (p.some s.local-symbol))))) (syntax: (runtime: {[name args] declaration} diff --git a/stdlib/source/lux/language/host/scheme.lux b/stdlib/source/lux/language/host/scheme.lux index 54043a82d..445a373ac 100644 --- a/stdlib/source/lux/language/host/scheme.lux +++ b/stdlib/source/lux/language/host/scheme.lux @@ -4,7 +4,7 @@ (data [text] text/format [number] - (collection [list "list/" Functor<List> Fold<List>])) + (collection [list ("list/" Functor<List> Fold<List>)])) (type abstract))) (abstract: Global' {} Any) diff --git a/stdlib/source/lux/language/module.lux b/stdlib/source/lux/language/module.lux index 41ae7877e..051e7cd12 100644 --- a/stdlib/source/lux/language/module.lux +++ b/stdlib/source/lux/language/module.lux @@ -3,10 +3,10 @@ (lux (control [monad (#+ do)] ["ex" exception (#+ exception:)] pipe) - (data [text "text/" Equivalence<Text>] + (data [text ("text/" Equivalence<Text>)] text/format ["e" error] - (collection [list "list/" Fold<List> Functor<List>] + (collection [list ("list/" Fold<List> Functor<List>)] (dictionary [plist]))) [macro]) [//compiler] diff --git a/stdlib/source/lux/language/scope.lux b/stdlib/source/lux/language/scope.lux index 563007dfe..e6db7d4bf 100644 --- a/stdlib/source/lux/language/scope.lux +++ b/stdlib/source/lux/language/scope.lux @@ -1,12 +1,12 @@ (.module: lux (lux (control monad) - (data [text "text/" Equivalence<Text>] + (data [text ("text/" Equivalence<Text>)] text/format - [maybe "maybe/" Monad<Maybe>] + [maybe ("maybe/" Monad<Maybe>)] [product] ["e" error] - (collection [list "list/" Functor<List> Fold<List> Monoid<List>] + (collection [list ("list/" Functor<List> Fold<List> Monoid<List>)] (dictionary [plist]))) [macro]) [//reference (#+ Register Variable)]) diff --git a/stdlib/source/lux/language/syntax.lux b/stdlib/source/lux/language/syntax.lux index 6a92a7888..5c1d5e48c 100644 --- a/stdlib/source/lux/language/syntax.lux +++ b/stdlib/source/lux/language/syntax.lux @@ -27,7 +27,7 @@ (.module: [lux (#- nat int rev)] (lux (control monad - ["p" parser "p/" Monad<Parser>] + ["p" parser ("parser/" Monad<Parser>)] ["ex" exception (#+ exception:)]) (data ["e" error] [number] @@ -197,7 +197,7 @@ (def: rich-digit (l.Lexer Text) (p.either l.decimal - (p.after (l.this "_") (p/wrap "")))) + (p.after (l.this "_") (parser/wrap "")))) (def: rich-digits^ (l.Lexer Text) diff --git a/stdlib/source/lux/language/type.lux b/stdlib/source/lux/language/type.lux index 8fecf55ca..2e8a33245 100644 --- a/stdlib/source/lux/language/type.lux +++ b/stdlib/source/lux/language/type.lux @@ -3,11 +3,11 @@ (lux (control [equivalence (#+ Equivalence)] [monad (#+ do Monad)] ["p" parser]) - (data [text "text/" Monoid<Text> Equivalence<Text>] - [ident "ident/" Equivalence<Ident> Codec<Text,Ident>] - [number "nat/" Codec<Text,Nat>] + (data [text ("text/" Monoid<Text> Equivalence<Text>)] + [ident ("ident/" Equivalence<Ident> Codec<Text,Ident>)] + [number ("nat/" Codec<Text,Nat>)] [maybe] - (collection [list "list/" Functor<List> Monoid<List> Fold<List>])) + (collection [list ("list/" Functor<List> Monoid<List> Fold<List>)])) [macro] (macro [code] ["s" syntax (#+ Syntax syntax:)]) diff --git a/stdlib/source/lux/language/type/check.lux b/stdlib/source/lux/language/type/check.lux index b0bfbd643..197d32d0e 100644 --- a/stdlib/source/lux/language/type/check.lux +++ b/stdlib/source/lux/language/type/check.lux @@ -4,14 +4,14 @@ [apply (#+ Apply)] [monad (#+ do Monad)] ["ex" exception (#+ exception:)]) - (data [text "text/" Monoid<Text> Equivalence<Text>] - [number "nat/" Codec<Text,Nat>] + (data [text ("text/" Monoid<Text> Equivalence<Text>)] + [number ("nat/" Codec<Text,Nat>)] [maybe] [product] (collection [list] [set (#+ Set)]) ["e" error]) - (language [type "type/" Equivalence<Type>]) + (language [type ("type/" Equivalence<Type>)]) )) (exception: #export (unknown-type-var {id Nat}) diff --git a/stdlib/source/lux/macro.lux b/stdlib/source/lux/macro.lux index b1a170079..70f9b5116 100644 --- a/stdlib/source/lux/macro.lux +++ b/stdlib/source/lux/macro.lux @@ -3,13 +3,13 @@ (lux (control [functor (#+ Functor)] [apply (#+ Apply)] [monad (#+ do Monad)]) - (data [number "nat/" Codec<Text,Nat>] + (data [number ("nat/" Codec<Text,Nat>)] [product] - [ident "ident/" Codec<Text,Ident> Equivalence<Ident>] + [ident ("ident/" Codec<Text,Ident> Equivalence<Ident>)] [maybe] ["e" error] - [text "text/" Monoid<Text> Equivalence<Text>] - (collection [list "list/" Monoid<List> Monad<List>]))) + [text ("text/" Monoid<Text> Equivalence<Text>)] + (collection [list ("list/" Monoid<List> Monad<List>)]))) (/ [code])) ## (type: (Meta a) diff --git a/stdlib/source/lux/macro/code.lux b/stdlib/source/lux/macro/code.lux index f16229460..47bbe24cc 100644 --- a/stdlib/source/lux/macro/code.lux +++ b/stdlib/source/lux/macro/code.lux @@ -3,9 +3,9 @@ (lux (control [equivalence (#+ Equivalence)]) (data bool number - [text (#+ Equivalence<Text>) "text/" Monoid<Text>] + [text (#+ Equivalence<Text>) ("text/" Monoid<Text>)] ident - (collection [list #* "" Functor<List> Fold<List>]) + (collection [list #* ("list/" Functor<List> Fold<List>)]) ))) ## [Types] @@ -74,19 +74,19 @@ (^template [<tag>] [[_ (<tag> xs')] [_ (<tag> ys')]] (and (:: Equivalence<Nat> = (size xs') (size ys')) - (fold (function (_ [x' y'] old) - (and old (= x' y'))) - true - (zip2 xs' ys')))) + (list/fold (function (_ [x' y'] old) + (and old (= x' y'))) + true + (zip2 xs' ys')))) ([#.Form] [#.Tuple]) [[_ (#.Record xs')] [_ (#.Record ys')]] (and (:: Equivalence<Nat> = (size xs') (size ys')) - (fold (function (_ [[xl' xr'] [yl' yr']] old) - (and old (= xl' yl') (= xr' yr'))) - true - (zip2 xs' ys'))) + (list/fold (function (_ [[xl' xr'] [yl' yr']] old) + (and old (= xl' yl') (= xr' yr'))) + true + (zip2 xs' ys'))) _ false))) @@ -113,12 +113,12 @@ (^template [<tag> <open> <close>] [_ (<tag> members)] - ($_ text/compose <open> (|> members (map to-text) (interpose " ") (text.join-with "")) <close>)) + ($_ text/compose <open> (|> members (list/map to-text) (interpose " ") (text.join-with "")) <close>)) ([#.Form "(" ")"] [#.Tuple "[" "]"]) [_ (#.Record pairs)] - ($_ text/compose "{" (|> pairs (map (function (_ [left right]) ($_ text/compose (to-text left) " " (to-text right)))) (interpose " ") (text.join-with "")) "}") + ($_ text/compose "{" (|> pairs (list/map (function (_ [left right]) ($_ text/compose (to-text left) " " (to-text right)))) (interpose " ") (text.join-with "")) "}") )) (def: #export (replace original substitute ast) @@ -129,15 +129,15 @@ (case ast (^template [<tag>] [cursor (<tag> parts)] - [cursor (<tag> (map (replace original substitute) parts))]) + [cursor (<tag> (list/map (replace original substitute) parts))]) ([#.Form] [#.Tuple]) [cursor (#.Record parts)] - [cursor (#.Record (map (function (_ [left right]) - [(replace original substitute left) - (replace original substitute right)]) - parts))] + [cursor (#.Record (list/map (function (_ [left right]) + [(replace original substitute left) + (replace original substitute right)]) + parts))] _ ast))) diff --git a/stdlib/source/lux/macro/poly.lux b/stdlib/source/lux/macro/poly.lux index 82a18b66a..dad765eff 100644 --- a/stdlib/source/lux/macro/poly.lux +++ b/stdlib/source/lux/macro/poly.lux @@ -5,14 +5,14 @@ ["p" parser] ["ex" exception (#+ exception:)]) [function] - (data [text "text/" Monoid<Text>] - (collection [list "list/" Fold<List> Monad<List> Monoid<List>] + (data [text ("text/" Monoid<Text>)] + (collection [list ("list/" Fold<List> Monad<List> Monoid<List>)] ["dict" dictionary (#+ Dictionary)]) - [number "nat/" Codec<Text,Nat>] + [number ("nat/" Codec<Text,Nat>)] [product] [bool] [maybe] - [ident "ident/" Equivalence<Ident> Codec<Text,Ident>] + [ident ("ident/" Equivalence<Ident> Codec<Text,Ident>)] ["e" error]) [macro (#+ with-gensyms)] (macro [code] @@ -20,7 +20,7 @@ (syntax ["cs" common] (common ["csr" reader] ["csw" writer]))) - (language [type "type/" Equivalence<Type>] + (language [type ("type/" Equivalence<Type>)] (type [check])) )) diff --git a/stdlib/source/lux/macro/poly/equivalence.lux b/stdlib/source/lux/macro/poly/equivalence.lux index e79c20ea6..c8d079935 100644 --- a/stdlib/source/lux/macro/poly/equivalence.lux +++ b/stdlib/source/lux/macro/poly/equivalence.lux @@ -3,16 +3,16 @@ (lux (control [monad (#+ do Monad)] ["eq" equivalence] ["p" parser]) - (data [text "text/" Monoid<Text>] + (data [text ("text/" Monoid<Text>)] text/format - (collection [list "list/" Monad<List>] + (collection [list ("list/" Monad<List>)] [row] [array] [queue] [set] ["dict" dictionary (#+ Dictionary)] (tree [rose])) - [number "nat/" Codec<Text,Nat>] + [number ("nat/" Codec<Text,Nat>)] [product] [bool] [maybe]) diff --git a/stdlib/source/lux/macro/poly/functor.lux b/stdlib/source/lux/macro/poly/functor.lux index bc80ba646..dda9112da 100644 --- a/stdlib/source/lux/macro/poly/functor.lux +++ b/stdlib/source/lux/macro/poly/functor.lux @@ -5,7 +5,7 @@ ["p" parser]) (data [text] text/format - (collection [list "L/" Monad<List> Monoid<List>]) + (collection [list ("list/" Monad<List> Monoid<List>)]) [product]) [macro] (macro [code] @@ -29,7 +29,7 @@ (function (_ unwrappedT) (if (n/= +1 num-vars) (` ((~! functor.Functor) (~ (poly.to-code *env* unwrappedT)))) - (let [paramsC (|> num-vars dec list.indices (L/map (|>> %n code.local-symbol)))] + (let [paramsC (|> num-vars dec list.indices (list/map (|>> %n code.local-symbol)))] (` (All [(~+ paramsC)] ((~! functor.Functor) ((~ (poly.to-code *env* unwrappedT)) (~+ paramsC))))))))) Arg<?> (: (-> Code (poly.Poly Code)) @@ -45,10 +45,10 @@ [_ (wrap []) membersC (poly.variant (p.many (Arg<?> valueC)))] (wrap (` (case (~ valueC) - (~+ (L/join (L/map (function (_ [tag memberC]) - (list (` ((~ (code.nat tag)) (~ valueC))) - (` ((~ (code.nat tag)) (~ memberC))))) - (list.enumerate membersC)))))))) + (~+ (list/join (list/map (function (_ [tag memberC]) + (list (` ((~ (code.nat tag)) (~ valueC))) + (` ((~ (code.nat tag)) (~ memberC))))) + (list.enumerate membersC)))))))) ## Tuples (do p.Monad<Parser> [pairsCC (: (poly.Poly (List [Code Code])) @@ -60,11 +60,11 @@ [_ (wrap []) memberC (Arg<?> slotC)] (recur (inc idx) - (L/compose pairsCC (list [slotC memberC]))))) + (list/compose pairsCC (list [slotC memberC]))))) (wrap pairsCC)))))] (wrap (` (case (~ valueC) - [(~+ (L/map product.left pairsCC))] - [(~+ (L/map product.right pairsCC))])))) + [(~+ (list/map product.left pairsCC))] + [(~+ (list/map product.right pairsCC))])))) ## Functions (do @ [_ (wrap []) @@ -74,7 +74,7 @@ (Arg<?> outL)) #let [inC+ (|> (list.size inT+) dec (list.n/range +0) - (L/map (|>> %n (format "____________inC") code.local-symbol)))]] + (list/map (|>> %n (format "____________inC") code.local-symbol)))]] (wrap (` (function ((~ g!) (~+ inC+)) (let [(~ outL) ((~ valueC) (~+ inC+))] (~ outC)))))) diff --git a/stdlib/source/lux/macro/poly/json.lux b/stdlib/source/lux/macro/poly/json.lux index 32ccc001e..f27089c94 100644 --- a/stdlib/source/lux/macro/poly/json.lux +++ b/stdlib/source/lux/macro/poly/json.lux @@ -3,19 +3,19 @@ (lux (control [monad (#+ do Monad)] [equivalence (#+ Equivalence)] codec - ["p" parser "p/" Monad<Parser>]) + ["p" parser]) (data [bool] [bit] - [text "text/" Equivalence<Text>] + [text ("text/" Equivalence<Text>)] (text ["l" lexer] format) - [number "frac/" Codec<Text,Frac> "nat/" Codec<Text,Nat>] + [number ("frac/" Codec<Text,Frac>) ("nat/" Codec<Text,Nat>)] maybe ["e" error] [sum] [product] - (collection [list "list/" Fold<List> Monad<List>] - [row (#+ Row row) "row/" Monad<Row>] + (collection [list ("list/" Fold<List> Monad<List>)] + [row (#+ Row row) ("row/" Monad<Row>)] ["d" dictionary]) (format ["//" json (#+ JSON)])) (time ## ["i" instant] diff --git a/stdlib/source/lux/macro/syntax.lux b/stdlib/source/lux/macro/syntax.lux index f689de0f6..bb7c8aa3e 100644 --- a/stdlib/source/lux/macro/syntax.lux +++ b/stdlib/source/lux/macro/syntax.lux @@ -6,12 +6,12 @@ ["p" parser]) (data [bool] [number] - [text "text/" Monoid<Text>] + [text ("text/" Monoid<Text>)] [ident] - (collection [list "list/" Functor<List>]) + (collection [list ("list/" Functor<List>)]) [maybe] [error (#+ Error)])) - (// [code "code/" Equivalence<Code>])) + (// [code ("code/" Equivalence<Code>)])) ## [Utils] (def: (join-pairs pairs) diff --git a/stdlib/source/lux/macro/syntax/common/reader.lux b/stdlib/source/lux/macro/syntax/common/reader.lux index 63b185bd8..a1b9ceb70 100644 --- a/stdlib/source/lux/macro/syntax/common/reader.lux +++ b/stdlib/source/lux/macro/syntax/common/reader.lux @@ -1,9 +1,9 @@ (.module: {#.doc "Commons syntax readers."} lux (lux (control monad - ["p" parser "p/" Monad<Parser>]) + ["p" parser ("parser/" Monad<Parser>)]) (data (collection [list]) - [ident "ident/" Equivalence<Ident>] + [ident ("ident/" Equivalence<Ident>)] [product] [maybe]) [macro] @@ -13,8 +13,8 @@ ## Exports (def: #export export (Syntax Bool) - (p.either (p.after (s.this (' #export)) (p/wrap true)) - (p/wrap false))) + (p.either (p.after (s.this (' #export)) (parser/wrap true)) + (parser/wrap false))) ## Declarations (def: #export declaration @@ -24,7 +24,7 @@ (foo bar baz))} (Syntax //.Declaration) (p.either (p.seq s.local-symbol - (p/wrap (list))) + (parser/wrap (list))) (s.form (p.seq s.local-symbol (p.many s.local-symbol))))) @@ -42,7 +42,7 @@ type s.any value s.any] (wrap [(#.Some type) value]))) - (p.seq (p/wrap #.None) + (p.seq (parser/wrap #.None) s.any))) (def: _definition-anns-tag^ diff --git a/stdlib/source/lux/macro/syntax/common/writer.lux b/stdlib/source/lux/macro/syntax/common/writer.lux index 06edd114a..8bf1dadf7 100644 --- a/stdlib/source/lux/macro/syntax/common/writer.lux +++ b/stdlib/source/lux/macro/syntax/common/writer.lux @@ -1,7 +1,7 @@ (.module: {#.doc "Commons syntax writers."} lux - (lux (data (collection [list "list/" Functor<List>]) + (lux (data (collection [list ("list/" Functor<List>)]) [product]) (macro [code])) [//]) diff --git a/stdlib/source/lux/math.lux b/stdlib/source/lux/math.lux index d0e07f051..ca2b30a85 100644 --- a/stdlib/source/lux/math.lux +++ b/stdlib/source/lux/math.lux @@ -1,10 +1,10 @@ (.module: {#.doc "Common mathematical constants and functions."} lux (lux (control monad - ["p" parser "p/" Functor<Parser>]) + ["p" parser ("parser/" Functor<Parser>)]) (data [product] [number] - (collection [list "L/" Fold<List>])) + (collection [list ("list/" Fold<List>)])) [macro] (macro ["s" syntax (#+ syntax: Syntax)] [code]))) @@ -190,14 +190,14 @@ (<| p.rec (function (_ infix^)) ($_ p.alt ($_ p.either - (p/map code.bool s.bool) - (p/map code.nat s.nat) - (p/map code.int s.int) - (p/map code.rev s.rev) - (p/map code.frac s.frac) - (p/map code.text s.text) - (p/map code.symbol s.symbol) - (p/map code.tag s.tag)) + (parser/map code.bool s.bool) + (parser/map code.nat s.nat) + (parser/map code.int s.int) + (parser/map code.rev s.rev) + (parser/map code.frac s.frac) + (parser/map code.text s.text) + (parser/map code.symbol s.symbol) + (parser/map code.tag s.tag)) (s.form (p.many s.any)) (s.tuple (p.seq s.any infix^)) (s.tuple ($_ p.either @@ -207,21 +207,21 @@ init-op s.any init-param infix^ steps (p.some (p.seq s.any infix^))] - (wrap (product.right (L/fold (function (_ [op param] [subject [_subject _op _param]]) - [param [(#Binary _subject _op _param) - (` and) - (#Binary subject op param)]]) - [init-param [init-subject init-op init-param]] - steps)))) + (wrap (product.right (list/fold (function (_ [op param] [subject [_subject _op _param]]) + [param [(#Binary _subject _op _param) + (` and) + (#Binary subject op param)]]) + [init-param [init-subject init-op init-param]] + steps)))) (do p.Monad<Parser> [init-subject infix^ init-op s.any init-param infix^ steps (p.some (p.seq s.any infix^))] - (wrap (L/fold (function (_ [op param] [_subject _op _param]) - [(#Binary _subject _op _param) op param]) - [init-subject init-op init-param] - steps))) + (wrap (list/fold (function (_ [op param] [_subject _op _param]) + [(#Binary _subject _op _param) op param]) + [init-subject init-op init-param] + steps))) )) ))) diff --git a/stdlib/source/lux/math/logic/continuous.lux b/stdlib/source/lux/math/logic/continuous.lux index 9665f2561..36c3d158d 100644 --- a/stdlib/source/lux/math/logic/continuous.lux +++ b/stdlib/source/lux/math/logic/continuous.lux @@ -1,9 +1,9 @@ (.module: lux - (lux (data [number "Rev/" Interval<Rev>]))) + (lux (data [number ("rev/" Interval<Rev>)]))) -(def: #export ~true Rev Rev/top) -(def: #export ~false Rev Rev/bottom) +(def: #export ~true Rev rev/top) +(def: #export ~false Rev rev/bottom) (do-template [<name> <chooser>] [(def: #export <name> diff --git a/stdlib/source/lux/math/modular.lux b/stdlib/source/lux/math/modular.lux index d6f5fd4b7..197bd4d20 100644 --- a/stdlib/source/lux/math/modular.lux +++ b/stdlib/source/lux/math/modular.lux @@ -5,8 +5,8 @@ [codec (#+ Codec)] [monad (#+ do)]) (data ["e" error (#+ Error)] - [number "int/" Codec<Text,Int>] - [text "text/" Monoid<Text>] + [number ("int/" Codec<Text,Int>)] + [text ("text/" Monoid<Text>)] (text ["l" lexer (#+ Lexer)])) (type abstract) (macro [code] diff --git a/stdlib/source/lux/math/random.lux b/stdlib/source/lux/math/random.lux index e9892d432..129f1b6e0 100644 --- a/stdlib/source/lux/math/random.lux +++ b/stdlib/source/lux/math/random.lux @@ -5,14 +5,14 @@ [monad (#+ do Monad)] hash) (data [bit] - [text "text/" Monoid<Text>] + [text ("text/" Monoid<Text>)] (text [unicode (#+ Char Segment)]) [product] [maybe] [number (#+ hex)] (number ["r" ratio] ["c" complex]) - (collection [list "list/" Fold<List>] + (collection [list ("list/" Fold<List>)] [array] ["dict" dictionary (#+ Dictionary)] [queue (#+ Queue)] diff --git a/stdlib/source/lux/test.lux b/stdlib/source/lux/test.lux index d2cad6211..c39f7f30d 100644 --- a/stdlib/source/lux/test.lux +++ b/stdlib/source/lux/test.lux @@ -11,7 +11,7 @@ ["e" error] [text] text/format - (collection [list "list/" Monad<List> Fold<List>])) + (collection [list ("list/" Monad<List> Fold<List>)])) [io (#+ IO io)] (time [instant] [duration]) diff --git a/stdlib/source/lux/time/date.lux b/stdlib/source/lux/time/date.lux index 046b3cd20..0f123c2d7 100644 --- a/stdlib/source/lux/time/date.lux +++ b/stdlib/source/lux/time/date.lux @@ -8,8 +8,8 @@ [monad (#+ do)]) (data ["e" error] [maybe] - [number "int/" Codec<Text,Int>] - [text "text/" Monoid<Text>] + [number ("int/" Codec<Text,Int>)] + [text ("text/" Monoid<Text>)] (text ["l" lexer]) (collection [row (#+ Row row)])))) diff --git a/stdlib/source/lux/time/duration.lux b/stdlib/source/lux/time/duration.lux index 231b949c7..3585c35b1 100644 --- a/stdlib/source/lux/time/duration.lux +++ b/stdlib/source/lux/time/duration.lux @@ -6,8 +6,8 @@ [monoid (#+ Monoid)] ["p" parser] [monad (#+ do)]) - (data [number "int/" Codec<Text,Int> Number<Int>] - [text "text/" Monoid<Text>] + (data [number ("int/" Codec<Text,Int> Number<Int>)] + [text ("text/" Monoid<Text>)] (text ["l" lexer]) ["e" error]) (type abstract))) diff --git a/stdlib/source/lux/time/instant.lux b/stdlib/source/lux/time/instant.lux index 727407a57..86c27f8f4 100644 --- a/stdlib/source/lux/time/instant.lux +++ b/stdlib/source/lux/time/instant.lux @@ -7,15 +7,15 @@ codec [monad (#+ do Monad)] ["p" parser]) - (data [text "text/" Monoid<Text>] + (data [text ("text/" Monoid<Text>)] (text ["l" lexer]) - [number "int/" Codec<Text,Int>] + [number ("int/" Codec<Text,Int>)] ["e" error] [maybe] - (collection [list "L/" Fold<List> Functor<List>] - [row (#+ Row row) "row/" Functor<Row> Fold<Row>])) + (collection [list ("list/" Fold<List>)] + [row (#+ Row row) ("row/" Functor<Row> Fold<Row>)])) (type abstract)) - (// [duration "duration/" Order<Duration>] + (// [duration ("duration/" Order<Duration>)] [date])) (abstract: #export Instant @@ -283,7 +283,7 @@ month-days-so-far (|> months row.to-list (list.take (.nat (dec utc-month))) - (L/fold n/+ +0)) + (list/fold n/+ +0)) total-days (|> year-days-so-far (i/+ (.int month-days-so-far)) (i/+ (dec utc-day)))]] diff --git a/stdlib/source/lux/type/abstract.lux b/stdlib/source/lux/type/abstract.lux index 226ce491a..76c8f78dd 100644 --- a/stdlib/source/lux/type/abstract.lux +++ b/stdlib/source/lux/type/abstract.lux @@ -2,10 +2,10 @@ lux (lux (control [monad (#+ do Monad)] ["p" parser]) - (data [text "text/" Equivalence<Text> Monoid<Text>] + (data [text ("text/" Equivalence<Text> Monoid<Text>)] [error] - (collection [list "list/" Functor<List> Monoid<List>])) - [macro "meta/" Monad<Meta>] + (collection [list ("list/" Functor<List> Monoid<List>)])) + [macro ("meta/" Monad<Meta>)] (macro [code] ["s" syntax (#+ syntax:)] (syntax ["cs" common] diff --git a/stdlib/source/lux/type/implicit.lux b/stdlib/source/lux/type/implicit.lux index 94b81f409..38ffde58e 100644 --- a/stdlib/source/lux/type/implicit.lux +++ b/stdlib/source/lux/type/implicit.lux @@ -3,10 +3,10 @@ (lux (control [monad (#+ do Monad)] ["eq" equivalence] ["p" parser]) - (data [text "text/" Equivalence<Text>] + (data [text ("text/" Equivalence<Text>)] text/format [number] - (collection [list "list/" Monad<List> Fold<List>] + (collection [list ("list/" Monad<List> Fold<List>)] ["dict" dictionary (#+ Dictionary)]) [bool] [product] diff --git a/stdlib/source/lux/type/object/interface.lux b/stdlib/source/lux/type/object/interface.lux index 8ff12d167..fe5b80b8b 100644 --- a/stdlib/source/lux/type/object/interface.lux +++ b/stdlib/source/lux/type/object/interface.lux @@ -1,15 +1,15 @@ (.module: lux (lux (control [monad (#+ do Monad)] - ["p" parser "p/" Monad<Parser>]) + ["p" parser ("parser/" Monad<Parser>)]) (data [text] text/format [product] [maybe] - [ident "ident/" Equivalence<Ident>] - (collection [list "list/" Functor<List> Fold<List> Monoid<List>] + [ident ("ident/" Equivalence<Ident>)] + (collection [list ("list/" Functor<List> Fold<List> Monoid<List>)] [set (#+ Set)])) - [macro (#+ Monad<Meta>) "meta/" Monad<Meta>] + [macro (#+ Monad<Meta>) ("meta/" Monad<Meta>)] (macro [code] ["s" syntax (#+ syntax:)] (syntax ["cs" common] @@ -51,7 +51,7 @@ (p.either (s.form (p.seq s.local-symbol (unique-type-vars (p.some s.local-symbol)))) (p.seq s.local-symbol - (p/wrap (list))))) + (parser/wrap (list))))) (def: aliasS (s.Syntax Alias) @@ -79,7 +79,7 @@ (-> (Set Text) (s.Syntax Method)) (s.form ($_ p.seq (p.either (unique-type-vars (s.tuple (p.some (safe-type-vars exclusions)))) - (p/wrap (list))) + (parser/wrap (list))) s.local-symbol (s.tuple (p.some s.any)) s.any))) @@ -195,7 +195,7 @@ (p.either (s.form (p.seq s.symbol (p.some s.any))) (p.seq s.symbol - (p/wrap (list))))) + (parser/wrap (list))))) (do-template [<name> <keyword>] [(def: <name> diff --git a/stdlib/source/lux/type/object/protocol.lux b/stdlib/source/lux/type/object/protocol.lux index 87c7d4207..1bd88a424 100644 --- a/stdlib/source/lux/type/object/protocol.lux +++ b/stdlib/source/lux/type/object/protocol.lux @@ -3,8 +3,8 @@ (lux (control ["p" parser] [monad (#+ do)]) (data [sum] - (collection [list "list/" Functor<List>])) - [macro "meta/" Monad<Meta>] + (collection [list ("list/" Functor<List>)])) + [macro ("meta/" Monad<Meta>)] (macro [code] ["s" syntax (#+ syntax:)] (syntax ["cs" common] diff --git a/stdlib/source/lux/type/refinement.lux b/stdlib/source/lux/type/refinement.lux index 3652764d4..4b14b5a36 100644 --- a/stdlib/source/lux/type/refinement.lux +++ b/stdlib/source/lux/type/refinement.lux @@ -4,7 +4,7 @@ [monad (#+ do)] ["p" parser]) (data ["e" error (#+ Error)]) - (language [type "type/" Equivalence<Type>]) + (language [type ("type/" Equivalence<Type>)]) (type abstract) [macro] (macro ["s" syntax (#+ syntax:)] diff --git a/stdlib/source/lux/type/resource.lux b/stdlib/source/lux/type/resource.lux index f01ce53c9..674a00eec 100644 --- a/stdlib/source/lux/type/resource.lux +++ b/stdlib/source/lux/type/resource.lux @@ -12,7 +12,7 @@ (collection ["dict" dictionary (#+ Dictionary)] [set] [row (#+ Row)] - [list "list/" Functor<List> Fold<List>])) + [list ("list/" Functor<List> Fold<List>)])) (concurrency [promise (#+ Promise)]) [macro] (macro ["s" syntax (#+ Syntax syntax:)]) diff --git a/stdlib/test/test/lux.lux b/stdlib/test/test/lux.lux index 4afb041fe..538a70b30 100644 --- a/stdlib/test/test/lux.lux +++ b/stdlib/test/test/lux.lux @@ -6,7 +6,7 @@ ["r" math/random] (data [maybe] [bit] - [text "text/" Equivalence<Text>] + [text ("text/" Equivalence<Text>)] text/format) [macro] (macro ["s" syntax (#+ syntax:)]))) diff --git a/stdlib/test/test/lux/cli.lux b/stdlib/test/test/lux/cli.lux index f52f0d498..fc9ffa280 100644 --- a/stdlib/test/test/lux/cli.lux +++ b/stdlib/test/test/lux/cli.lux @@ -8,7 +8,7 @@ [sum] ["E" error] [number] - [text "text/" Equivalence<Text>] + [text ("text/" Equivalence<Text>)] text/format (collection [list])) ["r" math/random] diff --git a/stdlib/test/test/lux/concurrency/actor.lux b/stdlib/test/test/lux/concurrency/actor.lux index 54f60b740..7895350e6 100644 --- a/stdlib/test/test/lux/concurrency/actor.lux +++ b/stdlib/test/test/lux/concurrency/actor.lux @@ -6,7 +6,7 @@ (data [number] text/format ["e" error]) - (concurrency ["P" promise "P/" Monad<Promise>] + (concurrency ["P" promise ("promise/" Monad<Promise>)] ["T" task] ["&" actor (#+ actor: message:)])) lux/test) @@ -22,9 +22,9 @@ (wrap output))) ((stop cause state) - (P/wrap (log! (if (ex.match? &.poisoned cause) - (format "Counter was poisoned: " (%n state)) - cause))))) + (promise/wrap (log! (if (ex.match? &.poisoned cause) + (format "Counter was poisoned: " (%n state)) + cause))))) (message: #export Counter (count! {increment Nat} state self Nat) diff --git a/stdlib/test/test/lux/concurrency/frp.lux b/stdlib/test/test/lux/concurrency/frp.lux index 6996997f1..637892e3b 100644 --- a/stdlib/test/test/lux/concurrency/frp.lux +++ b/stdlib/test/test/lux/concurrency/frp.lux @@ -5,7 +5,7 @@ (data [number] text/format (collection [list])) - (concurrency [promise "promise/" Monad<Promise>] + (concurrency [promise ("promise/" Monad<Promise>)] [frp (#+ Channel)] [atom (#+ Atom atom)])) lux/test) diff --git a/stdlib/test/test/lux/concurrency/promise.lux b/stdlib/test/test/lux/concurrency/promise.lux index 77f69dd46..b6540c145 100644 --- a/stdlib/test/test/lux/concurrency/promise.lux +++ b/stdlib/test/test/lux/concurrency/promise.lux @@ -5,7 +5,7 @@ pipe) (data [number] text/format) - (concurrency ["&" promise "&/" Monad<Promise>]) + (concurrency ["&" promise ("&/" Monad<Promise>)]) ["r" math/random]) lux/test) diff --git a/stdlib/test/test/lux/concurrency/semaphore.lux b/stdlib/test/test/lux/concurrency/semaphore.lux index 6eb1752a6..c09b48545 100644 --- a/stdlib/test/test/lux/concurrency/semaphore.lux +++ b/stdlib/test/test/lux/concurrency/semaphore.lux @@ -2,9 +2,9 @@ lux (lux (control [monad (#+ do)]) (data [maybe] - [text "text/" Equivalence<Text> Monoid<Text>] + [text ("text/" Equivalence<Text> Monoid<Text>)] text/format - (collection [list "list/" Functor<List>])) + (collection [list ("list/" Functor<List>)])) (concurrency ["/" semaphore] [promise (#+ Promise)] [atom (#+ Atom)]) diff --git a/stdlib/test/test/lux/concurrency/stm.lux b/stdlib/test/test/lux/concurrency/stm.lux index a9c9f4420..c2d2dc8c0 100644 --- a/stdlib/test/test/lux/concurrency/stm.lux +++ b/stdlib/test/test/lux/concurrency/stm.lux @@ -4,7 +4,7 @@ (control ["M" monad (#+ do Monad)]) (data [number] [maybe] - (collection [list "" Functor<List>]) + (collection [list ("list/" Functor<List>)]) text/format) (concurrency [atom (#+ Atom atom)] ["&" stm] @@ -61,10 +61,10 @@ (do promise.Monad<Promise> [_ (|> promise.parallelism (list.n/range +1) - (map (function (_ _) - (|> iterations-per-process - (list.n/range +1) - (M.map @ (function (_ _) (&.commit (&.update inc _concurrency-var))))))) + (list/map (function (_ _) + (|> iterations-per-process + (list.n/range +1) + (M.map @ (function (_ _) (&.commit (&.update inc _concurrency-var))))))) (M.seq @)) last-val (&.commit (&.read _concurrency-var))] (assert "Can modify STM vars concurrently from multiple threads." diff --git a/stdlib/test/test/lux/control/continuation.lux b/stdlib/test/test/lux/control/continuation.lux index 0df6d497d..cc8297cd7 100644 --- a/stdlib/test/test/lux/control/continuation.lux +++ b/stdlib/test/test/lux/control/continuation.lux @@ -1,12 +1,8 @@ (.module: lux - (lux [io] - (control ["M" monad (#+ do Monad)] + (lux (control ["M" monad (#+ do Monad)] ["&" continuation]) - (data [text "Text/" Monoid<Text>] - text/format - [number] - [product] + (data [number] (collection [list])) ["r" math/random]) lux/test) diff --git a/stdlib/test/test/lux/control/parser.lux b/stdlib/test/test/lux/control/parser.lux index 1f8e8ce73..805ec3126 100644 --- a/stdlib/test/test/lux/control/parser.lux +++ b/stdlib/test/test/lux/control/parser.lux @@ -1,16 +1,10 @@ (.module: lux (lux [io] - (control ["M" monad (#+ do Monad)] + (control ["M" monad (#+ do)] [equivalence (#+ Equivalence)] - ["&" parser] - pipe) - (data [text "Text/" Monoid<Text>] - text/format - [number] - [bool] - [ident] - ["E" error]) + ["&" parser]) + (data [error (#+ Error)]) ["r" math/random] [macro] (macro [code] @@ -19,15 +13,15 @@ ## [Utils] (def: (should-fail input) - (All [a] (-> (E.Error a) Bool)) + (All [a] (-> (Error a) Bool)) (case input - (#E.Error _) true - _ false)) + (#error.Error _) true + _ false)) (def: (enforced? parser input) (All [s] (-> (&.Parser s Any) s Bool)) (case (&.run input parser) - (#E.Success [_ []]) + (#error.Success [_ []]) true _ @@ -36,16 +30,16 @@ (def: (found? parser input) (All [s] (-> (&.Parser s Bool) s Bool)) (case (&.run input parser) - (#E.Success [_ true]) + (#error.Success [_ true]) true _ false)) (def: (fails? input) - (All [a] (-> (E.Error a) Bool)) + (All [a] (-> (Error a) Bool)) (case input - (#E.Error _) + (#error.Error _) true _ @@ -53,7 +47,7 @@ (syntax: (match pattern input) (wrap (list (` (case (~ input) - (^ (#E.Success [(~' _) (~ pattern)])) + (^ (#error.Success [(~' _) (~ pattern)])) true (~' _) diff --git a/stdlib/test/test/lux/control/pipe.lux b/stdlib/test/test/lux/control/pipe.lux index 081c4d308..317501109 100644 --- a/stdlib/test/test/lux/control/pipe.lux +++ b/stdlib/test/test/lux/control/pipe.lux @@ -7,7 +7,7 @@ [number] [product] identity - [text "text/" Equivalence<Text>]) + [text ("text/" Equivalence<Text>)]) ["r" math/random]) lux/test) diff --git a/stdlib/test/test/lux/control/reader.lux b/stdlib/test/test/lux/control/reader.lux index 82fbb71c1..5259d1e51 100644 --- a/stdlib/test/test/lux/control/reader.lux +++ b/stdlib/test/test/lux/control/reader.lux @@ -1,12 +1,9 @@ (.module: lux (lux [io] - (control [monad (#+ do Monad)] + (control [monad (#+ do)] pipe - ["&" reader]) - (data [text "Text/" Monoid<Text>] - text/format - [number])) + ["&" reader])) lux/test) (context: "Readers" diff --git a/stdlib/test/test/lux/control/state.lux b/stdlib/test/test/lux/control/state.lux index 72fa13273..59f424be3 100644 --- a/stdlib/test/test/lux/control/state.lux +++ b/stdlib/test/test/lux/control/state.lux @@ -4,10 +4,7 @@ (control ["M" monad (#+ do Monad)] pipe ["&" state]) - (data [text "Text/" Monoid<Text>] - text/format - [number] - [product]) + (data [product]) ["r" math/random]) lux/test) diff --git a/stdlib/test/test/lux/control/writer.lux b/stdlib/test/test/lux/control/writer.lux index 1b9cba738..49d6341e7 100644 --- a/stdlib/test/test/lux/control/writer.lux +++ b/stdlib/test/test/lux/control/writer.lux @@ -4,7 +4,7 @@ (control ["M" monad (#+ do Monad)] pipe ["&" writer]) - (data [text "Text/" Monoid<Text> Equivalence<Text>] + (data [text ("text/" Equivalence<Text>)] [number] [product])) lux/test) @@ -28,7 +28,7 @@ (wrap (f a b)))))) (test "Can log any value." - (Text/= "YOLO" (product.left (&.log "YOLO")))) + (text/= "YOLO" (product.left (&.log "YOLO")))) ))) (context: "Monad transformer" diff --git a/stdlib/test/test/lux/data/collection/dictionary.lux b/stdlib/test/test/lux/data/collection/dictionary.lux index 89121c106..db8c6ef5a 100644 --- a/stdlib/test/test/lux/data/collection/dictionary.lux +++ b/stdlib/test/test/lux/data/collection/dictionary.lux @@ -8,7 +8,7 @@ [number] [maybe] (collection ["&" dictionary] - [list "list/" Fold<List> Functor<List>])) + [list ("list/" Fold<List> Functor<List>)])) ["r" math/random]) lux/test) diff --git a/stdlib/test/test/lux/data/collection/dictionary/ordered.lux b/stdlib/test/test/lux/data/collection/dictionary/ordered.lux index a70244160..0c00a18be 100644 --- a/stdlib/test/test/lux/data/collection/dictionary/ordered.lux +++ b/stdlib/test/test/lux/data/collection/dictionary/ordered.lux @@ -8,7 +8,7 @@ (collection ["s" set] ["dict" dictionary] (dictionary ["&" ordered]) - [list "L/" Functor<List>])) + [list ("list/" Functor<List>)])) ["r" math/random]) lux/test) @@ -26,7 +26,7 @@ sorted-pairs (list.sort (function (_ [left _] [right _]) (n/< left right)) pairs) - sorted-values (L/map product.right sorted-pairs) + sorted-values (list/map product.right sorted-pairs) (^open "&/") (&.Equivalence<Dictionary> number.Equivalence<Nat>)]] ($_ seq (test "Can query the size of a dictionary." @@ -60,12 +60,12 @@ (&/= sample))) (test "Order is preserved." - (let [(^open "L/") (list.Equivalence<List> (: (Equivalence [Nat Nat]) - (function (_ [kr vr] [ks vs]) - (and (n/= kr ks) - (n/= vr vs)))))] - (L/= (&.entries sample) - sorted-pairs))) + (let [(^open "list/") (list.Equivalence<List> (: (Equivalence [Nat Nat]) + (function (_ [kr vr] [ks vs]) + (and (n/= kr ks) + (n/= vr vs)))))] + (list/= (&.entries sample) + sorted-pairs))) (test "Every key in a dictionary must be identifiable." (list.every? (function (_ key) (&.contains? key sample)) diff --git a/stdlib/test/test/lux/data/collection/row.lux b/stdlib/test/test/lux/data/collection/row.lux index 0e861f0d8..8833c75d3 100644 --- a/stdlib/test/test/lux/data/collection/row.lux +++ b/stdlib/test/test/lux/data/collection/row.lux @@ -3,7 +3,7 @@ (lux [io] (control [monad (#+ do Monad)]) (data (collection ["&" row] - [list "list/" Fold<List>]) + [list ("list/" Fold<List>)]) [number] [maybe]) ["r" math/random]) diff --git a/stdlib/test/test/lux/data/collection/sequence.lux b/stdlib/test/test/lux/data/collection/sequence.lux index 9f45c36d6..48048216f 100644 --- a/stdlib/test/test/lux/data/collection/sequence.lux +++ b/stdlib/test/test/lux/data/collection/sequence.lux @@ -4,11 +4,11 @@ (control [monad (#+ do Monad)] comonad) (data [maybe] - [text "Text/" Monoid<Text>] + [text ("text/" Monoid<Text>)] text/format (collection [list] ["&" sequence]) - [number "Nat/" Codec<Text,Nat>]) + [number ("nat/" Codec<Text,Nat>)]) ["r" math/random]) lux/test) @@ -86,9 +86,9 @@ (let [(^open "&/") &.Functor<Sequence> (^open "List/") (list.Equivalence<List> text.Equivalence<Text>)] (List/= (&.take size - (&/map Nat/encode (&.iterate inc offset))) + (&/map nat/encode (&.iterate inc offset))) (&.take size - (&.unfold (function (_ n) [(inc n) (Nat/encode n)]) + (&.unfold (function (_ n) [(inc n) (nat/encode n)]) offset))))) (test "Can cycle over the same elements as an infinite sequence." diff --git a/stdlib/test/test/lux/data/collection/set.lux b/stdlib/test/test/lux/data/collection/set.lux index 35a41b06d..41aaa88ff 100644 --- a/stdlib/test/test/lux/data/collection/set.lux +++ b/stdlib/test/test/lux/data/collection/set.lux @@ -3,7 +3,7 @@ (lux [io] (control [monad (#+ do Monad)]) (data (collection ["&" set (#+ Set)] - [list "" Fold<List>]) + [list]) [number]) ["r" math/random]) lux/test) diff --git a/stdlib/test/test/lux/data/collection/set/ordered.lux b/stdlib/test/test/lux/data/collection/set/ordered.lux index ab4cdd8d3..b99d5c225 100644 --- a/stdlib/test/test/lux/data/collection/set/ordered.lux +++ b/stdlib/test/test/lux/data/collection/set/ordered.lux @@ -4,7 +4,7 @@ (control [monad (#+ do Monad)]) (data (collection [set] (set ["&" ordered]) - [list "" Fold<List>]) + [list]) [number] text/format) ["r" math/random]) diff --git a/stdlib/test/test/lux/data/collection/stack.lux b/stdlib/test/test/lux/data/collection/stack.lux index a60cc6004..faebac246 100644 --- a/stdlib/test/test/lux/data/collection/stack.lux +++ b/stdlib/test/test/lux/data/collection/stack.lux @@ -1,10 +1,7 @@ (.module: lux - (lux [io] - (control [monad (#+ do Monad)]) - (data (collection ["&" stack] - [list "" Fold<List>]) - [number] + (lux (control [monad (#+ do)]) + (data (collection ["&" stack]) [maybe]) ["r" math/random]) lux/test) diff --git a/stdlib/test/test/lux/data/collection/tree/rose.lux b/stdlib/test/test/lux/data/collection/tree/rose.lux index 282e1c009..211e0eb12 100644 --- a/stdlib/test/test/lux/data/collection/tree/rose.lux +++ b/stdlib/test/test/lux/data/collection/tree/rose.lux @@ -4,10 +4,10 @@ (control [monad (#+ do Monad)]) (data [product] [number] - [text "T/" Equivalence<Text>] + [text ("text/" Equivalence<Text>)] text/format (collection (tree ["&" rose]) - [list "L/" Monad<List> Fold<List>])) + [list ("list/" Functor<List> Fold<List>)])) ["r" math/random]) lux/test) @@ -20,8 +20,8 @@ [value r.nat num-children (|> r.nat (:: @ map (n/% +3))) children' (r.list num-children gen-tree) - #let [size' (L/fold n/+ +0 (L/map product.left children')) - children (L/map product.right children')]] + #let [size' (list/fold n/+ +0 (list/map product.left children')) + children (list/map product.right children')]] (wrap [(inc size') (&.branch value children)])) )))) @@ -42,6 +42,6 @@ (list.size (&.flatten sample)))) (test "Can fold trees." - (T/= (&/fold concat "" sample) - (L/fold concat "" (&.flatten sample)))) + (text/= (&/fold concat "" sample) + (list/fold concat "" (&.flatten sample)))) )))) diff --git a/stdlib/test/test/lux/data/collection/tree/rose/zipper.lux b/stdlib/test/test/lux/data/collection/tree/rose/zipper.lux index 2a0b1f365..acd24c2c1 100644 --- a/stdlib/test/test/lux/data/collection/tree/rose/zipper.lux +++ b/stdlib/test/test/lux/data/collection/tree/rose/zipper.lux @@ -3,7 +3,7 @@ (lux [io] (control [monad (#+ do Monad)] pipe) - (data (collection [list "list/" Fold<List> Functor<List>] + (data (collection [list ("list/" Fold<List> Functor<List>)] (tree [rose] (rose ["&" zipper]))) [text] diff --git a/stdlib/test/test/lux/data/color.lux b/stdlib/test/test/lux/data/color.lux index c321d26d9..35b0db7d4 100644 --- a/stdlib/test/test/lux/data/color.lux +++ b/stdlib/test/test/lux/data/color.lux @@ -3,7 +3,7 @@ (lux [io] (control [monad (#+ do)]) (data ["@" color] - [number "frac/" Number<Frac>]) + [number ("frac/" Number<Frac>)]) [math] ["r" math/random]) lux/test) diff --git a/stdlib/test/test/lux/data/format/xml.lux b/stdlib/test/test/lux/data/format/xml.lux index 4f14650b3..a96906f88 100644 --- a/stdlib/test/test/lux/data/format/xml.lux +++ b/stdlib/test/test/lux/data/format/xml.lux @@ -4,15 +4,15 @@ (control [monad (#+ do Monad)] ["p" parser] pipe) - (data [text "text/" Equivalence<Text>] + (data [text ("text/" Equivalence<Text>)] text/format [ident] ["E" error] [maybe] (format ["&" xml]) (collection ["dict" dictionary] - [list "list/" Functor<List>])) - ["r" math/random "r/" Monad<Random>] + [list ("list/" Functor<List>)])) + ["r" math/random ("r/" Monad<Random>)] test) ) diff --git a/stdlib/test/test/lux/data/ident.lux b/stdlib/test/test/lux/data/ident.lux index abb8a5d5c..57a6e5f4d 100644 --- a/stdlib/test/test/lux/data/ident.lux +++ b/stdlib/test/test/lux/data/ident.lux @@ -4,7 +4,7 @@ (control [monad (#+ do Monad)] pipe) (data ["&" ident] - [text "text/" Equivalence<Text>] + [text ("text/" Equivalence<Text>)] text/format) ["r" math/random]) lux/test) diff --git a/stdlib/test/test/lux/data/identity.lux b/stdlib/test/test/lux/data/identity.lux index df68144e4..7c82d700c 100644 --- a/stdlib/test/test/lux/data/identity.lux +++ b/stdlib/test/test/lux/data/identity.lux @@ -4,7 +4,7 @@ (control ["M" monad (#+ do Monad)] comonad) (data ["&" identity] - [text "Text/" Monoid<Text> Equivalence<Text>])) + [text ("text/" Monoid<Text> Equivalence<Text>)])) lux/test) (context: "Identity" @@ -13,23 +13,23 @@ (^open "&/") &.CoMonad<Identity>] ($_ seq (test "Functor does not affect values." - (Text/= "yololol" (&/map (Text/compose "yolo") "lol"))) + (text/= "yololol" (&/map (text/compose "yolo") "lol"))) (test "Apply does not affect values." - (and (Text/= "yolo" (&/wrap "yolo")) - (Text/= "yololol" (&/apply (&/wrap (Text/compose "yolo")) (&/wrap "lol"))))) + (and (text/= "yolo" (&/wrap "yolo")) + (text/= "yololol" (&/apply (&/wrap (text/compose "yolo")) (&/wrap "lol"))))) (test "Monad does not affect values." - (Text/= "yololol" (do &.Monad<Identity> - [f (wrap Text/compose) + (text/= "yololol" (do &.Monad<Identity> + [f (wrap text/compose) a (wrap "yolo") b (wrap "lol")] (wrap (f a b))))) (test "CoMonad does not affect values." - (and (Text/= "yololol" (&/unwrap "yololol")) - (Text/= "yololol" (be &.CoMonad<Identity> - [f Text/compose + (and (text/= "yololol" (&/unwrap "yololol")) + (text/= "yololol" (be &.CoMonad<Identity> + [f text/compose a "yolo" b "lol"] (f a b))))) diff --git a/stdlib/test/test/lux/data/maybe.lux b/stdlib/test/test/lux/data/maybe.lux index 188db2b20..19af6ac6a 100644 --- a/stdlib/test/test/lux/data/maybe.lux +++ b/stdlib/test/test/lux/data/maybe.lux @@ -4,7 +4,7 @@ (control ["M" monad (#+ do Monad)] pipe) (data ["&" maybe] - [text "text/" Monoid<Text>] + [text ("text/" Monoid<Text>)] [number])) lux/test) diff --git a/stdlib/test/test/lux/data/number.lux b/stdlib/test/test/lux/data/number.lux index 7cdbe5848..e29521e87 100644 --- a/stdlib/test/test/lux/data/number.lux +++ b/stdlib/test/test/lux/data/number.lux @@ -4,7 +4,7 @@ (control ["M" monad (#+ do Monad)] pipe) (data number - [text "Text/" Monoid<Text> Equivalence<Text>] + [text ("text/" Equivalence<Text>)] text/format) ["r" math/random]) lux/test) @@ -35,11 +35,11 @@ (^open) <Order>]] (test "" (and (>= x (abs x)) ## abs(0.0) == 0.0 && negate(abs(0.0)) == -0.0 - (or (Text/= "Frac" category) + (or (text/= "Frac" category) (not (= x (negate x)))) (= x (negate (negate x))) ## There is loss of precision when multiplying - (or (Text/= "Rev" category) + (or (text/= "Rev" category) (= x (* (signum x) (abs x)))))))))] diff --git a/stdlib/test/test/lux/data/number/complex.lux b/stdlib/test/test/lux/data/number/complex.lux index 17cd07278..11601933e 100644 --- a/stdlib/test/test/lux/data/number/complex.lux +++ b/stdlib/test/test/lux/data/number/complex.lux @@ -4,10 +4,10 @@ (control [monad (#+ do Monad)] pipe) (data [product] - [number "frac/" Number<Frac>] + [number ("frac/" Number<Frac>)] ["&" number/complex] text/format - (collection [list "list/" Functor<List>])) + (collection [list ("list/" Functor<List>)])) [math] ["r" math/random]) lux/test) diff --git a/stdlib/test/test/lux/data/number/ratio.lux b/stdlib/test/test/lux/data/number/ratio.lux index 9802ac3b2..f0320a397 100644 --- a/stdlib/test/test/lux/data/number/ratio.lux +++ b/stdlib/test/test/lux/data/number/ratio.lux @@ -3,7 +3,7 @@ (lux [io] (control [monad (#+ do Monad)] pipe) - (data ["&" number/ratio "&/" Number<Ratio>]) + (data ["&" number/ratio ("&/" Number<Ratio>)]) ["r" math/random]) lux/test) diff --git a/stdlib/test/test/lux/data/product.lux b/stdlib/test/test/lux/data/product.lux index 11e574cc2..309e8e311 100644 --- a/stdlib/test/test/lux/data/product.lux +++ b/stdlib/test/test/lux/data/product.lux @@ -1,20 +1,16 @@ (.module: lux - (lux [io] - (control ["M" monad (#+ do Monad)]) - (data product - [text "Text/" Monoid<Text>] - [number])) + (lux (data ["@" product])) lux/test) (context: "Products" ($_ seq (test "Can access the sides of a pair." - (and (i/= 1 (left [1 2])) - (i/= 2 (right [1 2])))) + (and (i/= 1 (@.left [1 2])) + (i/= 2 (@.right [1 2])))) (test "Can swap the sides of a pair." - (let [[_left _right] (swap [1 2])] + (let [[_left _right] (@.swap [1 2])] (and (i/= 2 _left) (i/= 1 _right)))) )) diff --git a/stdlib/test/test/lux/data/sum.lux b/stdlib/test/test/lux/data/sum.lux index 1b73fb627..04b295ccf 100644 --- a/stdlib/test/test/lux/data/sum.lux +++ b/stdlib/test/test/lux/data/sum.lux @@ -1,10 +1,8 @@ (.module: lux - (lux [io] - (control pipe) + (lux (control pipe) (data sum - [text "Text/" Monoid<Text>] - [number] + [text] (collection [list]))) lux/test) diff --git a/stdlib/test/test/lux/data/text/lexer.lux b/stdlib/test/test/lux/data/text/lexer.lux index b13605054..36b2eb1d9 100644 --- a/stdlib/test/test/lux/data/text/lexer.lux +++ b/stdlib/test/test/lux/data/text/lexer.lux @@ -5,7 +5,7 @@ ["p" parser]) [io] (data ["E" error] - [text "text/" Equivalence<Text>] + [text ("text/" Equivalence<Text>)] text/format ["&" text/lexer] (collection [list])) diff --git a/stdlib/test/test/lux/data/text/regex.lux b/stdlib/test/test/lux/data/text/regex.lux index 7233c7308..581a9011f 100644 --- a/stdlib/test/test/lux/data/text/regex.lux +++ b/stdlib/test/test/lux/data/text/regex.lux @@ -5,7 +5,7 @@ pipe ["p" parser]) (data [product] - [text "T/" Equivalence<Text>] + [text ("text/" Equivalence<Text>)] text/format (text [lexer] ["&" regex])) @@ -20,7 +20,7 @@ (-> (lexer.Lexer Text) Text Bool) (|> (lexer.run input regex) (case> (#.Right parsed) - (T/= parsed input) + (text/= parsed input) _ false))) @@ -29,7 +29,7 @@ (-> Text (lexer.Lexer Text) Text Bool) (|> (lexer.run input regex) (case> (#.Right parsed) - (T/= test parsed) + (text/= test parsed) _ false))) @@ -276,9 +276,9 @@ (&.^regex "(.{3})-(.{3})-(.{4})" [_ match1 match2 match3]) (test "Can pattern-match using regular-expressions." - (and (T/= sample1 match1) - (T/= sample2 match2) - (T/= sample3 match3))) + (and (text/= sample1 match1) + (text/= sample2 match2) + (text/= sample3 match3))) _ (test "Cannot pattern-match using regular-expressions." diff --git a/stdlib/test/test/lux/host.jvm.lux b/stdlib/test/test/lux/host.jvm.lux index 5096f3200..13728b438 100644 --- a/stdlib/test/test/lux/host.jvm.lux +++ b/stdlib/test/test/lux/host.jvm.lux @@ -6,7 +6,7 @@ (data text/format [number] [product] - [text "text/" Equivalence<Text>]) + [text ("text/" Equivalence<Text>)]) ["&" host (#+ class: interface: object)] ["r" math/random]) lux/test) diff --git a/stdlib/test/test/lux/io.lux b/stdlib/test/test/lux/io.lux index f4c1bbf68..4257f8100 100644 --- a/stdlib/test/test/lux/io.lux +++ b/stdlib/test/test/lux/io.lux @@ -2,14 +2,14 @@ lux (lux ["&" io] (control ["M" monad (#+ do Monad)]) - (data [text "Text/" Monoid<Text> Equivalence<Text>] + (data [text ("text/" Equivalence<Text>)] text/format [number])) lux/test) (context: "I/O" ($_ seq - (test "" (Text/= "YOLO" (&.run (&.io "YOLO")))) + (test "" (text/= "YOLO" (&.run (&.io "YOLO")))) (test "" (i/= 11 (&.run (:: &.Functor<IO> map inc (&.io 10))))) (test "" (i/= 10 (&.run (:: &.Monad<IO> wrap 10)))) (test "" (i/= 30 (&.run (let [(^open "&/") &.Apply<IO> diff --git a/stdlib/test/test/lux/language/compiler/analysis/case.lux b/stdlib/test/test/lux/language/compiler/analysis/case.lux index e69e4d9d5..a2d54df8a 100644 --- a/stdlib/test/test/lux/language/compiler/analysis/case.lux +++ b/stdlib/test/test/lux/language/compiler/analysis/case.lux @@ -3,18 +3,15 @@ (lux [io] (control [monad (#+ do)] pipe) - (data [bool "B/" Equivalence<Bool>] - ["R" error] - [product] + (data [product] [maybe] - [text "T/" Equivalence<Text>] - text/format - (collection [list "list/" Monad<List>] + [text ("text/" Equivalence<Text>)] + (collection [list ("list/" Monad<List>)] [set])) - ["r" math/random "r/" Monad<Random>] + ["r" math/random ("random/" Monad<Random>)] [macro (#+ Monad<Meta>)] (macro [code]) - (language [type "type/" Equivalence<Type>] + (language [type] (type ["tc" check]) [".L" module] (compiler [analysis] @@ -43,7 +40,7 @@ (-> Bool (List [Code Code]) Code (r.Random (List Code))) (case inputC [_ (#.Bool _)] - (r/wrap (list (' true) (' false))) + (random/wrap (list (' true) (' false))) (^template [<tag> <gen> <wrapper>] [_ (<tag> _)] @@ -58,7 +55,7 @@ #.None (wrap (list (' _))))) - (r/wrap (list (' _))))) + (random/wrap (list (' _))))) ([#.Nat r.nat code.nat] [#.Int r.int code.int] [#.Rev r.rev code.rev] @@ -66,10 +63,10 @@ [#.Text (r.unicode +5) code.text]) (^ [_ (#.Tuple (list))]) - (r/wrap (list (' []))) + (random/wrap (list (' []))) (^ [_ (#.Record (list))]) - (r/wrap (list (' {}))) + (random/wrap (list (' {}))) [_ (#.Tuple members)] (do r.Monad<Random> @@ -99,7 +96,7 @@ (wrap (list/join bundles))) _ - (r/wrap (list)) + (random/wrap (list)) )) (def: #export (input variant-tags record-tags primitivesC) @@ -107,7 +104,7 @@ (r.rec (function (_ input) ($_ r.either - (r/map product.right _primitive.primitive) + (random/map product.right _primitive.primitive) (do r.Monad<Random> [choice (|> r.nat (:: @ map (n/% (list.size variant-tags)))) #let [choiceT (maybe.assume (list.nth choice variant-tags)) @@ -117,7 +114,7 @@ [size (|> r.nat (:: @ map (n/% +3))) elems (r.list size input)] (wrap (code.tuple elems))) - (r/wrap (code.record (list.zip2 record-tags primitivesC))) + (random/wrap (code.record (list.zip2 record-tags primitivesC))) )))) (def: (branch body pattern) @@ -132,7 +129,7 @@ (do @ [module-name (r.unicode +5) variant-name (r.unicode +5) - record-name (|> (r.unicode +5) (r.filter (|>> (T/= variant-name) not))) + record-name (|> (r.unicode +5) (r.filter (|>> (text/= variant-name) not))) size (|> r.nat (:: @ map (|>> (n/% +10) (n/max +2)))) variant-tags (|> (r.set text.Hash<Text> size (r.unicode +5)) (:: @ map set.to-list)) record-tags (|> (r.set text.Hash<Text> size (r.unicode +5)) (:: @ map set.to-list)) diff --git a/stdlib/test/test/lux/language/compiler/analysis/function.lux b/stdlib/test/test/lux/language/compiler/analysis/function.lux index a1b4dafe9..3de93fcc7 100644 --- a/stdlib/test/test/lux/language/compiler/analysis/function.lux +++ b/stdlib/test/test/lux/language/compiler/analysis/function.lux @@ -6,14 +6,14 @@ (data ["e" error] [maybe] [product] - [text "text/" Equivalence<Text>] + [text ("text/" Equivalence<Text>)] text/format - (collection [list "list/" Functor<List>])) - ["r" math/random "r/" Monad<Random>] + (collection [list ("list/" Functor<List>)])) + ["r" math/random] [macro] (macro [code]) [language] - (language [type "type/" Equivalence<Type>] + (language [type ("type/" Equivalence<Type>)] [".L" reference] (compiler [".L" init] [".L" analysis (#+ Analysis)] diff --git a/stdlib/test/test/lux/language/compiler/analysis/primitive.lux b/stdlib/test/test/lux/language/compiler/analysis/primitive.lux index 5a6e6cc69..1643786e3 100644 --- a/stdlib/test/test/lux/language/compiler/analysis/primitive.lux +++ b/stdlib/test/test/lux/language/compiler/analysis/primitive.lux @@ -6,11 +6,11 @@ ["ex" exception (#+ exception:)]) (data (text format) ["e" error]) - ["r" math/random "r/" Monad<Random>] + ["r" math/random ("random/" Monad<Random>)] [macro] (macro [code]) [language] - (language [".L" type "type/" Equivalence<Type>] + (language [".L" type ("type/" Equivalence<Type>)] (compiler [".L" init] [analysis (#+ Analysis)] (analysis [".A" type] @@ -21,13 +21,13 @@ (def: unit (r.Random Code) - (r/wrap (' []))) + (random/wrap (' []))) (def: #export primitive (r.Random [Type Code]) (`` ($_ r.either (~~ (do-template [<type> <code-wrapper> <value-gen>] - [(r.seq (r/wrap <type>) (r/map <code-wrapper> <value-gen>))] + [(r.seq (random/wrap <type>) (random/map <code-wrapper> <value-gen>))] [Any code.tuple (r.list +0 ..unit)] [Bool code.bool r.bool] diff --git a/stdlib/test/test/lux/language/compiler/analysis/procedure/common.lux b/stdlib/test/test/lux/language/compiler/analysis/procedure/common.lux index 656e0bdd6..ea7d8bdc2 100644 --- a/stdlib/test/test/lux/language/compiler/analysis/procedure/common.lux +++ b/stdlib/test/test/lux/language/compiler/analysis/procedure/common.lux @@ -8,11 +8,11 @@ ["e" error] [product] (collection [array])) - ["r" math/random "r/" Monad<Random>] + ["r" math/random] [macro (#+ Monad<Meta>)] (macro [code]) [language] - (language [type "type/" Equivalence<Type>] + (language [type ("type/" Equivalence<Type>)] [".L" scope] (compiler [".L" init] (analysis [".A" type]))) diff --git a/stdlib/test/test/lux/language/compiler/analysis/procedure/host.jvm.lux b/stdlib/test/test/lux/language/compiler/analysis/procedure/host.jvm.lux index 72a1f0337..d33af651d 100644 --- a/stdlib/test/test/lux/language/compiler/analysis/procedure/host.jvm.lux +++ b/stdlib/test/test/lux/language/compiler/analysis/procedure/host.jvm.lux @@ -7,10 +7,10 @@ (data ["e" error] [product] [maybe] - [text "text/" Equivalence<Text>] + [text ("text/" Equivalence<Text>)] text/format (collection [array] - [list "list/" Fold<List>] + [list ("list/" Fold<List>)] ["dict" dictionary])) ["r" math/random "r/" Monad<Random>] [macro (#+ Monad<Meta>)] diff --git a/stdlib/test/test/lux/language/compiler/analysis/reference.lux b/stdlib/test/test/lux/language/compiler/analysis/reference.lux index f91edb1ba..413a8fb01 100644 --- a/stdlib/test/test/lux/language/compiler/analysis/reference.lux +++ b/stdlib/test/test/lux/language/compiler/analysis/reference.lux @@ -4,13 +4,13 @@ (control [monad (#+ do)] pipe) (data ["e" error] - [ident "ident/" Equivalence<Ident>] - [text "text/" Equivalence<Text>]) + [ident ("ident/" Equivalence<Ident>)] + [text ("text/" Equivalence<Text>)]) ["r" math/random] [macro (#+ Monad<Meta>)] (macro [code]) [language] - (language [type "type/" Equivalence<Type>] + (language [type ("type/" Equivalence<Type>)] [".L" scope] [".L" module] [".L" reference] diff --git a/stdlib/test/test/lux/language/compiler/analysis/structure.lux b/stdlib/test/test/lux/language/compiler/analysis/structure.lux index 95c19331b..dca02794d 100644 --- a/stdlib/test/test/lux/language/compiler/analysis/structure.lux +++ b/stdlib/test/test/lux/language/compiler/analysis/structure.lux @@ -3,19 +3,19 @@ (lux [io] (control [monad (#+ do)] pipe) - (data [bool "bool/" Equivalence<Bool>] + (data [bool ("bool/" Equivalence<Bool>)] ["e" error] [product] [maybe] [text] text/format - (collection [list "list/" Functor<List>] + (collection [list ("list/" Functor<List>)] [set])) - ["r" math/random "r/" Monad<Random>] + ["r" math/random] [macro] (macro [code]) [language] - (language [type "type/" Equivalence<Type>] + (language [type ("type/" Equivalence<Type>)] (type ["tc" check]) [".L" module] (compiler [".L" init] diff --git a/stdlib/test/test/lux/language/compiler/synthesis/case.lux b/stdlib/test/test/lux/language/compiler/synthesis/case.lux index b6d554604..7ae02d943 100644 --- a/stdlib/test/test/lux/language/compiler/synthesis/case.lux +++ b/stdlib/test/test/lux/language/compiler/synthesis/case.lux @@ -2,14 +2,14 @@ lux (lux (control [monad (#+ do)] pipe) - (data [error "error/" Functor<Error>]) + (data [error ("error/" Functor<Error>)]) (language ["///." reference] ["///." compiler] [".L" analysis (#+ Branch Analysis)] ["//" synthesis (#+ Synthesis)] (synthesis [".S" expression]) [".L" extension]) - ["r" math/random "r/" Monad<Random>] + ["r" math/random] test) [//primitive]) diff --git a/stdlib/test/test/lux/language/compiler/synthesis/function.lux b/stdlib/test/test/lux/language/compiler/synthesis/function.lux index 244692994..8bbc1401d 100644 --- a/stdlib/test/test/lux/language/compiler/synthesis/function.lux +++ b/stdlib/test/test/lux/language/compiler/synthesis/function.lux @@ -8,10 +8,10 @@ [error] [number] text/format - (collection [list "list/" Functor<List> Fold<List>] + (collection [list ("list/" Functor<List> Fold<List>)] ["dict" dictionary (#+ Dictionary)] [set])) - (language ["///." reference (#+ Variable) "variable/" Equivalence<Variable>] + (language ["///." reference (#+ Variable) ("variable/" Equivalence<Variable>)] ["///." compiler] [".L" analysis (#+ Arity Analysis)] ["//" synthesis (#+ Synthesis)] diff --git a/stdlib/test/test/lux/language/compiler/synthesis/structure.lux b/stdlib/test/test/lux/language/compiler/synthesis/structure.lux index 125efdc49..8dba248e5 100644 --- a/stdlib/test/test/lux/language/compiler/synthesis/structure.lux +++ b/stdlib/test/test/lux/language/compiler/synthesis/structure.lux @@ -3,7 +3,7 @@ (lux [io] (control [monad (#+ do)] pipe) - (data [bool "bool/" Equivalence<Bool>] + (data [bool ("bool/" Equivalence<Bool>)] [product] [error] (collection [list])) @@ -12,7 +12,7 @@ ["//" synthesis (#+ Synthesis)] (synthesis [".S" expression]) [".L" extension]) - ["r" math/random "r/" Monad<Random>] + (math ["r" random]) test) [//primitive]) diff --git a/stdlib/test/test/lux/language/syntax.lux b/stdlib/test/test/lux/language/syntax.lux index 02bfee533..2a6e9ae5d 100644 --- a/stdlib/test/test/lux/language/syntax.lux +++ b/stdlib/test/test/lux/language/syntax.lux @@ -9,7 +9,7 @@ ["l" lexer]) (collection [list] ["dict" dictionary (#+ Dictionary)])) - ["r" math/random "r/" Monad<Random>] + ["r" math/random ("r/" Monad<Random>)] (macro [code]) (language ["&" syntax]) test)) diff --git a/stdlib/test/test/lux/language/type.lux b/stdlib/test/test/lux/language/type.lux index 7e4689a58..ccc315487 100644 --- a/stdlib/test/test/lux/language/type.lux +++ b/stdlib/test/test/lux/language/type.lux @@ -3,9 +3,7 @@ (lux [io] (control ["M" monad (#+ do Monad)] pipe) - (data [text "Text/" Monoid<Text>] - text/format - [number] + (data text/format [maybe] (collection [list])) ["r" math/random] diff --git a/stdlib/test/test/lux/language/type/check.lux b/stdlib/test/test/lux/language/type/check.lux index f1f464bf8..bc04f461b 100644 --- a/stdlib/test/test/lux/language/type/check.lux +++ b/stdlib/test/test/lux/language/type/check.lux @@ -6,12 +6,12 @@ (data [product] [maybe] [number] - [text "text/" Monoid<Text> Equivalence<Text>] + [text ("text/" Monoid<Text> Equivalence<Text>)] text/format - (collection [list "list/" Functor<List>] + (collection [list ("list/" Functor<List>)] [set])) ["r" math/random] - (language [type "type/" Equivalence<Type>] + (language [type ("type/" Equivalence<Type>)] (type ["@" check]))) lux/test) diff --git a/stdlib/test/test/lux/macro/code.lux b/stdlib/test/test/lux/macro/code.lux index bc172def2..d1c7eb318 100644 --- a/stdlib/test/test/lux/macro/code.lux +++ b/stdlib/test/test/lux/macro/code.lux @@ -2,7 +2,7 @@ lux (lux [io] (control [monad (#+ do Monad)]) - (data [text "T/" Equivalence<Text>] + (data [text ("text/" Equivalence<Text>)] text/format [number]) ["r" math/random] @@ -13,7 +13,7 @@ (with-expansions [<tests> (do-template [<expr> <text>] [(test (format "Can produce Code node: " <text>) - (and (T/= <text> (&.to-text <expr>)) + (and (text/= <text> (&.to-text <expr>)) (:: &.Equivalence<Code> = <expr> <expr>)))] [(&.bool true) "true"] diff --git a/stdlib/test/test/lux/macro/poly/equivalence.lux b/stdlib/test/test/lux/macro/poly/equivalence.lux index a498478fd..30b41c6b0 100644 --- a/stdlib/test/test/lux/macro/poly/equivalence.lux +++ b/stdlib/test/test/lux/macro/poly/equivalence.lux @@ -5,7 +5,7 @@ [equivalence (#+ Equivalence)]) (data text/format [bool] - [number "int/" Number<Int>] + [number ("int/" Number<Int>)] [text] [maybe] (collection [list])) diff --git a/stdlib/test/test/lux/macro/syntax.lux b/stdlib/test/test/lux/macro/syntax.lux index 258610aff..2b1fa4962 100644 --- a/stdlib/test/test/lux/macro/syntax.lux +++ b/stdlib/test/test/lux/macro/syntax.lux @@ -4,7 +4,7 @@ (control [monad (#+ do Monad)] [equivalence (#+ Equivalence)] ["p" parser]) - (data [text "Text/" Monoid<Text>] + (data [text] text/format [number] [bool] diff --git a/stdlib/test/test/lux/math.lux b/stdlib/test/test/lux/math.lux index 8fee2b105..2d13430ed 100644 --- a/stdlib/test/test/lux/math.lux +++ b/stdlib/test/test/lux/math.lux @@ -2,8 +2,8 @@ lux (lux [io] (control [monad (#+ do Monad)]) - (data [bool "bool/" Equivalence<Bool>] - [number "frac/" Number<Frac>]) + (data [bool ("bool/" Equivalence<Bool>)] + [number ("frac/" Number<Frac>)]) ["r" math/random] ["&" math]) lux/test) diff --git a/stdlib/test/test/lux/math/logic/fuzzy.lux b/stdlib/test/test/lux/math/logic/fuzzy.lux index ed41fde5d..2c88469ce 100644 --- a/stdlib/test/test/lux/math/logic/fuzzy.lux +++ b/stdlib/test/test/lux/math/logic/fuzzy.lux @@ -4,7 +4,7 @@ (control [monad (#+ do Monad)]) (data (collection [list] [set]) - [bool "B/" Equivalence<Bool>] + [bool ("bool/" Equivalence<Bool>)] [number] text/format) ["r" math/random] @@ -40,14 +40,14 @@ (r/= ~false (&.membership top triangle)))) (test "Values within range, will have membership > 0." - (B/= (r/> ~false (&.membership sample triangle)) - (and (<gt> bottom sample) - (<lt> top sample)))) + (bool/= (r/> ~false (&.membership sample triangle)) + (and (<gt> bottom sample) + (<lt> top sample)))) (test "Values outside of range, will have membership = 0." - (B/= (r/= ~false (&.membership sample triangle)) - (or (<lte> bottom sample) - (<gte> top sample)))) + (bool/= (r/= ~false (&.membership sample triangle)) + (or (<lte> bottom sample) + (<gte> top sample)))) ))))] ["Rev" number.Hash<Rev> r.rev &.triangle r/< r/<= r/> r/>=] @@ -82,19 +82,19 @@ (r/= ~false (&.membership top trapezoid)))) (test "Values within inner range will have membership = 1" - (B/= (r/= ~true (&.membership sample trapezoid)) - (and (<gte> middle-bottom sample) - (<lte> middle-top sample)))) + (bool/= (r/= ~true (&.membership sample trapezoid)) + (and (<gte> middle-bottom sample) + (<lte> middle-top sample)))) (test "Values within range, will have membership > 0." - (B/= (r/> ~false (&.membership sample trapezoid)) - (and (<gt> bottom sample) - (<lt> top sample)))) + (bool/= (r/> ~false (&.membership sample trapezoid)) + (and (<gt> bottom sample) + (<lt> top sample)))) (test "Values outside of range, will have membership = 0." - (B/= (r/= ~false (&.membership sample trapezoid)) - (or (<lte> bottom sample) - (<gte> top sample)))) + (bool/= (r/= ~false (&.membership sample trapezoid)) + (or (<lte> bottom sample) + (<gte> top sample)))) ))))] ["Rev" number.Hash<Rev> r.rev &.trapezoid r/< r/<= r/> r/>=] @@ -136,10 +136,10 @@ (~not (&.membership sample (&.complement left))))) (test "Membership in the difference will never be higher than in the set being subtracted." - (B/= (r/> (&.membership sample right) - (&.membership sample left)) - (r/< (&.membership sample left) - (&.membership sample (&.difference left right))))) + (bool/= (r/> (&.membership sample right) + (&.membership sample left)) + (r/< (&.membership sample left) + (&.membership sample (&.difference left right))))) )))) (context: "From predicates and sets" @@ -150,13 +150,13 @@ ($_ seq (test "Values that satisfy a predicate have membership = 1. Values that don't have membership = 0." - (B/= (r/= ~true (&.membership sample (&.from-predicate n/even?))) - (n/even? sample))) + (bool/= (r/= ~true (&.membership sample (&.from-predicate n/even?))) + (n/even? sample))) (test "Values that belong to a set have membership = 1. Values that don't have membership = 0." - (B/= (r/= ~true (&.membership sample (&.from-set set-10))) - (set.member? set-10 sample))) + (bool/= (r/= ~true (&.membership sample (&.from-set set-10))) + (set.member? set-10 sample))) )))) (context: "Thresholds" @@ -169,10 +169,10 @@ member? (&.to-predicate threshold fuzzy)]] ($_ seq (test "Can increase the threshold of membership of a fuzzy set." - (B/= (r/> ~false (&.membership sample vip-fuzzy)) - (r/> threshold (&.membership sample fuzzy)))) + (bool/= (r/> ~false (&.membership sample vip-fuzzy)) + (r/> threshold (&.membership sample fuzzy)))) (test "Can turn fuzzy sets into predicates through a threshold." - (B/= (member? sample) - (r/> threshold (&.membership sample fuzzy)))) + (bool/= (member? sample) + (r/> threshold (&.membership sample fuzzy)))) )))) diff --git a/stdlib/test/test/lux/math/modular.lux b/stdlib/test/test/lux/math/modular.lux index b6778e2a0..afa6330d3 100644 --- a/stdlib/test/test/lux/math/modular.lux +++ b/stdlib/test/test/lux/math/modular.lux @@ -2,12 +2,12 @@ lux (lux (control [monad (#+ do)]) (data [product] - [bool "bool/" Equivalence<Bool>] + [bool ("bool/" Equivalence<Bool>)] ["e" error] text/format) (math ["r" random] ["/" modular]) - (language [type "type/" Equivalence<Type>])) + (language [type ("type/" Equivalence<Type>)])) lux/test) (def: %3 (/.modulus 3)) diff --git a/stdlib/test/test/lux/time/date.lux b/stdlib/test/test/lux/time/date.lux index 798bda645..93238bc11 100644 --- a/stdlib/test/test/lux/time/date.lux +++ b/stdlib/test/test/lux/time/date.lux @@ -3,8 +3,8 @@ (lux [io] (control [monad (#+ do Monad)] [pipe]) - (data ["E" error]) - (math ["r" random "r/" Monad<Random>]) + (data [error]) + (math ["r" random ("random/" Monad<Random>)]) (time ["@." instant] ["@" date])) lux/test @@ -12,18 +12,18 @@ (def: month (r.Random @.Month) - (r.either (r.either (r.either (r/wrap #@.January) - (r.either (r/wrap #@.February) - (r/wrap #@.March))) - (r.either (r/wrap #@.April) - (r.either (r/wrap #@.May) - (r/wrap #@.June)))) - (r.either (r.either (r/wrap #@.July) - (r.either (r/wrap #@.August) - (r/wrap #@.September))) - (r.either (r/wrap #@.October) - (r.either (r/wrap #@.November) - (r/wrap #@.December)))))) + (r.either (r.either (r.either (random/wrap #@.January) + (r.either (random/wrap #@.February) + (random/wrap #@.March))) + (r.either (random/wrap #@.April) + (r.either (random/wrap #@.May) + (random/wrap #@.June)))) + (r.either (r.either (random/wrap #@.July) + (r.either (random/wrap #@.August) + (random/wrap #@.September))) + (r.either (random/wrap #@.October) + (r.either (random/wrap #@.November) + (random/wrap #@.December)))))) (context: "(Month) Equivalence." (<| (times +100) @@ -60,13 +60,13 @@ (def: day (r.Random @.Day) - (r.either (r.either (r.either (r/wrap #@.Sunday) - (r/wrap #@.Monday)) - (r.either (r/wrap #@.Tuesday) - (r/wrap #@.Wednesday))) - (r.either (r.either (r/wrap #@.Thursday) - (r/wrap #@.Friday)) - (r/wrap #@.Saturday)))) + (r.either (r.either (r.either (random/wrap #@.Sunday) + (random/wrap #@.Monday)) + (r.either (random/wrap #@.Tuesday) + (random/wrap #@.Wednesday))) + (r.either (r.either (random/wrap #@.Thursday) + (random/wrap #@.Friday)) + (random/wrap #@.Saturday)))) (context: "(Day) Equivalence." (<| (times +100) @@ -136,8 +136,8 @@ (|> sample @/encode @/decode - (pipe.case> (#E.Success decoded) + (pipe.case> (#error.Success decoded) (@/= sample decoded) - (#E.Error error) + (#error.Error error) false)))))) diff --git a/stdlib/test/test/lux/time/instant.lux b/stdlib/test/test/lux/time/instant.lux index e5bc7a7ea..c1e258566 100644 --- a/stdlib/test/test/lux/time/instant.lux +++ b/stdlib/test/test/lux/time/instant.lux @@ -5,8 +5,7 @@ pipe) (data [text] text/format - ["E" error] - [number "Int/" Number<Int>]) + [error]) (math ["r" random]) (time ["@" instant] ["@d" duration] @@ -88,8 +87,8 @@ ## (|> sample ## @/encode ## @/decode -## (case> (#E.Success decoded) +## (case> (#error.Success decoded) ## (@/= sample decoded) -## (#E.Error error) +## (#error.Error error) ## false)))))) diff --git a/stdlib/test/test/lux/type/implicit.lux b/stdlib/test/test/lux/type/implicit.lux index 94dcdad1e..680241dde 100644 --- a/stdlib/test/test/lux/type/implicit.lux +++ b/stdlib/test/test/lux/type/implicit.lux @@ -5,7 +5,7 @@ [functor] [monad (#+ do Monad)]) (data [number] - [bool "bool/" Equivalence<Bool>] + [bool ("bool/" Equivalence<Bool>)] (collection [list])) ["r" math/random] (type implicit)) diff --git a/stdlib/test/test/lux/world/net/tcp.lux b/stdlib/test/test/lux/world/net/tcp.lux index 7b232b7c6..7277a5b1c 100644 --- a/stdlib/test/test/lux/world/net/tcp.lux +++ b/stdlib/test/test/lux/world/net/tcp.lux @@ -5,7 +5,7 @@ ["ex" exception (#+ exception:)]) (concurrency ["P" promise] ["T" task] - [frp "frp/" Functor<Channel>]) + [frp ("frp/" Functor<Channel>)]) (data ["E" error] [text] text/format) |