diff options
Diffstat (limited to 'stdlib/source/library')
96 files changed, 443 insertions, 1037 deletions
diff --git a/stdlib/source/library/lux/abstract/monad/indexed.lux b/stdlib/source/library/lux/abstract/monad/indexed.lux index ae8ad03db..8d03d011e 100644 --- a/stdlib/source/library/lux/abstract/monad/indexed.lux +++ b/stdlib/source/library/lux/abstract/monad/indexed.lux @@ -2,14 +2,14 @@ [library [lux (.except global) [control - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["<>" parser]] [data [collection ["[0]" list (.use "[1]#[0]" functor mix)]]] ["[0]" macro (.only) [syntax (.only syntax)] - ["[0]" code]]]] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]] ["[0]" //]) (type .public (IxMonad m) diff --git a/stdlib/source/library/lux/control/concatenative.lux b/stdlib/source/library/lux/control/concatenative.lux index b0768b43e..4e900a860 100644 --- a/stdlib/source/library/lux/control/concatenative.lux +++ b/stdlib/source/library/lux/control/concatenative.lux @@ -15,8 +15,9 @@ ["[0]" list (.use "[1]#[0]" mix functor)]]] ["[0]" macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" code] - ["[0]" template]] + ["[0]" template] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]] [math [number ["n" nat] @@ -24,8 +25,7 @@ ["r" rev] ["f" frac]]]]] [// - ["<>" parser (.use "[1]#[0]" monad) - ["<[0]>" code (.only Parser)]]]) + ["<>" parser (.use "[1]#[0]" monad)]]) (type Stack (Record diff --git a/stdlib/source/library/lux/control/continuation.lux b/stdlib/source/library/lux/control/continuation.lux index 57f0053e9..a9e62ac66 100644 --- a/stdlib/source/library/lux/control/continuation.lux +++ b/stdlib/source/library/lux/control/continuation.lux @@ -6,12 +6,11 @@ [apply (.only Apply)] [monad (.only Monad do)]] [control - ["[0]" function] - [parser - ["<[0]>" code]]] + ["[0]" function]] [macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" code]]]]) + ["[0]" code (.only) + ["<[1]>" \\parser]]]]]) (type .public (Cont i o) (-> (-> i o) o)) diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux index 98e0c6f72..cf45dfe13 100644 --- a/stdlib/source/library/lux/control/exception.lux +++ b/stdlib/source/library/lux/control/exception.lux @@ -6,16 +6,16 @@ [abstract [monad (.only do)]] [control - ["[0]" maybe] - ["<>" parser (.use "[1]#[0]" monad) - ["<[0]>" code (.only Parser)]]] + ["<>" parser (.use "[1]#[0]" monad)] + ["[0]" maybe]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" monoid)] [collection ["[0]" list (.use "[1]#[0]" functor mix)]]] [macro - ["[0]" code] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]] [syntax (.only syntax) ["|[0]|" input] ["[0]" type diff --git a/stdlib/source/library/lux/control/function/contract.lux b/stdlib/source/library/lux/control/function/contract.lux index 80e90f6ca..df8702fed 100644 --- a/stdlib/source/library/lux/control/function/contract.lux +++ b/stdlib/source/library/lux/control/function/contract.lux @@ -2,15 +2,14 @@ [library [lux (.except) [control - ["[0]" exception (.only exception)] - [parser - ["<[0]>" code]]] + ["[0]" exception (.only exception)]] [data [text ["%" \\format (.only format)]]] [macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number ["i" int]]]]]) diff --git a/stdlib/source/library/lux/control/function/inline.lux b/stdlib/source/library/lux/control/function/inline.lux index 10141088d..98d6e56c9 100644 --- a/stdlib/source/library/lux/control/function/inline.lux +++ b/stdlib/source/library/lux/control/function/inline.lux @@ -5,13 +5,13 @@ [abstract ["[0]" monad (.only do)]] [control - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["<>" parser]] [data [collection ["[0]" list (.use "[1]#[0]" monad)]]] ["[0]" macro (.only) - ["[0]" code] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]] [syntax (.only syntax) ["|[0]|" export]]]]]) diff --git a/stdlib/source/library/lux/control/function/mutual.lux b/stdlib/source/library/lux/control/function/mutual.lux index 617efe7de..c6107b1a9 100644 --- a/stdlib/source/library/lux/control/function/mutual.lux +++ b/stdlib/source/library/lux/control/function/mutual.lux @@ -5,9 +5,8 @@ [abstract ["[0]" monad (.only do)]] [control - ["[0]" try (.only Try)] - ["<>" parser (.use "[1]#[0]" monad) - ["<[0]>" code (.only Parser)]]] + ["<>" parser (.use "[1]#[0]" monad)] + ["[0]" try (.only Try)]] [data ["[0]" product] [text @@ -18,7 +17,8 @@ ["[0]" plist (.only PList)]]]] ["[0]" macro (.only) ["[0]" local] - ["[0]" code] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]] [syntax (.only syntax) ["[0]" declaration (.only Declaration)]]]]] ["[0]" //]) diff --git a/stdlib/source/library/lux/control/io.lux b/stdlib/source/library/lux/control/io.lux index 5ae034638..609814844 100644 --- a/stdlib/source/library/lux/control/io.lux +++ b/stdlib/source/library/lux/control/io.lux @@ -5,14 +5,13 @@ [functor (.only Functor)] [apply (.only Apply)] [monad (.only Monad do)]] - [control - [parser - ["<[0]>" code]]] [type [primitive (.except)]] [macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" template]]]]) + ["[0]" template] + ["[0]" code + ["<[1]>" \\parser]]]]]) (primitive .public (IO a) (-> Any a) diff --git a/stdlib/source/library/lux/control/lazy.lux b/stdlib/source/library/lux/control/lazy.lux index 95299e5f0..b20711ba7 100644 --- a/stdlib/source/library/lux/control/lazy.lux +++ b/stdlib/source/library/lux/control/lazy.lux @@ -8,12 +8,12 @@ [equivalence (.only Equivalence)]] [control ["[0]" io] - [parser - ["<[0]>" code]] [concurrency ["[0]" atom]]] [macro (.only with_symbols) - [syntax (.only syntax)]] + [syntax (.only syntax)] + ["[0]" code + ["<[1]>" \\parser]]] [type (.only sharing) [primitive (.except)]]]]) diff --git a/stdlib/source/library/lux/control/parser/code.lux b/stdlib/source/library/lux/control/parser/code.lux deleted file mode 100644 index a73b18c55..000000000 --- a/stdlib/source/library/lux/control/parser/code.lux +++ /dev/null @@ -1,226 +0,0 @@ -(.require - [library - [lux (.except nat int rev local not symbol local global) - [abstract - ["[0]" monad (.only do)]] - [control - ["[0]" try (.only Try)]] - [data - ["[0]" bit] - ["[0]" text (.use "[1]#[0]" monoid)] - [collection - ["[0]" list (.use "[1]#[0]" functor)]]] - [macro - ["[0]" code (.use "[1]#[0]" equivalence)]] - [math - [number - ["[0]" nat] - ["[0]" int] - ["[0]" rev] - ["[0]" frac]]] - [meta - ["[0]" symbol]]]] - ["[0]" //]) - -(def (un_paired pairs) - (All (_ a) (-> (List [a a]) (List a))) - (case pairs - {.#End} - {.#End} - - {.#Item [[x y] pairs']} - (list.partial x y (un_paired pairs')))) - -(type .public Parser - (//.Parser (List Code))) - -(def remaining_inputs - (-> (List Code) Text) - (|>> (list#each code.format) - (text.interposed " ") - (all text#composite text.new_line "Remaining input: "))) - -(def .public any - (Parser Code) - (function (_ tokens) - (case tokens - {.#End} - {try.#Failure "There are no tokens to parse!"} - - {.#Item [t tokens']} - {try.#Success [tokens' t]}))) - -(def .public next - (Parser Code) - (function (_ tokens) - (case tokens - {.#End} - {try.#Failure "There are no tokens to parse!"} - - {.#Item next _} - {try.#Success [tokens next]}))) - -(with_template [<query> <check> <type> <tag> <eq> <desc>] - [(with_expansions [<failure> (these {try.#Failure (all text#composite "Cannot parse " <desc> (remaining_inputs tokens))})] - (def .public <query> - (Parser <type>) - (function (_ tokens) - (case tokens - {.#Item [[_ {<tag> x}] tokens']} - {try.#Success [tokens' x]} - - _ - <failure>))) - - (def .public (<check> expected) - (-> <type> (Parser Any)) - (function (_ tokens) - (case tokens - {.#Item [[_ {<tag> actual}] tokens']} - (if (at <eq> = expected actual) - {try.#Success [tokens' []]} - <failure>) - - _ - <failure>))))] - - [bit this_bit Bit .#Bit bit.equivalence "bit"] - [nat this_nat Nat .#Nat nat.equivalence "nat"] - [int this_int Int .#Int int.equivalence "int"] - [rev this_rev Rev .#Rev rev.equivalence "rev"] - [frac this_frac Frac .#Frac frac.equivalence "frac"] - [text this_text Text .#Text text.equivalence "text"] - [symbol this_symbol Symbol .#Symbol symbol.equivalence "symbol"] - ) - -(def .public (this code) - (-> Code (Parser Any)) - (function (_ tokens) - (case tokens - {.#Item [token tokens']} - (if (code#= code token) - {try.#Success [tokens' []]} - {try.#Failure (all text#composite "Expected a " (code.format code) " but instead got " (code.format token) - (remaining_inputs tokens))}) - - _ - {try.#Failure "There are no tokens to parse!"}))) - -(with_expansions [<failure> (these {try.#Failure (all text#composite "Cannot parse local symbol" (remaining_inputs tokens))})] - (def .public local - (Parser Text) - (function (_ tokens) - (case tokens - {.#Item [[_ {.#Symbol ["" x]}] tokens']} - {try.#Success [tokens' x]} - - _ - <failure>))) - - (def .public (this_local expected) - (-> Text (Parser Any)) - (function (_ tokens) - (case tokens - {.#Item [[_ {.#Symbol ["" actual]}] tokens']} - (if (at text.equivalence = expected actual) - {try.#Success [tokens' []]} - <failure>) - - _ - <failure>)))) - -(with_expansions [<failure> (these {try.#Failure (all text#composite "Cannot parse local symbol" (remaining_inputs tokens))})] - (def .public global - (Parser Symbol) - (function (_ tokens) - (case tokens - {.#Item [[_ {.#Symbol ["" short]}] tokens']} - <failure> - - {.#Item [[_ {.#Symbol it}] tokens']} - {try.#Success [tokens' it]} - - _ - <failure>))) - - (def .public (this_global expected) - (-> Symbol (Parser Any)) - (function (_ tokens) - (case tokens - {.#Item [[_ {.#Symbol ["" actual]}] tokens']} - <failure> - - {.#Item [[_ {.#Symbol it}] tokens']} - (if (at symbol.equivalence = expected it) - {try.#Success [tokens' []]} - <failure>) - - _ - <failure>)))) - -(with_template [<name> <tag> <desc>] - [(def .public (<name> p) - (All (_ a) - (-> (Parser a) (Parser a))) - (function (_ tokens) - (case tokens - {.#Item [[_ {<tag> members}] tokens']} - (case (p members) - {try.#Success [{.#End} x]} {try.#Success [tokens' x]} - _ {try.#Failure (all text#composite "Parser was expected to fully consume " <desc> (remaining_inputs tokens))}) - - _ - {try.#Failure (all text#composite "Cannot parse " <desc> (remaining_inputs tokens))})))] - - [form .#Form "form"] - [variant .#Variant "variant"] - [tuple .#Tuple "tuple"] - ) - -(def .public end - (Parser Any) - (function (_ tokens) - (case tokens - {.#End} {try.#Success [tokens []]} - _ {try.#Failure (all text#composite "Expected list of tokens to be empty!" (remaining_inputs tokens))}))) - -(def .public end? - (Parser Bit) - (function (_ tokens) - {try.#Success [tokens (case tokens - {.#End} true - _ false)]})) - -(def .public (result parser inputs) - (All (_ a) (-> (Parser a) (List Code) (Try a))) - (case (parser inputs) - {try.#Failure error} - {try.#Failure error} - - {try.#Success [unconsumed value]} - (case unconsumed - {.#End} - {try.#Success value} - - _ - {try.#Failure (|> unconsumed - (list#each code.format) - (text.interposed ", ") - (text#composite "Unconsumed inputs: "))}))) - -(def .public (locally inputs parser) - (All (_ a) (-> (List Code) (Parser a) (Parser a))) - (function (_ real) - (do try.monad - [value (..result parser inputs)] - (in [real value])))) - -(def .public (not parser) - (All (_ a) (-> (Parser a) (Parser Code))) - (do //.monad - [sample ..next - result (//.or parser - ..any)] - (case result - {.#Left _} (//.failure (text#composite "Did NOT expect to parse code: " (code.format sample))) - {.#Right output} (in output)))) diff --git a/stdlib/source/library/lux/control/parser/type.lux b/stdlib/source/library/lux/control/parser/type.lux deleted file mode 100644 index b4609b897..000000000 --- a/stdlib/source/library/lux/control/parser/type.lux +++ /dev/null @@ -1,350 +0,0 @@ -(.require - [library - [lux (.except function local parameter) - [abstract - ["[0]" monad (.only do)]] - [control - ["[0]" try (.only Try)] - ["[0]" exception (.only exception)] - ["[0]" function]] - [data - ["[0]" text (.use "[1]#[0]" monoid) - ["%" \\format (.only format)]] - [collection - ["[0]" list (.use "[1]#[0]" functor)] - ["[0]" dictionary (.only Dictionary)]]] - [macro - ["^" pattern] - ["[0]" code]] - [math - [number - ["n" nat (.use "[1]#[0]" decimal)]]] - ["[0]" type (.use "[1]#[0]" equivalence) - ["[0]" check]]]] - ["[0]" //]) - -(def |recursion_dummy| - (template (|recursion_dummy|) - [{.#Primitive "" {.#End}}])) - -(with_template [<name>] - [(exception .public (<name> [type Type]) - (exception.report - "Type" (%.type type)))] - - [not_existential] - [not_recursive] - [not_named] - [not_parameter] - [unknown_parameter] - [not_function] - [not_application] - [not_polymorphic] - [not_variant] - [not_tuple] - ) - -(with_template [<name>] - [(exception .public (<name> [expected Type - actual Type]) - (exception.report - "Expected" (%.type expected) - "Actual" (%.type actual)))] - - [types_do_not_match] - [wrong_parameter] - ) - -(exception .public empty_input) - -(exception .public (unconsumed_input [remaining (List Type)]) - (exception.report - "Types" (|> remaining - (list#each (|>> %.type (format text.new_line "* "))) - (text.interposed "")))) - -(type .public Env - (Dictionary Nat [Type Code])) - -(type .public (Parser a) - (//.Parser [Env (List Type)] a)) - -(def .public fresh - Env - (dictionary.empty n.hash)) - -(def (result' env poly types) - (All (_ a) (-> Env (Parser a) (List Type) (Try a))) - (case (//.result poly [env types]) - {try.#Failure error} - {try.#Failure error} - - {try.#Success [[env' remaining] output]} - (case remaining - {.#End} - {try.#Success output} - - _ - (exception.except ..unconsumed_input remaining)))) - -(def .public (result poly type) - (All (_ a) (-> (Parser a) Type (Try a))) - (result' ..fresh poly (list type))) - -(def .public env - (Parser Env) - (.function (_ [env inputs]) - {try.#Success [[env inputs] env]})) - -(def (with_env temp poly) - (All (_ a) (-> Env (Parser a) (Parser a))) - (.function (_ [env inputs]) - (case (//.result poly [temp inputs]) - {try.#Failure error} - {try.#Failure error} - - {try.#Success [[_ remaining] output]} - {try.#Success [[env remaining] output]}))) - -(def .public next - (Parser Type) - (.function (_ [env inputs]) - (case inputs - {.#End} - (exception.except ..empty_input []) - - {.#Item headT tail} - {try.#Success [[env inputs] headT]}))) - -(def .public any - (Parser Type) - (.function (_ [env inputs]) - (case inputs - {.#End} - (exception.except ..empty_input []) - - {.#Item headT tail} - {try.#Success [[env tail] headT]}))) - -(def .public (local types poly) - (All (_ a) (-> (List Type) (Parser a) (Parser a))) - (.function (_ [env pass_through]) - (case (result' env poly types) - {try.#Failure error} - {try.#Failure error} - - {try.#Success output} - {try.#Success [[env pass_through] output]}))) - -(def (label idx) - (-> Nat Code) - (code.local (all text#composite "label" text.tab (n#encoded idx)))) - -(def .public (with_extension type poly) - (All (_ a) (-> Type (Parser a) (Parser [Code a]))) - (.function (_ [env inputs]) - (let [current_id (dictionary.size env) - g!var (label current_id)] - (case (//.result poly - [(dictionary.has current_id [type g!var] env) - inputs]) - {try.#Failure error} - {try.#Failure error} - - {try.#Success [[_ inputs'] output]} - {try.#Success [[env inputs'] [g!var output]]})))) - -(with_template [<name> <flattener> <exception>] - [(`` (def .public (<name> poly) - (All (_ a) (-> (Parser a) (Parser a))) - (do //.monad - [headT ..any] - (let [members (<flattener> (type.anonymous headT))] - (if (n.> 1 (list.size members)) - (local members poly) - (//.failure (exception.error <exception> headT)))))))] - - [variant type.flat_variant ..not_variant] - [tuple type.flat_tuple ..not_tuple] - ) - -(def polymorphic' - (Parser [Nat Type]) - (do //.monad - [headT any - .let [[num_arg bodyT] (type.flat_univ_q (type.anonymous headT))]] - (if (n.= 0 num_arg) - (//.failure (exception.error ..not_polymorphic headT)) - (in [num_arg bodyT])))) - -(def .public (polymorphic poly) - (All (_ a) (-> (Parser a) (Parser [Code (List Code) a]))) - (do [! //.monad] - [headT any - funcI (at ! each dictionary.size ..env) - [num_args non_poly] (local (list headT) ..polymorphic') - env ..env - .let [funcL (label funcI) - [all_varsL env'] (loop (again [current_arg 0 - env' env - all_varsL (is (List Code) (list))]) - (if (n.< num_args current_arg) - (if (n.= 0 current_arg) - (let [varL (label (++ funcI))] - (again (++ current_arg) - (|> env' - (dictionary.has funcI [headT funcL]) - (dictionary.has (++ funcI) [{.#Parameter (++ funcI)} varL])) - {.#Item varL all_varsL})) - (let [partialI (|> current_arg (n.* 2) (n.+ funcI)) - partial_varI (++ partialI) - partial_varL (label partial_varI) - partialC (` ((~ funcL) (~+ (|> (list.indices num_args) - (list#each (|>> (n.* 2) ++ (n.+ funcI) label)) - list.reversed))))] - (again (++ current_arg) - (|> env' - (dictionary.has partialI [(|recursion_dummy|) partialC]) - (dictionary.has partial_varI [{.#Parameter partial_varI} partial_varL])) - {.#Item partial_varL all_varsL}))) - [all_varsL env']))]] - (<| (with_env env') - (local (list non_poly)) - (do ! - [output poly] - (in [funcL all_varsL output]))))) - -(def .public (function in_poly out_poly) - (All (_ i o) (-> (Parser i) (Parser o) (Parser [i o]))) - (do //.monad - [headT any - .let [[inputsT outputT] (type.flat_function (type.anonymous headT))]] - (if (n.> 0 (list.size inputsT)) - (//.and (local inputsT in_poly) - (local (list outputT) out_poly)) - (//.failure (exception.error ..not_function headT))))) - -(def .public (applied poly) - (All (_ a) (-> (Parser a) (Parser a))) - (do //.monad - [headT any - .let [[funcT paramsT] (type.flat_application (type.anonymous headT))]] - (if (n.= 0 (list.size paramsT)) - (//.failure (exception.error ..not_application headT)) - (..local {.#Item funcT paramsT} poly)))) - -(with_template [<name> <test>] - [(def .public (<name> expected) - (-> Type (Parser Any)) - (do //.monad - [actual any] - (if (<test> expected actual) - (in []) - (//.failure (exception.error ..types_do_not_match [expected actual])))))] - - [exactly type#=] - [sub check.subsumes?] - [super (function.flipped check.subsumes?)] - ) - -(def .public (argument env idx) - (-> Env Nat Nat) - (let [env_level (n./ 2 (dictionary.size env)) - parameter_level (n./ 2 idx) - parameter_idx (n.% 2 idx)] - (|> env_level -- (n.- parameter_level) (n.* 2) (n.+ parameter_idx)))) - -(def .public parameter - (Parser Code) - (do //.monad - [env ..env - headT any] - (case headT - {.#Parameter idx} - (case (dictionary.value (..argument env idx) env) - {.#Some [poly_type poly_code]} - (in poly_code) - - {.#None} - (//.failure (exception.error ..unknown_parameter headT))) - - _ - (//.failure (exception.error ..not_parameter headT))))) - -(def .public (this_parameter id) - (-> Nat (Parser Any)) - (do //.monad - [env ..env - headT any] - (case headT - {.#Parameter idx} - (if (n.= id (..argument env idx)) - (in []) - (//.failure (exception.error ..wrong_parameter [{.#Parameter id} headT]))) - - _ - (//.failure (exception.error ..not_parameter headT))))) - -(def .public existential - (Parser Nat) - (do //.monad - [headT any] - (case headT - {.#Ex ex_id} - (in ex_id) - - _ - (//.failure (exception.error ..not_existential headT))))) - -(def .public named - (Parser [Symbol Type]) - (do //.monad - [inputT any] - (case inputT - {.#Named name anonymousT} - (in [name anonymousT]) - - _ - (//.failure (exception.error ..not_named inputT))))) - -(def .public (recursive poly) - (All (_ a) (-> (Parser a) (Parser [Code a]))) - (do [! //.monad] - [headT any] - (case (type.anonymous headT) - (pattern {.#Apply (|recursion_dummy|) {.#UnivQ _ headT'}}) - (do ! - [[recT _ output] (|> poly - (with_extension (|recursion_dummy|)) - (with_extension headT) - (local (list headT')))] - (in [recT output])) - - _ - (//.failure (exception.error ..not_recursive headT))))) - -(def .public recursive_self - (Parser Code) - (do //.monad - [env ..env - headT any] - (case (type.anonymous headT) - (^.multi (pattern {.#Apply (|recursion_dummy|) {.#Parameter funcT_idx}}) - (n.= 0 (..argument env funcT_idx)) - [(dictionary.value 0 env) {.#Some [self_type self_call]}]) - (in self_call) - - _ - (//.failure (exception.error ..not_recursive headT))))) - -(def .public recursive_call - (Parser Code) - (do [! //.monad] - [env ..env - [funcT argsT] (..applied (//.and any (//.many any))) - _ (local (list funcT) (..this_parameter 0)) - allC (let [allT (list.partial funcT argsT)] - (|> allT - (monad.each ! (function.constant ..parameter)) - (local allT)))] - (in (` ((~+ allC)))))) diff --git a/stdlib/source/library/lux/control/pipe.lux b/stdlib/source/library/lux/control/pipe.lux index eff3b6dce..99e7a697c 100644 --- a/stdlib/source/library/lux/control/pipe.lux +++ b/stdlib/source/library/lux/control/pipe.lux @@ -4,16 +4,16 @@ [abstract ["[0]" monad]] [control - ["[0]" try] - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["<>" parser] + ["[0]" try]] [data ["[0]" identity] [collection ["[0]" list (.use "[1]#[0]" monad)]]] [macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]] [math [number ["n" nat] diff --git a/stdlib/source/library/lux/control/remember.lux b/stdlib/source/library/lux/control/remember.lux index 264d13adb..bce726fb1 100644 --- a/stdlib/source/library/lux/control/remember.lux +++ b/stdlib/source/library/lux/control/remember.lux @@ -4,11 +4,10 @@ [abstract [monad (.only do)]] [control + ["<>" parser (.use "[1]#[0]" functor)] ["[0]" io] ["[0]" try] - ["[0]" exception (.only exception)] - ["<>" parser (.use "[1]#[0]" functor) - ["<c>" code (.only Parser)]]] + ["[0]" exception (.only exception)]] [data ["[0]" text ["%" \\format (.only format)]]] @@ -17,9 +16,10 @@ ["[0]" date (.only Date) (.use "[1]#[0]" order)]] ["[0]" meta] [macro - ["[0]" code] + [syntax (.only syntax)] ["[0]" template] - [syntax (.only syntax)]]]]) + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (exception .public (must_remember [deadline Date today Date @@ -40,9 +40,9 @@ (Parser Date) (all <>.either (<>#each (|>> instant.of_millis instant.date) - <c>.int) + <code>.int) (do <>.monad - [raw <c>.text] + [raw <code>.text] (case (at date.codec decoded raw) {try.#Success date} (in date) @@ -52,8 +52,8 @@ (def .public remember (syntax (_ [deadline ..deadline - message <c>.text - focus (<>.maybe <c>.any)]) + message <code>.text + focus (<>.maybe <code>.any)]) (let [now (io.run! instant.now) today (instant.date now)] (if (date#< deadline today) @@ -68,8 +68,8 @@ (with_template [<name> <message>] [(`` (def .public <name> (syntax (_ [deadline ..deadline - message <c>.text - focus (<>.maybe <c>.any)]) + message <code>.text + focus (<>.maybe <code>.any)]) (in (list (` (..remember (~ (code.text (%.date deadline))) (~ (code.text (format <message> " " message))) (~+ (case focus diff --git a/stdlib/source/library/lux/control/security/capability.lux b/stdlib/source/library/lux/control/security/capability.lux index 0164bcc7b..96813f726 100644 --- a/stdlib/source/library/lux/control/security/capability.lux +++ b/stdlib/source/library/lux/control/security/capability.lux @@ -4,9 +4,8 @@ [abstract [monad (.only do)]] [control + ["<>" parser] ["[0]" io (.only IO)] - ["<>" parser (.only) - ["<c>" code]] [concurrency ["[0]" async (.only Async)]]] [data @@ -18,7 +17,8 @@ [primitive (.except)]] ["[0]" meta] ["[0]" macro (.only) - ["[0]" code] + ["[0]" code (.only) + ["<[1]>" \\parser]] [syntax (.only syntax) ["|[0]|" export] ["|[0]|" declaration]]]]]) @@ -44,7 +44,7 @@ (|export|.parser (all <>.and |declaration|.parser - (<c>.form (all <>.and <c>.local <c>.any <c>.any))))]) + (<code>.form (all <>.and <code>.local <code>.any <code>.any))))]) (macro.with_symbols [g!_] (do [! meta.monad] [this_module meta.current_module_name diff --git a/stdlib/source/library/lux/data/collection/sequence.lux b/stdlib/source/library/lux/data/collection/sequence.lux index 493b5d411..3d5dfd300 100644 --- a/stdlib/source/library/lux/data/collection/sequence.lux +++ b/stdlib/source/library/lux/data/collection/sequence.lux @@ -14,11 +14,10 @@ [mix (.only Mix)] [predicate (.only Predicate)]] [control + ["<>" parser] ["[0]" maybe (.use "[1]#[0]" functor)] ["[0]" try (.only Try)] - ["[0]" exception (.only exception)] - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["[0]" exception (.only exception)]] [data ["[0]" product] [collection @@ -28,7 +27,8 @@ [macro [syntax (.only syntax)] ["^" pattern] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]] [math [number ["n" nat] diff --git a/stdlib/source/library/lux/data/collection/stream.lux b/stdlib/source/library/lux/data/collection/stream.lux index 42523d5e3..4e82cbe1e 100644 --- a/stdlib/source/library/lux/data/collection/stream.lux +++ b/stdlib/source/library/lux/data/collection/stream.lux @@ -6,15 +6,15 @@ [comonad (.only CoMonad)]] [control ["//" continuation (.only Cont)] - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["<>" parser]] [data ["[0]" bit] [collection ["[0]" list (.use "[1]#[0]" monad)]]] [macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]] [math [number ["n" nat]]]]]) diff --git a/stdlib/source/library/lux/data/collection/tree.lux b/stdlib/source/library/lux/data/collection/tree.lux index f05521c70..64288458d 100644 --- a/stdlib/source/library/lux/data/collection/tree.lux +++ b/stdlib/source/library/lux/data/collection/tree.lux @@ -7,14 +7,14 @@ [mix (.only Mix)] [monad (.only do)]] [control - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["<>" parser]] [data [collection ["[0]" list (.use "[1]#[0]" monad mix)]]] [macro [syntax (.only syntax)] - ["[0]" code]]]]) + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (type .public (Tree a) (Record diff --git a/stdlib/source/library/lux/data/format/css/value.lux b/stdlib/source/library/lux/data/format/css/value.lux index ac6af642c..6dab6619e 100644 --- a/stdlib/source/library/lux/data/format/css/value.lux +++ b/stdlib/source/library/lux/data/format/css/value.lux @@ -2,9 +2,7 @@ [library [lux (.except Label All Location and static false true) [control - ["[0]" maybe] - [parser - ["<[0]>" code]]] + ["[0]" maybe]] [data ["[0]" color] ["[0]" product] @@ -15,7 +13,8 @@ [macro [syntax (.only syntax)] ["[0]" template] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number ["n" nat] diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux index 845a4e057..3f14a9599 100644 --- a/stdlib/source/library/lux/data/format/json.lux +++ b/stdlib/source/library/lux/data/format/json.lux @@ -8,11 +8,10 @@ [predicate (.only Predicate)] ["[0]" monad (.only do)]] [control + ["<>" parser (.use "[1]#[0]" monad)] ["[0]" pipe] ["[0]" maybe] - ["[0]" try (.only Try)] - ["<>" parser (.use "[1]#[0]" monad) - ["<[0]>" code]]] + ["[0]" try (.only Try)]] [data ["[0]" bit] ["[0]" product] @@ -25,7 +24,8 @@ [macro [syntax (.only syntax)] ["^" pattern] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number ["n" nat] diff --git a/stdlib/source/library/lux/data/text/escape.lux b/stdlib/source/library/lux/data/text/escape.lux index f8980caf1..aff108c29 100644 --- a/stdlib/source/library/lux/data/text/escape.lux +++ b/stdlib/source/library/lux/data/text/escape.lux @@ -5,18 +5,18 @@ [abstract [monad (.only do)]] [control + ["<>" parser] ["[0]" maybe] ["[0]" try (.only Try)] - ["[0]" exception (.only exception)] - ["<>" parser - ["<[0]>" code]]] + ["[0]" exception (.only exception)]] [math [number (.only hex) ["n" nat]]] [macro [syntax (.only syntax)] ["^" pattern] - ["[0]" code]]]] + ["[0]" code (.only) + ["<[1]>" \\parser]]]]] ["[0]" // (.only Char) ["%" \\format (.only format)]]) diff --git a/stdlib/source/library/lux/data/text/regex.lux b/stdlib/source/library/lux/data/text/regex.lux index 957c12bd7..c9a8a5d68 100644 --- a/stdlib/source/library/lux/data/text/regex.lux +++ b/stdlib/source/library/lux/data/text/regex.lux @@ -5,11 +5,10 @@ [abstract [monad (.only do)]] [control + ["<>" parser (.use "[1]#[0]" monad)] ["[0]" maybe] ["[0]" try] - ["[0]" exception (.only exception)] - ["<>" parser (.use "[1]#[0]" monad) - ["<[0]>" code]]] + ["[0]" exception (.only exception)]] [data ["[0]" product] ["[0]" text @@ -19,7 +18,8 @@ [macro (.only with_symbols) [syntax (.only syntax)] ["^" pattern] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number (.only hex) ["n" nat (.use "[1]#[0]" decimal)]]]]] diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux index 3db55592d..fa9e36cff 100644 --- a/stdlib/source/library/lux/debug.lux +++ b/stdlib/source/library/lux/debug.lux @@ -2,19 +2,16 @@ [library [lux (.except private) ["@" target] - ["[0]" type] ["[0]" ffi (.only import)] ["[0]" meta] [abstract ["[0]" monad (.only do)]] [control + ["<>" parser] ["[0]" pipe] ["[0]" function] ["[0]" try (.only Try)] - ["[0]" exception (.only exception)] - ["<>" parser (.only) - ["<[0]>" type (.only Parser)] - ["<[0]>" code]]] + ["[0]" exception (.only exception)]] [data ["[0]" text (.only) ["%" \\format (.only Format)]] @@ -29,7 +26,8 @@ ["^" pattern] ["[0]" template] ["[0]" syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number [ratio (.only Ratio)] @@ -40,7 +38,9 @@ [duration (.only Duration)] [date (.only Date)] [month (.only Month)] - [day (.only Day)]]]]) + [day (.only Day)]] + ["[0]" type (.only) + ["<[1]>" \\parser (.only Parser)]]]]) (with_expansions [<jvm> (these (import java/lang/String "[1]::[0]") diff --git a/stdlib/source/library/lux/documentation.lux b/stdlib/source/library/lux/documentation.lux index 26e87d50d..2fd1b2bdf 100644 --- a/stdlib/source/library/lux/documentation.lux +++ b/stdlib/source/library/lux/documentation.lux @@ -7,10 +7,9 @@ [monad (.only do)] ["[0]" enum]] [control + ["<>" parser (.use "[1]#[0]" monad)] ["[0]" maybe (.use "[1]#[0]" functor)] - ["[0]" exception (.only exception)] - ["<>" parser (.use "[1]#[0]" monad) - ["<[0]>" code (.only Parser)]]] + ["[0]" exception (.only exception)]] [data ["[0]" product] ["[0]" text (.only \n) (.use "[1]#[0]" order) @@ -24,8 +23,9 @@ ["[0]" macro (.only) [syntax (.only syntax)] ["^" pattern] - ["[0]" code] - ["[0]" template]] + ["[0]" template] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]] [math [number ["n" nat]]] diff --git a/stdlib/source/library/lux/extension.lux b/stdlib/source/library/lux/extension.lux index 3d1b684f6..9c3946a30 100644 --- a/stdlib/source/library/lux/extension.lux +++ b/stdlib/source/library/lux/extension.lux @@ -4,15 +4,15 @@ [abstract ["[0]" monad]] [control - ["<>" parser (.use "[1]#[0]" monad) - ["<c>" code (.only Parser)]]] + ["<>" parser (.use "[1]#[0]" monad)]] [data ["[0]" product] [collection ["[0]" list (.use "[1]#[0]" functor)]]] [macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<c>" \\parser (.only Parser)]]] [tool [compiler ["[0]" phase] diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux index fddb85cb7..5768251a8 100644 --- a/stdlib/source/library/lux/ffi.jvm.lux +++ b/stdlib/source/library/lux/ffi.jvm.lux @@ -5,12 +5,11 @@ [abstract ["[0]" monad (.only do)]] [control + ["<>" parser (.use "[1]#[0]" monad)] ["[0]" io] ["[0]" maybe] ["[0]" try (.only Try)] - ["[0]" exception (.only Exception exception)] - ["<>" parser (.use "[1]#[0]" monad) - ["<[0]>" code (.only Parser)]]] + ["[0]" exception (.only Exception exception)]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" equivalence) @@ -23,9 +22,10 @@ [macro (.only with_symbols) [syntax (.only syntax)] ["^" pattern] - ["[0]" code] ["[0]" template] - ["[0]" context]] + ["[0]" context] + ["[0]" code (.only) + ["<[1]>" \\parser(.only Parser)]]] [math [number ["n" nat]]] diff --git a/stdlib/source/library/lux/ffi.lux b/stdlib/source/library/lux/ffi.lux index 097f91e77..103d2babd 100644 --- a/stdlib/source/library/lux/ffi.lux +++ b/stdlib/source/library/lux/ffi.lux @@ -5,11 +5,10 @@ [abstract ["[0]" monad (.only do)]] [control + ["<>" parser (.use "[1]#[0]" monad)] ["[0]" io] ["[0]" maybe (.use "[1]#[0]" functor)] - ["[0]" try] - ["<>" parser (.use "[1]#[0]" monad) - ["<[0]>" code (.only Parser)]]] + ["[0]" try]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" equivalence) @@ -18,8 +17,9 @@ ["[0]" list (.use "[1]#[0]" monad mix)]]] ["[0]" macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" code] - ["[0]" template]] + ["[0]" template] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]] ["@" target (.only) ["[0]" js]] [type @@ -378,8 +378,8 @@ parameters (list#each ..output_type :parameters:))] (` (.def ((~ g!it) (~+ (case g!parameters - {.#End} (list g!it) - _ (list#each (the #mandatory) g!parameters)))) + {.#End} (list g!it) + _ (list#each (the #mandatory) g!parameters)))) (.All ((~ g!it) (~+ g!variables)) (-> (~+ :input:/*) (~ (|> :output: @@ -450,8 +450,8 @@ g!class (` ((~ (code.local (maybe.else class_name alias))) (~+ g!class_variables))) :output: [#optional? false #mandatory g!class]] (` (.def ((~ g!it) (~+ (case g!parameters - {.#End} (list g!it) - _ (list#each (the #mandatory) g!parameters)))) + {.#End} (list g!it) + _ (list#each (the #mandatory) g!parameters)))) (.All ((~ g!it) (~+ g!class_variables) (~+ g!input_variables)) (.-> (~+ (list#each ..output_type :parameters:)) (~ (|> :output: @@ -728,51 +728,51 @@ {try.#Failure (%.format "Invalid inputs for extension: " (%.text name))})))))])) (analysis <undefined> - [name phase archive state] - <code>.end - _ - {try.#Success [state (extension_analysis name (list))]}) + [name phase archive state] + <code>.end + _ + {try.#Success [state (extension_analysis name (list))]}) (generation <undefined> - [name phase archive state] - (list) - {try.#Success [state js.undefined]}) + [name phase archive state] + (list) + {try.#Success [state js.undefined]}) (def .public undefined (template (undefined) [(.is ..Undefined (<undefined>))])) (analysis <undefined?> - [name phase archive state] - <code>.any - it - (do try.monad - [[state it] (phase archive (` (.is .Any (~ it))) state)] - (in [state (extension_analysis name (list it))]))) + [name phase archive state] + <code>.any + it + (do try.monad + [[state it] (phase archive (` (.is .Any (~ it))) state)] + (in [state (extension_analysis name (list it))]))) (generation <undefined?> - [name phase archive state] - (list it) - (do try.monad - [[state it] (phase archive it state)] - (in [state (js.= js.undefined it)]))) + [name phase archive state] + (list it) + (do try.monad + [[state it] (phase archive it state)] + (in [state (js.= js.undefined it)]))) (def .public undefined? (template (undefined? <it>) [(.as .Bit (.is .Any (<undefined?> <it>)))])) (analysis <object> - [name phase archive state] - (<>.some (<>.and <code>.text <code>.any)) - it - (do [! try.monad] - [[state output] (monad.mix ! (.function (_ [key value] [state output]) - (do ! - [[state value] (phase archive (` (.is .Any (~ value))) state)] - (in [state (list.partial value (text_analysis key) output)]))) - [state (list)] - it)] - (in [state (extension_analysis name (list.reversed output))]))) + [name phase archive state] + (<>.some (<>.and <code>.text <code>.any)) + it + (do [! try.monad] + [[state output] (monad.mix ! (.function (_ [key value] [state output]) + (do ! + [[state value] (phase archive (` (.is .Any (~ value))) state)] + (in [state (list.partial value (text_analysis key) output)]))) + [state (list)] + it)] + (in [state (extension_analysis name (list.reversed output))]))) (def text_synthesis (template (_ <it>) @@ -791,22 +791,22 @@ (.undefined))) (generation <object> - [name phase archive state] - (list.partial head_key head_value tail) - (do [! try.monad] - [[state output] (monad.mix ! - (.function (_ [key value] [state output]) - (case key - (pattern (text_synthesis key)) - (do try.monad - [[state value] (phase archive value state)] - (in [state (list.partial [key value] output)])) - - _ - (.undefined))) - [state (list)] - (pairs (list.partial head_key head_value tail)))] - (in [state (js.object (list.reversed output))]))) + [name phase archive state] + (list.partial head_key head_value tail) + (do [! try.monad] + [[state output] (monad.mix ! + (.function (_ [key value] [state output]) + (case key + (pattern (text_synthesis key)) + (do try.monad + [[state value] (phase archive value state)] + (in [state (list.partial [key value] output)])) + + _ + (.undefined))) + [state (list)] + (pairs (list.partial head_key head_value tail)))] + (in [state (js.object (list.reversed output))]))) (def .public object (syntax (_ [it (<>.some <code>.any)]) diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux index a577a3b6d..a199b5012 100644 --- a/stdlib/source/library/lux/ffi.old.lux +++ b/stdlib/source/library/lux/ffi.old.lux @@ -6,12 +6,11 @@ ["[0]" monad (.only Monad do)] ["[0]" enum]] [control + ["<>" parser] ["[0]" function] ["[0]" io] ["[0]" maybe] - ["[0]" try (.only Try)] - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["[0]" try (.only Try)]] [data ["[0]" product] ["[0]" bit (.use "[1]#[0]" codec)] @@ -23,8 +22,9 @@ ["[0]" macro (.only with_symbols) [syntax (.only syntax)] ["^" pattern] - ["[0]" code] - ["[0]" template]] + ["[0]" template] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]] ["[0]" meta]]]) (with_template [<name> <op> <from> <to>] @@ -324,7 +324,7 @@ (text.replaced "/" ".")) (def (generic_class_type' mode type_params in_array? name+params - class_type') + class_type') (-> Primitive_Mode (List Type_Parameter) Bit [Text (List GenericType)] (-> Primitive_Mode (List Type_Parameter) Bit GenericType Code) Code) diff --git a/stdlib/source/library/lux/ffi.php.lux b/stdlib/source/library/lux/ffi.php.lux index 00b35e83d..f5f357021 100644 --- a/stdlib/source/library/lux/ffi.php.lux +++ b/stdlib/source/library/lux/ffi.php.lux @@ -6,10 +6,9 @@ [abstract [monad (.only do)]] [control + ["<>" parser (.use "[1]#[0]" monad)] ["[0]" io] - ["[0]" maybe] - ["<>" parser (.use "[1]#[0]" monad) - ["<[0]>" code (.only Parser)]]] + ["[0]" maybe]] [data ["[0]" product] ["[0]" text @@ -20,8 +19,9 @@ abstract] [macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" code] - ["[0]" template]]]]) + ["[0]" template] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (primitive .public (Object brand) Any) @@ -224,7 +224,7 @@ (-> Code Code Code (List Nullable) Bit Bit Nullable Code) (let [g!inputs (input_variables inputsT)] (` (def ((~ g!method) - [(~+ (list#each product.right g!inputs))]) + [(~+ (list#each product.right g!inputs))]) (-> [(~+ (list#each nullable_type inputsT))] (~ (|> (nullable_type outputT) (try_type try?) @@ -286,8 +286,8 @@ {#Virtual [method alias inputsT io? try? outputT]} (let [g!inputs (input_variables inputsT)] (` (def ((~ (qualify (maybe.else method alias))) - [(~+ (list#each product.right g!inputs))] - (~ g!object)) + [(~+ (list#each product.right g!inputs))] + (~ g!object)) (-> [(~+ (list#each nullable_type inputsT))] (~ g!type) (~ (|> (nullable_type outputT) diff --git a/stdlib/source/library/lux/ffi.scm.lux b/stdlib/source/library/lux/ffi.scm.lux index 49296eef7..27f8c4f4f 100644 --- a/stdlib/source/library/lux/ffi.scm.lux +++ b/stdlib/source/library/lux/ffi.scm.lux @@ -6,10 +6,9 @@ [abstract [monad (.only do)]] [control + ["<>" parser (.use "[1]#[0]" monad)] ["[0]" io] - ["[0]" maybe] - ["<>" parser (.use "[1]#[0]" monad) - ["<[0]>" code (.only Parser)]]] + ["[0]" maybe]] [data ["[0]" product] ["[0]" text @@ -20,8 +19,9 @@ abstract] [macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" code] - ["[0]" template]]]]) + ["[0]" template] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (primitive .public (Object brand) Any) @@ -189,7 +189,7 @@ (-> Code Code Code (List Nilable) Bit Bit Nilable Code) (let [g!inputs (input_variables inputsT)] (` (def ((~ g!method) - [(~+ (list#each product.right g!inputs))]) + [(~+ (list#each product.right g!inputs))]) (-> [(~+ (list#each nilable_type inputsT))] (~ (|> (nilable_type outputT) (try_type try?) diff --git a/stdlib/source/library/lux/ffi/export.js.lux b/stdlib/source/library/lux/ffi/export.js.lux index 2f635e20b..e40ea1964 100644 --- a/stdlib/source/library/lux/ffi/export.js.lux +++ b/stdlib/source/library/lux/ffi/export.js.lux @@ -7,8 +7,7 @@ [abstract ["[0]" monad (.only do)]] [control - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser]] [data [text ["%" \\format]] @@ -17,7 +16,8 @@ ["[0]" set]]] ["[0]" macro (.only) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math ["[0]" random]] [target diff --git a/stdlib/source/library/lux/ffi/export.jvm.lux b/stdlib/source/library/lux/ffi/export.jvm.lux index 8d3cc0ea1..6aebb2c13 100644 --- a/stdlib/source/library/lux/ffi/export.jvm.lux +++ b/stdlib/source/library/lux/ffi/export.jvm.lux @@ -2,14 +2,14 @@ [library [lux (.except function) [control - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["<>" parser]] [data [collection ["[0]" list (.use "[1]#[0]" monad)]]] [macro [syntax (.only syntax)] - ["[0]" code]]]] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]] ["[0]" //]) (type (API of) diff --git a/stdlib/source/library/lux/ffi/export.lua.lux b/stdlib/source/library/lux/ffi/export.lua.lux index 6cfe5b891..66b98998d 100644 --- a/stdlib/source/library/lux/ffi/export.lua.lux +++ b/stdlib/source/library/lux/ffi/export.lua.lux @@ -7,8 +7,7 @@ [abstract ["[0]" monad (.only do)]] [control - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser]] [data [text ["%" \\format]] @@ -17,7 +16,8 @@ ["[0]" set]]] ["[0]" macro (.only) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math ["[0]" random]] [target diff --git a/stdlib/source/library/lux/ffi/export.py.lux b/stdlib/source/library/lux/ffi/export.py.lux index 1a4b3e054..42309927e 100644 --- a/stdlib/source/library/lux/ffi/export.py.lux +++ b/stdlib/source/library/lux/ffi/export.py.lux @@ -7,8 +7,7 @@ [abstract ["[0]" monad (.only do)]] [control - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser]] [data [text ["%" \\format]] @@ -17,7 +16,8 @@ ["[0]" set]]] ["[0]" macro (.only) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math ["[0]" random]] [target diff --git a/stdlib/source/library/lux/ffi/export.rb.lux b/stdlib/source/library/lux/ffi/export.rb.lux index 1266c730c..6777bfa86 100644 --- a/stdlib/source/library/lux/ffi/export.rb.lux +++ b/stdlib/source/library/lux/ffi/export.rb.lux @@ -8,8 +8,7 @@ [abstract ["[0]" monad (.only do)]] [control - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser]] [data ["[0]" text ["%" \\format] @@ -19,7 +18,8 @@ ["[0]" set]]] ["[0]" macro (.only) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math ["[0]" random]] [target diff --git a/stdlib/source/library/lux/macro/context.lux b/stdlib/source/library/lux/macro/context.lux index fef8ae1d8..4d4224ccf 100644 --- a/stdlib/source/library/lux/macro/context.lux +++ b/stdlib/source/library/lux/macro/context.lux @@ -5,16 +5,18 @@ [monad (.only do)] ["[0]" predicate (.only Predicate)]] [control + ["?" parser] ["[0]" exception (.only exception)] - ["[0]" maybe] - ["?" parser (.only) - ["?[0]" code]]] + ["[0]" maybe]] [data ["[0]" text (.use "[1]#[0]" equivalence monoid)] [collection ["[0]" list] [dictionary ["[0]" plist (.only PList)]]]] + [macro + ["[0]" code + ["?[1]" \\parser]]] ["[0]" meta (.only) ["[0]" symbol (.use "[1]#[0]" codec)]]]] ["[0]" // (.only) diff --git a/stdlib/source/library/lux/macro/local.lux b/stdlib/source/library/lux/macro/local.lux index 4e762b81d..ef15fbe10 100644 --- a/stdlib/source/library/lux/macro/local.lux +++ b/stdlib/source/library/lux/macro/local.lux @@ -5,10 +5,9 @@ [abstract ["[0]" monad (.only do)]] [control + ["<>" parser] ["[0]" try (.only Try)] - ["[0]" exception (.only exception)] - ["<>" parser (.only) - ["<[0]>" code]]] + ["[0]" exception (.only exception)]] [data ["[0]" product] ["[0]" text] @@ -18,7 +17,8 @@ ["[0]" plist (.only PList)]]]]]] ["[0]" // (.only) [syntax (.only syntax)] - ["[1][0]" code]]) + ["[0]" code (.only) + ["<[1]>" \\parser]]]) (exception .public (unknown_module [module Text]) (exception.report @@ -106,7 +106,7 @@ seed meta.seed g!pop (//.symbol "pop") _ (.let [g!pop (is Symbol - ["" (//code.format g!pop)])] + ["" (code.format g!pop)])] (..push_one [g!pop (..pop_all (list#each product.left macros) g!pop)]))] (in (` ((~ g!pop)))))) diff --git a/stdlib/source/library/lux/macro/syntax.lux b/stdlib/source/library/lux/macro/syntax.lux index 897b778e5..380713ff0 100644 --- a/stdlib/source/library/lux/macro/syntax.lux +++ b/stdlib/source/library/lux/macro/syntax.lux @@ -5,10 +5,9 @@ [abstract ["[0]" monad (.only do)]] [control + ["<>" parser] ["[0]" maybe] - ["[0]" try] - ["<>" parser (.only) - ["</>" code (.only Parser)]]] + ["[0]" try]] [data ["[0]" text (.use "[1]#[0]" monoid)] [collection @@ -20,7 +19,8 @@ ["[0]" rev] ["[0]" frac]]]]] ["[0]" // (.only with_symbols) - ["[0]" code]] + ["[0]" code (.only) + ["</>" \\parser (.only Parser)]]] ["[0]" / ["[1][0]" export]]) diff --git a/stdlib/source/library/lux/macro/syntax/check.lux b/stdlib/source/library/lux/macro/syntax/check.lux index 6649a6864..7a4b6ac73 100644 --- a/stdlib/source/library/lux/macro/syntax/check.lux +++ b/stdlib/source/library/lux/macro/syntax/check.lux @@ -6,12 +6,12 @@ [equivalence (.only Equivalence)] [monad (.only do)]] [control - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["<>" parser]] [data ["[0]" product]] [macro - ["[0]" code]]]]) + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (def extension "lux check") diff --git a/stdlib/source/library/lux/macro/syntax/declaration.lux b/stdlib/source/library/lux/macro/syntax/declaration.lux index c4cac1e99..dbb86e1ce 100644 --- a/stdlib/source/library/lux/macro/syntax/declaration.lux +++ b/stdlib/source/library/lux/macro/syntax/declaration.lux @@ -4,15 +4,15 @@ [abstract [equivalence (.only Equivalence)]] [control - ["<>" parser (.use "[1]#[0]" monad) - ["<[0]>" code (.only Parser)]]] + ["<>" parser (.use "[1]#[0]" monad)]] [data ["[0]" product] ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" functor)]]] [macro - ["[0]" code]]]]) + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (type .public Declaration (Record diff --git a/stdlib/source/library/lux/macro/syntax/definition.lux b/stdlib/source/library/lux/macro/syntax/definition.lux index eee400dfe..b93e0bd64 100644 --- a/stdlib/source/library/lux/macro/syntax/definition.lux +++ b/stdlib/source/library/lux/macro/syntax/definition.lux @@ -5,9 +5,8 @@ [equivalence (.only Equivalence)] [monad (.only do)]] [control - ["[0]" exception (.only exception)] - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["<>" parser] + ["[0]" exception (.only exception)]] [data ["[0]" sum] ["[0]" product] @@ -17,7 +16,8 @@ [collection ["[0]" list]]] ["[0]" macro (.only) - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]] ["[0]" meta (.only) ["[0]" location]]]] ["[0]" // (.only) diff --git a/stdlib/source/library/lux/macro/syntax/export.lux b/stdlib/source/library/lux/macro/syntax/export.lux index 1a80d36c1..e47b09750 100644 --- a/stdlib/source/library/lux/macro/syntax/export.lux +++ b/stdlib/source/library/lux/macro/syntax/export.lux @@ -4,10 +4,11 @@ [abstract [monad (.only do)]] [control - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["<>" parser]] [macro - ["^" pattern]]]]) + ["^" pattern] + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]]]]) (def .public default_policy Code diff --git a/stdlib/source/library/lux/macro/syntax/input.lux b/stdlib/source/library/lux/macro/syntax/input.lux index b0022bc25..1354a9a54 100644 --- a/stdlib/source/library/lux/macro/syntax/input.lux +++ b/stdlib/source/library/lux/macro/syntax/input.lux @@ -4,14 +4,14 @@ [abstract [equivalence (.only Equivalence)]] [control - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["<>" parser]] [data ["[0]" product] [collection ["[0]" list (.use "[1]#[0]" monad)]]] [macro - ["[0]" code]]]]) + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (type .public Input (Record diff --git a/stdlib/source/library/lux/macro/syntax/type/variable.lux b/stdlib/source/library/lux/macro/syntax/type/variable.lux index ada8766cb..2658572e6 100644 --- a/stdlib/source/library/lux/macro/syntax/type/variable.lux +++ b/stdlib/source/library/lux/macro/syntax/type/variable.lux @@ -3,13 +3,11 @@ [lux (.except) [abstract [equivalence (.only Equivalence)]] - [control - [parser - ["<[0]>" code (.only Parser)]]] [data ["[0]" text]] [macro - ["[0]" code]]]]) + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (type .public Variable Text) diff --git a/stdlib/source/library/lux/macro/template.lux b/stdlib/source/library/lux/macro/template.lux index 834599518..68a37a237 100644 --- a/stdlib/source/library/lux/macro/template.lux +++ b/stdlib/source/library/lux/macro/template.lux @@ -5,10 +5,9 @@ [abstract ["[0]" monad (.only do)]] [control + ["<>" parser (.use "[1]#[0]" functor)] ["[0]" try (.only Try)] - ["[0]" exception (.only exception)] - ["<>" parser (.use "[1]#[0]" functor) - ["<[0]>" code (.only Parser)]]] + ["[0]" exception (.only exception)]] [data ["[0]" bit (.use "[1]#[0]" codec)] ["[0]" text] @@ -25,8 +24,9 @@ ["[0]" frac (.use "[1]#[0]" decimal)]]]]] ["[0]" // (.only) [syntax (.only syntax)] - ["[0]" code] - ["[0]" local]]) + ["[0]" local] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]) (def .public spliced (syntax (_ [parts (<code>.tuple (<>.some <code>.any))]) diff --git a/stdlib/source/library/lux/math.lux b/stdlib/source/library/lux/math.lux index 6404b3343..63f2e931c 100644 --- a/stdlib/source/library/lux/math.lux +++ b/stdlib/source/library/lux/math.lux @@ -7,10 +7,9 @@ [abstract ["[0]" monad (.only do)]] [control + ["<>" parser] ["[0]" try (.only Try)] - ["[0]" exception (.only exception)] - ["<>" parser (.only) - ["<[0]>" code]]] + ["[0]" exception (.only exception)]] [data [text ["%" \\format]] @@ -18,7 +17,9 @@ ["[0]" list (.use "[1]#[0]" mix)]]] [macro [syntax (.only syntax)] - ["[0]" template]] + ["[0]" template] + ["[0]" code + ["<[1]>" \\parser]]] [tool [compiler ["[0]" phase (.use "[1]#[0]" monad)] diff --git a/stdlib/source/library/lux/math/infix.lux b/stdlib/source/library/lux/math/infix.lux index af6268977..01930c466 100644 --- a/stdlib/source/library/lux/math/infix.lux +++ b/stdlib/source/library/lux/math/infix.lux @@ -4,15 +4,15 @@ [abstract [monad (.only do)]] [control - ["<>" parser (.use "[1]#[0]" functor) - ["<[0]>" code (.only Parser)]]] + ["<>" parser (.use "[1]#[0]" functor)]] [data ["[0]" product] [collection ["[0]" list (.use "[1]#[0]" mix)]]] [macro [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]] [math [number ["n" nat] diff --git a/stdlib/source/library/lux/math/modular.lux b/stdlib/source/library/lux/math/modular.lux index 4fcb27d65..489f798ab 100644 --- a/stdlib/source/library/lux/math/modular.lux +++ b/stdlib/source/library/lux/math/modular.lux @@ -8,16 +8,16 @@ [codec (.only Codec)] [monad (.only do)]] [control + ["<>" parser] ["[0]" try (.only Try)] - ["[0]" exception (.only exception)] - ["<>" parser (.only) - ["<[0]>" code]]] + ["[0]" exception (.only exception)]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" monoid) ["<[1]>" \\parser (.only Parser)]]] [macro - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number ["i" int (.use "[1]#[0]" decimal)]]] diff --git a/stdlib/source/library/lux/math/modulus.lux b/stdlib/source/library/lux/math/modulus.lux index f22bb1d39..d440669ae 100644 --- a/stdlib/source/library/lux/math/modulus.lux +++ b/stdlib/source/library/lux/math/modulus.lux @@ -6,12 +6,11 @@ [monad (.only do)]] [control ["[0]" try (.only Try)] - ["[0]" exception (.only exception)] - [parser - ["<[0]>" code]]] + ["[0]" exception (.only exception)]] [macro [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number ["i" int]]] diff --git a/stdlib/source/library/lux/math/number/complex.lux b/stdlib/source/library/lux/math/number/complex.lux index 611d66066..d22ce8ad2 100644 --- a/stdlib/source/library/lux/math/number/complex.lux +++ b/stdlib/source/library/lux/math/number/complex.lux @@ -4,14 +4,15 @@ [abstract [equivalence (.only Equivalence)]] [control - ["[0]" maybe] - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser] + ["[0]" maybe]] [data [collection ["[0]" list (.use "[1]#[0]" functor)]]] [macro - [syntax (.only syntax)]] + [syntax (.only syntax)] + ["[0]" code + ["<[1]>" \\parser]]] [math [number ["f" frac] diff --git a/stdlib/source/library/lux/math/number/ratio.lux b/stdlib/source/library/lux/math/number/ratio.lux index 2e77616c6..6deac08f0 100644 --- a/stdlib/source/library/lux/math/number/ratio.lux +++ b/stdlib/source/library/lux/math/number/ratio.lux @@ -8,17 +8,17 @@ [codec (.only Codec)] [monad (.only do)]] [control + ["<>" parser] ["[0]" function] ["[0]" maybe] - ["[0]" try] - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["[0]" try]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" monoid)]] [macro [syntax (.only syntax)] - ["[0]" code]]]] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]] [// ["n" nat (.use "[1]#[0]" decimal)]]) diff --git a/stdlib/source/library/lux/meta/configuration.lux b/stdlib/source/library/lux/meta/configuration.lux index d52b60914..d0dea1e76 100644 --- a/stdlib/source/library/lux/meta/configuration.lux +++ b/stdlib/source/library/lux/meta/configuration.lux @@ -7,10 +7,9 @@ [monoid (.only Monoid)] [monad (.only do)]] [control + ["<>" parser] ["[0]" maybe (.use "[1]#[0]" functor)] - ["[0]" exception (.only exception)] - ["<>" parser (.only) - ["<[0]>" code]]] + ["[0]" exception (.only exception)]] [data ["[0]" text (.use "[1]#[0]" equivalence) ["%" \\format] @@ -21,7 +20,8 @@ ["/" plist]]]] [macro [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number (.only hex)]]]]) diff --git a/stdlib/source/library/lux/meta/version.lux b/stdlib/source/library/lux/meta/version.lux index da5d349bb..f7df8ac2f 100644 --- a/stdlib/source/library/lux/meta/version.lux +++ b/stdlib/source/library/lux/meta/version.lux @@ -5,16 +5,16 @@ [abstract [monad (.only do)]] [control - ["[0]" exception (.only exception)] - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser] + ["[0]" exception (.only exception)]] [data ["[0]" text (.use "[1]#[0]" equivalence)] [collection ["[0]" list (.use "[1]#[0]" mix)]]] [macro [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [tool [compiler [version (.only Version)]]]]]) diff --git a/stdlib/source/library/lux/program.lux b/stdlib/source/library/lux/program.lux index ca420eb9f..99fb1832e 100644 --- a/stdlib/source/library/lux/program.lux +++ b/stdlib/source/library/lux/program.lux @@ -9,11 +9,11 @@ [concurrency ["[0]" thread]] ["<>" parser (.only) - ["<[0]>" code] ["<[0]>" cli]]] [macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" code]]]]) + ["[0]" code (.only) + ["<[1]>" \\parser]]]]]) (type Arguments (Variant diff --git a/stdlib/source/library/lux/static.lux b/stdlib/source/library/lux/static.lux index 53426b0f8..a473f8288 100644 --- a/stdlib/source/library/lux/static.lux +++ b/stdlib/source/library/lux/static.lux @@ -5,14 +5,14 @@ [abstract [monad (.only do)]] [control - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser]] [data [collection ["[0]" list (.use "[1]#[0]" functor mix)]]] [macro [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number (.only hex)] ["[0]" random (.only Random)]]]]) diff --git a/stdlib/source/library/lux/target/jvm/modifier.lux b/stdlib/source/library/lux/target/jvm/modifier.lux index 058027fab..ac45136d6 100644 --- a/stdlib/source/library/lux/target/jvm/modifier.lux +++ b/stdlib/source/library/lux/target/jvm/modifier.lux @@ -5,15 +5,15 @@ ["[0]" equivalence (.only Equivalence)] ["[0]" monoid (.only Monoid)]] [control - ["[0]" try] - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser] + ["[0]" try]] [data ["[0]" binary ["[1]F" \\format (.only Writer)]]] [macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math ["[0]" number (.only hex) ["[0]" i64]]] diff --git a/stdlib/source/library/lux/target/lua.lux b/stdlib/source/library/lux/target/lua.lux index 635117c5e..f12cfbac6 100644 --- a/stdlib/source/library/lux/target/lua.lux +++ b/stdlib/source/library/lux/target/lua.lux @@ -7,9 +7,7 @@ [hash (.only Hash)] ["[0]" enum]] [control - ["[0]" pipe] - [parser - ["<[0]>" code]]] + ["[0]" pipe]] [data ["[0]" text (.only) ["%" \\format (.only format)]] @@ -18,7 +16,8 @@ [macro [syntax (.only syntax)] ["[0]" template] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number ["n" nat] diff --git a/stdlib/source/library/lux/target/php.lux b/stdlib/source/library/lux/target/php.lux index 99b0c1d3f..2ad1863b6 100644 --- a/stdlib/source/library/lux/target/php.lux +++ b/stdlib/source/library/lux/target/php.lux @@ -7,9 +7,7 @@ [hash (.only Hash)] ["[0]" enum]] [control - ["[0]" pipe] - [parser - ["<[0]>" code]]] + ["[0]" pipe]] [data ["[0]" text (.only) ["%" \\format (.only format)]] @@ -18,7 +16,8 @@ [macro [syntax (.only syntax)] ["[0]" template] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number ["n" nat] diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux index 1ce2789e7..ddc601161 100644 --- a/stdlib/source/library/lux/target/python.lux +++ b/stdlib/source/library/lux/target/python.lux @@ -8,9 +8,7 @@ [hash (.only Hash)] ["[0]" enum]] [control - ["[0]" pipe] - [parser - ["<[0]>" code]]] + ["[0]" pipe]] [data ["[0]" text (.only) ["%" \\format (.only format)]] @@ -19,7 +17,8 @@ [macro [syntax (.only syntax)] ["[0]" template] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number ["n" nat] diff --git a/stdlib/source/library/lux/target/r.lux b/stdlib/source/library/lux/target/r.lux index 6ec808501..6d56eea58 100644 --- a/stdlib/source/library/lux/target/r.lux +++ b/stdlib/source/library/lux/target/r.lux @@ -4,9 +4,7 @@ [control ["[0]" pipe] ["[0]" function] - ["[0]" maybe (.use "[1]#[0]" functor)] - [parser - ["<[0]>" code]]] + ["[0]" maybe (.use "[1]#[0]" functor)]] [data ["[0]" text ["%" \\format (.only format)]] @@ -15,7 +13,8 @@ [macro [syntax (.only syntax)] ["[0]" template] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number ["f" frac]]] diff --git a/stdlib/source/library/lux/target/ruby.lux b/stdlib/source/library/lux/target/ruby.lux index 980307456..5a5f5af9d 100644 --- a/stdlib/source/library/lux/target/ruby.lux +++ b/stdlib/source/library/lux/target/ruby.lux @@ -7,9 +7,7 @@ [hash (.only Hash)] ["[0]" enum]] [control - ["[0]" pipe] - [parser - ["<[0]>" code]]] + ["[0]" pipe]] [data ["[0]" text (.only) ["%" \\format (.only format)]] @@ -18,7 +16,8 @@ [macro [syntax (.only syntax)] ["[0]" template] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number ["n" nat] diff --git a/stdlib/source/library/lux/test.lux b/stdlib/source/library/lux/test.lux index b7cdc5ca7..110675c5d 100644 --- a/stdlib/source/library/lux/test.lux +++ b/stdlib/source/library/lux/test.lux @@ -6,6 +6,7 @@ [abstract ["[0]" monad (.only do)]] [control + ["<>" parser] ["[0]" pipe] ["[0]" maybe] ["[0]" try] @@ -13,9 +14,7 @@ ["[0]" io] [concurrency ["[0]" atom (.only Atom)] - ["[0]" async (.only Async) (.use "[1]#[0]" monad)]] - ["<>" parser (.only) - ["<[0]>" code]]] + ["[0]" async (.only Async) (.use "[1]#[0]" monad)]]] [data ["[0]" product] ["[0]" text (.only) @@ -35,7 +34,8 @@ ["f" frac]]] [macro [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] ["[0]" meta (.only) ["[0]" symbol]] [world diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux index 81d6ccdf5..c3ccd43e9 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux @@ -9,9 +9,7 @@ ["[0]" function] ["[0]" maybe] ["[0]" try (.only Try)] - ["[0]" exception (.only Exception)] - [parser - ["<[0]>" code]]] + ["[0]" exception (.only Exception)]] [data ["[0]" product] ["[0]" bit (.use "[1]#[0]" equivalence)] @@ -20,7 +18,9 @@ [collection ["[0]" list (.use "[1]#[0]" functor mix)]]] [macro - [syntax (.only syntax)]] + [syntax (.only syntax)] + ["[0]" code + ["<[1]>" \\parser]]] [math [number ["n" nat] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/common_lisp.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/common_lisp.lux index 5e7529857..377ce23c4 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/common_lisp.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/common_lisp.lux @@ -1,32 +1,10 @@ (.require [library - [lux (.except) - ["[0]" ffi] - [abstract - ["[0]" monad (.only do)]] - [control - ["<>" parser (.only) - ["<c>" code (.only Parser)]]] - [data - [collection - ["[0]" array (.only Array)] - ["[0]" dictionary] - ["[0]" list]]] - ["[0]" type (.only) - ["[0]" check]] - ["@" target - ["_" common_lisp]]]] - [// - ["/" lux (.only custom)] - [// - ["[0]" bundle] - [// - ["[0]" analysis - ["[1]/[0]" type]] - [// - ["[0]" analysis (.only Analysis Operation Phase Handler Bundle)] - [/// - ["[0]" phase]]]]]]) + [lux (.except)]] + [/// + ["[0]" bundle] + [/// + [analysis (.only Bundle)]]]) (def .public bundle Bundle diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux index af44a8272..102e5adcf 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/js.lux @@ -5,13 +5,15 @@ [abstract ["[0]" monad (.only do)]] [control - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["<>" parser]] [data [collection ["[0]" array] ["[0]" dictionary] ["[0]" list]]] + [macro + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] ["[0]" type (.only) ["[0]" check]] ["@" target (.only) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux index 32ca3161d..16cb9e777 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux @@ -7,12 +7,11 @@ ["[0]" monad (.only do)] ["[0]" predicate]] [control + ["<>" parser] ["[0]" pipe] ["[0]" maybe (.use "[1]#[0]" functor)] ["[0]" try (.only Try) (.use "[1]#[0]" monad)] - ["[0]" exception (.only exception)] - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["[0]" exception (.only exception)]] [data [binary (.only Binary) ["[0]" \\format]] @@ -27,7 +26,9 @@ ["[0]" sequence]]] [macro ["^" pattern] - ["[0]" template]] + ["[0]" template] + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] [math [number ["n" nat] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux index b507b7a15..3c0e4cc86 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lua.lux @@ -5,13 +5,15 @@ [abstract ["[0]" monad (.only do)]] [control - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["<>" parser]] [data [collection ["[0]" array] ["[0]" dictionary] ["[0]" list]]] + [macro + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] ["[0]" type (.only) ["[0]" check]] ["@" target (.only) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux index 448735394..75e4e8516 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/lux.lux @@ -4,11 +4,10 @@ [abstract ["[0]" monad (.only do)]] [control + ["<>" parser] ["[0]" maybe] ["[0]" try] - ["[0]" exception (.only exception)] - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["[0]" exception (.only exception)]] [data ["[0]" text (.only) ["%" \\format (.only format)]] @@ -16,7 +15,9 @@ ["[0]" list (.use "[1]#[0]" functor)] ["[0]" dictionary (.only Dictionary)]]] [macro - ["^" pattern]] + ["^" pattern] + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] [math [number ["n" nat]]] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux index 27e096e18..3852d2b24 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/php.lux @@ -5,13 +5,15 @@ [abstract ["[0]" monad (.only do)]] [control - ["<>" parser (.only) - ["<c>" code (.only Parser)]]] + ["<>" parser]] [data [collection ["[0]" array (.only Array)] ["[0]" dictionary] ["[0]" list]]] + [macro + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] ["[0]" type (.only) ["[0]" check]] ["@" target (.only) @@ -31,7 +33,7 @@ (def array::new Handler (custom - [<c>.any + [<code>.any (function (_ extension phase archive lengthC) (<| analysis/type.with_var (function (_ [@var :var:])) @@ -44,7 +46,7 @@ (def array::length Handler (custom - [<c>.any + [<code>.any (function (_ extension phase archive arrayC) (<| analysis/type.with_var (function (_ [@var :var:])) @@ -57,7 +59,7 @@ (def array::read Handler (custom - [(<>.and <c>.any <c>.any) + [(<>.and <code>.any <code>.any) (function (_ extension phase archive [indexC arrayC]) (<| analysis/type.with_var (function (_ [@var :var:])) @@ -72,7 +74,7 @@ (def array::write Handler (custom - [(all <>.and <c>.any <c>.any <c>.any) + [(all <>.and <code>.any <code>.any <code>.any) (function (_ extension phase archive [indexC valueC arrayC]) (<| analysis/type.with_var (function (_ [@var :var:])) @@ -89,7 +91,7 @@ (def array::delete Handler (custom - [(all <>.and <c>.any <c>.any) + [(all <>.and <code>.any <code>.any) (function (_ extension phase archive [indexC arrayC]) (<| analysis/type.with_var (function (_ [@var :var:])) @@ -127,7 +129,7 @@ (def object::new Handler (custom - [(all <>.and <c>.text (<>.some <c>.any)) + [(all <>.and <code>.text (<>.some <code>.any)) (function (_ extension phase archive [constructor inputsC]) (do [! phase.monad] [inputsA (monad.each ! (|>> (phase archive) (analysis/type.with_type Any)) inputsC) @@ -137,7 +139,7 @@ (def object::get Handler (custom - [(all <>.and <c>.text <c>.any) + [(all <>.and <code>.text <code>.any) (function (_ extension phase archive [fieldC objectC]) (do phase.monad [objectA (analysis/type.with_type ..Object @@ -149,7 +151,7 @@ (def object::do Handler (custom - [(all <>.and <c>.text <c>.any (<>.some <c>.any)) + [(all <>.and <code>.text <code>.any (<>.some <code>.any)) (function (_ extension phase archive [methodC objectC inputsC]) (do [! phase.monad] [objectA (analysis/type.with_type ..Object @@ -174,7 +176,7 @@ (def php::constant Handler (custom - [<c>.text + [<code>.text (function (_ extension phase archive name) (do phase.monad [_ (analysis/type.infer Any)] @@ -183,7 +185,7 @@ (def php::apply Handler (custom - [(all <>.and <c>.any (<>.some <c>.any)) + [(all <>.and <code>.any (<>.some <code>.any)) (function (_ extension phase archive [abstractionC inputsC]) (do [! phase.monad] [abstractionA (analysis/type.with_type ..Function @@ -195,7 +197,7 @@ (def php::pack Handler (custom - [(all <>.and <c>.any <c>.any) + [(all <>.and <code>.any <code>.any) (function (_ extension phase archive [formatC dataC]) (do [! phase.monad] [formatA (analysis/type.with_type Text diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux index d44c8f5de..3c6e4b452 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux @@ -5,13 +5,15 @@ [abstract ["[0]" monad (.only do)]] [control - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["<>" parser]] [data [collection ["[0]" array] ["[0]" dictionary] ["[0]" list]]] + [macro + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] ["[0]" type (.only) ["[0]" check]] ["@" target (.only) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/r.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/r.lux index c499e23d8..a53133555 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/r.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/r.lux @@ -5,13 +5,15 @@ [abstract ["[0]" monad (.only do)]] [control - ["<>" parser (.only) - ["<c>" code (.only Parser)]]] + ["<>" parser]] [data [collection ["[0]" array (.only Array)] ["[0]" dictionary] ["[0]" list]]] + [macro + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] ["[0]" type (.only) ["[0]" check]] ["@" target diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux index b43fb8c4f..3029aec9d 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/ruby.lux @@ -5,13 +5,15 @@ [abstract ["[0]" monad (.only do)]] [control - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["<>" parser]] [data [collection ["[0]" array] ["[0]" dictionary] ["[0]" list]]] + [macro + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] ["[0]" type (.only) ["[0]" check]] ["@" target (.only) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux index 0220eb1f4..bf1493940 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/scheme.lux @@ -5,13 +5,15 @@ [abstract ["[0]" monad (.only do)]] [control - ["<>" parser (.only) - ["<c>" code (.only Parser)]]] + ["<>" parser]] [data [collection ["[0]" array (.only Array)] ["[0]" dictionary] ["[0]" list]]] + [macro + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] ["[0]" type (.only) ["[0]" check]] ["@" target (.only) @@ -31,7 +33,7 @@ (def array::new Handler (custom - [<c>.any + [<code>.any (function (_ extension phase archive lengthC) (<| analysis/type.with_var (function (_ [@var :var:])) @@ -44,7 +46,7 @@ (def array::length Handler (custom - [<c>.any + [<code>.any (function (_ extension phase archive arrayC) (<| analysis/type.with_var (function (_ [@var :var:])) @@ -57,7 +59,7 @@ (def array::read Handler (custom - [(<>.and <c>.any <c>.any) + [(<>.and <code>.any <code>.any) (function (_ extension phase archive [indexC arrayC]) (<| analysis/type.with_var (function (_ [@var :var:])) @@ -72,7 +74,7 @@ (def array::write Handler (custom - [(all <>.and <c>.any <c>.any <c>.any) + [(all <>.and <code>.any <code>.any <code>.any) (function (_ extension phase archive [indexC valueC arrayC]) (<| analysis/type.with_var (function (_ [@var :var:])) @@ -89,7 +91,7 @@ (def array::delete Handler (custom - [(all <>.and <c>.any <c>.any) + [(all <>.and <code>.any <code>.any) (function (_ extension phase archive [indexC arrayC]) (<| analysis/type.with_var (function (_ [@var :var:])) @@ -131,7 +133,7 @@ (def scheme::constant Handler (custom - [<c>.text + [<code>.text (function (_ extension phase archive name) (do phase.monad [_ (analysis/type.infer Any)] @@ -140,7 +142,7 @@ (def scheme::apply Handler (custom - [(all <>.and <c>.any (<>.some <c>.any)) + [(all <>.and <code>.any (<>.some <code>.any)) (function (_ extension phase archive [abstractionC inputsC]) (do [! phase.monad] [abstractionA (analysis/type.with_type ..Function diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux index e2833a6c1..05da344e7 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/jvm.lux @@ -5,11 +5,10 @@ [abstract ["[0]" monad (.only do)]] [control + ["<>" parser (.use "[1]#[0]" monad)] ["[0]" pipe] ["[0]" try (.only Try) (.use "[1]#[0]" functor)] - ["[0]" exception] - ["<>" parser (.use "[1]#[0]" monad) - ["<[0]>" code (.only Parser)]]] + ["[0]" exception]] [data ["[0]" product] [binary (.only Binary) @@ -24,7 +23,9 @@ ["[0]" set (.only Set)]]] [macro ["^" pattern] - ["[0]" template]] + ["[0]" template] + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] [math [number ["n" nat] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux index 20f7aa448..0d02b109f 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/directive/lux.lux @@ -7,11 +7,10 @@ ["[0]" monad (.only do)]] [control [io (.only IO)] + ["<>" parser] ["[0]" maybe (.use "[1]#[0]" functor)] ["[0]" try] - ["[0]" exception (.only exception)] - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["[0]" exception (.only exception)]] [data ["[0]" binary] ["[0]" product] @@ -24,7 +23,8 @@ ["[0]" set (.only Set)]]] [macro ["^" pattern] - ["[0]" code]] + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] [math [number ["n" nat]]] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux index 25e2a8d21..42c75531d 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/common_lisp/runtime.lux @@ -5,9 +5,8 @@ [abstract ["[0]" monad (.only do)]] [control - ["[0]" function] - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser] + ["[0]" function]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" hash) @@ -18,7 +17,8 @@ ["[0]" sequence]]] ["[0]" macro (.only) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number (.only hex) ["[0]" i64]]] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux index 5e96d3ec3..75cb5a86e 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/extension.lux @@ -3,16 +3,14 @@ [lux (.except) [abstract ["[0]" monad (.only do)]] - [control - [parser - ["<[0]>" code]]] [data [collection ["[0]" list (.use "[1]#[0]" functor)]]] ["[0]" meta] ["[0]" macro (.only with_symbols) - ["[0]" code] - [syntax (.only syntax)]]]] + [syntax (.only syntax)] + ["[0]" code (.only) + ["<[1]>" \\parser]]]]] ["[0]" /// ["[1][0]" extension] [// diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux index 45ec51f44..3eaadc3f5 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/js/runtime.lux @@ -5,9 +5,8 @@ [abstract ["[0]" monad (.only do)]] [control - ["[0]" function] - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser] + ["[0]" function]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" hash) @@ -19,7 +18,8 @@ ["[0]" sequence]]] ["[0]" macro (.only) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number (.only hex) ["[0]" i64]]] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux index 1e9b333c4..f7fb63f10 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/lua/runtime.lux @@ -5,9 +5,8 @@ [abstract ["[0]" monad (.only do)]] [control - ["[0]" function] - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser] + ["[0]" function]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" hash) @@ -19,7 +18,8 @@ ["[0]" sequence]]] ["[0]" macro (.only) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number (.only hex) ["[0]" i64]]] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux index c1867a620..1254f50bc 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/php/runtime.lux @@ -5,9 +5,8 @@ [abstract ["[0]" monad (.only do)]] [control - ["[0]" function] - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser] + ["[0]" function]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" hash) @@ -19,7 +18,8 @@ ["[0]" sequence]]] ["[0]" macro (.only) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number (.only hex) ["[0]" i64]]] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux index 40b7ebd56..dfef07d7c 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/python/runtime.lux @@ -4,9 +4,8 @@ [abstract ["[0]" monad (.only do)]] [control - ["[0]" function] - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser] + ["[0]" function]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" hash) @@ -18,7 +17,8 @@ ["[0]" sequence]]] ["[0]" macro (.only) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number (.only hex) ["f" frac] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux index 69fff57bc..089bdf2b9 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/r/runtime.lux @@ -5,9 +5,8 @@ [abstract ["[0]" monad (.only do)]] [control - ["[0]" function] - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser] + ["[0]" function]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" hash) @@ -19,7 +18,8 @@ ["[0]" sequence]]] ["[0]" macro (.only) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number (.only hex) ["n" nat] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux index 4754c861b..74261ccc3 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/runtime.lux @@ -5,9 +5,8 @@ [abstract ["[0]" monad (.only do)]] [control - ["[0]" function] - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser] + ["[0]" function]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" hash) @@ -19,7 +18,8 @@ ["[0]" sequence]]] ["[0]" macro (.only) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number (.only hex) ["[0]" i64] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux index bbb7db4e9..a99e83f84 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/extension/common.lux @@ -3,9 +3,6 @@ [lux (.except) [abstract ["[0]" monad (.only do)]] - [control - [parser - ["<[0]>" code]]] [data ["[0]" product] ["[0]" text] @@ -15,8 +12,9 @@ ["[0]" list (.use "[1]#[0]" functor)] ["dict" dictionary (.only Dictionary)]]] ["[0]" macro (.only with_symbols) - ["[0]" code] - [syntax (.only syntax)]] + [syntax (.only syntax)] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [target ["_" scheme (.only Expression Computation)]]]] ["[0]" /// diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux index 35e49dc7e..0b287568a 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/scheme/runtime.lux @@ -5,9 +5,8 @@ [abstract ["[0]" monad (.only do)]] [control - ["[0]" function] - ["<>" parser (.only) - ["<[0]>" code]]] + ["<>" parser] + ["[0]" function]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" hash) @@ -19,7 +18,8 @@ ["[0]" sequence]]] ["[0]" macro (.only) [syntax (.only syntax)] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number (.only hex) ["[0]" i64]]] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux index 1e1e062eb..7b31c9a0a 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux @@ -31,10 +31,9 @@ [abstract [monad (.only do)]] [control + ["<>" parser] ["[0]" maybe] - ["[0]" exception (.only exception)] - ["<>" parser (.only) - ["<[0]>" code]]] + ["[0]" exception (.only exception)]] [data ["[0]" text (.only) [\\parser (.only Offset)] @@ -44,7 +43,9 @@ ["[0]" dictionary (.only Dictionary)]]] [macro [syntax (.only syntax)] - ["[0]" template]] + ["[0]" template] + ["[0]" code + ["<[1]>" \\parser]]] [meta ["[0]" symbol]] [math diff --git a/stdlib/source/library/lux/type.lux b/stdlib/source/library/lux/type.lux index ac1e01df2..00afaddc0 100644 --- a/stdlib/source/library/lux/type.lux +++ b/stdlib/source/library/lux/type.lux @@ -6,10 +6,9 @@ [equivalence (.only Equivalence)] [monad (.only Monad do)]] [control + ["<>" parser] ["[0]" function] - ["[0]" maybe] - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["[0]" maybe]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" monoid equivalence)] @@ -19,7 +18,8 @@ ["[0]" macro (.only) [syntax (.only syntax)] ["^" pattern] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]] [math [number ["n" nat (.use "[1]#[0]" decimal)]]] diff --git a/stdlib/source/library/lux/type/dynamic.lux b/stdlib/source/library/lux/type/dynamic.lux index 9afa8f395..fd98afcdf 100644 --- a/stdlib/source/library/lux/type/dynamic.lux +++ b/stdlib/source/library/lux/type/dynamic.lux @@ -4,14 +4,14 @@ ["[0]" debug] [control ["[0]" try (.only Try)] - ["[0]" exception (.only exception)] - [parser - ["<[0]>" code]]] + ["[0]" exception (.only exception)]] [data [text ["%" \\format]]] [macro (.only with_symbols) - ["[0]" syntax (.only syntax)]] + ["[0]" syntax (.only syntax)] + ["[0]" code + ["<[1]>" \\parser]]] ["[0]" type (.only) ["[0]" primitive (.only primitive)]]]]) diff --git a/stdlib/source/library/lux/type/implicit.lux b/stdlib/source/library/lux/type/implicit.lux index 3b330f2c1..f831c551b 100644 --- a/stdlib/source/library/lux/type/implicit.lux +++ b/stdlib/source/library/lux/type/implicit.lux @@ -5,10 +5,9 @@ ["[0]" monad (.only do)] ["[0]" equivalence]] [control + ["<>" parser] ["[0]" maybe] - ["[0]" try] - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["[0]" try]] [data ["[0]" product] ["[0]" text (.use "[1]#[0]" equivalence) @@ -17,8 +16,9 @@ ["[0]" list (.use "[1]#[0]" monad mix)] ["[0]" dictionary (.only Dictionary)]]] ["[0]" macro (.only) - ["[0]" code] - [syntax (.only syntax)]] + [syntax (.only syntax)] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]] [math ["[0]" number (.only) ["n" nat]]] diff --git a/stdlib/source/library/lux/type/poly.lux b/stdlib/source/library/lux/type/poly.lux index 1555bfe9a..4f70bb937 100644 --- a/stdlib/source/library/lux/type/poly.lux +++ b/stdlib/source/library/lux/type/poly.lux @@ -2,14 +2,11 @@ [library [lux (.except) ["[0]" meta] - ["[0]" type] [abstract ["[0]" monad (.only do)]] [control - ["[0]" maybe] - ["<>" parser (.use "[1]#[0]" monad) - ["<[0]>" type (.only Env)] - ["<[0]>" code (.only Parser)]]] + ["<>" parser (.use "[1]#[0]" monad)] + ["[0]" maybe]] [data ["[0]" product] ["[0]" text] @@ -19,10 +16,13 @@ [macro (.only with_symbols) [syntax (.only syntax)] ["^" pattern] - ["[0]" code]] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]] [math [number - ["n" nat]]]]]) + ["n" nat]]] + ["[0]" type (.only) + ["<[1]>" \\parser (.only Env)]]]]) (def .public polytypic (syntax (_ [name <code>.local diff --git a/stdlib/source/library/lux/type/primitive.lux b/stdlib/source/library/lux/type/primitive.lux index c7d4a147a..50c288e1c 100644 --- a/stdlib/source/library/lux/type/primitive.lux +++ b/stdlib/source/library/lux/type/primitive.lux @@ -5,16 +5,16 @@ [abstract [monad (.only do)]] [control - ["<>" parser (.use "[1]#[0]" monad) - ["<[0]>" code (.only Parser)]]] + ["<>" parser (.use "[1]#[0]" monad)]] [data ["[0]" text (.use "[1]#[0]" equivalence)] [collection ["[0]" list (.use "[1]#[0]" functor)]]] ["[0]" macro (.only) ["^" pattern] - ["[0]" code] ["[0]" context] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]] [syntax (.only syntax) ["|[0]|" export]]] [meta diff --git a/stdlib/source/library/lux/type/quotient.lux b/stdlib/source/library/lux/type/quotient.lux index 8e96bfd3b..98292553c 100644 --- a/stdlib/source/library/lux/type/quotient.lux +++ b/stdlib/source/library/lux/type/quotient.lux @@ -3,11 +3,10 @@ [lux (.except type) [abstract [equivalence (only Equivalence)]] - [control - [parser - ["<[0]>" code]]] [macro (.only with_symbols) - [syntax (.only syntax)]] + [syntax (.only syntax)] + ["[0]" code + ["<[1]>" \\parser]]] ["[0]" type [primitive (.except)]]]]) diff --git a/stdlib/source/library/lux/type/refinement.lux b/stdlib/source/library/lux/type/refinement.lux index a4054407c..3a7a2ef85 100644 --- a/stdlib/source/library/lux/type/refinement.lux +++ b/stdlib/source/library/lux/type/refinement.lux @@ -3,11 +3,10 @@ [lux (.except only type) [abstract [predicate (.only Predicate)]] - [control - [parser - ["<[0]>" code]]] ["[0]" macro (.only) - [syntax (.only syntax)]] + [syntax (.only syntax)] + ["[0]" code + ["<[1]>" \\parser]]] ["[0]" type (.only) [primitive (.except)]]]]) diff --git a/stdlib/source/library/lux/type/resource.lux b/stdlib/source/library/lux/type/resource.lux index 6a35b1567..760f07dc2 100644 --- a/stdlib/source/library/lux/type/resource.lux +++ b/stdlib/source/library/lux/type/resource.lux @@ -6,10 +6,9 @@ ["[0]" monad (.only Monad do) [indexed (.only IxMonad)]]] [control + ["<>" parser] ["[0]" maybe] - ["[0]" exception (.only exception)] - ["<>" parser (.only) - ["<[0]>" code (.only Parser)]]] + ["[0]" exception (.only exception)]] [data [text ["%" \\format (.only format)]] @@ -18,7 +17,9 @@ ["[0]" sequence (.only Sequence)] ["[0]" list (.use "[1]#[0]" functor mix)]]] ["[0]" macro (.only) - [syntax (.only syntax)]] + [syntax (.only syntax)] + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] [math [number ["n" nat]]] diff --git a/stdlib/source/library/lux/type/unit.lux b/stdlib/source/library/lux/type/unit.lux index bcc8f672c..e7327e551 100644 --- a/stdlib/source/library/lux/type/unit.lux +++ b/stdlib/source/library/lux/type/unit.lux @@ -5,11 +5,10 @@ [equivalence (.only Equivalence)] [order (.only Order)] [enum (.only Enum)]] - [control - [parser - ["<[0]>" code]]] ["[0]" macro (.only) - [syntax (.only syntax)]] + [syntax (.only syntax)] + ["[0]" code + ["<[1]>" \\parser]]] [math [number ["i" int]]]]] diff --git a/stdlib/source/library/lux/type/unit/scale.lux b/stdlib/source/library/lux/type/unit/scale.lux index 9eacbb81b..e88ee83e8 100644 --- a/stdlib/source/library/lux/type/unit/scale.lux +++ b/stdlib/source/library/lux/type/unit/scale.lux @@ -1,11 +1,11 @@ (.require [library [lux (.except type) - [control - [parser - ["<[0]>" code]]] + [control] ["[0]" macro (.only) - [syntax (.only syntax)]] + [syntax (.only syntax)] + ["[0]" code + ["<[1]>" \\parser]]] [math [number ["i" int] diff --git a/stdlib/source/library/lux/world/net/http/client.lux b/stdlib/source/library/lux/world/net/http/client.lux index 832ff6f23..52812a399 100644 --- a/stdlib/source/library/lux/world/net/http/client.lux +++ b/stdlib/source/library/lux/world/net/http/client.lux @@ -11,9 +11,7 @@ ["[0]" maybe (.use "[1]#[0]" functor)] ["[0]" try (.only Try)] [concurrency - ["[0]" async (.only Async)]] - [parser - ["<[0]>" code]]] + ["[0]" async (.only Async)]]] [data ["[0]" binary (.only Binary)] ["[0]" text] @@ -21,8 +19,9 @@ ["[0]" dictionary]]] [macro [syntax (.only syntax)] - ["[0]" code] - ["[0]" template]] + ["[0]" template] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [math [number ["n" nat] |