diff options
author | Eduardo Julian | 2017-10-31 23:39:49 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-10-31 23:39:49 -0400 |
commit | 15121222d570f8fe3c5a326208e4f0bad737e63c (patch) | |
tree | 88c93ed1f4965fd0e80677df5553a0d47e521963 /new-luxc/source/luxc/lang | |
parent | a269ea72337852e8e57bd427773baed111ad6e92 (diff) |
- Re-organized analysis.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/case.lux (renamed from new-luxc/source/luxc/analyser/case.lux) | 26 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/case/coverage.lux (renamed from new-luxc/source/luxc/analyser/case/coverage.lux) | 0 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/common.lux (renamed from new-luxc/source/luxc/analyser/common.lux) | 0 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/expression.lux (renamed from new-luxc/source/luxc/analyser.lux) | 46 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/function.lux (renamed from new-luxc/source/luxc/analyser/function.lux) | 6 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/inference.lux (renamed from new-luxc/source/luxc/analyser/inference.lux) | 4 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/primitive.lux (renamed from new-luxc/source/luxc/analyser/primitive.lux) | 0 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/procedure.lux (renamed from new-luxc/source/luxc/analyser/procedure.lux) | 0 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/procedure/common.lux (renamed from new-luxc/source/luxc/analyser/procedure/common.lux) | 10 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/procedure/host.jvm.lux (renamed from new-luxc/source/luxc/analyser/procedure/host.jvm.lux) | 6 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/reference.lux (renamed from new-luxc/source/luxc/analyser/reference.lux) | 0 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/structure.lux (renamed from new-luxc/source/luxc/analyser/structure.lux) | 8 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/type.lux (renamed from new-luxc/source/luxc/analyser/type.lux) | 0 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/parser.lux (renamed from new-luxc/source/luxc/parser.lux) | 0 |
14 files changed, 53 insertions, 53 deletions
diff --git a/new-luxc/source/luxc/analyser/case.lux b/new-luxc/source/luxc/lang/analysis/case.lux index 29256865a..1e40e38f1 100644 --- a/new-luxc/source/luxc/analyser/case.lux +++ b/new-luxc/source/luxc/lang/analysis/case.lux @@ -15,12 +15,12 @@ (meta [code] [type] (type ["tc" check]))) - (../.. ["&" base] - (lang ["la" analysis]) - ["&;" scope]) - (.. ["&;" common] - ["&;" structure]) - (. ["&&;" coverage])) + (luxc ["&" base] + (lang ["la" analysis] + (analysis [";A" common] + [";A" structure] + (case [";A" coverage]))) + ["&;" scope])) (exception: #export Cannot-Match-Type-With-Pattern) (exception: #export Sum-Type-Has-No-Case) @@ -175,8 +175,8 @@ [cursor (#;Record record)] (do meta;Monad<Meta> - [record (&structure;normalize record) - [members recordT] (&structure;order record) + [record (structureA;normalize record) + [members recordT] (structureA;order record) _ (&;with-type-env (tc;check inputT recordT))] (analyse-pattern (#;Some (list;size members)) inputT [cursor (#;Tuple members)] next)) @@ -240,18 +240,18 @@ (#;Cons [patternH bodyH] branchesT) (do meta;Monad<Meta> - [[inputT inputA] (&common;with-unknown-type + [[inputT inputA] (commonA;with-unknown-type (analyse inputC)) outputH (analyse-pattern #;None inputT patternH (analyse bodyH)) outputT (monad;map @ (function [[patternT bodyT]] (analyse-pattern #;None inputT patternT (analyse bodyT))) branchesT) - outputHC (|> outputH product;left &&coverage;determine) - outputTC (monad;map @ (|>. product;left &&coverage;determine) outputT) - _ (case (monad;fold e;Monad<Error> &&coverage;merge outputHC outputTC) + outputHC (|> outputH product;left coverageA;determine) + outputTC (monad;map @ (|>. product;left coverageA;determine) outputT) + _ (case (monad;fold e;Monad<Error> coverageA;merge outputHC outputTC) (#e;Success coverage) - (if (&&coverage;exhaustive? coverage) + (if (coverageA;exhaustive? coverage) (wrap []) (&;fail "Pattern-matching is not exhaustive.")) diff --git a/new-luxc/source/luxc/analyser/case/coverage.lux b/new-luxc/source/luxc/lang/analysis/case/coverage.lux index 554aea1a8..554aea1a8 100644 --- a/new-luxc/source/luxc/analyser/case/coverage.lux +++ b/new-luxc/source/luxc/lang/analysis/case/coverage.lux diff --git a/new-luxc/source/luxc/analyser/common.lux b/new-luxc/source/luxc/lang/analysis/common.lux index 4cbf5aedf..4cbf5aedf 100644 --- a/new-luxc/source/luxc/analyser/common.lux +++ b/new-luxc/source/luxc/lang/analysis/common.lux diff --git a/new-luxc/source/luxc/analyser.lux b/new-luxc/source/luxc/lang/analysis/expression.lux index a7b872de5..e3a623089 100644 --- a/new-luxc/source/luxc/analyser.lux +++ b/new-luxc/source/luxc/lang/analysis/expression.lux @@ -14,12 +14,12 @@ (lang ["la" analysis]) ["&;" module] (generator [";G" common])) - (. ["&&;" common] - ["&&;" function] - ["&&;" primitive] - ["&&;" reference] - ["&&;" structure] - ["&&;" procedure])) + (.. [";A" common] + [";A" function] + [";A" primitive] + [";A" reference] + [";A" structure] + [";A" procedure])) (for {"JVM" (as-is (host;import java.lang.reflect.Method (invoke [Object (Array Object)] #try Object)) @@ -67,31 +67,31 @@ (^template [<tag> <analyser>] (<tag> value) (<analyser> value)) - ([#;Bool &&primitive;analyse-bool] - [#;Nat &&primitive;analyse-nat] - [#;Int &&primitive;analyse-int] - [#;Deg &&primitive;analyse-deg] - [#;Frac &&primitive;analyse-frac] - [#;Text &&primitive;analyse-text]) + ([#;Bool primitiveA;analyse-bool] + [#;Nat primitiveA;analyse-nat] + [#;Int primitiveA;analyse-int] + [#;Deg primitiveA;analyse-deg] + [#;Frac primitiveA;analyse-frac] + [#;Text primitiveA;analyse-text]) (^ (#;Tuple (list))) - &&primitive;analyse-unit + primitiveA;analyse-unit ## Singleton tuples are equivalent to the element they contain. (^ (#;Tuple (list singleton))) (analyse singleton) (^ (#;Tuple elems)) - (&&structure;analyse-product analyse elems) + (structureA;analyse-product analyse elems) (^ (#;Record pairs)) - (&&structure;analyse-record analyse pairs) + (structureA;analyse-record analyse pairs) (#;Symbol reference) - (&&reference;analyse-reference reference) + (referenceA;analyse-reference reference) (^ (#;Form (list& [_ (#;Text proc-name)] proc-args))) - (&&procedure;analyse-procedure analyse eval proc-name proc-args) + (procedureA;analyse-procedure analyse eval proc-name proc-args) (^template [<tag> <analyser>] (^ (#;Form (list& [_ (<tag> tag)] @@ -102,15 +102,15 @@ _ (<analyser> analyse tag (` [(~@ values)])))) - ([#;Nat &&structure;analyse-sum] - [#;Tag &&structure;analyse-tagged-sum]) + ([#;Nat structureA;analyse-sum] + [#;Tag structureA;analyse-tagged-sum]) (#;Tag tag) - (&&structure;analyse-tagged-sum analyse tag (' [])) + (structureA;analyse-tagged-sum analyse tag (' [])) (^ (#;Form (list& func args))) (do meta;Monad<Meta> - [[funcT =func] (&&common;with-unknown-type + [[funcT =func] (commonA;with-unknown-type (analyse func))] (case =func [_ (#;Symbol def-name)] @@ -131,10 +131,10 @@ _ (&;throw Macro-Expression-Must-Have-Single-Expansion (%code ast)))) - (&&function;analyse-apply analyse funcT =func args))) + (functionA;analyse-apply analyse funcT =func args))) _ - (&&function;analyse-apply analyse funcT =func args))) + (functionA;analyse-apply analyse funcT =func args))) _ (&;throw Unrecognized-Syntax (%code ast)) diff --git a/new-luxc/source/luxc/analyser/function.lux b/new-luxc/source/luxc/lang/analysis/function.lux index 3d2da6326..627fb7c0a 100644 --- a/new-luxc/source/luxc/analyser/function.lux +++ b/new-luxc/source/luxc/lang/analysis/function.lux @@ -12,10 +12,10 @@ (type ["tc" check]))) (luxc ["&" base] (lang ["la" analysis #+ Analysis] + (analysis ["&;" common] + ["&;" inference]) [";L" variable #+ Variable]) - ["&;" scope] - (analyser ["&;" common] - ["&;" inference]))) + ["&;" scope])) (exception: #export Invalid-Function-Type) (exception: #export Cannot-Apply-Function) diff --git a/new-luxc/source/luxc/analyser/inference.lux b/new-luxc/source/luxc/lang/analysis/inference.lux index 049abec28..cd484a623 100644 --- a/new-luxc/source/luxc/analyser/inference.lux +++ b/new-luxc/source/luxc/lang/analysis/inference.lux @@ -10,8 +10,8 @@ (meta [type] (type ["tc" check]))) (luxc ["&" base] - (lang ["la" analysis #+ Analysis]) - (analyser ["&;" common]))) + (lang ["la" analysis #+ Analysis] + (analysis ["&;" common])))) (exception: #export Cannot-Infer) (exception: #export Cannot-Infer-Argument) diff --git a/new-luxc/source/luxc/analyser/primitive.lux b/new-luxc/source/luxc/lang/analysis/primitive.lux index c7f7243fd..c7f7243fd 100644 --- a/new-luxc/source/luxc/analyser/primitive.lux +++ b/new-luxc/source/luxc/lang/analysis/primitive.lux diff --git a/new-luxc/source/luxc/analyser/procedure.lux b/new-luxc/source/luxc/lang/analysis/procedure.lux index 225fb7b23..225fb7b23 100644 --- a/new-luxc/source/luxc/analyser/procedure.lux +++ b/new-luxc/source/luxc/lang/analysis/procedure.lux diff --git a/new-luxc/source/luxc/analyser/procedure/common.lux b/new-luxc/source/luxc/lang/analysis/procedure/common.lux index 0fad41958..e06a3d2b4 100644 --- a/new-luxc/source/luxc/analyser/procedure/common.lux +++ b/new-luxc/source/luxc/lang/analysis/procedure/common.lux @@ -12,11 +12,11 @@ (type ["tc" check])) [io]) (luxc ["&" base] - (lang ["la" analysis]) - (analyser ["&;" common] - [";A" function] - [";A" case] - [";A" type]))) + (lang ["la" analysis] + (analysis ["&;" common] + [";A" function] + [";A" case] + [";A" type])))) ## [Utils] (type: #export Proc diff --git a/new-luxc/source/luxc/analyser/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/analysis/procedure/host.jvm.lux index 015379a1b..3ba7713ac 100644 --- a/new-luxc/source/luxc/analyser/procedure/host.jvm.lux +++ b/new-luxc/source/luxc/lang/analysis/procedure/host.jvm.lux @@ -22,9 +22,9 @@ [host]) (luxc ["&" base] ["&;" host] - (lang ["la" analysis]) - (analyser ["&;" common] - ["&;" inference])) + (lang ["la" analysis] + (analysis ["&;" common] + ["&;" inference]))) ["@" ../common] ) diff --git a/new-luxc/source/luxc/analyser/reference.lux b/new-luxc/source/luxc/lang/analysis/reference.lux index 5bc1f96c9..5bc1f96c9 100644 --- a/new-luxc/source/luxc/analyser/reference.lux +++ b/new-luxc/source/luxc/lang/analysis/reference.lux diff --git a/new-luxc/source/luxc/analyser/structure.lux b/new-luxc/source/luxc/lang/analysis/structure.lux index d523065ea..0284245e1 100644 --- a/new-luxc/source/luxc/analyser/structure.lux +++ b/new-luxc/source/luxc/lang/analysis/structure.lux @@ -18,11 +18,11 @@ [type] (type ["tc" check]))) (luxc ["&" base] - (lang ["la" analysis]) + (lang ["la" analysis] + (analysis ["&;" common] + ["&;" inference])) ["&;" module] - ["&;" scope] - (analyser ["&;" common] - ["&;" inference]))) + ["&;" scope])) (exception: #export Not-Variant-Type) (exception: #export Not-Tuple-Type) diff --git a/new-luxc/source/luxc/analyser/type.lux b/new-luxc/source/luxc/lang/analysis/type.lux index d0b038d93..d0b038d93 100644 --- a/new-luxc/source/luxc/analyser/type.lux +++ b/new-luxc/source/luxc/lang/analysis/type.lux diff --git a/new-luxc/source/luxc/parser.lux b/new-luxc/source/luxc/lang/parser.lux index 93800c1b7..93800c1b7 100644 --- a/new-luxc/source/luxc/parser.lux +++ b/new-luxc/source/luxc/lang/parser.lux |