aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/synthesis/function.lux
diff options
context:
space:
mode:
authorEduardo Julian2018-05-26 19:49:18 -0400
committerEduardo Julian2018-05-26 19:49:18 -0400
commit223a2fad3a6140b942923fe43712ac0f7d8caf52 (patch)
tree9c95f08a849abfa75277415e26f2abcfe425741a /new-luxc/source/luxc/lang/synthesis/function.lux
parent717ed15dc264d26a642adf22137fac6d526aff25 (diff)
- WIP: Migrated synthesis to stdlib.
Diffstat (limited to 'new-luxc/source/luxc/lang/synthesis/function.lux')
-rw-r--r--new-luxc/source/luxc/lang/synthesis/function.lux29
1 files changed, 0 insertions, 29 deletions
diff --git a/new-luxc/source/luxc/lang/synthesis/function.lux b/new-luxc/source/luxc/lang/synthesis/function.lux
deleted file mode 100644
index 25dd75aff..000000000
--- a/new-luxc/source/luxc/lang/synthesis/function.lux
+++ /dev/null
@@ -1,29 +0,0 @@
-(.module:
- lux
- (luxc (lang ["la" analysis]
- ["ls" synthesis]
- [".L" variable #+ Variable])))
-
-(do-template [<name> <comp> <ref>]
- [(def: #export (<name> arity)
- (-> ls.Arity Bool)
- (<comp> <ref> arity))]
-
- [nested? n/> +1]
- [top? n/= +0]
- )
-
-(def: #export (adjust-var outer var)
- (-> ls.Arity Variable Variable)
- (|> outer n/dec nat-to-int (i/+ var)))
-
-(def: #export (unfold-apply apply)
- (-> la.Analysis [la.Analysis (List la.Analysis)])
- (loop [apply apply
- args (list)]
- (case apply
- (^code ("lux apply" (~ arg) (~ func)))
- (recur func (#.Cons arg args))
-
- _
- [apply args])))