aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/specification/compositor/common.lux
diff options
context:
space:
mode:
authorEduardo Julian2023-01-07 18:55:20 -0400
committerEduardo Julian2023-01-07 18:55:20 -0400
commitae2d5697d93a45dcbff768c32c4dc8fb291096cd (patch)
tree027d732be6a126d41d6265e595627b768daac29a /stdlib/source/specification/compositor/common.lux
parent06f5b1c544ad27eecfbc7cc9b3bd7591f9e33423 (diff)
Now wrapping C++ values inside a universal box.
Diffstat (limited to 'stdlib/source/specification/compositor/common.lux')
-rw-r--r--stdlib/source/specification/compositor/common.lux80
1 files changed, 0 insertions, 80 deletions
diff --git a/stdlib/source/specification/compositor/common.lux b/stdlib/source/specification/compositor/common.lux
deleted file mode 100644
index 6045d8db1..000000000
--- a/stdlib/source/specification/compositor/common.lux
+++ /dev/null
@@ -1,80 +0,0 @@
-(.require
- [lux (.except)
- [abstract
- [monad (.only do)]]
- [control
- ["[0]" io (.only IO)]
- ["[0]" try (.only Try)]]
- [meta
- [compiler
- ["[0]" reference]
- ["[0]" analysis]
- ["[0]" synthesis (.only Synthesis)]
- ["[0]" declaration]
- ["[0]" phase
- ["[0]" macro (.only Expander)]
- ["[0]" translation (.only Operation)]
- [extension (.only Extender)
- ["[0]" bundle]]]
- [default
- ["[0]" platform (.only Platform)]]]]])
-
-(type .public Runner
- (-> Text Synthesis (Try Any)))
-
-(type .public Definer
- (-> Symbol Synthesis (Try Any)))
-
-(type .public (Instancer what)
- (All (_ anchor expression declaration)
- (-> (Platform IO anchor expression declaration)
- (translation.State anchor expression declaration)
- what)))
-
-(def (runner (open "[0]") state)
- (Instancer Runner)
- (function (_ evaluation_name expressionS)
- (do try.monad
- [expressionG (<| (phase.result state)
- translation.with_buffer
- (do phase.monad
- [_ runtime]
- (phase expressionS)))]
- (of host evaluate! evaluation_name expressionG))))
-
-(def (definer (open "[0]") state)
- (Instancer Definer)
- (function (_ lux_name expressionS)
- (do try.monad
- [definitionG (<| (phase.result state)
- translation.with_buffer
- (do phase.monad
- [_ runtime
- expressionG (phase expressionS)
- [host_name host_value host_declaration] (translation.define! lux_name expressionG)
- _ (translation.learn lux_name host_name)]
- (phase (synthesis.constant lux_name))))]
- (of host evaluate! "definer" definitionG))))
-
-(def .public (executors target expander platform
- analysis_bundle translation_bundle declaration_bundle
- program extender)
- (All (_ anchor expression declaration)
- (-> Text Expander (Platform IO anchor expression declaration)
- analysis.Bundle
- (translation.Bundle anchor expression declaration)
- (declaration.Bundle anchor expression declaration)
- (-> expression declaration) Extender
- (IO (Try [(declaration.State anchor expression declaration)
- Runner
- Definer]))))
- (do io.monad
- [?state (platform.initialize target expander analysis_bundle platform translation_bundle declaration_bundle program extender)]
- (in (do try.monad
- [[declaration_bundle declaration_state] ?state
- .let [translation_state (the [declaration.#translation
- declaration.#state]
- declaration_state)]]
- (in [[declaration_bundle declaration_state]
- (..runner platform translation_state)
- (..definer platform translation_state)])))))