
#9164: Hunt down uses of `castPtr` -------------------------------------+------------------------------------ Reporter: nomeata | Owner: Type: task | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by nomeata):
We can't change the type of hPutBuf and friends without potentially breaking code.
hPutBuf hdl buf count writes count 8-bit bytes from the buffer buf to
Is there a stability guarantee on things in the `GHC` namespace? The module name tells me „this is lowevel stuff and may change“, at least between GHC releases and the usual `base` bump. Also, given that the docs state the handle hdl. It returns (). I’d say that `Ptr Word8` is fine – that is how `hPutBuf` uses it, and if I want to pass a `Ptr Double`, I have to think about whether that works. Having to call `castPtr` makes me think about it. (If you agree with this, then this might be a nice ZuriHac beginner task.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9164#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler