From 4433c9bcd6c6cac44c018aad2e21a5b4d7cc4896 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 29 Nov 2017 22:49:56 -0400 Subject: - Adapted main codebase to the latest syntatic changes. --- new-luxc/source/program.lux | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'new-luxc/source/program.lux') 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 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 + (All [a] (-> Text (T.Task a) (P.Promise a))) + (do P.Monad [?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)))) -- cgit v1.2.3