From 2b909032e7a0bd10cd7db52067d2fb701bfa95e5 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 6 Jul 2021 21:34:21 -0400 Subject: Simplified the API for file-system operations. --- stdlib/source/program/aedifex/input.lux | 17 +++++++---------- 1 file changed, 7 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 2e7dbbab6..606fefdeb 100644 --- a/stdlib/source/program/aedifex/input.lux +++ b/stdlib/source/program/aedifex/input.lux @@ -22,8 +22,7 @@ [world ["." file]]] ["." // #_ - ["#" profile (#+ Profile)] - ["#." action (#+ Action)] + [profile (#+ Profile)] ["#." project (#+ Project)] ["#." parser]]) @@ -48,11 +47,9 @@ (def: #export (read monad fs profile) (All [!] (-> (Monad !) (file.System !) Text (! (Try Profile)))) - (do (try.with monad) - [project_file (\ fs file //project.file) - project_file (\ project_file content [])] - (\ monad wrap - (|> project_file - (do> try.monad - [..parse_project] - [(//project.profile profile)]))))) + (|> //project.file + (\ fs read) + (\ monad map (|>> (do> try.monad + [] + [..parse_project] + [(//project.profile profile)]))))) -- cgit v1.2.3