Am Mi., 5. Jan. 2022 um 11:40 Uhr schrieb Georgi Lyubenov <godzbanebane@gmail.com>:
[...] 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 https://www.haskell.org/onlinereport/haskell2010/haskellch37.html 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.

Cheers,
   S.