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/host.jvm.lux | |
parent | 84d7e87817cd2c074653b34d028c8fa807febc7f (diff) |
- Adapted new-luxc's code to latest stdlib changes.
Diffstat (limited to 'new-luxc/source/luxc/lang/host.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/host.jvm.lux | 15 |
1 files changed, 8 insertions, 7 deletions
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) |