Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TTagged 2 (TList []) fails to deserialise #250

Open
j-mueller opened this issue Oct 26, 2020 · 1 comment
Open

TTagged 2 (TList []) fails to deserialise #250

j-mueller opened this issue Oct 26, 2020 · 1 comment

Comments

@j-mueller
Copy link

j-mueller commented Oct 26, 2020

in cabal new-repl:

> import Codec.CBOR.Term
> import Codec.CBOR.Write
> import Codec.CBOR.Read
> deserialiseFromBytes decodeTerm (toLazyByteString $ encodeTerm $ TTagged 2 (TList []))
Left (DeserialiseFailure 0 "expected integer")

Note that it only fails if the tag is 2 or 3. It seems to work for values 0-1 and anything above 3.

@j-mueller
Copy link
Author

If I interpret this correctly, can we only use values from 0:1:[4..26] as tags? So maybe we are using the Tag constructor incorrectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant