aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/specification/compositor/generation/reference.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/generation/reference.lux
parent06f5b1c544ad27eecfbc7cc9b3bd7591f9e33423 (diff)
Now wrapping C++ values inside a universal box.
Diffstat (limited to 'stdlib/source/specification/compositor/generation/reference.lux')
-rw-r--r--stdlib/source/specification/compositor/generation/reference.lux64
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)))