diff options
Diffstat (limited to 'stdlib/source/spec/compositor.lux')
-rw-r--r-- | stdlib/source/spec/compositor.lux | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/stdlib/source/spec/compositor.lux b/stdlib/source/spec/compositor.lux index 5f46aad84..75818c3cf 100644 --- a/stdlib/source/spec/compositor.lux +++ b/stdlib/source/spec/compositor.lux @@ -11,6 +11,8 @@ ["r" random]] [tool [compiler + ["." analysis] + ["." statement] [phase [macro (#+ Expander)] [generation (#+ Bundle)]] @@ -18,6 +20,8 @@ [platform (#+ Platform)]]]]] ["." / #_ ["#." common (#+ Runner Definer)] + ["#./" analysis #_ + ["#." type]] ["#./" generation #_ ["#." primitive] ["#." structure] @@ -26,9 +30,10 @@ ["#." function] ["#." common]]]) -(def: (test runner definer) - (-> Runner Definer Test) +(def: (test runner definer state expander) + (-> Runner Definer analysis.State+ Expander Test) ($_ _.and + (/analysis/type.spec expander state) (/generation/primitive.spec runner) (/generation/structure.spec runner) (/generation/reference.spec runner definer) @@ -46,16 +51,18 @@ Test)) (do r.monad [_ (wrap []) - #let [?runner,definer (<| io.run - (do io.monad - [platform platform]) - (/common.executors platform - bundle - expander - program))]] - (case ?runner,definer - (#error.Success [runner definer]) - (..test runner definer) + #let [?state,runner,definer (<| io.run + (do io.monad + [platform platform]) + (/common.executors platform + bundle + expander + program))]] + (case ?state,runner,definer + (#error.Success [[statement-bundle statement-state] runner definer]) + (..test runner definer + (get@ [#statement.analysis #statement.state] statement-state) + expander) (#error.Failure error) (_.fail error)))) |