diff options
author | Eduardo Julian | 2020-12-03 02:09:57 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-12-03 02:09:57 -0400 |
commit | 0205e5146b50ab066d152fccda0fc8cef4eef852 (patch) | |
tree | da2d89132da8f09344e26db78d0e43ca1095ee7f /stdlib/source/lux/tool | |
parent | 28c724857d76afdc40b5b036f415cc151eb66263 (diff) |
Detect duplicate files coming from dependencies.
Diffstat (limited to 'stdlib/source/lux/tool')
7 files changed, 19 insertions, 19 deletions
diff --git a/stdlib/source/lux/tool/compiler/default/init.lux b/stdlib/source/lux/tool/compiler/default/init.lux index 43614dce3..bc089eeaa 100644 --- a/stdlib/source/lux/tool/compiler/default/init.lux +++ b/stdlib/source/lux/tool/compiler/default/init.lux @@ -5,7 +5,7 @@ ["." monad (#+ do)]] [control ["." try (#+ Try)] - ["ex" exception (#+ exception:)]] + ["." exception (#+ exception:)]] [data [binary (#+ Binary)] ["." product] @@ -27,17 +27,17 @@ [program (#+ Program)] ["#." version] ["#." syntax (#+ Aliases)] - ["#." analysis - [macro (#+ Expander)] - ["#/." evaluation]] ["#." synthesis] ["#." directive (#+ Requirements)] ["#." generation] + ["#." analysis + [macro (#+ Expander)] + ["#/." evaluation]] [phase - [".P" analysis - ["." module]] [".P" synthesis] [".P" directive] + [".P" analysis + ["." module]] ["." extension (#+ Extender) [".E" analysis] [".E" synthesis] @@ -201,9 +201,9 @@ (#try.Success [state (#.Some source&requirements&buffer)]) (#try.Failure error) - (if (ex.match? ///syntax.end-of-file error) + (if (exception.match? ///syntax.end-of-file error) (#try.Success [state #.None]) - (ex.with ///.cannot-compile module (#try.Failure error))))))) + (exception.with ///.cannot-compile module (#try.Failure error))))))) (def: (default-dependencies prelude input) (-> Module ///.Input (List Module)) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis.lux index 3d71e7c51..482ae99bb 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis.lux @@ -3,7 +3,7 @@ [abstract [monad (#+ do)]] [control - ["ex" exception (#+ exception:)]] + ["." exception (#+ exception:)]] [data [text ["%" format (#+ format)]]] @@ -28,7 +28,7 @@ [archive (#+ Archive)]]]]]]) (exception: #export (unrecognized-syntax {code Code}) - (ex.report ["Code" (%.code code)])) + (exception.report ["Code" (%.code code)])) ## TODO: Had to split the 'compile' function due to compilation issues ## with old-luxc. Must re-combine all the code ASAP diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/structure.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/structure.lux index a306b178b..49ba590f1 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/structure.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/analysis/structure.lux @@ -320,7 +320,7 @@ [key (///extension.lift (meta.normalize key))] (case (dictionary.get key tag->idx) (#.Some idx) - (if (dictionary.contains? idx idx->val) + (if (dictionary.key? idx->val idx) (/.throw ..cannot-repeat-tag [key record]) (wrap (dictionary.put idx val idx->val))) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux index c6899c4e8..19cb9b946 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/extension/analysis/jvm.lux @@ -513,7 +513,7 @@ (-> .Type (Operation External)) (do {! phase.monad} [name (\ ! map ..reflection (check-jvm objectT))] - (if (dictionary.contains? name ..boxes) + (if (dictionary.key? ..boxes name) (/////analysis.throw ..primitives-are-not-objects [name]) (phase\wrap name)))) @@ -891,9 +891,9 @@ ## else (do ! [_ (phase.assert ..primitives-are-not-objects [from-name] - (not (dictionary.contains? from-name ..boxes))) + (not (dictionary.key? ..boxes from-name))) _ (phase.assert ..primitives-are-not-objects [to-name] - (not (dictionary.contains? to-name ..boxes))) + (not (dictionary.key? ..boxes to-name))) to-class (phase.lift (reflection!.load to-name)) _ (if (text\= ..inheritance-relationship-type-name from-name) (wrap []) diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux index c87f00333..96c39d8cb 100644 --- a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/host.lux @@ -124,7 +124,8 @@ (-> Library java/lang/ClassLoader Text Definition (Try Any)) (io.run (do (try.with io.monad) [existing-class? (|> (atom.read library) - (\ io.monad map (dictionary.contains? class-name)) + (\ io.monad map (function (_ library) + (dictionary.key? library class-name))) (try.lift io.monad) (: (IO (Try Bit)))) _ (if existing-class? diff --git a/stdlib/source/lux/tool/compiler/meta/cache/dependency.lux b/stdlib/source/lux/tool/compiler/meta/cache/dependency.lux index 55bde3869..345b46c14 100644 --- a/stdlib/source/lux/tool/compiler/meta/cache/dependency.lux +++ b/stdlib/source/lux/tool/compiler/meta/cache/dependency.lux @@ -64,7 +64,7 @@ (wrap (list\fold set.union parents ancestors))))) ancestry (memo.open memo)] (list\fold (function (_ module memory) - (if (dictionary.contains? module memory) + (if (dictionary.key? memory module) memory (let [[memory _] (ancestry [memory module])] memory))) diff --git a/stdlib/source/lux/tool/compiler/meta/io/archive.lux b/stdlib/source/lux/tool/compiler/meta/io/archive.lux index e2c046449..91fbe9cb4 100644 --- a/stdlib/source/lux/tool/compiler/meta/io/archive.lux +++ b/stdlib/source/lux/tool/compiler/meta/io/archive.lux @@ -371,8 +371,7 @@ Purge) (list\fold (function (_ [module-name [module-id [descriptor document]]] purge) (let [purged? (: (Predicate Module) - (function (_ module) - (dictionary.contains? module purge)))] + (dictionary.key? purge))] (if (purged? module-name) purge (if (|> descriptor @@ -417,7 +416,7 @@ (monad.map ! (..purge! system static))) loaded-caches (|> load-order (list.filter (function (_ [module-name [module-id [descriptor document]]]) - (not (dictionary.contains? module-name purge)))) + (not (dictionary.key? purge module-name)))) (monad.map ! (function (_ [module-name [module-id descriptor,document]]) (do ! [[descriptor,document bundles] (..load-definitions system static module-id host-environment descriptor,document)] |