diff options
author | Eduardo Julian | 2021-08-23 02:30:53 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-08-23 02:30:53 -0400 |
commit | ec1f31b5a1492d5e0ab260397291d4449483bbd9 (patch) | |
tree | c730b4ca89af366779b0ad0f46fae705b5c2bcbc /stdlib/source/library/lux/type/implicit.lux | |
parent | 1ea83ecadccc5adee1bdb35bd11527c3982c015e (diff) |
The Python compiler can now be compiled by the new JVM compiler.
Diffstat (limited to 'stdlib/source/library/lux/type/implicit.lux')
-rw-r--r-- | stdlib/source/library/lux/type/implicit.lux | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/stdlib/source/library/lux/type/implicit.lux b/stdlib/source/library/lux/type/implicit.lux index cc54a82a1..8af389efc 100644 --- a/stdlib/source/library/lux/type/implicit.lux +++ b/stdlib/source/library/lux/type/implicit.lux @@ -14,7 +14,7 @@ ["." text ("#\." equivalence) ["%" format (#+ format)]] [collection - ["." list ("#\." monad fold)] + ["." list ("#\." monad mix)] ["." dictionary (#+ Dictionary)]]] ["." macro ["." code] @@ -119,24 +119,24 @@ (def: (available_definitions source_module target_module constants aggregate) (-> Text Text (List [Text Definition]) (-> (List [Name Type]) (List [Name Type]))) - (list\fold (function (_ [name [exported? def_type def_anns def_value]] aggregate) - (if (and (annotation.implementation? def_anns) - (or (text\= target_module source_module) - exported?)) - (#.Item [[source_module name] def_type] aggregate) - aggregate)) - aggregate - constants)) + (list\mix (function (_ [name [exported? def_type def_anns def_value]] aggregate) + (if (and (annotation.implementation? def_anns) + (or (text\= target_module source_module) + exported?)) + (#.Item [[source_module name] def_type] aggregate) + aggregate)) + aggregate + constants)) (def: local_env (Meta (List [Name Type])) (do meta.monad [local_batches meta.locals - .let [total_locals (list\fold (function (_ [name type] table) - (try.else table (dictionary.has' name type table))) - (: (Dictionary Text Type) - (dictionary.empty text.hash)) - (list\join local_batches))]] + .let [total_locals (list\mix (function (_ [name type] table) + (try.else table (dictionary.has' name type table))) + (: (Dictionary Text Type) + (dictionary.empty text.hash)) + (list\join local_batches))]] (in (|> total_locals dictionary.entries (list\map (function (_ [name type]) [["" name] type])))))) @@ -154,10 +154,10 @@ [this_module_name meta.current_module_name imported_modules (meta.imported_modules this_module_name) accessible_definitions (monad.map ! meta.definitions imported_modules)] - (in (list\fold (function (_ [imported_module definitions] tail) - (available_definitions imported_module this_module_name definitions tail)) - #.End - (list.zipped/2 imported_modules accessible_definitions))))) + (in (list\mix (function (_ [imported_module definitions] tail) + (available_definitions imported_module this_module_name definitions tail)) + #.End + (list.zipped/2 imported_modules accessible_definitions))))) (def: (on_argument arg func) (-> Type Type (Check Type)) @@ -197,7 +197,7 @@ (def: (ensure_function_application! member_type input_types expected_output) (-> Type (List Type) Type (Check [])) (do check.monad - [actual_output (monad.fold check.monad ..on_argument member_type input_types)] + [actual_output (monad.mix check.monad ..on_argument member_type input_types)] (check.check expected_output actual_output))) (type: #rec Instance |