Documentation of RuntimeRep is wrong about 64-bit integer reps
Documentation of Int64Rep
and Word64Rep
currently have the note "on 32-bit only" which seems wrong. Here's an example (this is on a 64-bit system):
~ $ cat Main.hs
{-# LANGUAGE TypeApplications, MagicHash #-}
import Type.Reflection
import GHC.Types
import GHC.Prim
import Data.Int
main = do
print (splitApps (typeRepKind (typeRep @Int64#)))
print (splitApps (typeRepKind (typeRep @Int#)))
~ $ ghc Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
~ $ ./Main
(TYPE,['Int64Rep])
(TYPE,['IntRep])
The documentation seems to suggest that Int64Rep
should only be used on 32-bit systems, and we should get IntRep
for Int64#
on 64-bit.
(The same comments exist in GHC HEAD source tree too)
(cc @rae)