From b216900093c905b3b20dd45c69e577b192e2f7a3 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 25 Aug 2021 16:47:50 -0400 Subject: Updates to the Lua compiler. --- stdlib/source/program/aedifex/input.lux | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'stdlib/source/program/aedifex/input.lux') 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) (.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))))))) -- cgit v1.2.3