diff options
author | Eduardo Julian | 2017-11-06 18:34:51 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-11-06 18:34:51 -0400 |
commit | cab9451961fa25fd6683c1c7bd836941bd84e48b (patch) | |
tree | a03e681579ecc34a84881a2efd8efacea2420e9f /new-luxc/source/luxc/lang/synthesis/expression.lux | |
parent | 4e932a33ac56bb3cb1d7b49771e770e8c373bf8e (diff) |
- Fixed some bugs.
Diffstat (limited to 'new-luxc/source/luxc/lang/synthesis/expression.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/synthesis/expression.lux | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/new-luxc/source/luxc/lang/synthesis/expression.lux b/new-luxc/source/luxc/lang/synthesis/expression.lux index 531606ba7..9ea397576 100644 --- a/new-luxc/source/luxc/lang/synthesis/expression.lux +++ b/new-luxc/source/luxc/lang/synthesis/expression.lux @@ -60,9 +60,9 @@ (-> ls;Synthesis (List ls;Synthesis) ls;Synthesis) (` ("lux call" (~ funcS) (~@ argsS)))) -(def: (synthesize-case synthesize inputA branchesA) +(def: (synthesize-case synthesize outer-arity inputA branchesA) (-> (-> la;Analysis ls;Synthesis) - la;Analysis (List [la;Pattern la;Analysis]) + ls;Arity la;Analysis (List [la;Pattern la;Analysis]) ls;Synthesis) (let [inputS (synthesize inputA)] (case (list;reverse branchesA) @@ -84,7 +84,7 @@ (function [pattern expr] (|> (synthesize expr) (~) ("lux case exec") - ("lux case seq" (~ (caseS;path pattern))) + ("lux case seq" (~ (caseS;path outer-arity pattern))) (`)))) pathS (list/fold caseS;weave (transform-branch lastP lastA) @@ -143,7 +143,7 @@ (var$ (maybe;default var (dict;get var resolver)))) (^code ("lux case" (~ inputA) (~ [_ (#;Record branchesA)]))) - (synthesize-case (recur outer-arity resolver num-locals) inputA branchesA) + (synthesize-case (recur outer-arity resolver num-locals) outer-arity inputA branchesA) (^multi (^code ("lux function" [(~@ scope)] (~ bodyA))) [(s;run scope (p;some s;int)) (#e;Success raw-env)]) |