<div dir="ltr"><div>For what it's worth, Ocaml uses the fact that pointers are word-aligned (hence even numbers) to let the gc distinguish between unboxed values and pointers: 63-bit integers are made odd by representing n as (2n+1).</div><div><br></div><div>But GHC also makes use of the word-alignment of pointers: it is used for pointer tagging [ <a href="https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/rts/haskell-execution/pointer-tagging">https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/rts/haskell-execution/pointer-tagging</a> ]. The tag is, for a closure that has been forced, a representation of its constructor (only the 7 first constructors can be so tagged, if I understand correctly). This is an optimisation for pattern matching: you don't have to run the closure's entry code every time you pattern-match.</div><div><br></div><div>The bottom-line is that it can't be true, in GHC, that odd values are unboxed and even values are pointers, since odd pointers already exist. Not sure whether the optimisation can be recovered.</div><div><br></div><div>Best,</div><div>Arnaud<br></div></div>