aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux32
1 files changed, 16 insertions, 16 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
index eb5738a11..c967930bf 100644
--- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
+++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
@@ -102,53 +102,53 @@
{/.#Reference reference}
(case reference
- (pattern {reference.#Variable (variable.self)})
+ {reference.#Variable (variable.self)}
(if true_loop?
{.#None}
{.#Some expr})
- (pattern (reference.constant constant))
+ (reference.constant constant)
{.#Some expr}
- (pattern (reference.local register))
+ (reference.local register)
{.#Some {/.#Reference (reference.local (register_optimization offset register))}}
- (pattern (reference.foreign register))
+ (reference.foreign register)
(if true_loop?
(list.item register scope_environment)
{.#Some expr}))
- (pattern (/.branch/case [input path]))
+ (/.branch/case [input path])
(do maybe.monad
[input' (again false input)
path' (path_optimization (again return?) offset path)]
(in (|> path' [input'] /.branch/case)))
- (pattern (/.branch/exec [this that]))
+ (/.branch/exec [this that])
(do maybe.monad
[this (again false this)
that (again return? that)]
(in (/.branch/exec [this that])))
- (pattern (/.branch/let [input register body]))
+ (/.branch/let [input register body])
(do maybe.monad
[input' (again false input)
body' (again return? body)]
(in (/.branch/let [input' (register_optimization offset register) body'])))
- (pattern (/.branch/if [input then else]))
+ (/.branch/if [input then else])
(do maybe.monad
[input' (again false input)
then' (again return? then)
else' (again return? else)]
(in (/.branch/if [input' then' else'])))
- (pattern (/.branch/get [path record]))
+ (/.branch/get [path record])
(do maybe.monad
[record (again false record)]
(in (/.branch/get [path record])))
- (pattern (/.loop/scope scope))
+ (/.loop/scope scope)
(do [! maybe.monad]
[inits' (|> scope
(the /.#inits)
@@ -158,24 +158,24 @@
/.#inits inits'
/.#iteration iteration'])))
- (pattern (/.loop/again args))
+ (/.loop/again args)
(|> args
(monad.each maybe.monad (again false))
(maybe#each (|>> /.loop/again)))
- (pattern (/.function/abstraction [environment arity body]))
+ (/.function/abstraction [environment arity body])
(do [! maybe.monad]
[environment' (monad.each ! (again false) environment)]
(in (/.function/abstraction [environment' arity body])))
- (pattern (/.function/apply [abstraction arguments]))
+ (/.function/apply [abstraction arguments])
(do [! maybe.monad]
[arguments' (monad.each ! (again false) arguments)]
(with_expansions [<application> (these (do !
[abstraction' (again false abstraction)]
(in (/.function/apply [abstraction' arguments']))))]
(case abstraction
- (pattern {/.#Reference {reference.#Variable (variable.self)}})
+ {/.#Reference {reference.#Variable (variable.self)}}
(if (and return?
(n.= arity (list.size arguments)))
(in (/.loop/again arguments'))
@@ -187,14 +187,14 @@
<application>)))
... TODO: Stop relying on this custom code.
- (pattern {/.#Extension ["lux syntax char case!" (list.partial input else matches)]})
+ {/.#Extension ["lux syntax char case!" (list.partial input else matches)]}
(if return?
(do [! maybe.monad]
[input (again false input)
matches (monad.each !
(function (_ match)
(case match
- (pattern {/.#Structure {analysis/complex.#Tuple (list when then)}})
+ {/.#Structure {analysis/complex.#Tuple (list when then)}}
(do !
[when (again false when)
then (again return? then)]