From 7dd9a5bb7709a883c597d621429d9a6cbb6d58ee Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Thu, 25 Aug 2022 17:47:28 +0400 Subject: [PATCH] string enum for SquiggleValue tags --- .../ForTS_SquiggleValue.res | 70 +++++++++---------- .../ForTS_SquiggleValue_tag.ts | 34 ++++----- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/packages/squiggle-lang/src/rescript/ForTS/ForTS_SquiggleValue/ForTS_SquiggleValue.res b/packages/squiggle-lang/src/rescript/ForTS/ForTS_SquiggleValue/ForTS_SquiggleValue.res index 3d7586ff..30ce6f8c 100644 --- a/packages/squiggle-lang/src/rescript/ForTS/ForTS_SquiggleValue/ForTS_SquiggleValue.res +++ b/packages/squiggle-lang/src/rescript/ForTS/ForTS_SquiggleValue/ForTS_SquiggleValue.res @@ -12,61 +12,61 @@ type squiggleValue_Lambda = ForTS_SquiggleValue_Lambda.squiggleValue_Lambda //us // Return values are kept as they are if they are JavaScript types. -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtArray_: int = "SvtArray" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtArray_: string = "SvtArray" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtArrayString_: int = "SvtArrayString" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtArrayString_: string = "SvtArrayString" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtBool_: int = "SvtBool" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtBool_: string = "SvtBool" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtCall_: int = "SvtCall" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtCall_: string = "SvtCall" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtDate_: int = "SvtDate" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtDate_: string = "SvtDate" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtDeclaration_: int = "SvtDeclaration" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtDeclaration_: string = "SvtDeclaration" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtDistribution_: int = "SvtDistribution" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtDistribution_: string = "SvtDistribution" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtLambda_: int = "SvtLambda" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtLambda_: string = "SvtLambda" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtModule_: int = "SvtModule" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtModule_: string = "SvtModule" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtNumber_: int = "SvtNumber" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtNumber_: string = "SvtNumber" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtRecord_: int = "SvtRecord" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtRecord_: string = "SvtRecord" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtString_: int = "SvtString" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtString_: string = "SvtString" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtSymbol_: int = "SvtSymbol" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtSymbol_: string = "SvtSymbol" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtTimeDuration_: int = "SvtTimeDuration" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtTimeDuration_: string = "SvtTimeDuration" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtType_: int = "SvtType" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtType_: string = "SvtType" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtTypeIdentifier_: int = "SvtUndefined" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtTypeIdentifier_: string = "SvtUndefined" -@module("ForTS_SquiggleValue_tag") @scope("squiggleValueTag") -external svtVoid_: int = "SvtVoid" +@module("./ForTS_SquiggleValue_tag") @scope("squiggleValueTag") +external svtVoid_: string = "SvtVoid" @genType.import("./ForTS_SquiggleValue_tag") type squiggleValueTag -external castEnum: int => squiggleValueTag = "%identity" +external castEnum: string => squiggleValueTag = "%identity" @genType let getTag = (variant: squiggleValue): squiggleValueTag => diff --git a/packages/squiggle-lang/src/rescript/ForTS/ForTS_SquiggleValue/ForTS_SquiggleValue_tag.ts b/packages/squiggle-lang/src/rescript/ForTS/ForTS_SquiggleValue/ForTS_SquiggleValue_tag.ts index 6393ca60..f8b4a9e3 100644 --- a/packages/squiggle-lang/src/rescript/ForTS/ForTS_SquiggleValue/ForTS_SquiggleValue_tag.ts +++ b/packages/squiggle-lang/src/rescript/ForTS/ForTS_SquiggleValue/ForTS_SquiggleValue_tag.ts @@ -1,19 +1,19 @@ export enum squiggleValueTag { - SvtArray, - SvtArrayString, - SvtBool, - SvtCall, - SvtDate, - SvtDeclaration, - SvtDistribution, - SvtLambda, - SvtModule, - SvtNumber, - SvtRecord, - SvtString, - SvtSymbol, - SvtTimeDuration, - SvtType, - SvtTypeIdentifier, - SvtVoid, + SvtArray = "Array", + SvtArrayString = "ArrayString", + SvtBool = "Bool", + SvtCall = "Call", + SvtDate = "Date", + SvtDeclaration = "Declaration", + SvtDistribution = "Distribution", + SvtLambda = "Lambda", + SvtModule = "Module", + SvtNumber = "Number", + SvtRecord = "Record", + SvtString = "String", + SvtSymbol = "Symbol", + SvtTimeDuration = "TimeDuration", + SvtType = "Type", + SvtTypeIdentifier = "TypeIdentifier", + SvtVoid = "Void", }