diff options
author | Eduardo Julian | 2018-04-06 08:32:41 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-04-06 08:32:41 -0400 |
commit | ca238f9c89d3156842b0a3d5fe24a5d69b2eedb0 (patch) | |
tree | 50ba106541f2357daf27393df28e8b263f7311e1 /new-luxc/source/luxc/lang/scope.lux | |
parent | 84d7e87817cd2c074653b34d028c8fa807febc7f (diff) |
- Adapted new-luxc's code to latest stdlib changes.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/scope.lux | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/new-luxc/source/luxc/lang/scope.lux b/new-luxc/source/luxc/lang/scope.lux index 8dcdce6af..82d7803e2 100644 --- a/new-luxc/source/luxc/lang/scope.lux +++ b/new-luxc/source/luxc/lang/scope.lux @@ -25,7 +25,7 @@ (|> scope (get@ [#.locals #.mappings]) (&.pl-get name) - (maybe/map (function [[type value]] + (maybe/map (function (_ [type value]) [type (#.Local value)])))) (def: (is-captured? name scope) @@ -63,7 +63,7 @@ (def: #export (find name) (-> Text (Meta (Maybe [Type Ref]))) - (function [compiler] + (function (_ compiler) (let [[inner outer] (|> compiler (get@ #.scopes) (list.split-with (|>> (is-ref? name) not)))] @@ -75,7 +75,7 @@ (let [[ref-type init-ref] (maybe.default (undefined) (get-ref name top-outer)) [ref inner'] (list/fold (: (-> Scope [Ref (List Scope)] [Ref (List Scope)]) - (function [scope ref+inner] + (function (_ scope ref+inner) [(#.Captured (get@ [#.captured #.counter] scope)) (#.Cons (update@ #.captured (: (-> Captured Captured) @@ -92,7 +92,7 @@ (def: #export (with-local [name type] action) (All [a] (-> [Text Type] (Meta a) (Meta a))) - (function [compiler] + (function (_ compiler) (case (get@ #.scopes compiler) (#.Cons head tail) (let [old-mappings (get@ [#.locals #.mappings] head) @@ -141,7 +141,7 @@ (def: #export (with-scope name action) (All [a] (-> Text (Meta a) (Meta a))) - (function [compiler] + (function (_ compiler) (let [parent-name (case (get@ #.scopes compiler) #.Nil (list) @@ -164,7 +164,7 @@ (def: #export next-local (Meta Nat) - (function [compiler] + (function (_ compiler) (case (get@ #.scopes compiler) #.Nil (#e.Error "Cannot get next reference when there is no scope.") |