HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Moduleeffectful-2.7.1.0GHC2021

Effectful.FileSystem.File.OsPath

  • 3 types
  • 18 values

Effect

1 declaration

Handlers

Files

19 declarations
datadata IOMode
#

See GHC.Internal.System.IO.openFile

Instances6Enum, Eq, Ord, Read, Show, Ix
  • Enum IOModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.IOMode
  • Eq IOModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.IOMode
  • Ord IOModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.IOMode
  • Read IOModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.IOMode
  • Show IOModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.IOMode
  • Ix IOModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.IOMode
datadata Handle
#

Haskell defines operations to read and write characters from and to files, represented by values of type Handle. Each value of this type is a handle: a record used by the Haskell run-time system to manage I/O with file system objects. A handle has at least the following properties:

  • whether it manages input or output or both;

  • whether it is open, closed or semi-closed;

  • whether the object is seekable;

  • whether buffering is disabled, or enabled on a line or block basis;

  • a buffer (whose length may be zero).

Most handles will also have a current I/O position indicating where the next input or output operation will occur. A handle is readable if it manages only input or both input and output; likewise, it is writable if it manages only output or both input and output. A handle is open when first allocated. Once it is closed it can no longer be used for either input or output, though an implementation cannot re-use its storage while references remain to it. Handles are in the Show and Eq classes. The string produced by showing a handle is system dependent; it should include enough information to identify the handle for debugging. A handle is equal according to == only to itself; no attempt is made to compare the internal state of different handles for equality.

Instances2Eq, Show
  • Eq HandleDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.Types
  • Show HandleDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.Types