internalCode
This commit is contained in:
parent
fe4e355fbe
commit
5d88fae40c
|
@ -5,12 +5,16 @@
|
||||||
module Extra_Array = Reducer_Extra_Array
|
module Extra_Array = Reducer_Extra_Array
|
||||||
module ErrorValue = Reducer_ErrorValue
|
module ErrorValue = Reducer_ErrorValue
|
||||||
|
|
||||||
|
@genType.opaque
|
||||||
|
type internalCode = Object
|
||||||
|
|
||||||
@genType
|
@genType
|
||||||
type rec expressionValue =
|
type rec expressionValue =
|
||||||
| EvArray(array<expressionValue>)
|
| EvArray(array<expressionValue>)
|
||||||
| EvBool(bool)
|
| EvBool(bool)
|
||||||
| EvCall(string) // External function call
|
| EvCall(string) // External function call
|
||||||
| EvDistribution(GenericDist_Types.genericDist)
|
| EvDistribution(GenericDist_Types.genericDist)
|
||||||
|
| EvLambda(array<string>, internalCode)
|
||||||
| EvNumber(float)
|
| EvNumber(float)
|
||||||
| EvRecord(Js.Dict.t<expressionValue>)
|
| EvRecord(Js.Dict.t<expressionValue>)
|
||||||
| EvString(string)
|
| EvString(string)
|
||||||
|
@ -25,6 +29,7 @@ let rec toString = aValue =>
|
||||||
switch aValue {
|
switch aValue {
|
||||||
| EvBool(aBool) => Js.String.make(aBool)
|
| EvBool(aBool) => Js.String.make(aBool)
|
||||||
| EvCall(fName) => `:${fName}`
|
| EvCall(fName) => `:${fName}`
|
||||||
|
| EvLambda(parameters, _internalCode) => `lambda(${Js.Array2.toString(parameters)}=>internal)`
|
||||||
| EvNumber(aNumber) => Js.String.make(aNumber)
|
| EvNumber(aNumber) => Js.String.make(aNumber)
|
||||||
| EvString(aString) => `'${aString}'`
|
| EvString(aString) => `'${aString}'`
|
||||||
| EvSymbol(aString) => `:${aString}`
|
| EvSymbol(aString) => `:${aString}`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user