aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/analyser/reference.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-10-31 22:26:13 -0400
committerEduardo Julian2017-10-31 22:26:13 -0400
commit19c589edc2c1dd77550e26d4f5cf78ec772da337 (patch)
treed070c773c7bd5cec8d33caa1841fbe0e342ec563 /new-luxc/source/luxc/analyser/reference.lux
parent6c753288a89eadb3f7d70a8844e466c48c809051 (diff)
- Migrated the format of analysis nodes from a custom data-type, to just Code nodes.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/analyser/reference.lux10
1 files changed, 6 insertions, 4 deletions
diff --git a/new-luxc/source/luxc/analyser/reference.lux b/new-luxc/source/luxc/analyser/reference.lux
index 4a2f6dbc5..5bc1f96c9 100644
--- a/new-luxc/source/luxc/analyser/reference.lux
+++ b/new-luxc/source/luxc/analyser/reference.lux
@@ -2,9 +2,11 @@
lux
(lux (control monad)
[meta]
- (meta (type ["tc" check])))
+ (meta [code]
+ (type ["tc" check])))
(luxc ["&" base]
- (lang ["la" analysis #+ Analysis])
+ (lang ["la" analysis #+ Analysis]
+ [";L" variable #+ Variable])
["&;" scope]))
## [Analysers]
@@ -15,7 +17,7 @@
expectedT meta;expected-type
_ (&;with-type-env
(tc;check expectedT actualT))]
- (wrap (#la;Definition def-name))))
+ (wrap (code;symbol def-name))))
(def: (analyse-variable var-name)
(-> Text (Meta (Maybe Analysis)))
@@ -27,7 +29,7 @@
[expectedT meta;expected-type
_ (&;with-type-env
(tc;check expectedT actualT))]
- (wrap (#;Some (#la;Variable ref))))
+ (wrap (#;Some (` ((~ (code;int (variableL;from-ref ref))))))))
#;None
(wrap #;None))))