Fix scope error in CPS application
This commit is contained in:
parent
38148932f7
commit
b00976d359
1 changed files with 6 additions and 2 deletions
|
@ -51,9 +51,13 @@ let rec cps_term_inner (t: S.term) (cont: T.variable) (nameHint: string option)
|
|||
and fCont = freshBlockVar () in
|
||||
let xVal = freshVarHinted nameHint
|
||||
and fVal = freshVar () in
|
||||
letCont fCont fVal (T.TailCall(T.vvar fVal, T.vvars [xVal; cont])) @@
|
||||
letCont xCont xVal (cps_term_inner f fCont None) @@
|
||||
|
||||
letCont xCont xVal (
|
||||
letCont fCont fVal
|
||||
(T.TailCall(T.vvar fVal, T.vvars [xVal; cont])) @@
|
||||
(cps_term_inner f fCont None)) @@
|
||||
cps_term_inner x xCont None
|
||||
|
||||
| S.Print term ->
|
||||
let curCont = freshBlockVar ()
|
||||
and termVal = freshVar () in
|
||||
|
|
Loading…
Reference in a new issue