Elm Exactly

Rule 160e-dec-bytes

DecodingDecτ(j)=v\Dec{\tau}(j)=v
DecBytes(bytes(o1⋯ok))=binary [o1,…,ok]\frac{\begin{array}{c}\end{array}}{\begin{array}{c}\Dec{\tBytes}(\effbytes(o_1\cdots o_k))=\dbbin\,[o_1,\ldots,o_k]\end{array}}
(160)
Read it in its chapter·Permanent address: /standard/rules/e-dec-bytes

Comments

A byte sequence, and nothing else, decodes at Bytes: DecBytes(j)\Dec{\tBytes}(j) is undefined for every JSON value jj, so a string or an array of numbers sent to a Bytes port is rejected at the boundary.

TeX source
\defnrule[r:e-dec-bytes]
  {}
  {\Dec{\tBytes}(\effbytes(o_1\cdots o_k))=\dbbin\,[o_1,\ldots,o_k]}

Tests (2)

Discussions

Discuss this rule·Search the discussions on GitHub

Discussions are on GitHub; one about this rule has [r:e-dec-bytes] 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.