aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/specification/compositor
diff options
context:
space:
mode:
authorEduardo Julian2022-08-10 19:38:43 -0400
committerEduardo Julian2022-08-10 19:38:43 -0400
commit68d78235694c633c956bb9e8a007cad7d65370bc (patch)
treef84fcb298d29d3c85d149fd2f3c94f31b59305d4 /stdlib/source/specification/compositor
parent6ec8f5d2f6cbf8db45f91e5c4b48c6ec17659f72 (diff)
Extracted property-based testing machinery into its own module.
Diffstat (limited to 'stdlib/source/specification/compositor')
-rw-r--r--stdlib/source/specification/compositor/analysis/type.lux40
-rw-r--r--stdlib/source/specification/compositor/generation/case.lux54
-rw-r--r--stdlib/source/specification/compositor/generation/common.lux54
-rw-r--r--stdlib/source/specification/compositor/generation/function.lux40
-rw-r--r--stdlib/source/specification/compositor/generation/primitive.lux38
-rw-r--r--stdlib/source/specification/compositor/generation/reference.lux36
-rw-r--r--stdlib/source/specification/compositor/generation/structure.lux50
7 files changed, 163 insertions, 149 deletions
diff --git a/stdlib/source/specification/compositor/analysis/type.lux b/stdlib/source/specification/compositor/analysis/type.lux
index 89ee8646f..acd970ebc 100644
--- a/stdlib/source/specification/compositor/analysis/type.lux
+++ b/stdlib/source/specification/compositor/analysis/type.lux
@@ -1,23 +1,25 @@
(.require
- [lux (.except)
- ["_" test (.only Test)]
- [abstract
- [monad (.only do)]]
- [control
- ["[0]" pipe]
- ["[0]" io]
- ["[0]" try]]
- [math
- ["r" random (.only Random)]]
- [meta
- ["[0]" code]
- [compiler
- [analysis (.only State+)]
- ["[0]" phase
- [macro (.only Expander)]
- ["[0]" analysis
- ["[1]/[0]" scope]
- ["[1]/[0]" type]]]]]])
+ [library
+ [lux (.except)
+ [abstract
+ [monad (.only do)]]
+ [control
+ ["[0]" pipe]
+ ["[0]" io]
+ ["[0]" try]]
+ [math
+ ["r" random (.only Random)]]
+ [meta
+ ["[0]" code]
+ [compiler
+ [analysis (.only State+)]
+ ["[0]" phase
+ [macro (.only Expander)]
+ ["[0]" analysis
+ ["[1]/[0]" scope]
+ ["[1]/[0]" type]]]]]
+ [test
+ ["_" property (.only Test)]]]])
(def (check_success+ expander state extension params output_type)
(-> Expander State+ Text (List Code) Type Bit)
diff --git a/stdlib/source/specification/compositor/generation/case.lux b/stdlib/source/specification/compositor/generation/case.lux
index 6ac785a12..ba1168ad0 100644
--- a/stdlib/source/specification/compositor/generation/case.lux
+++ b/stdlib/source/specification/compositor/generation/case.lux
@@ -1,30 +1,32 @@
(.require
- [lux (.except case)
- ["_" test (.only Test)]
- [abstract
- [monad (.only do)]]
- [control
- ["[0]" pipe]
- ["[0]" try (.only Try)]]
- [data
- ["[0]" text (.use "[1]#[0]" equivalence)
- ["%" \\format (.only format)]]
- [number
- ["n" nat]
- ["f" frac]]
- [collection
- ["[0]" list (.use "[1]#[0]" mix)]]]
- [math
- ["r" random (.only Random)]]
- [meta
- [compiler
- ["[0]" reference]
- ["[0]" analysis]
- ["[0]" synthesis (.only Path Synthesis)]
- ["[0]" phase
- ["[1]/[0]" synthesis
- ["[0]" case]]
- ["[0]" extension/synthesis]]]]]
+ [library
+ [lux (.except case)
+ [abstract
+ [monad (.only do)]]
+ [control
+ ["[0]" pipe]
+ ["[0]" try (.only Try)]]
+ [data
+ ["[0]" text (.use "[1]#[0]" equivalence)
+ ["%" \\format (.only format)]]
+ [number
+ ["n" nat]
+ ["f" frac]]
+ [collection
+ ["[0]" list (.use "[1]#[0]" mix)]]]
+ [math
+ ["r" random (.only Random)]]
+ [meta
+ [compiler
+ ["[0]" reference]
+ ["[0]" analysis]
+ ["[0]" synthesis (.only Path Synthesis)]
+ ["[0]" phase
+ ["[1]/[0]" synthesis
+ ["[0]" case]]
+ ["[0]" extension/synthesis]]]]
+ [test
+ ["_" property (.only Test)]]]]
[///
[common (.only Runner)]])
diff --git a/stdlib/source/specification/compositor/generation/common.lux b/stdlib/source/specification/compositor/generation/common.lux
index ba691bde7..e203a6098 100644
--- a/stdlib/source/specification/compositor/generation/common.lux
+++ b/stdlib/source/specification/compositor/generation/common.lux
@@ -1,30 +1,32 @@
(.require
- [lux (.except i64)
- ["_" test (.only Test)]
- [abstract
- [monad (.only do)]]
- [control
- ["[0]" pipe]
- ["[0]" try (.only Try)]]
- [data
- ["[0]" bit (.use "[1]#[0]" equivalence)]
- [number
- ["[0]" i64]
- ["n" nat]
- ["i" int]
- ["f" frac]]
- ["[0]" text (.use "[1]#[0]" equivalence)
- ["%" \\format (.only format)]]
- [collection
- ["[0]" list]]]
- [math
- ["r" random (.only Random)]]
- [meta
- [macro
- ["^" pattern]]
- [compiler
- ["[0]" reference]
- ["[0]" synthesis]]]]
+ [library
+ [lux (.except i64)
+ [abstract
+ [monad (.only do)]]
+ [control
+ ["[0]" pipe]
+ ["[0]" try (.only Try)]]
+ [data
+ ["[0]" bit (.use "[1]#[0]" equivalence)]
+ [number
+ ["[0]" i64]
+ ["n" nat]
+ ["i" int]
+ ["f" frac]]
+ ["[0]" text (.use "[1]#[0]" equivalence)
+ ["%" \\format (.only format)]]
+ [collection
+ ["[0]" list]]]
+ [math
+ ["r" random (.only Random)]]
+ [meta
+ [macro
+ ["^" pattern]]
+ [compiler
+ ["[0]" reference]
+ ["[0]" synthesis]]]
+ [test
+ ["_" property (.only Test)]]]]
["[0]" //
["[1][0]" case]
[//
diff --git a/stdlib/source/specification/compositor/generation/function.lux b/stdlib/source/specification/compositor/generation/function.lux
index 2fb9714e0..92d0bdaa2 100644
--- a/stdlib/source/specification/compositor/generation/function.lux
+++ b/stdlib/source/specification/compositor/generation/function.lux
@@ -1,23 +1,25 @@
(.require
- [lux (.except function)
- ["_" test (.only Test)]
- [abstract
- [monad (.only do)]
- ["[0]" enum]]
- [control
- ["[0]" maybe]]
- [data
- [number
- ["n" nat]]
- [collection
- ["[0]" list (.use "[1]#[0]" functor)]]]
- [math
- ["r" random (.only Random) (.use "[1]#[0]" monad)]]
- [meta
- [compiler
- [analysis (.only Arity)]
- ["[0]" reference (.only Register)]
- ["[0]" synthesis (.only Synthesis)]]]]
+ [library
+ [lux (.except function)
+ [abstract
+ [monad (.only do)]
+ ["[0]" enum]]
+ [control
+ ["[0]" maybe]]
+ [data
+ [number
+ ["n" nat]]
+ [collection
+ ["[0]" list (.use "[1]#[0]" functor)]]]
+ [math
+ ["r" random (.only Random) (.use "[1]#[0]" monad)]]
+ [meta
+ [compiler
+ [analysis (.only Arity)]
+ ["[0]" reference (.only Register)]
+ ["[0]" synthesis (.only Synthesis)]]]]
+ [test
+ ["_" property (.only Test)]]]
["[0]" //
["[1][0]" case]
[//
diff --git a/stdlib/source/specification/compositor/generation/primitive.lux b/stdlib/source/specification/compositor/generation/primitive.lux
index fcb6bd050..43637f7a2 100644
--- a/stdlib/source/specification/compositor/generation/primitive.lux
+++ b/stdlib/source/specification/compositor/generation/primitive.lux
@@ -1,22 +1,24 @@
(.require
- [lux (.except)
- ["_" test (.only Test)]
- [abstract
- [monad (.only do)]]
- [control
- ["[0]" pipe]
- ["[0]" try]]
- [data
- ["[0]" bit (.use "[1]#[0]" equivalence)]
- [number
- ["f" frac]]
- ["[0]" text (.use "[1]#[0]" equivalence)
- ["%" \\format (.only format)]]]
- [math
- ["r" random]]
- [meta
- [compiler
- ["[0]" synthesis]]]]
+ [library
+ [lux (.except)
+ [abstract
+ [monad (.only do)]]
+ [control
+ ["[0]" pipe]
+ ["[0]" try]]
+ [data
+ ["[0]" bit (.use "[1]#[0]" equivalence)]
+ [number
+ ["f" frac]]
+ ["[0]" text (.use "[1]#[0]" equivalence)
+ ["%" \\format (.only format)]]]
+ [math
+ ["r" random]]
+ [meta
+ [compiler
+ ["[0]" synthesis]]]
+ [test
+ ["_" property (.only Test)]]]]
[///
[common (.only Runner)]])
diff --git a/stdlib/source/specification/compositor/generation/reference.lux b/stdlib/source/specification/compositor/generation/reference.lux
index 27441f349..5e7516f20 100644
--- a/stdlib/source/specification/compositor/generation/reference.lux
+++ b/stdlib/source/specification/compositor/generation/reference.lux
@@ -1,21 +1,23 @@
(.require
- [lux (.except symbol)
- ["_" test (.only Test)]
- [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)]]]
+ [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)]])
diff --git a/stdlib/source/specification/compositor/generation/structure.lux b/stdlib/source/specification/compositor/generation/structure.lux
index 5521c6303..9ab5d02f2 100644
--- a/stdlib/source/specification/compositor/generation/structure.lux
+++ b/stdlib/source/specification/compositor/generation/structure.lux
@@ -1,28 +1,30 @@
(.require
- [lux (.except)
- ["_" test (.only Test)]
- ["[0]" ffi (.only import)]
- [abstract
- [monad (.only do)]]
- [control
- ["[0]" pipe]
- ["[0]" maybe]
- ["[0]" try]]
- [data
- [number
- ["n" nat]
- ["i" int]]
- ["[0]" text (.use "[1]#[0]" equivalence)
- ["%" \\format (.only format)]]
- [collection
- ["[0]" array (.only Array)]
- ["[0]" list (.use "[1]#[0]" functor)]]]
- [math
- ["r" random]]
- [meta
- [compiler
- ["[0]" analysis]
- ["[0]" synthesis]]]]
+ [library
+ [lux (.except)
+ ["[0]" ffi (.only import)]
+ [abstract
+ [monad (.only do)]]
+ [control
+ ["[0]" pipe]
+ ["[0]" maybe]
+ ["[0]" try]]
+ [data
+ [number
+ ["n" nat]
+ ["i" int]]
+ ["[0]" text (.use "[1]#[0]" equivalence)
+ ["%" \\format (.only format)]]
+ [collection
+ ["[0]" array (.only Array)]
+ ["[0]" list (.use "[1]#[0]" functor)]]]
+ [math
+ ["r" random]]
+ [meta
+ [compiler
+ ["[0]" analysis]
+ ["[0]" synthesis]]]
+ [test
+ ["_" property (.only Test)]]]]
[///
[common (.only Runner)]])