Figurestatic-modules-port-table
| Type | Port? | Reason |
Int, Float, String, Bool | yes | JSON numbers, strings and Booleans |
Bytes | yes | byte sequences, which are not JSON values |
() | yes | JSON null |
Json.Encode.Value, Json.Decode.Value | yes | any JSON value, never a byte sequence |
List , Array | if is | JSON arrays |
Maybe | if is | null or the value |
| 2- and 3-tuples | if each component is | JSON arrays |
| closed records | if each field is | JSON objects |
Char | no | excluded in Standard Elm |
| function types | no | no JSON representation |
| type variables, constrained ones included | no | no JSON representation |
| extensible records | no | unknown fields |
custom types other than Bool and Maybe: Result, Order, Never, Dict, Set, and every custom type of a program | no | no canonical encoding |
Cmd, Sub, Task, and other abstract types of the basis | no | no JSON representation |
Referred to from
Tests (0)
No test of the suite checks this figure yet.
Discussions
Discuss this figure·Search the discussions on GitHub
Discussions are on GitHub; one about this figure has [fig:static-modules-port-table] in its title.
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.