diff options
author | Eduardo Julian | 2021-07-15 00:45:15 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-07-15 00:45:15 -0400 |
commit | 0abd5bd3c0e38e352e9ba38268e04e1c858ab01e (patch) | |
tree | fe0af9e70413e9fc4f3848e0642920fca501c626 /stdlib/source/spec/compositor/generation/primitive.lux | |
parent | 89ca40f2f101b2b38187eab5cf905371cd47eb57 (diff) |
Re-named "spec" hierarchy to "specification".
Diffstat (limited to 'stdlib/source/spec/compositor/generation/primitive.lux')
-rw-r--r-- | stdlib/source/spec/compositor/generation/primitive.lux | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/stdlib/source/spec/compositor/generation/primitive.lux b/stdlib/source/spec/compositor/generation/primitive.lux deleted file mode 100644 index 3b6dd657b..000000000 --- a/stdlib/source/spec/compositor/generation/primitive.lux +++ /dev/null @@ -1,48 +0,0 @@ -(.module: - [lux #* - ["_" test (#+ Test)] - [abstract - [monad (#+ do)]] - [control - [pipe (#+ case>)] - ["." try]] - [data - ["." bit ("#\." equivalence)] - [number - ["f" frac]] - ["." text ("#\." equivalence) - ["%" format (#+ format)]]] - [math - ["r" random]] - [tool - [compiler - ["." synthesis]]]] - [/// - [common (#+ Runner)]]) - -(def: (f/=' reference subject) - (-> Frac Frac Bit) - (or (f.= reference subject) - (and (f.not-a-number? reference) - (f.not-a-number? subject)))) - -(def: #export (spec run) - (-> Runner Test) - (`` ($_ _.and - (~~ (template [<evaluation-name> <synthesis> <gen> <test>] - [(do r.monad - [expected <gen>] - (_.test (%.name (name-of <synthesis>)) - (|> (run <evaluation-name> (<synthesis> expected)) - (case> (#try.Success actual) - (<test> expected (:assume actual)) - - (#try.Failure _) - false))))] - - ["bit" synthesis.bit r.bit bit\=] - ["i64" synthesis.i64 r.i64 "lux i64 ="] - ["f64" synthesis.f64 r.frac f.='] - ["text" synthesis.text (r.ascii 5) text\=] - )) - ))) |