IO package:hedgehog

A value of type IO a is a computation which, when performed, does some I/O before returning a value of type a. There is really only one way to "perform" an I/O action: bind it to Main.main in your program. When your program is run, the I/O will be performed. It isn't possible to perform I/O from an arbitrary function, unless that function is itself in the IO monad and called at some point, directly or indirectly, from Main.main. IO is a monad, so IO actions can be combined using either the do-notation or the >> and >>= operations from the Monad class.
The Haskell 2010 type for exceptions in the IO monad. Any I/O operation may raise an IOException instead of returning a result. For a more general type of exception, including also those that arise in pure code, see Exception. In Haskell 2010, this is an opaque type.
Raise an IOException in the IO monad.
An instantiation of a Command which can be executed, and its effect evaluated.
Fails the test if the IO action throws an exception. The benefit of using this over liftIO is that the location of the exception will be shown in the output.
The sequence of actions.
Fractional numbers, supporting real division. The Haskell Report defines no laws for Fractional. However, (+) and (*) are customarily expected to define a division ring and have the following properties: Note that it isn't customarily expected that a type instance of Fractional implement a field. However, all instances in base do.
Arbitrary-precision rational numbers, represented as a ratio of two Integer values. A rational number may be constructed using the % operator.
Conversion from a Rational (that is Ratio Integer). A floating literal stands for an application of fromRational to a value of type Rational, so such literals have type (Fractional a) => a.
The function properFraction takes a real fractional number x and returns a pair (n,f) such that x = n+f, and:
  • n is an integral number with the same sign as x; and
  • f is a fraction with the same type and sign as x, and with absolute value less than 1.
The default definitions of the ceiling, floor, truncate and round functions are in terms of properFraction.
The readIO function is similar to read except that it signals parse failure to the IO monad instead of terminating the program.
the rational equivalent of its real argument with full precision
Fails with an error which renders the type of an exception and its error message.