[GHC] #1070: Add hPutNonBlocking to Data.ByteString
GHC
trac at galois.com
Wed Apr 18 03:15:42 EDT 2007
#1070: Add hPutNonBlocking to Data.ByteString
----------------------------+-----------------------------------------------
Reporter: guest | Owner:
Type: proposal | Status: new
Priority: normal | Milestone: Not GHC
Component: libraries/base | Version: 6.6
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
----------------------------+-----------------------------------------------
Comment (by duncan):
One problem with this patch is that it makes the type of hPutNonBlocking
different for GHC vs non-GHC. It's not clear to me what the right API
should be either. I presume it currently returns the number of bytes
written, and you need to check that to see if the write completed
sucessfully or if there's more left to write. Perhaps the right api would
be more like:
hPutNonBlocking :: Handle -> ByteString -> IO (Maybe ByteString)
So if it returns Nothing you know it wrote it all, otherwise it returns
the remainder of the buffer that it did not manage to write (which may be
the whole original input or some tail of it).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1070>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
More information about the Glasgow-haskell-bugs
mailing list