lens-4.17.1: Lenses, Folds and Traversals

Copyright | (C) 2012-2016 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | non-portable
Safe Haskell | Safe
Language | Haskell2010

Data.Dynamic.Lens

Description

Synopsis

- class AsDynamic t where
  - _Dynamic :: Typeable a => Prism' t a
- pattern Dynamic :: forall s a. (AsDynamic s, Typeable a) => a -> s

# Documentation

class AsDynamic t where Source #

Any `Dynamic` can be thrown as an `Exception`

Methods

_Dynamic :: Typeable a => Prism' t a Source #

This `ReifiedPrism` allows you to traverse the typed value contained in a `Dynamic` where the type required by your function matches that of the contents of the `Dynamic`, or construct a `Dynamic` value out of whole cloth. It can also be used to catch or throw a `Dynamic` value as `SomeException`.

    _Dynamic :: Typeable a => Prism' Dynamic       a
    _Dynamic :: Typeable a => Prism' SomeException a

Instances

AsDynamic Dynamic Source # |
Instance details Defined in Data.Dynamic.Lens Methods _Dynamic :: Typeable a => Prism' Dynamic a Source #
AsDynamic SomeException Source # |
Instance details Defined in Data.Dynamic.Lens Methods _Dynamic :: Typeable a => Prism' SomeException a Source #

pattern Dynamic :: forall s a. (AsDynamic s, Typeable a) => a -> s Source #