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/extension/statement.lux | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'new-luxc/source/luxc/lang/extension/statement.lux') diff --git a/new-luxc/source/luxc/lang/extension/statement.lux b/new-luxc/source/luxc/lang/extension/statement.lux index c084055b7..81b43f205 100644 --- a/new-luxc/source/luxc/lang/extension/statement.lux +++ b/new-luxc/source/luxc/lang/extension/statement.lux @@ -22,8 +22,13 @@ [".T" eval])) [".L" eval]))) -(exception: #export Invalid-Statement) -(exception: #export Invalid-Alias) +(do-template [] + [(exception: #export ( {message Text}) + message)] + + [Invalid-Statement] + [Invalid-Alias] + ) (def: (throw-invalid-statement procedure inputsC+) (All [a] (-> Text (List Code) (Meta a))) @@ -32,7 +37,7 @@ " Inputs:" (|> inputsC+ list.enumerate - (list/map (function [[idx inputC]] + (list/map (function (_ [idx inputC]) (format "\n " (%n idx) " " (%code inputC)))) (text.join-with "")) "\n"))) @@ -58,7 +63,7 @@ (def: (lux//def procedure) (-> Text //.Statement) - (function [inputsC+] + (function (_ inputsC+) (case inputsC+ (^ (list [_ (#.Symbol ["" def-name])] valueC annotationsC)) (hostL.with-context def-name @@ -96,7 +101,7 @@ (def: (lux//program procedure) (-> Text //.Statement) - (function [inputsC+] + (function (_ inputsC+) (case inputsC+ (^ (list [_ (#.Symbol ["" args])] programC)) (do macro.Monad @@ -115,7 +120,7 @@ (do-template [ ] [(def: ( procedure) (-> Text //.Statement) - (function [inputsC+] + (function (_ inputsC+) (case inputsC+ (^ (list [_ (#.Text name)] valueC)) (do macro.Monad -- cgit v1.2.3