aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/language/compiler/analysis/inference.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/language/compiler/analysis/inference.lux')
-rw-r--r--stdlib/source/lux/language/compiler/analysis/inference.lux17
1 files changed, 8 insertions, 9 deletions
diff --git a/stdlib/source/lux/language/compiler/analysis/inference.lux b/stdlib/source/lux/language/compiler/analysis/inference.lux
index e068f073a..160978d39 100644
--- a/stdlib/source/lux/language/compiler/analysis/inference.lux
+++ b/stdlib/source/lux/language/compiler/analysis/inference.lux
@@ -9,10 +9,9 @@
format]
[collection
["." list ("list/." Functor<List>)]]]
- ["." macro]]
- [////
["." type
- ["tc" check]]]
+ ["." check]]
+ ["." macro]]
["." /// ("operation/." Monad<Operation>)
["." extension]]
[// (#+ Tag Analysis Operation Compiler)]
@@ -87,7 +86,7 @@
(Operation Type)
(do ///.Monad<Operation>
[cursor (extension.lift macro.cursor)
- [ex-id _] (//type.with-env tc.existential)]
+ [ex-id _] (//type.with-env check.existential)]
(wrap (named-type cursor ex-id))))
## Type-inference works by applying some (potentially quantified) type
@@ -112,23 +111,23 @@
(#.UnivQ _)
(do ///.Monad<Operation>
- [[var-id varT] (//type.with-env tc.var)]
+ [[var-id varT] (//type.with-env check.var)]
(general analyse (maybe.assume (type.apply (list varT) inferT)) args))
(#.ExQ _)
(do ///.Monad<Operation>
- [[var-id varT] (//type.with-env tc.var)
+ [[var-id varT] (//type.with-env check.var)
output (general analyse
(maybe.assume (type.apply (list varT) inferT))
args)
bound? (//type.with-env
- (tc.bound? var-id))
+ (check.bound? var-id))
_ (if bound?
(wrap [])
(do @
[newT new-named-type]
(//type.with-env
- (tc.check varT newT))))]
+ (check.check varT newT))))]
(wrap output))
(#.Apply inputT transT)
@@ -156,7 +155,7 @@
(#.Var infer-id)
(do ///.Monad<Operation>
- [?inferT' (//type.with-env (tc.read infer-id))]
+ [?inferT' (//type.with-env (check.read infer-id))]
(case ?inferT'
(#.Some inferT')
(general analyse inferT' args)