aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/analyser/case
diff options
context:
space:
mode:
authorEduardo Julian2017-10-31 23:39:49 -0400
committerEduardo Julian2017-10-31 23:39:49 -0400
commit15121222d570f8fe3c5a326208e4f0bad737e63c (patch)
tree88c93ed1f4965fd0e80677df5553a0d47e521963 /new-luxc/source/luxc/analyser/case
parenta269ea72337852e8e57bd427773baed111ad6e92 (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
2 files changed, 13 insertions, 13 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