#4317: Add comments to the definition of IODeviceType (module GHC.IO.Device)
---------------------------------+------------------------------------------
    Reporter:  golubovsky        |       Owner:                   
        Type:  proposal          |      Status:  new              
    Priority:  normal            |   Component:  libraries/base   
     Version:  6.12.3            |    Keywords:                   
    Testcase:                    |   Blockedby:                   
          Os:  Unknown/Multiple  |    Blocking:                   
Architecture:  Unknown/Multiple  |     Failure:  Documentation bug
---------------------------------+------------------------------------------
 {{{
 -- | Type  of a device that can be used to back a 'GHC.IO.Handle.Handle'
 -- (see also 'GHC.IO.Handle.mkFileHandle'). The standard libraries provide
 creation of 'GHC.IO.Handle.Handle's via
 -- Posix file operations with file descriptors (see
 'GHC.IO.Handle.FD.mkHandleFromFD')
 -- with FD being the underlying 'GHC.IO.Device.IODevice' instance.

 -- Users may provide custom instances of 'GHC.IO.Device.IODevice' which
 are expected to conform the following rules:

 data IODeviceType
   = Directory --^ The standard libraries do not have direct support
               -- for this device type, but user implementation is
               -- expected to provide a newline-separated list of
               -- file names in a directory (without path to the
               -- directory itself) in any suitable order,
               -- excluding "dot" and "dotdot" names. See
               -- also 'System.Directory.getDirectoryContents'.
               -- Seek operation is not supported on directories
               -- (other than to the zero position).
   | Stream    --^ A duplex communications channel (results in
               -- creation of a duplex 'GHC.IO.Handle.Handle'). The
               -- standard libraries use this device type when
               -- creating 'GHC.IO.Handle.Handle's for open sockets.
   | RegularFile --^ A file that may be read or written, and also
                 -- may be seekable.
   | RawDevice --^ A "raw" (disk) device which supports block binary
               -- read and write operations and may be seekable only
               -- to positions of certain granularity (block-
               -- aligned).
   deriving (Eq)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4317>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to