diff options
author | Eduardo Julian | 2017-11-13 23:26:06 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-11-13 23:26:06 -0400 |
commit | 70005a6dee1eba3e3f5694aa4903e95988dcaa3d (patch) | |
tree | 19141f900847092c3aa5032a62b6b97eb1ea9a33 /new-luxc/source/luxc/lang/analysis/common.lux | |
parent | b08f7d83a591be770af64b4c9ccd59f3306689e8 (diff) |
- Refactoring.
- Now giving type checking/inference a higher priority.
- Better error messages.
Diffstat (limited to 'new-luxc/source/luxc/lang/analysis/common.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/analysis/common.lux | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/new-luxc/source/luxc/lang/analysis/common.lux b/new-luxc/source/luxc/lang/analysis/common.lux index 4d16e4ae6..1eb2b8b37 100644 --- a/new-luxc/source/luxc/lang/analysis/common.lux +++ b/new-luxc/source/luxc/lang/analysis/common.lux @@ -4,7 +4,7 @@ ["ex" exception #+ exception:]) (data text/format [product]) - [meta #+ Monad<Meta>] + [meta] (meta [type] (type ["tc" check]))) (luxc ["&" base] @@ -12,7 +12,7 @@ (def: #export (with-unknown-type action) (All [a] (-> (Meta Analysis) (Meta [Type Analysis]))) - (do Monad<Meta> + (do meta;Monad<Meta> [[var-id var-type] (&;with-type-env tc;var) analysis (&;with-expected-type var-type @@ -21,13 +21,6 @@ (tc;clean var-id var-type))] (wrap [analysis-type analysis]))) -(def: #export (with-var body) - (All [a] (-> (-> [Nat Type] (Meta a)) (Meta a))) - (do Monad<Meta> - [[id var] (&;with-type-env - tc;var)] - (body [id var]))) - (exception: #export Variant-Tag-Out-Of-Bounds) (def: #export (variant-out-of-bounds-error type size tag) |