Copyright | (C) 2020 Csongor Kiss |
---|---|
License | BSD3 |
Maintainer | Csongor Kiss <kiss.csongor.kiss@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Derive an isomorphism between a newtype and its wrapped type.
Synopsis
-
class
Wrapped
s t a b | s -> a, t -> b
where
- wrappedIso :: Iso s t a b
- wrappedTo :: forall s t a b. Wrapped s t a b => s -> a
- wrappedFrom :: forall s t a b. Wrapped s t a b => b -> t
- _Unwrapped :: Wrapped s t a b => Iso s t a b
- _Wrapped :: Wrapped s t a b => Iso b a t s
Documentation
class Wrapped s t a b | s -> a, t -> b where Source #
Since: 1.1.0.0
wrappedIso :: Iso s t a b Source #
Since: 1.1.0.0
Instances
Context s t a b => Wrapped s t a b Source # | |
Defined in Data.Generics.Wrapped wrappedIso :: Iso s t a b Source # |
wrappedFrom :: forall s t a b. Wrapped s t a b => b -> t Source #
Since: 1.1.0.0
_Unwrapped :: Wrapped s t a b => Iso s t a b Source #
Since: 1.1.0.0