hat-2.9.4: The Haskell tracer, generating and viewing Haskell execution traces

Safe HaskellNone
LanguageHaskell98

Hat.System.IO

Synopsis

Documentation

data IO a Source #

Instances

Monad IO Source # 

Methods

(!>>=) :: RefSrcPos -> RefExp -> R (Fun (IO a) (Fun (Fun a (IO b)) (IO b))) Source #

(|>>=) :: R (Fun (IO a) (Fun (Fun a (IO b)) (IO b))) Source #

(!>>) :: RefSrcPos -> RefExp -> R (Fun (IO a) (Fun (IO b) (IO b))) Source #

(|>>) :: R (Fun (IO a) (Fun (IO b) (IO b))) Source #

greturn :: RefSrcPos -> RefExp -> R (Fun a (IO a)) Source #

sreturn :: R (Fun a (IO a)) Source #

gfail :: RefSrcPos -> RefExp -> R (Fun String (IO a)) Source #

sfail :: R (Fun String (IO a)) Source #

Functor IO Source # 

Methods

gfmap :: RefSrcPos -> RefExp -> R (Fun (Fun a b) (Fun (IO a) (IO b))) Source #

sfmap :: R (Fun (Fun a b) (Fun (IO a) (IO b))) Source #

gfixIO :: RefSrcPos -> RefExp -> R (Fun (Fun a (IO a)) (IO a)) Source #

hfixIO :: R (Fun b (IO b)) -> RefExp -> R (IO b) Source #

data 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.

Instances

Eq Handle 

Methods

(==) :: Handle -> Handle -> Bool #

(/=) :: Handle -> Handle -> Bool #

Show Handle 

hwithFile :: R String -> R IOMode -> R (Fun Handle (IO b)) -> RefExp -> R (IO b) Source #

data IOMode Source #

Instances

WrapVal IOMode Source # 
Show IOMode Source # 
Read IOMode Source # 
Bounded IOMode Source # 
Enum IOMode Source # 
Ord IOMode Source # 
Eq IOMode Source # 
Ix IOMode Source # 

data BufferMode Source #

Instances

WrapVal BufferMode Source # 
Show BufferMode Source # 
Read BufferMode Source # 
Ord BufferMode Source # 
Eq BufferMode Source # 

data SeekMode Source #

Instances

WrapVal SeekMode Source # 
Show SeekMode Source # 
Read SeekMode Source # 
Bounded SeekMode Source # 
Enum SeekMode Source # 
Ord SeekMode Source # 
Eq SeekMode Source # 
Ix SeekMode Source # 

hhPrint :: Show a => R Handle -> R a -> RefExp -> R (IO Tuple0) Source #

hprint :: Show a => R a -> RefExp -> R (IO Tuple0) Source #

hreadIO :: Read a => R String -> RefExp -> R (IO a) Source #

greadLn :: Read a => RefSrcPos -> RefExp -> R (IO a) Source #