Copyright | (c) Fumiaki Kinoshita 2018 |
---|---|

License | BSD3 |

Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |

Safe Haskell | Trustworthy |

Language | Haskell2010 |

## Synopsis

- type AllOf xs = xs :& Identity
- type OneOf xs = xs :/ Identity
- (<%) :: x -> AllOf xs -> AllOf (x ': xs)
- pluck :: x ∈ xs => AllOf xs -> x
- bury :: x ∈ xs => x -> OneOf xs
- (<%|) :: (x -> r) -> (OneOf xs -> r) -> OneOf (x ': xs) -> r
- accessing :: (Coercible x a, x ∈ xs, Extensible f p t, ExtensibleConstr t xs Identity x) => (a -> x) -> Optic' p f (t xs Identity) a

# Documentation

(<%|) :: (x -> r) -> (OneOf xs -> r) -> OneOf (x ': xs) -> r infixr 1 Source #

Naive pattern matching for a plain value.

accessing :: (Coercible x a, x ∈ xs, Extensible f p t, ExtensibleConstr t xs Identity x) => (a -> x) -> Optic' p f (t xs Identity) a Source #

An accessor for newtype constructors.