| Copyright | (c) Nicolas Pouillard 2009 |
|---|---|
| License | BSD3 |
| Maintainer | Nicolas Pouillard <nicolas.pouillard@gmail.com> |
| Stability | provisional |
| Safe Haskell | None |
| Language | Haskell98 |
System.IO.Strict.Internals
Description
This module exports the internals of System.IO.Strict so that other packages can extend the
SIO monad. This module has to be used with great care: by lifting a lazy
function or a function that let leaks its lazy arguments, one breaks the only purpose
of the System.IO.Strict module.
- newtype SIO a = SIO {}
- run :: NFData sa => SIO sa -> IO sa
- return' :: (Monad m, NFData sa) => sa -> m sa
- wrap0 :: IO a -> SIO a
- wrap0' :: NFData sa => IO sa -> SIO sa
- wrap1 :: (a -> IO b) -> a -> SIO b
- wrap1' :: NFData sb => (a -> IO sb) -> a -> SIO sb
- wrap2 :: (a -> b -> IO c) -> a -> b -> SIO c
- wrap2' :: NFData sc => (a -> b -> IO sc) -> a -> b -> SIO sc
- wrap3 :: (a -> b -> c -> IO d) -> a -> b -> c -> SIO d
- wrap3' :: NFData sd => (a -> b -> c -> IO sd) -> a -> b -> c -> SIO sd
Types
Running the SIO monad
A stricter return
return' :: (Monad m, NFData sa) => sa -> m sa Source #
A stricter version of return, that works for every monad.
Wrapping functions
wrap0' :: NFData sa => IO sa -> SIO sa Source #
Wraps a lazy IO computation without arguments and forces its contents.
wrap1' :: NFData sb => (a -> IO sb) -> a -> SIO sb Source #
Wraps a lazy IO computation with a single argument and forces its contents.
wrap2 :: (a -> b -> IO c) -> a -> b -> SIO c Source #
Wraps a strict IO computation with two arguments.
wrap2' :: NFData sc => (a -> b -> IO sc) -> a -> b -> SIO sc Source #
Wraps a strict IO computation with two arguments and forces its contents.