diff options
Diffstat (limited to 'new-luxc/source/luxc')
-rw-r--r-- | new-luxc/source/luxc/analyser.lux | 3 | ||||
-rw-r--r-- | new-luxc/source/luxc/analyser/case.lux | 6 | ||||
-rw-r--r-- | new-luxc/source/luxc/analyser/function.lux | 6 | ||||
-rw-r--r-- | new-luxc/source/luxc/analyser/reference.lux | 4 | ||||
-rw-r--r-- | new-luxc/source/luxc/analyser/structure.lux | 6 | ||||
-rw-r--r-- | new-luxc/source/luxc/generator/statement.jvm.lux | 4 | ||||
-rw-r--r-- | new-luxc/source/luxc/module.lux | 4 | ||||
-rw-r--r-- | new-luxc/source/luxc/scope.lux (renamed from new-luxc/source/luxc/env.lux) | 0 |
8 files changed, 16 insertions, 17 deletions
diff --git a/new-luxc/source/luxc/analyser.lux b/new-luxc/source/luxc/analyser.lux index a7e420eec..3272057f2 100644 --- a/new-luxc/source/luxc/analyser.lux +++ b/new-luxc/source/luxc/analyser.lux @@ -11,8 +11,7 @@ (type ["TC" check])) (luxc ["&" base] (lang ["la" analysis]) - ["&;" module] - ["&;" env]) + ["&;" module]) (. ["&&;" common] ["&&;" function] ["&&;" primitive] diff --git a/new-luxc/source/luxc/analyser/case.lux b/new-luxc/source/luxc/analyser/case.lux index 8ef4b030b..9a205d934 100644 --- a/new-luxc/source/luxc/analyser/case.lux +++ b/new-luxc/source/luxc/analyser/case.lux @@ -16,7 +16,7 @@ (type ["TC" check])) (../.. ["&" base] (lang ["la" analysis]) - ["&;" env]) + ["&;" scope]) (.. ["&;" common] ["&;" structure]) (. ["&&;" coverage])) @@ -81,9 +81,9 @@ [cursor (#;Symbol ["" name])] (&;with-cursor cursor (do Monad<Lux> - [outputA (&env;with-local [name inputT] + [outputA (&scope;with-local [name inputT] next) - idx &env;next-local] + idx &scope;next-local] (wrap [(#la;BindP idx) outputA]))) [cursor (#;Symbol ident)] diff --git a/new-luxc/source/luxc/analyser/function.lux b/new-luxc/source/luxc/analyser/function.lux index f1d7fdd31..31bc367f4 100644 --- a/new-luxc/source/luxc/analyser/function.lux +++ b/new-luxc/source/luxc/analyser/function.lux @@ -9,7 +9,7 @@ (type ["TC" check])) (luxc ["&" base] (lang ["la" analysis #+ Analysis]) - ["&;" env] + ["&;" scope] (analyser ["&;" common] ["&;" inference]))) @@ -79,8 +79,8 @@ &;with-scope ## Functions have access not only to their argument, but ## also to themselves, through a local variable. - (&env;with-local [func-name functionT]) - (&env;with-local [arg-name inputT]) + (&scope;with-local [func-name functionT]) + (&scope;with-local [arg-name inputT]) (&;with-expected-type outputT) (analyse body)) diff --git a/new-luxc/source/luxc/analyser/reference.lux b/new-luxc/source/luxc/analyser/reference.lux index 5f09ee774..d664ac9d0 100644 --- a/new-luxc/source/luxc/analyser/reference.lux +++ b/new-luxc/source/luxc/analyser/reference.lux @@ -5,7 +5,7 @@ (type ["TC" check])) (luxc ["&" base] (lang ["la" analysis #+ Analysis]) - ["&;" env])) + ["&;" scope])) ## [Analysers] (def: (analyse-definition def-name) @@ -20,7 +20,7 @@ (def: (analyse-variable var-name) (-> Text (Lux (Maybe Analysis))) (do Monad<Lux> - [?var (&env;find var-name)] + [?var (&scope;find var-name)] (case ?var (#;Some [actual ref]) (do @ diff --git a/new-luxc/source/luxc/analyser/structure.lux b/new-luxc/source/luxc/analyser/structure.lux index ad7ad2a7a..e13d1d88a 100644 --- a/new-luxc/source/luxc/analyser/structure.lux +++ b/new-luxc/source/luxc/analyser/structure.lux @@ -20,7 +20,7 @@ (luxc ["&" base] (lang ["la" analysis]) ["&;" module] - ["&;" env] + ["&;" scope] (analyser ["&;" common] ["&;" inference]))) @@ -39,7 +39,7 @@ (do @ [valueA (&;with-expected-type variant-type (analyse valueC)) - temp &env;next-local] + temp &scope;next-local] (wrap (la;sum tag type-size temp valueA))) #;None @@ -189,7 +189,7 @@ expectedT macro;expected-type _ (&;within-type-env (TC;check expectedT inferredT)) - temp &env;next-local] + temp &scope;next-local] (wrap (la;sum idx case-size temp (|> valueA+ list;head assume))))) ## There cannot be any ambiguity or improper syntax when analysing diff --git a/new-luxc/source/luxc/generator/statement.jvm.lux b/new-luxc/source/luxc/generator/statement.jvm.lux index 96263181f..b091a2f37 100644 --- a/new-luxc/source/luxc/generator/statement.jvm.lux +++ b/new-luxc/source/luxc/generator/statement.jvm.lux @@ -7,7 +7,7 @@ [macro #+ Monad<Lux>]) (luxc ["&" base] ["&;" module] - ["&;" env] + ["&;" scope] (compiler ["&;" expr]))) (def: #export (compile-def def-name def-value def-meta) @@ -20,6 +20,6 @@ (def: #export (compile-program prog-args prog-body) (-> Text Code (Lux Unit)) (do Monad<Lux> - [=prog-body (&env;with-local [prog-args (type (List Text))] + [=prog-body (&scope;with-local [prog-args (type (List Text))] (&expr;compile prog-body))] (undefined))) diff --git a/new-luxc/source/luxc/module.lux b/new-luxc/source/luxc/module.lux index 68c43c0c1..66c53e479 100644 --- a/new-luxc/source/luxc/module.lux +++ b/new-luxc/source/luxc/module.lux @@ -7,7 +7,7 @@ (coll [list "L/" Fold<List> Functor<List>])) [macro #+ Monad<Lux>]) (luxc ["&" base] - ["&;" env])) + ["&;" scope])) (def: (new-module hash) (-> Nat Module) @@ -56,7 +56,7 @@ (All [a] (-> Nat Text (Lux a) (Lux [Module a]))) (do Monad<Lux> [_ (create hash name) - output (&env;with-scope name action) + output (&scope;with-scope name action) module (macro;find-module name)] (wrap [module output]))) diff --git a/new-luxc/source/luxc/env.lux b/new-luxc/source/luxc/scope.lux index e15e01130..e15e01130 100644 --- a/new-luxc/source/luxc/env.lux +++ b/new-luxc/source/luxc/scope.lux |