diff options
Diffstat (limited to 'stdlib/source/specification/compositor/generation/reference.lux')
-rw-r--r-- | stdlib/source/specification/compositor/generation/reference.lux | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/stdlib/source/specification/compositor/generation/reference.lux b/stdlib/source/specification/compositor/generation/reference.lux deleted file mode 100644 index 74c556d80..000000000 --- a/stdlib/source/specification/compositor/generation/reference.lux +++ /dev/null @@ -1,64 +0,0 @@ -(.require - [library - [lux (.except symbol) - [abstract - [monad (.only do)]] - [control - ["[0]" pipe] - ["[0]" try]] - [data - [number - ["n" nat] - ["f" frac]]] - [meta - [compiler - ["[0]" reference] - ["[0]" synthesis]]] - [math - ["r" random (.only Random)]] - [test - ["_" property (.only Test)]]]] - [/// - [common (.only Runner Definer)]]) - -(def symbol - (Random Symbol) - (let [symbol_part (r.upper_case_alpha 5)] - [(r.and symbol_part symbol_part)])) - -(def (definition define) - (-> Definer Test) - (do r.monad - [name ..symbol - expected r.safe_frac] - (_.test "Definitions." - (|> (define name (synthesis.f64 expected)) - (pipe.when - {try.#Success actual} - (f.= expected (as Frac actual)) - - {try.#Failure _} - false))))) - -(def (variable run) - (-> Runner Test) - (do [! r.monad] - [register (|> r.nat (of ! each (n.% 100))) - expected r.safe_frac] - (_.test "Local variables." - (|> (synthesis.branch/let [(synthesis.f64 expected) - register - (synthesis.variable/local register)]) - (run "variable") - (pipe.when - {try.#Success actual} - (f.= expected (as Frac actual)) - - {try.#Failure _} - false))))) - -(def .public (spec runner definer) - (-> Runner Definer Test) - (all _.and - (..definition definer) - (..variable runner))) |