aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Julian2017-05-04 20:50:50 -0400
committerEduardo Julian2017-05-04 20:50:50 -0400
commit5d401a09eeded0f3ecd9fb1ed3acdee30f99e197 (patch)
tree871f647d5319539d13573d47eedb099a7c5c631c
parent63143bdb893f1465fe980f262782fbd5ad16b60a (diff)
- Removed the "Debug" compiler mode.
Diffstat (limited to '')
-rw-r--r--luxc/src/lux.clj5
-rw-r--r--luxc/src/lux/base.clj5
-rw-r--r--new-luxc/source/luxc/base.lux5
-rw-r--r--new-luxc/source/luxc/compiler.lux6
-rw-r--r--new-luxc/source/program.lux14
-rw-r--r--stdlib/source/lux.lux22
6 files changed, 21 insertions, 36 deletions
diff --git a/luxc/src/lux.clj b/luxc/src/lux.clj
index 3ca520576..fc39b7b3b 100644
--- a/luxc/src/lux.clj
+++ b/luxc/src/lux.clj
@@ -20,10 +20,7 @@
(defn -main [& args]
(|case (&/->list args)
(&/$Cons "release" (&/$Cons platform (&/$Cons program-module (&/$Cons resources-dirs (&/$Cons source-dirs (&/$Cons target-dir (&/$Nil)))))))
- (time (&compiler/compile-program platform &/$Release program-module (separate-paths resources-dirs) (separate-paths source-dirs) target-dir))
-
- (&/$Cons "debug" (&/$Cons platform (&/$Cons program-module (&/$Cons resources-dirs (&/$Cons source-dirs (&/$Cons target-dir (&/$Nil)))))))
- (time (&compiler/compile-program platform &/$Debug program-module (separate-paths resources-dirs) (separate-paths source-dirs) target-dir))
+ (time (&compiler/compile-program platform &/$Build program-module (separate-paths resources-dirs) (separate-paths source-dirs) target-dir))
(&/$Cons "repl" (&/$Cons resources-dirs (&/$Cons source-dirs (&/$Cons target-dir (&/$Nil)))))
(&repl/repl (separate-paths resources-dirs)
diff --git a/luxc/src/lux/base.clj b/luxc/src/lux/base.clj
index 7e36ca903..98b6ce4e8 100644
--- a/luxc/src/lux/base.clj
+++ b/luxc/src/lux/base.clj
@@ -134,8 +134,7 @@
;; Compiler
(defvariant
- ("Release" 0)
- ("Debug" 0)
+ ("Build" 0)
("Eval" 0)
("REPL" 0))
@@ -1006,7 +1005,7 @@
(|do [_mode get-mode]
(fn [state]
(let [output (body (if (in-repl? _mode)
- (update$ $info #(set$ $compiler-mode $Debug %) state)
+ (update$ $info #(set$ $compiler-mode $Build %) state)
state))]
(|case output
($Right state* datum)
diff --git a/new-luxc/source/luxc/base.lux b/new-luxc/source/luxc/base.lux
index 8660d7ccf..bc05afea4 100644
--- a/new-luxc/source/luxc/base.lux
+++ b/new-luxc/source/luxc/base.lux
@@ -10,8 +10,9 @@
(type: #export Path Text)
(type: #export Mode
- #Release
- #Debug)
+ #Build
+ #Eval
+ #REPL)
(def: #export (fail message)
(All [a] (-> Text (Lux a)))
diff --git a/new-luxc/source/luxc/compiler.lux b/new-luxc/source/luxc/compiler.lux
index 12966ba00..67a9928fd 100644
--- a/new-luxc/source/luxc/compiler.lux
+++ b/new-luxc/source/luxc/compiler.lux
@@ -118,7 +118,7 @@
(def: init-compiler-info
Compiler-Info
{#;compiler-version compiler-version
- #;compiler-mode #;Release})
+ #;compiler-mode #;Build})
(def: (init-compiler host)
(-> Host Compiler)
@@ -144,8 +144,8 @@
(#E;Success output)
(wrap output))))
-(def: #export (compile-program mode program target sources)
- (-> &;Mode &;Path &;Path (List &;Path) (P;Promise Unit))
+(def: #export (compile-program program target sources)
+ (-> &;Path &;Path (List &;Path) (P;Promise Unit))
(do P;Monad<Promise>
[#let [compiler (init-compiler init-host)]
_ (or-crash! (&&runtime;compile-runtime []))
diff --git a/new-luxc/source/program.lux b/new-luxc/source/program.lux
index e7fa95c2d..ecf5cdd6f 100644
--- a/new-luxc/source/program.lux
+++ b/new-luxc/source/program.lux
@@ -10,8 +10,7 @@
))
(type: Compilation
- {#mode &;Mode
- #program &;Path
+ {#program &;Path
#target &;Path})
(def: (marker tokens)
@@ -24,16 +23,9 @@
(cli;after (cli;option tags)
cli;any))
-(def: mode^
- (CLI &;Mode)
- ($_ cli;alt
- (marker (list "release"))
- (marker (list "debug"))))
-
(def: compilation^
(CLI Compilation)
($_ cli;seq
- mode^
(tagged (list "-p" "--program"))
(tagged (list "-t" "--target"))))
@@ -43,6 +35,6 @@
#;None
(io (log! "No REPL for you!"))
- (#;Some [mode program target])
- (exec (&compiler;compile-program mode program target sources)
+ (#;Some [program target])
+ (exec (&compiler;compile-program program target sources)
(io []))))
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux
index b49d831b0..9de477162 100644
--- a/stdlib/source/lux.lux
+++ b/stdlib/source/lux.lux
@@ -580,25 +580,21 @@
default-def-meta-exported))
## (type: Compiler-Mode
-## #Release
-## #Debug
+## #Build
## #Eval
## #REPL)
(_lux_def Compiler-Mode
(#NamedT ["lux" "Compiler-Mode"]
- (#SumT ## "lux;Release"
+ (#SumT ## Build
#UnitT
- (#SumT ## "lux;Debug"
+ (#SumT ## Eval
#UnitT
- (#SumT ## "lux;Eval"
- #UnitT
- ## "lux;REPL"
- #UnitT))))
- (#Cons [["lux" "tags"] (#ListA (#Cons (#TextA "Release")
- (#Cons (#TextA "Debug")
- (#Cons (#TextA "Eval")
- (#Cons (#TextA "REPL")
- #Nil)))))]
+ ## REPL
+ #UnitT)))
+ (#Cons [["lux" "tags"] (#ListA (#Cons (#TextA "Build")
+ (#Cons (#TextA "Eval")
+ (#Cons (#TextA "REPL")
+ #Nil))))]
(#Cons [["lux" "doc"] (#TextA "A sign that shows the conditions under which the compiler is running.")]
default-def-meta-exported)))