[GHC] #4144: Exception: ToDo: hGetBuf - when using custom
handle infrastructure
GHC
cvs-ghc at haskell.org
Thu Jun 24 10:32:01 EDT 2010
#4144: Exception: ToDo: hGetBuf - when using custom handle infrastructure
----------------------------+-----------------------------------------------
Reporter: AntoineLatter | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 6.12.3
Resolution: fixed | Keywords:
Difficulty: | Os: MacOS X
Testcase: | Architecture: x86_64 (amd64)
Failure: Runtime crash |
----------------------------+-----------------------------------------------
Changes (by simonmar):
* status: new => closed
* resolution: => fixed
Comment:
This should fix it:
{{{
Thu Jun 24 14:04:25 BST 2010 Simon Marlow <marlowsd at gmail.com>
* make the hGetBuf/hPutBuf family work with non-FD Handles (#4144)
}}}
if it doesn't find an FD in the Handle, it uses the normal buffered
operations. Perhaps we could improve matters by allowing Handles to
optionally provide `RawIO`, but that's something for another day.
{{{
Prelude ByteStringHandle> bsHandle "test" "<fake file>" >>=
Data.ByteString.Char8.hGetContents
Loading package bytestring-0.9.1.7 ... linking ... done.
"test"
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4144#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list