Copyright | (c) Ross Paterson 2010 |
---|---|

License | BSD-style (see the file LICENSE) |

Maintainer | ross@soi.city.ac.uk |

Stability | experimental |

Portability | portable |

Safe Haskell | Safe-Inferred |

Language | Haskell98 |

Adding a new kind of pure computation to an applicative functor.

NB: This module is only included in `lens`

for backwards compatibility with
`transformers`

versions before 3.0.

# Documentation

Applicative functor formed by adding pure computations to a given applicative functor.

Alternative f => Alternative (Lift f) | A combination is |

Functor f => Functor (Lift f) | |

Applicative f => Applicative (Lift f) | A combination is |

Foldable f => Foldable (Lift f) | |

Traversable f => Traversable (Lift f) | |

Show1 f => Show1 (Lift f) | |

Read1 f => Read1 (Lift f) | |

Ord1 f => Ord1 (Lift f) | |

Eq1 f => Eq1 (Lift f) | |

(Eq1 f, Eq a) => Eq (Lift f a) | |

(Ord1 f, Ord a) => Ord (Lift f a) | |

(Read1 f, Read a) => Read (Lift f a) | |

(Show1 f, Show a) => Show (Lift f a) |

unLift :: Applicative f => Lift f a -> f a Source

Projection to the other functor.

# Collecting errors

type Errors e = Lift (Constant e) Source

An applicative functor that collects a monoid (e.g. lists) of errors.
A sequence of computations fails if any of its components do, but
unlike monads made with `ErrorT`

from Control.Monad.Trans.Error,
these computations continue after an error, collecting all the errors.