aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/specification/compositor/generation/function.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/specification/compositor/generation/function.lux')
-rw-r--r--stdlib/source/specification/compositor/generation/function.lux36
1 files changed, 18 insertions, 18 deletions
diff --git a/stdlib/source/specification/compositor/generation/function.lux b/stdlib/source/specification/compositor/generation/function.lux
index 1708264a2..9a2f68a8a 100644
--- a/stdlib/source/specification/compositor/generation/function.lux
+++ b/stdlib/source/specification/compositor/generation/function.lux
@@ -43,9 +43,9 @@
local (..local arity)]
(in [arity local
(synthesis.function/abstraction
- [#synthesis.environment (list)
- #synthesis.arity arity
- #synthesis.body (synthesis.variable/local local)])])))
+ [synthesis.#environment (list)
+ synthesis.#arity arity
+ synthesis.#body (synthesis.variable/local local)])])))
(def: .public (spec run)
(-> Runner Test)
@@ -57,39 +57,39 @@
inputsS (list\each (|>> synthesis.f64) inputs)]]
($_ _.and
(_.test "Can read arguments."
- (|> (synthesis.function/apply [#synthesis.function functionS
- #synthesis.arguments inputsS])
+ (|> (synthesis.function/apply [synthesis.#function functionS
+ synthesis.#arguments inputsS])
(run "with_local")
(//case.verify expectation)))
(_.test "Can partially apply functions."
(or (n.= 1 arity)
(let [preS (list.first partial_arity inputsS)
postS (list.after partial_arity inputsS)
- partialS (synthesis.function/apply [#synthesis.function functionS
- #synthesis.arguments preS])]
- (|> (synthesis.function/apply [#synthesis.function partialS
- #synthesis.arguments postS])
+ partialS (synthesis.function/apply [synthesis.#function functionS
+ synthesis.#arguments preS])]
+ (|> (synthesis.function/apply [synthesis.#function partialS
+ synthesis.#arguments postS])
(run "partial_application")
(//case.verify expectation)))))
(_.test "Can read environment."
(or (n.= 1 arity)
(let [environment (|> partial_arity
(enum.range n.enum 1)
- (list\each (|>> #reference.Local)))
+ (list\each (|>> {reference.#Local})))
variableS (if (n.<= partial_arity local)
(synthesis.variable/foreign (-- local))
(synthesis.variable/local (|> local (n.- partial_arity))))
inner_arity (n.- partial_arity arity)
innerS (synthesis.function/abstraction
- [#synthesis.environment environment
- #synthesis.arity inner_arity
- #synthesis.body variableS])
+ [synthesis.#environment environment
+ synthesis.#arity inner_arity
+ synthesis.#body variableS])
outerS (synthesis.function/abstraction
- [#synthesis.environment (list)
- #synthesis.arity partial_arity
- #synthesis.body innerS])]
- (|> (synthesis.function/apply [#synthesis.function outerS
- #synthesis.arguments inputsS])
+ [synthesis.#environment (list)
+ synthesis.#arity partial_arity
+ synthesis.#body innerS])]
+ (|> (synthesis.function/apply [synthesis.#function outerS
+ synthesis.#arguments inputsS])
(run "with_foreign")
(//case.verify expectation)))))
)))