smash-optics-0.1.0.2: Optics for the `smash` library using `optics-core`
Copyright(c) 2020-2022 Emily Pillmore
LicenseBSD-style
MaintainerEmily Pillmore <emilypi@cohomolo.gy>
StabilityExperimental
PortabilityFlexibleInstances, MPTC, Type Families, UndecideableInstances
Safe HaskellNone
LanguageHaskell2010

Data.Can.Optics

Description

Prisms and Traversals for the Can datatype.

Synopsis

Isos

_CanIso :: Iso (Can a b) (Can c d) (Maybe a, Maybe b) (Maybe c, Maybe d) Source #

A Iso between a wedge coproduct and pointed coproduct.

Prisms

_Non :: Prism' (Can a b) () Source #

A Prism' selecting the Non constructor.

Note: cannot change type.

_One :: Prism' (Can a b) a Source #

A Prism' selecting the One constructor.

Note: cannot change type.

_Eno :: Prism' (Can a b) b Source #

A Prism' selecting the Eno constructor.

Note: cannot change type.

_Two :: Prism' (Can a b) (a, b) Source #

A Prism' selecting the Two constructor.

Note: cannot change type.

Traversals

oneing :: AffineTraversal (Can a c) (Can b c) a b Source #

An AffineTraversal of the first parameter, suitable for use with Optics.

enoing :: AffineTraversal (Can a b) (Can a c) b c Source #

An AffineTraversal of the second parameter, suitable for use with Optics.

twoed :: AffineTraversal' (Can a b) (a, b) Source #

An AffineTraversal of the pair, suitable for use with Optics.

Note: cannot change type.

twoing :: Traversal (Can a a) (Can b b) a b Source #

A Traversal of the pair ala both, suitable for use with Optics.

Orphan instances

Swapped Can Source # 
Instance details

Methods

swapped :: Iso (Can a b) (Can c d) (Can b a) (Can d c) #

(a ~ a', b ~ b') => Each Bool (Can a a') (Can b b') a b Source # 
Instance details

Methods

each :: IxTraversal Bool (Can a a') (Can b b') a b #