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

Data.Can.Lens

Description

Prisms and Traversals for the Can datatype.

Synopsis
  • _Non :: Prism' (Can a b) ()
  • _One :: Prism' (Can a b) a
  • _Eno :: Prism' (Can a b) b
  • _Two :: Prism' (Can a b) (a, b)
  • oneing :: Traversal (Can a c) (Can b c) a b
  • enoing :: Traversal (Can a b) (Can a c) b c
  • twoed :: Traversal' (Can a b) (a, b)
  • twoing :: Traversal (Can a a) (Can b b) a b

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 :: Traversal (Can a c) (Can b c) a b Source #

A Traversal of the first parameter, suitable for use with Control.Lens.

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

A Traversal of the second parameter, suitable for use with Control.Lens.

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

A Traversal of the pair, suitable for use with Control.Lens.

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

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

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 (Can a a') (Can b b') a b Source # 
Instance details

Methods

each :: Traversal (Can a a') (Can b b') a b