diff options
author | Eduardo Julian | 2018-05-10 00:04:20 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-05-10 00:04:20 -0400 |
commit | 022ada35548ef5e0e3b9614f9bb96de9d2137ced (patch) | |
tree | 3e60f4dde470dbaf0c63292945aa2dda2685f881 /luxc/src | |
parent | 66def99fde5bc0f19138a0bacd1ea41ad979ab17 (diff) |
- Re-named "Compiler" type to "Lux".
Diffstat (limited to '')
-rw-r--r-- | luxc/src/lux/analyser/lux.clj | 2 | ||||
-rw-r--r-- | luxc/src/lux/base.clj | 28 | ||||
-rw-r--r-- | luxc/src/lux/compiler/cache.clj | 4 |
3 files changed, 16 insertions, 18 deletions
diff --git a/luxc/src/lux/analyser/lux.clj b/luxc/src/lux/analyser/lux.clj index 7debbde45..639d71cb6 100644 --- a/luxc/src/lux/analyser/lux.clj +++ b/luxc/src/lux/analyser/lux.clj @@ -596,7 +596,7 @@ old new)) (defn ^:private merge-compilers - "(-> Text Compiler Compiler Compiler)" + "(-> Text Lux Lux Lux)" [current-module new old] (->> old (&/set$ &/$modules (merge-modules current-module diff --git a/luxc/src/lux/base.clj b/luxc/src/lux/base.clj index 25c331b94..8867d0b1e 100644 --- a/luxc/src/lux/base.clj +++ b/luxc/src/lux/base.clj @@ -129,7 +129,6 @@ "dummy-mappings" ]) -;; Compiler (defvariant ("Build" 0) ("Eval" 0) @@ -159,7 +158,6 @@ "extensions" "host"]) -;; Compiler (defvariant ("UpperBound" 0) ("LowerBound" 0)) @@ -785,7 +783,7 @@ (with-jvm-host-slot $writer (fn [_] ($Some writer)) body)) (defn with-type-env - "(All [a] (-> TypeEnv (Lux a) (Lux a)))" + "(All [a] (-> TypeEnv (Meta a) (Meta a)))" [type-env body] (with-jvm-host-slot $type-env (partial |++ type-env) body)) @@ -928,7 +926,7 @@ (return* state module-name)))) (defn find-module - "(-> Text (Lux (Module Compiler)))" + "(-> Text (Meta (Module Lux)))" [name] (fn [state] (if-let [module (|get name (get$ $modules state))] @@ -936,7 +934,7 @@ ((fail-with-loc (str "[Error] Unknown module: " name)) state)))) -(def ^{:doc "(Lux (Module Compiler))"} +(def ^{:doc "(Meta (Module Lux))"} get-current-module (|do [module-name get-module-name] (find-module module-name))) @@ -1014,7 +1012,7 @@ output))))) (defn with-expected-type - "(All [a] (-> Type (Lux a)))" + "(All [a] (-> Type (Meta a)))" [type body] (fn [state] (let [output (body (set$ $expected ($Some type) state))] @@ -1027,7 +1025,7 @@ output)))) (defn with-cursor - "(All [a] (-> Cursor (Lux a)))" + "(All [a] (-> Cursor (Meta a)))" [^objects cursor body] (|let [[_file-name _ _] cursor] (if (= "" _file-name) @@ -1043,7 +1041,7 @@ output)))))) (defn with-analysis-meta - "(All [a] (-> Cursor Type (Lux a)))" + "(All [a] (-> Cursor Type (Meta a)))" [^objects cursor type body] (|let [[_file-name _ _] cursor] (if (= "" _file-name) @@ -1072,7 +1070,7 @@ _ output)))))) -(def ^{:doc "(Lux Top)"} +(def ^{:doc "(Meta Top)"} ensure-statement (fn [state] (|case (get$ $expected state) @@ -1084,7 +1082,7 @@ state)))) (def cursor - ;; (Lux Cursor) + ;; (Meta Cursor) (fn [state] (return* state (get$ $cursor state)))) @@ -1321,13 +1319,13 @@ [xs] (enumerate* 0 xs)) -(def ^{:doc "(Lux (List Text))"} +(def ^{:doc "(Meta (List Text))"} modules (fn [state] (return* state (|keys (get$ $modules state))))) (defn when% - "(-> Bool (Lux Top) (Lux Top))" + "(-> Bool (Meta Top) (Meta Top))" [test body] (if test body @@ -1351,7 +1349,7 @@ $None)) (defn normalize - "(-> Ident (Lux Ident))" + "(-> Ident (Meta Ident))" [ident] (|case ident ["" name] (|do [module get-module-name] @@ -1392,14 +1390,14 @@ |any? false or) (defn m-comp - "(All [a b c] (-> (-> b (Lux c)) (-> a (Lux b)) (-> a (Lux c))))" + "(All [a b c] (-> (-> b (Meta c)) (-> a (Meta b)) (-> a (Meta c))))" [f g] (fn [x] (|do [y (g x)] (f y)))) (defn with-attempt - "(All [a] (-> (Lux a) (-> Text (Lux a)) (Lux a)))" + "(All [a] (-> (Meta a) (-> Text (Meta a)) (Meta a)))" [m-value on-error] (fn [state] (|case (m-value state) diff --git a/luxc/src/lux/compiler/cache.clj b/luxc/src/lux/compiler/cache.clj index a0b2b0588..04ef34e52 100644 --- a/luxc/src/lux/compiler/cache.clj +++ b/luxc/src/lux/compiler/cache.clj @@ -49,7 +49,7 @@ (list* module))) (defn clean [state] - "(-> Compiler Null)" + "(-> Lux Null)" (let [needed-modules (->> state (&/get$ &/$modules) &/|keys &/->seq set) output-dir-prefix (str (.getAbsolutePath (new File ^String @&&core/!output-dir)) java.io.File/separator) outdated? #(->> % (contains? needed-modules) not) @@ -229,7 +229,7 @@ (return nil))) (defn ^:private inject-module - "(-> Module Compiler (Lux Null))" + "(-> Module Lux (Lux Null))" [module-name module] (fn [compiler] (return* (&/update$ &/$modules |