diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/program.lux | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/new-luxc/source/program.lux b/new-luxc/source/program.lux index 5e60c318a..bc5f65e5d 100644 --- a/new-luxc/source/program.lux +++ b/new-luxc/source/program.lux @@ -63,20 +63,19 @@ (#e.Success output) (wrap output)))) -(program: ([service ..service]) - (exec - (case service - (#Build [sources target program]) - (<| (or-crash! "Compilation failed:") - (promise.future - (do io.Monad<Process> - [#let [start (io.run instant.now)] - result (translationL.translate-program sources target program) - #let [end (io.run instant.now) - _ (log! (format "\n" "Elapsed time: " (%duration (instant.span start end))))]] - (wrap result)))) - - (#REPL [sources target]) - (<| (or-crash! "REPL failed:") - (repl.run sources target))) +(program: [{service ..service}] + (exec (case service + (#Build [sources target program]) + (<| (or-crash! "Compilation failed:") + (promise.future + (do io.Monad<Process> + [#let [start (io.run instant.now)] + result (translationL.translate-program sources target program) + #let [end (io.run instant.now) + _ (log! (format "\n" "Elapsed time: " (%duration (instant.span start end))))]] + (wrap result)))) + + (#REPL [sources target]) + (<| (or-crash! "REPL failed:") + (repl.run sources target))) (io []))) |