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

Make tokenTypeOf more precise #325

Merged
merged 3 commits into from
Sep 8, 2023
Merged

Make tokenTypeOf more precise #325

merged 3 commits into from
Sep 8, 2023

Conversation

dnadales
Copy link
Contributor

Now tokenTypeOf distinguishes between:

  • Unsigned 64 bit integers (0 <= n < 2^64): TypeUInt64
  • Negative 64 bit integers (-2^64 < n < 0 ): TypeNInt64
  • Integers outside the ranges above : TypeInteger

Fixes #324

Now `tokenTypeOf` distinguishes between:

- Unsigned 64 bit integers `(0     <= n < 2^64)`: `TypeUInt64`
- Negative 64 bit integers `(-2^64 < n  < 0   )`: `TypeNInt64`
- Integers outside the ranges above             : `TypeInteger`

Fixes well-typed#324
Copy link
Member

@dcoutts dcoutts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, lets check CI passes ok.

cborg/src/Codec/CBOR/FlatTerm.hs Outdated Show resolved Hide resolved
@dcoutts dcoutts merged commit c8013b3 into well-typed:master Sep 8, 2023
8 checks passed
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

Successfully merging this pull request may close these issues.

fromFlatTerm impl of PeekTokenType is insufficently precise
2 participants