From 70005a6dee1eba3e3f5694aa4903e95988dcaa3d Mon Sep 17 00:00:00 2001
From: Eduardo Julian
Date: Mon, 13 Nov 2017 23:26:06 -0400
Subject: - Refactoring. - Now giving type checking/inference a higher
priority. - Better error messages.
---
new-luxc/source/luxc/lang/analysis/reference.lux | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
(limited to 'new-luxc/source/luxc/lang/analysis/reference.lux')
diff --git a/new-luxc/source/luxc/lang/analysis/reference.lux b/new-luxc/source/luxc/lang/analysis/reference.lux
index 5bc1f96c9..ef02919f4 100644
--- a/new-luxc/source/luxc/lang/analysis/reference.lux
+++ b/new-luxc/source/luxc/lang/analysis/reference.lux
@@ -14,9 +14,7 @@
(-> Ident (Meta Analysis))
(do meta;Monad
[actualT (meta;find-def-type def-name)
- expectedT meta;expected-type
- _ (&;with-type-env
- (tc;check expectedT actualT))]
+ _ (&;infer actualT)]
(wrap (code;symbol def-name))))
(def: (analyse-variable var-name)
@@ -26,9 +24,7 @@
(case ?var
(#;Some [actualT ref])
(do @
- [expectedT meta;expected-type
- _ (&;with-type-env
- (tc;check expectedT actualT))]
+ [_ (&;infer actualT)]
(wrap (#;Some (` ((~ (code;int (variableL;from-ref ref))))))))
#;None
@@ -41,8 +37,8 @@
(do meta;Monad
[?var (analyse-variable simple-name)]
(case ?var
- (#;Some analysis)
- (wrap analysis)
+ (#;Some varA)
+ (wrap varA)
#;None
(do @
--
cgit v1.2.3