finos/morphir/1.0.0

Morphir.IR.Literal

Literals represent fixed values in the IR. We support the same set of basic types as Elm which almost matches JSON's supported values:

  • Bool
  • Char
  • String
  • Int
  • Float
type Literal
= BoolLiteral Bool
| CharLiteral Char
| StringLiteral String
| WholeNumberLiteral Int
| FloatLiteral Float
| DecimalLiteral Decimal

Type that represents a literal value.

Represents a boolean value. Only possible values are: True, False

Represents a character value. Some possible values: 'a', 'Z', '3'

Represents a string value. Some possible values: "", "foo", "Bar baz: 123"

Represents an integer value. Some possible values: 0, -1, 9832479

Represents a floating-point number. Some possible values: 1.25, -13.4