From 104130efba46a875eba566384578f8aa8593ad37 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 1 Jul 2022 18:53:58 -0400 Subject: Moved "lux/macro/code" to "lux/meta/code". --- stdlib/source/library/lux/abstract/interval.lux | 4 +- .../source/library/lux/abstract/monad/indexed.lux | 3 +- .../source/library/lux/control/concatenative.lux | 8 +- stdlib/source/library/lux/control/continuation.lux | 3 +- stdlib/source/library/lux/control/exception.lux | 11 +- .../library/lux/control/function/contract.lux | 9 +- .../source/library/lux/control/function/inline.lux | 8 +- .../source/library/lux/control/function/mutual.lux | 8 +- stdlib/source/library/lux/control/io.lux | 8 +- stdlib/source/library/lux/control/lazy.lux | 8 +- stdlib/source/library/lux/control/pipe.lux | 9 +- stdlib/source/library/lux/control/remember.lux | 4 +- .../library/lux/control/security/capability.lux | 8 +- .../library/lux/data/collection/sequence.lux | 9 +- .../source/library/lux/data/collection/stream.lux | 9 +- stdlib/source/library/lux/data/collection/tree.lux | 3 +- .../source/library/lux/data/format/css/class.lux | 4 +- stdlib/source/library/lux/data/format/css/font.lux | 8 +- stdlib/source/library/lux/data/format/css/id.lux | 4 +- .../library/lux/data/format/css/property.lux | 5 +- .../source/library/lux/data/format/css/query.lux | 12 +- .../source/library/lux/data/format/css/value.lux | 8 +- stdlib/source/library/lux/data/format/json.lux | 10 +- stdlib/source/library/lux/data/text/escape.lux | 4 +- stdlib/source/library/lux/data/text/regex.lux | 10 +- stdlib/source/library/lux/debug.lux | 8 +- stdlib/source/library/lux/documentation.lux | 8 +- stdlib/source/library/lux/extension.lux | 3 +- stdlib/source/library/lux/ffi.jvm.lux | 14 +-- stdlib/source/library/lux/ffi.lux | 10 +- stdlib/source/library/lux/ffi.old.lux | 8 +- stdlib/source/library/lux/ffi.php.lux | 8 +- stdlib/source/library/lux/ffi.scm.lux | 8 +- stdlib/source/library/lux/ffi/export.js.lux | 66 +++++----- stdlib/source/library/lux/ffi/export.jvm.lux | 3 +- stdlib/source/library/lux/ffi/export.lua.lux | 90 +++++++------- stdlib/source/library/lux/ffi/export.py.lux | 52 ++++---- stdlib/source/library/lux/ffi/export.rb.lux | 70 +++++------ stdlib/source/library/lux/macro.lux | 11 +- stdlib/source/library/lux/macro/code.lux | 135 --------------------- stdlib/source/library/lux/macro/context.lux | 10 +- stdlib/source/library/lux/macro/local.lux | 10 +- stdlib/source/library/lux/macro/syntax.lux | 10 +- stdlib/source/library/lux/macro/syntax/check.lux | 3 +- .../library/lux/macro/syntax/declaration.lux | 2 +- .../source/library/lux/macro/syntax/definition.lux | 8 +- stdlib/source/library/lux/macro/syntax/export.lux | 3 +- stdlib/source/library/lux/macro/syntax/input.lux | 2 +- .../library/lux/macro/syntax/type/variable.lux | 2 +- stdlib/source/library/lux/macro/template.lux | 10 +- stdlib/source/library/lux/math.lux | 10 +- stdlib/source/library/lux/math/infix.lux | 9 +- stdlib/source/library/lux/math/modular.lux | 7 +- stdlib/source/library/lux/math/modulus.lux | 11 +- stdlib/source/library/lux/math/number/complex.lux | 9 +- stdlib/source/library/lux/math/number/ratio.lux | 3 +- stdlib/source/library/lux/meta.lux | 6 +- stdlib/source/library/lux/meta/code.lux | 135 +++++++++++++++++++++ stdlib/source/library/lux/meta/configuration.lux | 10 +- stdlib/source/library/lux/meta/type.lux | 8 +- stdlib/source/library/lux/meta/type/dynamic.lux | 3 +- stdlib/source/library/lux/meta/type/implicit.lux | 9 +- stdlib/source/library/lux/meta/type/poly.lux | 9 +- stdlib/source/library/lux/meta/type/primitive.lux | 18 +-- stdlib/source/library/lux/meta/type/quotient.lux | 3 +- stdlib/source/library/lux/meta/type/refinement.lux | 3 +- stdlib/source/library/lux/meta/type/resource.lux | 10 +- stdlib/source/library/lux/meta/type/unit.lux | 9 +- stdlib/source/library/lux/meta/type/unit/scale.lux | 10 +- stdlib/source/library/lux/meta/version.lux | 4 +- stdlib/source/library/lux/program.lux | 3 +- stdlib/source/library/lux/static.lux | 10 +- stdlib/source/library/lux/target/jvm/bytecode.lux | 2 +- stdlib/source/library/lux/target/jvm/modifier.lux | 8 +- .../source/library/lux/target/jvm/type/alias.lux | 9 +- stdlib/source/library/lux/target/lua.lux | 8 +- stdlib/source/library/lux/target/php.lux | 8 +- stdlib/source/library/lux/target/python.lux | 8 +- stdlib/source/library/lux/target/r.lux | 8 +- stdlib/source/library/lux/target/ruby.lux | 8 +- stdlib/source/library/lux/test.lux | 6 +- .../lux/tool/compiler/language/lux/analysis.lux | 8 +- .../tool/compiler/language/lux/phase/analysis.lux | 4 +- .../compiler/language/lux/phase/analysis/case.lux | 4 +- .../language/lux/phase/analysis/complex.lux | 3 +- .../language/lux/phase/extension/analysis/js.lux | 7 +- .../language/lux/phase/extension/analysis/jvm.lux | 14 +-- .../language/lux/phase/extension/analysis/lua.lux | 5 +- .../language/lux/phase/extension/analysis/lux.lux | 6 +- .../language/lux/phase/extension/analysis/php.lux | 5 +- .../lux/phase/extension/analysis/python.lux | 5 +- .../language/lux/phase/extension/analysis/r.lux | 5 +- .../language/lux/phase/extension/analysis/ruby.lux | 5 +- .../lux/phase/extension/analysis/scheme.lux | 5 +- .../lux/phase/extension/declaration/jvm.lux | 7 +- .../lux/phase/extension/declaration/lux.lux | 8 +- .../lux/phase/generation/common_lisp/runtime.lux | 8 +- .../language/lux/phase/generation/extension.lux | 4 +- .../language/lux/phase/generation/js/runtime.lux | 8 +- .../generation/jvm/function/field/variable.lux | 2 +- .../jvm/function/field/variable/partial.lux | 2 +- .../jvm/function/method/implementation.lux | 2 +- .../phase/generation/jvm/function/method/new.lux | 2 +- .../phase/generation/jvm/function/method/reset.lux | 2 +- .../language/lux/phase/generation/jvm/host.lux | 2 +- .../language/lux/phase/generation/lua/runtime.lux | 8 +- .../language/lux/phase/generation/php/runtime.lux | 8 +- .../lux/phase/generation/python/runtime.lux | 8 +- .../language/lux/phase/generation/r/runtime.lux | 8 +- .../language/lux/phase/generation/ruby/runtime.lux | 8 +- .../phase/generation/scheme/extension/common.lux | 3 +- .../lux/phase/generation/scheme/runtime.lux | 8 +- .../lux/tool/compiler/language/lux/syntax.lux | 6 +- .../source/library/lux/world/net/http/client.lux | 9 +- 114 files changed, 642 insertions(+), 642 deletions(-) delete mode 100644 stdlib/source/library/lux/macro/code.lux create mode 100644 stdlib/source/library/lux/meta/code.lux (limited to 'stdlib/source/library') diff --git a/stdlib/source/library/lux/abstract/interval.lux b/stdlib/source/library/lux/abstract/interval.lux index 913f29274..e5ed383fc 100644 --- a/stdlib/source/library/lux/abstract/interval.lux +++ b/stdlib/source/library/lux/abstract/interval.lux @@ -4,8 +4,8 @@ [lux (.except)]] [// [equivalence (.only Equivalence)] - ["[0]" order] - [enum (.only Enum)]]) + [enum (.only Enum)] + ["[0]" order]]) (type .public (Interval a) (Interface diff --git a/stdlib/source/library/lux/abstract/monad/indexed.lux b/stdlib/source/library/lux/abstract/monad/indexed.lux index 8d03d011e..cba3ac6e1 100644 --- a/stdlib/source/library/lux/abstract/monad/indexed.lux +++ b/stdlib/source/library/lux/abstract/monad/indexed.lux @@ -7,7 +7,8 @@ [collection ["[0]" list (.use "[1]#[0]" functor mix)]]] ["[0]" macro (.only) - [syntax (.only syntax)] + [syntax (.only syntax)]] + [meta ["[0]" code (.only) ["<[1]>" \\parser (.only Parser)]]]]] ["[0]" //]) diff --git a/stdlib/source/library/lux/control/concatenative.lux b/stdlib/source/library/lux/control/concatenative.lux index 3a24dedfc..795d387cb 100644 --- a/stdlib/source/library/lux/control/concatenative.lux +++ b/stdlib/source/library/lux/control/concatenative.lux @@ -13,9 +13,7 @@ ["[0]" list (.use "[1]#[0]" mix functor)]]] ["[0]" macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" template] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]]] + ["[0]" template]] [math [number ["n" nat] @@ -23,7 +21,9 @@ ["r" rev] ["f" frac]]] ["[0]" meta (.only) - ["[0]" type]]]] + ["[0]" type] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]] [// ["<>" parser (.use "[1]#[0]" monad)]]) diff --git a/stdlib/source/library/lux/control/continuation.lux b/stdlib/source/library/lux/control/continuation.lux index a9e62ac66..8a398b377 100644 --- a/stdlib/source/library/lux/control/continuation.lux +++ b/stdlib/source/library/lux/control/continuation.lux @@ -8,7 +8,8 @@ [control ["[0]" function]] [macro (.only with_symbols) - [syntax (.only syntax)] + [syntax (.only syntax)]] + [meta ["[0]" code (.only) ["<[1]>" \\parser]]]]]) diff --git a/stdlib/source/library/lux/control/exception.lux b/stdlib/source/library/lux/control/exception.lux index cf45dfe13..073db8397 100644 --- a/stdlib/source/library/lux/control/exception.lux +++ b/stdlib/source/library/lux/control/exception.lux @@ -1,8 +1,6 @@ (.require [library [lux (.except except with) - ["[0]" macro] - ["[0]" meta] [abstract [monad (.only do)]] [control @@ -13,16 +11,17 @@ ["[0]" text (.use "[1]#[0]" monoid)] [collection ["[0]" list (.use "[1]#[0]" functor mix)]]] - [macro - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]] + ["[0]" macro (.only) [syntax (.only syntax) ["|[0]|" input] ["[0]" type ["|[1]_[0]|" variable]]]] [math [number - ["n" nat (.use "[1]#[0]" decimal)]]]]] + ["n" nat (.use "[1]#[0]" decimal)]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]] [// ["//" try (.only Try)]]) diff --git a/stdlib/source/library/lux/control/function/contract.lux b/stdlib/source/library/lux/control/function/contract.lux index df8702fed..bb6ef6731 100644 --- a/stdlib/source/library/lux/control/function/contract.lux +++ b/stdlib/source/library/lux/control/function/contract.lux @@ -7,12 +7,13 @@ [text ["%" \\format (.only format)]]] [macro (.only with_symbols) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number - ["i" int]]]]]) + ["i" int]]] + [meta + ["[0]" code (.only) + ["<[1]>" \\parser]]]]]) (with_template [] [(exception .public ( [condition Code]) diff --git a/stdlib/source/library/lux/control/function/inline.lux b/stdlib/source/library/lux/control/function/inline.lux index 98d6e56c9..0564edc3d 100644 --- a/stdlib/source/library/lux/control/function/inline.lux +++ b/stdlib/source/library/lux/control/function/inline.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - ["[0]" meta] [abstract ["[0]" monad (.only do)]] [control @@ -10,10 +9,11 @@ [collection ["[0]" list (.use "[1]#[0]" monad)]]] ["[0]" macro (.only) - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]] [syntax (.only syntax) - ["|[0]|" export]]]]]) + ["|[0]|" export]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (def declaration (Parser [Text (List Code)]) diff --git a/stdlib/source/library/lux/control/function/mutual.lux b/stdlib/source/library/lux/control/function/mutual.lux index fb74ef01e..f00643060 100644 --- a/stdlib/source/library/lux/control/function/mutual.lux +++ b/stdlib/source/library/lux/control/function/mutual.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except Definition let def macro) - ["[0]" meta] [abstract ["[0]" monad (.only do)]] [control @@ -15,10 +14,11 @@ ["[0]" list (.use "[1]#[0]" functor)]]] ["[0]" macro (.only) ["[0]" local] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]] [syntax (.only syntax) - ["[0]" declaration (.only Declaration)]]]]] + ["[0]" declaration (.only Declaration)]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]] ["[0]" //]) (type Mutual diff --git a/stdlib/source/library/lux/control/io.lux b/stdlib/source/library/lux/control/io.lux index 13eda4b75..bd0e441e2 100644 --- a/stdlib/source/library/lux/control/io.lux +++ b/stdlib/source/library/lux/control/io.lux @@ -7,12 +7,12 @@ [monad (.only Monad do)]] [macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" template] - ["[0]" code - ["<[1]>" \\parser]]] + ["[0]" template]] [meta [type - [primitive (.except)]]]]]) + [primitive (.except)]] + ["[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 d2bf0531f..857fdccff 100644 --- a/stdlib/source/library/lux/control/lazy.lux +++ b/stdlib/source/library/lux/control/lazy.lux @@ -11,12 +11,12 @@ [concurrency ["[0]" atom]]] [macro (.only with_symbols) - [syntax (.only syntax)] - ["[0]" code - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [meta [type (.only sharing) - [primitive (.except)]]]]]) + [primitive (.except)]] + ["[0]" code + ["<[1]>" \\parser]]]]]) (primitive .public (Lazy a) (-> [] a) diff --git a/stdlib/source/library/lux/control/pipe.lux b/stdlib/source/library/lux/control/pipe.lux index 99e7a697c..cdd6589b8 100644 --- a/stdlib/source/library/lux/control/pipe.lux +++ b/stdlib/source/library/lux/control/pipe.lux @@ -11,13 +11,14 @@ [collection ["[0]" list (.use "[1]#[0]" monad)]]] [macro (.only with_symbols) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]]] + [syntax (.only syntax)]] [math [number ["n" nat] - ["i" int]]]]]) + ["i" int]]] + [meta + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (def body (Parser (List Code)) diff --git a/stdlib/source/library/lux/control/remember.lux b/stdlib/source/library/lux/control/remember.lux index bce726fb1..227a7bd4b 100644 --- a/stdlib/source/library/lux/control/remember.lux +++ b/stdlib/source/library/lux/control/remember.lux @@ -14,10 +14,10 @@ [time ["[0]" instant] ["[0]" date (.only Date) (.use "[1]#[0]" order)]] - ["[0]" meta] [macro [syntax (.only syntax)] - ["[0]" template] + ["[0]" template]] + ["[0]" meta (.only) ["[0]" code (.only) ["<[1]>" \\parser (.only Parser)]]]]]) diff --git a/stdlib/source/library/lux/control/security/capability.lux b/stdlib/source/library/lux/control/security/capability.lux index 90a503c3a..2a8627855 100644 --- a/stdlib/source/library/lux/control/security/capability.lux +++ b/stdlib/source/library/lux/control/security/capability.lux @@ -16,13 +16,13 @@ [meta [type [primitive (.except)]]] - ["[0]" meta] ["[0]" macro (.only) - ["[0]" code (.only) - ["<[1]>" \\parser]] [syntax (.only syntax) ["|[0]|" export] - ["|[0]|" declaration]]]]]) + ["|[0]|" declaration]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]]]]) (primitive .public (Capability brand input output) (-> input output) diff --git a/stdlib/source/library/lux/data/collection/sequence.lux b/stdlib/source/library/lux/data/collection/sequence.lux index 1f5186289..77873fa40 100644 --- a/stdlib/source/library/lux/data/collection/sequence.lux +++ b/stdlib/source/library/lux/data/collection/sequence.lux @@ -27,13 +27,14 @@ ["[1]" \\unsafe (.only Array)]]]] [macro [syntax (.only syntax)] - ["^" pattern] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]]] + ["^" pattern]] [math [number ["n" nat] - ["[0]" i64]]]]]) + ["[0]" i64]]] + [meta + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (type (Node a) (Variant diff --git a/stdlib/source/library/lux/data/collection/stream.lux b/stdlib/source/library/lux/data/collection/stream.lux index 4e82cbe1e..3c41ccda0 100644 --- a/stdlib/source/library/lux/data/collection/stream.lux +++ b/stdlib/source/library/lux/data/collection/stream.lux @@ -12,12 +12,13 @@ [collection ["[0]" list (.use "[1]#[0]" monad)]]] [macro (.only with_symbols) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]]] + [syntax (.only syntax)]] [math [number - ["n" nat]]]]]) + ["n" nat]]] + [meta + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (type .public (Stream a) (Cont [a (Stream a)])) diff --git a/stdlib/source/library/lux/data/collection/tree.lux b/stdlib/source/library/lux/data/collection/tree.lux index 64288458d..2e7c7b59d 100644 --- a/stdlib/source/library/lux/data/collection/tree.lux +++ b/stdlib/source/library/lux/data/collection/tree.lux @@ -12,7 +12,8 @@ [collection ["[0]" list (.use "[1]#[0]" monad mix)]]] [macro - [syntax (.only syntax)] + [syntax (.only syntax)]] + [meta ["[0]" code (.only) ["<[1]>" \\parser (.only Parser)]]]]]) diff --git a/stdlib/source/library/lux/data/format/css/class.lux b/stdlib/source/library/lux/data/format/css/class.lux index 95ecbb9dc..cf0d3423a 100644 --- a/stdlib/source/library/lux/data/format/css/class.lux +++ b/stdlib/source/library/lux/data/format/css/class.lux @@ -8,9 +8,9 @@ ["[0]" text (.use "[1]#[0]" hash) ["%" \\format (.only format)]]] [macro - [syntax (.only syntax)] - ["[0]" code]] + [syntax (.only syntax)]] [meta + ["[0]" code] [type [primitive (.except)]]]]]) diff --git a/stdlib/source/library/lux/data/format/css/font.lux b/stdlib/source/library/lux/data/format/css/font.lux index 37d63c8c7..5d97d5382 100644 --- a/stdlib/source/library/lux/data/format/css/font.lux +++ b/stdlib/source/library/lux/data/format/css/font.lux @@ -1,11 +1,9 @@ (.require [library [lux (.except) - [type - abstract] - [control - [parser - ["s" code]]] + [meta + [code + ["s" \\parser]]] [world [net (.only URL)]]]] ["[0]" // diff --git a/stdlib/source/library/lux/data/format/css/id.lux b/stdlib/source/library/lux/data/format/css/id.lux index d4ce16d6a..ee61013bf 100644 --- a/stdlib/source/library/lux/data/format/css/id.lux +++ b/stdlib/source/library/lux/data/format/css/id.lux @@ -8,9 +8,9 @@ ["[0]" text (.use "[1]#[0]" hash) ["%" \\format (.only format)]]] [macro - [syntax (.only syntax)] - ["[0]" code]] + [syntax (.only syntax)]] [meta + ["[0]" code] [type [primitive (.except)]]]]]) diff --git a/stdlib/source/library/lux/data/format/css/property.lux b/stdlib/source/library/lux/data/format/css/property.lux index 089e117c2..1a3b8ee02 100644 --- a/stdlib/source/library/lux/data/format/css/property.lux +++ b/stdlib/source/library/lux/data/format/css/property.lux @@ -1,9 +1,6 @@ (.require [library [lux (.except All Location) - [control - [parser - ["s" code]]] [data ["[0]" text]] [macro @@ -11,6 +8,8 @@ ["[0]" template] ["[0]" code]] [meta + [code + ["s" \\parser]] [type [primitive (.except)]]]]] [// diff --git a/stdlib/source/library/lux/data/format/css/query.lux b/stdlib/source/library/lux/data/format/css/query.lux index ec39e8425..d3edc6d31 100644 --- a/stdlib/source/library/lux/data/format/css/query.lux +++ b/stdlib/source/library/lux/data/format/css/query.lux @@ -1,17 +1,15 @@ (.require [library [lux (.except and or not) - [control - [parser - ["s" code]]] [data - ["[0]" text + ["[0]" text (.only) ["%" \\format (.only format)]]] [macro - ["[0]" template] - ["[0]" code] - [syntax (.only syntax)]] + [syntax (.only syntax)] + ["[0]" template]] [meta + ["[0]" code (.only syntax) + ["s" \\parser]] [type [primitive (.except)]]]]] ["[0]" // diff --git a/stdlib/source/library/lux/data/format/css/value.lux b/stdlib/source/library/lux/data/format/css/value.lux index 14d2a2cec..d4732c5da 100644 --- a/stdlib/source/library/lux/data/format/css/value.lux +++ b/stdlib/source/library/lux/data/format/css/value.lux @@ -12,9 +12,7 @@ ["[0]" list (.use "[1]#[0]" functor)]]] [macro [syntax (.only syntax)] - ["[0]" template] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + ["[0]" template]] [math [number ["n" nat] @@ -23,7 +21,9 @@ ["f" frac]]] [meta [type - [primitive (.except)]]] + [primitive (.except)]] + ["[0]" code (.only) + ["<[1]>" \\parser]]] [world [net (.only URL)]]]] [// diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux index 2bb8638fb..d419ac68f 100644 --- a/stdlib/source/library/lux/data/format/json.lux +++ b/stdlib/source/library/lux/data/format/json.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except has) - ["[0]" meta (.only monad)] [abstract [equivalence (.only Equivalence)] [codec (.only Codec)] @@ -24,13 +23,14 @@ ["[0]" dictionary (.only Dictionary)]]] [macro [syntax (.only syntax)] - ["^" pattern] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + ["^" pattern]] [math [number ["n" nat] - ["f" frac (.use "[1]#[0]" decimal)]]]]]) + ["f" frac (.use "[1]#[0]" decimal)]]] + ["[0]" meta (.only monad) + ["[0]" code (.only) + ["<[1]>" \\parser]]]]]) (with_template [ ] [(type .public diff --git a/stdlib/source/library/lux/data/text/escape.lux b/stdlib/source/library/lux/data/text/escape.lux index aff108c29..9963627fb 100644 --- a/stdlib/source/library/lux/data/text/escape.lux +++ b/stdlib/source/library/lux/data/text/escape.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - ["[0]" meta] [abstract [monad (.only do)]] [control @@ -14,7 +13,8 @@ ["n" nat]]] [macro [syntax (.only syntax)] - ["^" pattern] + ["^" pattern]] + ["[0]" meta (.only) ["[0]" code (.only) ["<[1]>" \\parser]]]]] ["[0]" // (.only Char) diff --git a/stdlib/source/library/lux/data/text/regex.lux b/stdlib/source/library/lux/data/text/regex.lux index c9a8a5d68..39fb077d0 100644 --- a/stdlib/source/library/lux/data/text/regex.lux +++ b/stdlib/source/library/lux/data/text/regex.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except pattern) - ["[0]" meta] [abstract [monad (.only do)]] [control @@ -17,12 +16,13 @@ ["[0]" list (.use "[1]#[0]" mix monad)]]] [macro (.only with_symbols) [syntax (.only syntax)] - ["^" pattern] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + ["^" pattern]] [math [number (.only hex) - ["n" nat (.use "[1]#[0]" decimal)]]]]] + ["n" nat (.use "[1]#[0]" decimal)]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]]]] ["[0]" // (.only) ["%" \\format (.only format)]]) diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux index 78160f4cd..217cb3947 100644 --- a/stdlib/source/library/lux/debug.lux +++ b/stdlib/source/library/lux/debug.lux @@ -25,9 +25,7 @@ [macro ["^" pattern] ["[0]" template] - ["[0]" syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + ["[0]" syntax (.only syntax)]] [math [number [ratio (.only Ratio)] @@ -41,7 +39,9 @@ [day (.only Day)]] [meta ["[0]" type (.only) - ["<[1]>" \\parser (.only Parser)]]]]]) + ["<[1]>" \\parser (.only Parser)]] + ["[0]" code (.only) + ["<[1]>" \\parser]]]]]) (with_expansions [ (these (import java/lang/String "[1]::[0]") diff --git a/stdlib/source/library/lux/documentation.lux b/stdlib/source/library/lux/documentation.lux index 3f7df3b4e..1aaf71e5c 100644 --- a/stdlib/source/library/lux/documentation.lux +++ b/stdlib/source/library/lux/documentation.lux @@ -21,14 +21,14 @@ ["[0]" macro (.only) [syntax (.only syntax)] ["^" pattern] - ["[0]" template] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]]] + ["[0]" template]] [math [number ["n" nat]]] ["[0]" meta (.only) - ["[0]" type (.use "[1]#[0]" equivalence)]] + ["[0]" type (.use "[1]#[0]" equivalence)] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]] [tool [compiler [language diff --git a/stdlib/source/library/lux/extension.lux b/stdlib/source/library/lux/extension.lux index cfa13af9b..abd125701 100644 --- a/stdlib/source/library/lux/extension.lux +++ b/stdlib/source/library/lux/extension.lux @@ -10,7 +10,8 @@ [collection ["[0]" list (.use "[1]#[0]" functor)]]] [macro (.only with_symbols) - [syntax (.only syntax)] + [syntax (.only syntax)]] + [meta ["[0]" code (.only) ["" \\parser (.only Parser)]]] [tool diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux index 69090b80f..405d5bf09 100644 --- a/stdlib/source/library/lux/ffi.jvm.lux +++ b/stdlib/source/library/lux/ffi.jvm.lux @@ -23,12 +23,15 @@ [syntax (.only syntax)] ["^" pattern] ["[0]" template] - ["[0]" context] - ["[0]" code (.only) - ["<[1]>" \\parser(.only Parser)]]] + ["[0]" context]] [math [number ["n" nat]]] + [meta + ["[0]" type (.use "[1]#[0]" equivalence) + ["[0]" check]] + ["[0]" code (.only) + ["<[1]>" \\parser(.only Parser)]]] [target ["[0]" jvm [encoding @@ -39,10 +42,7 @@ ["[0]" descriptor] ["[0]" signature] ["[0]" reflection] - ["[0]" parser]]]] - [meta - ["[0]" type (.use "[1]#[0]" equivalence) - ["[0]" check]]]]]) + ["[0]" parser]]]]]]) (def internal (-> External Text) diff --git a/stdlib/source/library/lux/ffi.lux b/stdlib/source/library/lux/ffi.lux index 44e4e685e..90681746d 100644 --- a/stdlib/source/library/lux/ffi.lux +++ b/stdlib/source/library/lux/ffi.lux @@ -17,14 +17,14 @@ ["[0]" list (.use "[1]#[0]" monad mix)]]] ["[0]" macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" template] + ["[0]" template]] + [meta + [type + [primitive (.except)]] ["[0]" code (.only) ["<[1]>" \\parser (.only Parser)]]] ["@" target (.only) - ["[0]" js]] - [meta - [type - [primitive (.except)]]]]]) + ["[0]" js]]]]) (with_expansions [ (for @.js "js constant" @.python "python constant" diff --git a/stdlib/source/library/lux/ffi.old.lux b/stdlib/source/library/lux/ffi.old.lux index f713ebf1c..e35e7844d 100644 --- a/stdlib/source/library/lux/ffi.old.lux +++ b/stdlib/source/library/lux/ffi.old.lux @@ -21,11 +21,11 @@ ["[0]" macro (.only with_symbols) [syntax (.only syntax)] ["^" pattern] - ["[0]" template] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]]] + ["[0]" template]] ["[0]" meta (.only) - ["[0]" type (.use "[1]#[0]" equivalence)]]]]) + ["[0]" type (.use "[1]#[0]" equivalence)] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (with_template [ ] [(def .public ( value) diff --git a/stdlib/source/library/lux/ffi.php.lux b/stdlib/source/library/lux/ffi.php.lux index a720cc6f1..42df739ad 100644 --- a/stdlib/source/library/lux/ffi.php.lux +++ b/stdlib/source/library/lux/ffi.php.lux @@ -16,12 +16,12 @@ ["[0]" list (.use "[1]#[0]" functor)]]] [macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" template] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]]] + ["[0]" template]] ["[0]" meta (.only) [type - abstract]]]]) + abstract] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (primitive .public (Object brand) Any) diff --git a/stdlib/source/library/lux/ffi.scm.lux b/stdlib/source/library/lux/ffi.scm.lux index 679a9b58e..04d157393 100644 --- a/stdlib/source/library/lux/ffi.scm.lux +++ b/stdlib/source/library/lux/ffi.scm.lux @@ -16,12 +16,12 @@ ["[0]" list (.use "[1]#[0]" functor)]]] [macro (.only with_symbols) [syntax (.only syntax)] - ["[0]" template] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]]] + ["[0]" template]] ["[0]" meta (.only) [type - abstract]]]]) + abstract] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (primitive .public (Object brand) Any) diff --git a/stdlib/source/library/lux/ffi/export.js.lux b/stdlib/source/library/lux/ffi/export.js.lux index a887d9f84..2a0d25f6f 100644 --- a/stdlib/source/library/lux/ffi/export.js.lux +++ b/stdlib/source/library/lux/ffi/export.js.lux @@ -2,7 +2,6 @@ [library [lux (.except) [extension (.only declaration)] - ["[0]" meta] ["[0]" static] [abstract ["[0]" monad (.only do)]] @@ -15,11 +14,12 @@ ["[0]" list (.use "[1]#[0]" monad mix)] ["[0]" set]]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math ["[0]" random]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]] [target ["/" js]] [tool @@ -51,39 +51,39 @@ random.nat)] (declaration ( self phase archive [name .text term .any]) - (do [! phase.monad] - [next declaration.analysis - [_ term] (<| declaration.lifted_analysis - type.inferring - (next archive term)) + (do [! phase.monad] + [next declaration.analysis + [_ term] (<| declaration.lifted_analysis + type.inferring + (next archive term)) - next declaration.synthesis - term (declaration.lifted_synthesis - (next archive term)) + next declaration.synthesis + term (declaration.lifted_synthesis + (next archive term)) - dependencies (declaration.lifted_generation - (dependency.dependencies archive term)) + dependencies (declaration.lifted_generation + (dependency.dependencies archive term)) - next declaration.generation - [interim_artifacts term] (declaration.lifted_generation - (generation.with_interim_artifacts archive - (next archive term))) + next declaration.generation + [interim_artifacts term] (declaration.lifted_generation + (generation.with_interim_artifacts archive + (next archive term))) - _ (declaration.lifted_generation - (do ! - [@self (generation.learn_custom name (list#mix set.has dependencies interim_artifacts)) - .let [$module (/.var "module") - $exports (/.the "exports" $module) - definition (/.define (/.var name) term) - export (/.when (/.not (/.= (/.string "undefined") (/.type_of $module))) - (/.set (/.the name $exports) (/.var name))) - code (all /.then - definition - export)] - _ (generation.execute! definition) - _ (generation.save! @self {.#None} code)] - (generation.log! (%.format "Export " (%.text name)))))] - (in declaration.no_requirements))) + _ (declaration.lifted_generation + (do ! + [@self (generation.learn_custom name (list#mix set.has dependencies interim_artifacts)) + .let [$module (/.var "module") + $exports (/.the "exports" $module) + definition (/.define (/.var name) term) + export (/.when (/.not (/.= (/.string "undefined") (/.type_of $module))) + (/.set (/.the name $exports) (/.var name))) + code (all /.then + definition + export)] + _ (generation.execute! definition) + _ (generation.save! @self {.#None} code)] + (generation.log! (%.format "Export " (%.text name)))))] + (in declaration.no_requirements))) (def .public export (syntax (_ [exports (<>.many .any)]) diff --git a/stdlib/source/library/lux/ffi/export.jvm.lux b/stdlib/source/library/lux/ffi/export.jvm.lux index 6aebb2c13..876491f0a 100644 --- a/stdlib/source/library/lux/ffi/export.jvm.lux +++ b/stdlib/source/library/lux/ffi/export.jvm.lux @@ -7,7 +7,8 @@ [collection ["[0]" list (.use "[1]#[0]" monad)]]] [macro - [syntax (.only syntax)] + [syntax (.only syntax)]] + [meta ["[0]" code (.only) ["<[1]>" \\parser (.only Parser)]]]]] ["[0]" //]) diff --git a/stdlib/source/library/lux/ffi/export.lua.lux b/stdlib/source/library/lux/ffi/export.lua.lux index c38eaf711..ef326c6ab 100644 --- a/stdlib/source/library/lux/ffi/export.lua.lux +++ b/stdlib/source/library/lux/ffi/export.lua.lux @@ -2,7 +2,6 @@ [library [lux (.except) [extension (.only declaration)] - ["[0]" meta] ["[0]" static] [abstract ["[0]" monad (.only do)]] @@ -15,11 +14,12 @@ ["[0]" list (.use "[1]#[0]" monad mix)] ["[0]" set]]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math ["[0]" random]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]] [target ["/" lua]] [tool @@ -55,51 +55,51 @@ random.nat)] (declaration ( self phase archive [name .text term .any]) - (do [! phase.monad] - [next declaration.analysis - [_ term] (<| declaration.lifted_analysis - type.inferring - (next archive term)) + (do [! phase.monad] + [next declaration.analysis + [_ term] (<| declaration.lifted_analysis + type.inferring + (next archive term)) - next declaration.synthesis - term (declaration.lifted_synthesis - (next archive term)) + next declaration.synthesis + term (declaration.lifted_synthesis + (next archive term)) - dependencies (declaration.lifted_generation - (dependency.dependencies archive term)) + dependencies (declaration.lifted_generation + (dependency.dependencies archive term)) - next declaration.generation - [interim_artifacts term] (declaration.lifted_generation - (generation.with_interim_artifacts archive - (next archive term))) + next declaration.generation + [interim_artifacts term] (declaration.lifted_generation + (generation.with_interim_artifacts archive + (next archive term))) - _ (declaration.lifted_generation - (do ! - [@self (generation.learn_custom name (list#mix set.has dependencies interim_artifacts)) - .let [$exports (/.var "_REQUIREDNAME") - $global (/.var "_G") - exporting? (/.not (/.= /.nil $exports)) - no_exports? (/.= /.nil (/.item $exports $global)) - initialize_exports! (/.set (list (/.item $exports $global)) (/.table (list))) - export_definition! (/.set (|> $global - (/.item $exports) - (/.item (/.string name)) - (list)) - (/.var name)) - export! (/.when exporting? - (all /.then - (/.when no_exports? - initialize_exports!) - export_definition! - ))] - _ (generation.execute! (all /.then - (/.set (list (/.var name)) term) - export!)) - _ (generation.save! @self {.#None} (all /.then - (/.local/1 (/.var name) term) - export!))] - (generation.log! (%.format "Export " (%.text name)))))] - (in declaration.no_requirements))) + _ (declaration.lifted_generation + (do ! + [@self (generation.learn_custom name (list#mix set.has dependencies interim_artifacts)) + .let [$exports (/.var "_REQUIREDNAME") + $global (/.var "_G") + exporting? (/.not (/.= /.nil $exports)) + no_exports? (/.= /.nil (/.item $exports $global)) + initialize_exports! (/.set (list (/.item $exports $global)) (/.table (list))) + export_definition! (/.set (|> $global + (/.item $exports) + (/.item (/.string name)) + (list)) + (/.var name)) + export! (/.when exporting? + (all /.then + (/.when no_exports? + initialize_exports!) + export_definition! + ))] + _ (generation.execute! (all /.then + (/.set (list (/.var name)) term) + export!)) + _ (generation.save! @self {.#None} (all /.then + (/.local/1 (/.var name) term) + export!))] + (generation.log! (%.format "Export " (%.text name)))))] + (in declaration.no_requirements))) (def .public export (syntax (_ [exports (<>.many .any)]) diff --git a/stdlib/source/library/lux/ffi/export.py.lux b/stdlib/source/library/lux/ffi/export.py.lux index be61ff11e..4c1fe2cc0 100644 --- a/stdlib/source/library/lux/ffi/export.py.lux +++ b/stdlib/source/library/lux/ffi/export.py.lux @@ -2,7 +2,6 @@ [library [lux (.except) [extension (.only declaration)] - ["[0]" meta] ["[0]" static] [abstract ["[0]" monad (.only do)]] @@ -15,11 +14,12 @@ ["[0]" list (.use "[1]#[0]" monad mix)] ["[0]" set]]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math ["[0]" random]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]] [target ["/" python]] [tool @@ -51,32 +51,32 @@ random.nat)] (declaration ( self phase archive [name .text term .any]) - (do [! phase.monad] - [next declaration.analysis - [_ term] (<| declaration.lifted_analysis - type.inferring - (next archive term)) + (do [! phase.monad] + [next declaration.analysis + [_ term] (<| declaration.lifted_analysis + type.inferring + (next archive term)) - next declaration.synthesis - term (declaration.lifted_synthesis - (next archive term)) + next declaration.synthesis + term (declaration.lifted_synthesis + (next archive term)) - dependencies (declaration.lifted_generation - (dependency.dependencies archive term)) + dependencies (declaration.lifted_generation + (dependency.dependencies archive term)) - next declaration.generation - [interim_artifacts term] (declaration.lifted_generation - (generation.with_interim_artifacts archive - (next archive term))) + next declaration.generation + [interim_artifacts term] (declaration.lifted_generation + (generation.with_interim_artifacts archive + (next archive term))) - _ (declaration.lifted_generation - (do ! - [@self (generation.learn_custom name (list#mix set.has dependencies interim_artifacts)) - .let [code (/.set (list (/.item (/.string name) /.globals/0)) term)] - _ (generation.execute! code) - _ (generation.save! @self {.#None} code)] - (generation.log! (%.format "Export " (%.text name)))))] - (in declaration.no_requirements))) + _ (declaration.lifted_generation + (do ! + [@self (generation.learn_custom name (list#mix set.has dependencies interim_artifacts)) + .let [code (/.set (list (/.item (/.string name) /.globals/0)) term)] + _ (generation.execute! code) + _ (generation.save! @self {.#None} code)] + (generation.log! (%.format "Export " (%.text name)))))] + (in declaration.no_requirements))) (def .public export (syntax (_ [exports (<>.many .any)]) diff --git a/stdlib/source/library/lux/ffi/export.rb.lux b/stdlib/source/library/lux/ffi/export.rb.lux index b29982a1c..ff00305b6 100644 --- a/stdlib/source/library/lux/ffi/export.rb.lux +++ b/stdlib/source/library/lux/ffi/export.rb.lux @@ -2,7 +2,6 @@ [library [lux (.except global) [extension (.only declaration)] - ["[0]" meta] ["[0]" static] ["[0]" type] [abstract @@ -17,11 +16,12 @@ ["[0]" list (.use "[1]#[0]" monad mix)] ["[0]" set]]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math ["[0]" random]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]] [target ["/" ruby]] [tool @@ -90,42 +90,42 @@ (declaration ( self phase archive [global? .bit name .text term .any]) - (do [! phase.monad] - [next declaration.analysis - [type term] (<| declaration.lifted_analysis - analysis.inferring - (next archive term)) + (do [! phase.monad] + [next declaration.analysis + [type term] (<| declaration.lifted_analysis + analysis.inferring + (next archive term)) - next declaration.synthesis - term (declaration.lifted_synthesis - (next archive term)) + next declaration.synthesis + term (declaration.lifted_synthesis + (next archive term)) - dependencies (declaration.lifted_generation - (dependency.dependencies archive term)) + dependencies (declaration.lifted_generation + (dependency.dependencies archive term)) - next declaration.generation - [interim_artifacts term] (declaration.lifted_generation - (generation.with_interim_artifacts archive - (next archive term))) + next declaration.generation + [interim_artifacts term] (declaration.lifted_generation + (generation.with_interim_artifacts archive + (next archive term))) - _ (declaration.lifted_generation - (do ! - [@self (generation.learn_custom name (list#mix set.has dependencies interim_artifacts)) - .let [[:input:/* :output:] (type.flat_function type) - code (if global? - (/.set (list (/.manual name)) term) - (case :input:/* - {.#End} - (/.function (/.manual name) (list) - (/.return term)) + _ (declaration.lifted_generation + (do ! + [@self (generation.learn_custom name (list#mix set.has dependencies interim_artifacts)) + .let [[:input:/* :output:] (type.flat_function type) + code (if global? + (/.set (list (/.manual name)) term) + (case :input:/* + {.#End} + (/.function (/.manual name) (list) + (/.return term)) - _ - (/.statement (/.apply (list (/.string name) term) {.#None} - (/.manual "define_method")))))] - _ (generation.execute! code) - _ (generation.save! @self {.#None} code)] - (generation.log! (%.format "Export " (%.text name)))))] - (in declaration.no_requirements))) + _ + (/.statement (/.apply (list (/.string name) term) {.#None} + (/.manual "define_method")))))] + _ (generation.execute! code) + _ (generation.save! @self {.#None} code)] + (generation.log! (%.format "Export " (%.text name)))))] + (in declaration.no_requirements))) (def .public export (syntax (_ [exports (<>.many .any)]) diff --git a/stdlib/source/library/lux/macro.lux b/stdlib/source/library/lux/macro.lux index e14bf061b..612077261 100644 --- a/stdlib/source/library/lux/macro.lux +++ b/stdlib/source/library/lux/macro.lux @@ -11,12 +11,11 @@ [number ["[0]" nat] ["[0]" int]]]]] - [/ - ["[0]" code] - ["[0]" // - ["[1]" meta (.only) - ["[0]" location] - ["[0]" symbol (.use "[1]#[0]" codec)]]]]) + ["[0]" // + ["[1]" meta (.only) + ["[0]" code] + ["[0]" location] + ["[0]" symbol (.use "[1]#[0]" codec)]]]) (def .public (single_expansion syntax) (-> Code (Meta (List Code))) diff --git a/stdlib/source/library/lux/macro/code.lux b/stdlib/source/library/lux/macro/code.lux deleted file mode 100644 index dc182b124..000000000 --- a/stdlib/source/library/lux/macro/code.lux +++ /dev/null @@ -1,135 +0,0 @@ -(.require - [library - [lux (.except nat int rev local global symbol) - [abstract - [equivalence (.only Equivalence)]] - [data - ["[0]" product] - ["[0]" bit] - ["[0]" text (.use "[1]#[0]" monoid equivalence)] - [collection - ["[0]" list (.use "[1]#[0]" functor mix)]]] - [macro - ["^" pattern]] - [math - [number - ["[0]" nat] - ["[0]" int] - ["[0]" rev] - ["[0]" frac]]] - [meta - ["[0]" location] - ["[0]" symbol]]]]) - -... (type (Code' w) -... {.#Bit Bit} -... {.#Nat Nat} -... {.#Int Int} -... {.#Rev Rev} -... {.#Frac Frac} -... {.#Text Text} -... {.#Symbol Symbol} -... {.#Form (List (w (Code' w)))} -... {.#Variant (List (w (Code' w)))} -... {.#Tuple (List (w (Code' w)))}) - -... (type Code -... (Ann Location (Code' (Ann Location)))) - -(with_template [ ] - [(def .public ( x) - (-> Code) - [location.dummy { x}])] - - [bit Bit .#Bit] - [nat Nat .#Nat] - [int Int .#Int] - [rev Rev .#Rev] - [frac Frac .#Frac] - [text Text .#Text] - [symbol Symbol .#Symbol] - [form (List Code) .#Form] - [variant (List Code) .#Variant] - [tuple (List Code) .#Tuple] - ) - -(with_template [ ] - [(def .public ( name) - (-> Text Code) - [location.dummy { ["" name]}])] - - [local .#Symbol]) - -(def .public equivalence - (Equivalence Code) - (implementation - (def (= x y) - (case [x y] - (^.with_template [ ] - [[[_ { x'}] [_ { y'}]] - (at = x' y')]) - ([.#Bit bit.equivalence] - [.#Nat nat.equivalence] - [.#Int int.equivalence] - [.#Rev rev.equivalence] - [.#Frac frac.equivalence] - [.#Text text.equivalence] - [.#Symbol symbol.equivalence]) - - (^.with_template [] - [[[_ { xs'}] [_ { ys'}]] - (at (list.equivalence =) = xs' ys')]) - ([.#Form] - [.#Variant] - [.#Tuple]) - - _ - false)))) - -(def .public (format ast) - (-> Code Text) - (case ast - (^.with_template [ ] - [[_ { value}] - (at encoded value)]) - ([.#Bit bit.codec] - [.#Nat nat.decimal] - [.#Int int.decimal] - [.#Rev rev.decimal] - [.#Frac frac.decimal] - [.#Symbol symbol.codec]) - - [_ {.#Text value}] - (text.format value) - - (^.with_template [ ] - [[_ { members}] - (all text#composite - - (list#mix (function (_ next prev) - (let [next (format next)] - (if (text#= "" prev) - next - (all text#composite prev " " next)))) - "" - members) - )]) - ([.#Form "(" ")"] - [.#Variant "{" "}"] - [.#Tuple "[" "]"]) - )) - -(def .public (replaced original substitute ast) - (-> Code Code Code Code) - (if (at ..equivalence = original ast) - substitute - (case ast - (^.with_template [] - [[location { parts}] - [location { (list#each (replaced original substitute) parts)}]]) - ([.#Form] - [.#Variant] - [.#Tuple]) - - _ - ast))) diff --git a/stdlib/source/library/lux/macro/context.lux b/stdlib/source/library/lux/macro/context.lux index b85f94af8..e1a127bf9 100644 --- a/stdlib/source/library/lux/macro/context.lux +++ b/stdlib/source/library/lux/macro/context.lux @@ -14,15 +14,13 @@ [collection ["[0]" list (.only) ["[0]" property]]]] - [macro - ["[0]" code - ["?[1]" \\parser]]] ["[0]" meta (.only) - ["[0]" symbol (.use "[1]#[0]" codec)]]]] + ["[0]" symbol (.use "[1]#[0]" codec)] + ["[0]" code (.only) + ["?[1]" \\parser]]]]] ["[0]" // (.only) [syntax (.only syntax)] - ["^" pattern] - ["[0]" code]]) + ["^" pattern]]) (type .public Stack List) diff --git a/stdlib/source/library/lux/macro/local.lux b/stdlib/source/library/lux/macro/local.lux index 29fa9820c..036da756f 100644 --- a/stdlib/source/library/lux/macro/local.lux +++ b/stdlib/source/library/lux/macro/local.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except with let) - ["[0]" meta] [abstract ["[0]" monad (.only do)]] [control @@ -13,11 +12,12 @@ ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" functor) - ["[0]" property]]]]]] + ["[0]" property]]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]]]] ["[0]" // (.only) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]]) + [syntax (.only syntax)]]) (exception .public (unknown_module [module Text]) (exception.report diff --git a/stdlib/source/library/lux/macro/syntax.lux b/stdlib/source/library/lux/macro/syntax.lux index 5f8242c85..8e9d32686 100644 --- a/stdlib/source/library/lux/macro/syntax.lux +++ b/stdlib/source/library/lux/macro/syntax.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - ["[0]" meta] [abstract ["[0]" monad (.only do)]] [control @@ -10,10 +9,11 @@ [data ["[0]" text (.use "[1]#[0]" monoid)] [collection - ["[0]" list]]]]] - ["[0]" // (.only with_symbols) - ["[0]" code (.only) - ["" \\parser (.only Parser)]]]) + ["[0]" list]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["" \\parser (.only Parser)]]]]] + ["[0]" // (.only with_symbols)]) (def (self_documenting binding parser) (All (_ a) (-> Code (Parser a) (Parser a))) diff --git a/stdlib/source/library/lux/macro/syntax/check.lux b/stdlib/source/library/lux/macro/syntax/check.lux index 7a4b6ac73..69621e1e2 100644 --- a/stdlib/source/library/lux/macro/syntax/check.lux +++ b/stdlib/source/library/lux/macro/syntax/check.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - ["[0]" meta] [abstract [equivalence (.only Equivalence)] [monad (.only do)]] @@ -9,7 +8,7 @@ ["<>" parser]] [data ["[0]" product]] - [macro + [meta ["[0]" code (.only) ["<[1]>" \\parser (.only Parser)]]]]]) diff --git a/stdlib/source/library/lux/macro/syntax/declaration.lux b/stdlib/source/library/lux/macro/syntax/declaration.lux index dbb86e1ce..a60ce50ad 100644 --- a/stdlib/source/library/lux/macro/syntax/declaration.lux +++ b/stdlib/source/library/lux/macro/syntax/declaration.lux @@ -10,7 +10,7 @@ ["[0]" text] [collection ["[0]" list (.use "[1]#[0]" functor)]]] - [macro + [meta ["[0]" code (.only) ["<[1]>" \\parser (.only Parser)]]]]]) diff --git a/stdlib/source/library/lux/macro/syntax/definition.lux b/stdlib/source/library/lux/macro/syntax/definition.lux index b93e0bd64..9c8551195 100644 --- a/stdlib/source/library/lux/macro/syntax/definition.lux +++ b/stdlib/source/library/lux/macro/syntax/definition.lux @@ -1,6 +1,7 @@ (.require [library [lux (.except Definition) + ["[0]" macro] [abstract [equivalence (.only Equivalence)] [monad (.only do)]] @@ -15,11 +16,10 @@ ["%" \\format]] [collection ["[0]" list]]] - ["[0]" macro (.only) - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]]] ["[0]" meta (.only) - ["[0]" location]]]] + ["[0]" location] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]] ["[0]" // (.only) ["[1][0]" check (.only Check)]]) diff --git a/stdlib/source/library/lux/macro/syntax/export.lux b/stdlib/source/library/lux/macro/syntax/export.lux index e47b09750..81400ed1f 100644 --- a/stdlib/source/library/lux/macro/syntax/export.lux +++ b/stdlib/source/library/lux/macro/syntax/export.lux @@ -6,7 +6,8 @@ [control ["<>" parser]] [macro - ["^" pattern] + ["^" pattern]] + [meta ["[0]" code ["<[1]>" \\parser (.only Parser)]]]]]) diff --git a/stdlib/source/library/lux/macro/syntax/input.lux b/stdlib/source/library/lux/macro/syntax/input.lux index 1354a9a54..4461c7df9 100644 --- a/stdlib/source/library/lux/macro/syntax/input.lux +++ b/stdlib/source/library/lux/macro/syntax/input.lux @@ -9,7 +9,7 @@ ["[0]" product] [collection ["[0]" list (.use "[1]#[0]" monad)]]] - [macro + [meta ["[0]" code (.only) ["<[1]>" \\parser (.only Parser)]]]]]) diff --git a/stdlib/source/library/lux/macro/syntax/type/variable.lux b/stdlib/source/library/lux/macro/syntax/type/variable.lux index 2658572e6..363f85fc0 100644 --- a/stdlib/source/library/lux/macro/syntax/type/variable.lux +++ b/stdlib/source/library/lux/macro/syntax/type/variable.lux @@ -5,7 +5,7 @@ [equivalence (.only Equivalence)]] [data ["[0]" text]] - [macro + [meta ["[0]" code (.only) ["<[1]>" \\parser (.only Parser)]]]]]) diff --git a/stdlib/source/library/lux/macro/template.lux b/stdlib/source/library/lux/macro/template.lux index 68a37a237..cc82b10f3 100644 --- a/stdlib/source/library/lux/macro/template.lux +++ b/stdlib/source/library/lux/macro/template.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except let local symbol macro) - ["[0]" meta] [abstract ["[0]" monad (.only do)]] [control @@ -21,12 +20,13 @@ ["[0]" nat (.use "[1]#[0]" decimal)] ["[0]" int (.use "[1]#[0]" decimal)] ["[0]" rev (.use "[1]#[0]" decimal)] - ["[0]" frac (.use "[1]#[0]" decimal)]]]]] + ["[0]" frac (.use "[1]#[0]" decimal)]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]] ["[0]" // (.only) [syntax (.only syntax)] - ["[0]" local] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]]]) + ["[0]" local]]) (def .public spliced (syntax (_ [parts (.tuple (<>.some .any))]) diff --git a/stdlib/source/library/lux/math.lux b/stdlib/source/library/lux/math.lux index d5b8f2629..d2c69aede 100644 --- a/stdlib/source/library/lux/math.lux +++ b/stdlib/source/library/lux/math.lux @@ -17,7 +17,10 @@ ["[0]" list (.use "[1]#[0]" mix)]]] [macro [syntax (.only syntax)] - ["[0]" template] + ["[0]" template]] + [meta + [type + ["[0]" check]] ["[0]" code ["<[1]>" \\parser]]] [tool @@ -28,10 +31,7 @@ ["[0]" analysis (.only Analysis Operation Phase) ["[0]" type]]]] [meta - [archive (.only Archive)]]]] - [meta - [type - ["[0]" check]]]]] + [archive (.only Archive)]]]]]] [/ ["[0]" random] [number diff --git a/stdlib/source/library/lux/math/infix.lux b/stdlib/source/library/lux/math/infix.lux index 01930c466..ee319a0e7 100644 --- a/stdlib/source/library/lux/math/infix.lux +++ b/stdlib/source/library/lux/math/infix.lux @@ -10,13 +10,14 @@ [collection ["[0]" list (.use "[1]#[0]" mix)]]] [macro - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]]] + [syntax (.only syntax)]] [math [number ["n" nat] - ["i" int]]]]]) + ["i" int]]] + [meta + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (type Infix (Rec Infix diff --git a/stdlib/source/library/lux/math/modular.lux b/stdlib/source/library/lux/math/modular.lux index b2ae0a5b3..b6f9afdc7 100644 --- a/stdlib/source/library/lux/math/modular.lux +++ b/stdlib/source/library/lux/math/modular.lux @@ -15,15 +15,14 @@ ["[0]" product] ["[0]" text (.use "[1]#[0]" monoid) ["<[1]>" \\parser (.only Parser)]]] - [macro - ["[0]" code (.only) - ["<[1]>" \\parser]]] [math [number ["i" int (.use "[1]#[0]" decimal)]]] [meta [type - [primitive (.except)]]]]] + [primitive (.except)]] + ["[0]" code (.only) + ["<[1]>" \\parser]]]]] ["[0]" // ["[1]" modulus (.only Modulus)]]) diff --git a/stdlib/source/library/lux/math/modulus.lux b/stdlib/source/library/lux/math/modulus.lux index 333946b3d..46eb4e45e 100644 --- a/stdlib/source/library/lux/math/modulus.lux +++ b/stdlib/source/library/lux/math/modulus.lux @@ -1,22 +1,21 @@ (.require [library [lux (.except) - ["[0]" meta] [abstract [monad (.only do)]] [control ["[0]" try (.only Try)] ["[0]" exception (.only exception)]] [macro - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number ["i" int]]] - [meta + ["[0]" meta (.only) [type - [primitive (.except)]]]]]) + [primitive (.except)]] + ["[0]" code (.only) + ["<[1]>" \\parser]]]]]) (exception .public zero_cannot_be_a_modulus) diff --git a/stdlib/source/library/lux/math/number/complex.lux b/stdlib/source/library/lux/math/number/complex.lux index d22ce8ad2..5e8161de3 100644 --- a/stdlib/source/library/lux/math/number/complex.lux +++ b/stdlib/source/library/lux/math/number/complex.lux @@ -10,13 +10,14 @@ [collection ["[0]" list (.use "[1]#[0]" functor)]]] [macro - [syntax (.only syntax)] - ["[0]" code - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number ["f" frac] - ["[0]" int]]]]]) + ["[0]" int]]] + [meta + ["[0]" code + ["<[1]>" \\parser]]]]]) (type .public Complex (Record diff --git a/stdlib/source/library/lux/math/number/ratio.lux b/stdlib/source/library/lux/math/number/ratio.lux index 6deac08f0..d9c927d35 100644 --- a/stdlib/source/library/lux/math/number/ratio.lux +++ b/stdlib/source/library/lux/math/number/ratio.lux @@ -16,7 +16,8 @@ ["[0]" product] ["[0]" text (.use "[1]#[0]" monoid)]] [macro - [syntax (.only syntax)] + [syntax (.only syntax)]] + [meta ["[0]" code (.only) ["<[1]>" \\parser (.only Parser)]]]]] [// diff --git a/stdlib/source/library/lux/meta.lux b/stdlib/source/library/lux/meta.lux index 64d84a933..10f0056d7 100644 --- a/stdlib/source/library/lux/meta.lux +++ b/stdlib/source/library/lux/meta.lux @@ -15,14 +15,14 @@ ["[0]" list (.use "[1]#[0]" monoid monad) ["[0]" property]]]] [macro - ["^" pattern] - ["[0]" code]] + ["^" pattern]] [math [number ["n" nat] ["i" int]]] [meta - ["[0]" symbol (.use "[1]#[0]" codec equivalence)]]]] + ["[0]" symbol (.use "[1]#[0]" codec equivalence)] + ["[0]" code]]]] [/ ["[0]" location]]) diff --git a/stdlib/source/library/lux/meta/code.lux b/stdlib/source/library/lux/meta/code.lux new file mode 100644 index 000000000..dc182b124 --- /dev/null +++ b/stdlib/source/library/lux/meta/code.lux @@ -0,0 +1,135 @@ +(.require + [library + [lux (.except nat int rev local global symbol) + [abstract + [equivalence (.only Equivalence)]] + [data + ["[0]" product] + ["[0]" bit] + ["[0]" text (.use "[1]#[0]" monoid equivalence)] + [collection + ["[0]" list (.use "[1]#[0]" functor mix)]]] + [macro + ["^" pattern]] + [math + [number + ["[0]" nat] + ["[0]" int] + ["[0]" rev] + ["[0]" frac]]] + [meta + ["[0]" location] + ["[0]" symbol]]]]) + +... (type (Code' w) +... {.#Bit Bit} +... {.#Nat Nat} +... {.#Int Int} +... {.#Rev Rev} +... {.#Frac Frac} +... {.#Text Text} +... {.#Symbol Symbol} +... {.#Form (List (w (Code' w)))} +... {.#Variant (List (w (Code' w)))} +... {.#Tuple (List (w (Code' w)))}) + +... (type Code +... (Ann Location (Code' (Ann Location)))) + +(with_template [ ] + [(def .public ( x) + (-> Code) + [location.dummy { x}])] + + [bit Bit .#Bit] + [nat Nat .#Nat] + [int Int .#Int] + [rev Rev .#Rev] + [frac Frac .#Frac] + [text Text .#Text] + [symbol Symbol .#Symbol] + [form (List Code) .#Form] + [variant (List Code) .#Variant] + [tuple (List Code) .#Tuple] + ) + +(with_template [ ] + [(def .public ( name) + (-> Text Code) + [location.dummy { ["" name]}])] + + [local .#Symbol]) + +(def .public equivalence + (Equivalence Code) + (implementation + (def (= x y) + (case [x y] + (^.with_template [ ] + [[[_ { x'}] [_ { y'}]] + (at = x' y')]) + ([.#Bit bit.equivalence] + [.#Nat nat.equivalence] + [.#Int int.equivalence] + [.#Rev rev.equivalence] + [.#Frac frac.equivalence] + [.#Text text.equivalence] + [.#Symbol symbol.equivalence]) + + (^.with_template [] + [[[_ { xs'}] [_ { ys'}]] + (at (list.equivalence =) = xs' ys')]) + ([.#Form] + [.#Variant] + [.#Tuple]) + + _ + false)))) + +(def .public (format ast) + (-> Code Text) + (case ast + (^.with_template [ ] + [[_ { value}] + (at encoded value)]) + ([.#Bit bit.codec] + [.#Nat nat.decimal] + [.#Int int.decimal] + [.#Rev rev.decimal] + [.#Frac frac.decimal] + [.#Symbol symbol.codec]) + + [_ {.#Text value}] + (text.format value) + + (^.with_template [ ] + [[_ { members}] + (all text#composite + + (list#mix (function (_ next prev) + (let [next (format next)] + (if (text#= "" prev) + next + (all text#composite prev " " next)))) + "" + members) + )]) + ([.#Form "(" ")"] + [.#Variant "{" "}"] + [.#Tuple "[" "]"]) + )) + +(def .public (replaced original substitute ast) + (-> Code Code Code Code) + (if (at ..equivalence = original ast) + substitute + (case ast + (^.with_template [] + [[location { parts}] + [location { (list#each (replaced original substitute) parts)}]]) + ([.#Form] + [.#Variant] + [.#Tuple]) + + _ + ast))) diff --git a/stdlib/source/library/lux/meta/configuration.lux b/stdlib/source/library/lux/meta/configuration.lux index d1858ca56..3ed5e3e6c 100644 --- a/stdlib/source/library/lux/meta/configuration.lux +++ b/stdlib/source/library/lux/meta/configuration.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except for) - ["[0]" meta] [abstract [equivalence (.only Equivalence)] [monoid (.only Monoid)] @@ -18,11 +17,12 @@ ["[0]" list (.use "[1]#[0]" functor mix) ["/" property]]]] [macro - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math - [number (.only hex)]]]]) + [number (.only hex)]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]]]]) (type .public Configuration (/.List Text)) diff --git a/stdlib/source/library/lux/meta/type.lux b/stdlib/source/library/lux/meta/type.lux index 00afaddc0..b2c4173a8 100644 --- a/stdlib/source/library/lux/meta/type.lux +++ b/stdlib/source/library/lux/meta/type.lux @@ -17,15 +17,15 @@ ["[0]" list (.use "[1]#[0]" monad monoid mix)]]] ["[0]" macro (.only) [syntax (.only syntax)] - ["^" pattern] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]]] + ["^" pattern]] [math [number ["n" nat (.use "[1]#[0]" decimal)]]] ["[0]" meta (.only) ["[0]" location] - ["[0]" symbol (.use "[1]#[0]" equivalence codec)]]]]) + ["[0]" symbol (.use "[1]#[0]" equivalence codec)] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]]) (with_template [ ] [(def .public ( type) diff --git a/stdlib/source/library/lux/meta/type/dynamic.lux b/stdlib/source/library/lux/meta/type/dynamic.lux index 86ccf5753..90c0b3837 100644 --- a/stdlib/source/library/lux/meta/type/dynamic.lux +++ b/stdlib/source/library/lux/meta/type/dynamic.lux @@ -9,7 +9,8 @@ [text ["%" \\format]]] [macro (.only with_symbols) - ["[0]" syntax (.only syntax)] + ["[0]" syntax (.only syntax)]] + [meta ["[0]" code ["<[1]>" \\parser]]]]] ["[0]" // (.only) diff --git a/stdlib/source/library/lux/meta/type/implicit.lux b/stdlib/source/library/lux/meta/type/implicit.lux index 977467202..bdea9933d 100644 --- a/stdlib/source/library/lux/meta/type/implicit.lux +++ b/stdlib/source/library/lux/meta/type/implicit.lux @@ -16,12 +16,13 @@ ["[0]" list (.use "[1]#[0]" monad mix)] ["[0]" dictionary (.only Dictionary)]]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]]] + [syntax (.only syntax)]] [math ["[0]" number (.only) - ["n" nat]]]]] + ["n" nat]]] + [meta + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]] ["[0]" // (.use "[1]#[0]" equivalence) ["/[1]" //] ["[0]" check (.only Check)]]) diff --git a/stdlib/source/library/lux/meta/type/poly.lux b/stdlib/source/library/lux/meta/type/poly.lux index 95d9f8ea7..da8fc8a07 100644 --- a/stdlib/source/library/lux/meta/type/poly.lux +++ b/stdlib/source/library/lux/meta/type/poly.lux @@ -14,12 +14,13 @@ ["[0]" dictionary]]] [macro (.only with_symbols) [syntax (.only syntax)] - ["^" pattern] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]]] + ["^" pattern]] [math [number - ["n" nat]]]]] + ["n" nat]]] + [meta + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]] ["[0]" // (.only) ["<[1]>" \\parser (.only Env)] ["/[1]" //]]) diff --git a/stdlib/source/library/lux/meta/type/primitive.lux b/stdlib/source/library/lux/meta/type/primitive.lux index 50c288e1c..e58f13f56 100644 --- a/stdlib/source/library/lux/meta/type/primitive.lux +++ b/stdlib/source/library/lux/meta/type/primitive.lux @@ -13,12 +13,12 @@ ["[0]" macro (.only) ["^" pattern] ["[0]" context] - ["[0]" code (.only) - ["<[1]>" \\parser (.only Parser)]] [syntax (.only syntax) ["|[0]|" export]]] [meta - ["[0]" symbol (.use "[1]#[0]" codec)]]]] + ["[0]" symbol (.use "[1]#[0]" codec)] + ["[0]" code (.only) + ["<[1]>" \\parser (.only Parser)]]]]] ["[0]" //]) (type .public Frame @@ -86,12 +86,12 @@ abstraction_declaration (` ((~ (code.local name)) (~+ type_varsC))) representation_declaration (` ((~ g!Representation) (~+ type_varsC)))]] (..declaration [name type_varsC abstraction_declaration representation_declaration] - (` (.these (type (~ export_policy) (~ abstraction_declaration) - (Primitive (~ (code.text (symbol#encoded [current_module name]))) - [(~+ type_varsC)])) - (type (~ representation_declaration) - (~ representation_type)) - (~+ primitives))))))) + (` (.these (type (~ export_policy) (~ abstraction_declaration) + (Primitive (~ (code.text (symbol#encoded [current_module name]))) + [(~+ type_varsC)])) + (type (~ representation_declaration) + (~ representation_type)) + (~+ primitives))))))) (def selection (Parser [(List Code) Code]) diff --git a/stdlib/source/library/lux/meta/type/quotient.lux b/stdlib/source/library/lux/meta/type/quotient.lux index 72088cd46..6f9c48586 100644 --- a/stdlib/source/library/lux/meta/type/quotient.lux +++ b/stdlib/source/library/lux/meta/type/quotient.lux @@ -4,7 +4,8 @@ [abstract [equivalence (only Equivalence)]] [macro (.only with_symbols) - [syntax (.only syntax)] + [syntax (.only syntax)]] + [meta ["[0]" code ["<[1]>" \\parser]]]]] ["[0]" // (.only) diff --git a/stdlib/source/library/lux/meta/type/refinement.lux b/stdlib/source/library/lux/meta/type/refinement.lux index 24e0aa2e2..45c6d01e6 100644 --- a/stdlib/source/library/lux/meta/type/refinement.lux +++ b/stdlib/source/library/lux/meta/type/refinement.lux @@ -5,7 +5,8 @@ [function [predicate (.only Predicate)]]] ["[0]" macro (.only) - [syntax (.only syntax)] + [syntax (.only syntax)]] + [meta ["[0]" code ["<[1]>" \\parser]]]]] ["[0]" // (.only) diff --git a/stdlib/source/library/lux/meta/type/resource.lux b/stdlib/source/library/lux/meta/type/resource.lux index bd9e71c08..44e9cf7a7 100644 --- a/stdlib/source/library/lux/meta/type/resource.lux +++ b/stdlib/source/library/lux/meta/type/resource.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except) - ["[0]" meta] [abstract ["[0]" monad (.only Monad do) [indexed (.only IxMonad)]]] @@ -17,12 +16,13 @@ ["[0]" sequence (.only Sequence)] ["[0]" list (.use "[1]#[0]" functor mix)]]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code - ["<[1]>" \\parser (.only Parser)]]] + [syntax (.only syntax)]] [math [number - ["n" nat]]]]] + ["n" nat]]] + ["[0]" meta (.only) + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]]]] [// [primitive (.except)]]) diff --git a/stdlib/source/library/lux/meta/type/unit.lux b/stdlib/source/library/lux/meta/type/unit.lux index 994e7ad11..a3fca0079 100644 --- a/stdlib/source/library/lux/meta/type/unit.lux +++ b/stdlib/source/library/lux/meta/type/unit.lux @@ -6,12 +6,13 @@ [order (.only Order)] [enum (.only Enum)]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number - ["i" int]]]]] + ["i" int]]] + [meta + ["[0]" code + ["<[1]>" \\parser]]]]] ["[0]" // (.only) [primitive (.except)]]) diff --git a/stdlib/source/library/lux/meta/type/unit/scale.lux b/stdlib/source/library/lux/meta/type/unit/scale.lux index b7f598d13..f8ea57031 100644 --- a/stdlib/source/library/lux/meta/type/unit/scale.lux +++ b/stdlib/source/library/lux/meta/type/unit/scale.lux @@ -1,15 +1,15 @@ (.require [library [lux (.except type) - [control] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number ["i" int] - ["[0]" ratio (.only Ratio)]]]]] + ["[0]" ratio (.only Ratio)]]] + [meta + ["[0]" code + ["<[1]>" \\parser]]]]] ["[0]" // (.only) ["/[1]" //]]) diff --git a/stdlib/source/library/lux/meta/version.lux b/stdlib/source/library/lux/meta/version.lux index f7df8ac2f..7c3eaf426 100644 --- a/stdlib/source/library/lux/meta/version.lux +++ b/stdlib/source/library/lux/meta/version.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except for) - ["[0]" meta] [abstract [monad (.only do)]] [control @@ -12,7 +11,8 @@ [collection ["[0]" list (.use "[1]#[0]" mix)]]] [macro - [syntax (.only syntax)] + [syntax (.only syntax)]] + ["[0]" meta (.only) ["[0]" code (.only) ["<[1]>" \\parser]]] [tool diff --git a/stdlib/source/library/lux/program.lux b/stdlib/source/library/lux/program.lux index 81b455cb1..c02d60c69 100644 --- a/stdlib/source/library/lux/program.lux +++ b/stdlib/source/library/lux/program.lux @@ -10,7 +10,8 @@ [concurrency ["[0]" thread]]] [macro (.only with_symbols) - [syntax (.only syntax)] + [syntax (.only syntax)]] + [meta ["[0]" code (.only) ["<[1]>" \\parser]]]]] ["" \\parser]) diff --git a/stdlib/source/library/lux/static.lux b/stdlib/source/library/lux/static.lux index a473f8288..5f4560e52 100644 --- a/stdlib/source/library/lux/static.lux +++ b/stdlib/source/library/lux/static.lux @@ -1,7 +1,6 @@ (.require [library [lux (.except nat int rev if cond) - ["[0]" meta (.use "[1]#[0]" functor)] [abstract [monad (.only do)]] [control @@ -10,12 +9,13 @@ [collection ["[0]" list (.use "[1]#[0]" functor mix)]]] [macro - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number (.only hex)] - ["[0]" random (.only Random)]]]]) + ["[0]" random (.only Random)]] + ["[0]" meta (.use "[1]#[0]" functor) + ["[0]" code (.only) + ["<[1]>" \\parser]]]]]) (with_template [ ] [(def .public diff --git a/stdlib/source/library/lux/target/jvm/bytecode.lux b/stdlib/source/library/lux/target/jvm/bytecode.lux index 5d407ac59..267705aa7 100644 --- a/stdlib/source/library/lux/target/jvm/bytecode.lux +++ b/stdlib/source/library/lux/target/jvm/bytecode.lux @@ -29,9 +29,9 @@ ["i" int] ["[0]" i32 (.only I32)]]]]] ["[0]" / + ["_" instruction (.only Primitive_Array_Type Instruction Estimator) (.use "[1]#[0]" monoid)] ["[1][0]" address (.only Address)] ["[1][0]" jump (.only Jump Big_Jump)] - ["_" instruction (.only Primitive_Array_Type Instruction Estimator) (.use "[1]#[0]" monoid)] ["[1][0]" environment (.only Environment) [limit ["/[0]" registry (.only Register Registry)] diff --git a/stdlib/source/library/lux/target/jvm/modifier.lux b/stdlib/source/library/lux/target/jvm/modifier.lux index 9d135aa55..b12b167cc 100644 --- a/stdlib/source/library/lux/target/jvm/modifier.lux +++ b/stdlib/source/library/lux/target/jvm/modifier.lux @@ -11,15 +11,15 @@ ["[0]" binary ["[1]F" \\format (.only Format)]]] [macro (.only with_symbols) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math ["[0]" number (.only hex) ["[0]" i64]]] [meta [type - [primitive (.except)]]]]] + [primitive (.except)]] + ["[0]" code (.only) + ["<[1]>" \\parser]]]]] ["[0]" // [encoding ["[1][0]" unsigned]]]) diff --git a/stdlib/source/library/lux/target/jvm/type/alias.lux b/stdlib/source/library/lux/target/jvm/type/alias.lux index a7cb3625b..8d9ddc7f4 100644 --- a/stdlib/source/library/lux/target/jvm/type/alias.lux +++ b/stdlib/source/library/lux/target/jvm/type/alias.lux @@ -4,9 +4,9 @@ [abstract ["[0]" monad (.only do)]] [control + ["<>" parser (.only)] ["[0]" maybe] - ["[0]" try] - ["<>" parser (.only)]] + ["[0]" try]] [data ["[0]" text (.only) ["%" \\format (.only format)] @@ -18,10 +18,7 @@ ["[1][0]" descriptor] ["[1][0]" signature (.only Signature)] ["[1][0]" reflection] - ["[1][0]" parser] - ["/[1]" // - [encoding - ["[1][0]" name]]]]) + ["[1][0]" parser]]) (type .public Aliasing (Dictionary Text Text)) diff --git a/stdlib/source/library/lux/target/lua.lux b/stdlib/source/library/lux/target/lua.lux index 8f8a3ed42..440c3f4ce 100644 --- a/stdlib/source/library/lux/target/lua.lux +++ b/stdlib/source/library/lux/target/lua.lux @@ -15,9 +15,7 @@ ["[0]" list (.use "[1]#[0]" functor mix)]]] [macro [syntax (.only syntax)] - ["[0]" template] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + ["[0]" template]] [math [number ["n" nat] @@ -25,7 +23,9 @@ ["f" frac]]] [meta [type - [primitive (.except)]]]]]) + [primitive (.except)]] + ["[0]" code (.only) + ["<[1]>" \\parser]]]]]) ... Added the carriage return for better Windows compatibility. (def \n+ diff --git a/stdlib/source/library/lux/target/php.lux b/stdlib/source/library/lux/target/php.lux index 2e11466f9..747a55abf 100644 --- a/stdlib/source/library/lux/target/php.lux +++ b/stdlib/source/library/lux/target/php.lux @@ -15,16 +15,16 @@ ["[0]" list (.use "[1]#[0]" functor mix)]]] [macro [syntax (.only syntax)] - ["[0]" template] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + ["[0]" template]] [math [number ["n" nat] ["f" frac]]] [meta [type - [primitive (.except)]]]]]) + [primitive (.except)]] + ["[0]" code (.only) + ["<[1]>" \\parser]]]]]) (def input_separator ", ") (def statement_suffix ";") diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux index 3237a638c..a297ad529 100644 --- a/stdlib/source/library/lux/target/python.lux +++ b/stdlib/source/library/lux/target/python.lux @@ -16,16 +16,16 @@ ["[0]" list (.use "[1]#[0]" functor mix)]]] [macro [syntax (.only syntax)] - ["[0]" template] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + ["[0]" template]] [math [number ["n" nat] ["f" frac]]] [meta [type - [primitive (.except)]]]]]) + [primitive (.except)]] + ["[0]" code (.only) + ["<[1]>" \\parser]]]]]) (.def input_separator ", ") diff --git a/stdlib/source/library/lux/target/r.lux b/stdlib/source/library/lux/target/r.lux index 4c6d87403..574dcb4bf 100644 --- a/stdlib/source/library/lux/target/r.lux +++ b/stdlib/source/library/lux/target/r.lux @@ -12,15 +12,15 @@ ["[0]" list (.use "[1]#[0]" functor mix)]]] [macro [syntax (.only syntax)] - ["[0]" template] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + ["[0]" template]] [math [number ["f" frac]]] [meta [type - [primitive (.except)]]]]]) + [primitive (.except)]] + ["[0]" code (.only) + ["<[1]>" \\parser]]]]]) (primitive .public (Code kind) Text diff --git a/stdlib/source/library/lux/target/ruby.lux b/stdlib/source/library/lux/target/ruby.lux index b2dee4ea6..aa92ae9b3 100644 --- a/stdlib/source/library/lux/target/ruby.lux +++ b/stdlib/source/library/lux/target/ruby.lux @@ -15,16 +15,16 @@ ["[0]" list (.use "[1]#[0]" functor mix)]]] [macro [syntax (.only syntax)] - ["[0]" template] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + ["[0]" template]] [math [number ["n" nat] ["f" frac]]] [meta [type - [primitive (.except)]]]]]) + [primitive (.except)]] + ["[0]" code (.only) + ["<[1]>" \\parser]]]]]) (def input_separator ", ") (def statement_suffix ";") diff --git a/stdlib/source/library/lux/test.lux b/stdlib/source/library/lux/test.lux index 5f086c633..69db97f42 100644 --- a/stdlib/source/library/lux/test.lux +++ b/stdlib/source/library/lux/test.lux @@ -33,11 +33,11 @@ ["n" nat] ["f" frac]]] [macro - [syntax (.only syntax)] + [syntax (.only syntax)]] + ["[0]" meta (.only) + ["[0]" symbol] ["[0]" code (.only) ["<[1]>" \\parser]]] - ["[0]" meta (.only) - ["[0]" symbol]] [world ["[0]" environment] ["[0]" console]]]]) 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 c3ccd43e9..2d149643e 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/analysis.lux @@ -18,9 +18,7 @@ [collection ["[0]" list (.use "[1]#[0]" functor mix)]]] [macro - [syntax (.only syntax)] - ["[0]" code - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number ["n" nat] @@ -29,7 +27,9 @@ ["f" frac]]] [meta ["[0]" location] - ["[0]" configuration (.only Configuration)]]]] + ["[0]" configuration (.only Configuration)] + ["[0]" code + ["<[1]>" \\parser]]]]] ["[0]" / ["[1][0]" simple (.only Simple)] ["[1][0]" complex (.only Tuple Variant Complex)] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux index 804b99019..adabb8621 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis.lux @@ -11,12 +11,12 @@ [collection ["[0]" list]]] [macro - ["^" pattern] - ["[0]" code]] + ["^" pattern]] [math [number ["n" nat]]] ["[0]" meta (.only) + ["[0]" code] ["[0]" location]]]] ["[0]" / ["[1][0]" simple] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux index 6f3c13d65..db181d050 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/case.lux @@ -17,9 +17,9 @@ [number ["n" nat]]] [macro - ["^" pattern] - ["[0]" code]] + ["^" pattern]] ["[0]" meta (.only) + ["[0]" code] ["[0]" type (.only) ["[0]" check (.only Check)]]]]] ["[0]" / diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux index c355ad0d1..4328de2b2 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/analysis/complex.lux @@ -15,13 +15,12 @@ [collection ["[0]" list (.use "[1]#[0]" monad)] ["[0]" dictionary (.only Dictionary)]]] - [macro - ["[0]" code]] [math [number ["n" nat]]] ["[0]" meta (.only) ["[0]" symbol] + ["[0]" code] ["[0]" type (.only) ["[0]" check]]]]] ["[0]" // 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 580faf086..028f9ea0e 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 @@ -11,12 +11,11 @@ ["[0]" array] ["[0]" dictionary] ["[0]" list]]] - [macro - ["[0]" code - ["<[1]>" \\parser (.only Parser)]]] [meta ["[0]" type (.only) - ["[0]" check]]] + ["[0]" check]] + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] ["@" target (.only) ["_" js]]]] [// 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 cad6fe27b..42e4d3e3c 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 @@ -26,13 +26,16 @@ ["[0]" sequence]]] [macro ["^" pattern] - ["[0]" template] - ["[0]" code - ["<[1]>" \\parser (.only Parser)]]] + ["[0]" template]] [math [number ["n" nat] ["[0]" i32]]] + ["[0]" meta (.only) + ["[0]" code + ["<[1]>" \\parser (.only Parser)]] + ["[0]" type (.only) + ["[0]" check (.only Check) (.use "[1]#[0]" monad)]]] [target ["[0]" jvm ["[0]!" reflection] @@ -55,10 +58,7 @@ ["[0]" signature] ["[0]" parser] ["[0]" alias (.only Aliasing)] - ["[0]T" lux (.only Mapping)]]]] - ["[0]" meta (.only) - ["[0]" type (.only) - ["[0]" check (.only Check) (.use "[1]#[0]" monad)]]]]] + ["[0]T" lux (.only Mapping)]]]]]] ["[0]" // ["[1][0]" lux (.only custom)] ["/[1]" // (.only) 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 d62efd51f..914d3de39 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 @@ -11,10 +11,9 @@ ["[0]" array] ["[0]" dictionary] ["[0]" list]]] - [macro - ["[0]" code - ["<[1]>" \\parser (.only Parser)]]] [meta + ["[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 37ba8abe9..a9932f619 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 @@ -15,13 +15,13 @@ ["[0]" list (.use "[1]#[0]" functor)] ["[0]" dictionary (.only Dictionary)]]] [macro - ["^" pattern] - ["[0]" code - ["<[1]>" \\parser (.only Parser)]]] + ["^" pattern]] [math [number ["n" nat]]] [meta + ["[0]" code + ["<[1]>" \\parser (.only Parser)]] [type ["[0]" check]]] ["[0]" meta]]] 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 3417bf78a..972bd8b90 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 @@ -11,10 +11,9 @@ ["[0]" array (.only Array)] ["[0]" dictionary] ["[0]" list]]] - [macro - ["[0]" code - ["<[1]>" \\parser (.only Parser)]]] [meta + ["[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/python.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/analysis/python.lux index 0712fe644..29b8d1015 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 @@ -11,10 +11,9 @@ ["[0]" array] ["[0]" dictionary] ["[0]" list]]] - [macro - ["[0]" code - ["<[1]>" \\parser (.only Parser)]]] [meta + ["[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 67f44e35a..a1e27d28e 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 @@ -11,10 +11,9 @@ ["[0]" array (.only Array)] ["[0]" dictionary] ["[0]" list]]] - [macro - ["[0]" code - ["<[1]>" \\parser (.only Parser)]]] [meta + ["[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 965f580b1..0bd416eed 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 @@ -11,10 +11,9 @@ ["[0]" array] ["[0]" dictionary] ["[0]" list]]] - [macro - ["[0]" code - ["<[1]>" \\parser (.only Parser)]]] [meta + ["[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 5768379ce..0ea42268f 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 @@ -11,10 +11,9 @@ ["[0]" array (.only Array)] ["[0]" dictionary] ["[0]" list]]] - [macro - ["[0]" code - ["<[1]>" \\parser (.only Parser)]]] [meta + ["[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/declaration/jvm.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/jvm.lux index f43c26adf..556a622be 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/jvm.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/jvm.lux @@ -23,13 +23,14 @@ ["[0]" set (.only Set)]]] [macro ["^" pattern] - ["[0]" template] - ["[0]" code - ["<[1]>" \\parser (.only Parser)]]] + ["[0]" template]] [math [number ["n" nat] ["[0]" i32]]] + [meta + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] [target [jvm ["_" bytecode (.only Bytecode) (.use "[1]#[0]" monad)] diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/lux.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/lux.lux index d2d4592e6..8b50853ac 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/lux.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/extension/declaration/lux.lux @@ -2,7 +2,6 @@ [library [lux (.except) ["@" target] - ["[0]" meta] [abstract ["[0]" monad (.only do)]] [control @@ -22,12 +21,13 @@ ["[0]" list (.use "[1]#[0]" functor mix)] ["[0]" set (.only Set)]]] [macro - ["^" pattern] - ["[0]" code - ["<[1]>" \\parser (.only Parser)]]] + ["^" pattern]] [math [number ["n" nat]]] + ["[0]" meta (.only) + ["[0]" code + ["<[1]>" \\parser (.only Parser)]]] ["[0]" type (.only sharing) (.use "[1]#[0]" equivalence) ["[0]" check]]]] ["[0]" /// (.only Extender) 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 42c75531d..5667e47db 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 @@ -1,7 +1,6 @@ (.require [library [lux (.except Location) - ["[0]" meta] [abstract ["[0]" monad (.only do)]] [control @@ -16,12 +15,13 @@ ["[0]" list (.use "[1]#[0]" functor monoid)] ["[0]" sequence]]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number (.only hex) ["[0]" i64]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]] ["@" target ["_" common_lisp (.only Expression Computation Literal)]]]] ["[0]" /// 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 501587da2..0f8d68aea 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 @@ -6,9 +6,9 @@ [data [collection ["[0]" list (.use "[1]#[0]" functor)]]] - ["[0]" meta] ["[0]" macro (.only with_symbols) - [syntax (.only syntax)] + [syntax (.only syntax)]] + ["[0]" meta (.only) ["[0]" code (.only) ["<[1]>" \\parser]]]]] ["[0]" /// 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 3eaadc3f5..cc2e746e4 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 @@ -1,7 +1,6 @@ (.require [library [lux (.except i64 left right) - ["[0]" meta] [abstract ["[0]" monad (.only do)]] [control @@ -17,12 +16,13 @@ ["[0]" list (.use "[1]#[0]" functor)] ["[0]" sequence]]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number (.only hex) ["[0]" i64]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]] [target ["_" js (.only Expression Var Computation Statement)]]]] ["[0]" /// diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable.lux index 16a7e67a3..08a3c9df8 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable.lux @@ -7,9 +7,9 @@ ["[0]" sequence]]] [target [jvm + ["_" bytecode (.only Bytecode)] ["[0]" modifier (.only Modifier) (.use "[1]#[0]" monoid)] ["[0]" field (.only Field)] - ["_" bytecode (.only Bytecode)] [type (.only Type) [category (.only Value Class)]] [constant diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial.lux index 95b3fb619..4f0e6c222 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial.lux @@ -11,8 +11,8 @@ ["n" nat]]] [target [jvm - ["[0]" field (.only Field)] ["_" bytecode (.only Bytecode) (.use "[1]#[0]" monad)] + ["[0]" field (.only Field)] [type (.only Type) [category (.only Class)]] [constant diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/implementation.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/implementation.lux index 86965220b..438f9f68d 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/implementation.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/implementation.lux @@ -9,9 +9,9 @@ ["n" nat]]] [target [jvm + ["_" bytecode (.only Label Bytecode)] ["[0]" modifier (.only Modifier) (.use "[1]#[0]" monoid)] ["[0]" method (.only Method)] - ["_" bytecode (.only Label Bytecode)] [constant [pool (.only Resource)]] ["[0]" type (.only Type) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/new.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/new.lux index 1daa92777..f61d67d93 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/new.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/new.lux @@ -11,9 +11,9 @@ ["n" nat]]] [target [jvm + ["_" bytecode (.only Bytecode)] ["[0]" field (.only Field)] ["[0]" method (.only Method)] - ["_" bytecode (.only Bytecode)] ["[0]" constant (.only) [pool (.only Resource)]] [type (.only Type) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/reset.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/reset.lux index faff66f47..f38edc961 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/reset.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/function/method/reset.lux @@ -6,8 +6,8 @@ ["[0]" list (.use "[1]#[0]" functor)]]] [target [jvm - ["[0]" method (.only Method)] ["_" bytecode (.only Bytecode)] + ["[0]" method (.only Method)] [constant [pool (.only Resource)]] ["[0]" type (.only Type) diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux index c8d769e87..493b47a6e 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux @@ -12,9 +12,9 @@ [concurrency ["[0]" atom (.only Atom atom)]]] [data + ["[0]" product] [binary (.only Binary) ["[0]" \\format]] - ["[0]" product] ["[0]" text (.use "[1]#[0]" hash) ["%" \\format (.only format)]] [collection 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 f7fb63f10..1c22af9cc 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 @@ -1,7 +1,6 @@ (.require [library [lux (.except Label Location left right) - ["[0]" meta] [abstract ["[0]" monad (.only do)]] [control @@ -17,12 +16,13 @@ ["[0]" list (.use "[1]#[0]" functor)] ["[0]" sequence]]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number (.only hex) ["[0]" i64]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]] ["@" target (.only) ["_" lua (.only Expression Location Var Computation Literal Label Statement)]]]] ["[0]" /// 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 1254f50bc..fa45c35b0 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 @@ -1,7 +1,6 @@ (.require [library [lux (.except Location) - ["[0]" meta] [abstract ["[0]" monad (.only do)]] [control @@ -17,12 +16,13 @@ ["[0]" list (.use "[1]#[0]" functor)] ["[0]" sequence]]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number (.only hex) ["[0]" i64]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]] ["@" target (.only) ["_" php (.only Expression Label Constant Var Computation Literal Statement)]]]] ["[0]" /// 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 dfef07d7c..93f0477c7 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 @@ -16,15 +16,15 @@ ["[0]" list (.use "[1]#[0]" functor)] ["[0]" sequence]]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number (.only hex) ["f" frac] ["[0]" i64]]] ["[0]" meta (.only) - ["[0]" version]] + ["[0]" version] + ["[0]" code (.only) + ["<[1]>" \\parser]]] ["@" target (.only) ["_" python (.only Expression SVar Computation Literal Statement)]]]] ["[0]" /// 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 089bdf2b9..b0d02c095 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 @@ -1,7 +1,6 @@ (.require [library [lux (.except Location ++ i64) - ["[0]" meta] [abstract ["[0]" monad (.only do)]] [control @@ -17,14 +16,15 @@ ["[0]" list (.use "[1]#[0]" functor)] ["[0]" sequence]]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number (.only hex) ["n" nat] ["i" int (.use "[1]#[0]" interval)] ["[0]" i64]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]] ["@" target (.only) ["_" r (.only SVar Expression)]]]] ["[0]" /// 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 74261ccc3..a3d1fe4ab 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 @@ -1,7 +1,6 @@ (.require [library [lux (.except i64 left right) - ["[0]" meta] [abstract ["[0]" monad (.only do)]] [control @@ -17,13 +16,14 @@ ["[0]" list (.use "[1]#[0]" functor mix)] ["[0]" sequence]]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number (.only hex) ["[0]" i64] ["[0]" int (.use "[1]#[0]" interval)]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]] ["@" target (.only) ["_" ruby (.only Expression LVar Computation Literal Statement)]]]] ["[0]" /// 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 a99e83f84..cbf99339c 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 @@ -12,7 +12,8 @@ ["[0]" list (.use "[1]#[0]" functor)] ["dict" dictionary (.only Dictionary)]]] ["[0]" macro (.only with_symbols) - [syntax (.only syntax)] + [syntax (.only syntax)]] + [meta ["[0]" code (.only) ["<[1]>" \\parser]]] [target 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 0b287568a..215e6af9a 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 @@ -1,7 +1,6 @@ (.require [library [lux (.except Location) - ["[0]" meta] [abstract ["[0]" monad (.only do)]] [control @@ -17,12 +16,13 @@ ["[0]" list (.use "[1]#[0]" functor)] ["[0]" sequence]]] ["[0]" macro (.only) - [syntax (.only syntax)] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + [syntax (.only syntax)]] [math [number (.only hex) ["[0]" i64]]] + ["[0]" meta (.only) + ["[0]" code (.only) + ["<[1]>" \\parser]]] ["@" target (.only) ["_" scheme (.only Expression Computation Var)]]]] ["[0]" /// 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 7b31c9a0a..a3872dfa5 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/syntax.lux @@ -43,11 +43,11 @@ ["[0]" dictionary (.only Dictionary)]]] [macro [syntax (.only syntax)] - ["[0]" template] + ["[0]" template]] + [meta + ["[0]" symbol] ["[0]" code ["<[1]>" \\parser]]] - [meta - ["[0]" symbol]] [math [number ["n" nat] diff --git a/stdlib/source/library/lux/world/net/http/client.lux b/stdlib/source/library/lux/world/net/http/client.lux index 52812a399..3cc84fdcf 100644 --- a/stdlib/source/library/lux/world/net/http/client.lux +++ b/stdlib/source/library/lux/world/net/http/client.lux @@ -19,13 +19,14 @@ ["[0]" dictionary]]] [macro [syntax (.only syntax)] - ["[0]" template] - ["[0]" code (.only) - ["<[1]>" \\parser]]] + ["[0]" template]] [math [number ["n" nat] - ["i" int]]]]] + ["i" int]]] + [meta + ["[0]" code (.only) + ["<[1]>" \\parser]]]]] ["[0]" // (.only) [// (.only URL)]]) -- cgit v1.2.3