diff options
author | Eduardo Julian | 2021-08-25 16:47:50 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-08-25 16:47:50 -0400 |
commit | b216900093c905b3b20dd45c69e577b192e2f7a3 (patch) | |
tree | 4d6ac7d257752a8c54ca77dd58df9753ce357ab6 /stdlib/source/program/aedifex/input.lux | |
parent | 36303d6cb2ce3ab9e36d045b9516c997bd461862 (diff) |
Updates to the Lua compiler.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/input.lux | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/stdlib/source/program/aedifex/input.lux b/stdlib/source/program/aedifex/input.lux index 27591c709..43edc3404 100644 --- a/stdlib/source/program/aedifex/input.lux +++ b/stdlib/source/program/aedifex/input.lux @@ -1,8 +1,9 @@ (.module: [library - [lux #* + [lux (#- Name) [abstract - [monad (#+ Monad do)]] + ["." monad (#+ Monad do)] + ["." mix]] [control [pipe (#+ do>)] ["." try (#+ Try)] @@ -12,7 +13,9 @@ [binary (#+ Binary)] ["." text [encoding - ["." utf8]]]] + ["." utf8]]] + [collection + ["." list]]] [meta ["." location]] [tool @@ -23,7 +26,7 @@ [world ["." file]]]] ["." // #_ - [profile (#+ Profile)] + ["#." profile (#+ Name Profile)] ["#." project (#+ Project)] ["#." parser]]) @@ -46,11 +49,14 @@ [..lux_parser] [(list) (<code>.result //parser.project)]))) -(def: .public (read monad fs profile) - (All [!] (-> (Monad !) (file.System !) Text (! (Try Profile)))) +(def: .public (read monad fs profiles) + (All [!] (-> (Monad !) (file.System !) (List Name) (! (Try Profile)))) (|> //project.file (\ fs read) - (\ monad each (|>> (do> try.monad - [] - [..project_parser] - [(//project.profile profile)]))))) + (\ monad each + (function (_ it) + (do {! try.monad} + [it it + it (..project_parser it) + it (monad.each ! (//project.profile it) profiles)] + (in (mix.with_monoid //profile.monoid list.mix it))))))) |