aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/spec/compositor.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-04-27 01:03:52 -0400
committerEduardo Julian2019-04-27 01:03:52 -0400
commitce71205758372cad17e09ac1b4b31dc4cea63528 (patch)
treead382efd1ce4c9b93c237dc915d16aada4a1080e /stdlib/source/spec/compositor.lux
parent5b655f558a0cc78b44736eec8eabeed6216f883f (diff)
Ported tests for type analysis.
Diffstat (limited to '')
-rw-r--r--stdlib/source/spec/compositor.lux31
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))))