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.Wedge.Lens

Description

Prisms and Traversals for the Wedge datatype.

Synopsis
  • here :: Traversal' (Wedge a b) a
  • there :: Traversal' (Wedge a b) b
  • _Nowhere :: Prism' (Wedge a b) ()
  • _Here :: Prism (Wedge a b) (Wedge c b) a c
  • _There :: Prism (Wedge a b) (Wedge a d) b d

Traversals

here :: Traversal' (Wedge a b) a Source #

A Traversal of the Here case of a Wedge, suitable for use with Control.Lens.

>>> over here show (Here 1)
Here "1"
>>> over here show (There 'a')
There 'a'

there :: Traversal' (Wedge a b) b Source #

A Traversal of the There case of a Wedge, suitable for use with Control.Lens.

>>> over there show (Here 1)
Here 1
>>> over there show (There 'a')
There "'a'"

Prisms

_Nowhere :: Prism' (Wedge a b) () Source #

A Prism' selecting the Nowhere constructor.

Note: cannot change type.

_Here :: Prism (Wedge a b) (Wedge c b) a c Source #

A Prism' selecting the Here constructor.

Note: cannot change type.

_There :: Prism (Wedge a b) (Wedge a d) b d Source #

A Prism' selecting the There constructor.

Note: cannot change type.

Orphan instances

Swapped Wedge Source # 
Instance details

Methods

swapped :: Iso (Wedge a b) (Wedge c d) (Wedge b a) (Wedge d c)

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

Methods

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