You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Codec.CBOR.Term implements encoding/decoding of lists and maps, but they're not exported, so they can't be used elsewhere. For example, the instance for Serialise [a] uses very similar code.
It would be nice to export something like:
decodeListOf :: Decoder s x -> Decoder s [x]
decodeListOf decoder = CBOR.decodeListLenOrIndef >>= \case
Nothing -> decodeSequenceLenIndef (flip (:)) [] reverse decoder
Just n -> decodeSequenceLenN (flip (:)) [] reverse n decoder
plus encoding, and maybe something similar for maps?
The text was updated successfully, but these errors were encountered:
Codec.CBOR.Term
implements encoding/decoding of lists and maps, but they're not exported, so they can't be used elsewhere. For example, the instance forSerialise [a]
uses very similar code.It would be nice to export something like:
plus encoding, and maybe something similar for maps?
The text was updated successfully, but these errors were encountered: