aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source
diff options
context:
space:
mode:
authorEduardo Julian2018-07-19 20:29:36 -0400
committerEduardo Julian2018-07-19 20:29:36 -0400
commit9740c0a197dc41f816b6ac72d379ed12ed0d4f01 (patch)
tree27429a119bd82a023281ed4b378cad88b9e11d9e /stdlib/source
parent15ba10ff986fa4fa5df8432ab47a8103b0200d30 (diff)
WIP: Fix new-luxc's JVM back-end. [Part 2]
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/language/compiler/synthesis.lux13
-rw-r--r--stdlib/source/lux/language/compiler/synthesis/expression.lux20
2 files changed, 20 insertions, 13 deletions
diff --git a/stdlib/source/lux/language/compiler/synthesis.lux b/stdlib/source/lux/language/compiler/synthesis.lux
index baea48c30..f4d7a6407 100644
--- a/stdlib/source/lux/language/compiler/synthesis.lux
+++ b/stdlib/source/lux/language/compiler/synthesis.lux
@@ -63,10 +63,14 @@
#arity Arity
#body s})
+(type: #export (Apply' s)
+ {#function s
+ #arguments (List s)})
+
(type: #export (Branch s)
- (#Case s (Path' s))
(#Let s Register s)
- (#If s s s))
+ (#If s s s)
+ (#Case s (Path' s)))
(type: #export (Scope s)
{#start Register
@@ -151,6 +155,9 @@
(type: #export Abstraction
(Abstraction' Synthesis))
+(type: #export Apply
+ (Apply' Synthesis))
+
(def: #export unit Text "")
(do-template [<name> <value>]
@@ -248,8 +255,8 @@
[branch/let #..Branch #..Let]
[branch/if #..Branch #..If]
- [loop/scope #..Loop #..Scope]
[loop/recur #..Loop #..Recur]
+ [loop/scope #..Loop #..Scope]
[function/abstraction #..Function #..Abstraction]
[function/apply #..Function #..Apply]
diff --git a/stdlib/source/lux/language/compiler/synthesis/expression.lux b/stdlib/source/lux/language/compiler/synthesis/expression.lux
index be20b7b0b..999d49b15 100644
--- a/stdlib/source/lux/language/compiler/synthesis/expression.lux
+++ b/stdlib/source/lux/language/compiler/synthesis/expression.lux
@@ -54,16 +54,6 @@
[tupleS (monad.map @ synthesize (analysis.tuple analysis))]
(wrap (#//.Structure (#//.Tuple tupleS)))))
- (#analysis.Apply _)
- (function.apply (|>> synthesize //.indirectly) analysis)
-
- (#analysis.Function environmentA bodyA)
- (function.function synthesize environmentA bodyA)
-
- (#analysis.Extension name args)
- (extension.apply (|>> synthesize //.indirectly)
- [name args])
-
(#analysis.Reference reference)
(case reference
(#reference.Constant constant)
@@ -91,4 +81,14 @@
(#analysis.Case inputA branchesAB+)
(case.synthesize (|>> synthesize //.indirectly) inputA branchesAB+)
+
+ (#analysis.Apply _)
+ (function.apply (|>> synthesize //.indirectly) analysis)
+
+ (#analysis.Function environmentA bodyA)
+ (function.function synthesize environmentA bodyA)
+
+ (#analysis.Extension name args)
+ (extension.apply (|>> synthesize //.indirectly)
+ [name args])
))