Literals represent fixed values in the IR. We support the same set of basic types as Elm which almost matches JSON's supported values:
Type that represents a literal value.
boolLiteral : Basics.Bool -> Literal
Represents a boolean value. Only possible values are: True
, False
charLiteral : Char -> Literal
Represents a character value. Some possible values: 'a'
, 'Z'
, '3'
stringLiteral : String -> Literal
Represents a string value. Some possible values: ""
, "foo"
, "Bar baz: 123"
intLiteral : Basics.Int -> Literal
Represents an integer value. Some possible values: 0
, -1
, 9832479
floatLiteral : Basics.Float -> Literal
Represents a floating-point number. Some possible values: 1.25
, -13.4