X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Foreign%2FPtr.hs;h=514de593cef38c4b573898b13f5c340e7af1e572;hb=2b626ac3e0e5eed595d7480bd18f14db875bb514;hp=4344a9017e902226c72d3e68e84588fd6bf62108;hpb=d42705d82607427de32a603361fc9420c0fd40f9;p=ghc-base.git diff --git a/Foreign/Ptr.hs b/Foreign/Ptr.hs index 4344a90..514de59 100644 --- a/Foreign/Ptr.hs +++ b/Foreign/Ptr.hs @@ -79,7 +79,7 @@ instance Show (Ptr a) where showsPrec p (Ptr a) rs = pad_out (showHex (word2Integer(int2Word#(addr2Int# a))) "") rs where -- want 0s prefixed to pad it out to a fixed length. - pad_out ('0':'x':ls) rs = + pad_out ls rs = '0':'x':(replicate (2*SIZEOF_HSPTR - length ls) '0') ++ ls ++ rs -- word2Integer :: Word# -> Integer (stolen from Word.lhs) word2Integer w = case word2Integer# w of