From ca238f9c89d3156842b0a3d5fe24a5d69b2eedb0 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 6 Apr 2018 08:32:41 -0400 Subject: - Adapted new-luxc's code to latest stdlib changes. --- new-luxc/source/luxc/lang/scope.lux | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'new-luxc/source/luxc/lang/scope.lux') 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.") -- cgit v1.2.3