toString for each squiggleValue
This commit is contained in:
parent
2fc325beb6
commit
e2491bda88
|
@ -4,3 +4,7 @@ type squiggleValue = ForTS_SquiggleValue.squiggleValue
|
||||||
@genType
|
@genType
|
||||||
let getValues = (v: squiggleValue_Array): array<squiggleValue> =>
|
let getValues = (v: squiggleValue_Array): array<squiggleValue> =>
|
||||||
ReducerInterface_InternalExpressionValue.arrayToValueArray(v)
|
ReducerInterface_InternalExpressionValue.arrayToValueArray(v)
|
||||||
|
|
||||||
|
@genType
|
||||||
|
let toString = (v: squiggleValue_Array): string =>
|
||||||
|
ReducerInterface_InternalExpressionValue.toStringArray(v)
|
||||||
|
|
|
@ -1 +1,5 @@
|
||||||
@genType type squiggleValue_Declaration = ReducerInterface_InternalExpressionValue.lambdaDeclaration //re-export
|
@genType type squiggleValue_Declaration = ReducerInterface_InternalExpressionValue.lambdaDeclaration //re-export
|
||||||
|
|
||||||
|
@genType
|
||||||
|
let toString = (v: squiggleValue_Declaration): string =>
|
||||||
|
ReducerInterface_InternalExpressionValue.toStringDeclaration(v)
|
||||||
|
|
|
@ -1 +1,5 @@
|
||||||
@genType type squiggleValue_Distribution = ForTS_Distribution.distribution
|
@genType type squiggleValue_Distribution = ForTS_Distribution.distribution
|
||||||
|
|
||||||
|
@genType
|
||||||
|
let toString = (v: squiggleValue_Distribution): string =>
|
||||||
|
ReducerInterface_InternalExpressionValue.toStringDistribution(v)
|
||||||
|
|
|
@ -1 +1,5 @@
|
||||||
@genType type squiggleValue_Lambda = ReducerInterface_InternalExpressionValue.lambdaValue //re-export
|
@genType type squiggleValue_Lambda = ReducerInterface_InternalExpressionValue.lambdaValue //re-export
|
||||||
|
|
||||||
|
@genType
|
||||||
|
let toString = (v: squiggleValue_Lambda): string =>
|
||||||
|
ReducerInterface_InternalExpressionValue.toStringLambda(v)
|
||||||
|
|
|
@ -4,3 +4,7 @@ type squiggleValue = ForTS_SquiggleValue.squiggleValue //use
|
||||||
@genType
|
@genType
|
||||||
let getKeyValuePairs = (v: squiggleValue_Module): array<(string, squiggleValue)> =>
|
let getKeyValuePairs = (v: squiggleValue_Module): array<(string, squiggleValue)> =>
|
||||||
ReducerInterface_InternalExpressionValue.nameSpaceToKeyValuePairs(v)
|
ReducerInterface_InternalExpressionValue.nameSpaceToKeyValuePairs(v)
|
||||||
|
|
||||||
|
@genType
|
||||||
|
let toString = (v: squiggleValue_Module): string =>
|
||||||
|
ReducerInterface_InternalExpressionValue.toStringNameSpace(v)
|
||||||
|
|
|
@ -4,3 +4,6 @@ type squiggleValue = ForTS_SquiggleValue.squiggleValue //use
|
||||||
@genType
|
@genType
|
||||||
let getKeyValuePairs = (value: squiggleValue_Record): array<(string, squiggleValue)> =>
|
let getKeyValuePairs = (value: squiggleValue_Record): array<(string, squiggleValue)> =>
|
||||||
ReducerInterface_InternalExpressionValue.recordToKeyValuePairs(value)
|
ReducerInterface_InternalExpressionValue.recordToKeyValuePairs(value)
|
||||||
|
|
||||||
|
@genType
|
||||||
|
let toString = (v: squiggleValue_Record) => ReducerInterface_InternalExpressionValue.toStringMap(v)
|
||||||
|
|
|
@ -4,3 +4,7 @@ type squiggleValue = ForTS_SquiggleValue.squiggleValue //use
|
||||||
@genType
|
@genType
|
||||||
let getKeyValuePairs = (value: squiggleValue_Type): array<(string, squiggleValue)> =>
|
let getKeyValuePairs = (value: squiggleValue_Type): array<(string, squiggleValue)> =>
|
||||||
ReducerInterface_InternalExpressionValue.recordToKeyValuePairs(value)
|
ReducerInterface_InternalExpressionValue.recordToKeyValuePairs(value)
|
||||||
|
|
||||||
|
@genType
|
||||||
|
let toString = (value: squiggleValue_Type): string =>
|
||||||
|
ReducerInterface_InternalExpressionValue.toStringType(value)
|
||||||
|
|
|
@ -59,27 +59,30 @@ let rec toString = aValue =>
|
||||||
| IEvTypeIdentifier(id) => toStringTypeIdentifier(id)
|
| IEvTypeIdentifier(id) => toStringTypeIdentifier(id)
|
||||||
| IEvVoid => toStringVoid
|
| IEvVoid => toStringVoid
|
||||||
}
|
}
|
||||||
and toStringArray = (anArray) => {let args = anArray->Js.Array2.map(each => toString(each))->Js.Array2.toString
|
and toStringArray = anArray => {
|
||||||
`[${args}]`}
|
let args = anArray->Js.Array2.map(each => toString(each))->Js.Array2.toString
|
||||||
and toStringArrayString = (anArray) => {
|
`[${args}]`
|
||||||
|
}
|
||||||
|
and toStringArrayString = anArray => {
|
||||||
let args = anArray->Js.Array2.toString
|
let args = anArray->Js.Array2.toString
|
||||||
`[${args}]`
|
`[${args}]`
|
||||||
}
|
}
|
||||||
and toStringBindings = (m) => `@${m->toStringNameSpace}`
|
and toStringBindings = m => `@${m->toStringNameSpace}`
|
||||||
and toStringBool = (aBool) => Js.String.make(aBool)
|
and toStringBool = aBool => Js.String.make(aBool)
|
||||||
and toStringCall = (fName) => `:${fName}`
|
and toStringCall = fName => `:${fName}`
|
||||||
and toStringDate = (date) => DateTime.Date.toString(date)
|
and toStringDate = date => DateTime.Date.toString(date)
|
||||||
and toStringDeclaration = (d) => Declaration.toString(d, r => toString(IEvLambda(r)))
|
and toStringDeclaration = d => Declaration.toString(d, r => toString(IEvLambda(r)))
|
||||||
and toStringDistribution = (dist) => GenericDist.toString(dist)
|
and toStringDistribution = dist => GenericDist.toString(dist)
|
||||||
and toStringLambda = (lambdaValue) => `lambda(${Js.Array2.toString(lambdaValue.parameters)}=>internal code)`
|
and toStringLambda = lambdaValue =>
|
||||||
and toStringFunction = (lambdaValue) => `function(${Js.Array2.toString(lambdaValue.parameters)})`
|
`lambda(${Js.Array2.toString(lambdaValue.parameters)}=>internal code)`
|
||||||
and toStringNumber = (aNumber) => Js.String.make(aNumber)
|
and toStringFunction = lambdaValue => `function(${Js.Array2.toString(lambdaValue.parameters)})`
|
||||||
and toStringRecord = (aMap) => aMap->toStringMap
|
and toStringNumber = aNumber => Js.String.make(aNumber)
|
||||||
and toStringString = (aString) => `'${aString}'`
|
and toStringRecord = aMap => aMap->toStringMap
|
||||||
and toStringSymbol = (aString) => `:${aString}`
|
and toStringString = aString => `'${aString}'`
|
||||||
and toStringTimeDuration = (t) => DateTime.Duration.toString(t)
|
and toStringSymbol = aString => `:${aString}`
|
||||||
and toStringType = (aMap) => aMap->toStringMap
|
and toStringTimeDuration = t => DateTime.Duration.toString(t)
|
||||||
and toStringTypeIdentifier = (id) => `#${id}`
|
and toStringType = aMap => aMap->toStringMap
|
||||||
|
and toStringTypeIdentifier = id => `#${id}`
|
||||||
and toStringVoid = `()`
|
and toStringVoid = `()`
|
||||||
|
|
||||||
and toStringMap = aMap => {
|
and toStringMap = aMap => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user