More on FreeBSD/amd64

Ian Lynagh igloo at earth.li
Sun Apr 1 18:22:50 EDT 2007


On Sun, Apr 01, 2007 at 06:10:25PM -0400, Gregory Wright wrote:
> 
> >Ah, remove the #if/#endif around the definition of "puts", its export,
> >and the GHC.Pack import in libraries/base/GHC/Handle.hs
> >
> No such luck.  I even copied "puts" into libraries/base/GHC/ 
> ForeignPtr.hs
> but I still get I cycle because I need withCString to define "puts":

Oh, the 6.4.2 definition is different to the 6.6 definition.

Does the 6.6 one work with 6.4.2?:

puts :: String -> IO ()
puts s = do write_rawBuffer 1 (unsafeCoerce# (packCString# s))
                            0 (fromIntegral (length s))
            return ()

(packCString# come from GHC.Pack)


Thanks
Ian



More information about the Glasgow-haskell-users mailing list