Skip to content

Add FromDhall instances for {Int,Word}{,8,16,32,64} #2012

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

Merged
merged 2 commits into from
Aug 30, 2020

Conversation

Gabriella439
Copy link
Collaborator

Fixes #2007

Copy link
Collaborator

@german1608 german1608 left a comment

Choose a reason for hiding this comment

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

Really cool! That TypeApplication extension fitted perfectly here.

Copy link
Collaborator

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

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

Does the fact that the added decoders can fail after type-checking actually matter in practice?! If so, it should possibly be highlighted in the haddocks.

… as caught by @sjakobi

Co-authored-by: Simon Jakobi <simon.jakobi@gmail.com>
@Gabriella439
Copy link
Collaborator Author

@sjakobi: Yeah, this is a departure from my previous policy of only providing Decoders that could never fail if the type matched. The thing that tipped me over the edge was that we already do this for set and also I'm reasonably confident that our users are already doing this in the wild, too (e.g. for dates and IP addresses)

@Gabriella439 Gabriella439 merged commit 7810c4f into master Aug 30, 2020
@Gabriella439 Gabriella439 deleted the gabriel/int_instances branch August 30, 2020 17:24
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.

FromDhall instance for Word8, Word16, Word32
3 participants