base-4.18.1.0: Basic libraries

Copyright | (c) The University of Glasgow 2017
License | see libraries/base/LICENSE
Maintainer | libraries@haskell.org
Stability | internal
Portability | non-portable
Safe Haskell | Trustworthy
Language | Haskell2010

GHC.IO.SubSystem

Description

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

Synopsis

- withIoSubSystem :: (IoSubSystem -> IO a) -> IO a
- withIoSubSystem' :: (IoSubSystem -> a) -> a
- whenIoSubSystem :: IoSubSystem -> IO () -> IO ()
- ioSubSystem :: IoSubSystem
- data IoSubSystem
  - = IoPOSIX
  - | IoNative
- conditional :: a -> a -> a
- (<!>) :: a -> a -> a
- isWindowsNativeIO :: Bool

# Documentation

withIoSubSystem :: (IoSubSystem -> IO a) -> IO a Source #

withIoSubSystem' :: (IoSubSystem -> a) -> a Source #

whenIoSubSystem :: IoSubSystem -> IO () -> IO () Source #

ioSubSystem :: IoSubSystem Source #

data IoSubSystem Source #

The I/O SubSystem to use in the program.

Since: base-4.9.0.0

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.

#### Instances

Instances details

Storable IoSubSystem Source # | Since: base-4.9.0.0

Instance details

Defined in GHC.RTS.Flags

Methods

sizeOf :: IoSubSystem -> Int Source #

alignment :: IoSubSystem -> Int Source #

peekElemOff :: Ptr IoSubSystem -> Int -> IO IoSubSystem Source #

pokeElemOff :: Ptr IoSubSystem -> Int -> IoSubSystem -> IO () Source #

peekByteOff :: Ptr b -> Int -> IO IoSubSystem Source #

pokeByteOff :: Ptr b -> Int -> IoSubSystem -> IO () Source #

peek :: Ptr IoSubSystem -> IO IoSubSystem Source #

poke :: Ptr IoSubSystem -> IoSubSystem -> IO () Source #

Enum IoSubSystem Source # | Since: base-4.9.0.0

Instance details

Defined in GHC.RTS.Flags

Methods

succ :: IoSubSystem -> IoSubSystem Source #

pred :: IoSubSystem -> IoSubSystem Source #

toEnum :: Int -> IoSubSystem Source #

fromEnum :: IoSubSystem -> Int Source #

enumFrom :: IoSubSystem -> [IoSubSystem] Source #

enumFromThen :: IoSubSystem -> IoSubSystem -> [IoSubSystem] Source #

enumFromTo :: IoSubSystem -> IoSubSystem -> [IoSubSystem] Source #

enumFromThenTo :: IoSubSystem -> IoSubSystem -> IoSubSystem -> [IoSubSystem] Source #

Show IoSubSystem Source # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> IoSubSystem -> ShowS Source # show :: IoSubSystem -> String Source # showList :: [IoSubSystem] -> ShowS Source #
Eq IoSubSystem Source # |
Instance details Defined in GHC.RTS.Flags Methods (==) :: IoSubSystem -> IoSubSystem -> Bool Source # (/=) :: IoSubSystem -> IoSubSystem -> Bool Source #

conditional :: a -> a -> a Source #

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.

(<!>) :: a -> a -> a infixl 7 Source #

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

isWindowsNativeIO :: Bool Source #