{-# LANGUAGE CPP #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ViewPatterns #-}
#ifdef TRUSTWORTHY
{-# LANGUAGE Trustworthy #-}
#endif
#if !(MIN_VERSION_base(4,16,0)) || !MIN_VERSION_transformers(0,6,0)
{-# OPTIONS_GHC -Wno-warnings-deprecations #-}
#endif
#include "lens-common.h"
module Control.Lens.Wrapped
(
Wrapped(..)
, _Unwrapped'
, _Wrapping', _Unwrapping'
, Rewrapped, Rewrapping
, _Wrapped, _Unwrapped
, _Wrapping, _Unwrapping
, op
, ala, alaf
, pattern Wrapped
, pattern Unwrapped
, _GWrapped'
) where
#include "HsBaseConfig.h"
import qualified Control.Alternative.Free as Free
import qualified Control.Applicative as Applicative
import Control.Applicative hiding (WrappedArrow(..))
import Control.Applicative.Trans.Free
import Control.Arrow
import Control.Applicative.Backwards
import Control.Comonad.Trans.Cofree
import Control.Comonad.Trans.Coiter
import Control.Comonad.Trans.Traced
import Control.Exception
import Control.Lens.Getter
import Control.Lens.Internal.CTypes
import Control.Lens.Iso
import Control.Lens.Review
import Control.Monad.Catch.Pure
import Control.Monad.Trans.Cont
import Control.Monad.Trans.Except
import Control.Monad.Trans.Free
import Control.Monad.Trans.Identity
import Control.Monad.Trans.Iter
import Control.Monad.Trans.Maybe
import Control.Monad.Trans.Reader
import qualified Control.Monad.Trans.RWS.Lazy as Lazy
import qualified Control.Monad.Trans.RWS.Strict as Strict
import qualified Control.Monad.Trans.State.Lazy as Lazy
import qualified Control.Monad.Trans.State.Strict as Strict
import qualified Control.Monad.Trans.Writer.Lazy as Lazy
import qualified Control.Monad.Trans.Writer.Strict as Strict
#if !MIN_VERSION_transformers(0,6,0)
import Control.Monad.Trans.Error
import Control.Monad.Trans.List
#endif
import Data.Bifunctor.Biff
import Data.Bifunctor.Clown
import Data.Bifunctor.Fix
import Data.Bifunctor.Flip
import Data.Bifunctor.Join
import Data.Bifunctor.Joker
import Data.Bifunctor.Tannen
import Data.Bifunctor.Wrapped
import Data.Foldable as Foldable
import Data.Functor.Bind
import Data.Functor.Compose
import Data.Functor.Contravariant
import qualified Data.Functor.Contravariant.Compose as Contravariant
import Data.Functor.Constant
import Data.Functor.Identity
import Data.Functor.Reverse
import Data.Hashable
import qualified Data.IntSet as IntSet
import Data.IntSet (IntSet)
import qualified Data.IntMap as IntMap
import Data.IntMap (IntMap)
import qualified Data.HashSet as HashSet
import Data.HashSet (HashSet)
import qualified Data.HashMap.Lazy as HashMap
import Data.HashMap.Lazy (HashMap)
import Data.Kind
import Data.List.NonEmpty (NonEmpty(..))
import qualified Data.Map as Map
import Data.Map (Map)
import qualified Data.Monoid as Monoid
import Data.Monoid
import qualified Data.Profunctor as Profunctor
import Data.Profunctor hiding (WrappedArrow(..))
import Data.Profunctor.Cayley
import qualified Data.Semigroup as S
import Data.Semigroupoid
import qualified Data.Semigroupoid.Dual as Semigroupoid
import Data.Semigroupoid.Static
import qualified Data.Sequence as Seq
import Data.Sequence (Seq)
import qualified Data.Set as Set
import Data.Set (Set)
import Data.Tagged
import qualified Data.Vector as Vector
import qualified Data.Vector.Primitive as Prim
import Data.Vector.Primitive (Prim)
import qualified Data.Vector.Unboxed as Unboxed
import Data.Vector.Unboxed (Unbox)
import qualified Data.Vector.Storable as Storable
import Foreign.C.Error
import Foreign.C.Types
import Foreign.Storable (Storable)
import qualified GHC.Generics as Generic
import GHC.Generics hiding (from, to)
import System.Posix.Types
import Data.Ord (Down(Down))
class Wrapped s where
type Unwrapped s :: Type
type Unwrapped s = GUnwrapped (Rep s)
_Wrapped' :: Iso' s (Unwrapped s)
default _Wrapped' :: (Generic s, D1 d (C1 c (S1 s' (Rec0 a))) ~ Rep s, Unwrapped s ~ GUnwrapped (Rep s))
=> Iso' s (Unwrapped s)
_Wrapped' = forall s (d :: Meta) (c :: Meta) (s' :: Meta) a.
(Generic s, D1 d (C1 c (S1 s' (Rec0 a))) ~ Rep s,
Unwrapped s ~ GUnwrapped (Rep s)) =>
Iso' s (Unwrapped s)
_GWrapped'
{-# INLINE _Wrapped' #-}
_GWrapped' :: (Generic s, D1 d (C1 c (S1 s' (Rec0 a))) ~ Rep s, Unwrapped s ~ GUnwrapped (Rep s))
=> Iso' s (Unwrapped s)
_GWrapped' :: forall s (d :: Meta) (c :: Meta) (s' :: Meta) a.
(Generic s, D1 d (C1 c (S1 s' (Rec0 a))) ~ Rep s,
Unwrapped s ~ GUnwrapped (Rep s)) =>
Iso' s (Unwrapped s)
_GWrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a x. Generic a => a -> Rep a x
Generic.from forall a x. Generic a => Rep a x -> a
Generic.to forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} {i} {c :: Meta} {i} {c :: Meta} {i} {c :: Meta} {i} {c}
{p :: k}.
M1 i c (M1 i c (M1 i c (K1 i c))) p -> c
remitter forall {k} {c} {i} {c :: Meta} {i} {c :: Meta} {i} {c :: Meta} {i}
{p :: k}.
c -> M1 i c (M1 i c (M1 i c (K1 i c))) p
reviewer
where
remitter :: M1 i c (M1 i c (M1 i c (K1 i c))) p -> c
remitter (M1 (M1 (M1 (K1 c
x)))) = c
x
reviewer :: c -> M1 i c (M1 i c (M1 i c (K1 i c))) p
reviewer c
x = forall k i (c :: Meta) (f :: k -> *) (p :: k). f p -> M1 i c f p
M1 (forall k i (c :: Meta) (f :: k -> *) (p :: k). f p -> M1 i c f p
M1 (forall k i (c :: Meta) (f :: k -> *) (p :: k). f p -> M1 i c f p
M1 (forall k i c (p :: k). c -> K1 i c p
K1 c
x)))
{-# INLINE _GWrapped' #-}
type family GUnwrapped (rep :: Type -> Type) :: Type
type instance GUnwrapped (D1 d (C1 c (S1 s (Rec0 a)))) = a
pattern Wrapped :: Rewrapped s s => Unwrapped s -> s
pattern $bWrapped :: forall s. Rewrapped s s => Unwrapped s -> s
$mWrapped :: forall {r} {s}.
Rewrapped s s =>
s -> (Unwrapped s -> r) -> ((# #) -> r) -> r
Wrapped a <- (view _Wrapped -> a) where
Wrapped Unwrapped s
a = forall b (m :: * -> *) t. MonadReader b m => AReview t b -> m t
review forall s t. Rewrapping s t => Iso s t (Unwrapped s) (Unwrapped t)
_Wrapped Unwrapped s
a
pattern Unwrapped :: Rewrapped t t => t -> Unwrapped t
pattern $bUnwrapped :: forall t. Rewrapped t t => t -> Unwrapped t
$mUnwrapped :: forall {r} {t}.
Rewrapped t t =>
Unwrapped t -> (t -> r) -> ((# #) -> r) -> r
Unwrapped a <- (view _Unwrapped -> a) where
Unwrapped t
a = forall b (m :: * -> *) t. MonadReader b m => AReview t b -> m t
review forall s t. Rewrapping s t => Iso (Unwrapped t) (Unwrapped s) t s
_Unwrapped t
a
class Wrapped s => Rewrapped (s :: Type) (t :: Type)
class (Rewrapped s t, Rewrapped t s) => Rewrapping s t
instance (Rewrapped s t, Rewrapped t s) => Rewrapping s t
_Unwrapped' :: Wrapped s => Iso' (Unwrapped s) s
_Unwrapped' :: forall s. Wrapped s => Iso' (Unwrapped s) s
_Unwrapped' = forall s t a b. AnIso s t a b -> Iso b a t s
from forall s. Wrapped s => Iso' s (Unwrapped s)
_Wrapped'
{-# INLINE _Unwrapped' #-}
_Wrapped :: Rewrapping s t => Iso s t (Unwrapped s) (Unwrapped t)
_Wrapped :: forall s t. Rewrapping s t => Iso s t (Unwrapped s) (Unwrapped t)
_Wrapped = forall s t a b r. AnIso s t a b -> ((s -> a) -> (b -> t) -> r) -> r
withIso forall s. Wrapped s => Iso' s (Unwrapped s)
_Wrapped' forall a b. (a -> b) -> a -> b
$ \ s -> Unwrapped s
sa Unwrapped s -> s
_ -> forall s t a b r. AnIso s t a b -> ((s -> a) -> (b -> t) -> r) -> r
withIso forall s. Wrapped s => Iso' s (Unwrapped s)
_Wrapped' forall a b. (a -> b) -> a -> b
$ \ t -> Unwrapped t
_ Unwrapped t -> t
bt -> forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso s -> Unwrapped s
sa Unwrapped t -> t
bt
{-# INLINE _Wrapped #-}
_Unwrapped :: Rewrapping s t => Iso (Unwrapped t) (Unwrapped s) t s
_Unwrapped :: forall s t. Rewrapping s t => Iso (Unwrapped t) (Unwrapped s) t s
_Unwrapped = forall s t a b. AnIso s t a b -> Iso b a t s
from forall s t. Rewrapping s t => Iso s t (Unwrapped s) (Unwrapped t)
_Wrapped
{-# INLINE _Unwrapped #-}
instance (t ~ All) => Rewrapped All t
instance Wrapped All where
type Unwrapped All = Bool
_Wrapped' :: Iso' All (Unwrapped All)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso All -> Bool
getAll Bool -> All
All
{-# INLINE _Wrapped' #-}
instance (t ~ Any) => Rewrapped Any t
instance Wrapped Any where
type Unwrapped Any = Bool
_Wrapped' :: Iso' Any (Unwrapped Any)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso Any -> Bool
getAny Bool -> Any
Any
{-# INLINE _Wrapped' #-}
instance (t ~ Sum b) => Rewrapped (Sum a) t
instance Wrapped (Sum a) where
type Unwrapped (Sum a) = a
_Wrapped' :: Iso' (Sum a) (Unwrapped (Sum a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Sum a -> a
getSum forall a. a -> Sum a
Sum
{-# INLINE _Wrapped' #-}
instance (t ~ Product b) => Rewrapped (Product a) t
instance Wrapped (Product a) where
type Unwrapped (Product a) = a
_Wrapped' :: Iso' (Product a) (Unwrapped (Product a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Product a -> a
getProduct forall a. a -> Product a
Product
{-# INLINE _Wrapped' #-}
instance (t ~ Kleisli m' a' b') => Rewrapped (Kleisli m a b) t
instance Wrapped (Kleisli m a b) where
type Unwrapped (Kleisli m a b) = a -> m b
_Wrapped' :: Iso' (Kleisli m a b) (Unwrapped (Kleisli m a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (m :: * -> *) a b. Kleisli m a b -> a -> m b
runKleisli forall (m :: * -> *) a b. (a -> m b) -> Kleisli m a b
Kleisli
{-# INLINE _Wrapped' #-}
instance (t ~ WrappedMonad m' a') => Rewrapped (WrappedMonad m a) t
instance Wrapped (WrappedMonad m a) where
type Unwrapped (WrappedMonad m a) = m a
_Wrapped' :: Iso' (WrappedMonad m a) (Unwrapped (WrappedMonad m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (m :: * -> *) a. WrappedMonad m a -> m a
unwrapMonad forall (m :: * -> *) a. m a -> WrappedMonad m a
WrapMonad
{-# INLINE _Wrapped' #-}
instance (t ~ Applicative.WrappedArrow a' b' c') => Rewrapped (Applicative.WrappedArrow a b c) t
instance Wrapped (Applicative.WrappedArrow a b c) where
type Unwrapped (Applicative.WrappedArrow a b c) = a b c
_Wrapped' :: Iso' (WrappedArrow a b c) (Unwrapped (WrappedArrow a b c))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (a :: * -> * -> *) b c. WrappedArrow a b c -> a b c
Applicative.unwrapArrow forall (a :: * -> * -> *) b c. a b c -> WrappedArrow a b c
Applicative.WrapArrow
{-# INLINE _Wrapped' #-}
instance (t ~ ZipList b) => Rewrapped (ZipList a) t
instance Wrapped (ZipList a) where
type Unwrapped (ZipList a) = [a]
_Wrapped' :: Iso' (ZipList a) (Unwrapped (ZipList a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. ZipList a -> [a]
getZipList forall a. [a] -> ZipList a
ZipList
{-# INLINE _Wrapped' #-}
instance (t ~ NonEmpty b) => Rewrapped (NonEmpty a) t
instance Wrapped (NonEmpty a) where
type Unwrapped (NonEmpty a) = (a, [a])
_Wrapped' :: Iso' (NonEmpty a) (Unwrapped (NonEmpty a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(a
a :| [a]
as) -> (a
a, [a]
as)) (\(a
a,[a]
as) -> a
a forall a. a -> [a] -> NonEmpty a
:| [a]
as)
{-# INLINE _Wrapped' #-}
instance (t ~ Const a' x') => Rewrapped (Const a x) t
instance Wrapped (Const a x) where
type Unwrapped (Const a x) = a
_Wrapped' :: Iso' (Const a x) (Unwrapped (Const a x))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} a (b :: k). Const a b -> a
getConst forall {k} a (b :: k). a -> Const a b
Const
{-# INLINE _Wrapped' #-}
instance (t ~ Dual b) => Rewrapped (Dual a) t
instance Wrapped (Dual a) where
type Unwrapped (Dual a) = a
_Wrapped' :: Iso' (Dual a) (Unwrapped (Dual a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Dual a -> a
getDual forall a. a -> Dual a
Dual
{-# INLINE _Wrapped' #-}
instance (t ~ Endo b) => Rewrapped (Endo a) t
instance Wrapped (Endo a) where
type Unwrapped (Endo a) = a -> a
_Wrapped' :: Iso' (Endo a) (Unwrapped (Endo a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Endo a -> a -> a
appEndo forall a. (a -> a) -> Endo a
Endo
{-# INLINE _Wrapped' #-}
instance (t ~ First b) => Rewrapped (First a) t
instance Wrapped (First a) where
type Unwrapped (First a) = Maybe a
_Wrapped' :: Iso' (First a) (Unwrapped (First a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. First a -> Maybe a
getFirst forall a. Maybe a -> First a
First
{-# INLINE _Wrapped' #-}
instance (t ~ Last b) => Rewrapped (Last a) t
instance Wrapped (Last a) where
type Unwrapped (Last a) = Maybe a
_Wrapped' :: Iso' (Last a) (Unwrapped (Last a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Last a -> Maybe a
getLast forall a. Maybe a -> Last a
Last
{-# INLINE _Wrapped' #-}
instance (t ~ Monoid.Alt g b) => Rewrapped (Monoid.Alt f a) t
instance Wrapped (Monoid.Alt f a) where
type Unwrapped (Monoid.Alt f a) = f a
_Wrapped' :: Iso' (Alt f a) (Unwrapped (Alt f a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} (f :: k -> *) (a :: k). Alt f a -> f a
Monoid.getAlt forall {k} (f :: k -> *) (a :: k). f a -> Alt f a
Monoid.Alt
{-# INLINE _Wrapped' #-}
#if MIN_VERSION_base(4,12,0)
instance (t ~ Monoid.Ap g b) => Rewrapped (Monoid.Ap f a) t
instance Wrapped (Monoid.Ap f a) where
type Unwrapped (Monoid.Ap f a) = f a
_Wrapped' :: Iso' (Ap f a) (Unwrapped (Ap f a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} (f :: k -> *) (a :: k). Ap f a -> f a
Monoid.getAp forall {k} (f :: k -> *) (a :: k). f a -> Ap f a
Monoid.Ap
{-# INLINE _Wrapped' #-}
#endif
instance t ~ ArrowMonad m' a' => Rewrapped (ArrowMonad m a) t
instance Wrapped (ArrowMonad m a) where
type Unwrapped (ArrowMonad m a) = m () a
_Wrapped' :: Iso' (ArrowMonad m a) (Unwrapped (ArrowMonad m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (m :: * -> * -> *) a. ArrowMonad m a -> m () a
getArrowMonad forall (a :: * -> * -> *) b. a () b -> ArrowMonad a b
ArrowMonad
{-# INLINE _Wrapped' #-}
instance t ~ Down b => Rewrapped (Down a) t
instance Wrapped (Down a) where
type Unwrapped (Down a) = a
_Wrapped' :: Iso' (Down a) (Unwrapped (Down a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(Down a
a) -> a
a) forall a. a -> Down a
Down
{-# INLINE _Wrapped' #-}
instance Rewrapped Errno t
instance Wrapped Errno where
type Unwrapped Errno = CInt
_Wrapped' :: Iso' Errno (Unwrapped Errno)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(Errno CInt
x) -> CInt
x) CInt -> Errno
Errno
{-# INLINE _Wrapped' #-}
getArrowMonad :: ArrowMonad m a -> m () a
getArrowMonad :: forall (m :: * -> * -> *) a. ArrowMonad m a -> m () a
getArrowMonad (ArrowMonad m () a
x) = m () a
x
{-# INLINE getArrowMonad #-}
instance (t ~ Backwards g b) => Rewrapped (Backwards f a) t
instance Wrapped (Backwards f a) where
type Unwrapped (Backwards f a) = f a
_Wrapped' :: Iso' (Backwards f a) (Unwrapped (Backwards f a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} (f :: k -> *) (a :: k). Backwards f a -> f a
forwards forall {k} (f :: k -> *) (a :: k). f a -> Backwards f a
Backwards
instance (t ~ Compose f' g' a') => Rewrapped (Compose f g a) t
instance Wrapped (Compose f g a) where
type Unwrapped (Compose f g a) = f (g a)
_Wrapped' :: Iso' (Compose f g a) (Unwrapped (Compose f g a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k1} {k2} (f :: k1 -> *) (g :: k2 -> k1) (a :: k2).
Compose f g a -> f (g a)
getCompose forall {k} {k1} (f :: k -> *) (g :: k1 -> k) (a :: k1).
f (g a) -> Compose f g a
Compose
instance (t ~ Constant a' b') => Rewrapped (Constant a b) t
instance Wrapped (Constant a b) where
type Unwrapped (Constant a b) = a
_Wrapped' :: Iso' (Constant a b) (Unwrapped (Constant a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} a (b :: k). Constant a b -> a
getConstant forall {k} a (b :: k). a -> Constant a b
Constant
instance (t ~ ContT r' m' a') => Rewrapped (ContT r m a) t
instance Wrapped (ContT r m a) where
type Unwrapped (ContT r m a) = (a -> m r) -> m r
_Wrapped' :: Iso' (ContT r m a) (Unwrapped (ContT r m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} (r :: k) (m :: k -> *) a.
ContT r m a -> (a -> m r) -> m r
runContT forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT
instance (t ~ ExceptT e' m' a') => Rewrapped (ExceptT e m a) t
instance Wrapped (ExceptT e m a) where
type Unwrapped (ExceptT e m a) = m (Either e a)
_Wrapped' :: Iso' (ExceptT e m a) (Unwrapped (ExceptT e m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall e (m :: * -> *) a. ExceptT e m a -> m (Either e a)
runExceptT forall e (m :: * -> *) a. m (Either e a) -> ExceptT e m a
ExceptT
{-# INLINE _Wrapped' #-}
instance (t ~ Identity b) => Rewrapped (Identity a) t
instance Wrapped (Identity a) where
type Unwrapped (Identity a) = a
_Wrapped' :: Iso' (Identity a) (Unwrapped (Identity a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Identity a -> a
runIdentity forall a. a -> Identity a
Identity
{-# INLINE _Wrapped' #-}
instance (t ~ IdentityT n b) => Rewrapped (IdentityT m a) t
instance Wrapped (IdentityT m a) where
type Unwrapped (IdentityT m a) = m a
_Wrapped' :: Iso' (IdentityT m a) (Unwrapped (IdentityT m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} (f :: k -> *) (a :: k). IdentityT f a -> f a
runIdentityT forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
IdentityT
{-# INLINE _Wrapped' #-}
instance (t ~ MaybeT n b) => Rewrapped (MaybeT m a) t
instance Wrapped (MaybeT m a) where
type Unwrapped (MaybeT m a) = m (Maybe a)
_Wrapped' :: Iso' (MaybeT m a) (Unwrapped (MaybeT m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (m :: * -> *) a. MaybeT m a -> m (Maybe a)
runMaybeT forall (m :: * -> *) a. m (Maybe a) -> MaybeT m a
MaybeT
{-# INLINE _Wrapped' #-}
instance (t ~ ReaderT s n b) => Rewrapped (ReaderT r m a) t
instance Wrapped (ReaderT r m a) where
type Unwrapped (ReaderT r m a) = r -> m a
_Wrapped' :: Iso' (ReaderT r m a) (Unwrapped (ReaderT r m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall r (m :: * -> *) a. ReaderT r m a -> r -> m a
runReaderT forall r (m :: * -> *) a. (r -> m a) -> ReaderT r m a
ReaderT
{-# INLINE _Wrapped' #-}
instance (t ~ Reverse g b) => Rewrapped (Reverse f a) t
instance Wrapped (Reverse f a) where
type Unwrapped (Reverse f a) = f a
_Wrapped' :: Iso' (Reverse f a) (Unwrapped (Reverse f a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} (f :: k -> *) (a :: k). Reverse f a -> f a
getReverse forall {k} (f :: k -> *) (a :: k). f a -> Reverse f a
Reverse
{-# INLINE _Wrapped' #-}
instance (t ~ Lazy.RWST r' w' s' m' a') => Rewrapped (Lazy.RWST r w s m a) t
instance Wrapped (Lazy.RWST r w s m a) where
type Unwrapped (Lazy.RWST r w s m a) = r -> s -> m (a, s, w)
_Wrapped' :: Iso' (RWST r w s m a) (Unwrapped (RWST r w s m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall r w s (m :: * -> *) a.
RWST r w s m a -> r -> s -> m (a, s, w)
Lazy.runRWST forall r w s (m :: * -> *) a.
(r -> s -> m (a, s, w)) -> RWST r w s m a
Lazy.RWST
{-# INLINE _Wrapped' #-}
instance (t ~ Strict.RWST r' w' s' m' a') => Rewrapped (Strict.RWST r w s m a) t
instance Wrapped (Strict.RWST r w s m a) where
type Unwrapped (Strict.RWST r w s m a) = r -> s -> m (a, s, w)
_Wrapped' :: Iso' (RWST r w s m a) (Unwrapped (RWST r w s m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall r w s (m :: * -> *) a.
RWST r w s m a -> r -> s -> m (a, s, w)
Strict.runRWST forall r w s (m :: * -> *) a.
(r -> s -> m (a, s, w)) -> RWST r w s m a
Strict.RWST
{-# INLINE _Wrapped' #-}
instance (t ~ Lazy.StateT s' m' a') => Rewrapped (Lazy.StateT s m a) t
instance Wrapped (Lazy.StateT s m a) where
type Unwrapped (Lazy.StateT s m a) = s -> m (a, s)
_Wrapped' :: Iso' (StateT s m a) (Unwrapped (StateT s m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
Lazy.runStateT forall s (m :: * -> *) a. (s -> m (a, s)) -> StateT s m a
Lazy.StateT
{-# INLINE _Wrapped' #-}
instance (t ~ Strict.StateT s' m' a') => Rewrapped (Strict.StateT s m a) t
instance Wrapped (Strict.StateT s m a) where
type Unwrapped (Strict.StateT s m a) = s -> m (a, s)
_Wrapped' :: Iso' (StateT s m a) (Unwrapped (StateT s m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall s (m :: * -> *) a. StateT s m a -> s -> m (a, s)
Strict.runStateT forall s (m :: * -> *) a. (s -> m (a, s)) -> StateT s m a
Strict.StateT
{-# INLINE _Wrapped' #-}
instance (t ~ Lazy.WriterT w' m' a') => Rewrapped (Lazy.WriterT w m a) t
instance Wrapped (Lazy.WriterT w m a) where
type Unwrapped (Lazy.WriterT w m a) = m (a, w)
_Wrapped' :: Iso' (WriterT w m a) (Unwrapped (WriterT w m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall w (m :: * -> *) a. WriterT w m a -> m (a, w)
Lazy.runWriterT forall w (m :: * -> *) a. m (a, w) -> WriterT w m a
Lazy.WriterT
{-# INLINE _Wrapped' #-}
instance (t ~ Strict.WriterT w' m' a') => Rewrapped (Strict.WriterT w m a) t
instance Wrapped (Strict.WriterT w m a) where
type Unwrapped (Strict.WriterT w m a) = m (a, w)
_Wrapped' :: Iso' (WriterT w m a) (Unwrapped (WriterT w m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall w (m :: * -> *) a. WriterT w m a -> m (a, w)
Strict.runWriterT forall w (m :: * -> *) a. m (a, w) -> WriterT w m a
Strict.WriterT
{-# INLINE _Wrapped' #-}
#if !MIN_VERSION_transformers(0,6,0)
instance (t ~ ErrorT e' m' a') => Rewrapped (ErrorT e m a) t
instance Wrapped (ErrorT e m a) where
type Unwrapped (ErrorT e m a) = m (Either e a)
_Wrapped' :: Iso' (ErrorT e m a) (Unwrapped (ErrorT e m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall e (m :: * -> *) a. ErrorT e m a -> m (Either e a)
runErrorT forall e (m :: * -> *) a. m (Either e a) -> ErrorT e m a
ErrorT
{-# INLINE _Wrapped' #-}
instance (t ~ ListT n b) => Rewrapped (ListT m a) t
instance Wrapped (ListT m a) where
type Unwrapped (ListT m a) = m [a]
_Wrapped' :: Iso' (ListT m a) (Unwrapped (ListT m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (m :: * -> *) a. ListT m a -> m [a]
runListT forall (m :: * -> *) a. m [a] -> ListT m a
ListT
{-# INLINE _Wrapped' #-}
#endif
instance (t ~ Biff p' f' g' a' b') => Rewrapped (Biff p f g a b) t
instance Wrapped (Biff p f g a b) where
type Unwrapped (Biff p f g a b) = p (f a) (g b)
_Wrapped' :: Iso' (Biff p f g a b) (Unwrapped (Biff p f g a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k1} {k2} {k3} {k4} (p :: k1 -> k2 -> *) (f :: k3 -> k1)
(g :: k4 -> k2) (a :: k3) (b :: k4).
Biff p f g a b -> p (f a) (g b)
runBiff forall {k} {k1} {k2} {k3} (p :: k -> k1 -> *) (f :: k2 -> k)
(g :: k3 -> k1) (a :: k2) (b :: k3).
p (f a) (g b) -> Biff p f g a b
Biff
{-# INLINE _Wrapped' #-}
instance (t ~ Clown f' a' b') => Rewrapped (Clown f a b) t
instance Wrapped (Clown f a b) where
type Unwrapped (Clown f a b) = f a
_Wrapped' :: Iso' (Clown f a b) (Unwrapped (Clown f a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k1} {k2} (f :: k1 -> *) (a :: k1) (b :: k2).
Clown f a b -> f a
runClown forall {k} {k1} (f :: k -> *) (a :: k) (b :: k1).
f a -> Clown f a b
Clown
{-# INLINE _Wrapped' #-}
instance (t ~ Fix p' a') => Rewrapped (Fix p a) t
instance Wrapped (Fix p a) where
type Unwrapped (Fix p a) = p (Fix p a) a
_Wrapped' :: Iso' (Fix p a) (Unwrapped (Fix p a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} (p :: * -> k -> *) (a :: k). Fix p a -> p (Fix p a) a
out forall {k} (p :: * -> k -> *) (a :: k). p (Fix p a) a -> Fix p a
In
{-# INLINE _Wrapped' #-}
instance (t ~ Flip p' a' b') => Rewrapped (Flip p a b) t
instance Wrapped (Flip p a b) where
type Unwrapped (Flip p a b) = p b a
_Wrapped' :: Iso' (Flip p a b) (Unwrapped (Flip p a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k1} {k2} (p :: k1 -> k2 -> *) (a :: k2) (b :: k1).
Flip p a b -> p b a
runFlip forall {k} {k1} (p :: k -> k1 -> *) (a :: k1) (b :: k).
p b a -> Flip p a b
Flip
{-# INLINE _Wrapped' #-}
instance (t ~ Join p' a') => Rewrapped (Join p a) t
instance Wrapped (Join p a) where
type Unwrapped (Join p a) = p a a
_Wrapped' :: Iso' (Join p a) (Unwrapped (Join p a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} (p :: k -> k -> *) (a :: k). Join p a -> p a a
runJoin forall {k} (p :: k -> k -> *) (a :: k). p a a -> Join p a
Join
{-# INLINE _Wrapped' #-}
instance (t ~ Joker g' a' b') => Rewrapped (Joker g a b) t
instance Wrapped (Joker g a b) where
type Unwrapped (Joker g a b) = g b
_Wrapped' :: Iso' (Joker g a b) (Unwrapped (Joker g a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k1} {k2} (g :: k1 -> *) (a :: k2) (b :: k1).
Joker g a b -> g b
runJoker forall {k} {k1} (g :: k -> *) (a :: k1) (b :: k).
g b -> Joker g a b
Joker
{-# INLINE _Wrapped' #-}
instance (t ~ Tannen f' p' a' b') => Rewrapped (Tannen f p a b) t
instance Wrapped (Tannen f p a b) where
type Unwrapped (Tannen f p a b) = f (p a b)
_Wrapped' :: Iso' (Tannen f p a b) (Unwrapped (Tannen f p a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k1} {k2} {k3} (f :: k1 -> *) (p :: k2 -> k3 -> k1)
(a :: k2) (b :: k3).
Tannen f p a b -> f (p a b)
runTannen forall {k} {k1} {k2} (f :: k -> *) (p :: k1 -> k2 -> k) (a :: k1)
(b :: k2).
f (p a b) -> Tannen f p a b
Tannen
{-# INLINE _Wrapped' #-}
instance (t ~ WrappedBifunctor p' a' b') => Rewrapped (WrappedBifunctor p a b) t
instance Wrapped (WrappedBifunctor p a b) where
type Unwrapped (WrappedBifunctor p a b) = p a b
_Wrapped' :: Iso' (WrappedBifunctor p a b) (Unwrapped (WrappedBifunctor p a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k1} {k2} (p :: k1 -> k2 -> *) (a :: k1) (b :: k2).
WrappedBifunctor p a b -> p a b
unwrapBifunctor forall {k} {k1} (p :: k -> k1 -> *) (a :: k) (b :: k1).
p a b -> WrappedBifunctor p a b
WrapBifunctor
{-# INLINE _Wrapped' #-}
instance (t ~ TracedT m' w' a') => Rewrapped (TracedT m w a) t
instance Wrapped (TracedT m w a) where
type Unwrapped (TracedT m w a) = w (m -> a)
_Wrapped' :: Iso' (TracedT m w a) (Unwrapped (TracedT m w a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall m (w :: * -> *) a. TracedT m w a -> w (m -> a)
runTracedT forall m (w :: * -> *) a. w (m -> a) -> TracedT m w a
TracedT
{-# INLINE _Wrapped' #-}
instance (t ~ CatchT m' a') => Rewrapped (CatchT m a) t
instance Wrapped (CatchT m a) where
type Unwrapped (CatchT m a) = m (Either SomeException a)
_Wrapped' :: Iso' (CatchT m a) (Unwrapped (CatchT m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (m :: * -> *) a. CatchT m a -> m (Either SomeException a)
runCatchT forall (m :: * -> *) a. m (Either SomeException a) -> CatchT m a
CatchT
{-# INLINE _Wrapped' #-}
instance (t ~ Free.Alt f' a') => Rewrapped (Free.Alt f a) t
instance Wrapped (Free.Alt f a) where
type Unwrapped (Free.Alt f a) = [Free.AltF f a]
_Wrapped' :: Iso' (Alt f a) (Unwrapped (Alt f a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (f :: * -> *) a. Alt f a -> [AltF f a]
Free.alternatives forall (f :: * -> *) a. [AltF f a] -> Alt f a
Free.Alt
{-# INLINE _Wrapped' #-}
instance (t ~ ApT f' g' a') => Rewrapped (ApT f g a) t
instance Wrapped (ApT f g a) where
type Unwrapped (ApT f g a) = g (ApF f g a)
_Wrapped' :: Iso' (ApT f g a) (Unwrapped (ApT f g a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (f :: * -> *) (g :: * -> *) a. ApT f g a -> g (ApF f g a)
getApT forall (f :: * -> *) (g :: * -> *) a. g (ApF f g a) -> ApT f g a
ApT
{-# INLINE _Wrapped' #-}
instance (t ~ CofreeT f' w' a') => Rewrapped (CofreeT f w a) t
instance Wrapped (CofreeT f w a) where
type Unwrapped (CofreeT f w a) = w (CofreeF f a (CofreeT f w a))
_Wrapped' :: Iso' (CofreeT f w a) (Unwrapped (CofreeT f w a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (f :: * -> *) (w :: * -> *) a.
CofreeT f w a -> w (CofreeF f a (CofreeT f w a))
runCofreeT forall (f :: * -> *) (w :: * -> *) a.
w (CofreeF f a (CofreeT f w a)) -> CofreeT f w a
CofreeT
{-# INLINE _Wrapped' #-}
instance (t ~ CoiterT w' a') => Rewrapped (CoiterT w a) t
instance Wrapped (CoiterT w a) where
type Unwrapped (CoiterT w a) = w (a, CoiterT w a)
_Wrapped' :: Iso' (CoiterT w a) (Unwrapped (CoiterT w a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (w :: * -> *) a. CoiterT w a -> w (a, CoiterT w a)
runCoiterT forall (w :: * -> *) a. w (a, CoiterT w a) -> CoiterT w a
CoiterT
{-# INLINE _Wrapped' #-}
instance (t ~ FreeT f' m' a') => Rewrapped (FreeT f m a) t
instance Wrapped (FreeT f m a) where
type Unwrapped (FreeT f m a) = m (FreeF f a (FreeT f m a))
_Wrapped' :: Iso' (FreeT f m a) (Unwrapped (FreeT f m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (f :: * -> *) (m :: * -> *) a.
FreeT f m a -> m (FreeF f a (FreeT f m a))
runFreeT forall (f :: * -> *) (m :: * -> *) a.
m (FreeF f a (FreeT f m a)) -> FreeT f m a
FreeT
{-# INLINE _Wrapped' #-}
instance (t ~ IterT m' a') => Rewrapped (IterT m a) t
instance Wrapped (IterT m a) where
type Unwrapped (IterT m a) = m (Either a (IterT m a))
_Wrapped' :: Iso' (IterT m a) (Unwrapped (IterT m a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (m :: * -> *) a. IterT m a -> m (Either a (IterT m a))
runIterT forall (m :: * -> *) a. m (Either a (IterT m a)) -> IterT m a
IterT
{-# INLINE _Wrapped' #-}
instance (t ~ HashMap k' a', Hashable k, Eq k) => Rewrapped (HashMap k a) t
instance (Hashable k, Eq k) => Wrapped (HashMap k a) where
type Unwrapped (HashMap k a) = [(k, a)]
_Wrapped' :: Iso' (HashMap k a) (Unwrapped (HashMap k a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall k v. HashMap k v -> [(k, v)]
HashMap.toList forall k v. (Eq k, Hashable k) => [(k, v)] -> HashMap k v
HashMap.fromList
{-# INLINE _Wrapped' #-}
instance (t ~ HashSet a', Hashable a, Eq a) => Rewrapped (HashSet a) t
instance (Hashable a, Eq a) => Wrapped (HashSet a) where
type Unwrapped (HashSet a) = [a]
_Wrapped' :: Iso' (HashSet a) (Unwrapped (HashSet a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. HashSet a -> [a]
HashSet.toList forall a. (Eq a, Hashable a) => [a] -> HashSet a
HashSet.fromList
{-# INLINE _Wrapped' #-}
instance (t ~ IntMap a') => Rewrapped (IntMap a) t
instance Wrapped (IntMap a) where
type Unwrapped (IntMap a) = [(Int, a)]
_Wrapped' :: Iso' (IntMap a) (Unwrapped (IntMap a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. IntMap a -> [(Key, a)]
IntMap.toAscList forall a. [(Key, a)] -> IntMap a
IntMap.fromList
{-# INLINE _Wrapped' #-}
instance (t ~ IntSet) => Rewrapped IntSet t
instance Wrapped IntSet where
type Unwrapped IntSet = [Int]
_Wrapped' :: Iso' IntSet (Unwrapped IntSet)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso IntSet -> [Key]
IntSet.toAscList [Key] -> IntSet
IntSet.fromList
{-# INLINE _Wrapped' #-}
instance (t ~ Map k' a', Ord k) => Rewrapped (Map k a) t
instance Ord k => Wrapped (Map k a) where
type Unwrapped (Map k a) = [(k, a)]
_Wrapped' :: Iso' (Map k a) (Unwrapped (Map k a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall k a. Map k a -> [(k, a)]
Map.toAscList forall k a. Ord k => [(k, a)] -> Map k a
Map.fromList
{-# INLINE _Wrapped' #-}
instance (t ~ Set a', Ord a) => Rewrapped (Set a) t
instance Ord a => Wrapped (Set a) where
type Unwrapped (Set a) = [a]
_Wrapped' :: Iso' (Set a) (Unwrapped (Set a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Set a -> [a]
Set.toAscList forall a. Ord a => [a] -> Set a
Set.fromList
{-# INLINE _Wrapped' #-}
instance (t ~ Seq a') => Rewrapped (Seq a) t
instance Wrapped (Seq a) where
type Unwrapped (Seq a) = [a]
_Wrapped' :: Iso' (Seq a) (Unwrapped (Seq a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (t :: * -> *) a. Foldable t => t a -> [a]
Foldable.toList forall a. [a] -> Seq a
Seq.fromList
{-# INLINE _Wrapped' #-}
instance (t ~ Star f' d' c') => Rewrapped (Star f d c) t
instance Wrapped (Star f d c) where
type Unwrapped (Star f d c) = d -> f c
_Wrapped' :: Iso' (Star f d c) (Unwrapped (Star f d c))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} (f :: k -> *) d (c :: k). Star f d c -> d -> f c
runStar forall {k} (f :: k -> *) d (c :: k). (d -> f c) -> Star f d c
Star
{-# INLINE _Wrapped' #-}
instance (t ~ Costar f' d' c') => Rewrapped (Costar f d c) t
instance Wrapped (Costar f d c) where
type Unwrapped (Costar f d c) = f d -> c
_Wrapped' :: Iso' (Costar f d c) (Unwrapped (Costar f d c))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} (f :: k -> *) (d :: k) c. Costar f d c -> f d -> c
runCostar forall {k} (f :: k -> *) (d :: k) c. (f d -> c) -> Costar f d c
Costar
{-# INLINE _Wrapped' #-}
instance (t ~ Profunctor.WrappedArrow p' a' b') => Rewrapped (Profunctor.WrappedArrow p a b) t
instance Wrapped (Profunctor.WrappedArrow p a b) where
type Unwrapped (Profunctor.WrappedArrow p a b) = p a b
_Wrapped' :: Iso' (WrappedArrow p a b) (Unwrapped (WrappedArrow p a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k1} {k2} (p :: k1 -> k2 -> *) (a :: k1) (b :: k2).
WrappedArrow p a b -> p a b
Profunctor.unwrapArrow forall {k} {k1} (p :: k -> k1 -> *) (a :: k) (b :: k1).
p a b -> WrappedArrow p a b
Profunctor.WrapArrow
{-# INLINE _Wrapped' #-}
instance (t ~ Forget r' a' b') => Rewrapped (Forget r a b) t
instance Wrapped (Forget r a b) where
type Unwrapped (Forget r a b) = a -> r
_Wrapped' :: Iso' (Forget r a b) (Unwrapped (Forget r a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} r a (b :: k). Forget r a b -> a -> r
runForget forall {k} r a (b :: k). (a -> r) -> Forget r a b
Forget
{-# INLINE _Wrapped' #-}
instance (t ~ Cayley f' p' a' b') => Rewrapped (Cayley f p a b) t
instance Wrapped (Cayley f p a b) where
type Unwrapped (Cayley f p a b) = f (p a b)
_Wrapped' :: Iso' (Cayley f p a b) (Unwrapped (Cayley f p a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k1} {k2} {k3} (f :: k1 -> *) (p :: k2 -> k3 -> k1)
(a :: k2) (b :: k3).
Cayley f p a b -> f (p a b)
runCayley forall {k} {k1} {k2} (f :: k -> *) (p :: k1 -> k2 -> k) (a :: k1)
(b :: k2).
f (p a b) -> Cayley f p a b
Cayley
{-# INLINE _Wrapped' #-}
instance (t ~ Vector.Vector a') => Rewrapped (Vector.Vector a) t
instance Wrapped (Vector.Vector a) where
type Unwrapped (Vector.Vector a) = [a]
_Wrapped' :: Iso' (Vector a) (Unwrapped (Vector a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Vector a -> [a]
Vector.toList forall a. [a] -> Vector a
Vector.fromList
{-# INLINE _Wrapped' #-}
instance (Prim a, t ~ Prim.Vector a') => Rewrapped (Prim.Vector a) t
instance Prim a => Wrapped (Prim.Vector a) where
type Unwrapped (Prim.Vector a) = [a]
_Wrapped' :: Iso' (Vector a) (Unwrapped (Vector a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Prim a => Vector a -> [a]
Prim.toList forall a. Prim a => [a] -> Vector a
Prim.fromList
{-# INLINE _Wrapped' #-}
instance (Unbox a, t ~ Unboxed.Vector a') => Rewrapped (Unboxed.Vector a) t
instance Unbox a => Wrapped (Unboxed.Vector a) where
type Unwrapped (Unboxed.Vector a) = [a]
_Wrapped' :: Iso' (Vector a) (Unwrapped (Vector a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Unbox a => Vector a -> [a]
Unboxed.toList forall a. Unbox a => [a] -> Vector a
Unboxed.fromList
{-# INLINE _Wrapped' #-}
instance (Storable a, t ~ Storable.Vector a') => Rewrapped (Storable.Vector a) t
instance Storable a => Wrapped (Storable.Vector a) where
type Unwrapped (Storable.Vector a) = [a]
_Wrapped' :: Iso' (Vector a) (Unwrapped (Vector a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Storable a => Vector a -> [a]
Storable.toList forall a. Storable a => [a] -> Vector a
Storable.fromList
{-# INLINE _Wrapped' #-}
instance (t ~ WrappedApplicative f' a') => Rewrapped (WrappedApplicative f a) t
instance Wrapped (WrappedApplicative f a) where
type Unwrapped (WrappedApplicative f a) = f a
_Wrapped' :: Iso' (WrappedApplicative f a) (Unwrapped (WrappedApplicative f a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (f :: * -> *) a. WrappedApplicative f a -> f a
unwrapApplicative forall (f :: * -> *) a. f a -> WrappedApplicative f a
WrapApplicative
{-# INLINE _Wrapped' #-}
instance (t ~ MaybeApply f' a') => Rewrapped (MaybeApply f a) t
instance Wrapped (MaybeApply f a) where
type Unwrapped (MaybeApply f a) = Either (f a) a
_Wrapped' :: Iso' (MaybeApply f a) (Unwrapped (MaybeApply f a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (f :: * -> *) a. MaybeApply f a -> Either (f a) a
runMaybeApply forall (f :: * -> *) a. Either (f a) a -> MaybeApply f a
MaybeApply
{-# INLINE _Wrapped' #-}
instance (t ~ WrappedCategory k' a' b') => Rewrapped (WrappedCategory k a b) t
instance Wrapped (WrappedCategory k a b) where
type Unwrapped (WrappedCategory k a b) = k a b
_Wrapped' :: Iso' (WrappedCategory k a b) (Unwrapped (WrappedCategory k a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k1} {k2} (k3 :: k1 -> k2 -> *) (a :: k1) (b :: k2).
WrappedCategory k3 a b -> k3 a b
unwrapCategory forall {k} {k1} (k2 :: k -> k1 -> *) (a :: k) (b :: k1).
k2 a b -> WrappedCategory k2 a b
WrapCategory
{-# INLINE _Wrapped' #-}
instance (t ~ Semi m' a' b') => Rewrapped (Semi m a b) t
instance Wrapped (Semi m a b) where
type Unwrapped (Semi m a b) = m
_Wrapped' :: Iso' (Semi m a b) (Unwrapped (Semi m a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k1} {k2} m (a :: k1) (b :: k2). Semi m a b -> m
getSemi forall {k} {k1} m (a :: k) (b :: k1). m -> Semi m a b
Semi
{-# INLINE _Wrapped' #-}
instance (t ~ Semigroupoid.Dual k' a' b') => Rewrapped (Semigroupoid.Dual k a b) t
instance Wrapped (Semigroupoid.Dual k a b) where
type Unwrapped (Semigroupoid.Dual k a b) = k b a
_Wrapped' :: Iso' (Dual k a b) (Unwrapped (Dual k a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k1} {k2} (k3 :: k1 -> k2 -> *) (a :: k2) (b :: k1).
Dual k3 a b -> k3 b a
Semigroupoid.getDual forall {k} {k1} (k2 :: k -> k1 -> *) (a :: k1) (b :: k).
k2 b a -> Dual k2 a b
Semigroupoid.Dual
{-# INLINE _Wrapped' #-}
instance (t ~ Static f' a' b') => Rewrapped (Static f a b) t
instance Wrapped (Static f a b) where
type Unwrapped (Static f a b) = f (a -> b)
_Wrapped' :: Iso' (Static f a b) (Unwrapped (Static f a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (f :: * -> *) a b. Static f a b -> f (a -> b)
runStatic forall (f :: * -> *) a b. f (a -> b) -> Static f a b
Static
{-# INLINE _Wrapped' #-}
instance (t ~ S.Min b) => Rewrapped (S.Min a) t
instance Wrapped (S.Min a) where
type Unwrapped (S.Min a) = a
_Wrapped' :: Iso' (Min a) (Unwrapped (Min a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Min a -> a
S.getMin forall a. a -> Min a
S.Min
{-# INLINE _Wrapped' #-}
instance (t ~ S.Max b) => Rewrapped (S.Max a) t
instance Wrapped (S.Max a) where
type Unwrapped (S.Max a) = a
_Wrapped' :: Iso' (Max a) (Unwrapped (Max a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Max a -> a
S.getMax forall a. a -> Max a
S.Max
{-# INLINE _Wrapped' #-}
instance (t ~ S.First b) => Rewrapped (S.First a) t
instance Wrapped (S.First a) where
type Unwrapped (S.First a) = a
_Wrapped' :: Iso' (First a) (Unwrapped (First a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. First a -> a
S.getFirst forall a. a -> First a
S.First
{-# INLINE _Wrapped' #-}
instance (t ~ S.Last b) => Rewrapped (S.Last a) t
instance Wrapped (S.Last a) where
type Unwrapped (S.Last a) = a
_Wrapped' :: Iso' (Last a) (Unwrapped (Last a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Last a -> a
S.getLast forall a. a -> Last a
S.Last
{-# INLINE _Wrapped' #-}
instance (t ~ S.WrappedMonoid b) => Rewrapped (S.WrappedMonoid a) t
instance Wrapped (S.WrappedMonoid a) where
type Unwrapped (S.WrappedMonoid a) = a
_Wrapped' :: Iso' (WrappedMonoid a) (Unwrapped (WrappedMonoid a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall m. WrappedMonoid m -> m
S.unwrapMonoid forall m. m -> WrappedMonoid m
S.WrapMonoid
{-# INLINE _Wrapped' #-}
#if !(MIN_VERSION_base(4,16,0))
instance (t ~ S.Option b) => Rewrapped (S.Option a) t
instance Wrapped (S.Option a) where
type Unwrapped (S.Option a) = Maybe a
_Wrapped' = iso S.getOption S.Option
{-# INLINE _Wrapped' #-}
#endif
instance (t ~ Predicate b) => Rewrapped (Predicate a) t
instance Wrapped (Predicate a) where
type Unwrapped (Predicate a) = a -> Bool
_Wrapped' :: Iso' (Predicate a) (Unwrapped (Predicate a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Predicate a -> a -> Bool
getPredicate forall a. (a -> Bool) -> Predicate a
Predicate
{-# INLINE _Wrapped' #-}
instance (t ~ Comparison b) => Rewrapped (Comparison a) t
instance Wrapped (Comparison a) where
type Unwrapped (Comparison a) = a -> a -> Ordering
_Wrapped' :: Iso' (Comparison a) (Unwrapped (Comparison a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Comparison a -> a -> a -> Ordering
getComparison forall a. (a -> a -> Ordering) -> Comparison a
Comparison
{-# INLINE _Wrapped' #-}
instance (t ~ Equivalence b) => Rewrapped (Equivalence a) t
instance Wrapped (Equivalence a) where
type Unwrapped (Equivalence a) = a -> a -> Bool
_Wrapped' :: Iso' (Equivalence a) (Unwrapped (Equivalence a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a. Equivalence a -> a -> a -> Bool
getEquivalence forall a. (a -> a -> Bool) -> Equivalence a
Equivalence
{-# INLINE _Wrapped' #-}
instance (t ~ Op a' b') => Rewrapped (Op a b) t
instance Wrapped (Op a b) where
type Unwrapped (Op a b) = b -> a
_Wrapped' :: Iso' (Op a b) (Unwrapped (Op a b))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall a b. Op a b -> b -> a
getOp forall a b. (b -> a) -> Op a b
Op
{-# INLINE _Wrapped' #-}
instance (t ~ Contravariant.Compose f' g' a') => Rewrapped (Contravariant.Compose f g a) t
instance Wrapped (Contravariant.Compose f g a) where
type Unwrapped (Contravariant.Compose f g a) = f (g a)
_Wrapped' :: Iso' (Compose f g a) (Unwrapped (Compose f g a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (f :: * -> *) (g :: * -> *) a. Compose f g a -> f (g a)
Contravariant.getCompose forall (f :: * -> *) (g :: * -> *) a. f (g a) -> Compose f g a
Contravariant.Compose
{-# INLINE _Wrapped' #-}
instance (t ~ Contravariant.ComposeFC f' g' a') => Rewrapped (Contravariant.ComposeFC f g a) t
instance Wrapped (Contravariant.ComposeFC f g a) where
type Unwrapped (Contravariant.ComposeFC f g a) = f (g a)
_Wrapped' :: Iso' (ComposeFC f g a) (Unwrapped (ComposeFC f g a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (f :: * -> *) (g :: * -> *) a. ComposeFC f g a -> f (g a)
Contravariant.getComposeFC forall (f :: * -> *) (g :: * -> *) a. f (g a) -> ComposeFC f g a
Contravariant.ComposeFC
{-# INLINE _Wrapped' #-}
instance (t ~ Contravariant.ComposeCF f' g' a') => Rewrapped (Contravariant.ComposeCF f g a) t
instance Wrapped (Contravariant.ComposeCF f g a) where
type Unwrapped (Contravariant.ComposeCF f g a) = f (g a)
_Wrapped' :: Iso' (ComposeCF f g a) (Unwrapped (ComposeCF f g a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall (f :: * -> *) (g :: * -> *) a. ComposeCF f g a -> f (g a)
Contravariant.getComposeCF forall (f :: * -> *) (g :: * -> *) a. f (g a) -> ComposeCF f g a
Contravariant.ComposeCF
{-# INLINE _Wrapped' #-}
instance (t ~ Tagged s' a') => Rewrapped (Tagged s a) t
instance Wrapped (Tagged s a) where
type Unwrapped (Tagged s a) = a
_Wrapped' :: Iso' (Tagged s a) (Unwrapped (Tagged s a))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall {k} (s :: k) b. Tagged s b -> b
unTagged forall {k} (s :: k) b. b -> Tagged s b
Tagged
{-# INLINE _Wrapped' #-}
instance (t ~ AssertionFailed) => Rewrapped AssertionFailed t
instance Wrapped AssertionFailed where
type Unwrapped AssertionFailed = String
_Wrapped' :: Iso' AssertionFailed (Unwrapped AssertionFailed)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso AssertionFailed -> String
failedAssertion String -> AssertionFailed
AssertionFailed
{-# INLINE _Wrapped' #-}
instance (t ~ NoMethodError) => Rewrapped NoMethodError t
instance Wrapped NoMethodError where
type Unwrapped NoMethodError = String
_Wrapped' :: Iso' NoMethodError (Unwrapped NoMethodError)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso NoMethodError -> String
getNoMethodError String -> NoMethodError
NoMethodError
{-# INLINE _Wrapped' #-}
instance (t ~ PatternMatchFail) => Rewrapped PatternMatchFail t
instance Wrapped PatternMatchFail where
type Unwrapped PatternMatchFail = String
_Wrapped' :: Iso' PatternMatchFail (Unwrapped PatternMatchFail)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso PatternMatchFail -> String
getPatternMatchFail String -> PatternMatchFail
PatternMatchFail
{-# INLINE _Wrapped' #-}
instance (t ~ RecConError) => Rewrapped RecConError t
instance Wrapped RecConError where
type Unwrapped RecConError = String
_Wrapped' :: Iso' RecConError (Unwrapped RecConError)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso RecConError -> String
getRecConError String -> RecConError
RecConError
{-# INLINE _Wrapped' #-}
instance (t ~ RecSelError) => Rewrapped RecSelError t
instance Wrapped RecSelError where
type Unwrapped RecSelError = String
_Wrapped' :: Iso' RecSelError (Unwrapped RecSelError)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso RecSelError -> String
getRecSelError String -> RecSelError
RecSelError
{-# INLINE _Wrapped' #-}
instance (t ~ RecUpdError) => Rewrapped RecUpdError t
instance Wrapped RecUpdError where
type Unwrapped RecUpdError = String
_Wrapped' :: Iso' RecUpdError (Unwrapped RecUpdError)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso RecUpdError -> String
getRecUpdError String -> RecUpdError
RecUpdError
{-# INLINE _Wrapped' #-}
instance (t ~ ErrorCall) => Rewrapped ErrorCall t
instance Wrapped ErrorCall where
type Unwrapped ErrorCall = String
_Wrapped' :: Iso' ErrorCall (Unwrapped ErrorCall)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso ErrorCall -> String
getErrorCall String -> ErrorCall
ErrorCall
{-# INLINE _Wrapped' #-}
instance (t ~ TypeError) => Rewrapped TypeError t
instance Wrapped TypeError where
type Unwrapped TypeError = String
_Wrapped' :: Iso' TypeError (Unwrapped TypeError)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso TypeError -> String
getTypeError String -> TypeError
TypeError
{-# INLINE _Wrapped' #-}
getTypeError :: TypeError -> String
getTypeError :: TypeError -> String
getTypeError (TypeError String
x) = String
x
{-# INLINE getTypeError #-}
#if MIN_VERSION_base(4,10,0)
instance (t ~ CompactionFailed) => Rewrapped CompactionFailed t
instance Wrapped CompactionFailed where
type Unwrapped CompactionFailed = String
_Wrapped' :: Iso' CompactionFailed (Unwrapped CompactionFailed)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso CompactionFailed -> String
getCompactionFailed String -> CompactionFailed
CompactionFailed
{-# INLINE _Wrapped' #-}
getCompactionFailed :: CompactionFailed -> String
getCompactionFailed :: CompactionFailed -> String
getCompactionFailed (CompactionFailed String
x) = String
x
{-# INLINE getCompactionFailed #-}
#endif
getErrorCall :: ErrorCall -> String
getErrorCall :: ErrorCall -> String
getErrorCall (ErrorCallWithLocation String
x String
_) = String
x
{-# INLINE getErrorCall #-}
getRecUpdError :: RecUpdError -> String
getRecUpdError :: RecUpdError -> String
getRecUpdError (RecUpdError String
x) = String
x
{-# INLINE getRecUpdError #-}
getRecSelError :: RecSelError -> String
getRecSelError :: RecSelError -> String
getRecSelError (RecSelError String
x) = String
x
{-# INLINE getRecSelError #-}
getRecConError :: RecConError -> String
getRecConError :: RecConError -> String
getRecConError (RecConError String
x) = String
x
{-# INLINE getRecConError #-}
getPatternMatchFail :: PatternMatchFail -> String
getPatternMatchFail :: PatternMatchFail -> String
getPatternMatchFail (PatternMatchFail String
x) = String
x
{-# INLINE getPatternMatchFail #-}
getNoMethodError :: NoMethodError -> String
getNoMethodError :: NoMethodError -> String
getNoMethodError (NoMethodError String
x) = String
x
{-# INLINE getNoMethodError #-}
failedAssertion :: AssertionFailed -> String
failedAssertion :: AssertionFailed -> String
failedAssertion (AssertionFailed String
x) = String
x
{-# INLINE failedAssertion #-}
instance Rewrapped CChar t
instance Wrapped CChar where
type Unwrapped CChar = HTYPE_CHAR
_Wrapped' :: Iso' CChar (Unwrapped CChar)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CChar Int8
x) -> Int8
x) Int8 -> CChar
CChar
{-# INLINE _Wrapped' #-}
instance Rewrapped CSChar t
instance Wrapped CSChar where
type Unwrapped CSChar = HTYPE_SIGNED_CHAR
_Wrapped' :: Iso' CSChar (Unwrapped CSChar)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CSChar Int8
x) -> Int8
x) Int8 -> CSChar
CSChar
{-# INLINE _Wrapped' #-}
instance Rewrapped CUChar t
instance Wrapped CUChar where
type Unwrapped CUChar = HTYPE_UNSIGNED_CHAR
_Wrapped' :: Iso' CUChar (Unwrapped CUChar)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CUChar Word8
x) -> Word8
x) Word8 -> CUChar
CUChar
{-# INLINE _Wrapped' #-}
instance Rewrapped CShort t
instance Wrapped CShort where
type Unwrapped CShort = HTYPE_SHORT
_Wrapped' :: Iso' CShort (Unwrapped CShort)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CShort Int16
x) -> Int16
x) Int16 -> CShort
CShort
{-# INLINE _Wrapped' #-}
instance Rewrapped CUShort t
instance Wrapped CUShort where
type Unwrapped CUShort = HTYPE_UNSIGNED_SHORT
_Wrapped' :: Iso' CUShort (Unwrapped CUShort)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CUShort Word16
x) -> Word16
x) Word16 -> CUShort
CUShort
{-# INLINE _Wrapped' #-}
instance Rewrapped CInt t
instance Wrapped CInt where
type Unwrapped CInt = HTYPE_INT
_Wrapped' :: Iso' CInt (Unwrapped CInt)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CInt Int32
x) -> Int32
x) Int32 -> CInt
CInt
{-# INLINE _Wrapped' #-}
instance Rewrapped CUInt t
instance Wrapped CUInt where
type Unwrapped CUInt = HTYPE_UNSIGNED_INT
_Wrapped' :: Iso' CUInt (Unwrapped CUInt)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CUInt Word32
x) -> Word32
x) Word32 -> CUInt
CUInt
{-# INLINE _Wrapped' #-}
instance Rewrapped CLong t
instance Wrapped CLong where
type Unwrapped CLong = HTYPE_LONG
_Wrapped' :: Iso' CLong (Unwrapped CLong)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CLong Int64
x) -> Int64
x) Int64 -> CLong
CLong
{-# INLINE _Wrapped' #-}
instance Rewrapped CULong t
instance Wrapped CULong where
type Unwrapped CULong = HTYPE_UNSIGNED_LONG
_Wrapped' :: Iso' CULong (Unwrapped CULong)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CULong Word64
x) -> Word64
x) Word64 -> CULong
CULong
{-# INLINE _Wrapped' #-}
instance Rewrapped CLLong t
instance Wrapped CLLong where
type Unwrapped CLLong = HTYPE_LONG_LONG
_Wrapped' :: Iso' CLLong (Unwrapped CLLong)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CLLong Int64
x) -> Int64
x) Int64 -> CLLong
CLLong
{-# INLINE _Wrapped' #-}
instance Rewrapped CULLong t
instance Wrapped CULLong where
type Unwrapped CULLong = HTYPE_UNSIGNED_LONG_LONG
_Wrapped' :: Iso' CULLong (Unwrapped CULLong)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CULLong Word64
x) -> Word64
x) Word64 -> CULLong
CULLong
{-# INLINE _Wrapped' #-}
instance Rewrapped CFloat t
instance Wrapped CFloat where
type Unwrapped CFloat = HTYPE_FLOAT
_Wrapped' :: Iso' CFloat (Unwrapped CFloat)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CFloat Float
x) -> Float
x) Float -> CFloat
CFloat
{-# INLINE _Wrapped' #-}
instance Rewrapped CDouble t
instance Wrapped CDouble where
type Unwrapped CDouble = HTYPE_DOUBLE
_Wrapped' :: Iso' CDouble (Unwrapped CDouble)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CDouble Double
x) -> Double
x) Double -> CDouble
CDouble
{-# INLINE _Wrapped' #-}
instance Rewrapped CPtrdiff t
instance Wrapped CPtrdiff where
type Unwrapped CPtrdiff = HTYPE_PTRDIFF_T
_Wrapped' :: Iso' CPtrdiff (Unwrapped CPtrdiff)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CPtrdiff Int64
x) -> Int64
x) Int64 -> CPtrdiff
CPtrdiff
{-# INLINE _Wrapped' #-}
instance Rewrapped CSize t
instance Wrapped CSize where
type Unwrapped CSize = HTYPE_SIZE_T
_Wrapped' :: Iso' CSize (Unwrapped CSize)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CSize Word64
x) -> Word64
x) Word64 -> CSize
CSize
{-# INLINE _Wrapped' #-}
instance Rewrapped CWchar t
instance Wrapped CWchar where
type Unwrapped CWchar = HTYPE_WCHAR_T
_Wrapped' :: Iso' CWchar (Unwrapped CWchar)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CWchar Int32
x) -> Int32
x) Int32 -> CWchar
CWchar
{-# INLINE _Wrapped' #-}
instance Rewrapped CSigAtomic t
instance Wrapped CSigAtomic where
type Unwrapped CSigAtomic =
#if defined(HTYPE_SIG_ATOMIC_T)
HTYPE_SIG_ATOMIC_T
#else
Int32
#endif
_Wrapped' :: Iso' CSigAtomic (Unwrapped CSigAtomic)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CSigAtomic Int32
x) -> Int32
x) Int32 -> CSigAtomic
CSigAtomic
{-# INLINE _Wrapped' #-}
instance Rewrapped CClock t
instance Wrapped CClock where
type Unwrapped CClock = HTYPE_CLOCK_T
_Wrapped' :: Iso' CClock (Unwrapped CClock)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CClock Int64
x) -> Int64
x) Int64 -> CClock
CClock
{-# INLINE _Wrapped' #-}
instance Rewrapped CTime t
instance Wrapped CTime where
type Unwrapped CTime = HTYPE_TIME_T
_Wrapped' :: Iso' CTime (Unwrapped CTime)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CTime Int64
x) -> Int64
x) Int64 -> CTime
CTime
{-# INLINE _Wrapped' #-}
instance Rewrapped CUSeconds t
instance Wrapped CUSeconds where
type Unwrapped CUSeconds = HTYPE_USECONDS_T
_Wrapped' :: Iso' CUSeconds (Unwrapped CUSeconds)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CUSeconds Word32
x) -> Word32
x) Word32 -> CUSeconds
CUSeconds
{-# INLINE _Wrapped' #-}
instance Rewrapped CSUSeconds t
instance Wrapped CSUSeconds where
type Unwrapped CSUSeconds = HTYPE_SUSECONDS_T
_Wrapped' :: Iso' CSUSeconds (Unwrapped CSUSeconds)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CSUSeconds Int64
x) -> Int64
x) Int64 -> CSUSeconds
CSUSeconds
{-# INLINE _Wrapped' #-}
instance Rewrapped CIntPtr t
instance Wrapped CIntPtr where
type Unwrapped CIntPtr = HTYPE_INTPTR_T
_Wrapped' :: Iso' CIntPtr (Unwrapped CIntPtr)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CIntPtr Int64
x) -> Int64
x) Int64 -> CIntPtr
CIntPtr
{-# INLINE _Wrapped' #-}
instance Rewrapped CUIntPtr t
instance Wrapped CUIntPtr where
type Unwrapped CUIntPtr = HTYPE_UINTPTR_T
_Wrapped' :: Iso' CUIntPtr (Unwrapped CUIntPtr)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CUIntPtr Word64
x) -> Word64
x) Word64 -> CUIntPtr
CUIntPtr
{-# INLINE _Wrapped' #-}
instance Rewrapped CIntMax t
instance Wrapped CIntMax where
type Unwrapped CIntMax = HTYPE_INTMAX_T
_Wrapped' :: Iso' CIntMax (Unwrapped CIntMax)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CIntMax Int64
x) -> Int64
x) Int64 -> CIntMax
CIntMax
{-# INLINE _Wrapped' #-}
instance Rewrapped CUIntMax t
instance Wrapped CUIntMax where
type Unwrapped CUIntMax = HTYPE_UINTMAX_T
_Wrapped' :: Iso' CUIntMax (Unwrapped CUIntMax)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CUIntMax Word64
x) -> Word64
x) Word64 -> CUIntMax
CUIntMax
{-# INLINE _Wrapped' #-}
instance (t ~ Par1 p') => Rewrapped (Par1 p) t
instance Wrapped (Par1 p) where
type Unwrapped (Par1 p) = p
_Wrapped' :: Iso' (Par1 p) (Unwrapped (Par1 p))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall p. Par1 p -> p
unPar1 forall p. p -> Par1 p
Par1
{-# INLINE _Wrapped' #-}
instance (t ~ Rec1 f' p') => Rewrapped (Rec1 f p) t
instance Wrapped (Rec1 f p) where
type Unwrapped (Rec1 f p) = f p
_Wrapped' :: Iso' (Rec1 f p) (Unwrapped (Rec1 f p))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall k (f :: k -> *) (p :: k). Rec1 f p -> f p
unRec1 forall k (f :: k -> *) (p :: k). f p -> Rec1 f p
Rec1
{-# INLINE _Wrapped' #-}
instance (t ~ K1 i' c' p') => Rewrapped (K1 i c p) t
instance Wrapped (K1 i c p) where
type Unwrapped (K1 i c p) = c
_Wrapped' :: Iso' (K1 i c p) (Unwrapped (K1 i c p))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall k i c (p :: k). K1 i c p -> c
unK1 forall k i c (p :: k). c -> K1 i c p
K1
{-# INLINE _Wrapped' #-}
instance (t ~ M1 i' c' f' p') => Rewrapped (M1 i c f p) t
instance Wrapped (M1 i c f p) where
type Unwrapped (M1 i c f p) = f p
_Wrapped' :: Iso' (M1 i c f p) (Unwrapped (M1 i c f p))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall k i (c :: Meta) (f :: k -> *) (p :: k). M1 i c f p -> f p
unM1 forall k i (c :: Meta) (f :: k -> *) (p :: k). f p -> M1 i c f p
M1
{-# INLINE _Wrapped' #-}
instance (t ~ (f' :.: g') p') => Rewrapped ((f :.: g) p) t
instance Wrapped ((f :.: g) p) where
type Unwrapped ((f :.: g) p) = f (g p)
_Wrapped' :: Iso' ((:.:) f g p) (Unwrapped ((:.:) f g p))
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso forall k2 k1 (f :: k2 -> *) (g :: k1 -> k2) (p :: k1).
(:.:) f g p -> f (g p)
unComp1 forall k2 k1 (f :: k2 -> *) (g :: k1 -> k2) (p :: k1).
f (g p) -> (:.:) f g p
Comp1
{-# INLINE _Wrapped' #-}
#if defined(HTYPE_DEV_T)
instance Rewrapped CDev t
instance Wrapped CDev where
type Unwrapped CDev = HTYPE_DEV_T
_Wrapped' :: Iso' CDev (Unwrapped CDev)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CDev Word64
x) -> Word64
x) Word64 -> CDev
CDev
{-# INLINE _Wrapped' #-}
#endif
#if defined(HTYPE_INO_T)
instance Rewrapped CIno t
instance Wrapped CIno where
type Unwrapped CIno = HTYPE_INO_T
_Wrapped' :: Iso' CIno (Unwrapped CIno)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CIno Word64
x) -> Word64
x) Word64 -> CIno
CIno
{-# INLINE _Wrapped' #-}
#endif
#if defined(HTYPE_MODE_T)
instance Rewrapped CMode t
instance Wrapped CMode where
type Unwrapped CMode = HTYPE_MODE_T
_Wrapped' :: Iso' CMode (Unwrapped CMode)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CMode Word32
x) -> Word32
x) Word32 -> CMode
CMode
{-# INLINE _Wrapped' #-}
#endif
#if defined(HTYPE_OFF_T)
instance Rewrapped COff t
instance Wrapped COff where
type Unwrapped COff = HTYPE_OFF_T
_Wrapped' :: Iso' COff (Unwrapped COff)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(COff Int64
x) -> Int64
x) Int64 -> COff
COff
{-# INLINE _Wrapped' #-}
#endif
#if defined(HTYPE_PID_T)
instance Rewrapped CPid t
instance Wrapped CPid where
type Unwrapped CPid = HTYPE_PID_T
_Wrapped' :: Iso' CPid (Unwrapped CPid)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CPid Int32
x) -> Int32
x) Int32 -> CPid
CPid
{-# INLINE _Wrapped' #-}
#endif
#if defined(HTYPE_SSIZE_T)
instance Rewrapped CSsize t
instance Wrapped CSsize where
type Unwrapped CSsize = HTYPE_SSIZE_T
_Wrapped' :: Iso' CSsize (Unwrapped CSsize)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CSsize Int64
x) -> Int64
x) Int64 -> CSsize
CSsize
{-# INLINE _Wrapped' #-}
#endif
#if defined(HTYPE_GID_T)
instance Rewrapped CGid t
instance Wrapped CGid where
type Unwrapped CGid = HTYPE_GID_T
_Wrapped' :: Iso' CGid (Unwrapped CGid)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CGid Word32
x) -> Word32
x) Word32 -> CGid
CGid
{-# INLINE _Wrapped' #-}
#endif
#if defined(HTYPE_NLINK_T)
instance Rewrapped CNlink t
instance Wrapped CNlink where
type Unwrapped CNlink = HTYPE_NLINK_T
_Wrapped' :: Iso' CNlink (Unwrapped CNlink)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CNlink Word64
x) -> Word64
x) Word64 -> CNlink
CNlink
{-# INLINE _Wrapped' #-}
#endif
#if defined(HTYPE_UID_T)
instance Rewrapped CUid t
instance Wrapped CUid where
type Unwrapped CUid = HTYPE_UID_T
_Wrapped' :: Iso' CUid (Unwrapped CUid)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CUid Word32
x) -> Word32
x) Word32 -> CUid
CUid
{-# INLINE _Wrapped' #-}
#endif
#if defined(HTYPE_CC_T)
instance Rewrapped CCc t
instance Wrapped CCc where
type Unwrapped CCc = HTYPE_CC_T
_Wrapped' :: Iso' CCc (Unwrapped CCc)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CCc Word8
x) -> Word8
x) Word8 -> CCc
CCc
{-# INLINE _Wrapped' #-}
#endif
#if defined(HTYPE_SPEED_T)
instance Rewrapped CSpeed t
instance Wrapped CSpeed where
type Unwrapped CSpeed = HTYPE_SPEED_T
_Wrapped' :: Iso' CSpeed (Unwrapped CSpeed)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CSpeed Word32
x) -> Word32
x) Word32 -> CSpeed
CSpeed
{-# INLINE _Wrapped' #-}
#endif
#if defined(HTYPE_TCFLAG_T)
instance Rewrapped CTcflag t
instance Wrapped CTcflag where
type Unwrapped CTcflag = HTYPE_TCFLAG_T
_Wrapped' :: Iso' CTcflag (Unwrapped CTcflag)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CTcflag Word32
x) -> Word32
x) Word32 -> CTcflag
CTcflag
{-# INLINE _Wrapped' #-}
#endif
#if defined(HTYPE_RLIM_T)
instance Rewrapped CRLim t
instance Wrapped CRLim where
type Unwrapped CRLim = HTYPE_RLIM_T
_Wrapped' :: Iso' CRLim (Unwrapped CRLim)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CRLim Word64
x) -> Word64
x) Word64 -> CRLim
CRLim
{-# INLINE _Wrapped' #-}
#endif
instance Rewrapped Fd t
instance Wrapped Fd where
type Unwrapped Fd = CInt
_Wrapped' :: Iso' Fd (Unwrapped Fd)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(Fd CInt
x) -> CInt
x) CInt -> Fd
Fd
{-# INLINE _Wrapped' #-}
#if MIN_VERSION_base(4,10,0)
instance Rewrapped CBool t
instance Wrapped CBool where
type Unwrapped CBool = HTYPE_BOOL
_Wrapped' :: Iso' CBool (Unwrapped CBool)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CBool Word8
x) -> Word8
x) Word8 -> CBool
CBool
{-# INLINE _Wrapped' #-}
# if defined(HTYPE_BLKSIZE_T)
instance Rewrapped CBlkSize t
instance Wrapped CBlkSize where
type Unwrapped CBlkSize = HTYPE_BLKSIZE_T
_Wrapped' :: Iso' CBlkSize (Unwrapped CBlkSize)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CBlkSize Int64
x) -> Int64
x) Int64 -> CBlkSize
CBlkSize
{-# INLINE _Wrapped' #-}
# endif
# if defined(HTYPE_BLKCNT_T)
instance Rewrapped CBlkCnt t
instance Wrapped CBlkCnt where
type Unwrapped CBlkCnt = HTYPE_BLKCNT_T
_Wrapped' :: Iso' CBlkCnt (Unwrapped CBlkCnt)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CBlkCnt Int64
x) -> Int64
x) Int64 -> CBlkCnt
CBlkCnt
{-# INLINE _Wrapped' #-}
# endif
# if defined(HTYPE_CLOCKID_T)
instance Rewrapped CClockId t
instance Wrapped CClockId where
type Unwrapped CClockId = HTYPE_CLOCKID_T
_Wrapped' :: Iso' CClockId (Unwrapped CClockId)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CClockId Int32
x) -> Int32
x) Int32 -> CClockId
CClockId
{-# INLINE _Wrapped' #-}
# endif
# if defined(HTYPE_FSBLKCNT_T)
instance Rewrapped CFsBlkCnt t
instance Wrapped CFsBlkCnt where
type Unwrapped CFsBlkCnt = HTYPE_FSBLKCNT_T
_Wrapped' :: Iso' CFsBlkCnt (Unwrapped CFsBlkCnt)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CFsBlkCnt Word64
x) -> Word64
x) Word64 -> CFsBlkCnt
CFsBlkCnt
{-# INLINE _Wrapped' #-}
# endif
# if defined(HTYPE_FSFILCNT_T)
instance Rewrapped CFsFilCnt t
instance Wrapped CFsFilCnt where
type Unwrapped CFsFilCnt = HTYPE_FSFILCNT_T
_Wrapped' :: Iso' CFsFilCnt (Unwrapped CFsFilCnt)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CFsFilCnt Word64
x) -> Word64
x) Word64 -> CFsFilCnt
CFsFilCnt
{-# INLINE _Wrapped' #-}
# endif
# if defined(HTYPE_ID_T)
instance Rewrapped CId t
instance Wrapped CId where
type Unwrapped CId = HTYPE_ID_T
_Wrapped' :: Iso' CId (Unwrapped CId)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CId Word32
x) -> Word32
x) Word32 -> CId
CId
{-# INLINE _Wrapped' #-}
# endif
# if defined(HTYPE_KEY_T)
instance Rewrapped CKey t
instance Wrapped CKey where
type Unwrapped CKey = HTYPE_KEY_T
_Wrapped' :: Iso' CKey (Unwrapped CKey)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CKey Int32
x) -> Int32
x) Int32 -> CKey
CKey
{-# INLINE _Wrapped' #-}
# endif
# if defined(HTYPE_TIMER_T)
instance Rewrapped CTimer t
instance Wrapped CTimer where
type Unwrapped CTimer = HTYPE_TIMER_T
_Wrapped' :: Iso' CTimer (Unwrapped CTimer)
_Wrapped' = forall s a b t. (s -> a) -> (b -> t) -> Iso s t a b
iso (\(CTimer Ptr ()
x) -> Ptr ()
x) Ptr () -> CTimer
CTimer
{-# INLINE _Wrapped' #-}
# endif
#endif
op :: Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op :: forall s. Wrapped s => (Unwrapped s -> s) -> s -> Unwrapped s
op Unwrapped s -> s
_ = forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a
view forall s. Wrapped s => Iso' s (Unwrapped s)
_Wrapped'
{-# INLINE op #-}
_Wrapping' :: Wrapped s => (Unwrapped s -> s) -> Iso' s (Unwrapped s)
_Wrapping' :: forall s. Wrapped s => (Unwrapped s -> s) -> Iso' s (Unwrapped s)
_Wrapping' Unwrapped s -> s
_ = forall s. Wrapped s => Iso' s (Unwrapped s)
_Wrapped'
{-# INLINE _Wrapping' #-}
_Unwrapping' :: Wrapped s => (Unwrapped s -> s) -> Iso' (Unwrapped s) s
_Unwrapping' :: forall s. Wrapped s => (Unwrapped s -> s) -> Iso' (Unwrapped s) s
_Unwrapping' Unwrapped s -> s
_ = forall s t a b. AnIso s t a b -> Iso b a t s
from forall s. Wrapped s => Iso' s (Unwrapped s)
_Wrapped'
{-# INLINE _Unwrapping' #-}
_Wrapping :: Rewrapping s t => (Unwrapped s -> s) -> Iso s t (Unwrapped s) (Unwrapped t)
_Wrapping :: forall s t.
Rewrapping s t =>
(Unwrapped s -> s) -> Iso s t (Unwrapped s) (Unwrapped t)
_Wrapping Unwrapped s -> s
_ = forall s t. Rewrapping s t => Iso s t (Unwrapped s) (Unwrapped t)
_Wrapped
{-# INLINE _Wrapping #-}
_Unwrapping :: Rewrapping s t => (Unwrapped s -> s) -> Iso (Unwrapped t) (Unwrapped s) t s
_Unwrapping :: forall s t.
Rewrapping s t =>
(Unwrapped s -> s) -> Iso (Unwrapped t) (Unwrapped s) t s
_Unwrapping Unwrapped s -> s
_ = forall s t a b. AnIso s t a b -> Iso b a t s
from forall s t. Rewrapping s t => Iso s t (Unwrapped s) (Unwrapped t)
_Wrapped
{-# INLINE _Unwrapping #-}
ala :: (Functor f, Rewrapping s t) => (Unwrapped s -> s) -> ((Unwrapped t -> t) -> f s) -> f (Unwrapped s)
ala :: forall (f :: * -> *) s t.
(Functor f, Rewrapping s t) =>
(Unwrapped s -> s)
-> ((Unwrapped t -> t) -> f s) -> f (Unwrapped s)
ala Unwrapped s -> s
f = forall {k} s (g :: k -> *) (t :: k) a (b :: k).
Optic (Costar ((->) s)) g s t a b -> ((s -> a) -> g b) -> g t
xplat forall a b. (a -> b) -> a -> b
$ forall s t.
Rewrapping s t =>
(Unwrapped s -> s) -> Iso (Unwrapped t) (Unwrapped s) t s
_Unwrapping Unwrapped s -> s
f
{-# INLINE ala #-}
alaf :: (Functor f, Functor g, Rewrapping s t) => (Unwrapped s -> s) -> (f t -> g s) -> f (Unwrapped t) -> g (Unwrapped s)
alaf :: forall (f :: * -> *) (g :: * -> *) s t.
(Functor f, Functor g, Rewrapping s t) =>
(Unwrapped s -> s)
-> (f t -> g s) -> f (Unwrapped t) -> g (Unwrapped s)
alaf Unwrapped s -> s
f = forall {k1} {k2} (f :: k1 -> *) (g :: k2 -> *) (s :: k1) (t :: k2)
(a :: k1) (b :: k2).
Optic (Costar f) g s t a b -> (f a -> g b) -> f s -> g t
xplatf forall a b. (a -> b) -> a -> b
$ forall s t.
Rewrapping s t =>
(Unwrapped s -> s) -> Iso (Unwrapped t) (Unwrapped s) t s
_Unwrapping Unwrapped s -> s
f
{-# INLINE alaf #-}