diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/tool/compiler/phase.lux | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/phase.lux b/stdlib/source/library/lux/tool/compiler/phase.lux index 522b564ab..845ba3dba 100644 --- a/stdlib/source/library/lux/tool/compiler/phase.lux +++ b/stdlib/source/library/lux/tool/compiler/phase.lux @@ -66,13 +66,13 @@ (function (_ state) (do try.monad [[state' output] (operation (get state))] - (wrap [(set state' state) output])))) + (in [(set state' state) output])))) (def: #export failure (-> Text Operation) (|>> #try.Failure (state.lift try.monad))) -(def: #export (throw exception parameters) +(def: #export (except exception parameters) (All [e] (-> (Exception e) e Operation)) (..failure (ex.construct exception parameters))) @@ -82,9 +82,9 @@ (try\map (|>> [state]) error))) (syntax: #export (assert exception message test) - (wrap (list (` (if (~ test) - (\ ..monad (~' wrap) []) - (..throw (~ exception) (~ message))))))) + (in (list (` (if (~ test) + (\ ..monad (~' in) []) + (..except (~ exception) (~ message))))))) (def: #export identity (All [s a] (Phase s a a)) @@ -100,13 +100,13 @@ (do try.monad [[pre/state' temp] (pre archive input pre/state) [post/state' output] (post archive temp post/state)] - (wrap [[pre/state' post/state'] output])))) + (in [[pre/state' post/state'] output])))) (def: #export (timed definition description operation) (All [s a] (-> Name Text (Operation s a) (Operation s a))) (do ..monad - [_ (wrap []) + [_ (in []) #let [pre (io.run instant.now)] output operation #let [_ (|> instant.now @@ -116,4 +116,4 @@ %.duration (format (%.name definition) " [" description "]: ") debug.log!)]] - (wrap output))) + (in output))) |