aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/input.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-07-06 21:34:21 -0400
committerEduardo Julian2021-07-06 21:34:21 -0400
commit2b909032e7a0bd10cd7db52067d2fb701bfa95e5 (patch)
tree0e2aaef228f80f3336715327f7f34065c309de22 /stdlib/source/program/aedifex/input.lux
parent5cf4efa861075f8276f43a2516f5beacaf610b44 (diff)
Simplified the API for file-system operations.
Diffstat (limited to 'stdlib/source/program/aedifex/input.lux')
-rw-r--r--stdlib/source/program/aedifex/input.lux17
1 files changed, 7 insertions, 10 deletions
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)])))))