diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/spec/compositor/common.lux | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/stdlib/source/spec/compositor/common.lux b/stdlib/source/spec/compositor/common.lux index df332df57..7b1c940fb 100644 --- a/stdlib/source/spec/compositor/common.lux +++ b/stdlib/source/spec/compositor/common.lux @@ -3,9 +3,8 @@ [abstract [monad (#+ do)]] [control - ["." io (#+ IO)]] - [data - ["." error (#+ Error)]] + ["." io (#+ IO)] + ["." try (#+ Try)]] [tool [compiler ["." reference] @@ -19,8 +18,8 @@ [default ["." platform (#+ Platform)]]]]]) -(type: #export Runner (-> Text Synthesis (Error Any))) -(type: #export Definer (-> Name Synthesis (Error Any))) +(type: #export Runner (-> Text Synthesis (Try Any))) +(type: #export Definer (-> Name Synthesis (Try Any))) (type: #export (Instancer what) (All [anchor expression statement] @@ -31,7 +30,7 @@ (def: (runner (^slots [#platform.runtime #platform.phase #platform.host]) state) (Instancer Runner) (function (_ evaluation-name expressionS) - (do error.monad + (do try.monad [expressionG (<| (phase.run state) generation.with-buffer (do phase.monad @@ -43,7 +42,7 @@ state) (Instancer Definer) (function (_ lux-name expressionS) - (do error.monad + (do try.monad [definitionG (<| (phase.run state) generation.with-buffer (do phase.monad @@ -60,12 +59,12 @@ (Bundle anchor expression statement) Expander (-> expression statement) - (IO (Error [(statement.State+ anchor expression statement) - Runner - Definer])))) + (IO (Try [(statement.State+ anchor expression statement) + Runner + Definer])))) (do io.monad [?state (platform.initialize expander platform bundle program)] - (wrap (do error.monad + (wrap (do try.monad [[statement-bundle statement-state] ?state #let [generation-state (get@ [#statement.generation #statement.state] |