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/host.jvm.lux | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'new-luxc/source/luxc/lang/host.jvm.lux') diff --git a/new-luxc/source/luxc/lang/host.jvm.lux b/new-luxc/source/luxc/lang/host.jvm.lux index 58b79cfa4..b9261f7b0 100644 --- a/new-luxc/source/luxc/lang/host.jvm.lux +++ b/new-luxc/source/luxc/lang/host.jvm.lux @@ -94,7 +94,7 @@ (def: #export (with-anchor anchor expr) (All [a] (-> [Label Register] (Meta a) (Meta a))) - (.function [compiler] + (.function (_ compiler) (let [old (:! commonT.Host (get@ #.host compiler))] (case (expr (set@ #.host (:! Void (set@ #commonT.anchor (#.Some anchor) old)) @@ -110,11 +110,12 @@ (#e.Error error) (#e.Error error))))) -(exception: #export No-Anchor) +(exception: #export (No-Anchor {message Text}) + message) (def: #export anchor (Meta [Label Register]) - (.function [compiler] + (.function (_ compiler) (case (|> compiler (get@ #.host) (:! commonT.Host) (get@ #commonT.anchor)) (#.Some anchor) (#e.Success [compiler @@ -125,7 +126,7 @@ (def: #export (with-context name expr) (All [a] (-> Text (Meta a) (Meta a))) - (.function [compiler] + (.function (_ compiler) (let [old (:! commonT.Host (get@ #.host compiler))] (case (expr (set@ #.host (:! Void (set@ #commonT.context [(&.normalize-name name) +0] old)) @@ -143,7 +144,7 @@ (def: #export (with-sub-context expr) (All [a] (-> (Meta a) (Meta [Text a]))) - (.function [compiler] + (.function (_ compiler) (let [old (:! commonT.Host (get@ #.host compiler)) [old-name old-sub] (get@ #commonT.context old) new-name (format old-name "$" (%i (nat-to-int old-sub)))] @@ -163,7 +164,7 @@ (def: #export context (Meta Text) - (.function [compiler] + (.function (_ compiler) (#e.Success [compiler (|> (get@ #.host compiler) (:! commonT.Host) @@ -173,7 +174,7 @@ (def: #export class-loader (Meta ClassLoader) - (function [compiler] + (function (_ compiler) (#e.Success [compiler (|> compiler (get@ #.host) -- cgit v1.2.3