fix
This commit is contained in:
parent
ecbdb92fe9
commit
b0abdd4619
|
@ -64,8 +64,8 @@ in `node_modules`, until the error no longer applies. Changing
|
|||
|
||||
[MIT License]: https://img.shields.io/badge/license-MIT-blue.svg
|
||||
[Unlambda]: http://www.madore.org/~david/programs/unlambda/
|
||||
[CPS]: https://en.wikipedia.org/wiki/Continuation-passing_style/
|
||||
[Tail Call]: https://en.wikipedia.org/wiki/Tail_call/
|
||||
[CPS]: https://en.wikipedia.org/wiki/Continuation-passing_style
|
||||
[Tail Call]: https://en.wikipedia.org/wiki/Tail_call
|
||||
[TSC checker]:
|
||||
https://github.com/microsoft/TypeScript/blob/v4.1.2/src/compiler/checker.ts
|
||||
[PR 29602]: https://github.com/microsoft/TypeScript/pull/29602
|
||||
|
|
|
@ -97,8 +97,8 @@ type Apply<L /* extends Func */, R /* extends Func */, Cont, IO> =
|
|||
* Evalutate an expression.
|
||||
*/
|
||||
export type Eval<E /* extends Expression */, Cont, IO> =
|
||||
// Expression is a function, apply the continuation.
|
||||
E extends Func ? Continue<Cont, E, IO>
|
||||
// Expression is an application, evaluate the left part (the "operator").
|
||||
: E extends [infer L, infer R] ? Eval<L, ['a1', R, Cont], IO>
|
||||
: never;
|
||||
// Expression is a function, apply the continuation.
|
||||
E extends Func ? Continue<Cont, E, IO>
|
||||
// Expression is an application, evaluate the left part (the "operator").
|
||||
: E extends [infer L, infer R] ? Eval<L, ['a1', R, Cont], IO>
|
||||
: never;
|
||||
|
|
Loading…
Reference in New Issue