A note: if you use generic-deriving instead of ghc-prim, the generics code could in theory be portable as well. That package re-exports from ghc-prim when compiled with GHC, and provides a compatible fallback implementation.<br>