Re: [GHC] #3218: Proposal: System.Posix.fdReadBuf/fdWriteBuf
#3218: Proposal: System.Posix.fdReadBuf/fdWriteBuf -+-- Reporter: simonmar |Owner: simonmar Type: proposal | Status: closed Priority: normal|Milestone: Not GHC Component: libraries/unix| Version: 6.10.2 Severity: normal| Resolution: fixed Keywords:| Difficulty: Unknown Testcase:| Os: Unknown/Multiple Architecture: Unknown/Multiple | -+-- Changes (by simonmar): * status: new = closed * resolution: = fixed Comment: pushed. {{{ Fri May 29 13:19:41 BST 2009 Simon Marlow marlo...@gmail.com * add fdReadBuf, fdWriteBuf Fri May 29 13:56:09 BST 2009 Simon Marlow marlo...@gmail.com * add test for fdReadBuf/fdWriteBuf }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3218#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #3218: Proposal: System.Posix.fdReadBuf/fdWriteBuf
#3218: Proposal: System.Posix.fdReadBuf/fdWriteBuf -+-- Reporter: simonmar |Owner: simonmar Type: proposal | Status: new Priority: normal|Milestone: Not GHC Component: libraries/unix| Version: 6.10.2 Severity: normal| Resolution: Keywords:| Difficulty: Unknown Testcase:| Os: Unknown/Multiple Architecture: Unknown/Multiple | -+-- Changes (by simonmar): * owner: = simonmar -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3218#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #3218: Proposal: System.Posix.fdReadBuf/fdWriteBuf
#3218: Proposal: System.Posix.fdReadBuf/fdWriteBuf ---+ Reporter: simonmar | Owner: Type: proposal | Status: new Priority: normal| Milestone: Not GHC Component: libraries/unix|Version: 6.10.2 Severity: normal| Keywords: Difficulty: Unknown | Testcase: Os: Unknown/Multiple | Architecture: Unknown/Multiple ---+ Functions for reading/writing actual arrays of bytes in memory. At the moment, `System.Posix` only provides {{{ fdRead :: Fd - ByteCount -- ^How many bytes to read - IO (String, ByteCount) -- ^The bytes read, how many bytes were read. fdWrite :: Fd - String - IO ByteCount }}} which are not only wrong (`String`?), but too slow for many purposes. I propose {{{ Mon May 11 16:21:02 BST 2009 Simon Marlow marlo...@gmail.com * add fdReadBuf, fdWriteBuf -- | Read data from an 'Fd' into memory. This is exactly equivalent -- to the POSIX @read@ function. fdReadBuf :: Fd - Ptr Word8-- ^ Memory in which to put the data - ByteCount-- ^ Maximum number of bytes to read - IO Bytecount -- ^ Number of bytes read (zero for EOF) -- | Write data from memory to an 'Fd'. This is exactly equivalent -- to the POSIX @write@ function. fdWriteBuf :: Fd - Ptr Word8-- ^ Memory containing the data to write - ByteCount-- ^ Maximum number of bytes to write - IO ByteCount -- ^ Number of bytes written }}} darcs patches are attached. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3218 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs