smash-optics-0.1.0.0: Optics for the `smash` library using `optics-core`

Copyright(c) 2020 Emily Pillmore
LicenseBSD-style
MaintainerEmily Pillmore <emilypi@cohomolo.gy>
StabilityExperimental
PortabilityFlexibleInstances, MPTC, Type Families, UndecideableInstances
Safe HaskellNone
LanguageHaskell2010

Data.Wedge.Optics

Contents

Description

Prisms and Traversals for the Wedge datatype.

Synopsis

Traversals

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

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

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

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

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

>>> 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: this optic cannot change type.

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

A Prism' selecting the Here constructor.

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

A Prism' selecting the There constructor.

Orphan instances

Swapped Wedge Source # 

Methods

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

((~) * a a', (~) * b b') => Each (Maybe Bool) (Wedge a a') (Wedge b b') a b Source # 

Methods

each :: IxTraversal (Maybe Bool) (Wedge a a') (Wedge b b') a b