diff options
author | Eduardo Julian | 2017-10-31 22:26:13 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-10-31 22:26:13 -0400 |
commit | 19c589edc2c1dd77550e26d4f5cf78ec772da337 (patch) | |
tree | d070c773c7bd5cec8d33caa1841fbe0e342ec563 /new-luxc/source/luxc/analyser/primitive.lux | |
parent | 6c753288a89eadb3f7d70a8844e466c48c809051 (diff) |
- Migrated the format of analysis nodes from a custom data-type, to just Code nodes.
Diffstat (limited to 'new-luxc/source/luxc/analyser/primitive.lux')
-rw-r--r-- | new-luxc/source/luxc/analyser/primitive.lux | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/new-luxc/source/luxc/analyser/primitive.lux b/new-luxc/source/luxc/analyser/primitive.lux index 0023e43e0..c7f7243fd 100644 --- a/new-luxc/source/luxc/analyser/primitive.lux +++ b/new-luxc/source/luxc/analyser/primitive.lux @@ -1,8 +1,9 @@ (;module: lux (lux (control monad) - [meta #+ Monad<Meta>] - (meta (type ["TC" check]))) + [meta] + (meta [code] + (type ["tc" check]))) (luxc ["&" base] (lang ["la" analysis #+ Analysis]))) @@ -10,24 +11,24 @@ (do-template [<name> <type> <tag>] [(def: #export (<name> value) (-> <type> (Meta Analysis)) - (do Monad<Meta> + (do meta;Monad<Meta> [expected meta;expected-type _ (&;with-type-env - (TC;check expected <type>))] + (tc;check expected <type>))] (wrap (<tag> value))))] - [analyse-bool Bool #la;Bool] - [analyse-nat Nat #la;Nat] - [analyse-int Int #la;Int] - [analyse-deg Deg #la;Deg] - [analyse-frac Frac #la;Frac] - [analyse-text Text #la;Text] + [analyse-bool Bool code;bool] + [analyse-nat Nat code;nat] + [analyse-int Int code;int] + [analyse-deg Deg code;deg] + [analyse-frac Frac code;frac] + [analyse-text Text code;text] ) (def: #export analyse-unit (Meta Analysis) - (do Monad<Meta> + (do meta;Monad<Meta> [expected meta;expected-type _ (&;with-type-env - (TC;check expected Unit))] - (wrap #la;Unit))) + (tc;check expected Unit))] + (wrap (` [])))) |