Storable instance of () is broken

Sven Panne svenpanne at
Wed Jan 5 10:51:14 UTC 2022

Am Mi., 5. Jan. 2022 um 11:40 Uhr schrieb Georgi Lyubenov <
godzbanebane at>:

> [...] However, here, trying to store undefined :: () is no different from
> trying to store () :: (). Is this difference in behaviour with other
> instances of Storable (where presumably trying to store undefined will blow
> up, as there is indeed some work to do there) intentionally ignored?

Good point, this might be seen as a bug/inconsistency of Storable (): peek
and poke are not strict in their arguments, while probably all(?) other
instances are. But doesn't
require this, so I would be reluctant to really call this a bug. Changing
this can have "interesting" effects on the ecosystem, too, who knows?
Again, this would be a change where the compiler doesn't help you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list