strict-io-0.1.1: A library wrapping standard IO modules to provide strict IO.

Stabilityprovisional
MaintainerNicolas Pouillard <nicolas.pouillard@gmail.com>

System.IO.Strict.Internals

Contents

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

Types

newtype SIO a Source

Constructors

SIO 

Fields

rawRun :: IO a
 

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.