From 8d4c256f8b56561869c14df02db695d774c74fa6 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 24 Oct 2022 19:28:57 -0400 Subject: Minor naming & syntax improvements. --- .../lux/control/concurrency/actor.lux | 2 +- .../documentation/lux/meta/type/primitive.lux | 42 +++---- stdlib/source/library/lux.lux | 2 +- .../library/lux/control/concurrency/actor.lux | 6 +- .../library/lux/control/concurrency/async.lux | 4 +- .../library/lux/control/concurrency/atom.lux | 4 +- .../lux/control/concurrency/incremental.lux | 6 +- .../library/lux/control/concurrency/semaphore.lux | 8 +- .../source/library/lux/control/concurrency/stm.lux | 4 +- .../library/lux/control/concurrency/structured.lux | 6 +- .../lux/control/function/polymorphism/context.lux | 10 +- .../control/function/polymorphism/predicate.lux | 6 +- .../lux/control/function/polymorphism/type.lux | 6 +- stdlib/source/library/lux/control/io.lux | 4 +- stdlib/source/library/lux/control/lazy.lux | 4 +- .../library/lux/control/security/capability.lux | 4 +- .../source/library/lux/control/security/policy.lux | 6 +- stdlib/source/library/lux/control/thread.lux | 4 +- .../library/lux/data/collection/queue/priority.lux | 4 +- .../library/lux/data/collection/set/multi.lux | 4 +- .../library/lux/data/collection/set/ordered.lux | 4 +- .../source/library/lux/data/collection/stack.lux | 4 +- .../library/lux/data/collection/tree/finger.lux | 4 +- stdlib/source/library/lux/data/color.lux | 4 +- stdlib/source/library/lux/data/format/css.lux | 8 +- .../source/library/lux/data/format/css/class.lux | 4 +- stdlib/source/library/lux/data/format/css/id.lux | 4 +- .../library/lux/data/format/css/property.lux | 4 +- .../source/library/lux/data/format/css/query.lux | 8 +- .../library/lux/data/format/css/selector.lux | 16 +-- .../source/library/lux/data/format/css/style.lux | 4 +- .../source/library/lux/data/format/css/value.lux | 18 +-- stdlib/source/library/lux/data/format/html.lux | 10 +- stdlib/source/library/lux/data/format/markdown.lux | 8 +- stdlib/source/library/lux/data/format/tar.lux | 16 +-- stdlib/source/library/lux/data/text/buffer.lux | 4 +- stdlib/source/library/lux/data/text/encoding.lux | 4 +- .../source/library/lux/data/text/unicode/block.lux | 4 +- .../source/library/lux/data/text/unicode/set.lux | 4 +- stdlib/source/library/lux/debug.lux | 2 +- stdlib/source/library/lux/ffi.jvm.lux | 15 ++- stdlib/source/library/lux/ffi.lux | 6 +- stdlib/source/library/lux/ffi.php.lux | 6 +- stdlib/source/library/lux/ffi.scm.lux | 6 +- stdlib/source/library/lux/math/modular.lux | 4 +- stdlib/source/library/lux/math/modulus.lux | 4 +- stdlib/source/library/lux/math/random.lux | 4 +- .../language/lux/phase/extension/analysis/lux.lux | 7 +- .../lux/phase/extension/generation/jvm/common.lux | 2 +- .../library/lux/meta/compiler/meta/archive.lux | 4 +- .../library/lux/meta/compiler/meta/archive/key.lux | 4 +- .../meta/compiler/meta/archive/module/document.lux | 4 +- .../lux/meta/compiler/meta/archive/registry.lux | 4 +- stdlib/source/library/lux/meta/macro/context.lux | 8 +- stdlib/source/library/lux/meta/macro/expansion.lux | 12 +- stdlib/source/library/lux/meta/macro/pattern.lux | 22 ++-- .../source/library/lux/meta/macro/vocabulary.lux | 16 +-- .../source/library/lux/meta/target/common_lisp.lux | 8 +- stdlib/source/library/lux/meta/target/js.lux | 8 +- .../lux/meta/target/jvm/bytecode/address.lux | 4 +- .../jvm/bytecode/environment/limit/registry.lux | 4 +- .../jvm/bytecode/environment/limit/stack.lux | 4 +- .../lux/meta/target/jvm/bytecode/instruction.lux | 4 +- .../library/lux/meta/target/jvm/constant.lux | 6 +- .../library/lux/meta/target/jvm/constant/tag.lux | 4 +- .../library/lux/meta/target/jvm/encoding/name.lux | 4 +- .../lux/meta/target/jvm/encoding/signed.lux | 6 +- .../lux/meta/target/jvm/encoding/unsigned.lux | 6 +- .../source/library/lux/meta/target/jvm/index.lux | 4 +- .../library/lux/meta/target/jvm/modifier.lux | 4 +- .../library/lux/meta/target/jvm/modifier/inner.lux | 4 +- stdlib/source/library/lux/meta/target/jvm/type.lux | 4 +- .../library/lux/meta/target/jvm/type/category.lux | 20 +-- .../lux/meta/target/jvm/type/descriptor.lux | 4 +- .../library/lux/meta/target/jvm/type/lux.lux | 2 +- .../lux/meta/target/jvm/type/reflection.lux | 4 +- .../library/lux/meta/target/jvm/type/signature.lux | 4 +- stdlib/source/library/lux/meta/target/lua.lux | 8 +- stdlib/source/library/lux/meta/target/php.lux | 8 +- stdlib/source/library/lux/meta/target/python.lux | 10 +- stdlib/source/library/lux/meta/target/r.lux | 10 +- stdlib/source/library/lux/meta/target/ruby.lux | 8 +- stdlib/source/library/lux/meta/target/scheme.lux | 8 +- stdlib/source/library/lux/meta/type.lux | 20 +-- stdlib/source/library/lux/meta/type/dynamic.lux | 4 +- stdlib/source/library/lux/meta/type/primitive.lux | 22 ++-- stdlib/source/library/lux/meta/type/quotient.lux | 6 +- stdlib/source/library/lux/meta/type/refinement.lux | 4 +- stdlib/source/library/lux/meta/type/resource.lux | 10 +- stdlib/source/library/lux/meta/type/row.lux | 11 +- stdlib/source/library/lux/meta/type/unit.lux | 4 +- stdlib/source/library/lux/world/db/sql.lux | 6 +- stdlib/source/library/lux/world/environment.lux | 4 +- stdlib/source/library/lux/world/file/watch.lux | 4 +- stdlib/source/library/lux/world/locale.lux | 4 +- .../source/library/lux/world/locale/language.lux | 4 +- .../source/library/lux/world/locale/territory.lux | 4 +- .../source/library/lux/world/net/http/cookie.lux | 4 +- .../source/library/lux/world/net/http/header.lux | 2 +- stdlib/source/library/lux/world/net/http/mime.lux | 112 ----------------- .../source/library/lux/world/net/http/version.lux | 4 +- stdlib/source/library/lux/world/net/mime.lux | 115 ++++++++++++++++++ stdlib/source/library/lux/world/net/uri/scheme.lux | 4 +- stdlib/source/library/lux/world/time.lux | 4 +- stdlib/source/library/lux/world/time/date.lux | 4 +- stdlib/source/library/lux/world/time/duration.lux | 4 +- stdlib/source/library/lux/world/time/instant.lux | 4 +- stdlib/source/library/lux/world/time/solar.lux | 4 +- stdlib/source/library/lux/world/time/year.lux | 4 +- .../source/program/aedifex/artifact/time/date.lux | 4 +- stdlib/source/program/aedifex/hash.lux | 8 +- .../specification/compositor/generation/common.lux | 4 +- stdlib/source/specification/lux/abstract/codec.lux | 8 +- stdlib/source/test/aedifex/artifact.lux | 6 +- .../source/test/aedifex/dependency/deployment.lux | 2 +- stdlib/source/test/aedifex/metadata/artifact.lux | 4 +- stdlib/source/test/aedifex/metadata/snapshot.lux | 4 +- stdlib/source/test/aedifex/repository/local.lux | 10 +- stdlib/source/test/aedifex/repository/remote.lux | 10 +- stdlib/source/test/lux.lux | 22 ++-- .../source/test/lux/control/concurrency/actor.lux | 28 ++--- .../source/test/lux/control/concurrency/agent.lux | 2 +- .../source/test/lux/control/function/contract.lux | 2 +- .../test/lux/data/collection/list/property.lux | 2 +- stdlib/source/test/lux/data/format/json.lux | 2 +- stdlib/source/test/lux/data/format/tar.lux | 20 +-- stdlib/source/test/lux/data/text.lux | 10 +- stdlib/source/test/lux/debug.lux | 8 +- stdlib/source/test/lux/ffi.jvm.lux | 6 +- stdlib/source/test/lux/ffi.lua.lux | 2 +- stdlib/source/test/lux/ffi.py.lux | 2 +- stdlib/source/test/lux/ffi.rb.lux | 2 +- stdlib/source/test/lux/ffi/export.jvm.lux | 4 +- stdlib/source/test/lux/ffi/node_js.js.lux | 2 +- stdlib/source/test/lux/math/random.lux | 4 +- stdlib/source/test/lux/meta/code.lux | 6 +- .../lux/meta/compiler/language/lux/analysis.lux | 20 +-- .../compiler/language/lux/analysis/inference.lux | 6 +- .../meta/compiler/language/lux/analysis/macro.lux | 4 +- .../meta/compiler/language/lux/analysis/module.lux | 22 ++-- .../compiler/language/lux/analysis/pattern.lux | 2 +- .../meta/compiler/language/lux/analysis/scope.lux | 4 +- .../meta/compiler/language/lux/analysis/simple.lux | 2 +- .../meta/compiler/language/lux/analysis/type.lux | 6 +- .../meta/compiler/language/lux/phase/analysis.lux | 34 +++--- .../language/lux/phase/analysis/complex.lux | 14 +-- .../language/lux/phase/analysis/function.lux | 16 +-- .../language/lux/phase/analysis/reference.lux | 8 +- .../language/lux/phase/analysis/simple.lux | 4 +- .../compiler/language/lux/phase/analysis/when.lux | 22 ++-- .../meta/compiler/language/lux/phase/extension.lux | 8 +- .../language/lux/phase/extension/analysis/lux.lux | 2 +- .../compiler/language/lux/synthesis/simple.lux | 2 +- .../source/test/lux/meta/compiler/meta/archive.lux | 8 +- .../compiler/meta/archive/artifact/category.lux | 12 +- .../compiler/meta/archive/module/descriptor.lux | 6 +- .../lux/meta/compiler/meta/archive/registry.lux | 4 +- .../lux/meta/compiler/meta/archive/signature.lux | 4 +- .../test/lux/meta/compiler/meta/cache/archive.lux | 4 +- .../test/lux/meta/compiler/meta/cache/purge.lux | 6 +- stdlib/source/test/lux/meta/compiler/meta/cli.lux | 12 +- .../test/lux/meta/compiler/meta/cli/compiler.lux | 2 +- .../source/test/lux/meta/compiler/meta/context.lux | 4 +- .../source/test/lux/meta/compiler/meta/export.lux | 10 +- .../source/test/lux/meta/compiler/meta/import.lux | 8 +- stdlib/source/test/lux/meta/compiler/phase.lux | 2 +- stdlib/source/test/lux/meta/compiler/reference.lux | 4 +- stdlib/source/test/lux/meta/configuration.lux | 4 +- stdlib/source/test/lux/meta/macro.lux | 2 +- stdlib/source/test/lux/meta/macro/vocabulary.lux | 12 +- stdlib/source/test/lux/meta/target/js.lux | 48 ++++---- stdlib/source/test/lux/meta/target/jvm.lux | 12 +- stdlib/source/test/lux/meta/target/lua.lux | 64 +++++----- stdlib/source/test/lux/meta/target/python.lux | 28 ++--- stdlib/source/test/lux/meta/target/ruby.lux | 68 +++++------ stdlib/source/test/lux/meta/type.lux | 2 +- stdlib/source/test/lux/meta/type/check.lux | 36 +++--- stdlib/source/test/lux/meta/type/primitive.lux | 8 +- stdlib/source/test/lux/meta/type/row.lux | 4 +- stdlib/source/test/lux/meta/version.lux | 2 +- stdlib/source/test/lux/program.lux | 2 +- stdlib/source/test/lux/test/coverage.lux | 8 +- stdlib/source/test/lux/test/property.lux | 6 +- stdlib/source/test/lux/world/file.lux | 4 +- stdlib/source/test/lux/world/net.lux | 3 + stdlib/source/test/lux/world/net/http/client.lux | 2 +- stdlib/source/test/lux/world/net/http/cookie.lux | 12 +- stdlib/source/test/lux/world/net/http/header.lux | 13 +- stdlib/source/test/lux/world/net/mime.lux | 134 +++++++++++++++++++++ stdlib/source/test/lux/world/net/uri/encoding.lux | 8 +- stdlib/source/test/lux/world/net/uri/path.lux | 2 +- stdlib/source/test/lux/world/time/day.lux | 2 +- stdlib/source/test/lux/world/time/month.lux | 2 +- 193 files changed, 1015 insertions(+), 849 deletions(-) delete mode 100644 stdlib/source/library/lux/world/net/http/mime.lux create mode 100644 stdlib/source/library/lux/world/net/mime.lux create mode 100644 stdlib/source/test/lux/world/net/mime.lux (limited to 'stdlib') diff --git a/stdlib/source/documentation/lux/control/concurrency/actor.lux b/stdlib/source/documentation/lux/control/concurrency/actor.lux index 1d4fa276f..18cbf92f3 100644 --- a/stdlib/source/documentation/lux/control/concurrency/actor.lux +++ b/stdlib/source/documentation/lux/control/concurrency/actor.lux @@ -42,7 +42,7 @@ ($.definition (/.Message state output) "A two-way message sent to an actor, expecting a reply.") - ($.definition /.tell! + ($.definition /.request! "Communicate with an actor through message-passing.") ($.definition /.default diff --git a/stdlib/source/documentation/lux/meta/type/primitive.lux b/stdlib/source/documentation/lux/meta/type/primitive.lux index bf1ce3c83..04a751666 100644 --- a/stdlib/source/documentation/lux/meta/type/primitive.lux +++ b/stdlib/source/documentation/lux/meta/type/primitive.lux @@ -35,42 +35,42 @@ [/.representation Abstraction representation Representation] )) - ($.definition /.primitive + ($.definition /.def (format "Define abstract/nominal types which hide their representation details." \n "You can convert between the abstraction and its representation selectively to access the value, while hiding it from others.") - [(primitive String + [(/.def String Text - (def (string value) + (.def (string value) (-> Text String) (abstraction value)) - (def (text value) + (.def (text value) (-> String Text) (representation value)))] ["Type-parameters are optional." - (primitive (Duplicate a) + (/.def (Duplicate a) [a a] - (def (duplicate value) + (.def (duplicate value) (All (_ a) (-> a (Duplicate a))) (abstraction [value value])))] ["Definitions can be nested." - (primitive (Single a) + (/.def (Single a) a - (def (single value) + (.def (single value) (All (_ a) (-> a (Single a))) (abstraction value)) - (primitive (Double a) + (/.def (Double a) [a a] - (def (double value) + (.def (double value) (All (_ a) (-> a (Double a))) (abstraction [value value])) - (def (single' value) + (.def (single' value) (All (_ a) (-> a (Single a))) (abstraction Single [value value])) @@ -83,18 +83,18 @@ representation)))))] ["Type-parameters do not necessarily have to be used in the representation type." "If they are not used, they become phantom types and can be used to customize types without changing the representation." - (primitive (JavaScript a) + (/.def (JavaScript a) Text - (primitive Expression Any) - (primitive Statement Any) + (/.def Expression Any) + (/.def Statement Any) - (def (+ x y) + (.def (+ x y) (-> (JavaScript Expression) (JavaScript Expression) (JavaScript Expression)) (abstraction (format "(" (representation x) "+" (representation y) ")"))) - (def (while test body) + (.def (while test body) (-> (JavaScript Expression) (JavaScript Statement) (JavaScript Statement)) (abstraction (format "while(" (representation test) ") {" @@ -103,17 +103,17 @@ ($.definition /.transmutation "Transmutes an abstract/nominal type's phantom types." - [(primitive (JavaScript a) + [(/.def (JavaScript a) Text - (primitive Expression Any) - (primitive Statement Any) + (/.def Expression Any) + (/.def Statement Any) - (def (statement expression) + (.def (statement expression) (-> (JavaScript Expression) (JavaScript Statement)) (transmutation expression)) - (def (statement' expression) + (.def (statement' expression) (-> (JavaScript Expression) (JavaScript Statement)) (transmutation JavaScript expression)))]) ))) diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux index 026b11544..0be0527c4 100644 --- a/stdlib/source/library/lux.lux +++ b/stdlib/source/library/lux.lux @@ -5461,7 +5461,7 @@ location (all .text_composite# (text#encoded module) "," (nat#encoded line) "," (nat#encoded column)) message (all .text_composite# "Undefined behavior at " location)]] (exec - (.log# (all .text_composite# "WARNING: " message)) + (.log!# (all .text_composite# "WARNING: " message)) (in (list (` (..panic! (, (text$ message)))))))) _ diff --git a/stdlib/source/library/lux/control/concurrency/actor.lux b/stdlib/source/library/lux/control/concurrency/actor.lux index 7b430da17..3693401df 100644 --- a/stdlib/source/library/lux/control/concurrency/actor.lux +++ b/stdlib/source/library/lux/control/concurrency/actor.lux @@ -17,7 +17,7 @@ [macro ["[0]" local]] [type (.only sharing) - [primitive (.only primitive representation abstraction)]]]]] + ["[0]" primitive (.only representation abstraction)]]]]] [// ["[0]" atom (.only Atom atom)] ["[0]" async (.only Async Resolver) (.use "[1]#[0]" monad)] @@ -50,7 +50,7 @@ {.#None} (in {.#End})))) - (primitive .public (Actor s) + (primitive.def .public (Actor s) (Record [#obituary [(Async ( Actor s)) (Resolver ( Actor s))] @@ -167,7 +167,7 @@ (io.run! (resolve {try.#Failure error})) (async.resolved {try.#Failure error})))))])) - (def .public (tell! message actor) + (def .public (request! message actor) (All (_ s o) (-> (Message s o) (Actor s) (Async (Try o)))) (let [[async mail] (..mail message)] (do async.monad diff --git a/stdlib/source/library/lux/control/concurrency/async.lux b/stdlib/source/library/lux/control/concurrency/async.lux index 4285b3b82..6385844ba 100644 --- a/stdlib/source/library/lux/control/concurrency/async.lux +++ b/stdlib/source/library/lux/control/concurrency/async.lux @@ -16,7 +16,7 @@ [macro ["^" pattern]] [type (.only sharing) - [primitive (.except)] + ["[0]" primitive (.except def)] ["[0]" variance (.only Mutable)]]]]] [// ["[0]" thread (.only Delay)] @@ -30,7 +30,7 @@ (template (_ a) [(-> a (IO Any))])) -(primitive (Async'' a) +(primitive.def (Async'' a) (Atom [(Value a) (List (Handler a))]) (type .public (Async' r w) diff --git a/stdlib/source/library/lux/control/concurrency/atom.lux b/stdlib/source/library/lux/control/concurrency/atom.lux index f6229b7f0..79f902288 100644 --- a/stdlib/source/library/lux/control/concurrency/atom.lux +++ b/stdlib/source/library/lux/control/concurrency/atom.lux @@ -15,7 +15,7 @@ [meta ["@" target] [type - [primitive (.except)] + ["[0]" primitive (.except def)] ["[0]" variance (.only Mutable)]]]]]) (with_expansions [ (these (ffi.import (java/util/concurrent/atomic/AtomicReference a) @@ -27,7 +27,7 @@ @.jvm (these))) -(primitive (Atom'' a) +(primitive.def (Atom'' a) (with_expansions [ (java/util/concurrent/atomic/AtomicReference a)] (for @.old @.jvm diff --git a/stdlib/source/library/lux/control/concurrency/incremental.lux b/stdlib/source/library/lux/control/concurrency/incremental.lux index 7bbddd8cc..95af6f6c7 100644 --- a/stdlib/source/library/lux/control/concurrency/incremental.lux +++ b/stdlib/source/library/lux/control/concurrency/incremental.lux @@ -13,14 +13,14 @@ ["[0]" list]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] [// ["[0]" atom (.only Atom)]]) (type (Dependency a) (-> a (IO Any))) -(primitive .public (Computation a) +(primitive.def .public (Computation a) (Atom [a (List (Dependency a))]) (def .public value @@ -117,7 +117,7 @@ _ (watch! update! right)] (in output)))) - (primitive .public (Var a) + (primitive.def .public (Var a) (Computation a) (def .public (var value) diff --git a/stdlib/source/library/lux/control/concurrency/semaphore.lux b/stdlib/source/library/lux/control/concurrency/semaphore.lux index 7e2b8c0cd..2de5b8b31 100644 --- a/stdlib/source/library/lux/control/concurrency/semaphore.lux +++ b/stdlib/source/library/lux/control/concurrency/semaphore.lux @@ -19,7 +19,7 @@ ["i" int]]] [meta [type - ["[0]" primitive (.except)] + ["[0]" primitive (.except def)] ["[0]" refinement]]]]] [// ["[0]" atom (.only Atom)] @@ -31,7 +31,7 @@ #open_positions Int #waiting_list (Queue (Resolver Any))])) -(primitive .public Semaphore +(primitive.def .public Semaphore (Atom State) (def most_positions_possible @@ -96,7 +96,7 @@ (in {try.#Success (the #open_positions post)}))))))) ) -(primitive .public Mutex +(primitive.def .public Mutex Semaphore (def .public (mutex _) @@ -126,7 +126,7 @@ (type .public Limit (, (refinement.type limit))) -(primitive .public Barrier +(primitive.def .public Barrier (Record [#limit Limit #count (Atom Nat) diff --git a/stdlib/source/library/lux/control/concurrency/stm.lux b/stdlib/source/library/lux/control/concurrency/stm.lux index 2b6118575..c653b051b 100644 --- a/stdlib/source/library/lux/control/concurrency/stm.lux +++ b/stdlib/source/library/lux/control/concurrency/stm.lux @@ -17,7 +17,7 @@ [macro ["^" pattern]] [type (.only sharing) - [primitive (.except)] + ["[0]" primitive (.except def)] ["[0]" variance (.only Mutable)]]]]] [// ["[0]" atom (.only Atom atom)] @@ -27,7 +27,7 @@ (type (Observer a) (-> a (IO Any))) -(primitive (Var'' a) +(primitive.def (Var'' a) (Atom [a (List (Sink a))]) (type .public (Var' r w) diff --git a/stdlib/source/library/lux/control/concurrency/structured.lux b/stdlib/source/library/lux/control/concurrency/structured.lux index 69e58c9d0..cd7295f4e 100644 --- a/stdlib/source/library/lux/control/concurrency/structured.lux +++ b/stdlib/source/library/lux/control/concurrency/structured.lux @@ -15,13 +15,13 @@ ["[0]" nat]]] [meta [type (.only sharing) - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // ["[1]" async (.use "[1]#[0]" monad)] ["[0]" thread (.only Delay)] ["[0]" atom (.only Atom)]]) -(primitive .public (Async value) +(primitive.def .public (Async value) (Record [#cancel! (IO Bit) #async (//.Async (Maybe value))]) @@ -205,7 +205,7 @@ (type Pending (Dictionary ID (Ex (_ value) (Async value)))) - (primitive .public (Scope value) + (primitive.def .public (Scope value) (Record [#pending (Atom [ID Pending]) #itself (Async value)]) diff --git a/stdlib/source/library/lux/control/function/polymorphism/context.lux b/stdlib/source/library/lux/control/function/polymorphism/context.lux index ce9d5a149..904cc100c 100644 --- a/stdlib/source/library/lux/control/function/polymorphism/context.lux +++ b/stdlib/source/library/lux/control/function/polymorphism/context.lux @@ -25,7 +25,7 @@ [syntax (.only syntax) ["[0]" export]]] [type - [primitive (.except #name)]]]]] + ["[0]" primitive (.except def #name)]]]]] [/// ["//" mixin]]) @@ -37,7 +37,7 @@ (scope (alteration context)))) (with_expansions [ Symbol] - (primitive .public Layer + (primitive.def .public Layer (.def .public layer @@ -93,7 +93,11 @@ #export_policy Code #scenarios (List Code)])) -(context.def [stack expression declaration] Polymorphism) +(context.def + [stack] + [expression] + [declaration] + Polymorphism) (type Signature (Record diff --git a/stdlib/source/library/lux/control/function/polymorphism/predicate.lux b/stdlib/source/library/lux/control/function/polymorphism/predicate.lux index d87917fe0..78a238fa4 100644 --- a/stdlib/source/library/lux/control/function/polymorphism/predicate.lux +++ b/stdlib/source/library/lux/control/function/polymorphism/predicate.lux @@ -32,7 +32,11 @@ #export_policy Code #scenarios (List Code)])) -(context.def [stack expression declaration] Polymorphism) +(context.def + [stack] + [expression] + [declaration] + Polymorphism) (type Signature (Record diff --git a/stdlib/source/library/lux/control/function/polymorphism/type.lux b/stdlib/source/library/lux/control/function/polymorphism/type.lux index ed17649db..6dbd0ef42 100644 --- a/stdlib/source/library/lux/control/function/polymorphism/type.lux +++ b/stdlib/source/library/lux/control/function/polymorphism/type.lux @@ -26,7 +26,11 @@ #interface Code #method Code])) -(context.def [stack expression declaration] Polymorphism) +(context.def + [stack] + [expression] + [declaration] + Polymorphism) (.def .public def (syntax (_ [[export_policy name parameters type methods] diff --git a/stdlib/source/library/lux/control/io.lux b/stdlib/source/library/lux/control/io.lux index 11993b0b4..9da4eda3c 100644 --- a/stdlib/source/library/lux/control/io.lux +++ b/stdlib/source/library/lux/control/io.lux @@ -12,9 +12,9 @@ [syntax (.only syntax)] ["[0]" template]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) -(primitive .public (IO a) +(primitive.def .public (IO a) (-> Any a) (def .public io' diff --git a/stdlib/source/library/lux/control/lazy.lux b/stdlib/source/library/lux/control/lazy.lux index 2db5daf4a..4a71170a8 100644 --- a/stdlib/source/library/lux/control/lazy.lux +++ b/stdlib/source/library/lux/control/lazy.lux @@ -16,9 +16,9 @@ [macro (.only with_symbols) [syntax (.only syntax)]] [type (.only sharing) - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) -(primitive .public (Lazy a) +(primitive.def .public (Lazy a) (-> [] a) (def .public (lazy' generator) diff --git a/stdlib/source/library/lux/control/security/capability.lux b/stdlib/source/library/lux/control/security/capability.lux index 48323d842..e422ba4ed 100644 --- a/stdlib/source/library/lux/control/security/capability.lux +++ b/stdlib/source/library/lux/control/security/capability.lux @@ -21,9 +21,9 @@ ["|[0]|" export] ["|[0]|" declaration]]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) -(primitive .public (Capability brand input output) +(primitive.def .public (Capability brand input output) (-> input output) (def .public (use it input) diff --git a/stdlib/source/library/lux/control/security/policy.lux b/stdlib/source/library/lux/control/security/policy.lux index 58c895a05..8bd2e9a45 100644 --- a/stdlib/source/library/lux/control/security/policy.lux +++ b/stdlib/source/library/lux/control/security/policy.lux @@ -7,9 +7,9 @@ [monad (.only Monad)]] [meta [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) -(primitive .public (Policy brand value label) +(primitive.def .public (Policy brand value label) value (type .public (Can_Upgrade brand label value) @@ -78,7 +78,7 @@ ) (with_template [ ] - [(primitive .public + [(primitive.def .public Any (type .public diff --git a/stdlib/source/library/lux/control/thread.lux b/stdlib/source/library/lux/control/thread.lux index dd7b6208c..952eabac4 100644 --- a/stdlib/source/library/lux/control/thread.lux +++ b/stdlib/source/library/lux/control/thread.lux @@ -14,13 +14,13 @@ [meta ["@" target] [type - [primitive (.except)] + ["[0]" primitive (.except def)] ["[0]" variance (.only Mutable)]]]]]) (type .public (Thread ! a) (-> ! a)) -(primitive (Box'' t a) +(primitive.def (Box'' t a) (Array a) (type .public (Box' t r w) diff --git a/stdlib/source/library/lux/data/collection/queue/priority.lux b/stdlib/source/library/lux/data/collection/queue/priority.lux index bbd66f362..49f6cc0a4 100644 --- a/stdlib/source/library/lux/data/collection/queue/priority.lux +++ b/stdlib/source/library/lux/data/collection/queue/priority.lux @@ -15,7 +15,7 @@ ["n" nat (.use "[1]#[0]" interval)]]] [meta [type (.only by_example) - [primitive (.only primitive abstraction representation)]]]]]) + ["[0]" primitive (.only abstraction representation)]]]]]) (type .public Priority Nat) @@ -37,7 +37,7 @@ ..builder) @)) -(primitive .public (Queue a) +(primitive.def .public (Queue a) (Maybe (Tree :@: Priority a)) (def .public empty diff --git a/stdlib/source/library/lux/data/collection/set/multi.lux b/stdlib/source/library/lux/data/collection/set/multi.lux index e08756a80..d7087830b 100644 --- a/stdlib/source/library/lux/data/collection/set/multi.lux +++ b/stdlib/source/library/lux/data/collection/set/multi.lux @@ -15,13 +15,13 @@ [macro ["^" pattern]] [type - ["[0]" primitive (.only primitive abstraction representation)]]]]] + ["[0]" primitive (.only abstraction representation)]]]]] ["[0]" // (.only) [// ["[0]" list (.use "[1]#[0]" mix monoid)] ["[0]" dictionary (.only Dictionary)]]]) -(primitive .public (Set a) +(primitive.def .public (Set a) (Dictionary a Nat) (def .public empty diff --git a/stdlib/source/library/lux/data/collection/set/ordered.lux b/stdlib/source/library/lux/data/collection/set/ordered.lux index dc209c092..3ff035d4b 100644 --- a/stdlib/source/library/lux/data/collection/set/ordered.lux +++ b/stdlib/source/library/lux/data/collection/set/ordered.lux @@ -11,9 +11,9 @@ ["/" ordered]]]] [meta [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) -(primitive .public (Set a) +(primitive.def .public (Set a) (/.Dictionary a a) (def .public empty diff --git a/stdlib/source/library/lux/data/collection/stack.lux b/stdlib/source/library/lux/data/collection/stack.lux index c037e1a56..b910f3e21 100644 --- a/stdlib/source/library/lux/data/collection/stack.lux +++ b/stdlib/source/library/lux/data/collection/stack.lux @@ -9,9 +9,9 @@ ["//" list]]] [meta [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) -(primitive .public (Stack a) +(primitive.def .public (Stack a) (List a) (def .public empty diff --git a/stdlib/source/library/lux/data/collection/tree/finger.lux b/stdlib/source/library/lux/data/collection/tree/finger.lux index 68d7e7157..4e0ed56de 100644 --- a/stdlib/source/library/lux/data/collection/tree/finger.lux +++ b/stdlib/source/library/lux/data/collection/tree/finger.lux @@ -11,10 +11,10 @@ ["[0]" list (.use "[1]#[0]" monoid)]]] [meta [type - [primitive (.only primitive abstraction representation)]]]]]) + ["[0]" primitive (.only abstraction representation)]]]]]) ... https://en.wikipedia.org/wiki/Finger_tree -(primitive .public (Tree @ t v) +(primitive.def .public (Tree @ t v) (Record [#monoid (Monoid t) #tag t diff --git a/stdlib/source/library/lux/data/color.lux b/stdlib/source/library/lux/data/color.lux index 61e3d5593..0f6b443be 100644 --- a/stdlib/source/library/lux/data/color.lux +++ b/stdlib/source/library/lux/data/color.lux @@ -17,7 +17,7 @@ ["[0]" i64]]] [meta [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) (def rgb_limit 256) (def top (-- rgb_limit)) @@ -52,7 +52,7 @@ (type .public HSB [Frac Frac Frac]) -(primitive .public Color +(primitive.def .public Color RGB (def .public (of_rgb [red green blue]) diff --git a/stdlib/source/library/lux/data/format/css.lux b/stdlib/source/library/lux/data/format/css.lux index 600068d16..c754a7d6d 100644 --- a/stdlib/source/library/lux/data/format/css.lux +++ b/stdlib/source/library/lux/data/format/css.lux @@ -14,7 +14,7 @@ ["[0]" nat]]] [meta [type - [primitive (.except Frame pattern)]]] + ["[0]" primitive (.except Frame def pattern)]]] [world [net (.only URL)]]]] ["[0]" / @@ -25,10 +25,10 @@ ["[1][0]" style] ["[1][0]" query (.only Query)]]) -(primitive .public Common Any) -(primitive .public Special Any) +(primitive.def .public Common Any) +(primitive.def .public Special Any) -(primitive .public (CSS brand) +(primitive.def .public (CSS brand) Text (def .public css diff --git a/stdlib/source/library/lux/data/format/css/class.lux b/stdlib/source/library/lux/data/format/css/class.lux index c0bdf1dd5..a3def1196 100644 --- a/stdlib/source/library/lux/data/format/css/class.lux +++ b/stdlib/source/library/lux/data/format/css/class.lux @@ -11,9 +11,9 @@ [macro [syntax (.only syntax)]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) -(primitive .public Class +(primitive.def .public Class Text (def .public class diff --git a/stdlib/source/library/lux/data/format/css/id.lux b/stdlib/source/library/lux/data/format/css/id.lux index dc8cc80dc..cd6c1c4cf 100644 --- a/stdlib/source/library/lux/data/format/css/id.lux +++ b/stdlib/source/library/lux/data/format/css/id.lux @@ -11,9 +11,9 @@ [macro [syntax (.only syntax)]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) -(primitive .public ID +(primitive.def .public ID Text (def .public id diff --git a/stdlib/source/library/lux/data/format/css/property.lux b/stdlib/source/library/lux/data/format/css/property.lux index c537a0a0e..4b4197940 100644 --- a/stdlib/source/library/lux/data/format/css/property.lux +++ b/stdlib/source/library/lux/data/format/css/property.lux @@ -11,7 +11,7 @@ ["[0]" template] ["[0]" code]] [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] [// [value (.only All Number @@ -58,7 +58,7 @@ (syntax (_ [symbol s.text]) (in (list (code.local (text.replaced "-" "_" symbol)))))) -(primitive .public (Property brand) +(primitive.def .public (Property brand) Text (def .public name diff --git a/stdlib/source/library/lux/data/format/css/query.lux b/stdlib/source/library/lux/data/format/css/query.lux index ab8d92644..6f35f5e43 100644 --- a/stdlib/source/library/lux/data/format/css/query.lux +++ b/stdlib/source/library/lux/data/format/css/query.lux @@ -11,7 +11,7 @@ [syntax (.only syntax)] ["[0]" template]] [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // ["[1][0]" value (.only Value Length Count Resolution Ratio Orientation Scan Boolean Update @@ -24,7 +24,7 @@ (syntax (_ [symbol s.text]) (in (list (code.local (text.replaced "-" "_" symbol)))))) -(primitive .public Media +(primitive.def .public Media Text (def .public media @@ -42,7 +42,7 @@ ["speech"] )) -(primitive .public Feature +(primitive.def .public Feature Text (def .public feature @@ -102,7 +102,7 @@ ) ) -(primitive .public Query +(primitive.def .public Query Text (def .public query diff --git a/stdlib/source/library/lux/data/format/css/selector.lux b/stdlib/source/library/lux/data/format/css/selector.lux index b584c1a4a..df2df8fbf 100644 --- a/stdlib/source/library/lux/data/format/css/selector.lux +++ b/stdlib/source/library/lux/data/format/css/selector.lux @@ -12,7 +12,7 @@ [macro ["[0]" template]] [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // ["[1][0]" id (.only ID)] ["[1][0]" class (.only Class)]]) @@ -22,21 +22,21 @@ (type .public Tag Label) (type .public Attribute Label) -(primitive .public (Generic brand) Any) +(primitive.def .public (Generic brand) Any) (with_template [ ] - [(primitive Any) + [(primitive.def Any) (type .public (Generic ))] [Can_Chain Can_Chain'] [Cannot_Chain Cannot_Chain'] ) -(primitive .public Unique Any) -(primitive .public Specific Any) -(primitive .public Composite Any) +(primitive.def .public Unique Any) +(primitive.def .public Specific Any) +(primitive.def .public Composite Any) -(primitive .public (Selector kind) +(primitive.def .public (Selector kind) Text (def .public selector @@ -168,7 +168,7 @@ (format ":not") abstraction)) - (primitive .public Index + (primitive.def .public Index Text (def .public index diff --git a/stdlib/source/library/lux/data/format/css/style.lux b/stdlib/source/library/lux/data/format/css/style.lux index 4e459fd17..0d278d714 100644 --- a/stdlib/source/library/lux/data/format/css/style.lux +++ b/stdlib/source/library/lux/data/format/css/style.lux @@ -8,12 +8,12 @@ ["[0]" list (.use "[1]#[0]" mix)]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // ["[1][0]" value (.only Value)] ["[1][0]" property (.only Property)]]) -(primitive .public Style +(primitive.def .public Style Text (def .public empty diff --git a/stdlib/source/library/lux/data/format/css/value.lux b/stdlib/source/library/lux/data/format/css/value.lux index 4675c0385..4fa9266ae 100644 --- a/stdlib/source/library/lux/data/format/css/value.lux +++ b/stdlib/source/library/lux/data/format/css/value.lux @@ -23,7 +23,7 @@ [syntax (.only syntax)] ["[0]" template]] [type - [primitive (.except)]]] + ["[0]" primitive (.except def)]]] [world [net (.only URL)]]]] [// @@ -35,7 +35,7 @@ (def enumeration (template (_ + +) - [(primitive .public + [(primitive.def .public (def .public @@ -57,7 +57,7 @@ raw (|> raw (text.split_at 1) maybe.trusted product.right)))) -(primitive .public (Value brand) +(primitive.def .public (Value brand) Text (def .public value @@ -72,11 +72,11 @@ [unset "unset"] ) - (primitive .public (Numeric kind) Any) + (primitive.def .public (Numeric kind) Any) (with_template [] [(with_expansions [' (template.symbol [ "'"])] - (primitive .public ' Any) + (primitive.def .public ' Any) (type .public (Numeric ')))] @@ -87,7 +87,7 @@ ) (with_template [ + +] - [(primitive .public Any) + [(primitive.def .public Any) (`` (with_template [ ] [(def .public @@ -889,7 +889,7 @@ (abstraction (format (%.nat horizontal) ..slice_separator (%.nat vertical)))) - (primitive .public Stop + (primitive.def .public Stop Text (def .public stop @@ -909,7 +909,7 @@ (representation Value start) ..stop_separator (representation Value end)))) - (primitive .public Hint + (primitive.def .public Hint Text (def .public hint @@ -928,7 +928,7 @@ (type .public (List/1 a) [a (List a)]) - (primitive .public Angle + (primitive.def .public Angle Text (def .public angle diff --git a/stdlib/source/library/lux/data/format/html.lux b/stdlib/source/library/lux/data/format/html.lux index d01f92b22..e92858dce 100644 --- a/stdlib/source/library/lux/data/format/html.lux +++ b/stdlib/source/library/lux/data/format/html.lux @@ -16,7 +16,7 @@ [target ["[0]" js]] [type - [primitive (.except)]]] + ["[0]" primitive (.except def)]]] [world [net (.only URL)]]]] [// @@ -80,11 +80,11 @@ (-> Tag Text) (text.enclosed [""])) -(primitive .public (HTML brand) +(primitive.def .public (HTML brand) Text (.with_template [ ] - [(primitive Any) + [(primitive.def Any) (type .public (HTML ))] [Meta Meta'] @@ -102,11 +102,11 @@ ) (.with_template [ +] - [(primitive ( brand) Any) + [(primitive.def ( brand) Any) (type .public (HTML ( Any))) (`` (.with_template [ ] - [(primitive Any) + [(primitive.def Any) (type .public (HTML ( )))] (,, (template.spliced +))))] diff --git a/stdlib/source/library/lux/data/format/markdown.lux b/stdlib/source/library/lux/data/format/markdown.lux index f6faa4820..11c9f6e9f 100644 --- a/stdlib/source/library/lux/data/format/markdown.lux +++ b/stdlib/source/library/lux/data/format/markdown.lux @@ -8,7 +8,7 @@ ["[0]" list (.use "[1]#[0]" functor)]]] [meta [type - [primitive (.except)]]] + ["[0]" primitive (.except def)]]] [world [net (.only URL)]]]]) @@ -32,10 +32,10 @@ (text.replaced "." "\.") (text.replaced "!" "\!"))) -(primitive .public Span Any) -(primitive .public Block Any) +(primitive.def .public Span Any) +(primitive.def .public Block Any) -(primitive .public (Markdown brand) +(primitive.def .public (Markdown brand) Text (def .public empty diff --git a/stdlib/source/library/lux/data/format/tar.lux b/stdlib/source/library/lux/data/format/tar.lux index 9220719da..aaa41f747 100644 --- a/stdlib/source/library/lux/data/format/tar.lux +++ b/stdlib/source/library/lux/data/format/tar.lux @@ -33,7 +33,7 @@ [macro ["^" pattern]] [type - [primitive (.except #name)]]] + ["[0]" primitive (.except def #name)]]] [world ["[0]" file] [time @@ -78,7 +78,7 @@ (list ["Value" (%.nat value)] ["Maximum" (%.nat (-- ))]))) - (primitive .public + (primitive.def .public Nat (def .public ( value) @@ -163,7 +163,7 @@ [value (at n.octal decoded digits)] (..big value))))) -(primitive Checksum +(primitive.def Checksum Text (def from_checksum @@ -256,7 +256,7 @@ (binary!.slice 0 (++ end) string)))))))) (with_template [ ] - [(primitive .public + [(primitive.def .public (exception.def .public ( value) @@ -314,7 +314,7 @@ (def magic_size Size 7) -(primitive Magic +(primitive.def Magic Text (def ustar @@ -401,7 +401,7 @@ ... devminor (..small_number ..device_size))) -(primitive Link_Flag +(primitive.def Link_Flag Char (def link_flag @@ -450,7 +450,7 @@ (exception.except ..invalid_link_flag [(.nat it)])))))) ) -(primitive .public Mode +(primitive.def .public Mode Nat (def .public mode @@ -539,7 +539,7 @@ (list.repeated ..content_size) (list#mix n.* 1))) -(primitive .public Content +(primitive.def .public Content [Big Binary] (def .public (content content) diff --git a/stdlib/source/library/lux/data/text/buffer.lux b/stdlib/source/library/lux/data/text/buffer.lux index e9c7a0ec3..17b603e3b 100644 --- a/stdlib/source/library/lux/data/text/buffer.lux +++ b/stdlib/source/library/lux/data/text/buffer.lux @@ -17,7 +17,7 @@ [meta ["@" target] [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" //]) (with_expansions [ (these (import java/lang/CharSequence @@ -49,7 +49,7 @@ ) (these)))) -(`` (primitive .public Buffer +(`` (primitive.def .public Buffer (for @.old [Nat (-> java/lang/StringBuilder java/lang/StringBuilder)] @.jvm [Nat (-> java/lang/StringBuilder java/lang/StringBuilder)] @.js [Nat (-> (JS_Array Text) (JS_Array Text))] diff --git a/stdlib/source/library/lux/data/text/encoding.lux b/stdlib/source/library/lux/data/text/encoding.lux index 5906ebf3b..c4247a851 100644 --- a/stdlib/source/library/lux/data/text/encoding.lux +++ b/stdlib/source/library/lux/data/text/encoding.lux @@ -5,10 +5,10 @@ [macro ["[0]" template]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) ... https://en.wikipedia.org/wiki/Character_encoding#Common_character_encodings -(primitive .public Encoding +(primitive.def .public Encoding Text (with_template [ ] diff --git a/stdlib/source/library/lux/data/text/unicode/block.lux b/stdlib/source/library/lux/data/text/unicode/block.lux index 7a97b8803..ea4fe8889 100644 --- a/stdlib/source/library/lux/data/text/unicode/block.lux +++ b/stdlib/source/library/lux/data/text/unicode/block.lux @@ -12,11 +12,11 @@ ["[0]" i64]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] [/// [char (.only Char)]]) -(primitive .public Block +(primitive.def .public Block (Interval Char) (def .public monoid diff --git a/stdlib/source/library/lux/data/text/unicode/set.lux b/stdlib/source/library/lux/data/text/unicode/set.lux index 732a52ddc..19ab0a416 100644 --- a/stdlib/source/library/lux/data/text/unicode/set.lux +++ b/stdlib/source/library/lux/data/text/unicode/set.lux @@ -11,7 +11,7 @@ ["[1]" finger (.only Tree)]]]] [meta [type (.only by_example) - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] [// ["[0]" block (.only Block)] [// @@ -27,7 +27,7 @@ @)) -(primitive .public Set +(primitive.def .public Set (Tree :@: Block []) (def .public (composite left right) diff --git a/stdlib/source/library/lux/debug.lux b/stdlib/source/library/lux/debug.lux index 2dbebbecc..39c2aecd1 100644 --- a/stdlib/source/library/lux/debug.lux +++ b/stdlib/source/library/lux/debug.lux @@ -533,7 +533,7 @@ (def .public log! (-> Text Any) - (|>> .log#)) + (|>> .log!#)) (exception.def .public (type_hole [location type]) (Exception [Location Type]) diff --git a/stdlib/source/library/lux/ffi.jvm.lux b/stdlib/source/library/lux/ffi.jvm.lux index 8db8186a6..551afd5c0 100644 --- a/stdlib/source/library/lux/ffi.jvm.lux +++ b/stdlib/source/library/lux/ffi.jvm.lux @@ -973,7 +973,10 @@ [[External (List (Type Var))] [Member_Declaration MethodDecl]]) -(context.def [super_context super_expression super_declaration] +(context.def + [super_context] + [super_expression] + [super_declaration] Super) (def var^^ @@ -1056,7 +1059,10 @@ [External (List [Member_Declaration FieldDecl])]) -(context.def [get|set_context get|set_expression get|set_declaration] +(context.def + [get|set_context] + [get|set_expression] + [get|set_declaration] Get|Set) (def privacy_modifier^^ @@ -1181,7 +1187,10 @@ [[External (List (Type Var))] (List [Member_Declaration MethodDecl])]) -(context.def [call_context call_expression call_declaration] +(context.def + [call_context] + [call_expression] + [call_declaration] Call) (def .public with_call diff --git a/stdlib/source/library/lux/ffi.lux b/stdlib/source/library/lux/ffi.lux index ce459e663..17b150560 100644 --- a/stdlib/source/library/lux/ffi.lux +++ b/stdlib/source/library/lux/ffi.lux @@ -21,7 +21,7 @@ [syntax (.only syntax)] ["[0]" template]] [type - [primitive (.except)]] + ["[0]" primitive (.except def)]] ["@" target (.only) ["[0]" js]]]]]) @@ -217,7 +217,7 @@ @.python "python function" @.lua "lua function" (these))] - (primitive .public (Object brand) Any) + (primitive.def .public (Object brand) Any) (with_expansions [ (for @.js (these [Symbol] [Null] @@ -230,7 +230,7 @@ ] (with_template [] [(with_expansions [ (template.symbol [ "'"])] - (primitive + (primitive.def Any (type .public diff --git a/stdlib/source/library/lux/ffi.php.lux b/stdlib/source/library/lux/ffi.php.lux index 796e8d887..4f31625f0 100644 --- a/stdlib/source/library/lux/ffi.php.lux +++ b/stdlib/source/library/lux/ffi.php.lux @@ -16,18 +16,18 @@ ["[0]" meta (.only) ["@" target] [type - abstract] + ["[0]" primitive (.except def)]] ["[0]" code (.only) ["<[1]>" \\parser (.only Parser)]] [macro (.only with_symbols) [syntax (.only syntax)] ["[0]" template]]]]]) -(primitive .public (Object brand) Any) +(primitive.def .public (Object brand) Any) (with_template [] [(with_expansions [ (template.symbol [ "'"])] - (primitive .public Any) + (primitive.def .public Any) (type .public (..Object )))] diff --git a/stdlib/source/library/lux/ffi.scm.lux b/stdlib/source/library/lux/ffi.scm.lux index 4c57af516..b7169f1e4 100644 --- a/stdlib/source/library/lux/ffi.scm.lux +++ b/stdlib/source/library/lux/ffi.scm.lux @@ -16,18 +16,18 @@ ["[0]" meta (.only) ["@" target] [type - abstract] + ["[0]" primitive (.except def)]] ["[0]" code (.only) ["<[1]>" \\parser (.only Parser)]] [macro (.only with_symbols) [syntax (.only syntax)] ["[0]" template]]]]]) -(primitive .public (Object brand) Any) +(primitive.def .public (Object brand) Any) (with_template [] [(with_expansions [ (template.symbol [ "'"])] - (primitive .public Any) + (primitive.def .public Any) (type .public (..Object )))] diff --git a/stdlib/source/library/lux/math/modular.lux b/stdlib/source/library/lux/math/modular.lux index e9810f66c..6f66a7e79 100644 --- a/stdlib/source/library/lux/math/modular.lux +++ b/stdlib/source/library/lux/math/modular.lux @@ -22,11 +22,11 @@ ["[0]" code (.only) ["<[1]>" \\parser]] [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // ["[1]" modulus (.only Modulus)]]) -(primitive .public (Mod m) +(primitive.def .public (Mod m) (Record [#modulus (Modulus m) #value Int]) diff --git a/stdlib/source/library/lux/math/modulus.lux b/stdlib/source/library/lux/math/modulus.lux index 69b29f4dd..ca56d9d74 100644 --- a/stdlib/source/library/lux/math/modulus.lux +++ b/stdlib/source/library/lux/math/modulus.lux @@ -15,11 +15,11 @@ [macro [syntax (.only syntax)]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) (exception.def .public zero_cannot_be_a_modulus) -(primitive .public (Modulus %) +(primitive.def .public (Modulus %) Int (def .public (modulus value) diff --git a/stdlib/source/library/lux/math/random.lux b/stdlib/source/library/lux/math/random.lux index 0027d81a9..7c1fbc448 100644 --- a/stdlib/source/library/lux/math/random.lux +++ b/stdlib/source/library/lux/math/random.lux @@ -180,8 +180,8 @@ [alphabetic unicode.alphabetic] [alpha_numeric unicode.alpha_numeric] [numeric unicode.numeric] - [upper_case unicode.upper_case] - [lower_case unicode.lower_case] + [upper_cased unicode.upper_case] + [lower_cased unicode.lower_case] ) (with_template [ ] diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux index dee8675be..501ca50ad 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux @@ -10,6 +10,7 @@ ["[0]" exception (.only Exception)]] [data ["[0]" text (.only) + [char (.only Char)] ["%" \\format (.only format)]] [collection ["[0]" list (.use "[1]#[0]" functor)] @@ -102,7 +103,7 @@ (list ["Text" (%.text text)]))) (def text_char - (Parser text.Char) + (Parser Char) (do <>.monad [raw .text] (when (text.size raw) @@ -119,7 +120,7 @@ .any) (function (_ extension_name phase archive [input conditionals else]) (do [! phase.monad] - [input (<| (typeA.expecting text.Char) + [input (<| (typeA.expecting Char) (phase archive input)) expectedT meta.expected_type conditionals (monad.each ! (function (_ [cases branch]) @@ -215,7 +216,7 @@ (def with_io_extensions (-> Bundle Bundle) - (|>> (install "log#" (unary Text Any)) + (|>> (install "log!#" (unary Text Any)) (install "error#" (unary Text Nothing)))) (def I64* diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/generation/jvm/common.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/generation/jvm/common.lux index a776e83e6..5f17ba7cc 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/generation/jvm/common.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/generation/jvm/common.lux @@ -395,7 +395,7 @@ (def with_io_extensions (-> Bundle Bundle) - (|>> (dictionary.has "log#|generation" (unary ..io::log)) + (|>> (dictionary.has "log!#|generation" (unary ..io::log)) (dictionary.has "error#|generation" (unary ..io::error)))) (def .public bundle diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive.lux b/stdlib/source/library/lux/meta/compiler/meta/archive.lux index fd16fb8f3..ca3dd65b4 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/archive.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/archive.lux @@ -28,7 +28,7 @@ [meta ["[0]" configuration (.only Configuration)] [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] [/ ["[0]" artifact] ["[0]" registry (.only Registry)] @@ -73,7 +73,7 @@ #output Output #registry Registry])) -(primitive .public Archive +(primitive.def .public Archive (Record [#next module.ID #resolver (Dictionary descriptor.Module [module.ID (Maybe (Entry Any))])]) diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive/key.lux b/stdlib/source/library/lux/meta/compiler/meta/archive/key.lux index 24db1094f..09a246977 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/archive/key.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/archive/key.lux @@ -3,11 +3,11 @@ [lux (.except) [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] [// [signature (.only Signature)]]) -(primitive .public (Key k) +(primitive.def .public (Key k) Signature (def .public signature diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux b/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux index 3c0df9cbc..3068bb35a 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/archive/module/document.lux @@ -15,7 +15,7 @@ ["[1]" \\format (.only Format)]]] [meta [type (.only sharing) - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] [/// ["[0]" signature (.only Signature) (.use "[1]#[0]" equivalence)] ["[0]" key (.only Key)]]) @@ -26,7 +26,7 @@ (list ["Expected" (signature.description expected)] ["Actual" (signature.description actual)]))) -(primitive .public (Document d) +(primitive.def .public (Document d) (Record [#signature Signature #content d]) diff --git a/stdlib/source/library/lux/meta/compiler/meta/archive/registry.lux b/stdlib/source/library/lux/meta/compiler/meta/archive/registry.lux index e3d675ec0..2bdb6c8d4 100644 --- a/stdlib/source/library/lux/meta/compiler/meta/archive/registry.lux +++ b/stdlib/source/library/lux/meta/compiler/meta/archive/registry.lux @@ -24,13 +24,13 @@ [macro ["^" pattern]] [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // ["[0]" unit] ["[1]" artifact (.only Artifact ID) ["[2][0]" category (.only Category)]]]) -(primitive .public Registry +(primitive.def .public Registry (Record [#artifacts (Sequence [Artifact (Set unit.ID)]) #resolver (Dictionary Text [ID (Maybe //category.Definition)])]) diff --git a/stdlib/source/library/lux/meta/macro/context.lux b/stdlib/source/library/lux/meta/macro/context.lux index 55faa9ef0..ed4c54849 100644 --- a/stdlib/source/library/lux/meta/macro/context.lux +++ b/stdlib/source/library/lux/meta/macro/context.lux @@ -230,11 +230,9 @@ (syntax (_ [.let [! ?.monad ?local (at ! each code.local ?code.local)] - [[export_$? $] [export_expression? g!expression] [export_declaration? g!declaration]] - (?code.tuple (all ?.and - (export.parser ?code.local) - (export.parser ?local) - (export.parser ?local))) + [export_$? $] (?code.tuple (export.parser ?code.local)) + [export_expression? g!expression] (?code.tuple (export.parser ?local)) + [export_declaration? g!declaration] (?code.tuple (export.parser ?local)) context_type ?code.any]) (do [! meta.monad] diff --git a/stdlib/source/library/lux/meta/macro/expansion.lux b/stdlib/source/library/lux/meta/macro/expansion.lux index bbdbe267d..83e34afe2 100644 --- a/stdlib/source/library/lux/meta/macro/expansion.lux +++ b/stdlib/source/library/lux/meta/macro/expansion.lux @@ -123,12 +123,12 @@ (do ///.monad [location ///.location output ( token) - .let [_ (.log# (all text#composite - (symbol#encoded macro_name) " " (location.format location) - (|> output - (list#each (|>> code.format (all text#composite text.\n text.\t))) - text.together) - text.\n))]] + .let [_ (.log!# (all text#composite + (symbol#encoded macro_name) " " (location.format location) + (|> output + (list#each (|>> code.format (all text#composite text.\n text.\t))) + text.together) + text.\n))]] (in (if omit? (list) output))) diff --git a/stdlib/source/library/lux/meta/macro/pattern.lux b/stdlib/source/library/lux/meta/macro/pattern.lux index e642b1cd3..6ab386dd1 100644 --- a/stdlib/source/library/lux/meta/macro/pattern.lux +++ b/stdlib/source/library/lux/meta/macro/pattern.lux @@ -13,7 +13,7 @@ [collection ["[0]" list (.use "[1]#[0]" monoid monad mix)]]]]] ["[0]" // (.only with_symbols) - [vocabulary (.only vocabulary)] + ["[0]" vocabulary] ["/[1]" // (.use "[1]#[0]" monad)]]) (def locally @@ -232,11 +232,11 @@ {.#Item [init inits']} (.` {.#Item (., init) (., (untemplated_partial_list last inits'))}))) -(vocabulary - [.public Spliced_UnQuote] - [.public spliced_unquote] - [.public spliced_unquote_macro] - [.private named_spliced_unquote]) +(vocabulary.def + [.public Spliced_UnQuote] + [.public spliced_unquote] + [.public spliced_unquote_macro] + [.private named_spliced_unquote]) (def (untemplated_composite g!meta untemplated_pattern elems) (-> Code Code (-> Code (Meta Code)) @@ -272,11 +272,11 @@ (///.failure (..wrong_syntax_error (symbol ..,*)))} tokens)))) -(vocabulary - [.public UnQuote] - [.public unquote] - [.public unquote_macro] - [.private named_unquote]) +(vocabulary.def + [.public UnQuote] + [.public unquote] + [.public unquote_macro] + [.private named_unquote]) (def (untemplated_pattern pattern) (-> Code (Meta Code)) diff --git a/stdlib/source/library/lux/meta/macro/vocabulary.lux b/stdlib/source/library/lux/meta/macro/vocabulary.lux index ce47d7f96..2e9297eee 100644 --- a/stdlib/source/library/lux/meta/macro/vocabulary.lux +++ b/stdlib/source/library/lux/meta/macro/vocabulary.lux @@ -2,7 +2,7 @@ (.require [library - [lux (.except local) + [lux (.except local def) [abstract [monad (.only do)]] [control @@ -15,7 +15,7 @@ ["[0]" code (.only) ["?[1]" \\parser (.only Parser)]] ["[0]" type (.only) - [primitive (.except)]]]]) + ["[0]" primitive (.except def)]]]]) (exception.def .public (invalid_type [expected actual]) (Exception [Type Type]) @@ -23,28 +23,28 @@ (list ["Expected" (type.format expected)] ["Actual" (type.format actual)]))) -(def local +(.def local (Parser [Code Code]) (?code.tuple (export.parser (?#each code.local ?code.local)))) -(def .public vocabulary +(.def .public def (syntax (_ [[public|private@type type] ..local [public|private@micro micro] ..local [public|private@macro macro] ..local [public|private@by_name by_name] ..local]) (//.with_symbols [g!_ g!type g!value] - (in (list (` (primitive (, public|private@type) (, type) + (in (list (` (primitive.def (, public|private@type) (, type) Macro - (def (, public|private@micro) (, micro) + (.def (, public|private@micro) (, micro) (-> Macro (, type)) (|>> abstraction)) - (def (, public|private@macro) (, macro) + (.def (, public|private@macro) (, macro) (-> (, type) Macro) (|>> representation)))) - (` (def (, public|private@by_name) ((, by_name) (, g!_)) + (` (.def (, public|private@by_name) ((, by_name) (, g!_)) (-> Symbol (Meta Macro)) (do ///.monad [[(, g!_) (, g!type) (, g!value)] (///.export (, g!_))] diff --git a/stdlib/source/library/lux/meta/target/common_lisp.lux b/stdlib/source/library/lux/meta/target/common_lisp.lux index 9d92f4557..64af1340f 100644 --- a/stdlib/source/library/lux/meta/target/common_lisp.lux +++ b/stdlib/source/library/lux/meta/target/common_lisp.lux @@ -15,13 +15,13 @@ [macro ["[0]" template]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) (def as_form (-> Text Text) (text.enclosed ["(" ")"])) -(primitive .public (Code brand) +(primitive.def .public (Code brand) Text (def .public manual @@ -34,7 +34,7 @@ (with_template [ ] [(with_expansions [ (template.symbol [ "'"])] - (`` (primitive .public ( brand) Any)) + (`` (primitive.def .public ( brand) Any)) (`` (type .public ( brand) ( ( brand)))))] @@ -48,7 +48,7 @@ (with_template [ ] [(with_expansions [ (template.symbol [ "'"])] - (`` (primitive .public Any)) + (`` (primitive.def .public Any)) (`` (type .public ( ))))] [Label Code] diff --git a/stdlib/source/library/lux/meta/target/js.lux b/stdlib/source/library/lux/meta/target/js.lux index 0a56ad62a..4460eb45b 100644 --- a/stdlib/source/library/lux/meta/target/js.lux +++ b/stdlib/source/library/lux/meta/target/js.lux @@ -16,7 +16,7 @@ [macro ["[0]" template]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) (def expression (text.enclosed ["(" ")"])) @@ -34,7 +34,7 @@ (|>> (format \n+) (text.replaced text.new_line (format text.new_line text.tab)))) -(primitive .public (Code brand) +(primitive.def .public (Code brand) Text (def .public code @@ -43,7 +43,7 @@ (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] - (primitive ( brand) Any) + (primitive.def ( brand) Any) (`` (type .public (|> Any (,, (template.spliced +))))))] [Expression [Code]] @@ -54,7 +54,7 @@ (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] - (primitive Any) + (primitive.def Any) (`` (type .public (|> (,, (template.spliced +))))))] [Var [Location' Computation' Expression' Code]] diff --git a/stdlib/source/library/lux/meta/target/jvm/bytecode/address.lux b/stdlib/source/library/lux/meta/target/jvm/bytecode/address.lux index 66b50f65a..92dac219f 100644 --- a/stdlib/source/library/lux/meta/target/jvm/bytecode/address.lux +++ b/stdlib/source/library/lux/meta/target/jvm/bytecode/address.lux @@ -16,7 +16,7 @@ ["n" nat]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // [jump (.only Big_Jump)] ["/[1]" // @@ -24,7 +24,7 @@ ["[1][0]" unsigned (.only U2)] ["[1][0]" signed (.only S4)]]]]) -(primitive .public Address +(primitive.def .public Address U2 (def .public value diff --git a/stdlib/source/library/lux/meta/target/jvm/bytecode/environment/limit/registry.lux b/stdlib/source/library/lux/meta/target/jvm/bytecode/environment/limit/registry.lux index 3f16fa4a2..a4064ce18 100644 --- a/stdlib/source/library/lux/meta/target/jvm/bytecode/environment/limit/registry.lux +++ b/stdlib/source/library/lux/meta/target/jvm/bytecode/environment/limit/registry.lux @@ -15,7 +15,7 @@ ["n" nat]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" ///// [encoding ["[1][0]" unsigned (.only U1 U2)]] @@ -29,7 +29,7 @@ (def normal 1) (def wide 2) -(primitive .public Registry +(primitive.def .public Registry U2 (def .public registry diff --git a/stdlib/source/library/lux/meta/target/jvm/bytecode/environment/limit/stack.lux b/stdlib/source/library/lux/meta/target/jvm/bytecode/environment/limit/stack.lux index 7c7e0472e..5ea838b14 100644 --- a/stdlib/source/library/lux/meta/target/jvm/bytecode/environment/limit/stack.lux +++ b/stdlib/source/library/lux/meta/target/jvm/bytecode/environment/limit/stack.lux @@ -13,12 +13,12 @@ [\\format (.only Format)]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" ///// [encoding ["[1][0]" unsigned (.only U2)]]]) -(primitive .public Stack +(primitive.def .public Stack U2 (with_template [ ] diff --git a/stdlib/source/library/lux/meta/target/jvm/bytecode/instruction.lux b/stdlib/source/library/lux/meta/target/jvm/bytecode/instruction.lux index 573424e12..16bc84c5e 100644 --- a/stdlib/source/library/lux/meta/target/jvm/bytecode/instruction.lux +++ b/stdlib/source/library/lux/meta/target/jvm/bytecode/instruction.lux @@ -23,7 +23,7 @@ [macro ["[0]" template]] [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // ["[1][0]" address (.only Address)] ["[1][0]" jump (.only Jump Big_Jump)] @@ -222,7 +222,7 @@ [(n.+ (///unsigned.value ..size/211) size) (|>> mutation ((trinary/211' opcode input0 input1 input2)))])]) -(primitive .public Primitive_Array_Type +(primitive.def .public Primitive_Array_Type U1 (def code diff --git a/stdlib/source/library/lux/meta/target/jvm/constant.lux b/stdlib/source/library/lux/meta/target/jvm/constant.lux index a24ae8cb8..b3fbb5cef 100644 --- a/stdlib/source/library/lux/meta/target/jvm/constant.lux +++ b/stdlib/source/library/lux/meta/target/jvm/constant.lux @@ -23,7 +23,7 @@ ["^" pattern] ["[0]" template]] [type - [primitive (.except #name)]]]]] + ["[0]" primitive (.except def #name)]]]]] ["[0]" / ["[1][0]" tag] ["/[1]" // @@ -41,7 +41,7 @@ (Format UTF8) binaryF.utf8_16) -(primitive .public Class +(primitive.def .public Class (Index UTF8) (def .public index @@ -82,7 +82,7 @@ "[1]::[0]" ("static" doubleToRawLongBits [double] long)) -(primitive .public (Value kind) +(primitive.def .public (Value kind) kind (def .public value diff --git a/stdlib/source/library/lux/meta/target/jvm/constant/tag.lux b/stdlib/source/library/lux/meta/target/jvm/constant/tag.lux index f6917a5d0..63d5a88f4 100644 --- a/stdlib/source/library/lux/meta/target/jvm/constant/tag.lux +++ b/stdlib/source/library/lux/meta/target/jvm/constant/tag.lux @@ -10,12 +10,12 @@ [\\format (.only Format)]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" /// [encoding ["[1][0]" unsigned (.only U1) (.use "u1//[0]" equivalence)]]]) -(primitive .public Tag +(primitive.def .public Tag U1 (def .public equivalence diff --git a/stdlib/source/library/lux/meta/target/jvm/encoding/name.lux b/stdlib/source/library/lux/meta/target/jvm/encoding/name.lux index 7516cdc46..dfbf8f419 100644 --- a/stdlib/source/library/lux/meta/target/jvm/encoding/name.lux +++ b/stdlib/source/library/lux/meta/target/jvm/encoding/name.lux @@ -6,7 +6,7 @@ ["%" \\format (.only format)]]] [meta [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) (def .public internal_separator "/") (def .public external_separator ".") @@ -14,7 +14,7 @@ (type .public External Text) -(primitive .public Internal +(primitive.def .public Internal Text (def .public internal diff --git a/stdlib/source/library/lux/meta/target/jvm/encoding/signed.lux b/stdlib/source/library/lux/meta/target/jvm/encoding/signed.lux index 11a43668f..7bb8f86fc 100644 --- a/stdlib/source/library/lux/meta/target/jvm/encoding/signed.lux +++ b/stdlib/source/library/lux/meta/target/jvm/encoding/signed.lux @@ -21,9 +21,9 @@ [macro ["[0]" template]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) -(primitive .public (Signed brand) +(primitive.def .public (Signed brand) Int (def .public value @@ -51,7 +51,7 @@ (with_template [ <+> <->] [(with_expansions [ (template.symbol [ "'"])] - (primitive Any) + (primitive.def Any) (type .public (Signed ))) (def .public ) diff --git a/stdlib/source/library/lux/meta/target/jvm/encoding/unsigned.lux b/stdlib/source/library/lux/meta/target/jvm/encoding/unsigned.lux index 0c6e7cde3..e34ad104f 100644 --- a/stdlib/source/library/lux/meta/target/jvm/encoding/unsigned.lux +++ b/stdlib/source/library/lux/meta/target/jvm/encoding/unsigned.lux @@ -20,9 +20,9 @@ [macro ["[0]" template]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) -(primitive .public (Unsigned brand) +(primitive.def .public (Unsigned brand) Nat (def .public value @@ -60,7 +60,7 @@ (with_template [ <+> <-> ] [(with_expansions [ (template.symbol [ "'"])] - (primitive .public Any) + (primitive.def .public Any) (type .public (Unsigned ))) (def .public ) diff --git a/stdlib/source/library/lux/meta/target/jvm/index.lux b/stdlib/source/library/lux/meta/target/jvm/index.lux index 05489792b..2ac48514b 100644 --- a/stdlib/source/library/lux/meta/target/jvm/index.lux +++ b/stdlib/source/library/lux/meta/target/jvm/index.lux @@ -8,7 +8,7 @@ [\\format (.only Format)]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // [encoding ["[1][0]" unsigned (.only U2)]]]) @@ -16,7 +16,7 @@ (def .public length //unsigned.bytes/2) -(primitive .public (Index kind) +(primitive.def .public (Index kind) U2 (def .public index diff --git a/stdlib/source/library/lux/meta/target/jvm/modifier.lux b/stdlib/source/library/lux/meta/target/jvm/modifier.lux index 87cbff564..6cac02f5c 100644 --- a/stdlib/source/library/lux/meta/target/jvm/modifier.lux +++ b/stdlib/source/library/lux/meta/target/jvm/modifier.lux @@ -19,12 +19,12 @@ [macro (.only with_symbols) [syntax (.only syntax)]] [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // [encoding ["[1][0]" unsigned]]]) -(primitive .public (Modifier of) +(primitive.def .public (Modifier of) //unsigned.U2 (def .public code diff --git a/stdlib/source/library/lux/meta/target/jvm/modifier/inner.lux b/stdlib/source/library/lux/meta/target/jvm/modifier/inner.lux index c61569575..5fc4e07ff 100644 --- a/stdlib/source/library/lux/meta/target/jvm/modifier/inner.lux +++ b/stdlib/source/library/lux/meta/target/jvm/modifier/inner.lux @@ -3,10 +3,10 @@ [lux (.except static) [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] [// (.only modifiers)]) -(primitive .public Inner Any) +(primitive.def .public Inner Any) (modifiers Inner diff --git a/stdlib/source/library/lux/meta/target/jvm/type.lux b/stdlib/source/library/lux/meta/target/jvm/type.lux index 3e5f0641f..f55b66ef9 100644 --- a/stdlib/source/library/lux/meta/target/jvm/type.lux +++ b/stdlib/source/library/lux/meta/target/jvm/type.lux @@ -16,7 +16,7 @@ ["n" nat]]] [meta [type - [primitive (.except #name)]]]]] + ["[0]" primitive (.except def #name)]]]]] ["[0]" // [encoding ["[1][0]" name (.only External)]]] @@ -26,7 +26,7 @@ ["[1][0]" descriptor (.only Descriptor)] ["[1][0]" reflection (.only Reflection)]]) -(primitive .public (Type category) +(primitive.def .public (Type category) [(Signature category) (Descriptor category) (Reflection category)] diff --git a/stdlib/source/library/lux/meta/target/jvm/type/category.lux b/stdlib/source/library/lux/meta/target/jvm/type/category.lux index fcd7e7dac..9dfe3344c 100644 --- a/stdlib/source/library/lux/meta/target/jvm/type/category.lux +++ b/stdlib/source/library/lux/meta/target/jvm/type/category.lux @@ -5,26 +5,26 @@ [macro ["[0]" template]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) -(primitive Void' Any) -(primitive .public (Value' kind) Any) -(primitive .public (Return' kind) Any) -(primitive .public Method Any) +(primitive.def Void' Any) +(primitive.def .public (Value' kind) Any) +(primitive.def .public (Return' kind) Any) +(primitive.def .public Method Any) (type .public Return (<| Return' Any)) (type .public Value (<| Return' Value' Any)) (type .public Void (<| Return' Void')) -(primitive (Object' brand) Any) +(primitive.def (Object' brand) Any) (type .public Object (<| Return' Value' Object' Any)) -(primitive (Parameter' brand) Any) +(primitive.def (Parameter' brand) Any) (type .public Parameter (<| Return' Value' Object' Parameter' Any)) (with_template [ ] [(with_expansions [ (template.symbol [ "'"])] - (primitive Any) + (primitive.def Any) (type .public (`` (<| Return' Value' (,, (template.spliced )) ))))] @@ -34,5 +34,5 @@ [[Object' Parameter'] Array] ) -(primitive .public Declaration Any) -(primitive .public Inheritance Any) +(primitive.def .public Declaration Any) +(primitive.def .public Inheritance Any) diff --git a/stdlib/source/library/lux/meta/target/jvm/type/descriptor.lux b/stdlib/source/library/lux/meta/target/jvm/type/descriptor.lux index 593c33e40..c9d50b9da 100644 --- a/stdlib/source/library/lux/meta/target/jvm/type/descriptor.lux +++ b/stdlib/source/library/lux/meta/target/jvm/type/descriptor.lux @@ -15,14 +15,14 @@ ["n" nat]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // [category (.only Void Value Return Method Primitive Object Class Array Var Parameter Declaration)] ["/[1]" // [encoding ["[1][0]" name (.only Internal External)]]]]) -(primitive .public (Descriptor category) +(primitive.def .public (Descriptor category) Text (def .public descriptor diff --git a/stdlib/source/library/lux/meta/target/jvm/type/lux.lux b/stdlib/source/library/lux/meta/target/jvm/type/lux.lux index 89639ce4d..306f88580 100644 --- a/stdlib/source/library/lux/meta/target/jvm/type/lux.lux +++ b/stdlib/source/library/lux/meta/target/jvm/type/lux.lux @@ -31,7 +31,7 @@ ["[1][0]" name]]]]) (with_template [] - [(:.primitive .public ( class) Any)] + [(:.def .public ( class) Any)] [Lower] [Upper] diff --git a/stdlib/source/library/lux/meta/target/jvm/type/reflection.lux b/stdlib/source/library/lux/meta/target/jvm/type/reflection.lux index ae1e6c5cf..0cb424d28 100644 --- a/stdlib/source/library/lux/meta/target/jvm/type/reflection.lux +++ b/stdlib/source/library/lux/meta/target/jvm/type/reflection.lux @@ -8,7 +8,7 @@ ["%" \\format (.only format)]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // [category (.only Void Value Return Method Primitive Object Class Array Var Parameter Declaration)] ["[1][0]" descriptor] @@ -16,7 +16,7 @@ [encoding ["[1][0]" name (.only External)]]]]) -(primitive .public (Reflection category) +(primitive.def .public (Reflection category) Text (def .public reflection diff --git a/stdlib/source/library/lux/meta/target/jvm/type/signature.lux b/stdlib/source/library/lux/meta/target/jvm/type/signature.lux index c24f1057d..8a0cbc5f5 100644 --- a/stdlib/source/library/lux/meta/target/jvm/type/signature.lux +++ b/stdlib/source/library/lux/meta/target/jvm/type/signature.lux @@ -13,7 +13,7 @@ ["[0]" list (.use "[1]#[0]" functor)]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // [category (.only Void Value Return Method Primitive Object Class Array Var Parameter Declaration Inheritance)] ["[1][0]" descriptor] @@ -21,7 +21,7 @@ [encoding ["[1][0]" name (.only External)]]]]) -(primitive .public (Signature category) +(primitive.def .public (Signature category) Text (def .public signature diff --git a/stdlib/source/library/lux/meta/target/lua.lux b/stdlib/source/library/lux/meta/target/lua.lux index 8168b065b..063c0fc4d 100644 --- a/stdlib/source/library/lux/meta/target/lua.lux +++ b/stdlib/source/library/lux/meta/target/lua.lux @@ -25,7 +25,7 @@ [syntax (.only syntax)] ["[0]" template]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) ... Added the carriage return for better Windows compatibility. (def \n+ @@ -40,7 +40,7 @@ (def input_separator ", ") -(primitive .public (Code brand) +(primitive.def .public (Code brand) Text (def .public equivalence @@ -65,7 +65,7 @@ (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] - (primitive ( brand) Any) + (primitive.def ( brand) Any) (`` (type .public (|> Any (,, (template.spliced +))))))] [Expression [Code]] @@ -76,7 +76,7 @@ (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] - (primitive Any) + (primitive.def Any) (`` (type .public (|> (,, (template.spliced +))))))] [Literal [Computation' Expression' Code]] diff --git a/stdlib/source/library/lux/meta/target/php.lux b/stdlib/source/library/lux/meta/target/php.lux index 748d852c2..e68d9cc37 100644 --- a/stdlib/source/library/lux/meta/target/php.lux +++ b/stdlib/source/library/lux/meta/target/php.lux @@ -24,7 +24,7 @@ [syntax (.only syntax)] ["[0]" template]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) (def input_separator ", ") (def statement_suffix ";") @@ -48,7 +48,7 @@ (-> Text Text) (text.enclosed ["(" ")"])) -(primitive .public (Code brand) +(primitive.def .public (Code brand) Text (def .public equivalence @@ -73,7 +73,7 @@ (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] - (primitive ( brand) Any) + (primitive.def ( brand) Any) (`` (type .public (|> Any (,, (template.spliced +))))))] [Expression [Code]] @@ -84,7 +84,7 @@ (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] - (primitive .public Any) + (primitive.def .public Any) (`` (type .public (|> (,, (template.spliced +))))))] [Literal [Computation' Expression' Code]] diff --git a/stdlib/source/library/lux/meta/target/python.lux b/stdlib/source/library/lux/meta/target/python.lux index 93014c3e4..9ff10bbe0 100644 --- a/stdlib/source/library/lux/meta/target/python.lux +++ b/stdlib/source/library/lux/meta/target/python.lux @@ -25,7 +25,7 @@ [syntax (.only syntax)] ["[0]" template]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) (.def input_separator ", ") @@ -57,7 +57,7 @@ (|>> (format \n+) (text.replaced text.new_line nested_new_line))))) -(primitive .public (Code brand) +(primitive.def .public (Code brand) Text (.def .public equivalence @@ -82,7 +82,7 @@ (with_template [ ] [(with_expansions [ (template.symbol [ "'"])] - (`` (primitive ( brand) Any)) + (`` (primitive.def ( brand) Any)) (`` (type .public ( brand) ( ( brand)))))] @@ -95,7 +95,7 @@ (with_template [ ] [(with_expansions [ (template.symbol [ "'"])] - (`` (primitive Any)) + (`` (primitive.def Any)) (`` (type .public ( ))))] [Literal Computation] @@ -104,7 +104,7 @@ ) (with_template [ ] - [(primitive .public Any) + [(primitive.def .public Any) (type .public (Var ))] diff --git a/stdlib/source/library/lux/meta/target/r.lux b/stdlib/source/library/lux/meta/target/r.lux index 7da2c28bd..ae57971a3 100644 --- a/stdlib/source/library/lux/meta/target/r.lux +++ b/stdlib/source/library/lux/meta/target/r.lux @@ -20,14 +20,14 @@ [syntax (.only syntax)] ["[0]" template]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) -(primitive .public (Code kind) +(primitive.def .public (Code kind) Text (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] - (primitive .public ( kind) Any) + (primitive.def .public ( kind) Any) (`` (type .public (|> Any (,, (template.spliced +))))))] [Expression [Code]] @@ -35,14 +35,14 @@ (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] - (primitive .public ( kind) Any) + (primitive.def .public ( kind) Any) (`` (type .public ( ) (|> (,, (template.spliced +))))))] [Var [Expression' Code]] ) (with_template [ ] - [(primitive .public Any) + [(primitive.def .public Any) (type .public (Var ))] [SVar Single] diff --git a/stdlib/source/library/lux/meta/target/ruby.lux b/stdlib/source/library/lux/meta/target/ruby.lux index 628c02eb3..2bef96112 100644 --- a/stdlib/source/library/lux/meta/target/ruby.lux +++ b/stdlib/source/library/lux/meta/target/ruby.lux @@ -24,7 +24,7 @@ [syntax (.only syntax)] ["[0]" template]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) (def input_separator ", ") (def statement_suffix ";") @@ -40,7 +40,7 @@ (|>> (format \n+) (text.replaced text.new_line nested_new_line)))) -(primitive .public (Code brand) +(primitive.def .public (Code brand) Text (def .public equivalence @@ -59,7 +59,7 @@ (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] - (primitive ( brand) Any) + (primitive.def ( brand) Any) (`` (type .public (|> Any (,, (template.spliced +))))))] [Expression [Code]] @@ -72,7 +72,7 @@ (with_template [ +] [(with_expansions [ (template.symbol [ "'"])] - (primitive Any) + (primitive.def Any) (`` (type .public (|> (,, (template.spliced +))))))] [Literal [Computation' Expression' Code]] diff --git a/stdlib/source/library/lux/meta/target/scheme.lux b/stdlib/source/library/lux/meta/target/scheme.lux index 51a712a6f..af3fd8b00 100644 --- a/stdlib/source/library/lux/meta/target/scheme.lux +++ b/stdlib/source/library/lux/meta/target/scheme.lux @@ -20,7 +20,7 @@ [macro ["[0]" template]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) ... Added the carriage return for better Windows compatibility. (def \n+ @@ -32,7 +32,7 @@ (.let [nested_new_line (format text.new_line text.tab)] (text.replaced text.new_line nested_new_line))) -(primitive .public (Code k) +(primitive.def .public (Code k) Text (def .public equivalence @@ -48,14 +48,14 @@ (def hash (|>> representation (at text.hash hash))))) (with_template [ +] - [(primitive .public ( brand) Any) + [(primitive.def .public ( brand) Any) (`` (type .public (|> Any (,, (template.spliced +)))))] [Expression Expression' [Code]] ) (with_template [ +] - [(primitive .public Any) + [(primitive.def .public Any) (`` (type .public (|> (,, (template.spliced +)))))] [Var Var' [Expression' Code]] diff --git a/stdlib/source/library/lux/meta/type.lux b/stdlib/source/library/lux/meta/type.lux index badf98388..a024a45bc 100644 --- a/stdlib/source/library/lux/meta/type.lux +++ b/stdlib/source/library/lux/meta/type.lux @@ -428,16 +428,16 @@ (do meta.monad [location meta.location valueT (meta.type valueN) - .let [_ (.log# (all text#composite - (symbol#encoded (symbol ..log!)) " " (location.format location) text.new_line - "Expression: " (when valueC - {.#Some valueC} - (code.format valueC) - - {.#None} - (symbol#encoded valueN)) - text.new_line - " Type: " (..format valueT)))]] + .let [_ (.log!# (all text#composite + (symbol#encoded (symbol ..log!)) " " (location.format location) text.new_line + "Expression: " (when valueC + {.#Some valueC} + (code.format valueC) + + {.#None} + (symbol#encoded valueN)) + text.new_line + " Type: " (..format valueT)))]] (in (list (code.symbol valueN)))) {.#Right valueC} diff --git a/stdlib/source/library/lux/meta/type/dynamic.lux b/stdlib/source/library/lux/meta/type/dynamic.lux index 6c69e7417..ef7605ad2 100644 --- a/stdlib/source/library/lux/meta/type/dynamic.lux +++ b/stdlib/source/library/lux/meta/type/dynamic.lux @@ -14,7 +14,7 @@ [macro (.only with_symbols) ["[0]" syntax (.only syntax)]]]]] ["[0]" // (.only) - ["[0]" primitive (.only primitive)]]) + ["[0]" primitive (.only)]]) (exception.def .public (wrong_type [expected actual]) (Exception [Type Type]) @@ -23,7 +23,7 @@ ["Actual" (%.type actual)]))) (with_expansions [ [Type Any]] - (primitive .public Dynamic + (primitive.def .public Dynamic (def .public dynamic diff --git a/stdlib/source/library/lux/meta/type/primitive.lux b/stdlib/source/library/lux/meta/type/primitive.lux index 5f7269bca..db066d253 100644 --- a/stdlib/source/library/lux/meta/type/primitive.lux +++ b/stdlib/source/library/lux/meta/type/primitive.lux @@ -1,6 +1,6 @@ (.require [library - [lux (.except) + [lux (.except def) ["[0]" meta] [abstract [monad (.only do)]] @@ -27,7 +27,11 @@ #abstraction Code #representation Code])) -(context.def [frames expression declaration] Frame) +(context.def + [frames] + [expression] + [declaration] + Frame) (.def .public current (Meta Frame) @@ -37,13 +41,13 @@ (-> Text (Meta Frame)) (context.search (|>> (the #name) (text#= name)) ..frames)) -(def cast +(.def cast (Parser [(Maybe Text) Code]) (<>.either (<>.and (<>.maybe .local) .any) (<>.and (<>#in {.#None}) .any))) (with_template [ ] - [(def .public + [(.def .public (syntax (_ [[frame value] ..cast]) (do meta.monad [[name type_vars abstraction representation] (when frame @@ -59,12 +63,12 @@ [representation abstraction representation] ) -(def declarationP +(.def declarationP (Parser [Text (List Text)]) (<>.either (.form (<>.and .local (<>.some .local))) (<>.and .local (at <>.monad in (list))))) -(def abstract +(.def abstract (Parser [Code [Text (List Text)] Code (List Code)]) (|export|.parser (all <>.and @@ -75,7 +79,7 @@ ... TODO: Make sure the generated code always gets optimized away. ... (This applies to uses of "abstraction" and "representation") -(def .public primitive +(.def .public def (syntax (_ [[export_policy [name type_vars] representation_type primitives] ..abstract]) (do meta.monad @@ -92,12 +96,12 @@ (, representation_type)) (,* primitives))))))) -(def selection +(.def selection (Parser [(List Code) Code]) (<>.either (<>.and (<>#each (|>> list) .any) .any) (<>.and (<>#in (list)) .any))) -(def .public transmutation +(.def .public transmutation (syntax (_ [[specific value] ..selection]) (in (list (` (.|> (, value) (..representation (,* specific)) diff --git a/stdlib/source/library/lux/meta/type/quotient.lux b/stdlib/source/library/lux/meta/type/quotient.lux index 04058c1e1..99a63d400 100644 --- a/stdlib/source/library/lux/meta/type/quotient.lux +++ b/stdlib/source/library/lux/meta/type/quotient.lux @@ -9,9 +9,9 @@ [macro (.only with_symbols) [syntax (.only syntax)]]]]] ["[0]" // (.only) - [primitive (.except)]]) + ["[0]" primitive (.except def)]]) -(primitive .public (Class t c %) +(primitive.def .public (Class t c %) (-> t c) (def .public class @@ -20,7 +20,7 @@ (-> (-> t c) (Class t c %)))) (|>> abstraction)) - (primitive .public (Quotient t c %) + (primitive.def .public (Quotient t c %) (Record [#value t #label c]) diff --git a/stdlib/source/library/lux/meta/type/refinement.lux b/stdlib/source/library/lux/meta/type/refinement.lux index fb7553897..3ccaf066d 100644 --- a/stdlib/source/library/lux/meta/type/refinement.lux +++ b/stdlib/source/library/lux/meta/type/refinement.lux @@ -10,9 +10,9 @@ ["[0]" macro (.only) [syntax (.only syntax)]]]]] ["[0]" // (.only) - [primitive (.except)]]) + ["[0]" primitive (.except def)]]) -(primitive .public (Refined t %) +(primitive.def .public (Refined t %) (Record [#value t #predicate (Predicate t)]) diff --git a/stdlib/source/library/lux/meta/type/resource.lux b/stdlib/source/library/lux/meta/type/resource.lux index acf620981..25b8a52fe 100644 --- a/stdlib/source/library/lux/meta/type/resource.lux +++ b/stdlib/source/library/lux/meta/type/resource.lux @@ -24,7 +24,7 @@ ["[0]" macro (.only) [syntax (.only syntax)]]]]] [// - [primitive (.except)]]) + ["[0]" primitive (.except def)]]) (type .public (Procedure ! input output value) (-> input (! [output value]))) @@ -67,10 +67,10 @@ [output procedure] (in [keys output])))) -(primitive .public Ordered Any) -(primitive .public Commutative Any) +(primitive.def .public Ordered Any) +(primitive.def .public Commutative Any) -(primitive .public (Key mode key) +(primitive.def .public (Key mode key) Any (with_template [ ] @@ -82,7 +82,7 @@ [commutative_key Commutative] )) -(primitive .public (Res key value) +(primitive.def .public (Res key value) value (with_template [ ] diff --git a/stdlib/source/library/lux/meta/type/row.lux b/stdlib/source/library/lux/meta/type/row.lux index a51add3cd..c4c8b9b1f 100644 --- a/stdlib/source/library/lux/meta/type/row.lux +++ b/stdlib/source/library/lux/meta/type/row.lux @@ -25,14 +25,15 @@ ["[0]" code (.only) ["?[1]" \\parser (.only Parser)]] ["[0]" macro (.only with_symbols) - [vocabulary (.only vocabulary)] + ["[0]" vocabulary] [syntax (.only syntax) ["[0]" export]]]]]]) -(vocabulary [.public Slot] - [.public slot] - [.private macro] - [.private by_name]) +(vocabulary.def + [.public Slot] + [.public slot] + [.private macro] + [.private by_name]) (.type .public (Row content extra) (Record diff --git a/stdlib/source/library/lux/meta/type/unit.lux b/stdlib/source/library/lux/meta/type/unit.lux index 823e300cd..4aa27fbfd 100644 --- a/stdlib/source/library/lux/meta/type/unit.lux +++ b/stdlib/source/library/lux/meta/type/unit.lux @@ -15,9 +15,9 @@ ["[0]" macro (.only) [syntax (.only syntax)]]]]] ["[0]" // (.only) - [primitive (.except)]]) + ["[0]" primitive (.except def)]]) -(primitive .public (Measure scale unit) +(primitive.def .public (Measure scale unit) Int (def .public measure diff --git a/stdlib/source/library/lux/world/db/sql.lux b/stdlib/source/library/lux/world/db/sql.lux index 698c862bc..9a2e04dc8 100644 --- a/stdlib/source/library/lux/world/db/sql.lux +++ b/stdlib/source/library/lux/world/db/sql.lux @@ -14,7 +14,7 @@ [macro ["[0]" template]]] [type - [primitive (.except)]]]]) + ["[0]" primitive (.except def)]]]]) (def parenthesize (-> Text Text) @@ -22,7 +22,7 @@ ... Kind (with_template [] - [(primitive .public Any)] + [(primitive.def .public Any)] [Literal'] [Column'] @@ -63,7 +63,7 @@ (def .public no_alias Alias "") -(primitive .public (SQL kind) +(primitive.def .public (SQL kind) Text ... SQL diff --git a/stdlib/source/library/lux/world/environment.lux b/stdlib/source/library/lux/world/environment.lux index 31dafca6d..f391ea67c 100644 --- a/stdlib/source/library/lux/world/environment.lux +++ b/stdlib/source/library/lux/world/environment.lux @@ -274,8 +274,8 @@ ... @.scheme ... (these (ffi.import (exit [Int] "io" Nothing)) ... ... https://srfi.schemers.org/srfi-98/srfi-98.html - ... (primitive Pair Any) - ... (primitive PList Any) + ... (primitive.def Pair Any) + ... (primitive.def PList Any) ... (ffi.import (get-environment-variables [] "io" PList)) ... (ffi.import (car [Pair] Text)) ... (ffi.import (cdr [Pair] Text)) diff --git a/stdlib/source/library/lux/world/file/watch.lux b/stdlib/source/library/lux/world/file/watch.lux index f5f64dcf5..b8d07c7fc 100644 --- a/stdlib/source/library/lux/world/file/watch.lux +++ b/stdlib/source/library/lux/world/file/watch.lux @@ -29,13 +29,13 @@ [meta ["@" target] [type - [primitive (.only primitive representation abstraction)]]] + ["[0]" primitive (.only representation abstraction)]]] [world [time ["[0]" instant (.only Instant) (.use "[1]#[0]" equivalence)]]]]] ["[0]" //]) -(primitive .public Concern +(primitive.def .public Concern (Record [#creation Bit #modification Bit diff --git a/stdlib/source/library/lux/world/locale.lux b/stdlib/source/library/lux/world/locale.lux index 6cd384586..f42c19e20 100644 --- a/stdlib/source/library/lux/world/locale.lux +++ b/stdlib/source/library/lux/world/locale.lux @@ -12,12 +12,12 @@ ["[0]" encoding (.only Encoding)]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] [/ ["[0]" language (.only Language)] ["[0]" territory (.only Territory)]]) -(primitive .public Locale +(primitive.def .public Locale Text (def territory_separator "_") diff --git a/stdlib/source/library/lux/world/locale/language.lux b/stdlib/source/library/lux/world/locale/language.lux index f5ceb4852..31fa44455 100644 --- a/stdlib/source/library/lux/world/locale/language.lux +++ b/stdlib/source/library/lux/world/locale/language.lux @@ -10,10 +10,10 @@ [macro ["[0]" template]] [type - [primitive (.except #name)]]]]]) + ["[0]" primitive (.except def #name)]]]]]) ... https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes -(primitive .public Language +(primitive.def .public Language (Record [#name Text #code Text]) diff --git a/stdlib/source/library/lux/world/locale/territory.lux b/stdlib/source/library/lux/world/locale/territory.lux index 9cd72ae2a..bf33f64b6 100644 --- a/stdlib/source/library/lux/world/locale/territory.lux +++ b/stdlib/source/library/lux/world/locale/territory.lux @@ -10,10 +10,10 @@ [macro ["[0]" template]] [type - [primitive (.except #name)]]]]]) + ["[0]" primitive (.except def #name)]]]]]) ... https://en.wikipedia.org/wiki/ISO_3166-1 -(primitive .public Territory +(primitive.def .public Territory (Record [#name Text #short Text diff --git a/stdlib/source/library/lux/world/net/http/cookie.lux b/stdlib/source/library/lux/world/net/http/cookie.lux index 528da5899..c8acede49 100644 --- a/stdlib/source/library/lux/world/net/http/cookie.lux +++ b/stdlib/source/library/lux/world/net/http/cookie.lux @@ -21,7 +21,7 @@ ["i" int]]] [meta [type - ["[0]" primitive (.only primitive)]]] + ["[0]" primitive (.only)]]] [world ["[0]" time (.only) ["[0]" day] @@ -130,7 +130,7 @@ [http_only "HttpOnly"] ) -(primitive .public CSRF_Policy +(primitive.def .public CSRF_Policy Text (with_template [ ] diff --git a/stdlib/source/library/lux/world/net/http/header.lux b/stdlib/source/library/lux/world/net/http/header.lux index 662310def..61522e8a7 100644 --- a/stdlib/source/library/lux/world/net/http/header.lux +++ b/stdlib/source/library/lux/world/net/http/header.lux @@ -17,9 +17,9 @@ [number ["[0]" nat]]]]] [// - ["[0]" mime (.only MIME)] ["[0]" cookie] [// (.only URL) + ["[0]" mime (.only MIME)] ["[0]" uri ["[1]" encoding]]]]) diff --git a/stdlib/source/library/lux/world/net/http/mime.lux b/stdlib/source/library/lux/world/net/http/mime.lux deleted file mode 100644 index 0ff909b96..000000000 --- a/stdlib/source/library/lux/world/net/http/mime.lux +++ /dev/null @@ -1,112 +0,0 @@ -(.require - [library - [lux (.except) - [abstract - ["[0]" equivalence (.only Equivalence)] - ["[0]" hash (.only Hash)]] - [data - ["[0]" text (.only) - ["%" \\format] - ["[0]" encoding (.only Encoding)]]] - [meta - [type - [primitive (.except)]]]]]) - -(primitive .public MIME - Text - - (def .public mime - (-> Text MIME) - (|>> abstraction)) - - (def .public name - (-> MIME Text) - (|>> representation)) - - (def .public equivalence - (Equivalence MIME) - (at equivalence.functor each ..name text.equivalence)) - - (def .public hash - (Hash MIME) - (at hash.functor each ..name text.hash)) - ) - -... https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types -(with_template [ ] - [(def .public MIME (..mime ))] - - [aac_audio "audio/aac"] - [abiword "application/x-abiword"] - [avi "video/x-msvideo"] - [amazon_kindle_ebook "application/vnd.amazon.ebook"] - [binary "application/octet-stream"] - [bitmap "image/bmp"] - [bzip "application/x-bzip"] - [bzip2 "application/x-bzip2"] - [c_shell "application/x-csh"] - [css "text/css"] - [csv "text/csv"] - [microsoft_word "application/msword"] - [microsoft_word_openxml "application/vnd.openxmlformats-officedocument.wordprocessingml.document"] - [ms_embedded_opentype_fonts "application/vnd.ms-fontobject"] - [epub "application/epub+zip"] - [ecmascript "application/ecmascript"] - [gif "image/gif"] - [html "text/html"] - [icon "image/x-icon"] - [icalendar "text/calendar"] - [jar "application/java-archive"] - [jpeg "image/jpeg"] - [javascript "application/javascript"] - [json "application/json"] - [midi "audio/midi"] - [mpeg "video/mpeg"] - [apple_installer_package "application/vnd.apple.installer+xml"] - [opendocument_presentation "application/vnd.oasis.opendocument.presentation"] - [opendocument_spreadsheet "application/vnd.oasis.opendocument.spreadsheet"] - [opendocument_text "application/vnd.oasis.opendocument.text"] - [ogg_audio "audio/ogg"] - [ogg_video "video/ogg"] - [ogg "application/ogg"] - [opentype_font "font/otf"] - [png "image/png"] - [pdf "application/pdf"] - [microsoft_powerpoint "application/vnd.ms-powerpoint"] - [microsoft_powerpoint_openxml "application/vnd.openxmlformats-officedocument.presentationml.presentation"] - [rar "application/x-rar-compressed"] - [rtf "application/rtf"] - [bourne_shell "application/x-sh"] - [svg "image/svg+xml"] - [flash "application/x-shockwave-flash"] - [tar "application/x-tar"] - [tiff "image/tiff"] - [typescript "application/typescript"] - [truetype_font "font/ttf"] - [microsoft_visio "application/vnd.visio"] - [wav "audio/wav"] - [webm_audio "audio/webm"] - [webm_video "video/webm"] - [webp "image/webp"] - [woff "font/woff"] - [woff2 "font/woff2"] - [xhtml "application/xhtml+xml"] - [microsoft_excel "application/vnd.ms-excel"] - [microsoft_excel_openxml "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"] - [xml "application/xml"] - [xul "application/vnd.mozilla.xul+xml"] - [zip "application/zip"] - [!3gpp_audio "audio/3gpp"] - [!3gpp "video/3gpp"] - [!3gpp2_audio "audio/3gpp2"] - [!3gpp2 "video/3gpp2"] - [!7z "application/x-7z-compressed"] - ) - -(def .public (text encoding) - (-> Encoding MIME) - (..mime (%.format "text/plain; charset=" text.double_quote (encoding.name encoding) text.double_quote))) - -(def .public utf_8 - MIME - (..text encoding.utf_8)) diff --git a/stdlib/source/library/lux/world/net/http/version.lux b/stdlib/source/library/lux/world/net/http/version.lux index 1bd888b31..51eab0f59 100644 --- a/stdlib/source/library/lux/world/net/http/version.lux +++ b/stdlib/source/library/lux/world/net/http/version.lux @@ -8,9 +8,9 @@ ["[0]" text (.use "[1]#[0]" hash)]] [meta [type - ["[0]" primitive (.only primitive)]]]]]) + ["[0]" primitive (.only)]]]]]) -(primitive .public Version +(primitive.def .public Version Text (def .public equivalence diff --git a/stdlib/source/library/lux/world/net/mime.lux b/stdlib/source/library/lux/world/net/mime.lux new file mode 100644 index 000000000..8e3919836 --- /dev/null +++ b/stdlib/source/library/lux/world/net/mime.lux @@ -0,0 +1,115 @@ +(.require + [library + [lux (.except) + [abstract + ["[0]" equivalence (.only Equivalence)] + ["[0]" hash (.only Hash)]] + [data + ["[0]" text (.only) + ["%" \\format] + ["[0]" encoding (.only Encoding)]]] + [meta + [type + ["[0]" primitive]]]]]) + +(primitive.def .public MIME + Text + + (def .public mime + (-> Text MIME) + (|>> primitive.abstraction)) + + (def .public name + (-> MIME Text) + (|>> primitive.representation)) + + (def .public equivalence + (Equivalence MIME) + (at equivalence.functor each ..name text.equivalence)) + + (def .public hash + (Hash MIME) + (at hash.functor each ..name text.hash)) + ) + +... https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types +(with_template [ ] + [(def .public + MIME + (..mime ))] + + [aac "audio/aac"] + [abiword "application/x-abiword"] + [avi "video/x-msvideo"] + [amazon_kindle_ebook "application/vnd.amazon.ebook"] + [binary "application/octet-stream"] + [bitmap "image/bmp"] + [bzip "application/x-bzip"] + [bzip2 "application/x-bzip2"] + [c_shell "application/x-csh"] + [css "text/css"] + [csv "text/csv"] + [microsoft_word "application/msword"] + [microsoft_word_openxml "application/vnd.openxmlformats-officedocument.wordprocessingml.document"] + [ms_embedded_opentype_fonts "application/vnd.ms-fontobject"] + [epub "application/epub+zip"] + [ecmascript "application/ecmascript"] + [gif "image/gif"] + [html "text/html"] + [icon "image/x-icon"] + [icalendar "text/calendar"] + [jar "application/java-archive"] + [jpeg "image/jpeg"] + [javascript "application/javascript"] + [json "application/json"] + [midi "audio/midi"] + [mpeg "video/mpeg"] + [apple_installer_package "application/vnd.apple.installer+xml"] + [opendocument_presentation "application/vnd.oasis.opendocument.presentation"] + [opendocument_spreadsheet "application/vnd.oasis.opendocument.spreadsheet"] + [opendocument_text "application/vnd.oasis.opendocument.text"] + [ogg_audio "audio/ogg"] + [ogg_video "video/ogg"] + [ogg "application/ogg"] + [opentype_font "font/otf"] + [png "image/png"] + [pdf "application/pdf"] + [microsoft_powerpoint "application/vnd.ms-powerpoint"] + [microsoft_powerpoint_openxml "application/vnd.openxmlformats-officedocument.presentationml.presentation"] + [rar "application/x-rar-compressed"] + [rtf "application/rtf"] + [bourne_shell "application/x-sh"] + [svg "image/svg+xml"] + [flash "application/x-shockwave-flash"] + [tar "application/x-tar"] + [tiff "image/tiff"] + [typescript "application/typescript"] + [truetype_font "font/ttf"] + [microsoft_visio "application/vnd.visio"] + [wav "audio/wav"] + [webm_audio "audio/webm"] + [webm_video "video/webm"] + [webp "image/webp"] + [woff "font/woff"] + [woff2 "font/woff2"] + [xhtml "application/xhtml+xml"] + [microsoft_excel "application/vnd.ms-excel"] + [microsoft_excel_openxml "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"] + [xml "application/xml"] + [xul "application/vnd.mozilla.xul+xml"] + [zip "application/zip"] + + [audio_3gpp "audio/3gpp"] + [video_3gpp "video/3gpp"] + [audio_3gpp2 "audio/3gpp2"] + [video_3gpp2 "video/3gpp2"] + [compressed_7z "application/x-7z-compressed"] + ) + +(def .public (text encoding) + (-> Encoding MIME) + (..mime (%.format "text/plain; charset=" text.double_quote (encoding.name encoding) text.double_quote))) + +(def .public utf_8 + MIME + (..text encoding.utf_8)) diff --git a/stdlib/source/library/lux/world/net/uri/scheme.lux b/stdlib/source/library/lux/world/net/uri/scheme.lux index 7db4b9583..2c5d7b36f 100644 --- a/stdlib/source/library/lux/world/net/uri/scheme.lux +++ b/stdlib/source/library/lux/world/net/uri/scheme.lux @@ -8,10 +8,10 @@ ["[0]" text]] [meta [type - ["[0]" primitive (.only primitive)]]]]]) + ["[0]" primitive (.only)]]]]]) ... https://en.wikipedia.org/wiki/List_of_URI_schemes -(primitive .public Scheme +(primitive.def .public Scheme Text (with_template [ ] diff --git a/stdlib/source/library/lux/world/time.lux b/stdlib/source/library/lux/world/time.lux index b855ea4af..b4147a5cb 100644 --- a/stdlib/source/library/lux/world/time.lux +++ b/stdlib/source/library/lux/world/time.lux @@ -20,7 +20,7 @@ ["n" nat (.use "[1]#[0]" decimal)]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] [/ ["[0]" duration (.only Duration)]]) @@ -79,7 +79,7 @@ [..seconds second_parser invalid_second ..section_parser] ) -(primitive .public Time +(primitive.def .public Time Nat (def .public midnight diff --git a/stdlib/source/library/lux/world/time/date.lux b/stdlib/source/library/lux/world/time/date.lux index 30c182179..123cfb667 100644 --- a/stdlib/source/library/lux/world/time/date.lux +++ b/stdlib/source/library/lux/world/time/date.lux @@ -24,7 +24,7 @@ ["i" int]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // ["[1][0]" year (.only Year)] ["[1][0]" month (.only Month)]]) @@ -69,7 +69,7 @@ (def separator "-") -(primitive .public Date +(primitive.def .public Date (Record [#year Year #month Month diff --git a/stdlib/source/library/lux/world/time/duration.lux b/stdlib/source/library/lux/world/time/duration.lux index a8850b4fb..3aca1d203 100644 --- a/stdlib/source/library/lux/world/time/duration.lux +++ b/stdlib/source/library/lux/world/time/duration.lux @@ -20,11 +20,11 @@ ["[0]" nat (.use "[1]#[0]" decimal)]]] [meta [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // ["[1][0]" year]]) -(primitive .public Duration +(primitive.def .public Duration Int (def .public of_millis diff --git a/stdlib/source/library/lux/world/time/instant.lux b/stdlib/source/library/lux/world/time/instant.lux index e5fd7fd34..233c8d511 100644 --- a/stdlib/source/library/lux/world/time/instant.lux +++ b/stdlib/source/library/lux/world/time/instant.lux @@ -23,7 +23,7 @@ [meta ["@" target] [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // (.only Time) ["[0]" duration (.only Duration)] ["[0]" year (.only Year)] @@ -31,7 +31,7 @@ ["[0]" day (.only Day)] ["[0]" date (.only Date)]]) -(primitive .public Instant +(primitive.def .public Instant Int (def .public of_millis diff --git a/stdlib/source/library/lux/world/time/solar.lux b/stdlib/source/library/lux/world/time/solar.lux index 0eff5ee00..8c4ffa315 100644 --- a/stdlib/source/library/lux/world/time/solar.lux +++ b/stdlib/source/library/lux/world/time/solar.lux @@ -16,7 +16,7 @@ [meta ["@" target] [type - [primitive (.except)]]]]] + ["[0]" primitive (.except def)]]]]] ["[0]" // ["[1]" instant] ["[0]" duration (.only Duration)]]) @@ -24,7 +24,7 @@ (type .public Zone Text) -(primitive .public Instant +(primitive.def .public Instant (Record [#utc //.Instant #zone Zone diff --git a/stdlib/source/library/lux/world/time/year.lux b/stdlib/source/library/lux/world/time/year.lux index 8826f089d..3098270f8 100644 --- a/stdlib/source/library/lux/world/time/year.lux +++ b/stdlib/source/library/lux/world/time/year.lux @@ -19,7 +19,7 @@ ["i" int (.use "[1]#[0]" decimal)]]] [meta [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) (def (internal year) (-> Int Int) @@ -36,7 +36,7 @@ (exception.def .public there_is_no_year_0) ... https://en.wikipedia.org/wiki/Gregorian_calendar -(primitive .public Year +(primitive.def .public Year Int (def .public (year value) diff --git a/stdlib/source/program/aedifex/artifact/time/date.lux b/stdlib/source/program/aedifex/artifact/time/date.lux index d1f9a0899..f78a6c54d 100644 --- a/stdlib/source/program/aedifex/artifact/time/date.lux +++ b/stdlib/source/program/aedifex/artifact/time/date.lux @@ -18,7 +18,7 @@ ["i" int]]] [meta [type - [primitive (.except)]]] + ["[0]" primitive (.except def)]]] [world [time ["[0]" date (.use "[1]#[0]" equivalence)] @@ -41,7 +41,7 @@ ["Maximum" (%.int ..max_year)] ["Year" (%.int (year.value year))]))) -(primitive .public Date +(primitive.def .public Date date.Date (def .public epoch diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index d58f2d23e..fbbe69825 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -22,7 +22,7 @@ [macro ["^" pattern]] [type - [primitive (.except)]]]]]) + ["[0]" primitive (.except def)]]]]]) ... TODO: Replace with pure-Lux implementations of these algorithms ... https://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode @@ -35,10 +35,10 @@ ("static" getInstance [java/lang/String] java/security/MessageDigest) (digest [[byte]] [byte])) -(primitive .public SHA1 Any) -(primitive .public MD5 Any) +(primitive.def .public SHA1 Any) +(primitive.def .public MD5 Any) -(primitive .public (Hash h) +(primitive.def .public (Hash h) Binary (def .public data diff --git a/stdlib/source/specification/compositor/generation/common.lux b/stdlib/source/specification/compositor/generation/common.lux index 099e556e1..a0d202a2e 100644 --- a/stdlib/source/specification/compositor/generation/common.lux +++ b/stdlib/source/specification/compositor/generation/common.lux @@ -298,9 +298,9 @@ [message (r.alphabetic 5)] (all _.and (_.test "Can log messages." - (|> {synthesis.#Extension .log# + (|> {synthesis.#Extension .log!# (list (synthesis.text (format "LOG: " message)))} - (run (..safe .log#)) + (run (..safe .log!#)) (pipe.when {try.#Success valueV} true diff --git a/stdlib/source/specification/lux/abstract/codec.lux b/stdlib/source/specification/lux/abstract/codec.lux index 80fa0d327..e4e9d3bed 100644 --- a/stdlib/source/specification/lux/abstract/codec.lux +++ b/stdlib/source/specification/lux/abstract/codec.lux @@ -14,15 +14,15 @@ [// [equivalence (.only Equivalence)]]]]) -(def .public (spec (open "@//[0]") (open "@//[0]") generator) +(def .public (spec (open "/#[0]") (open "/#[0]") generator) (All (_ m a) (-> (Equivalence a) (/.Codec m a) (Random a) Test)) (do random.monad [expected generator] (_.for [/.Codec] - (_.test "Isomorphism." - (when (|> expected @//encoded @//decoded) + (_.coverage [/.encoded /.decoded] + (when (|> expected /#encoded /#decoded) {try.#Success actual} - (@//= expected actual) + (/#= expected actual) {try.#Failure _} false))))) diff --git a/stdlib/source/test/aedifex/artifact.lux b/stdlib/source/test/aedifex/artifact.lux index 621af00af..f9bf55c4c 100644 --- a/stdlib/source/test/aedifex/artifact.lux +++ b/stdlib/source/test/aedifex/artifact.lux @@ -31,9 +31,9 @@ (Random /.Artifact) (let [size 4] (all random.and - (random.lower_case size) - (random.lower_case size) - (random.lower_case size)))) + (random.lower_cased size) + (random.lower_cased size) + (random.lower_cased size)))) (def .public test Test diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux index 79b3210ff..6e8aff6b6 100644 --- a/stdlib/source/test/aedifex/dependency/deployment.lux +++ b/stdlib/source/test/aedifex/dependency/deployment.lux @@ -150,7 +150,7 @@ (<| (_.covering /._) (do [! random.monad] [address (at ! each (text.suffix uri.separator) - (random.upper_case 10))] + (random.upper_cased 10))] (all _.and (do [! random.monad] [[dependency expected_artifact package] ..bundle diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux index 27c194d84..1f5fc5f8e 100644 --- a/stdlib/source/test/aedifex/metadata/artifact.lux +++ b/stdlib/source/test/aedifex/metadata/artifact.lux @@ -99,8 +99,8 @@ (text#= (//.remote_project_uri artifact) (/.uri artifact))) (do random.monad - [home (random.lower_case 5) - working_directory (random.lower_case 5) + [home (random.lower_cased 5) + working_directory (random.lower_cased 5) .let [program (program.async (program.mock environment.empty home working_directory)) fs (file.mock (at file.default separator)) repository (///repository/local.repository program fs)]] diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux index fa26186ea..30a8b0311 100644 --- a/stdlib/source/test/aedifex/metadata/snapshot.lux +++ b/stdlib/source/test/aedifex/metadata/snapshot.lux @@ -111,8 +111,8 @@ (text#= (//.remote_artifact_uri artifact) (/.uri artifact))) (do random.monad - [home (random.lower_case 5) - working_directory (random.lower_case 5) + [home (random.lower_cased 5) + working_directory (random.lower_cased 5) .let [program (program.async (program.mock environment.empty home working_directory)) fs (file.mock (at file.default separator)) repository (///repository/local.repository program fs)]] diff --git a/stdlib/source/test/aedifex/repository/local.lux b/stdlib/source/test/aedifex/repository/local.lux index 874c773b3..7edaa1353 100644 --- a/stdlib/source/test/aedifex/repository/local.lux +++ b/stdlib/source/test/aedifex/repository/local.lux @@ -29,16 +29,16 @@ Test (<| (_.covering /._) (do [! random.monad] - [/ (random.upper_case 1) - home (random.lower_case 10) - working_directory (random.lower_case 10) + [/ (random.upper_cased 1) + home (random.lower_cased 10) + working_directory (random.lower_cased 10) .let [fs (file.mock /) program (program.async (program.mock environment.empty home working_directory)) repo (/.repository program fs)] - uri (random.lower_case 10) + uri (random.lower_cased 10) expected (at ! each (at utf8.codec encoded) - (random.lower_case 10))] + (random.lower_cased 10))] (all _.and (in (do async.monad [before_upload (at repo download uri) diff --git a/stdlib/source/test/aedifex/repository/remote.lux b/stdlib/source/test/aedifex/repository/remote.lux index 5a1c21316..4540ee5eb 100644 --- a/stdlib/source/test/aedifex/repository/remote.lux +++ b/stdlib/source/test/aedifex/repository/remote.lux @@ -85,14 +85,14 @@ Test (<| (_.covering /._) (do [! random.monad] - [address (random.upper_case 10) - uri (random.lower_case 10) + [address (random.upper_cased 10) + uri (random.lower_cased 10) - user (random.lower_case 10) - password (random.lower_case 10) + user (random.lower_cased 10) + password (random.lower_cased 10) content (at ! each (at utf8.codec encoded) - (random.lower_case 10))] + (random.lower_cased 10))] (all _.and (_.coverage [/.repository /.user_agent /.Address] (let [repo (/.repository (..good_http user password) diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index 8a5383eea..f00cf0abc 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -127,7 +127,7 @@ (def for_try Test (do random.monad - [expected_error (random.lower_case 5) + [expected_error (random.lower_cased 5) expected random.nat] (all _.and (_.coverage [/.try] @@ -439,13 +439,13 @@ (..found_crosshair?)))) ... (_.coverage [/.require] ... (`` (with_expansions [ (.in_module# "library/lux" library/lux.refer) - ... (static.random code.text (random.lower_case 1)) - ... (static.random code.local (random.lower_case 1)) - ... (static.random code.text (random.lower_case 2)) + ... (static.random code.text (random.lower_cased 1)) + ... (static.random code.local (random.lower_cased 1)) + ... (static.random code.text (random.lower_cased 2)) ... ' (template.symbol []) - ... (static.random code.text (random.lower_case 3)) + ... (static.random code.text (random.lower_cased 3)) ... ' (template.symbol []) - ... (static.random code.text (random.lower_case 4)) + ... (static.random code.text (random.lower_cased 4)) ... ' (template.symbol []) ... (template.text [ "/" ]) ... (template.text [// ']) @@ -745,7 +745,7 @@ start/b random.nat shift/s random.nat shift/b random.nat - text (random.lower_case 1) + text (random.lower_cased 1) .let [expected/s (n.+ shift/s start/s) expected/b (n.+ shift/b start/b) @@ -825,9 +825,9 @@ (def for_associative Test (do random.monad - [left (random.lower_case 1) - mid (random.lower_case 1) - right (random.lower_case 1) + [left (random.lower_cased 1) + mid (random.lower_cased 1) + right (random.lower_cased 1) .let [expected (text.interposed "" (list left mid right))]] (_.coverage [/.all /.left] (with_expansions [ (/.left format @@ -888,7 +888,7 @@ Test (do random.monad [left random.nat - right (random.lower_case 1) + right (random.lower_cased 1) item/0 random.nat item/1 random.nat diff --git a/stdlib/source/test/lux/control/concurrency/actor.lux b/stdlib/source/test/lux/control/concurrency/actor.lux index 8353b2e8a..63ffc3740 100644 --- a/stdlib/source/test/lux/control/concurrency/actor.lux +++ b/stdlib/source/test/lux/control/concurrency/actor.lux @@ -158,13 +158,13 @@ (in (do async.monad [counter (async.future (/.spawn! ..counter 0)) result (do (try.with async.monad) - [output_1 (/.tell! (count! 1) counter) - output_2 (/.tell! (count! 1) counter) - output_3 (/.tell! (count! 1) counter)] + [output_1 (/.request! (count! 1) counter) + output_2 (/.request! (count! 1) counter) + output_3 (/.request! (count! 1) counter)] (in (and (n.= 1 output_1) (n.= 2 output_2) (n.= 3 output_3))))] - (unit.coverage [/.Message /.tell!] + (unit.coverage [/.Message /.request!] (when result {try.#Success outcome} outcome @@ -202,7 +202,7 @@ (at (list.equivalence n.equivalence) = expected (sequence.list actual)))))) (in (do async.monad [actor (async.future (/.spawn! /.default initial_state)) - actual (/.tell! /.state actor)] + actual (/.request! /.state actor)] (unit.coverage [/.state] (<| (try.else false) (do try.monad @@ -210,8 +210,8 @@ (in (same? initial_state actual))))))) (in (do async.monad [actor (async.future (/.spawn! /.default initial_state)) - before,after (/.tell! (/.update ++) actor) - actual (/.tell! /.state actor)] + before,after (/.request! (/.update ++) actor) + actual (/.request! /.state actor)] (unit.coverage [/.update] (<| (try.else false) (do try.monad @@ -221,9 +221,9 @@ (same? after actual)))))))) (in (do async.monad [actor (async.future (/.spawn! /.default initial_state)) - before,after (/.tell! (/.update ++) actor) - _ (/.tell! (/.reset initial_state) actor) - actual (/.tell! /.state actor)] + before,after (/.request! (/.update ++) actor) + _ (/.request! (/.reset initial_state) actor) + actual (/.request! /.state actor)] (unit.coverage [/.reset] (<| (try.else false) (do try.monad @@ -235,8 +235,8 @@ (in (do async.monad [actor (async.future (/.spawn! (/.validated (n.< initial_state) /.default) initial_state)) - before,after (/.tell! (/.update --) actor) - actual (/.tell! /.state actor)] + before,after (/.request! (/.update --) actor) + actual (/.request! /.state actor)] (unit.coverage [/.validated] (<| (try.else false) (do try.monad @@ -247,9 +247,9 @@ (in (do async.monad [actor (async.future (/.spawn! (/.validated (n.< initial_state) /.default) initial_state)) - before,after (/.tell! (/.update ++) actor) + before,after (/.request! (/.update ++) actor) [cause_of_death state pending] (/.obituary actor) - actual (/.tell! /.state actor)] + actual (/.request! /.state actor)] (unit.coverage [/.invalid] (when [before,after actual] [{try.#Success [before after]} diff --git a/stdlib/source/test/lux/control/concurrency/agent.lux b/stdlib/source/test/lux/control/concurrency/agent.lux index 9627da9f9..2225a8a48 100644 --- a/stdlib/source/test/lux/control/concurrency/agent.lux +++ b/stdlib/source/test/lux/control/concurrency/agent.lux @@ -37,7 +37,7 @@ (async#in {try.#Success (n.+ next current)})) agent)) _ (async.delay 1) - ?state (actor.tell! actor.state agent)] + ?state (actor.request! actor.state agent)] (unit.coverage [/.react!] (when ?state {try.#Success actual} diff --git a/stdlib/source/test/lux/control/function/contract.lux b/stdlib/source/test/lux/control/function/contract.lux index e24d6f52f..5c53597c1 100644 --- a/stdlib/source/test/lux/control/function/contract.lux +++ b/stdlib/source/test/lux/control/function/contract.lux @@ -22,7 +22,7 @@ (<| (_.covering /._) (do [! random.monad] [expected random.nat - error_message (random.upper_case 5)]) + error_message (random.upper_cased 5)]) (all _.and (_.coverage [/.pre /.pre_condition_failed] (when (try (/.pre (n.even? expected) diff --git a/stdlib/source/test/lux/data/collection/list/property.lux b/stdlib/source/test/lux/data/collection/list/property.lux index a6e4f0d77..fa8161e16 100644 --- a/stdlib/source/test/lux/data/collection/list/property.lux +++ b/stdlib/source/test/lux/data/collection/list/property.lux @@ -52,7 +52,7 @@ (_.for [/.monoid] ($monoid.spec (/.equivalence n.equivalence) /.monoid - (..random 10 (random.lower_case 1) random.nat))) + (..random 10 (random.lower_cased 1) random.nat))) (_.coverage [/.size] (n.= size (/.size sample))) diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux index ad9427770..691f4d357 100644 --- a/stdlib/source/test/lux/data/format/json.lux +++ b/stdlib/source/test/lux/data/format/json.lux @@ -316,7 +316,7 @@ (random#in [text.new_line "\n"]) (random#in [text.carriage_return "\r"]) (random#in [text.form_feed "\f"]) - (random#in [text.double_quote (format "\" text.double_quote)]) + (random#in [text.double_quote text.double_quote]) (random#in ["\" "\\"]) (do [! random.monad] [char (at ! each (i64.and (hex "FF")) diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux index a858db473..01f8648c1 100644 --- a/stdlib/source/test/lux/data/format/tar.lux +++ b/stdlib/source/test/lux/data/format/tar.lux @@ -41,8 +41,8 @@ Test (_.for [/.Path] (do [! random.monad] - [expected (random.lower_case /.path_size) - invalid (random.lower_case (++ /.path_size)) + [expected (random.lower_cased /.path_size) + invalid (random.lower_cased (++ /.path_size)) not_ascii (random.text (random.char (unicode.set [unicode/block.katakana (list)])) /.path_size)] (`` (all _.and @@ -76,8 +76,8 @@ Test (_.for [/.Name] (do [! random.monad] - [expected (random.lower_case /.name_size) - invalid (random.lower_case (++ /.name_size)) + [expected (random.lower_cased /.name_size) + invalid (random.lower_cased (++ /.name_size)) not_ascii (random.text (random.char (unicode.set [unicode/block.katakana (list)])) /.name_size)] (`` (all _.and @@ -158,10 +158,10 @@ (def entry Test (do [! random.monad] - [expected_path (random.lower_case (-- /.path_size)) + [expected_path (random.lower_cased (-- /.path_size)) expected_moment (at ! each (|>> (n.% 1,0,00,00,00,00,000) .int instant.of_millis) random.nat) - chunk (random.lower_case chunk_size) + chunk (random.lower_cased chunk_size) chunks (at ! each (n.% 100) random.nat) .let [content (|> chunk (list.repeated chunks) @@ -244,7 +244,7 @@ Test (_.for [/.Mode /.mode] (do [! random.monad] - [path (random.lower_case 10) + [path (random.lower_cased 10) modes (random.list 4 ..random_mode) .let [expected_mode (list#mix /.and /.none modes)]] (`` (all _.and @@ -316,9 +316,9 @@ (def ownership Test (do [! random.monad] - [path (random.lower_case /.path_size) - expected (random.lower_case /.name_size) - invalid (random.lower_case (++ /.name_size)) + [path (random.lower_cased /.path_size) + expected (random.lower_cased /.name_size) + invalid (random.lower_cased (++ /.name_size)) not_ascii (random.text (random.char (unicode.set [unicode/block.katakana (list)])) /.name_size)] (_.for [/.Ownership /.Owner /.ID] diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux index 99171b434..d192289cf 100644 --- a/stdlib/source/test/lux/data/text.lux +++ b/stdlib/source/test/lux/data/text.lux @@ -580,7 +580,7 @@ (!expect (^.multi {try.#Success actual} (/#= expected actual)))))) (do [! random.monad] - [invalid (random.upper_case 1) + [invalid (random.upper_cased 1) expected (random.only (|>> (unicode/block.within? unicode/block.upper_case) not) (random.char unicode.character)) @@ -598,8 +598,8 @@ (!expect (^.multi {try.#Failure error} (exception.match? \\parser.expected_to_fail error))))))) (do [! random.monad] - [upper (random.upper_case 1) - lower (random.lower_case 1) + [upper (random.upper_cased 1) + lower (random.lower_cased 1) invalid (random.only (function (_ char) (not (or (unicode/block.within? unicode/block.upper_case char) (unicode/block.within? unicode/block.lower_case char)))) @@ -784,8 +784,8 @@ pre dynamic post dynamic - lower (random.lower_case 1) - upper (random.upper_case 1)] + lower (random.lower_cased 1) + upper (random.upper_cased 1)] (all _.and (_.coverage [/.together] (nat.= (set.size characters) diff --git a/stdlib/source/test/lux/debug.lux b/stdlib/source/test/lux/debug.lux index 26023e7aa..17a0a1a31 100644 --- a/stdlib/source/test/lux/debug.lux +++ b/stdlib/source/test/lux/debug.lux @@ -60,7 +60,7 @@ [sample_bit random.bit sample_int random.int sample_frac random.frac - sample_text (random.upper_case 10) + sample_text (random.upper_cased 10) sample_nat random.nat sample_rev random.rev] (in (`` (and (,, (with_template [ ] @@ -204,7 +204,7 @@ [sample_bit random.bit sample_int random.int sample_frac random.frac - sample_text (random.upper_case 10)] + sample_text (random.upper_cased 10)] (_.coverage [/.inspection] (`` (and (,, (with_template [ ] [(text#= ( ) (/.inspection ))] @@ -301,7 +301,7 @@ Test (<| (_.covering /._) (do random.monad - [expected_message (random.lower_case 5)] + [expected_message (random.lower_cased 5)] (all _.and ..inspection ..representation @@ -310,7 +310,7 @@ (and (exception.match? /.type_hole error) (text.contains? (%.type My_Text) error)))) (do random.monad - [foo (random.upper_case 10) + [foo (random.upper_cased 10) bar random.nat baz random.bit] (_.coverage [/.here] diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux index c50dfc7e8..2361c5625 100644 --- a/stdlib/source/test/lux/ffi.jvm.lux +++ b/stdlib/source/test/lux/ffi.jvm.lux @@ -694,9 +694,9 @@ (def for_exception Test (do [! random.monad] - [var/0 (random.lower_case 1) - var/1 (random.lower_case 2) - var/2 (random.lower_case 3)] + [var/0 (random.lower_cased 1) + var/1 (random.lower_cased 2) + var/2 (random.lower_cased 3)] (all _.and (_.coverage [/.class_names_cannot_contain_periods] (with_expansions [ (template.symbol ["java.lang.Float"])] diff --git a/stdlib/source/test/lux/ffi.lua.lux b/stdlib/source/test/lux/ffi.lua.lux index d2d81a6b3..52e694e8f 100644 --- a/stdlib/source/test/lux/ffi.lua.lux +++ b/stdlib/source/test/lux/ffi.lua.lux @@ -22,7 +22,7 @@ [boolean random.bit integer random.int float random.frac - string (random.lower_case 1)] + string (random.lower_cased 1)] (<| (_.covering /._) (`` (all _.and (,, (with_template [ ] diff --git a/stdlib/source/test/lux/ffi.py.lux b/stdlib/source/test/lux/ffi.py.lux index 5e005f9ff..5579e91dd 100644 --- a/stdlib/source/test/lux/ffi.py.lux +++ b/stdlib/source/test/lux/ffi.py.lux @@ -27,7 +27,7 @@ [boolean random.bit integer random.int float random.frac - string (random.lower_case 1)] + string (random.lower_cased 1)] (<| (_.covering /._) (`` (all _.and (,, (with_template [ ] diff --git a/stdlib/source/test/lux/ffi.rb.lux b/stdlib/source/test/lux/ffi.rb.lux index bec6471d2..4abe04ab7 100644 --- a/stdlib/source/test/lux/ffi.rb.lux +++ b/stdlib/source/test/lux/ffi.rb.lux @@ -22,7 +22,7 @@ [boolean random.bit integer random.int float random.frac - string (random.lower_case 1)] + string (random.lower_cased 1)] (<| (_.covering /._) (`` (all _.and (,, (with_template [ ] diff --git a/stdlib/source/test/lux/ffi/export.jvm.lux b/stdlib/source/test/lux/ffi/export.jvm.lux index c2be8273d..a94aa11c2 100644 --- a/stdlib/source/test/lux/ffi/export.jvm.lux +++ b/stdlib/source/test/lux/ffi/export.jvm.lux @@ -33,7 +33,7 @@ (def expected_char (//.as_char (static.random_int))) (def expected_float (//.as_float (static.random_frac))) (def expected_double (//.as_double (static.random_frac))) -(def expected_string (//.as_string (static.random code.text (random.lower_case 2)))) +(def expected_string (//.as_string (static.random code.text (random.lower_cased 2)))) (`` (`` (/.export Primitives ... Constants @@ -139,7 +139,7 @@ [char //.as_char ..tiny_int] [float //.as_float ..tiny_frac] [double //.as_double ..tiny_frac] - [string //.as_string (random.lower_case 1)] + [string //.as_string (random.lower_cased 1)] ))] (all _.and (_.coverage [/.export] diff --git a/stdlib/source/test/lux/ffi/node_js.js.lux b/stdlib/source/test/lux/ffi/node_js.js.lux index 82aff3f75..a009751cc 100644 --- a/stdlib/source/test/lux/ffi/node_js.js.lux +++ b/stdlib/source/test/lux/ffi/node_js.js.lux @@ -21,7 +21,7 @@ (in "fs") (in "net") (in "os")) - fake_module (random.upper_case 1)] + fake_module (random.upper_cased 1)] (<| (_.covering /._) (all _.and (_.coverage [/.require] diff --git a/stdlib/source/test/lux/math/random.lux b/stdlib/source/test/lux/math/random.lux index 80e02b2e0..d74b7fc6d 100644 --- a/stdlib/source/test/lux/math/random.lux +++ b/stdlib/source/test/lux/math/random.lux @@ -162,8 +162,8 @@ [/.alphabetic] [/.alpha_numeric] [/.numeric] - [/.upper_case] - [/.lower_case] + [/.upper_cased] + [/.lower_cased] )) (do /.monad [? (distinct nat.equivalence (/.char unicode.character))] diff --git a/stdlib/source/test/lux/meta/code.lux b/stdlib/source/test/lux/meta/code.lux index 7e35b1c9f..eac8000a9 100644 --- a/stdlib/source/test/lux/meta/code.lux +++ b/stdlib/source/test/lux/meta/code.lux @@ -48,13 +48,13 @@ (def local (Random Text) - (random.lower_case 1)) + (random.lower_cased 1)) (def global (Random Symbol) (all random.and - (random.lower_case 1) - (random.lower_case 1) + (random.lower_cased 1) + (random.lower_cased 1) )) (def any_symbol diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux index 3a724d8e5..9f972b10b 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux @@ -215,7 +215,7 @@ random ) random|extension (all random.and - (random.lower_case 1) + (random.lower_cased 1) (random.list multiplicity random) )]) (all random.or @@ -236,7 +236,7 @@ int random.int rev random.rev frac random.frac - text (random.lower_case 1)] + text (random.lower_cased 1)] (`` (all _.and (_.coverage [/.unit] (when (/.unit) @@ -376,10 +376,10 @@ Test (do random.monad [version/0 random.nat - host/0 (random.lower_case 5) + host/0 (random.lower_cased 5) version/1 random.nat - host/1 (random.lower_case 5) - expected_error (random.lower_case 10) + host/1 (random.lower_cased 5) + expected_error (random.lower_cased 10) location/0 /location.random location/1 /location.random configuration ($configuration.random 5) @@ -453,15 +453,15 @@ Test (do random.monad [version random.nat - host (random.lower_case 5) + host (random.lower_cased 5) - expected_module (random.lower_case 10) - dummy_module (random.lower_case 11) + expected_module (random.lower_cased 10) + dummy_module (random.lower_cased 11) location /location.random - expected_file (random.lower_case 12) - expected_code (random.lower_case 13) + expected_file (random.lower_cased 12) + expected_code (random.lower_cased 13) configuration ($configuration.random 5) .let [state (has .#location location diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/inference.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/inference.lux index 511285350..21fb6b1df 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/inference.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/inference.lux @@ -59,14 +59,14 @@ (Random Lux) (do random.monad [version random.nat - host (random.lower_case 1) + host (random.lower_cased 1) configuration ($configuration.random 5)] (in (//.state (//.info version host configuration))))) (def primitive (Random Type) (do random.monad - [name (random.lower_case 1)] + [name (random.lower_cased 1)] (in {.#Primitive name (list)}))) (def analysis @@ -93,7 +93,7 @@ [.Int random.int code.int] [.Rev random.rev code.rev] [.Frac random.frac code.frac] - [.Text (random.lower_case 1) code.text] + [.Text (random.lower_cased 1) code.text] )) ))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux index 8c93097e9..d6f7fb079 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux @@ -38,7 +38,7 @@ (Random Lux) (do random.monad [version random.nat - host (random.lower_case 1) + host (random.lower_cased 1) configuration ($configuration.random 5)] (in (//.state (//.info version host configuration))))) @@ -55,7 +55,7 @@ random.nat) choice (at ! each (n.% multiplicity) random.nat) - expected_error (random.upper_case 5) + expected_error (random.upper_cased 5) name ($symbol.random 2 2) mono $code.random diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/module.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/module.lux index 007d2e71e..da666f219 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/module.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/module.lux @@ -32,14 +32,14 @@ (Random Lux) (do random.monad [version random.nat - host (random.lower_case 1) + host (random.lower_cased 1) configuration ($configuration.random 5)] (in (//.state (//.info version host configuration))))) (def primitive (Random Type) (do random.monad - [name (random.lower_case 1)] + [name (random.lower_cased 1)] (in {.#Primitive name (list)}))) (def (new? hash it) @@ -59,10 +59,10 @@ Test (do [! random.monad] [state ..random_state - name (random.lower_case 1) + name (random.lower_cased 1) hash random.nat - expected_import (random.lower_case 2) - expected_alias (random.lower_case 3)] + expected_import (random.lower_cased 2) + expected_alias (random.lower_cased 3)] (all _.and (_.coverage [/.empty] (..new? hash (/.empty hash))) @@ -130,7 +130,7 @@ Test (do [! random.monad] [state ..random_state - name (random.lower_case 1) + name (random.lower_cased 1) hash random.nat] (`` (all _.and (,, (with_template [ ] @@ -193,16 +193,16 @@ Test (do [! random.monad] [state ..random_state - module_name (random.lower_case 1) + module_name (random.lower_cased 1) hash random.nat - def_name (random.lower_case 2) - alias_name (random.lower_case 3) + def_name (random.lower_cased 2) + alias_name (random.lower_cased 3) public? random.bit def_type ..primitive arity (at ! each (|>> (n.% 10) ++) random.nat) - labels|head (random.lower_case 1) - labels|tail (|> (random.lower_case 1) + labels|head (random.lower_cased 1) + labels|tail (|> (random.lower_cased 1) (random.only (|>> (text#= labels|head) not)) (random.set text.hash (-- arity)) (at ! each set.list)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux index a228e3fd3..0bcd9505a 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux @@ -41,7 +41,7 @@ expected_int random.int expected_rev random.rev expected_frac random.frac - expected_text (random.lower_case 2) + expected_text (random.lower_cased 2) expected_lefts random.nat expected_right? random.bit diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/scope.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/scope.lux index fe46fa6ae..f4fd18a31 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/scope.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/scope.lux @@ -56,8 +56,8 @@ [lux $//type.random_state .let [state [//extension.#bundle //extension.empty //extension.#state lux]] - name/0 (random.lower_case 1) - name/1 (random.lower_case 2) + name/0 (random.lower_cased 1) + name/1 (random.lower_cased 2) type/0 ($type.random 0) type/1 ($type.random 0)] (all _.and diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux index a334cf0b0..d01895bec 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux @@ -26,7 +26,7 @@ random.int random.rev (random.only (|>> f.not_a_number? not) random.frac) - (random.lower_case 5) + (random.lower_cased 5) )) (def .public test diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/type.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/type.lux index c360ea593..c6b2fcb7c 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/type.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/type.lux @@ -31,14 +31,14 @@ (Random Lux) (do random.monad [version random.nat - host (random.lower_case 1) + host (random.lower_cased 1) configuration ($configuration.random 5)] (in (//.state (//.info version host configuration))))) (def primitive (Random Type) (do random.monad - [name (random.lower_case 1)] + [name (random.lower_cased 1)] (in {.#Primitive name (list)}))) (def .public test @@ -51,7 +51,7 @@ expected ..primitive dummy (random.only (|>> (type#= expected) not) ..primitive) - module (random.lower_case 1)] + module (random.lower_cased 1)] (all _.and (_.coverage [/.expecting /.inference] (and (|> (/.inference expected) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis.lux index f459b1735..274a53f4b 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis.lux @@ -906,23 +906,23 @@ int/0 random.int rev/0 random.rev frac/0 random.frac - text/0 (random.lower_case 1) - - @any (random.lower_case 2) - @bit (random.lower_case 3) - @nat (random.lower_case 4) - @int (random.lower_case 5) - @rev (random.lower_case 6) - @frac (random.lower_case 7) - @text (random.lower_case 8) - - @left (random.lower_case 9) - @right (random.lower_case 10) - - $abstraction/0 (at ! each code.local (random.lower_case 11)) - $parameter/0 (at ! each code.local (random.lower_case 12)) - $abstraction/1 (at ! each code.local (random.lower_case 13)) - $parameter/1 (at ! each code.local (random.lower_case 14))]) + text/0 (random.lower_cased 1) + + @any (random.lower_cased 2) + @bit (random.lower_cased 3) + @nat (random.lower_cased 4) + @int (random.lower_cased 5) + @rev (random.lower_cased 6) + @frac (random.lower_cased 7) + @text (random.lower_cased 8) + + @left (random.lower_cased 9) + @right (random.lower_cased 10) + + $abstraction/0 (at ! each code.local (random.lower_cased 11)) + $parameter/0 (at ! each code.local (random.lower_cased 12)) + $abstraction/1 (at ! each code.local (random.lower_cased 13)) + $parameter/1 (at ! each code.local (random.lower_cased 14))]) (all _.and (_.coverage [/.phase] (and (..can_analyse_unit! lux module/0) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/complex.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/complex.lux index 6a3dbe760..0fb6d9f54 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/complex.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/complex.lux @@ -65,14 +65,14 @@ (Random Lux) (do random.monad [version random.nat - host (random.lower_case 1) + host (random.lower_cased 1) configuration ($configuration.random 5)] (in (//analysis.state (//analysis.info version host configuration))))) (def primitive (Random Type) (do random.monad - [name (random.lower_case 1)] + [name (random.lower_cased 1)] (in {.#Primitive name (list)}))) (def analysis @@ -99,7 +99,7 @@ [.Int random.int code.int] [.Rev random.rev code.rev] [.Frac (random.only (|>> f.not_a_number? not) random.frac) code.frac] - [.Text (random.lower_case 1) code.text] + [.Text (random.lower_cased 1) code.text] )) ))) @@ -222,7 +222,7 @@ types/*,terms/* (random.list arity ..simple_parameter) tag (at ! each (n.% arity) random.nat) .let [[lefts right?] (//complex.choice arity tag)] - tags (|> (random.lower_case 1) + tags (|> (random.lower_cased 1) (random.set text.hash arity) (at ! each set.list)) .let [module (product.left name) @@ -438,11 +438,11 @@ arity (at ! each (|>> (n.% 5) (n.+ 2)) random.nat) slice (at ! each (|>> (n.% (-- arity)) ++) random.nat) [type/0 term/0] ..simple_parameter - slot/0 (random.lower_case 1) + slot/0 (random.lower_cased 1) types/*,terms/* (random.list arity ..simple_parameter) - slots/0 (|> (random.lower_case 1) + slots/0 (|> (random.lower_cased 1) (random.set text.hash arity)) - slots/1 (|> (random.lower_case 1) + slots/1 (|> (random.lower_cased 1) (random.only (|>> (set.member? slots/0) not)) (random.set text.hash arity)) .let [slots/0 (set.list slots/0) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/function.lux index bfc7e48a8..11101a2d1 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/function.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/function.lux @@ -68,11 +68,11 @@ //extension.#state lux]] input/0 ($type.random 0) input/1 ($type.random 0) - function/0 (random.lower_case 1) - function/1 (random.lower_case 2) - argument/0 (random.lower_case 3) - argument/1 (random.lower_case 4) - module/0 (random.lower_case 5) + function/0 (random.lower_cased 1) + function/1 (random.lower_cased 2) + argument/0 (random.lower_cased 3) + argument/1 (random.lower_cased 4) + module/0 (random.lower_cased 5) [output/0 term/0] $//inference.simple_parameter [output/1 term/1] (random.only (|>> product.left (same? output/0) not) $//inference.simple_parameter) @@ -122,7 +122,7 @@ ... (function? (-> input/0 input/0) $argument/0) ... (function? {.#Named name/0 (-> input/0 output/0)} term/0) - + ... (function? (All (_ a) (-> a a)) $argument/0) ... (function? (Ex (_ a) (-> a a)) $argument/0) ... (function? (Ex (_ a) (-> input/0 a)) term/0) @@ -170,7 +170,7 @@ ... (//phase#each product.right) ... (//phase.result state) ... (try.else false)) - + ... (inferring? (All (_ a) (-> a output/0)) term/0) ... (inferring? (All (_ a) (-> a a)) $argument/0) ... (inferring? (All (_ @0) (-> @0 @0 (And .Bit @0))) @@ -204,7 +204,7 @@ [input/1 term/1] (random.only (|>> product.left (same? input/0) not) $//inference.simple_parameter) output/0 ($type.random 0) - module/0 (random.lower_case 1)] + module/0 (random.lower_cased 1)] (all _.and ... (_.coverage [/.apply] ... (let [reification? (is (-> Type (List Code) Type Bit) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux index 613cfb643..df4348b47 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/reference.lux @@ -38,11 +38,11 @@ [lux $//type.random_state .let [state [//extension.#bundle //extension.empty //extension.#state lux]] - expected_name (random.lower_case 1) + expected_name (random.lower_cased 1) expected_type ($type.random 0) - expected_module (random.lower_case 2) - import (random.lower_case 3) - expected_label (random.lower_case 4) + expected_module (random.lower_cased 2) + import (random.lower_cased 3) + expected_label (random.lower_cased 4) record? random.bit] (all _.and (_.coverage [/.reference] diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/simple.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/simple.lux index f8adedaa1..921b60a3f 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/simple.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/simple.lux @@ -82,8 +82,8 @@ (<| (_.covering /._) (do [! random.monad] [version random.nat - host (random.lower_case 1) - module (random.lower_case 2) + host (random.lower_cased 1) + module (random.lower_cased 2) configuration ($configuration.random 5) .let [state (/analysis.state (/analysis.info version host configuration))]] (`` (all _.and diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/when.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/when.lux index 03b491fa7..a488520a8 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/when.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/when.lux @@ -60,14 +60,14 @@ [lux $//type.random_state .let [state [//extension.#bundle (//extension/analysis.bundle ..eval) //extension.#state lux]] - module/0 (random.lower_case 1) - name/0 (at ! each (|>> [module/0]) (random.lower_case 2)) + module/0 (random.lower_cased 1) + name/0 (at ! each (|>> [module/0]) (random.lower_cased 2)) [input/0 simple/0] $//inference.simple_parameter [input/1 simple/1] $//inference.simple_parameter [input/2 simple/2] $//inference.simple_parameter - $binding/0 (at ! each code.local (random.lower_case 3)) - $binding/1 (at ! each code.local (random.lower_case 4)) - $binding/2 (at ! each code.local (random.lower_case 5))] + $binding/0 (at ! each code.local (random.lower_cased 3)) + $binding/1 (at ! each code.local (random.lower_cased 4)) + $binding/2 (at ! each code.local (random.lower_cased 5))] (all _.and (_.coverage [/.tuple] (let [tuple? (is (-> Type Type Bit) @@ -502,18 +502,18 @@ [lux $//type.random_state .let [state [//extension.#bundle (//extension/analysis.bundle ..eval) //extension.#state lux]] - module/0 (random.lower_case 1) - name/0 (random.lower_case 2) + module/0 (random.lower_cased 1) + name/0 (random.lower_cased 2) [input/0 simple/0] $//inference.simple_parameter [input/1 simple/1] $//inference.simple_parameter [input/2 simple/2] $//inference.simple_parameter [output/0 body/0] $//inference.simple_parameter [output/1 body/1] (random.only (|>> product.left (same? output/0) not) $//inference.simple_parameter) - $binding/0 (at ! each code.local (random.lower_case 3)) - $binding/1 (at ! each code.local (random.lower_case 4)) - $binding/2 (at ! each code.local (random.lower_case 5)) - extension/0 (at ! each code.text (random.lower_case 6)) + $binding/0 (at ! each code.local (random.lower_cased 3)) + $binding/1 (at ! each code.local (random.lower_cased 4)) + $binding/2 (at ! each code.local (random.lower_cased 5)) + extension/0 (at ! each code.text (random.lower_cased 6)) bit/0 random.bit nat/0 random.nat] (all _.and diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux index 755487cce..138dd3f82 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux @@ -34,7 +34,7 @@ (def .public random (Random (/.Extension Nat)) (all random.and - (random.lower_case 5) + (random.lower_cased 5) (random.list 2 random.nat) )) @@ -105,7 +105,7 @@ Test (do [! random.monad] [state random.int - extension (random.lower_case 1) + extension (random.lower_cased 1) left random.nat right random.nat] (all _.and @@ -143,7 +143,7 @@ (do [! random.monad] [state random.int - extension (random.lower_case 1) + extension (random.lower_cased 1) left random.nat right random.nat] (all _.and @@ -197,7 +197,7 @@ dummy (random.only (|>> (i.= state) not) random.int) expected random.nat - expected_error (random.lower_case 1)] + expected_error (random.lower_cased 1)] (all _.and (_.for [/.equivalence] ($equivalence.spec (/.equivalence n.equivalence) ..random)) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux index 38cf80869..8d9aebda6 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux @@ -181,7 +181,7 @@ exitC (|> r.int (at ! each code.int))] (all _.and (_.test "Can log messages to standard output." - (check_success+ (symbol .log#) (list logC) Any)) + (check_success+ (symbol .log!#) (list logC) Any)) (_.test "Can throw a run-time error." (check_success+ (symbol .error#) (list logC) Nothing)) ))) diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux index 726436046..b21f17d72 100644 --- a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux +++ b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux @@ -24,7 +24,7 @@ random.bit random.i64 random.frac - (random.lower_case 1) + (random.lower_cased 1) )) (def .public test diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive.lux b/stdlib/source/test/lux/meta/compiler/meta/archive.lux index 44b3961ea..1076b0373 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive.lux @@ -49,8 +49,8 @@ (def test|entry Test (do random.monad - [module/0 (random.lower_case 1) - module/1 (random.lower_case 2) + [module/0 (random.lower_cased 1) + module/1 (random.lower_cased 2) signature $/signature.random .let [version (the /signature.#version signature)] fake_version (random.only (|>> (n.= version) not) random.nat) @@ -200,8 +200,8 @@ (<| (_.covering /._) (_.for [/.Archive]) (do random.monad - [module/0 (random.lower_case 1) - module/1 (random.lower_case 2) + [module/0 (random.lower_cased 1) + module/1 (random.lower_cased 2) signature $/signature.random content/0 random.nat content/1 (random.only (|>> (n.= content/0) not) random.nat) diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/artifact/category.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/artifact/category.lux index d88627520..87220c0fd 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/artifact/category.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/artifact/category.lux @@ -14,7 +14,7 @@ (def random_definition (Random /.Definition) (all random.and - (random.lower_case 1) + (random.lower_cased 1) (random.maybe (all random.and random.nat @@ -28,11 +28,11 @@ (all random.or (random#in []) ..random_definition - (random.lower_case 2) - (random.lower_case 3) - (random.lower_case 4) - (random.lower_case 5) - (random.lower_case 6) + (random.lower_cased 2) + (random.lower_cased 3) + (random.lower_cased 4) + (random.lower_cased 5) + (random.lower_cased 6) )) (def .public test diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux index 1f711dfd7..0aa690f97 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux @@ -30,11 +30,11 @@ (def .public (random imports) (-> Nat (Random /.Descriptor)) (all random.and - (random.lower_case 1) - (random.lower_case 1) + (random.lower_cased 1) + (random.lower_cased 1) random.nat ..random_module_state - (random.set text.hash imports (random.lower_case 2)) + (random.set text.hash imports (random.lower_cased 2)) )) (def .public test diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/registry.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/registry.lux index 5cfb94750..2097736ad 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/registry.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/registry.lux @@ -54,12 +54,12 @@ (<| (_.covering /._) (_.for [/.Registry]) (do [! random.monad] - [expected_name (random.lower_case 5) + [expected_name (random.lower_cased 5) mandatory? random.bit expected_dependencies (..random_dependencies 5) expected_amount (at ! each (n.% 10) random.nat) - expected_names (|> (random.lower_case 1) + expected_names (|> (random.lower_cased 1) (random.set text.hash expected_amount) (at ! each set.list))] (`` (all _.and diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux index a44e21510..a5c8c89ee 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux @@ -26,8 +26,8 @@ (Random /.Signature) (all random.and (all random.and - (random.upper_case 1) - (random.lower_case 1)) + (random.upper_cased 1) + (random.lower_cased 1)) ////version.random )) diff --git a/stdlib/source/test/lux/meta/compiler/meta/cache/archive.lux b/stdlib/source/test/lux/meta/compiler/meta/cache/archive.lux index 9e80f0c14..e6f37d941 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/cache/archive.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/cache/archive.lux @@ -45,8 +45,8 @@ [context $context.random .let [/ "/" fs (file.mock /)] - module/0 (random.lower_case 1) - module/1 (random.lower_case 2) + module/0 (random.lower_cased 1) + module/1 (random.lower_cased 2) content/0 random.nat content/1 (random.only (|>> (n.= content/0) not) random.nat) hash random.nat diff --git a/stdlib/source/test/lux/meta/compiler/meta/cache/purge.lux b/stdlib/source/test/lux/meta/compiler/meta/cache/purge.lux index 2a97eef8a..3b2ca3160 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/cache/purge.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/cache/purge.lux @@ -48,11 +48,11 @@ (<| (_.covering /._) (do [! random.monad] [descriptor ($descriptor.random 0) - source_code (random.upper_case 1) - name/0 (random.lower_case 1) + source_code (random.upper_cased 1) + name/0 (random.lower_cased 1) module/0 ($module.random random.nat) content/0 ($binary.random 1) - name/1 (random.lower_case 2) + name/1 (random.lower_cased 2) module/1 (|> ($module.random random.nat) (at ! each (has [module.#descriptor descriptor.#references] (set.of_list text.hash (list name/0))))) diff --git a/stdlib/source/test/lux/meta/compiler/meta/cli.lux b/stdlib/source/test/lux/meta/compiler/meta/cli.lux index 099f0344d..e1ea3f641 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/cli.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/cli.lux @@ -36,12 +36,12 @@ (let [(open "list#[0]") (list.equivalence text.equivalence)]) (do [! random.monad] [amount (at ! each (|>> (n.% 5) ++) random.nat) - sources (random.list amount (random.lower_case 1)) - host_dependencies (random.list amount (random.lower_case 2)) - libraries (random.list amount (random.lower_case 3)) - target (random.lower_case 4) - module (random.lower_case 5) - program (random.lower_case 6) + sources (random.list amount (random.lower_cased 1)) + host_dependencies (random.list amount (random.lower_cased 2)) + libraries (random.list amount (random.lower_cased 3)) + target (random.lower_cased 4) + module (random.lower_cased 5) + program (random.lower_cased 6) compilers (random.list amount $/compiler.random) configuration ($configuration.random 5) .let [compilation' (all list#composite diff --git a/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux b/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux index c1de82f58..56b917ae1 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux @@ -27,7 +27,7 @@ (do [! random.monad] [definition ($symbol.random 1 1) amount (at ! each (n.% 5) random.nat) - parameters (random.list amount (random.lower_case 2))] + parameters (random.list amount (random.lower_cased 2))] (in [/.#definition definition /.#parameters parameters]))) diff --git a/stdlib/source/test/lux/meta/compiler/meta/context.lux b/stdlib/source/test/lux/meta/compiler/meta/context.lux index 789fb1563..b1f60e864 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/context.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/context.lux @@ -26,14 +26,14 @@ (in /.lua) (in /.python) (in /.ruby))] - (at ! each context (random.lower_case 1)))) + (at ! each context (random.lower_cased 1)))) (def .public test Test (<| (_.covering /._) (_.for [/.Context /.Extension]) (do [! random.monad] - [target (random.lower_case 1)] + [target (random.lower_cased 1)] (all _.and (_.coverage [/.js /.jvm /.lua /.python /.ruby] (let [contexts (list (/.js target) diff --git a/stdlib/source/test/lux/meta/compiler/meta/export.lux b/stdlib/source/test/lux/meta/compiler/meta/export.lux index ac3841ecc..ef9a8a835 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/export.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/export.lux @@ -41,16 +41,16 @@ (<| (_.covering /._) (do [! random.monad] [.let [/ .module_separator] - source/0 (random.lower_case 1) - source/1 (random.lower_case 2) - target (random.lower_case 3) + source/0 (random.lower_cased 1) + source/1 (random.lower_cased 2) + target (random.lower_cased 3) .let [random_file (is (Random file.Path) - (at ! each (text.suffix io.lux_extension) (random.lower_case 4)))] + (at ! each (text.suffix io.lux_extension) (random.lower_cased 4)))] file/0' random_file .let [file/0 (format source/0 / file/0')] - dir/0 (random.lower_case 5) + dir/0 (random.lower_cased 5) file/1' (at ! each (|>> (format dir/0 /)) random_file) .let [file/1 (format source/1 / file/1')] diff --git a/stdlib/source/test/lux/meta/compiler/meta/import.lux b/stdlib/source/test/lux/meta/compiler/meta/import.lux index f48053c98..59dc6d52c 100644 --- a/stdlib/source/test/lux/meta/compiler/meta/import.lux +++ b/stdlib/source/test/lux/meta/compiler/meta/import.lux @@ -45,15 +45,15 @@ (<| (_.covering /._) (_.for [/.Import]) (do [! random.monad] - [library/0 (random.lower_case 1) - library/1 (random.lower_case 2) + [library/0 (random.lower_cased 1) + library/1 (random.lower_cased 2) .let [/ .module_separator random_file (is (Random file.Path) - (at ! each (text.suffix io.lux_extension) (random.lower_case 3)))] + (at ! each (text.suffix io.lux_extension) (random.lower_cased 3)))] file/0 random_file - dir/0 (random.lower_case 4) + dir/0 (random.lower_cased 4) file/1 (at ! each (|>> (format dir/0 /)) random_file) .let [random_content (is (Random Binary) diff --git a/stdlib/source/test/lux/meta/compiler/phase.lux b/stdlib/source/test/lux/meta/compiler/phase.lux index cc82568de..963dd07fd 100644 --- a/stdlib/source/test/lux/meta/compiler/phase.lux +++ b/stdlib/source/test/lux/meta/compiler/phase.lux @@ -50,7 +50,7 @@ (do [! random.monad] [state random.nat expected random.int - expected_error (random.lower_case 1)] + expected_error (random.lower_cased 1)] (all _.and (_.coverage [/.failure] (|> (/.failure expected_error) diff --git a/stdlib/source/test/lux/meta/compiler/reference.lux b/stdlib/source/test/lux/meta/compiler/reference.lux index 139ee891e..a2e0a85ff 100644 --- a/stdlib/source/test/lux/meta/compiler/reference.lux +++ b/stdlib/source/test/lux/meta/compiler/reference.lux @@ -26,8 +26,8 @@ (def constant (Random /.Constant) (all random.and - (random.upper_case 5) - (random.lower_case 5) + (random.upper_cased 5) + (random.lower_cased 5) )) (def .public random diff --git a/stdlib/source/test/lux/meta/configuration.lux b/stdlib/source/test/lux/meta/configuration.lux index 8bc88d2d7..c7d93bd9d 100644 --- a/stdlib/source/test/lux/meta/configuration.lux +++ b/stdlib/source/test/lux/meta/configuration.lux @@ -33,8 +33,8 @@ (when amount 0 (random#in /.empty) _ (do [! random.monad] - [feature (random.upper_case amount) - value (random.lower_case amount)] + [feature (random.upper_cased amount) + value (random.lower_cased amount)] (at ! each (|>> (list.partial [feature value])) (random (-- amount)))))) diff --git a/stdlib/source/test/lux/meta/macro.lux b/stdlib/source/test/lux/meta/macro.lux index 797c7fac6..3c248df81 100644 --- a/stdlib/source/test/lux/meta/macro.lux +++ b/stdlib/source/test/lux/meta/macro.lux @@ -72,7 +72,7 @@ (Random [Nat Text .Lux]) (do [! random.monad] [seed random.nat - symbol_prefix (random.upper_case 1) + symbol_prefix (random.upper_cased 1) .let [macro_module (symbol.module (symbol expansion._)) current_module (symbol.module (symbol .._))]] (in [seed diff --git a/stdlib/source/test/lux/meta/macro/vocabulary.lux b/stdlib/source/test/lux/meta/macro/vocabulary.lux index 1a04215b3..9b3c76e04 100644 --- a/stdlib/source/test/lux/meta/macro/vocabulary.lux +++ b/stdlib/source/test/lux/meta/macro/vocabulary.lux @@ -19,11 +19,11 @@ [\\library ["[0]" /]]) -(/.vocabulary - [.private Micro] - [.private micro] - [.private macro] - [.private by_name]) +(/.def + [.private Micro] + [.private micro] + [.private macro] + [.private by_name]) (def .public pass_through (.macro (_ inputs lux) @@ -36,7 +36,7 @@ Test (<| (_.covering /._) (all _.and - (_.coverage [/.vocabulary] + (_.coverage [/.def] (exec (|> pass_through (is Macro) diff --git a/stdlib/source/test/lux/meta/target/js.lux b/stdlib/source/test/lux/meta/target/js.lux index eda7a2f72..f305710cf 100644 --- a/stdlib/source/test/lux/meta/target/js.lux +++ b/stdlib/source/test/lux/meta/target/js.lux @@ -74,7 +74,7 @@ [boolean random.bit number random.frac int ..int_32 - string (random.upper_case 5)] + string (random.upper_cased 5)] (all _.and (_.coverage [/.null] (|> /.null @@ -228,9 +228,9 @@ Test (do [! random.monad] [expected random.safe_frac - field (random.upper_case 5) + field (random.upper_cased 5) dummy (random.only (|>> (text#= field) not) - (random.upper_case 5)) + (random.upper_cased 5)) size (at ! each (|>> (n.% 10) ++) random.nat) index (at ! each (n.% size) random.nat) @@ -262,9 +262,9 @@ boolean random.bit number random.frac - string (random.upper_case 5) + string (random.upper_cased 5) - comment (random.upper_case 10)] + comment (random.upper_cased 10)] (all _.and ..test|boolean ..test|number @@ -326,9 +326,9 @@ [number/0 random.safe_frac number/1 random.safe_frac number/2 random.safe_frac - foreign (random.lower_case 10) + foreign (random.lower_cased 10) local (random.only (|>> (text#= foreign) not) - (random.lower_case 10)) + (random.lower_cased 10)) .let [$foreign (/.var foreign) $local (/.var local)]] (all _.and @@ -358,8 +358,8 @@ (do [! random.monad] [number/0 random.safe_frac int/0 ..int_16 - $foreign (at ! each /.var (random.lower_case 10)) - field (random.upper_case 10)] + $foreign (at ! each /.var (random.lower_cased 10)) + field (random.upper_cased 10)] (all _.and (_.coverage [/.set] (and (expression (|>> (as Frac) (f.= (f.+ number/0 number/0))) @@ -452,7 +452,7 @@ full_inner_iterations (at ! each (|>> (n.% 20) ++) random.nat) expected_inner_iterations (at ! each (n.% full_inner_iterations) random.nat) - @outer (at ! each /.label (random.upper_case 5)) + @outer (at ! each /.label (random.upper_cased 5)) full_outer_iterations (at ! each (|>> (n.% 10) ++) random.nat) expected_outer_iterations (at ! each (n.% full_outer_iterations) random.nat) @@ -609,7 +609,7 @@ [expected random.safe_frac dummy (random.only (|>> (f.= expected) not) random.safe_frac) - $ex (at ! each /.var (random.lower_case 10))] + $ex (at ! each /.var (random.lower_cased 10))] (all _.and (_.coverage [/.try] (expression (|>> (as Frac) (f.= expected)) @@ -633,9 +633,9 @@ [number/0 random.safe_frac number/1 random.safe_frac number/2 random.safe_frac - $arg/0 (at ! each /.var (random.lower_case 10)) - $arg/1 (at ! each /.var (random.lower_case 11)) - $arg/2 (at ! each /.var (random.lower_case 12))] + $arg/0 (at ! each /.var (random.lower_cased 10)) + $arg/1 (at ! each /.var (random.lower_cased 11)) + $arg/2 (at ! each /.var (random.lower_cased 12))] (`` (all _.and (_.coverage [/.apply_1] (expression (|>> (as Frac) (f.= number/0)) @@ -665,10 +665,10 @@ (do [! random.monad] [number/0 random.safe_frac iterations (at ! each (n.% 10) random.nat) - $self (at ! each /.var (random.lower_case 1)) - $arg/0 (at ! each /.var (random.lower_case 2)) - field (random.lower_case 3) - $class (at ! each /.var (random.upper_case 4))] + $self (at ! each /.var (random.lower_cased 1)) + $arg/0 (at ! each /.var (random.lower_cased 2)) + field (random.lower_cased 3) + $class (at ! each /.var (random.upper_cased 4))] (all _.and (_.coverage [/.closure /.return] (expression (|>> (as Frac) (f.= number/0)) @@ -709,12 +709,12 @@ [number/0 random.safe_frac number/1 random.safe_frac number/2 random.safe_frac - arg/0 (random.lower_case 10) + arg/0 (random.lower_cased 10) arg/1 (random.only (|>> (text#= arg/0) not) - (random.lower_case 10)) + (random.lower_cased 10)) arg/2 (random.only (predicate.and (|>> (text#= arg/0) not) (|>> (text#= arg/1) not)) - (random.lower_case 10)) + (random.lower_cased 10)) .let [$arg/0 (/.var arg/0) $arg/1 (/.var arg/1) $arg/2 (/.var arg/2)] @@ -770,9 +770,9 @@ [number/0 random.safe_frac number/1 random.safe_frac number/2 random.safe_frac - $arg/0 (at ! each /.var (random.lower_case 10)) - $arg/1 (at ! each /.var (random.lower_case 11)) - $arg/2 (at ! each /.var (random.lower_case 12)) + $arg/0 (at ! each /.var (random.lower_cased 10)) + $arg/1 (at ! each /.var (random.lower_cased 11)) + $arg/2 (at ! each /.var (random.lower_cased 12)) ??? random.bit int ..int_16] (`` (all _.and diff --git a/stdlib/source/test/lux/meta/target/jvm.lux b/stdlib/source/test/lux/meta/target/jvm.lux index 6330dcbe2..b5039dcaf 100644 --- a/stdlib/source/test/lux/meta/target/jvm.lux +++ b/stdlib/source/test/lux/meta/target/jvm.lux @@ -105,9 +105,9 @@ (def class_name (Random Text) (do random.monad - [super_package (random.lower_case 10) - package (random.lower_case 10) - name (random.upper_case 10)] + [super_package (random.lower_cased 10) + package (random.lower_cased 10) + name (random.upper_cased 10)] (in (format super_package /name.external_separator package /name.external_separator name)))) @@ -124,7 +124,7 @@ (-> (-> Any Bit) (Bytecode Any) (Random Bit)) (do random.monad [class_name ..class_name - method_name (random.upper_case 10)] + method_name (random.upper_cased 10)] (in (when (do try.monad [class (/class.class /version.v6_0 /class.public (/name.internal class_name) @@ -1344,9 +1344,9 @@ (function (_ primitive return substitute test) (do random.monad [class_name ..class_name - primitive_method_name (random.upper_case 10) + primitive_method_name (random.upper_cased 10) .let [primitive_method_type (/type.method [(list) (list) (the #unboxed primitive) (list)])] - object_method_name (|> (random.upper_case 10) + object_method_name (|> (random.upper_cased 10) (random.only (|>> (text#= primitive_method_name) not))) expected (the #random primitive) .let [$Self (/type.class class_name (list))]] diff --git a/stdlib/source/test/lux/meta/target/lua.lux b/stdlib/source/test/lux/meta/target/lua.lux index 6d1ba7cb3..4277f7958 100644 --- a/stdlib/source/test/lux/meta/target/lua.lux +++ b/stdlib/source/test/lux/meta/target/lua.lux @@ -52,7 +52,7 @@ [boolean random.bit int random.int float random.frac - string (random.upper_case 5)] + string (random.upper_cased 5)] (all _.and (_.coverage [/.nil] (|> /.nil @@ -185,8 +185,8 @@ (def test|string Test (do random.monad - [left (random.lower_case 8) - right (random.lower_case 8) + [left (random.lower_cased 8) + right (random.lower_cased 8) .let [expected (format left right)]] (all _.and (_.coverage [/.concat] @@ -229,13 +229,13 @@ index (at ! each (n.% size) random.nat) items (random.list size random.safe_frac) - $self (at ! each /.var (random.lower_case 10)) - $table (at ! each /.var (random.lower_case 11)) - $arg (at ! each /.var (random.lower_case 12)) - field (random.upper_case 5) + $self (at ! each /.var (random.lower_cased 10)) + $table (at ! each /.var (random.lower_cased 11)) + $arg (at ! each /.var (random.lower_cased 12)) + field (random.upper_cased 5) non_field (random.only (|>> (text#= field) not) - (random.upper_case 5)) - method (random.upper_case 6)] + (random.upper_cased 5)) + method (random.upper_cased 6)] (all _.and (_.coverage [/.table /.the] (and (expression (|>> (as Frac) (f.= expected)) @@ -267,9 +267,9 @@ boolean random.bit int random.int float random.frac - string (random.upper_case 5) + string (random.upper_cased 5) - comment (random.upper_case 10)] + comment (random.upper_cased 10)] (all _.and ..test|boolean ..test|int @@ -321,9 +321,9 @@ [float/0 random.safe_frac float/1 random.safe_frac float/2 random.safe_frac - foreign (random.lower_case 10) + foreign (random.lower_cased 10) local (random.only (|>> (text#= foreign) not) - (random.lower_case 10)) + (random.lower_cased 10)) .let [$foreign (/.var foreign) $local (/.var local)]] (all _.and @@ -362,10 +362,10 @@ [float/0 random.safe_frac float/1 random.safe_frac int/0 ..int_16 - $foreign (at ! each /.var (random.lower_case 10)) - $arg/0 (at ! each /.var (random.lower_case 11)) - $arg/1 (at ! each /.var (random.lower_case 12)) - field (random.upper_case 10)] + $foreign (at ! each /.var (random.lower_cased 10)) + $arg/0 (at ! each /.var (random.lower_cased 11)) + $arg/1 (at ! each /.var (random.lower_cased 12)) + field (random.upper_cased 10)] (all _.and (_.coverage [/.set] (expression (|>> (as Frac) (f.= (f.+ float/0 float/0))) @@ -416,11 +416,11 @@ full_iterations (at ! each (|>> (n.% 20) ++) random.nat) expected_iterations (at ! each (|>> (n.% full_iterations) .int) random.nat) - $input (at ! each /.var (random.lower_case 10)) - $output (at ! each /.var (random.lower_case 11)) - $index (at ! each /.var (random.lower_case 12)) + $input (at ! each /.var (random.lower_cased 10)) + $output (at ! each /.var (random.lower_cased 11)) + $index (at ! each /.var (random.lower_cased 12)) - @loop (at ! each /.label (random.lower_case 13)) + @loop (at ! each /.label (random.lower_cased 13)) .let [expected (i.* expected_iterations input) expected_iterations (/.int expected_iterations)]] @@ -562,8 +562,8 @@ [expected random.safe_frac dummy (random.only (|>> (f.= expected) not) random.safe_frac) - $verdict (at ! each /.var (random.lower_case 10)) - $outcome (at ! each /.var (random.lower_case 11))] + $verdict (at ! each /.var (random.lower_cased 10)) + $outcome (at ! each /.var (random.lower_cased 11))] (all _.and (_.coverage [/.pcall/1] (expression (|>> (as Frac) (f.= expected)) @@ -606,10 +606,10 @@ (do [! random.monad] [float/0 random.safe_frac iterations (at ! each (n.% 10) random.nat) - $self (at ! each /.var (random.lower_case 1)) - $arg/0 (at ! each /.var (random.lower_case 2)) - field (random.lower_case 3) - $class (at ! each /.var (random.upper_case 4))] + $self (at ! each /.var (random.lower_cased 1)) + $arg/0 (at ! each /.var (random.lower_cased 2)) + field (random.lower_cased 3) + $class (at ! each /.var (random.upper_cased 4))] (all _.and (_.coverage [/.closure /.return] (expression (|>> (as Frac) (f.= float/0)) @@ -629,9 +629,9 @@ [float/0 random.safe_frac float/1 random.safe_frac float/2 random.safe_frac - $arg/0 (at ! each /.var (random.lower_case 10)) - $arg/1 (at ! each /.var (random.lower_case 11)) - $arg/2 (at ! each /.var (random.lower_case 12))] + $arg/0 (at ! each /.var (random.lower_cased 10)) + $arg/1 (at ! each /.var (random.lower_cased 11)) + $arg/2 (at ! each /.var (random.lower_cased 12))] (`` (all _.and (_.coverage [/.apply] (expression (|>> (as Frac) (f.= (all f.+ float/0 float/1 float/2))) @@ -687,8 +687,8 @@ (do [! random.monad] [float/0 random.safe_frac float/1 random.safe_frac - $arg/0 (at ! each /.var (random.lower_case 10)) - $arg/1 (at ! each /.var (random.lower_case 11))] + $arg/0 (at ! each /.var (random.lower_cased 10)) + $arg/1 (at ! each /.var (random.lower_cased 11))] (`` (all _.and (_.coverage [/.statement /.then /.print/1] (expression (|>> (as Frac) (f.= float/0)) diff --git a/stdlib/source/test/lux/meta/target/python.lux b/stdlib/source/test/lux/meta/target/python.lux index b346cb53a..7b0b0d77a 100644 --- a/stdlib/source/test/lux/meta/target/python.lux +++ b/stdlib/source/test/lux/meta/target/python.lux @@ -50,7 +50,7 @@ [bool random.bit float random.frac int random.int - string (random.upper_case 1)] + string (random.upper_cased 1)] (all _.and (_.coverage [/.none] (|> /.none @@ -266,9 +266,9 @@ Test (do [! random.monad] [expected random.safe_frac - field (random.upper_case 5) + field (random.upper_cased 5) dummy (random.only (|>> (text#= field) not) - (random.upper_case 5)) + (random.upper_cased 5)) .let [field (/.string field) dummy (/.string dummy)]] (all _.and @@ -291,11 +291,11 @@ bool random.bit float (random.only (|>> f.not_a_number? not) random.frac) - string (random.upper_case 5) + string (random.upper_cased 5) - comment (random.upper_case 10) - $arg/0 (at ! each /.var (random.lower_case 10)) - $arg/1 (at ! each /.var (random.lower_case 11))] + comment (random.upper_cased 10) + $arg/0 (at ! each /.var (random.lower_cased 10)) + $arg/1 (at ! each /.var (random.lower_cased 11))] (all _.and ..test|bool ..test|float @@ -338,9 +338,9 @@ [float/0 random.safe_frac float/1 random.safe_frac float/2 random.safe_frac - $arg/0 (at ! each /.var (random.lower_case 10)) - $arg/1 (at ! each /.var (random.lower_case 11)) - $arg/2 (at ! each /.var (random.lower_case 12))] + $arg/0 (at ! each /.var (random.lower_cased 10)) + $arg/1 (at ! each /.var (random.lower_cased 11)) + $arg/2 (at ! each /.var (random.lower_cased 12))] (all _.and (_.coverage [/.lambda] (expression (|>> (as Frac) (f.= float/0)) @@ -449,7 +449,7 @@ [$var/0 (at ! each (|>> %.nat (format "v0_") /.var) random.nat) expected/0 random.safe_frac dummy/0 random.safe_frac - field (at ! each /.string (random.upper_case 1))] + field (at ! each /.string (random.upper_cased 1))] (all _.and (_.coverage [/.item] (`` (and (,, (with_template [] @@ -490,7 +490,7 @@ expected/0 random.safe_frac expected/1 random.safe_frac dummy/0 random.safe_frac - field/0 (at ! each /.string (random.upper_case 1))] + field/0 (at ! each /.string (random.upper_cased 1))] (all _.and (_.coverage [/.set] (|> (..statement @@ -595,7 +595,7 @@ (def test|exception Test (do [! random.monad] - [expected_error (random.upper_case 10) + [expected_error (random.upper_cased 10) expected random.safe_frac dummy (random.only (|>> (f.= expected) not) random.safe_frac) @@ -817,7 +817,7 @@ (random#each /.bool random.bit) (random#each /.float random.frac) (random#each /.int random.int) - (random#each /.string (random.lower_case 1)) + (random#each /.string (random.lower_cased 1)) )) (def .public test diff --git a/stdlib/source/test/lux/meta/target/ruby.lux b/stdlib/source/test/lux/meta/target/ruby.lux index 779af9f0b..f16b93c42 100644 --- a/stdlib/source/test/lux/meta/target/ruby.lux +++ b/stdlib/source/test/lux/meta/target/ruby.lux @@ -64,7 +64,7 @@ [bool random.bit float random.frac int random.int - string (random.upper_case 5)] + string (random.upper_cased 5)] (all _.and (_.coverage [/.nil] (..nil /.nil)) @@ -213,9 +213,9 @@ Test (do [! random.monad] [expected random.safe_frac - field (random.upper_case 5) + field (random.upper_cased 5) dummy (random.only (|>> (text#= field) not) - (random.upper_case 5)) + (random.upper_cased 5)) .let [field (/.string field) dummy (/.string dummy)]] (all _.and @@ -331,11 +331,11 @@ (def test|io Test (<| (do [! random.monad] - [left (random.upper_case 5) - right (random.upper_case 5) - $old (at ! each /.local (random.upper_case 1)) - $new (at ! each /.local (random.upper_case 2)) - $it (at ! each /.local (random.upper_case 3)) + [left (random.upper_cased 5) + right (random.upper_cased 5) + $old (at ! each /.local (random.upper_cased 1)) + $new (at ! each /.local (random.upper_cased 2)) + $it (at ! each /.local (random.upper_cased 3)) .let [expected (format left right)]]) (all _.and (_.for [/.stdout] @@ -407,9 +407,9 @@ bool random.bit float random.frac - string (random.upper_case 5) + string (random.upper_cased 5) - comment (random.upper_case 10)] + comment (random.upper_cased 10)] (all _.and ..test|bool ..test|float @@ -434,8 +434,8 @@ Test (do [! random.monad] [float/0 random.safe_frac - $global (at ! each /.global (random.lower_case 10)) - pattern (at ! each /.string (random.lower_case 11))] + $global (at ! each /.global (random.lower_cased 10)) + pattern (at ! each /.string (random.lower_cased 11))] (all _.and (_.coverage [/.global] (expression (|>> (as Text) (text#= "global-variable")) @@ -488,7 +488,7 @@ Test (do [! random.monad] [float/0 random.safe_frac - $foreign (at ! each /.local (random.lower_case 10))] + $foreign (at ! each /.local (random.lower_cased 10))] (all _.and (_.coverage [/.local] (expression (|>> (as Frac) (f.= (f.+ float/0 float/0))) @@ -605,12 +605,12 @@ (def test|variadic Test (do [! random.monad] - [$inputs (at ! each /.local (random.lower_case 10)) + [$inputs (at ! each /.local (random.lower_cased 10)) arity (at ! each (n.% 10) random.nat) vals (|> random.int (at ! each /.int) (random.list arity)) - keys (|> (random.lower_case 1) + keys (|> (random.lower_cased 1) (random.set text.hash arity) (at ! each (|>> set.list (list#each /.string))))] (all _.and @@ -638,9 +638,9 @@ Test (do [! random.monad] [float/0 random.safe_frac - $foreign (at ! each /.local (random.lower_case 10)) + $foreign (at ! each /.local (random.lower_cased 10)) - $constant (at ! each /.constant (random.lower_case 10))] + $constant (at ! each /.constant (random.lower_cased 10))] (all _.and (_.coverage [/.defined?/1] (and (expression (|>> (as Bit)) @@ -675,8 +675,8 @@ Test (do [! random.monad] [float/0 random.safe_frac - $foreign (at ! each /.local (random.lower_case 10)) - field (at ! each /.string (random.upper_case 10))] + $foreign (at ! each /.local (random.lower_cased 10)) + field (at ! each /.string (random.upper_cased 10))] (all _.and (<| (_.for [/.Var]) ..test|var) @@ -826,8 +826,8 @@ [expected random.safe_frac dummy (random.only (|>> (f.= expected) not) random.safe_frac) - error (random.lower_case 10) - $ex (at ! each /.local (random.lower_case 10)) + error (random.lower_cased 10) + $ex (at ! each /.local (random.lower_cased 10)) expected_tag ..random_tag dummy_tag (random.only (|>> (i.= expected_tag) not) @@ -906,16 +906,16 @@ Test (do [! random.monad] [iterations (at ! each (n.% 10) random.nat) - $self (at ! each /.local (random.lower_case 1)) - field (random.lower_case 3) - $class (at ! each /.local (random.upper_case 4)) + $self (at ! each /.local (random.lower_cased 1)) + field (random.lower_cased 3) + $class (at ! each /.local (random.upper_cased 4)) float/0 random.safe_frac float/1 random.safe_frac float/2 random.safe_frac - $arg/0 (at ! each /.local (random.lower_case 10)) - $arg/1 (at ! each /.local (random.lower_case 11)) - $arg/2 (at ! each /.local (random.lower_case 12))] + $arg/0 (at ! each /.local (random.lower_cased 10)) + $arg/1 (at ! each /.local (random.lower_cased 11)) + $arg/2 (at ! each /.local (random.lower_cased 12))] (all _.and (_.coverage [/.lambda /.return] (and (expression (|>> (as Frac) (f.= float/0)) @@ -959,12 +959,12 @@ [float/0 random.safe_frac float/1 random.safe_frac float/2 random.safe_frac - arg/0 (random.lower_case 10) + arg/0 (random.lower_cased 10) arg/1 (random.only (|>> (text#= arg/0) not) - (random.lower_case 10)) + (random.lower_cased 10)) arg/2 (random.only (predicate.and (|>> (text#= arg/0) not) (|>> (text#= arg/1) not)) - (random.lower_case 10)) + (random.lower_cased 10)) .let [$arg/0 (/.local arg/0) $arg/1 (/.local arg/1) $arg/2 (/.local arg/2)] @@ -993,9 +993,9 @@ [float/0 random.safe_frac float/1 random.safe_frac float/2 random.safe_frac - $arg/0 (at ! each /.local (random.lower_case 10)) - $arg/1 (at ! each /.local (random.lower_case 11)) - $arg/2 (at ! each /.local (random.lower_case 12)) + $arg/0 (at ! each /.local (random.lower_cased 10)) + $arg/1 (at ! each /.local (random.lower_cased 11)) + $arg/2 (at ! each /.local (random.lower_cased 12)) expected (at ! each (|>> %.int (text.replaced "+" "")) random.int)] (all _.and @@ -1036,7 +1036,7 @@ (random#each /.bool random.bit) (random#each /.float random.frac) (random#each /.int random.int) - (random#each /.string (random.lower_case 5)) + (random#each /.string (random.lower_cased 5)) ))] (all random.either literal diff --git a/stdlib/source/test/lux/meta/type.lux b/stdlib/source/test/lux/meta/type.lux index e4c8ad2ea..488bdabc0 100644 --- a/stdlib/source/test/lux/meta/type.lux +++ b/stdlib/source/test/lux/meta/type.lux @@ -522,7 +522,7 @@ true))) (do random.monad [left random.nat - right (random.lower_case 1) + right (random.lower_cased 1) .let [left,right [left right]]] (_.coverage [/.as] (|> left,right diff --git a/stdlib/source/test/lux/meta/type/check.lux b/stdlib/source/test/lux/meta/type/check.lux index 441070482..05b6dcba4 100644 --- a/stdlib/source/test/lux/meta/type/check.lux +++ b/stdlib/source/test/lux/meta/type/check.lux @@ -121,7 +121,7 @@ (def (primitive_type parameters) (-> Nat (Random Type)) (do random.monad - [primitive (random.upper_case 3) + [primitive (random.upper_cased 3) parameters (random.list parameters (primitive_type (-- parameters)))] (in {.#Primitive primitive parameters}))) @@ -139,7 +139,7 @@ ex random.nat] (all _.and (do random.monad - [expected (random.upper_case 10)] + [expected (random.upper_cased 10)] (_.coverage [/.failure] (when (/.result /.fresh_context (is (/.Check Any) @@ -147,7 +147,7 @@ {try.#Success _} false {try.#Failure actual} (same? expected actual)))) (do random.monad - [expected (random.upper_case 10)] + [expected (random.upper_cased 10)] (_.coverage [/.assertion] (and (when (/.result /.fresh_context (is (/.Check Any) @@ -209,7 +209,7 @@ {try.#Success verdict} verdict {try.#Failure error} false)) (do random.monad - [nominal (random.upper_case 10)] + [nominal (random.upper_cased 10)] (_.coverage [/.bind] (when (/.result /.fresh_context (do /.monad @@ -220,7 +220,7 @@ {try.#Success _} true {try.#Failure error} false))) (do random.monad - [nominal (random.upper_case 10)] + [nominal (random.upper_cased 10)] (_.coverage [/.bound?] (and (|> (do /.monad [[var_id var_type] /.var @@ -243,7 +243,7 @@ (/.result /.fresh_context) (try.else false))))) (do random.monad - [nominal (random.upper_case 10)] + [nominal (random.upper_cased 10)] (_.coverage [/.cannot_rebind_var] (when (/.result /.fresh_context (do /.monad @@ -258,7 +258,7 @@ {try.#Failure error} (exception.match? /.cannot_rebind_var error)))) (do random.monad - [nominal (random.upper_case 10) + [nominal (random.upper_cased 10) var_id random.nat] (_.coverage [/.unknown_type_var] (when (/.result /.fresh_context @@ -270,7 +270,7 @@ {try.#Failure error} (exception.match? /.unknown_type_var error)))) (do random.monad - [nominal (random.upper_case 10) + [nominal (random.upper_cased 10) .let [expected {.#Primitive nominal (list)}]] (_.coverage [/.peek] (and (|> (do /.monad @@ -298,7 +298,7 @@ _ false))))) (do random.monad - [nominal (random.upper_case 10) + [nominal (random.upper_cased 10) .let [expected {.#Primitive nominal (list)}]] (_.coverage [/.read] (when (/.result /.fresh_context @@ -312,7 +312,7 @@ _ false))) (do random.monad - [nominal (random.upper_case 10) + [nominal (random.upper_cased 10) .let [expected {.#Primitive nominal (list)}]] (_.coverage [/.unbound_type_var] (when (/.result /.fresh_context @@ -382,7 +382,7 @@ (def nominal (Random Type) (do random.monad - [name (random.upper_case 10)] + [name (random.upper_cased 10)] (in {.#Primitive name (list)}))) (def (non_twins = random) @@ -664,7 +664,7 @@ Test (do [! random.monad] [nominal ..nominal - [name/0 name/1] (..non_twins text#= (random.upper_case 10)) + [name/0 name/1] (..non_twins text#= (random.upper_cased 10)) [parameter/0 parameter/1] (..non_twins //#= ..nominal) left_name ..symbol right_name ..symbol @@ -692,8 +692,8 @@ (function.constant {.#Ex id})) random.nat) (do random.monad - [module (random.upper_case 10) - short (random.upper_case 10) + [module (random.upper_cased 10) + short (random.upper_cased 10) anonymousT dirty_type] (in (function (_ holeT) {.#Named [module short] (anonymousT holeT)}))) @@ -710,7 +710,7 @@ [.#Apply] )) (do [! random.monad] - [name (random.upper_case 10) + [name (random.upper_cased 10) parameterT dirty_type] (in (function (_ holeT) {.#Primitive name (list (parameterT holeT))}))) @@ -765,7 +765,7 @@ (def for_subsumption|nominal (Random Bit) (do random.monad - [primitive (random.upper_case 10) + [primitive (random.upper_cased 10) example ..clean_type] (in (and (/.subsumes? {.#Primitive primitive (list)} {.#Primitive primitive (list)}) @@ -847,8 +847,8 @@ (def for_subsumption|named (Random Bit) (do random.monad - [module (random.upper_case 10) - short (random.upper_case 10) + [module (random.upper_cased 10) + short (random.upper_cased 10) example ..clean_type] (in (and (/.subsumes? {.#Named [module short] example} example) diff --git a/stdlib/source/test/lux/meta/type/primitive.lux b/stdlib/source/test/lux/meta/type/primitive.lux index d87a17059..37284d46e 100644 --- a/stdlib/source/test/lux/meta/type/primitive.lux +++ b/stdlib/source/test/lux/meta/type/primitive.lux @@ -35,18 +35,18 @@ [specific (/.specific (template.text [g!Foo]))] ) - (/.primitive (g!Foo a) + (/.def (g!Foo a) Text - (/.primitive (g!Bar a) + (/.def (g!Bar a) Nat (def .public test Test (<| (_.covering /._) - (_.for [/.primitive]) + (_.for [/.def]) (do random.monad - [expected_foo (random.lower_case 5) + [expected_foo (random.lower_cased 5) expected_bar random.nat] (all _.and (_.coverage [/.abstraction] diff --git a/stdlib/source/test/lux/meta/type/row.lux b/stdlib/source/test/lux/meta/type/row.lux index 49988cc33..fb2abf4de 100644 --- a/stdlib/source/test/lux/meta/type/row.lux +++ b/stdlib/source/test/lux/meta/type/row.lux @@ -67,8 +67,8 @@ random.instant) expected_life_span (random.maybe random.duration) - dummy_name (random.upper_case 1) - expected_name (random.upper_case 2) + dummy_name (random.upper_cased 1) + expected_name (random.upper_cased 2) dummy_id random.nat expected_id (random.only (|>> (n.= dummy_id) not) random.nat)]) diff --git a/stdlib/source/test/lux/meta/version.lux b/stdlib/source/test/lux/meta/version.lux index 2182f3197..7ed9789c0 100644 --- a/stdlib/source/test/lux/meta/version.lux +++ b/stdlib/source/test/lux/meta/version.lux @@ -38,7 +38,7 @@ Test (<| (_.covering /._) (with_expansions [ (/.current) - (static.random code.text (random.lower_case 1))]) + (static.random code.text (random.lower_cased 1))]) (all _.and (_.coverage [/.latest] (n.> 0 /.latest)) diff --git a/stdlib/source/test/lux/program.lux b/stdlib/source/test/lux/program.lux index dbe034606..90e5aae43 100644 --- a/stdlib/source/test/lux/program.lux +++ b/stdlib/source/test/lux/program.lux @@ -96,7 +96,7 @@ Test (<| (_.covering /._) (do random.monad - [inputs (random.list 5 (random.upper_case 5))] + [inputs (random.list 5 (random.upper_cased 5))] (all _.and (_.coverage [/.Program /.program] (let [(open "list#[0]") (list.equivalence text.equivalence)] diff --git a/stdlib/source/test/lux/test/coverage.lux b/stdlib/source/test/lux/test/coverage.lux index a7407ee6c..eaab13849 100644 --- a/stdlib/source/test/lux/test/coverage.lux +++ b/stdlib/source/test/lux/test/coverage.lux @@ -44,10 +44,10 @@ (<| (_.covering /._) (_.for [/.Coverage]) (do [! random.monad] - [module (random.upper_case 1) - first (random.lower_case 2) - second (random.lower_case 3) - dummy (random.lower_case 4)]) + [module (random.upper_cased 1) + first (random.lower_cased 2) + second (random.lower_cased 3) + dummy (random.lower_cased 4)]) (all _.and (`` (_.coverage [/.of] (and (let [[module _] (symbol .._) diff --git a/stdlib/source/test/lux/test/property.lux b/stdlib/source/test/lux/test/property.lux index e1bc232dd..dfaaddac5 100644 --- a/stdlib/source/test/lux/test/property.lux +++ b/stdlib/source/test/lux/test/property.lux @@ -180,11 +180,11 @@ (<| (/.covering /._) (/.for [/.Test]) (do [! random.monad] - [expected_context (random.lower_case 5) + [expected_context (random.lower_cased 5) expected_message/0 (random.only (|>> (text#= expected_context) not) - (random.lower_case 5)) + (random.lower_cased 5)) expected_message/1 (random.only (|>> (text#= expected_message/0) not) - (random.lower_case 5))] + (random.lower_cased 5))] (all /.and (/.for [/.Seed] seed) diff --git a/stdlib/source/test/lux/world/file.lux b/stdlib/source/test/lux/world/file.lux index 477b09110..35402d81a 100644 --- a/stdlib/source/test/lux/world/file.lux +++ b/stdlib/source/test/lux/world/file.lux @@ -246,8 +246,8 @@ Test (<| (_.covering /._) (do [! random.monad] - [/ (random.upper_case 1) - file (random.lower_case 1)] + [/ (random.upper_cased 1) + file (random.lower_cased 1)] (all _.and (_.for [/.mock] ($/.spec (io.io (/.mock /)))) diff --git a/stdlib/source/test/lux/world/net.lux b/stdlib/source/test/lux/world/net.lux index e7780f688..9856b8a00 100644 --- a/stdlib/source/test/lux/world/net.lux +++ b/stdlib/source/test/lux/world/net.lux @@ -10,6 +10,7 @@ [\\library ["[0]" /]] ["[0]" / + ["[1][0]" mime] ["[1][0]" http ["[1]/[0]" client] ["[1]/[0]" cookie] @@ -36,6 +37,8 @@ (_.coverage [/.Address] true) + /mime.test + /http/client.test /http/cookie.test /http/header.test diff --git a/stdlib/source/test/lux/world/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux index ce0a35e93..ed3eb915c 100644 --- a/stdlib/source/test/lux/world/net/http/client.lux +++ b/stdlib/source/test/lux/world/net/http/client.lux @@ -69,7 +69,7 @@ on_options random.nat on_trace random.nat num_headers (at ! each (nat.% 10) random.nat) - headers (random.dictionary text.hash num_headers (random.lower_case 3) (random.lower_case 3)) + headers (random.dictionary text.hash num_headers (random.lower_cased 3) (random.lower_cased 3)) .let [mock (is (/.Client IO) (implementation (def (request method url headers data) diff --git a/stdlib/source/test/lux/world/net/http/cookie.lux b/stdlib/source/test/lux/world/net/http/cookie.lux index 8ce0ef756..057da292b 100644 --- a/stdlib/source/test/lux/world/net/http/cookie.lux +++ b/stdlib/source/test/lux/world/net/http/cookie.lux @@ -34,9 +34,9 @@ Test (<| (_.covering /._) (do [! random.monad] - [name (random.upper_case 1) - fake_name (random.upper_case 2) - expected (random.lower_case 1) + [name (random.upper_cased 1) + fake_name (random.upper_cased 2) + expected (random.lower_cased 1) .let [cookie (is (/.Cookie Text) [/.#name name /.#in (|>>) @@ -48,12 +48,12 @@ duration random.duration instant random.instant - domain (random.lower_case 2) - path (random.lower_case 3)]) + domain (random.lower_cased 2) + path (random.lower_cased 3)]) (_.for [/.Cookie /.#name /.#in /.#out]) (all _.and (_.for [/.equivalence] - (equivalenceS.spec /.equivalence (..random (list [cookie (random.lower_case 1)])))) + (equivalenceS.spec /.equivalence (..random (list [cookie (random.lower_cased 1)])))) (_.for [/.Jar] (all _.and (_.coverage [/.empty] diff --git a/stdlib/source/test/lux/world/net/http/header.lux b/stdlib/source/test/lux/world/net/http/header.lux index 50b25f24b..7302fd653 100644 --- a/stdlib/source/test/lux/world/net/http/header.lux +++ b/stdlib/source/test/lux/world/net/http/header.lux @@ -18,8 +18,9 @@ [\\library ["[0]" / (.only) [// - ["[0]" mime (.use "[1]#[0]" equivalence)] - ["[0]" cookie (.only Cookie)]]]]) + ["[0]" cookie (.only Cookie)] + [// + ["[0]" mime (.use "[1]#[0]" equivalence)]]]]]) (def .public test Test @@ -30,8 +31,8 @@ (random#in mime.jpeg)) expected_location (random.either (random#in "http://example.com/yolo") (random#in "http://example.com/meme")) - header_name (random.lower_case 1) - expected_header_value (random.upper_case 1) + header_name (random.lower_cased 1) + expected_header_value (random.upper_cased 1) .let [header (is (/.Header Text) [/.#name header_name /.#in (|>>) @@ -72,8 +73,8 @@ (try#each (text#= expected_location)) (try.else false))) (do ! - [name (random.upper_case 1) - expected_value (random.lower_case 1) + [name (random.upper_cased 1) + expected_value (random.lower_cased 1) .let [cookie (is (Cookie Text) [cookie.#name name cookie.#in (|>>) diff --git a/stdlib/source/test/lux/world/net/mime.lux b/stdlib/source/test/lux/world/net/mime.lux new file mode 100644 index 000000000..8c5c84033 --- /dev/null +++ b/stdlib/source/test/lux/world/net/mime.lux @@ -0,0 +1,134 @@ +(.require + [library + [lux (.except) + [abstract + [monad (.only do)] + [\\specification + ["[0]S" equivalence] + ["[0]S" hash]]] + [data + ["[0]" text (.only) + ["[0]" encoding (.only) + ["[1]T" \\test]]] + [collection + ["[0]" list] + ["[0]" set]]] + [math + ["[0]" random (.only Random) (.use "[1]#[0]" monad)] + [number + ["n" nat]]] + [test + ["_" property (.only Test)]]]] + [\\library + ["[0]" /]]) + +(with_expansions [ (these [/.aac] + [/.abiword] + [/.avi] + [/.amazon_kindle_ebook] + [/.binary] + [/.bitmap] + [/.bzip] + [/.bzip2] + [/.c_shell] + [/.css] + [/.csv] + [/.microsoft_word] + [/.microsoft_word_openxml] + [/.ms_embedded_opentype_fonts] + [/.epub] + [/.ecmascript] + [/.gif] + [/.html] + [/.icon] + [/.icalendar] + [/.jar] + [/.jpeg] + [/.javascript] + [/.json] + [/.midi] + [/.mpeg] + [/.apple_installer_package] + [/.opendocument_presentation] + [/.opendocument_spreadsheet] + [/.opendocument_text] + [/.ogg_audio] + [/.ogg_video] + [/.ogg] + [/.opentype_font] + [/.png] + [/.pdf] + [/.microsoft_powerpoint] + [/.microsoft_powerpoint_openxml] + [/.rar] + [/.rtf] + [/.bourne_shell] + [/.svg] + [/.flash] + [/.tar] + [/.tiff] + [/.typescript] + [/.truetype_font] + [/.microsoft_visio] + [/.wav] + [/.webm_audio] + [/.webm_video] + [/.webp] + [/.woff] + [/.woff2] + [/.xhtml] + [/.microsoft_excel] + [/.microsoft_excel_openxml] + [/.xml] + [/.xul] + [/.zip] + + [/.audio_3gpp] + [/.video_3gpp] + [/.audio_3gpp2] + [/.video_3gpp2] + [/.compressed_7z] + + [/.utf_8]) + (with_template [] + [] + + )] + (def .public random + (Random /.MIME) + (`` (all random.either + (,, (with_template [] + [(random#in )] + + )) + ))) + + (def .public test + Test + (<| (_.covering /._) + (do [! random.monad] + [expected ..random + encoding encodingT.random]) + (_.for [/.MIME]) + (all _.and + (_.for [/.equivalence] + (equivalenceS.spec /.equivalence ..random)) + (_.for [/.hash] + (hashS.spec /.hash ..random)) + + (_.coverage [/.mime /.name] + (|> expected + /.name + /.mime + (at /.equivalence = expected))) + (_.coverage [] + (let [options (list ) + uniques (set.of_list /.hash options)] + (n.= (list.size options) + (set.size uniques)))) + (_.coverage [/.text] + (|> (/.text encoding) + /.name + (text.contains? (encoding.name encoding)))) + ))) + ) diff --git a/stdlib/source/test/lux/world/net/uri/encoding.lux b/stdlib/source/test/lux/world/net/uri/encoding.lux index f9a627e25..0bdb9a7a0 100644 --- a/stdlib/source/test/lux/world/net/uri/encoding.lux +++ b/stdlib/source/test/lux/world/net/uri/encoding.lux @@ -27,11 +27,11 @@ (let [choices (set.list /.reserved) variety (list.size choices)]) (do [! random.monad] - [safe (random.lower_case 1) + [safe (random.lower_cased 1) - left (random.lower_case 1) - middle (random.lower_case 1) - right (random.lower_case 1) + left (random.lower_cased 1) + middle (random.lower_cased 1) + right (random.lower_cased 1) left_choice (at ! each (n.% variety) random.nat) right_choice (at ! each (n.% variety) random.nat) .let [left_choice (maybe.trusted (list.item left_choice choices)) diff --git a/stdlib/source/test/lux/world/net/uri/path.lux b/stdlib/source/test/lux/world/net/uri/path.lux index 1a6c15a53..968fd990c 100644 --- a/stdlib/source/test/lux/world/net/uri/path.lux +++ b/stdlib/source/test/lux/world/net/uri/path.lux @@ -21,7 +21,7 @@ (<| (_.covering /._) (do [! random.monad] [segments (at ! each (n.% 10) random.nat) - segments (random.list segments (random.lower_case 1))]) + segments (random.list segments (random.lower_cased 1))]) (_.for [/.Path]) (all _.and (_.coverage [/.path /.Segment /.separator] diff --git a/stdlib/source/test/lux/world/time/day.lux b/stdlib/source/test/lux/world/time/day.lux index a893a1405..6f1ea4b3d 100644 --- a/stdlib/source/test/lux/world/time/day.lux +++ b/stdlib/source/test/lux/world/time/day.lux @@ -72,7 +72,7 @@ [/.#Friday /.#Saturday /.#Sunday] )) (do random.monad - [not_a_day (random.upper_case 1)] + [not_a_day (random.upper_cased 1)] (_.coverage [/.not_a_day_of_the_week] (when (at /.codec decoded not_a_day) {try.#Failure error} diff --git a/stdlib/source/test/lux/world/time/month.lux b/stdlib/source/test/lux/world/time/month.lux index d259985c6..620af8077 100644 --- a/stdlib/source/test/lux/world/time/month.lux +++ b/stdlib/source/test/lux/world/time/month.lux @@ -109,7 +109,7 @@ (list#mix n.+ 0) (n.= expected)))) (do random.monad - [not_a_month (random.upper_case 1)] + [not_a_month (random.upper_cased 1)] (_.coverage [/.not_a_month_of_the_year] (when (at /.codec decoded not_a_month) {try.#Failure error} -- cgit v1.2.3