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/extension.lux | |
parent | 84d7e87817cd2c074653b34d028c8fa807febc7f (diff) |
- Adapted new-luxc's code to latest stdlib changes.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/extension.lux | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/new-luxc/source/luxc/lang/extension.lux b/new-luxc/source/luxc/lang/extension.lux index c5e6a8e25..e8121b9b6 100644 --- a/new-luxc/source/luxc/lang/extension.lux +++ b/new-luxc/source/luxc/lang/extension.lux @@ -10,15 +10,20 @@ (// ["la" analysis] ["ls" synthesis])) -(exception: #export Unknown-Analysis) -(exception: #export Unknown-Synthesis) -(exception: #export Unknown-Translation) -(exception: #export Unknown-Statement) - -(exception: #export Cannot-Define-Analysis-More-Than-Once) -(exception: #export Cannot-Define-Synthesis-More-Than-Once) -(exception: #export Cannot-Define-Translation-More-Than-Once) -(exception: #export Cannot-Define-Statement-More-Than-Once) +(do-template [<name>] + [(exception: #export (<name> {message Text}) + message)] + + [Unknown-Analysis] + [Unknown-Synthesis] + [Unknown-Translation] + [Unknown-Statement] + + [Cannot-Define-Analysis-More-Than-Once] + [Cannot-Define-Synthesis-More-Than-Once] + [Cannot-Define-Translation-More-Than-Once] + [Cannot-Define-Statement-More-Than-Once] + ) (type: #export Analysis (-> (-> Code (Meta Code)) @@ -51,13 +56,13 @@ (def: get (Meta Extensions) - (function [compiler] + (function (_ compiler) (#e.Success [compiler (|> compiler (get@ #.extensions) (:! Extensions))]))) (def: (set extensions) (-> Extensions (Meta Unit)) - (function [compiler] + (function (_ compiler) (#e.Success [(set@ #.extensions (:! Void extensions) compiler) []]))) |