aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/analysis/type.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-11-12 23:49:34 -0400
committerEduardo Julian2017-11-12 23:49:34 -0400
commitca297162d5416a8c7b8af5f27757900d82d3ad03 (patch)
treeec9e664f09d6c29d91e9ae6be5d3abb6ef0e7ca4 /new-luxc/source/luxc/lang/analysis/type.lux
parent63624fd6b7f9f2563898655472025020483d398f (diff)
- Fixed some bugs.
- Improved error reporting. - Optimized pattern-matching a bit.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/analysis/type.lux16
1 files changed, 8 insertions, 8 deletions
diff --git a/new-luxc/source/luxc/lang/analysis/type.lux b/new-luxc/source/luxc/lang/analysis/type.lux
index d0b038d93..74bb712f4 100644
--- a/new-luxc/source/luxc/lang/analysis/type.lux
+++ b/new-luxc/source/luxc/lang/analysis/type.lux
@@ -12,20 +12,20 @@
(def: #export (analyse-check analyse eval type value)
(-> &;Analyser &;Eval Code Code (Meta Analysis))
(do Monad<Meta>
- [actual (eval Type type)
- #let [actual (:! Type actual)]
- expected meta;expected-type
+ [actualT (eval Type type)
+ #let [actualT (:! Type actualT)]
+ expectedT meta;expected-type
_ (&;with-type-env
- (TC;check expected actual))]
- (&;with-expected-type actual
+ (TC;check expectedT actualT))]
+ (&;with-expected-type actualT
(analyse value))))
(def: #export (analyse-coerce analyse eval type value)
(-> &;Analyser &;Eval Code Code (Meta Analysis))
(do Monad<Meta>
- [actual (eval Type type)
- expected meta;expected-type
+ [actualT (eval Type type)
+ expectedT meta;expected-type
_ (&;with-type-env
- (TC;check expected (:! Type actual)))]
+ (TC;check expectedT (:! Type actualT)))]
(&;with-expected-type Top
(analyse value))))