aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/analysis/structure.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-11-13 20:02:18 -0400
committerEduardo Julian2017-11-13 20:02:18 -0400
commit2a3946e713821880ecc47580e754315349f2fe73 (patch)
tree7c32a522dff9d09293a5265baa968bc04137c944 /new-luxc/source/luxc/lang/analysis/structure.lux
parentca297162d5416a8c7b8af5f27757900d82d3ad03 (diff)
- Type-vars no longer get deleted.
- Fixed some bugs.
Diffstat (limited to 'new-luxc/source/luxc/lang/analysis/structure.lux')
-rw-r--r--new-luxc/source/luxc/lang/analysis/structure.lux18
1 files changed, 7 insertions, 11 deletions
diff --git a/new-luxc/source/luxc/lang/analysis/structure.lux b/new-luxc/source/luxc/lang/analysis/structure.lux
index 5cac1a0d3..9308fcfef 100644
--- a/new-luxc/source/luxc/lang/analysis/structure.lux
+++ b/new-luxc/source/luxc/lang/analysis/structure.lux
@@ -64,9 +64,9 @@
(#;Var id)
(do @
- [bound? (&;with-type-env
- (tc;bound? id))]
- (if bound?
+ [concrete? (&;with-type-env
+ (tc;concrete? id))]
+ (if concrete?
(do @
[expectedT' (&;with-type-env
(tc;read id))]
@@ -171,9 +171,9 @@
(#;Var id)
(do @
- [bound? (&;with-type-env
- (tc;bound? id))]
- (if bound?
+ [concrete? (&;with-type-env
+ (tc;concrete? id))]
+ (if concrete?
(do @
[expectedT' (&;with-type-env
(tc;read id))]
@@ -227,8 +227,6 @@
[#let [case-size (list;size group)]
inferenceT (&inference;variant idx case-size variantT)
[inferredT valueA+] (&inference;apply-function analyse inferenceT (list valueC))
- _ (&;with-type-env
- (tc;check expectedT inferredT))
temp &scope;next-local]
(wrap (la;sum idx case-size temp (|> valueA+ list;head maybe;assume))))
@@ -308,9 +306,7 @@
(#;Var _)
(do @
[inferenceT (&inference;record recordT)
- [inferredT membersA] (&inference;apply-function analyse inferenceT membersC)
- _ (&;with-type-env
- (tc;check expectedT inferredT))]
+ [inferredT membersA] (&inference;apply-function analyse inferenceT membersC)]
(wrap (la;product membersA)))
_