aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/scope.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/scope.lux')
-rw-r--r--new-luxc/source/luxc/lang/scope.lux12
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.")