Unconditionally make a (Show Ptr) instance
authorIan Lynagh <igloo@earth.li>
Sat, 20 Jun 2009 20:48:09 +0000 (20:48 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 20 Jun 2009 20:48:09 +0000 (20:48 +0000)
It used to only exist if (WORD_SIZE_IN_BITS == 32 || WORD_SIZE_IN_BITS == 64)

GHC/Ptr.lhs

index 7841cf3..8087c77 100644 (file)
@@ -145,9 +145,7 @@ castPtrToFunPtr (Ptr addr) = FunPtr addr
 
 ------------------------------------------------------------------------
 -- Show instances for Ptr and FunPtr
--- I have absolutely no idea why the WORD_SIZE_IN_BITS stuff is here
 
-#if (WORD_SIZE_IN_BITS == 32 || WORD_SIZE_IN_BITS == 64)
 instance Show (Ptr a) where
    showsPrec _ (Ptr a) rs = pad_out (showHex (wordToInteger(int2Word#(addr2Int# a))) "")
      where
@@ -157,6 +155,5 @@ instance Show (Ptr a) where
 
 instance Show (FunPtr a) where
    showsPrec p = showsPrec p . castFunPtrToPtr
-#endif
 \end{code}