semi-iso-0.2.0.0: Weakened partial isomorphisms that work with lenses.

Copyright(c) Paweł Nowak
LicenseMIT
MaintainerPaweł Nowak <pawel834@gmail.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Lens.Internal.SemiIso

Description

 

Synopsis

Documentation

data Barter s t a b Source

Type used internally to access SemiIso.

Continues the naming tradition of lens.

Constructors

Barter (a -> Either String s) (t -> Either String b) 

Instances

Profunctor (Barter s t) 
Choice (Barter s t) 
Failure (Barter s t) 

class Profunctor p => Failure p where Source

Provides a profunctor the ability to fail with an error message.

This class could use some laws. It is certainly a bit ad-hoc.

Methods

tie :: p a (Either String b) -> p a b Source

attach :: p a b -> p (Either String a) b Source

Instances

Failure (Barter s t)