diff options
author | Eduardo Julian | 2018-05-15 19:52:04 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-05-15 19:52:04 -0400 |
commit | 4242e4d3b18eb532ae18e8b38e85ad1ee1988e02 (patch) | |
tree | 96f25b4ed5e428eea5c8bb4532a228b84d1f1b7b /new-luxc/source/luxc/lang/analysis | |
parent | bb2ec42843ba0f13adafe1f2f4a7b2820fbcaafa (diff) |
- Migrated primitive analysis to stdlib.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/common.lux | 9 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/primitive.lux | 30 |
2 files changed, 0 insertions, 39 deletions
diff --git a/new-luxc/source/luxc/lang/analysis/common.lux b/new-luxc/source/luxc/lang/analysis/common.lux index c4ff4bfde..072616cfa 100644 --- a/new-luxc/source/luxc/lang/analysis/common.lux +++ b/new-luxc/source/luxc/lang/analysis/common.lux @@ -10,15 +10,6 @@ (luxc ["&" lang] (lang analysis))) -(def: #export (with-unknown-type action) - (All [a] (-> (Meta a) (Meta [Type a]))) - (do macro.Monad<Meta> - [[_ varT] (&.with-type-env tc.var) - analysis (&.with-type varT - action) - knownT (&.with-type-env (tc.clean varT))] - (wrap [knownT analysis]))) - (exception: #export (Variant-Tag-Out-Of-Bounds {message Text}) message) diff --git a/new-luxc/source/luxc/lang/analysis/primitive.lux b/new-luxc/source/luxc/lang/analysis/primitive.lux deleted file mode 100644 index ff7908669..000000000 --- a/new-luxc/source/luxc/lang/analysis/primitive.lux +++ /dev/null @@ -1,30 +0,0 @@ -(.module: - lux - (lux (control monad) - [macro] - (macro [code]) - (lang (type ["tc" check]))) - (luxc ["&" lang] - (lang ["la" analysis #+ Analysis]))) - -## [Analysers] -(do-template [<name> <type> <tag>] - [(def: #export (<name> value) - (-> <type> (Meta Analysis)) - (do macro.Monad<Meta> - [_ (&.infer <type>)] - (wrap (<tag> value))))] - - [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 macro.Monad<Meta> - [_ (&.infer Top)] - (wrap (` [])))) |