refractor-0.0.1.0: See README for more info
Safe HaskellNone
LanguageHaskell2010

Control.Refractor

Documentation

type Lens s t α β a b = forall f. Functor s t f => Refractor s t f α β a b Source #

type Iso σ τ s t α β a b = forall p f. (Functor (Dual σ) (NT (->)) p, forall x. Functor s (->) (p x), Functor τ s f) => Refractor p p f α β a b Source #

lens :: (α -> a) -> (b -> α -> β) -> Lens (->) (->) α β a b Source #

iso :: forall σ τ s t α β a b. Proxy s -> σ α a -> τ b β -> Iso σ τ s t α β a b Source #

gets :: ((a -> Const c b) -> α -> Const c β) -> (a -> c) -> α -> c Source #

get :: ((a -> Const a b) -> α -> Const a β) -> α -> a Source #

set :: ((a -> Identity b) -> α -> Identity β) -> b -> α -> β Source #

modify :: ((a -> Identity b) -> α -> Identity β) -> (a -> b) -> α -> β Source #

toListOf :: Getting (Endo (->) [a]) α β a b -> α -> [a] Source #

foldrOf :: Getting (Endo (->) c) α β a b -> (a -> c -> c) -> c -> α -> c Source #

foldlOf :: Getting (Dual (Endo (->) c)) α β a b -> (c -> a -> c) -> c -> α -> c Source #

mapAccumLOf :: ((a -> Backwards (State c) b) -> α -> Backwards (State c) β) -> (c -> a -> (c, b)) -> c -> α -> (c, β) Source #

mapAccumROf :: ((a -> State c b) -> α -> State c β) -> (a -> c -> (c, b)) -> c -> α -> (c, β) Source #

fstL :: Lens (->) (->) (a, c) (b, c) a b Source #

sndL :: Lens (->) (->) (a, b) (a, c) b c Source #

swapL :: Iso (->) (->) (->) (->) (a, b) (c, d) (b, a) (d, c) Source #

unitL :: Lens (->) (->) α α () () Source #

constL :: Iso (->) (->) (->) (->) (Const a α) (Const b β) a b Source #