strict-io-0.1: A library wrapping standard IO modules to provide strict IO.Source codeContentsIndex
System.IO.Strict.Internals
Stabilityprovisional
MaintainerNicolas Pouillard <nicolas.pouillard@gmail.com>
Contents
Types
Running the SIO monad
A stricter return
Wrapping functions
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.
Synopsis
newtype SIO a = SIO {
rawRun :: IO a
}
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
newtype SIO a Source
Constructors
SIO
rawRun :: IO a
show/hide Instances
Running the SIO monad
run :: NFData sa => SIO sa -> IO saSource
run allows to return to the wider world of IOs.
A stricter return
return' :: (Monad m, NFData sa) => sa -> m saSource
A stricter version of return, that works for every monad.
Wrapping functions
wrap0 :: IO a -> SIO aSource
Wraps a strict IO computation without arguments.
wrap0' :: NFData sa => IO sa -> SIO saSource
Wraps a lazy IO computation without arguments and forces its contents.
wrap1 :: (a -> IO b) -> a -> SIO bSource
Wraps a strict IO computation with a single argument.
wrap1' :: NFData sb => (a -> IO sb) -> a -> SIO sbSource
Wraps a lazy IO computation with a single argument and forces its contents.
wrap2 :: (a -> b -> IO c) -> a -> b -> SIO cSource
Wraps a strict IO computation with two arguments.
wrap2' :: NFData sc => (a -> b -> IO sc) -> a -> b -> SIO scSource
Wraps a strict IO computation with two arguments and forces its contents.
wrap3 :: (a -> b -> c -> IO d) -> a -> b -> c -> SIO dSource
Wraps a strict IO computation with two arguments.
wrap3' :: NFData sd => (a -> b -> c -> IO sd) -> a -> b -> c -> SIO sdSource
Wraps a strict IO computation with two arguments and forces its contents.
Produced by Haddock version 2.6.0