diff options
author | Eduardo Julian | 2020-11-24 05:18:04 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-11-24 05:18:04 -0400 |
commit | c4bbfea18d995948012f45a6afda7a6e6ba56f84 (patch) | |
tree | b3c425471830788965776fd173169f084d9f6af4 /stdlib/source/lux/tool | |
parent | d89d837de3475b75587a4293e094d755d2cd4626 (diff) |
Better error messages when re-using a name when making a definition.
Diffstat (limited to '')
16 files changed, 89 insertions, 86 deletions
diff --git a/stdlib/source/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/lux/tool/compiler/language/lux/analysis.lux index 07cd29140..34d8005e1 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/analysis.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/analysis.lux @@ -11,16 +11,16 @@ [data ["." product] ["." maybe] - ["." bit ("#@." equivalence)] + ["." bit ("#\." equivalence)] [number ["n" nat] ["i" int] ["r" rev] ["f" frac]] - ["." text ("#@." equivalence) + ["." text ("#\." equivalence) ["%" format (#+ Format format)]] [collection - ["." list ("#@." functor fold)]]] + ["." list ("#\." functor fold)]]] [meta ["." location]]] [// @@ -116,17 +116,17 @@ (^template [<tag> <=>] [[(<tag> reference) (<tag> sample)] (<=> reference sample)]) - ([#Bit bit@=] + ([#Bit bit\=] [#Nat n.=] [#Int i.=] [#Rev r.=] [#Frac f.=] - [#Text text@=]) + [#Text text\=]) _ false))) -(structure: #export (composite-equivalence (^open "/@.")) +(structure: #export (composite-equivalence (^open "/\.")) (All [a] (-> (Equivalence a) (Equivalence (Composite a)))) (def: (= reference sample) @@ -134,11 +134,11 @@ [(#Variant [reference-lefts reference-right? reference-value]) (#Variant [sample-lefts sample-right? sample-value])] (and (n.= reference-lefts sample-lefts) - (bit@= reference-right? sample-right?) - (/@= reference-value sample-value)) + (bit\= reference-right? sample-right?) + (/\= reference-value sample-value)) [(#Tuple reference) (#Tuple sample)] - (:: (list.equivalence /@=) = reference sample) + (:: (list.equivalence /\=) = reference sample) _ false))) @@ -260,7 +260,7 @@ (def: #export (apply [abstraction inputs]) (-> (Application Analysis) Analysis) - (list@fold (function (_ input abstraction') + (list\fold (function (_ input abstraction') (#Apply input abstraction')) abstraction inputs)) @@ -352,7 +352,7 @@ (#Tuple members) (|> members - (list@map %analysis) + (list\map %analysis) (text.join-with " ") (text.enclose ["[" "]"]))) @@ -366,7 +366,7 @@ (|> (%analysis body) (format " ") (format (|> environment - (list@map %analysis) + (list\map %analysis) (text.join-with " ") (text.enclose ["[" "]"]))) (text.enclose ["(" ")"])) @@ -375,13 +375,13 @@ (|> analysis ..application #.Cons - (list@map %analysis) + (list\map %analysis) (text.join-with " ") (text.enclose ["(" ")"])) (#Extension name parameters) (|> parameters - (list@map %analysis) + (list\map %analysis) (text.join-with " ") (format (%.text name) " ") (text.enclose ["(" ")"])))) @@ -445,7 +445,7 @@ (def: #export (with-location location action) (All [a] (-> Location (Operation a) (Operation a))) - (if (text@= "" (product.left location)) + (if (text\= "" (product.left location)) action (function (_ [bundle state]) (let [old-location (get@ #.location state)] diff --git a/stdlib/source/lux/tool/compiler/language/lux/analysis/macro.lux b/stdlib/source/lux/tool/compiler/language/lux/analysis/macro.lux index b81f8f227..e9c260789 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/analysis/macro.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/analysis/macro.lux @@ -7,10 +7,7 @@ ["." exception (#+ exception:)]] [data ["." text - ["%" format (#+ format)]] - [collection - [array (#+ Array)] - ["." list ("#@." functor)]]] + ["%" format (#+ format)]]] ["." meta]] [///// ["." phase]]) diff --git a/stdlib/source/lux/tool/compiler/language/lux/generation.lux b/stdlib/source/lux/tool/compiler/language/lux/generation.lux index 64e66be2d..0b4ab70b2 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/generation.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/generation.lux @@ -10,13 +10,13 @@ [binary (#+ Binary)] ["." product] ["." name] - ["." text ("#@." equivalence) + ["." text ("#\." equivalence) ["%" format (#+ format)]] [number ["n" nat]] [collection ["." row (#+ Row)] - ["." list ("#@." functor)]]]] + ["." list ("#\." functor)]]]] [// [synthesis (#+ Synthesis)] [phase @@ -223,7 +223,7 @@ [?buffer (extension.read (get@ #buffer))] (case ?buffer (#.Some buffer) - (if (row.any? (|>> product.left (text@= name)) buffer) + (if (row.any? (|>> product.left (text\= name)) buffer) (phase.throw ..cannot-overwrite-output [name]) (extension.update (set@ #buffer (#.Some (row.add [name code] buffer))))) @@ -260,7 +260,7 @@ (let [[_module _name] name] (do try.monad [module-id (archive.id _module archive) - registry (if (text@= (get@ #module state) _module) + registry (if (text\= (get@ #module state) _module) (#try.Success (get@ #registry state)) (do try.monad [[descriptor document] (archive.find _module archive)] diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/module.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/module.lux index b04c02674..8c1ba3644 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/module.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/module.lux @@ -42,9 +42,15 @@ [cannot-declare-tags-for-foreign-type] ) -(exception: #export (cannot-define-more-than-once {name Name}) +(exception: #export (cannot-define-more-than-once {name Name} {already-existing Global}) (exception.report - ["Definition" (%.name name)])) + ["Definition" (%.name name)] + ["Original" (case already-existing + (#.Alias alias) + (format "alias " (%.name alias)) + + (#.Definition definition) + (format "definition " (%.name name)))])) (exception: #export (can-only-change-state-of-active-module {module Text} {state Module-State}) (exception.report @@ -144,7 +150,7 @@ []]) (#.Some already-existing) - ((/.throw' ..cannot-define-more-than-once [self-name name]) state)))))) + ((/.throw' ..cannot-define-more-than-once [[self-name name] already-existing]) state)))))) (def: #export (create hash name) (-> Nat Text (Operation Any)) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/directive.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/directive.lux index 855d1cf9f..2bde38a7d 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/directive.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/directive.lux @@ -8,7 +8,7 @@ [text ["%" format (#+ format)]] [collection - ["." list ("#@." fold monoid)]]] + ["." list ("#\." fold monoid)]]] ["." meta]] ["." // #_ ["#." extension] @@ -66,12 +66,12 @@ (case expansion (^ (list& <lux_def_module> referrals)) (|> (recur archive <lux_def_module>) - (:: ! map (update@ #/.referrals (list@compose referrals)))) + (:: ! map (update@ #/.referrals (list\compose referrals)))) _ (|> expansion (monad.map ! (recur archive)) - (:: ! map (list@fold /.merge-requirements /.no-requirements))))) + (:: ! map (list\fold /.merge-requirements /.no-requirements))))) _ (//.throw ..not-a-directive code)))))) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js.lux index e9ecc6435..8477134a0 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/js.lux @@ -10,7 +10,7 @@ [runtime (#+ Phase Phase!)] ["#." primitive] ["#." structure] - ["#." reference ("#@." system)] + ["#." reference ("#\." system)] ["#." case] ["#." loop] ["#." function] @@ -22,7 +22,7 @@ [analysis (#+)] ["." synthesis] ["//#" /// #_ - ["#." phase ("#@." monad)]]]]]]) + ["#." phase ("#\." monad)]]]]]]) (exception: #export cannot-recur-as-an-expression) @@ -31,7 +31,7 @@ (case synthesis (^template [<tag>] [(^ (<tag> value)) - (//////phase@map _.return (expression archive synthesis))]) + (//////phase\map _.return (expression archive synthesis))]) ([synthesis.bit] [synthesis.i64] [synthesis.f64] @@ -59,7 +59,7 @@ (/loop.recur! statement expression archive updates) (^ (synthesis.function/abstraction abstraction)) - (//////phase@map _.return (/function.function statement expression archive abstraction)) + (//////phase\map _.return (/function.function statement expression archive abstraction)) )) (def: (expression archive synthesis) @@ -67,7 +67,7 @@ (case synthesis (^template [<tag> <generator>] [(^ (<tag> value)) - (//////phase@wrap (<generator> value))]) + (//////phase\wrap (<generator> value))]) ([synthesis.bit /primitive.bit] [synthesis.i64 /primitive.i64] [synthesis.f64 /primitive.f64] diff --git a/stdlib/source/lux/tool/compiler/language/lux/program.lux b/stdlib/source/lux/tool/compiler/language/lux/program.lux index 85cb03670..fc384c178 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/program.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/program.lux @@ -11,7 +11,7 @@ [text ["%" format (#+ format)]] [collection - ["." list ("#@." functor)]]]] + ["." list ("#\." functor)]]]] [// [generation (#+ Context)] [/// @@ -52,5 +52,5 @@ #.None (|> registries - (list@map (|>> product.left product.left)) + (list\map (|>> product.left product.left)) (exception.throw ..cannot-find-program))))) diff --git a/stdlib/source/lux/tool/compiler/meta/archive.lux b/stdlib/source/lux/tool/compiler/meta/archive.lux index 7ac12f55e..eaabf6aee 100644 --- a/stdlib/source/lux/tool/compiler/meta/archive.lux +++ b/stdlib/source/lux/tool/compiler/meta/archive.lux @@ -18,9 +18,9 @@ [format ["." binary (#+ Writer)]] [number - ["n" nat ("#@." equivalence)]] + ["n" nat ("#\." equivalence)]] [collection - ["." list ("#@." functor fold)] + ["." list ("#\." functor fold)] ["." dictionary (#+ Dictionary)] ["." set]]] [type @@ -178,7 +178,7 @@ (|>> :representation (get@ #resolver) dictionary.entries - (list@map (function (_ [module [id _]]) + (list\map (function (_ [module [id _]]) [module id])))) (def: #export (merge additions archive) @@ -188,7 +188,7 @@ :representation (update@ #next (n.max +next)) (update@ #resolver (function (_ resolver) - (list@fold (function (_ [module [id entry]] resolver) + (list\fold (function (_ [module [id entry]] resolver) (case entry (#.Some _) (dictionary.put module [id entry] resolver) @@ -239,7 +239,7 @@ (-> (List Reservation) Bit) (n.= (list.size reservations) (|> reservations - (list@map product.left) + (list\map product.left) (set.from-list text.hash) set.size))) @@ -247,7 +247,7 @@ (-> (List Reservation) Bit) (n.= (list.size reservations) (|> reservations - (list@map product.right) + (list\map product.right) (set.from-list n.hash) set.size))) @@ -261,12 +261,12 @@ (do try.monad [[actual next reservations] (<b>.run ..reader binary) _ (exception.assert ..version-mismatch [expected actual] - (n@= expected actual)) + (n\= expected actual)) _ (exception.assert ..corrupt-data [] (correct-reservations? reservations))] (wrap (:abstraction {#next next - #resolver (list@fold (function (_ [module id] archive) + #resolver (list\fold (function (_ [module id] archive) (dictionary.put module [id #.None] archive)) (get@ #resolver (:representation ..empty)) reservations)})))) diff --git a/stdlib/source/lux/tool/compiler/meta/archive/artifact.lux b/stdlib/source/lux/tool/compiler/meta/archive/artifact.lux index 1af87d6fc..dec8938b3 100644 --- a/stdlib/source/lux/tool/compiler/meta/archive/artifact.lux +++ b/stdlib/source/lux/tool/compiler/meta/archive/artifact.lux @@ -13,7 +13,7 @@ ["%" format (#+ format)]] [collection ["." list] - ["." row (#+ Row) ("#@." functor fold)] + ["." row (#+ Row) ("#\." functor fold)] ["." dictionary (#+ Dictionary)]] [format ["." binary (#+ Writer)]]] @@ -114,7 +114,7 @@ (binary.row/64 category))] (|>> :representation (get@ #artifacts) - (row@map (get@ #category)) + (row\map (get@ #category)) artifacts))) (exception: #export (invalid-category {tag Nat}) @@ -135,7 +135,7 @@ 5 (:: ! map (|>> #Directive) <b>.text) _ (<>.fail (exception.construct ..invalid-category [tag])))))] (|> (<b>.row/64 category) - (:: <>.monad map (row@fold (function (_ artifact registry) + (:: <>.monad map (row\fold (function (_ artifact registry) (product.right (case artifact #Anonymous diff --git a/stdlib/source/lux/tool/compiler/meta/cache/dependency.lux b/stdlib/source/lux/tool/compiler/meta/cache/dependency.lux index 0105d0ccd..55bde3869 100644 --- a/stdlib/source/lux/tool/compiler/meta/cache/dependency.lux +++ b/stdlib/source/lux/tool/compiler/meta/cache/dependency.lux @@ -8,11 +8,11 @@ ["." function ["." memo (#+ Memo)]]] [data - ["." maybe ("#@." functor)] + ["." maybe ("#\." functor)] ["." text ["%" format (#+ format)]] [collection - ["." list ("#@." functor fold)] + ["." list ("#\." functor fold)] ["." dictionary (#+ Dictionary)] ["." set (#+ Set)]]]] [/// @@ -45,7 +45,7 @@ (def: #export graph (-> (List Dependency) Graph) - (list@fold (function (_ [module imports] graph) + (list\fold (function (_ [module imports] graph) (dictionary.put module imports graph)) ..empty)) @@ -61,9 +61,9 @@ (#try.Failure error) ..fresh)] ancestors (monad.map ! recur (set.to-list parents))] - (wrap (list@fold set.union parents ancestors))))) + (wrap (list\fold set.union parents ancestors))))) ancestry (memo.open memo)] - (list@fold (function (_ module memory) + (list\fold (function (_ module memory) (if (dictionary.contains? module memory) memory (let [[memory _] (ancestry [memory module])] diff --git a/stdlib/source/lux/tool/compiler/meta/io/archive.lux b/stdlib/source/lux/tool/compiler/meta/io/archive.lux index 1533816fc..63639f444 100644 --- a/stdlib/source/lux/tool/compiler/meta/io/archive.lux +++ b/stdlib/source/lux/tool/compiler/meta/io/archive.lux @@ -8,7 +8,7 @@ ["." try (#+ Try)] ["." exception (#+ exception:)] [concurrency - ["." promise (#+ Promise) ("#@." monad)]] + ["." promise (#+ Promise) ("#\." monad)]] [security ["!" capability (#+ capability:)]] ["<>" parser @@ -16,10 +16,10 @@ [data [binary (#+ Binary)] ["." product] - ["." text ("#@." equivalence) + ["." text ("#\." equivalence) ["%" format (#+ format)]] [collection - ["." list ("#@." functor fold)] + ["." list ("#\." functor fold)] ["." dictionary (#+ Dictionary)] ["." row (#+ Row)] ["." set]] @@ -191,10 +191,10 @@ [module-dir (!.use (:: system directory) (..module system static module-id)) cached-files (!.use (:: module-dir files) [])] (|> cached-files - (list@map (function (_ file) + (list\map (function (_ file) [(!.use (:: file name) []) (!.use (:: file path) [])])) - (list.filter (|>> product.left (text@= ..module-descriptor-file) not)) + (list.filter (|>> product.left (text\= ..module-descriptor-file) not)) (monad.map ! (function (_ [name path]) (do ! [file (: (Promise (Try (File Promise))) @@ -251,7 +251,7 @@ directives]])) (#artifact.Definition name) - (if (text@= $/program.name name) + (if (text\= $/program.name name) (wrap [definitions [analysers synthesizers @@ -331,7 +331,7 @@ (do (try.with promise.monad) [actual (cached-artifacts system static module-id) #let [expected (|> descriptor (get@ #descriptor.registry) artifact.artifacts)] - [document bundles] (promise@wrap (loaded-document (get@ #static.artifact-extension static) host-environment module-id expected actual document))] + [document bundles] (promise\wrap (loaded-document (get@ #static.artifact-extension static) host-environment module-id expected actual document))] (wrap [[descriptor document] bundles]))) (def: (purge! system static [module-name module-id]) @@ -346,9 +346,9 @@ (def: (valid-cache? expected actual) (-> Descriptor Input Bit) - (and (text@= (get@ #descriptor.name expected) + (and (text\= (get@ #descriptor.name expected) (get@ #////.module actual)) - (text@= (get@ #descriptor.file expected) + (text\= (get@ #descriptor.file expected) (get@ #////.file actual)) (n.= (get@ #descriptor.hash expected) (get@ #////.hash actual)))) @@ -369,7 +369,7 @@ (-> (List [Bit [Module [archive.ID [Descriptor (Document .Module)]]]]) dependency.Order Purge) - (list@fold (function (_ [module-name [module-id [descriptor document]]] purge) + (list\fold (function (_ [module-name [module-id [descriptor document]]] purge) (let [purged? (: (Predicate Module) (function (_ module) (dictionary.contains? module purge)))] @@ -394,8 +394,8 @@ (monad.map ! (function (_ [module-name module-id]) (do ! [data (..read-module-descriptor system static module-id) - [descriptor document] (promise@wrap (<b>.run ..parser data))] - (if (text@= archive.runtime-module module-name) + [descriptor document] (promise\wrap (<b>.run ..parser data))] + (if (text\= archive.runtime-module module-name) (wrap [true [module-name [module-id [descriptor document]]]]) (do ! @@ -403,14 +403,14 @@ (wrap [(..valid-cache? descriptor input) [module-name [module-id [descriptor document]]]]))))))) load-order (|> pre-loaded-caches - (list@map product.right) + (list\map product.right) (monad.fold try.monad (function (_ [module [module-id descriptor,document]] archive) (archive.add module descriptor,document archive)) archive) (:: try.monad map (dependency.load-order $.key)) (:: try.monad join) - promise@wrap) + promise\wrap) #let [purge (..full-purge pre-loaded-caches load-order)] _ (|> purge dictionary.entries @@ -423,7 +423,7 @@ [[descriptor,document bundles] (..load-definitions system static module-id host-environment descriptor,document)] (wrap [[module-name descriptor,document] bundles])))))] - (promise@wrap + (promise\wrap (do {! try.monad} [archive (monad.fold ! (function (_ [[module descriptor,document] _bundle] archive) @@ -433,7 +433,7 @@ analysis-state (..analysis-state (get@ #static.host static) archive)] (wrap [archive analysis-state - (list@fold (function (_ [_ [+analysers +synthesizers +generators +directives]] + (list\fold (function (_ [_ [+analysers +synthesizers +generators +directives]] [analysers synthesizers generators directives]) [(dictionary.merge +analysers analysers) (dictionary.merge +synthesizers synthesizers) @@ -452,7 +452,7 @@ (#try.Success file) (do (try.with promise.monad) [binary (!.use (:: file content) []) - archive (promise@wrap (archive.import ///.version binary))] + archive (promise\wrap (archive.import ///.version binary))] (..load-every-reserved-module host-environment system static import contexts archive)) (#try.Failure error) diff --git a/stdlib/source/lux/tool/compiler/meta/io/context.lux b/stdlib/source/lux/tool/compiler/meta/io/context.lux index c524f605f..572905325 100644 --- a/stdlib/source/lux/tool/compiler/meta/io/context.lux +++ b/stdlib/source/lux/tool/compiler/meta/io/context.lux @@ -10,10 +10,10 @@ [security ["!" capability]] [concurrency - ["." promise (#+ Promise) ("#@." monad)]]] + ["." promise (#+ Promise) ("#\." monad)]]] [data [binary (#+ Binary)] - ["." text ("#@." hash) + ["." text ("#\." hash) ["%" format (#+ format)] ["." encoding]] [collection @@ -56,7 +56,7 @@ (Promise (Try [Path (File Promise)]))) (case contexts #.Nil - (promise@wrap (exception.throw ..cannot-find-module [module])) + (promise\wrap (exception.throw ..cannot-find-module [module])) (#.Cons context contexts') (do promise.monad @@ -131,11 +131,11 @@ (#try.Success code) (wrap {#////.module module #////.file path - #////.hash (text@hash code) + #////.hash (text\hash code) #////.code code}) (#try.Failure _) - (promise@wrap (exception.throw ..cannot-read-module [module]))))) + (promise\wrap (exception.throw ..cannot-read-module [module]))))) (type: #export Enumeration (Dictionary Path Binary)) @@ -167,9 +167,9 @@ (let [path (!.use (:: file path) [])] (if (text.ends-with? ..lux-extension path) (do ! - [path (promise@wrap (..clean-path system context path)) + [path (promise\wrap (..clean-path system context path)) source-code (!.use (:: file content) [])] - (promise@wrap + (promise\wrap (dictionary.try-put path source-code enumeration))) (wrap enumeration)))) enumeration diff --git a/stdlib/source/lux/tool/compiler/meta/packager.lux b/stdlib/source/lux/tool/compiler/meta/packager.lux index 732ae18c0..f2737e168 100644 --- a/stdlib/source/lux/tool/compiler/meta/packager.lux +++ b/stdlib/source/lux/tool/compiler/meta/packager.lux @@ -8,7 +8,7 @@ [binary (#+ Binary)] [collection ["." row] - ["." list ("#@." functor)]]] + ["." list ("#\." functor)]]] [world ["." file (#+ Path)]]] [program @@ -33,10 +33,10 @@ (def: #export order (-> dependency.Order Order) - (list@map (function (_ [module [module-id [descriptor document]]]) + (list\map (function (_ [module [module-id [descriptor document]]]) (|> descriptor (get@ #descriptor.registry) artifact.artifacts row.to-list - (list@map (|>> (get@ #artifact.id))) + (list\map (|>> (get@ #artifact.id))) [module-id])))) diff --git a/stdlib/source/lux/tool/compiler/meta/packager/jvm.lux b/stdlib/source/lux/tool/compiler/meta/packager/jvm.lux index c807e5279..f5838cf80 100644 --- a/stdlib/source/lux/tool/compiler/meta/packager/jvm.lux +++ b/stdlib/source/lux/tool/compiler/meta/packager/jvm.lux @@ -18,7 +18,7 @@ ["n" nat]] [collection ["." row (#+ Row)] - ["." list ("#@." functor fold)]]] + ["." list ("#\." functor)]]] [target [jvm [encoding @@ -147,7 +147,7 @@ (get@ #descriptor.registry) artifact.artifacts row.to-list - (list@map (|>> (get@ #artifact.id))) + (list\map (|>> (get@ #artifact.id))) [module-id]))))) (:: monad wrap)) #let [buffer (java/io/ByteArrayOutputStream::new (.int ..mebi-byte)) diff --git a/stdlib/source/lux/tool/compiler/meta/packager/script.lux b/stdlib/source/lux/tool/compiler/meta/packager/script.lux index a80c28af1..b40873ace 100644 --- a/stdlib/source/lux/tool/compiler/meta/packager/script.lux +++ b/stdlib/source/lux/tool/compiler/meta/packager/script.lux @@ -14,7 +14,7 @@ ["." encoding]] [collection ["." row] - ["." list ("#@." functor)]]] + ["." list ("#\." functor)]]] [world ["." file (#+ File Directory)]]] [program @@ -76,12 +76,12 @@ [cache (!.use (:: file-system directory) [(get@ #static.target static)]) order (:: monad wrap (dependency.load-order $.key archive))] (|> order - (list@map (function (_ [module [module-id [descriptor document]]]) + (list\map (function (_ [module [module-id [descriptor document]]]) [module-id (|> descriptor (get@ #descriptor.registry) artifact.artifacts row.to-list - (list@map (|>> (get@ #artifact.id))))])) + (list\map (|>> (get@ #artifact.id))))])) (monad.fold ! (..write-module monad file-system static sequence) header) (:: ! map (|>> to-code encoding.to-utf8)))))) diff --git a/stdlib/source/lux/tool/compiler/phase.lux b/stdlib/source/lux/tool/compiler/phase.lux index 68d6a4848..312428ff7 100644 --- a/stdlib/source/lux/tool/compiler/phase.lux +++ b/stdlib/source/lux/tool/compiler/phase.lux @@ -4,7 +4,7 @@ [monad (#+ Monad do)]] [control ["." state] - ["." try (#+ Try) ("#@." functor)] + ["." try (#+ Try) ("#\." functor)] ["ex" exception (#+ Exception exception:)] ["." io] [parser @@ -77,7 +77,7 @@ (def: #export (lift error) (All [s a] (-> (Try a) (Operation s a))) (function (_ state) - (try@map (|>> [state]) error))) + (try\map (|>> [state]) error))) (syntax: #export (assert exception message test) (wrap (list (` (if (~ test) |