<div dir="auto"><div dir="auto">The documentation for pokeByteOff indicates that the following equality holds:</div><div dir="auto"><br></div><div dir="auto">  pokeElemOff addr idx x =</div><div dir="auto">    poke (addr `plusPtr` (idx * sizeOf x)) x</div><div dir="auto"><br></div><div dir="auto">Notably, this ignores alignment. It thus seems to imply that sizeOf must always be a multiple of alignment; otherwise, non-zero indices could access non-aligned addresses.</div><div dir="auto"><br></div><div dir="auto">Was this intentional? If so, I believe sizeOf and alignment should document the law. If not, then I believe the {poke,peek}ElemOff laws need to change to something like</div><div dir="auto"><br></div><div dir="auto"><span style="font-family:sans-serif">  pokeElemOff addr idx x =</span></div><div dir="auto"><span style="font-family:sans-serif">     poke (addr `plusPtr` (idx * lcm (sizeOf x) (alignment x))) x</span></div></div>