diff options
author | Eduardo Julian | 2017-11-29 22:49:56 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-11-29 22:49:56 -0400 |
commit | 4433c9bcd6c6cac44c018aad2e21a5b4d7cc4896 (patch) | |
tree | 0c166db6e01b41dfadd01801b5242967f2363b7d /new-luxc/source/program.lux | |
parent | 77c113a3455cdbc4bb485a94f67f392480cdcfbf (diff) |
- Adapted main codebase to the latest syntatic changes.
Diffstat (limited to 'new-luxc/source/program.lux')
-rw-r--r-- | new-luxc/source/program.lux | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/new-luxc/source/program.lux b/new-luxc/source/program.lux index 5708211fd..c36fb2114 100644 --- a/new-luxc/source/program.lux +++ b/new-luxc/source/program.lux @@ -1,4 +1,4 @@ -(;module: +(.module: lux (lux (control monad ["p" parser]) @@ -9,50 +9,50 @@ [io #- run] [cli #+ program: CLI]) (luxc [repl] - (lang [";L" translation]))) + (lang [".L" translation]))) ## (type: Compilation -## {#program &;Path -## #target &;Path}) +## {#program &.Path +## #target &.Path}) ## (def: (marker tokens) ## (-> (List Text) (CLI Unit)) -## (cli;after (cli;option tokens) +## (cli.after (cli.option tokens) ## (:: Monad<CLI> wrap []))) ## (def: (tagged tags) ## (-> (List Text) (CLI Text)) -## (cli;after (cli;option tags) -## cli;any)) +## (cli.after (cli.option tags) +## cli.any)) ## (def: compilation^ ## (CLI Compilation) -## ($_ cli;seq +## ($_ cli.seq ## (tagged (list "-p" "--program")) ## (tagged (list "-t" "--target")))) -## (program: ([command (cli;opt compilation^)] -## [sources (cli;some (tagged (list "-s" "--source")))]) +## (program: ([command (cli.opt compilation^)] +## [sources (cli.some (tagged (list "-s" "--source")))]) ## (case command -## #;None +## #.None ## (io (log! "No REPL for you!")) -## (#;Some [program target]) -## (exec (&compiler;compile-program program target sources) +## (#.Some [program target]) +## (exec (&compiler.compile-program program target sources) ## (io [])))) (def: (or-crash! failure-describer action) - (All [a] (-> Text (T;Task a) (P;Promise a))) - (do P;Monad<Promise> + (All [a] (-> Text (T.Task a) (P.Promise a))) + (do P.Monad<Promise> [?output action] (case ?output - (#e;Error error) + (#e.Error error) (exec (log! (format "\n" failure-describer "\n" error "\n")) ("lux io exit" 1)) - (#e;Success output) + (#e.Success output) (wrap output)))) |