HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleghc-internal-9.1003.0Haskell2010

GHC.Internal.IO.SubSystem

The IoSubSystem control interface. These methods can be used to disambiguate between the two operations.

The API of this module is unstable and not meant to be consumed by the general public. If you absolutely must depend on it, make sure to use a tight upper bound, e.g., base < 4.X rather than base < 5, because the interface can change rapidly without much warning.

  • 1 type
  • 7 values
datadata IoSubSystem
#

The I/O SubSystem to use in the program.

Constructors

  • IoPOSIX

    Use a POSIX I/O Sub-System

  • IoNative

    Use platform native Sub-System. For unix OSes this is the same as IoPOSIX, but on Windows this means use the Windows native APIs for I/O, including IOCP and RIO.

Instances4Enum, Eq, Show, Storable
valueconditional :: a -> a -> a
#

Conditionally execute an action depending on the configured I/O subsystem. On POSIX systems always execute the first action. On Windows execute the second action if WINIO as active, otherwise fall back to the first action.

value(<!>) :: a -> a -> a
#

Infix version of conditional. posix ! windows == conditional posix windows