fix debugging code
authorSimon Marlow <marlowsd@gmail.com>
Thu, 27 Aug 2009 15:06:28 +0000 (15:06 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 27 Aug 2009 15:06:28 +0000 (15:06 +0000)
GHC/IO/Handle/Internals.hs

index 403407f..3214bfd 100644 (file)
@@ -680,7 +680,7 @@ hLookAhead_ handle_@Handle__{..} = do
 debugIO :: String -> IO ()
 #if defined(DEBUG_DUMP)
 debugIO s = do 
-  withCStringLen (s++"\n") $ \(p,len) -> c_write 1 p (fromIntegral len)
+  withCStringLen (s++"\n") $ \(p,len) -> c_write 1 (castPtr p) (fromIntegral len)
   return ()
 #else
 debugIO s = return ()