From 70005a6dee1eba3e3f5694aa4903e95988dcaa3d Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 13 Nov 2017 23:26:06 -0400 Subject: - Refactoring. - Now giving type checking/inference a higher priority. - Better error messages. --- new-luxc/source/luxc/lang/analysis/common.lux | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'new-luxc/source/luxc/lang/analysis/common.lux') 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 [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 + (do meta;Monad [[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 - [[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) -- cgit v1.2.3