extensible-0.4.9: Extensible, efficient, optics-friendly data types and effects

Copyright(c) Fumiaki Kinoshita 2018
LicenseBSD3
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Extensible.Internal.Rig

Description

Re-implementation of lens combinators

Synopsis

Documentation

type Optic p f s t a b = p a (f b) -> p s (f t) Source #

type Optic' p f s a = p a (f a) -> p s (f s) Source #

view :: Optic' (->) (Const a) s a -> s -> a Source #

view :: Getter s a -> s -> a

views :: Optic' (->) (Const r) s a -> (a -> r) -> s -> r Source #

views :: Getter s a -> (a -> r) -> (s -> r)

over :: Optic (->) Identity s t a b -> (a -> b) -> s -> t Source #

over :: Setter s t a b -> (a -> b) -> (s -> t)

withIso :: Optic (Exchange a b) Identity s t a b -> ((s -> a) -> (b -> t) -> r) -> r Source #

Recover tho functions from an Iso/

data Exchange a b s t Source #

Reifies the structure of Isos

Constructors

Exchange (s -> a) (b -> t) 

Instances

Profunctor (Exchange a b) Source # 

Methods

dimap :: (a -> b) -> (c -> d) -> Exchange a b b c -> Exchange a b a d #

lmap :: (a -> b) -> Exchange a b b c -> Exchange a b a c #

rmap :: (b -> c) -> Exchange a b a b -> Exchange a b a c #

(#.) :: Coercible * c b => (b -> c) -> Exchange a b a b -> Exchange a b a c #

(.#) :: Coercible * b a => Exchange a b b c -> (a -> b) -> Exchange a b a c #

review :: Optic' Tagged Identity s a -> a -> s Source #

review :: AReview s a -> a -> s