From 6a87e8db28b486fc58eef26f1eded516d737626a Mon Sep 17 00:00:00 2001 From: Umur Ozkul Date: Mon, 25 Apr 2022 09:20:27 +0200 Subject: [PATCH] index.ts FAILURE!!!! --- packages/squiggle-lang/src/js/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/squiggle-lang/src/js/index.ts b/packages/squiggle-lang/src/js/index.ts index 6ff022e0..c8731b0f 100644 --- a/packages/squiggle-lang/src/js/index.ts +++ b/packages/squiggle-lang/src/js/index.ts @@ -81,10 +81,13 @@ function tag(x: a, y: b): tagged { 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":