Haskell Core Libraries (base package)
Parent
Contents
Index
GHC.IOBase
Portability
non-portable (GHC Extensions)
Stability
internal
Maintainer
cvs-ghc@haskell.org
Description
Definitions for the
IO
monad and its friends.
Synopsis
data
ArithException
=
Overflow
|
Underflow
|
LossOfPrecision
|
DivideByZero
|
Denormal
data
ArrayException
=
IndexOutOfBounds
String
|
UndefinedElement
String
data
AsyncException
=
StackOverflow
|
HeapOverflow
|
ThreadKilled
data
Buffer
=
Buffer
{
bufBuf
::
RawBuffer
bufRPtr
:: !
Int
bufWPtr
:: !
Int
bufSize
:: !
Int
bufState
::
BufferState
}
data
BufferList
=
BufferListNil
|
BufferListCons
RawBuffer
BufferList
data
BufferMode
=
NoBuffering
|
LineBuffering
|
BlockBuffering
(
Maybe
Int
)
data
BufferState
=
ReadBuffer
|
WriteBuffer
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
ExitCode
=
ExitSuccess
|
ExitFailure
Int
type
FD
=
Int
type
FilePath
=
String
data
Handle
=
FileHandle
!(
MVar
Handle__
)
|
DuplexHandle
!(
MVar
Handle__
) !(
MVar
Handle__
)
data
HandleType
=
ClosedHandle
|
SemiClosedHandle
|
ReadHandle
|
WriteHandle
|
AppendHandle
|
ReadWriteHandle
data
Handle__
=
Handle__
{
haFD
:: !
FD
haType
::
HandleType
haIsBin
::
Bool
haIsStream
::
Bool
haBufferMode
::
BufferMode
haFilePath
::
FilePath
haBuffer
:: !(
IORef
Buffer
)
haBuffers
:: !(
IORef
BufferList
)
haOtherSide
:: (
Maybe
(
MVar
Handle__
))
}
newtype
IO
a =
IO
(State# RealWorld -> (#State# RealWorld, a#))
type
IOError
=
Exception
data
IOErrorType
=
AlreadyExists
|
NoSuchThing
|
ResourceBusy
|
ResourceExhausted
|
EOF
|
IllegalOperation
|
PermissionDenied
|
UserError
|
UnsatisfiedConstraints
|
SystemError
|
ProtocolError
|
OtherError
|
InvalidArgument
|
InappropriateType
|
HardwareFault
|
UnsupportedOperation
|
TimeExpired
|
ResourceVanished
|
Interrupted
|
DynIOError
Dynamic
data
IOException
=
IOError
{
ioe_handle
:: (
Maybe
Handle
)
ioe_type
::
IOErrorType
ioe_location
::
String
ioe_descr
::
String
ioe_filename
:: (
Maybe
FilePath
)
}
newtype
IORef
a =
IORef
(
STRef
RealWorld a)
data
MVar
a =
MVar
(MVar# RealWorld a)
type
RawBuffer
= MutableByteArray# RealWorld
data
IOErrorType
=
AlreadyExists
|
NoSuchThing
|
ResourceBusy
|
ResourceExhausted
|
EOF
|
IllegalOperation
|
PermissionDenied
|
UserError
|
UnsatisfiedConstraints
|
SystemError
|
ProtocolError
|
OtherError
|
InvalidArgument
|
InappropriateType
|
HardwareFault
|
UnsupportedOperation
|
TimeExpired
|
ResourceVanished
|
Interrupted
|
DynIOError
Dynamic
data
HandleType
=
ClosedHandle
|
SemiClosedHandle
|
ReadHandle
|
WriteHandle
|
AppendHandle
|
ReadWriteHandle
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
BufferMode
=
NoBuffering
|
LineBuffering
|
BlockBuffering
(
Maybe
Int
)
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
Buffer
=
Buffer
{
bufBuf
::
RawBuffer
bufRPtr
:: !
Int
bufWPtr
:: !
Int
bufSize
:: !
Int
bufState
::
BufferState
}
data
BufferList
=
BufferListNil
|
BufferListCons
RawBuffer
BufferList
data
BufferList
=
BufferListNil
|
BufferListCons
RawBuffer
BufferList
data
HandleType
=
ClosedHandle
|
SemiClosedHandle
|
ReadHandle
|
WriteHandle
|
AppendHandle
|
ReadWriteHandle
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
ArithException
=
Overflow
|
Underflow
|
LossOfPrecision
|
DivideByZero
|
Denormal
data
ArithException
=
Overflow
|
Underflow
|
LossOfPrecision
|
DivideByZero
|
Denormal
data
Handle
=
FileHandle
!(
MVar
Handle__
)
|
DuplexHandle
!(
MVar
Handle__
) !(
MVar
Handle__
)
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
IOErrorType
=
AlreadyExists
|
NoSuchThing
|
ResourceBusy
|
ResourceExhausted
|
EOF
|
IllegalOperation
|
PermissionDenied
|
UserError
|
UnsatisfiedConstraints
|
SystemError
|
ProtocolError
|
OtherError
|
InvalidArgument
|
InappropriateType
|
HardwareFault
|
UnsupportedOperation
|
TimeExpired
|
ResourceVanished
|
Interrupted
|
DynIOError
Dynamic
data
IOErrorType
=
AlreadyExists
|
NoSuchThing
|
ResourceBusy
|
ResourceExhausted
|
EOF
|
IllegalOperation
|
PermissionDenied
|
UserError
|
UnsatisfiedConstraints
|
SystemError
|
ProtocolError
|
OtherError
|
InvalidArgument
|
InappropriateType
|
HardwareFault
|
UnsupportedOperation
|
TimeExpired
|
ResourceVanished
|
Interrupted
|
DynIOError
Dynamic
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
ExitCode
=
ExitSuccess
|
ExitFailure
Int
data
ExitCode
=
ExitSuccess
|
ExitFailure
Int
data
Handle
=
FileHandle
!(
MVar
Handle__
)
|
DuplexHandle
!(
MVar
Handle__
) !(
MVar
Handle__
)
data
Handle__
=
Handle__
{
haFD
:: !
FD
haType
::
HandleType
haIsBin
::
Bool
haIsStream
::
Bool
haBufferMode
::
BufferMode
haFilePath
::
FilePath
haBuffer
:: !(
IORef
Buffer
)
haBuffers
:: !(
IORef
BufferList
)
haOtherSide
:: (
Maybe
(
MVar
Handle__
))
}
data
IOErrorType
=
AlreadyExists
|
NoSuchThing
|
ResourceBusy
|
ResourceExhausted
|
EOF
|
IllegalOperation
|
PermissionDenied
|
UserError
|
UnsatisfiedConstraints
|
SystemError
|
ProtocolError
|
OtherError
|
InvalidArgument
|
InappropriateType
|
HardwareFault
|
UnsupportedOperation
|
TimeExpired
|
ResourceVanished
|
Interrupted
|
DynIOError
Dynamic
data
AsyncException
=
StackOverflow
|
HeapOverflow
|
ThreadKilled
newtype
IO
a =
IO
(State# RealWorld -> (#State# RealWorld, a#))
data
IOException
=
IOError
{
ioe_handle
:: (
Maybe
Handle
)
ioe_type
::
IOErrorType
ioe_location
::
String
ioe_descr
::
String
ioe_filename
:: (
Maybe
FilePath
)
}
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
newtype
IORef
a =
IORef
(
STRef
RealWorld a)
data
IOErrorType
=
AlreadyExists
|
NoSuchThing
|
ResourceBusy
|
ResourceExhausted
|
EOF
|
IllegalOperation
|
PermissionDenied
|
UserError
|
UnsatisfiedConstraints
|
SystemError
|
ProtocolError
|
OtherError
|
InvalidArgument
|
InappropriateType
|
HardwareFault
|
UnsupportedOperation
|
TimeExpired
|
ResourceVanished
|
Interrupted
|
DynIOError
Dynamic
data
IOErrorType
=
AlreadyExists
|
NoSuchThing
|
ResourceBusy
|
ResourceExhausted
|
EOF
|
IllegalOperation
|
PermissionDenied
|
UserError
|
UnsatisfiedConstraints
|
SystemError
|
ProtocolError
|
OtherError
|
InvalidArgument
|
InappropriateType
|
HardwareFault
|
UnsupportedOperation
|
TimeExpired
|
ResourceVanished
|
Interrupted
|
DynIOError
Dynamic
data
ArrayException
=
IndexOutOfBounds
String
|
UndefinedElement
String
data
IOErrorType
=
AlreadyExists
|
NoSuchThing
|
ResourceBusy
|
ResourceExhausted
|
EOF
|
IllegalOperation
|
PermissionDenied
|
UserError
|
UnsatisfiedConstraints
|
SystemError
|
ProtocolError
|
OtherError
|
InvalidArgument
|
InappropriateType
|
HardwareFault
|
UnsupportedOperation
|
TimeExpired
|
ResourceVanished
|
Interrupted
|
DynIOError
Dynamic
data
IOErrorType
=
AlreadyExists
|
NoSuchThing
|
ResourceBusy
|
ResourceExhausted
|
EOF
|
IllegalOperation
|
PermissionDenied
|
UserError
|
UnsatisfiedConstraints
|
SystemError
|
ProtocolError
|
OtherError
|
InvalidArgument
|
InappropriateType
|
HardwareFault
|
UnsupportedOperation
|
TimeExpired
|
ResourceVanished
|
Interrupted
|
DynIOError
Dynamic
data
BufferMode
=
NoBuffering
|
LineBuffering
|
BlockBuffering
(
Maybe
Int
)
data
ArithException
=
Overflow
|
Underflow
|
LossOfPrecision
|
DivideByZero
|
Denormal
data
MVar
a =
MVar
(MVar# RealWorld a)
data
BufferMode
=
NoBuffering
|
LineBuffering
|
BlockBuffering
(
Maybe
Int
)
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
IOErrorType
=
AlreadyExists
|
NoSuchThing
|
ResourceBusy
|
ResourceExhausted
|
EOF
|
IllegalOperation
|
PermissionDenied
|
UserError
|
UnsatisfiedConstraints
|
SystemError
|
ProtocolError
|
OtherError
|
InvalidArgument
|
InappropriateType
|
HardwareFault
|
UnsupportedOperation
|
TimeExpired
|
ResourceVanished
|
Interrupted
|
DynIOError
Dynamic
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
IOErrorType
=
AlreadyExists
|
NoSuchThing
|
ResourceBusy
|
ResourceExhausted
|
EOF
|
IllegalOperation
|
PermissionDenied
|
UserError
|
UnsatisfiedConstraints
|
SystemError
|
ProtocolError
|
OtherError
|
InvalidArgument
|
InappropriateType
|
HardwareFault
|
UnsupportedOperation
|
TimeExpired
|
ResourceVanished
|
Interrupted
|
DynIOError
Dynamic
data
ArithException
=
Overflow
|
Underflow
|
LossOfPrecision
|
DivideByZero
|
Denormal
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
IOErrorType
=
AlreadyExists
|
NoSuchThing
|
ResourceBusy
|
ResourceExhausted
|
EOF
|
IllegalOperation
|
PermissionDenied
|
UserError
|
UnsatisfiedConstraints
|
SystemError
|
ProtocolError
|
OtherError
|
InvalidArgument
|
InappropriateType
|
HardwareFault
|
UnsupportedOperation
|
TimeExpired
|
ResourceVanished
|
Interrupted
|
DynIOError
Dynamic
data
IOErrorType
=
AlreadyExists
|
NoSuchThing
|
ResourceBusy
|
ResourceExhausted
|
EOF
|
IllegalOperation
|
PermissionDenied
|
UserError
|
UnsatisfiedConstraints
|
SystemError
|
ProtocolError
|
OtherError
|
InvalidArgument
|
InappropriateType
|
HardwareFault
|
UnsupportedOperation
|
TimeExpired
|
ResourceVanished
|
Interrupted
|
DynIOError
Dynamic
data
BufferState
=
ReadBuffer
|
WriteBuffer
data
HandleType
=
ClosedHandle
|
SemiClosedHandle
|
ReadHandle
|
WriteHandle
|
AppendHandle
|
ReadWriteHandle
data
HandleType
=
ClosedHandle
|
SemiClosedHandle
|
ReadHandle
|
WriteHandle
|
AppendHandle
|
ReadWriteHandle
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String
|
AsyncException
AsyncException
|
BlockedOnDeadMVar
|
Deadlock
|
DynException
Dynamic
|
ErrorCall
String
|
ExitException
ExitCode
|
IOException
IOException
|
NoMethodError
String
|
NonTermination
|
PatternMatchFail
String
|
RecConError
String
|
RecSelError
String
|
RecUpdError
String
data
Exception
=
ArithException
ArithException
|
ArrayException
ArrayException
|
AssertionFailed
String