smash-microlens-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 HaskellSafe-Inferred
LanguageHaskell2010

Data.Smash.Microlens

Contents

Description

Traversals for the Smash datatype.

Synopsis
  • _Nada :: Traversal' (Smash a b) ()
  • _Smash :: Traversal' (Smash a b) (a, b)
  • smashed :: Traversal (Smash a b) (Smash c d) (a, b) (c, d)
  • smashing :: Traversal (Smash a a) (Smash b b) a b

Traversals

_Nada :: Traversal' (Smash a b) () Source #

A Traversal' selecting the Nada constructor.

Note: cannot change type.

_Smash :: Traversal' (Smash a b) (a, b) Source #

A Traversal' selecting the Smash constructor.

Note: cannot change type.

smashed :: Traversal (Smash a b) (Smash c d) (a, b) (c, d) Source #

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

>>> over smashed show (Smash 1 2)
"(1,2)"
>>> over smashed show Nada
Nada

smashing :: Traversal (Smash a a) (Smash b b) a b Source #

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

>>> over smashing show (Smash 1 2)
Smash "1" "2"
>>> over smashing show Nada
Nada