diff options
Diffstat (limited to 'stdlib/source/lux/control/effect.lux')
-rw-r--r-- | stdlib/source/lux/control/effect.lux | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/stdlib/source/lux/control/effect.lux b/stdlib/source/lux/control/effect.lux index 6c432c47b..fd0973470 100644 --- a/stdlib/source/lux/control/effect.lux +++ b/stdlib/source/lux/control/effect.lux @@ -10,7 +10,6 @@ error [ident "Ident/" Eq<Ident>] [text]) - [compiler] [macro] (macro [ast] ["s" syntax #+ syntax: Syntax] @@ -74,7 +73,7 @@ (|H io;Monad<IO> Handler<EffA,IO> Handler<EffB,IO> Handler<EffC,IO>)))} (do @ - [g!combiner (compiler;gensym "")] + [g!combiner (macro;gensym "")] (wrap (list (` (let [(~ g!combiner) (;;combine-handlers (~ monad))] ($_ (~ g!combiner) (~@ handlers)))))))) @@ -105,7 +104,7 @@ "In this case, 'opA' will be a function (-> Nat Text Bool)." "'fieldA' will be a value provided by a handler.")} (do @ - [g!output (compiler;gensym "g!output") + [g!output (macro;gensym "g!output") #let [op-types (List/map (function [op] (let [g!tag (ast;tag ["" (get@ #name op)]) g!inputs (` [(~@ (get@ #inputs op))]) @@ -174,11 +173,11 @@ "Since a name for the handler was not specified, 'handler:' will generate the name as Handler<EffA,IO>.")} (do @ - [(^@ effect [e-module _]) (compiler;un-alias effect) - g!input (compiler;gensym "g!input") - g!cont (compiler;gensym "g!cont") - g!value (compiler;gensym "value") - g!wrap (compiler;gensym "wrap") + [(^@ effect [e-module _]) (macro;un-alias effect) + g!input (macro;gensym "g!input") + g!cont (macro;gensym "g!cont") + g!value (macro;gensym "value") + g!wrap (macro;gensym "wrap") #let [g!cases (|> defs (List/map (function [def] (let [g!tag (ast;tag [e-module (get@ #common;def-name def)]) @@ -254,7 +253,7 @@ c (lift fieldC)] (wrap ($_ n.+ a b c)))))} (do @ - [g!output (compiler;gensym "")] + [g!output (macro;gensym "")] (wrap (list (` (let [(~ g!functor) (~ functor)] (do (Monad<Free> (~ g!functor)) [(~@ bindings) @@ -317,8 +316,8 @@ (case value (#;Left var) (do @ - [input (compiler;find-type var) - output compiler;expected-type] + [input (macro;find-type var) + output macro;expected-type] (case [input output] (^=> [(#;AppT eff0 _) (#;AppT stackT0 recT0)] [(type;apply-type stackT0 recT0) (#;Some unfoldT0)] @@ -334,10 +333,10 @@ (~ (nest-effect idx (list;size stack) (ast;symbol var)))))))) _ - (compiler;fail (format "Invalid type to lift: " (%type output))))) + (macro;fail (format "Invalid type to lift: " (%type output))))) (#;Right node) (do @ - [g!value (compiler;gensym "")] + [g!value (macro;gensym "")] (wrap (list (` (let [(~ g!value) (~ node)] (;;lift (~ g!value))))))))) |