diff options
Diffstat (limited to 'source/lux.lux')
-rw-r--r-- | source/lux.lux | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/source/lux.lux b/source/lux.lux index 7d00cd077..3ede6d75b 100644 --- a/source/lux.lux +++ b/source/lux.lux @@ -292,18 +292,10 @@ #Nil)))))))) (_lux_export DefData') -## (deftype LuxVar -## (| (#Local Int) -## (#Global Ident))) -(_lux_def LuxVar - (#NamedT ["lux" "LuxVar"] - (#VariantT (#Cons [## "lux;Local" - Int - (#Cons [## "lux;Global" - Ident - #Nil])])))) -(_lux_export LuxVar) -(_lux_declare-tags [#Local #Global] LuxVar) +(_lux_def Analysis + (#NamedT ["lux" "Analysis"] + Void)) +(_lux_export Analysis) ## (deftype (Module Compiler) ## (& #module-aliases (List (, Text Text)) @@ -349,7 +341,7 @@ ## (& #source Source ## #cursor Cursor ## #modules (List (, Text (Module Compiler))) -## #envs (List (Env Text (, LuxVar Type))) +## #envs (List (Env Text (Meta (, Type Cursor) Analysis))) ## #type-vars (Bindings Int Type) ## #expected Type ## #seed Int @@ -369,7 +361,9 @@ #Nil)))) (#Cons ## "lux;envs" (#AppT List (#AppT (#AppT Env Text) - (#TupleT (#Cons LuxVar (#Cons Type #Nil))))) + (#AppT (#AppT Meta + (#TupleT (#Cons Type (#Cons Cursor #Nil)))) + Analysis))) (#Cons ## "lux;type-vars" (#AppT (#AppT Bindings Int) Type) (#Cons ## "lux;expected" @@ -2711,16 +2705,15 @@ #envs envs #type-vars types #host host #seed seed #eval? eval? #expected expected #cursor cursor} - (some (: (-> (Env Text (, LuxVar Type)) (Maybe Type)) + (some (: (-> (Env Text (Meta (, Type Cursor) Analysis)) (Maybe Type)) (lambda [env] (case env {#name _ #inner-closures _ #locals {#counter _ #mappings locals} #closure {#counter _ #mappings closure}} - (try-both (some (: (-> (, Text (, LuxVar Type)) (Maybe Type)) - (lambda [binding] - (let [[bname [_ type]] binding] - (if (text:= name bname) - (#Some type) - #None))))) + (try-both (some (: (-> (, Text (Meta (, Type Cursor) Analysis)) (Maybe Type)) + (lambda [[bname [[type _] _]]] + (if (text:= name bname) + (#Some type) + #None)))) locals closure)))) envs))) |