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/repl.lux | |
parent | 84d7e87817cd2c074653b34d028c8fa807febc7f (diff) |
- Adapted new-luxc's code to latest stdlib changes.
Diffstat (limited to 'new-luxc/source/luxc/repl.lux')
-rw-r--r-- | new-luxc/source/luxc/repl.lux | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/new-luxc/source/luxc/repl.lux b/new-luxc/source/luxc/repl.lux index 99d635975..918c5c076 100644 --- a/new-luxc/source/luxc/repl.lux +++ b/new-luxc/source/luxc/repl.lux @@ -42,8 +42,13 @@ [".E" translation] [".E" statement])))) -(exception: #export REPL-Initialization-Failed) -(exception: #export REPL-Error) +(do-template [<name>] + [(exception: #export (<name> {message Text}) + message)] + + [REPL-Initialization-Failed] + [REPL-Error] + ) (def: repl-module "<REPL>") @@ -91,7 +96,7 @@ (def: (represent-together representations values) (-> (List Representation) (List Top) (List Text)) (|> (list.zip2 representations values) - (list/map (function [[representation value]] (representation value))))) + (list/map (function (_ [representation value]) (representation value))))) (def: primitive-representation (Poly Representation) @@ -150,7 +155,7 @@ [membersR+ (poly.tuple (p.many representation)) _ (p.assert "Number of tags does not match record type size." (n/= (list.size tags) (list.size membersR+)))] - (wrap (function [recordV] + (wrap (function (_ recordV) (let [record-body (loop [pairs-left (list.zip2 tags membersR+) recordV recordV] (case pairs-left @@ -173,7 +178,7 @@ #let [num-tags (list.size tags)] _ (p.assert "Number of tags does not match variant type size." (n/= num-tags (list.size casesR+)))] - (wrap (function [variantV] + (wrap (function (_ variantV) (loop [cases-left (list.zip3 tags (list.n/range +0 (n/dec num-tags)) casesR+) @@ -216,7 +221,7 @@ (-> (Poly Representation) (Poly Representation)) (do p.Monad<Parser> [membersR+ (poly.tuple (p.many representation))] - (wrap (function [tupleV] + (wrap (function (_ tupleV) (let [tuple-body (loop [representations membersR+ tupleV tupleV] (case representations @@ -234,7 +239,7 @@ (def: (representation compiler) (-> Compiler (Poly Representation)) (p.rec - (function [representation] + (function (_ representation) ($_ p.either primitive-representation (special-representation representation) @@ -268,7 +273,7 @@ (def: (repl-translate source-dirs target-dir code) (-> (List File) File Code (Meta [Type Top])) - (function [compiler] + (function (_ compiler) (case ((translationL.translate (translationL.translate-module source-dirs target-dir) no-aliases code) |