index.ts FAILURE!!!!
This commit is contained in:
parent
c5e08cfdb6
commit
6a87e8db28
|
@ -81,10 +81,13 @@ function tag<a, b>(x: a, y: b): tagged<a, b> {
|
|||
return { tag: x, value: y };
|
||||
}
|
||||
|
||||
export abstract class internalCode { protected opaque!: any }; /* simulate opaque types */
|
||||
|
||||
export type squiggleExpression =
|
||||
| tagged<"symbol", string>
|
||||
| tagged<"string", string>
|
||||
| tagged<"call", string>
|
||||
| tagged<"lambda", [string[], internalCode]>
|
||||
| tagged<"array", squiggleExpression[]>
|
||||
| tagged<"boolean", boolean>
|
||||
| tagged<"distribution", Distribution>
|
||||
|
@ -115,6 +118,8 @@ function createTsExport(
|
|||
return tag("boolean", x.value);
|
||||
case "EvCall":
|
||||
return tag("call", x.value);
|
||||
case "EvLambda":
|
||||
return tag("lambda", x.value);
|
||||
case "EvDistribution":
|
||||
return tag("distribution", new Distribution(x.value, sampEnv));
|
||||
case "EvNumber":
|
||||
|
|
Loading…
Reference in New Issue
Block a user