    {-# LANGUAGE DeriveFunctor #-}
    {-# LANGUAGE DeriveFoldable #-}
    {-# LANGUAGE DeriveTraversable #-}
    {-# LANGUAGE FlexibleContexts #-}
    {-# LANGUAGE GeneralizedNewtypeDeriving #-}
    {-# LANGUAGE TypeApplications #-}
    {-# LANGUAGE TypeFamilies #-}
    {-# LANGUAGE UndecidableInstances #-}

    -- | Generic representations as data types.
    --
    -- === Warning
    --
    -- This is an internal module: it is not subject to any versioning policy,
    -- breaking changes can happen at any time.
    --
    -- If something here seems useful, please report it or create a pull request to
    -- export it from an external module.

    module Generic.Data.Internal.Data where

    import Control.Applicative
    import Control.Monad
    import Data.Functor.Classes
    import Data.Functor.Contravariant (Contravariant, phantom)
    import Data.Semigroup
    import GHC.Generics

    import Generic.Data.Internal.Enum
    import Generic.Data.Internal.Show

    -- | Synthetic data type.
    --
    -- A wrapper to view a generic 'Rep' as the datatype it's supposed to
    -- represent, without needing a declaration.
    newtype Data r p = Data { forall (r :: * -> *) p. Data r p -> r p
    unData :: r p }
      deriving ( (forall a b. (a -> b) -> Data r a -> Data r b)
    -> (forall a b. a -> Data r b -> Data r a) -> Functor (Data r)
    forall a b. a -> Data r b -> Data r a
    forall a b. (a -> b) -> Data r a -> Data r b
    forall (r :: * -> *) a b. Functor r => a -> Data r b -> Data r a
    forall (r :: * -> *) a b.
    Functor r =>
    (a -> b) -> Data r a -> Data r b
    forall (f :: * -> *).
    (forall a b. (a -> b) -> f a -> f b)
    -> (forall a b. a -> f b -> f a) -> Functor f
    $cfmap :: forall (r :: * -> *) a b.
    Functor r =>
    (a -> b) -> Data r a -> Data r b
    fmap :: forall a b. (a -> b) -> Data r a -> Data r b
    $c<$ :: forall (r :: * -> *) a b. Functor r => a -> Data r b -> Data r a
    <$ :: forall a b. a -> Data r b -> Data r a
    Functor, (forall m. Monoid m => Data r m -> m)
    -> (forall m a. Monoid m => (a -> m) -> Data r a -> m)
    -> (forall m a. Monoid m => (a -> m) -> Data r a -> m)
    -> (forall a b. (a -> b -> b) -> b -> Data r a -> b)
    -> (forall a b. (a -> b -> b) -> b -> Data r a -> b)
    -> (forall b a. (b -> a -> b) -> b -> Data r a -> b)
    -> (forall b a. (b -> a -> b) -> b -> Data r a -> b)
    -> (forall a. (a -> a -> a) -> Data r a -> a)
    -> (forall a. (a -> a -> a) -> Data r a -> a)
    -> (forall a. Data r a -> [a])
    -> (forall a. Data r a -> Bool)
    -> (forall a. Data r a -> Int)
    -> (forall a. Eq a => a -> Data r a -> Bool)
    -> (forall a. Ord a => Data r a -> a)
    -> (forall a. Ord a => Data r a -> a)
    -> (forall a. Num a => Data r a -> a)
    -> (forall a. Num a => Data r a -> a)
    -> Foldable (Data r)
    forall a. Eq a => a -> Data r a -> Bool
    forall a. Num a => Data r a -> a
    forall a. Ord a => Data r a -> a
    forall m. Monoid m => Data r m -> m
    forall a. Data r a -> Bool
    forall a. Data r a -> Int
    forall a. Data r a -> [a]
    forall a. (a -> a -> a) -> Data r a -> a
    forall m a. Monoid m => (a -> m) -> Data r a -> m
    forall b a. (b -> a -> b) -> b -> Data r a -> b
    forall a b. (a -> b -> b) -> b -> Data r a -> b
    forall (r :: * -> *) a. (Foldable r, Eq a) => a -> Data r a -> Bool
    forall (r :: * -> *) a. (Foldable r, Num a) => Data r a -> a
    forall (r :: * -> *) a. (Foldable r, Ord a) => Data r a -> a
    forall (r :: * -> *) m. (Foldable r, Monoid m) => Data r m -> m
    forall (r :: * -> *) a. Foldable r => Data r a -> Bool
    forall (r :: * -> *) a. Foldable r => Data r a -> Int
    forall (r :: * -> *) a. Foldable r => Data r a -> [a]
    forall (r :: * -> *) a.
    Foldable r =>
    (a -> a -> a) -> Data r a -> a
    forall (r :: * -> *) m a.
    (Foldable r, Monoid m) =>
    (a -> m) -> Data r a -> m
    forall (r :: * -> *) b a.
    Foldable r =>
    (b -> a -> b) -> b -> Data r a -> b
    forall (r :: * -> *) a b.
    Foldable r =>
    (a -> b -> b) -> b -> Data r a -> b
    forall (t :: * -> *).
    (forall m. Monoid m => t m -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall m a. Monoid m => (a -> m) -> t a -> m)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall a b. (a -> b -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall b a. (b -> a -> b) -> b -> t a -> b)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. (a -> a -> a) -> t a -> a)
    -> (forall a. t a -> [a])
    -> (forall a. t a -> Bool)
    -> (forall a. t a -> Int)
    -> (forall a. Eq a => a -> t a -> Bool)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Ord a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> (forall a. Num a => t a -> a)
    -> Foldable t
    $cfold :: forall (r :: * -> *) m. (Foldable r, Monoid m) => Data r m -> m
    fold :: forall m. Monoid m => Data r m -> m
    $cfoldMap :: forall (r :: * -> *) m a.
    (Foldable r, Monoid m) =>
    (a -> m) -> Data r a -> m
    foldMap :: forall m a. Monoid m => (a -> m) -> Data r a -> m
    $cfoldMap' :: forall (r :: * -> *) m a.
    (Foldable r, Monoid m) =>
    (a -> m) -> Data r a -> m
    foldMap' :: forall m a. Monoid m => (a -> m) -> Data r a -> m
    $cfoldr :: forall (r :: * -> *) a b.
    Foldable r =>
    (a -> b -> b) -> b -> Data r a -> b
    foldr :: forall a b. (a -> b -> b) -> b -> Data r a -> b
    $cfoldr' :: forall (r :: * -> *) a b.
    Foldable r =>
    (a -> b -> b) -> b -> Data r a -> b
    foldr' :: forall a b. (a -> b -> b) -> b -> Data r a -> b
    $cfoldl :: forall (r :: * -> *) b a.
    Foldable r =>
    (b -> a -> b) -> b -> Data r a -> b
    foldl :: forall b a. (b -> a -> b) -> b -> Data r a -> b
    $cfoldl' :: forall (r :: * -> *) b a.
    Foldable r =>
    (b -> a -> b) -> b -> Data r a -> b
    foldl' :: forall b a. (b -> a -> b) -> b -> Data r a -> b
    $cfoldr1 :: forall (r :: * -> *) a.
    Foldable r =>
    (a -> a -> a) -> Data r a -> a
    foldr1 :: forall a. (a -> a -> a) -> Data r a -> a
    $cfoldl1 :: forall (r :: * -> *) a.
    Foldable r =>
    (a -> a -> a) -> Data r a -> a
    foldl1 :: forall a. (a -> a -> a) -> Data r a -> a
    $ctoList :: forall (r :: * -> *) a. Foldable r => Data r a -> [a]
    toList :: forall a. Data r a -> [a]
    $cnull :: forall (r :: * -> *) a. Foldable r => Data r a -> Bool
    null :: forall a. Data r a -> Bool
    $clength :: forall (r :: * -> *) a. Foldable r => Data r a -> Int
    length :: forall a. Data r a -> Int
    $celem :: forall (r :: * -> *) a. (Foldable r, Eq a) => a -> Data r a -> Bool
    elem :: forall a. Eq a => a -> Data r a -> Bool
    $cmaximum :: forall (r :: * -> *) a. (Foldable r, Ord a) => Data r a -> a
    maximum :: forall a. Ord a => Data r a -> a
    $cminimum :: forall (r :: * -> *) a. (Foldable r, Ord a) => Data r a -> a
    minimum :: forall a. Ord a => Data r a -> a
    $csum :: forall (r :: * -> *) a. (Foldable r, Num a) => Data r a -> a
    sum :: forall a. Num a => Data r a -> a
    $cproduct :: forall (r :: * -> *) a. (Foldable r, Num a) => Data r a -> a
    product :: forall a. Num a => Data r a -> a
    Foldable, Functor (Data r)
    Foldable (Data r)
    (Functor (Data r), Foldable (Data r)) =>
    (forall (f :: * -> *) a b.
     Applicative f =>
     (a -> f b) -> Data r a -> f (Data r b))
    -> (forall (f :: * -> *) a.
        Applicative f =>
        Data r (f a) -> f (Data r a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> Data r a -> m (Data r b))
    -> (forall (m :: * -> *) a.
        Monad m =>
        Data r (m a) -> m (Data r a))
    -> Traversable (Data r)
    forall (t :: * -> *).
    (Functor t, Foldable t) =>
    (forall (f :: * -> *) a b.
     Applicative f =>
     (a -> f b) -> t a -> f (t b))
    -> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
    -> (forall (m :: * -> *) a b.
        Monad m =>
        (a -> m b) -> t a -> m (t b))
    -> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
    -> Traversable t
    forall (r :: * -> *). Traversable r => Functor (Data r)
    forall (r :: * -> *). Traversable r => Foldable (Data r)
    forall (r :: * -> *) (m :: * -> *) a.
    (Traversable r, Monad m) =>
    Data r (m a) -> m (Data r a)
    forall (r :: * -> *) (f :: * -> *) a.
    (Traversable r, Applicative f) =>
    Data r (f a) -> f (Data r a)
    forall (r :: * -> *) (m :: * -> *) a b.
    (Traversable r, Monad m) =>
    (a -> m b) -> Data r a -> m (Data r b)
    forall (r :: * -> *) (f :: * -> *) a b.
    (Traversable r, Applicative f) =>
    (a -> f b) -> Data r a -> f (Data r b)
    forall (m :: * -> *) a. Monad m => Data r (m a) -> m (Data r a)
    forall (f :: * -> *) a.
    Applicative f =>
    Data r (f a) -> f (Data r a)
    forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Data r a -> m (Data r b)
    forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Data r a -> f (Data r b)
    $ctraverse :: forall (r :: * -> *) (f :: * -> *) a b.
    (Traversable r, Applicative f) =>
    (a -> f b) -> Data r a -> f (Data r b)
    traverse :: forall (f :: * -> *) a b.
    Applicative f =>
    (a -> f b) -> Data r a -> f (Data r b)
    $csequenceA :: forall (r :: * -> *) (f :: * -> *) a.
    (Traversable r, Applicative f) =>
    Data r (f a) -> f (Data r a)
    sequenceA :: forall (f :: * -> *) a.
    Applicative f =>
    Data r (f a) -> f (Data r a)
    $cmapM :: forall (r :: * -> *) (m :: * -> *) a b.
    (Traversable r, Monad m) =>
    (a -> m b) -> Data r a -> m (Data r b)
    mapM :: forall (m :: * -> *) a b.
    Monad m =>
    (a -> m b) -> Data r a -> m (Data r b)
    $csequence :: forall (r :: * -> *) (m :: * -> *) a.
    (Traversable r, Monad m) =>
    Data r (m a) -> m (Data r a)
    sequence :: forall (m :: * -> *) a. Monad m => Data r (m a) -> m (Data r a)
    Traversable, Functor (Data r)
    Functor (Data r) =>
    (forall a. a -> Data r a)
    -> (forall a b. Data r (a -> b) -> Data r a -> Data r b)
    -> (forall a b c.
        (a -> b -> c) -> Data r a -> Data r b -> Data r c)
    -> (forall a b. Data r a -> Data r b -> Data r b)
    -> (forall a b. Data r a -> Data r b -> Data r a)
    -> Applicative (Data r)
    forall a. a -> Data r a
    forall a b. Data r a -> Data r b -> Data r a
    forall a b. Data r a -> Data r b -> Data r b
    forall a b. Data r (a -> b) -> Data r a -> Data r b
    forall a b c. (a -> b -> c) -> Data r a -> Data r b -> Data r c
    forall (f :: * -> *).
    Functor f =>
    (forall a. a -> f a)
    -> (forall a b. f (a -> b) -> f a -> f b)
    -> (forall a b c. (a -> b -> c) -> f a -> f b -> f c)
    -> (forall a b. f a -> f b -> f b)
    -> (forall a b. f a -> f b -> f a)
    -> Applicative f
    forall (r :: * -> *). Applicative r => Functor (Data r)
    forall (r :: * -> *) a. Applicative r => a -> Data r a
    forall (r :: * -> *) a b.
    Applicative r =>
    Data r a -> Data r b -> Data r a
    forall (r :: * -> *) a b.
    Applicative r =>
    Data r a -> Data r b -> Data r b
    forall (r :: * -> *) a b.
    Applicative r =>
    Data r (a -> b) -> Data r a -> Data r b
    forall (r :: * -> *) a b c.
    Applicative r =>
    (a -> b -> c) -> Data r a -> Data r b -> Data r c
    $cpure :: forall (r :: * -> *) a. Applicative r => a -> Data r a
    pure :: forall a. a -> Data r a
    $c<*> :: forall (r :: * -> *) a b.
    Applicative r =>
    Data r (a -> b) -> Data r a -> Data r b
    <*> :: forall a b. Data r (a -> b) -> Data r a -> Data r b
    $cliftA2 :: forall (r :: * -> *) a b c.
    Applicative r =>
    (a -> b -> c) -> Data r a -> Data r b -> Data r c
    liftA2 :: forall a b c. (a -> b -> c) -> Data r a -> Data r b -> Data r c
    $c*> :: forall (r :: * -> *) a b.
    Applicative r =>
    Data r a -> Data r b -> Data r b
    *> :: forall a b. Data r a -> Data r b -> Data r b
    $c<* :: forall (r :: * -> *) a b.
    Applicative r =>
    Data r a -> Data r b -> Data r a
    <* :: forall a b. Data r a -> Data r b -> Data r a
    Applicative, Applicative (Data r)
    Applicative (Data r) =>
    (forall a. Data r a)
    -> (forall a. Data r a -> Data r a -> Data r a)
    -> (forall a. Data r a -> Data r [a])
    -> (forall a. Data r a -> Data r [a])
    -> Alternative (Data r)
    forall a. Data r a
    forall a. Data r a -> Data r [a]
    forall a. Data r a -> Data r a -> Data r a
    forall (f :: * -> *).
    Applicative f =>
    (forall a. f a)
    -> (forall a. f a -> f a -> f a)
    -> (forall a. f a -> f [a])
    -> (forall a. f a -> f [a])
    -> Alternative f
    forall (r :: * -> *). Alternative r => Applicative (Data r)
    forall (r :: * -> *) a. Alternative r => Data r a
    forall (r :: * -> *) a. Alternative r => Data r a -> Data r [a]
    forall (r :: * -> *) a.
    Alternative r =>
    Data r a -> Data r a -> Data r a
    $cempty :: forall (r :: * -> *) a. Alternative r => Data r a
    empty :: forall a. Data r a
    $c<|> :: forall (r :: * -> *) a.
    Alternative r =>
    Data r a -> Data r a -> Data r a
    <|> :: forall a. Data r a -> Data r a -> Data r a
    $csome :: forall (r :: * -> *) a. Alternative r => Data r a -> Data r [a]
    some :: forall a. Data r a -> Data r [a]
    $cmany :: forall (r :: * -> *) a. Alternative r => Data r a -> Data r [a]
    many :: forall a. Data r a -> Data r [a]
    Alternative
               , Applicative (Data r)
    Applicative (Data r) =>
    (forall a b. Data r a -> (a -> Data r b) -> Data r b)
    -> (forall a b. Data r a -> Data r b -> Data r b)
    -> (forall a. a -> Data r a)
    -> Monad (Data r)
    forall a. a -> Data r a
    forall a b. Data r a -> Data r b -> Data r b
    forall a b. Data r a -> (a -> Data r b) -> Data r b
    forall (r :: * -> *). Monad r => Applicative (Data r)
    forall (r :: * -> *) a. Monad r => a -> Data r a
    forall (r :: * -> *) a b.
    Monad r =>
    Data r a -> Data r b -> Data r b
    forall (r :: * -> *) a b.
    Monad r =>
    Data r a -> (a -> Data r b) -> Data r b
    forall (m :: * -> *).
    Applicative m =>
    (forall a b. m a -> (a -> m b) -> m b)
    -> (forall a b. m a -> m b -> m b)
    -> (forall a. a -> m a)
    -> Monad m
    $c>>= :: forall (r :: * -> *) a b.
    Monad r =>
    Data r a -> (a -> Data r b) -> Data r b
    >>= :: forall a b. Data r a -> (a -> Data r b) -> Data r b
    $c>> :: forall (r :: * -> *) a b.
    Monad r =>
    Data r a -> Data r b -> Data r b
    >> :: forall a b. Data r a -> Data r b -> Data r b
    $creturn :: forall (r :: * -> *) a. Monad r => a -> Data r a
    return :: forall a. a -> Data r a
    Monad, Monad (Data r)
    Alternative (Data r)
    (Alternative (Data r), Monad (Data r)) =>
    (forall a. Data r a)
    -> (forall a. Data r a -> Data r a -> Data r a)
    -> MonadPlus (Data r)
    forall a. Data r a
    forall a. Data r a -> Data r a -> Data r a
    forall (r :: * -> *). MonadPlus r => Monad (Data r)
    forall (r :: * -> *). MonadPlus r => Alternative (Data r)
    forall (r :: * -> *) a. MonadPlus r => Data r a
    forall (r :: * -> *) a.
    MonadPlus r =>
    Data r a -> Data r a -> Data r a
    forall (m :: * -> *).
    (Alternative m, Monad m) =>
    (forall a. m a) -> (forall a. m a -> m a -> m a) -> MonadPlus m
    $cmzero :: forall (r :: * -> *) a. MonadPlus r => Data r a
    mzero :: forall a. Data r a
    $cmplus :: forall (r :: * -> *) a.
    MonadPlus r =>
    Data r a -> Data r a -> Data r a
    mplus :: forall a. Data r a -> Data r a -> Data r a
    MonadPlus, (forall a' a. (a' -> a) -> Data r a -> Data r a')
    -> (forall b a. b -> Data r b -> Data r a)
    -> Contravariant (Data r)
    forall b a. b -> Data r b -> Data r a
    forall a' a. (a' -> a) -> Data r a -> Data r a'
    forall (r :: * -> *) b a.
    Contravariant r =>
    b -> Data r b -> Data r a
    forall (r :: * -> *) a' a.
    Contravariant r =>
    (a' -> a) -> Data r a -> Data r a'
    forall (f :: * -> *).
    (forall a' a. (a' -> a) -> f a -> f a')
    -> (forall b a. b -> f b -> f a) -> Contravariant f
    $ccontramap :: forall (r :: * -> *) a' a.
    Contravariant r =>
    (a' -> a) -> Data r a -> Data r a'
    contramap :: forall a' a. (a' -> a) -> Data r a -> Data r a'
    $c>$ :: forall (r :: * -> *) b a.
    Contravariant r =>
    b -> Data r b -> Data r a
    >$ :: forall b a. b -> Data r b -> Data r a
    Contravariant
               , Data r p -> Data r p -> Bool
    (Data r p -> Data r p -> Bool)
    -> (Data r p -> Data r p -> Bool) -> Eq (Data r p)
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    forall (r :: * -> *) p. Eq (r p) => Data r p -> Data r p -> Bool
    $c== :: forall (r :: * -> *) p. Eq (r p) => Data r p -> Data r p -> Bool
    == :: Data r p -> Data r p -> Bool
    $c/= :: forall (r :: * -> *) p. Eq (r p) => Data r p -> Data r p -> Bool
    /= :: Data r p -> Data r p -> Bool
    Eq, Eq (Data r p)
    Eq (Data r p) =>
    (Data r p -> Data r p -> Ordering)
    -> (Data r p -> Data r p -> Bool)
    -> (Data r p -> Data r p -> Bool)
    -> (Data r p -> Data r p -> Bool)
    -> (Data r p -> Data r p -> Bool)
    -> (Data r p -> Data r p -> Data r p)
    -> (Data r p -> Data r p -> Data r p)
    -> Ord (Data r p)
    Data r p -> Data r p -> Bool
    Data r p -> Data r p -> Ordering
    Data r p -> Data r p -> Data r p
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    forall (r :: * -> *) p. Ord (r p) => Eq (Data r p)
    forall (r :: * -> *) p. Ord (r p) => Data r p -> Data r p -> Bool
    forall (r :: * -> *) p.
    Ord (r p) =>
    Data r p -> Data r p -> Ordering
    forall (r :: * -> *) p.
    Ord (r p) =>
    Data r p -> Data r p -> Data r p
    $ccompare :: forall (r :: * -> *) p.
    Ord (r p) =>
    Data r p -> Data r p -> Ordering
    compare :: Data r p -> Data r p -> Ordering
    $c< :: forall (r :: * -> *) p. Ord (r p) => Data r p -> Data r p -> Bool
    < :: Data r p -> Data r p -> Bool
    $c<= :: forall (r :: * -> *) p. Ord (r p) => Data r p -> Data r p -> Bool
    <= :: Data r p -> Data r p -> Bool
    $c> :: forall (r :: * -> *) p. Ord (r p) => Data r p -> Data r p -> Bool
    > :: Data r p -> Data r p -> Bool
    $c>= :: forall (r :: * -> *) p. Ord (r p) => Data r p -> Data r p -> Bool
    >= :: Data r p -> Data r p -> Bool
    $cmax :: forall (r :: * -> *) p.
    Ord (r p) =>
    Data r p -> Data r p -> Data r p
    max :: Data r p -> Data r p -> Data r p
    $cmin :: forall (r :: * -> *) p.
    Ord (r p) =>
    Data r p -> Data r p -> Data r p
    min :: Data r p -> Data r p -> Data r p
    Ord, (forall a. Eq a => Eq (Data r a)) =>
    (forall a b. (a -> b -> Bool) -> Data r a -> Data r b -> Bool)
    -> Eq1 (Data r)
    forall a. Eq a => Eq (Data r a)
    forall a b. (a -> b -> Bool) -> Data r a -> Data r b -> Bool
    forall (r :: * -> *) a. (Eq1 r, Eq a) => Eq (Data r a)
    forall (r :: * -> *) a b.
    Eq1 r =>
    (a -> b -> Bool) -> Data r a -> Data r b -> Bool
    forall (f :: * -> *).
    (forall a. Eq a => Eq (f a)) =>
    (forall a b. (a -> b -> Bool) -> f a -> f b -> Bool) -> Eq1 f
    $cliftEq :: forall (r :: * -> *) a b.
    Eq1 r =>
    (a -> b -> Bool) -> Data r a -> Data r b -> Bool
    liftEq :: forall a b. (a -> b -> Bool) -> Data r a -> Data r b -> Bool
    Eq1, Eq1 (Data r)
    (Eq1 (Data r), forall a. Ord a => Ord (Data r a)) =>
    (forall a b.
     (a -> b -> Ordering) -> Data r a -> Data r b -> Ordering)
    -> Ord1 (Data r)
    forall a. Ord a => Ord (Data r a)
    forall a b.
    (a -> b -> Ordering) -> Data r a -> Data r b -> Ordering
    forall (r :: * -> *). Ord1 r => Eq1 (Data r)
    forall (r :: * -> *) a. (Ord1 r, Ord a) => Ord (Data r a)
    forall (r :: * -> *) a b.
    Ord1 r =>
    (a -> b -> Ordering) -> Data r a -> Data r b -> Ordering
    forall (f :: * -> *).
    (Eq1 f, forall a. Ord a => Ord (f a)) =>
    (forall a b. (a -> b -> Ordering) -> f a -> f b -> Ordering)
    -> Ord1 f
    $cliftCompare :: forall (r :: * -> *) a b.
    Ord1 r =>
    (a -> b -> Ordering) -> Data r a -> Data r b -> Ordering
    liftCompare :: forall a b.
    (a -> b -> Ordering) -> Data r a -> Data r b -> Ordering
    Ord1, NonEmpty (Data r p) -> Data r p
    Data r p -> Data r p -> Data r p
    (Data r p -> Data r p -> Data r p)
    -> (NonEmpty (Data r p) -> Data r p)
    -> (forall b. Integral b => b -> Data r p -> Data r p)
    -> Semigroup (Data r p)
    forall b. Integral b => b -> Data r p -> Data r p
    forall a.
    (a -> a -> a)
    -> (NonEmpty a -> a)
    -> (forall b. Integral b => b -> a -> a)
    -> Semigroup a
    forall (r :: * -> *) p.
    Semigroup (r p) =>
    NonEmpty (Data r p) -> Data r p
    forall (r :: * -> *) p.
    Semigroup (r p) =>
    Data r p -> Data r p -> Data r p
    forall (r :: * -> *) p b.
    (Semigroup (r p), Integral b) =>
    b -> Data r p -> Data r p
    $c<> :: forall (r :: * -> *) p.
    Semigroup (r p) =>
    Data r p -> Data r p -> Data r p
    <> :: Data r p -> Data r p -> Data r p
    $csconcat :: forall (r :: * -> *) p.
    Semigroup (r p) =>
    NonEmpty (Data r p) -> Data r p
    sconcat :: NonEmpty (Data r p) -> Data r p
    $cstimes :: forall (r :: * -> *) p b.
    (Semigroup (r p), Integral b) =>
    b -> Data r p -> Data r p
    stimes :: forall b. Integral b => b -> Data r p -> Data r p
    Semigroup, Semigroup (Data r p)
    Data r p
    Semigroup (Data r p) =>
    Data r p
    -> (Data r p -> Data r p -> Data r p)
    -> ([Data r p] -> Data r p)
    -> Monoid (Data r p)
    [Data r p] -> Data r p
    Data r p -> Data r p -> Data r p
    forall a.
    Semigroup a =>
    a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
    forall (r :: * -> *) p. Monoid (r p) => Semigroup (Data r p)
    forall (r :: * -> *) p. Monoid (r p) => Data r p
    forall (r :: * -> *) p. Monoid (r p) => [Data r p] -> Data r p
    forall (r :: * -> *) p.
    Monoid (r p) =>
    Data r p -> Data r p -> Data r p
    $cmempty :: forall (r :: * -> *) p. Monoid (r p) => Data r p
    mempty :: Data r p
    $cmappend :: forall (r :: * -> *) p.
    Monoid (r p) =>
    Data r p -> Data r p -> Data r p
    mappend :: Data r p -> Data r p -> Data r p
    $cmconcat :: forall (r :: * -> *) p. Monoid (r p) => [Data r p] -> Data r p
    mconcat :: [Data r p] -> Data r p
    Monoid )

    -- | Conversion between a generic type and the synthetic type made using its
    -- representation. Inverse of 'fromData'.
    toData :: Generic a => a -> Data (Rep a) p
    toData :: forall a p. Generic a => a -> Data (Rep a) p
    toData = Rep a p -> Data (Rep a) p
    forall (r :: * -> *) p. r p -> Data r p
    Data (Rep a p -> Data (Rep a) p)
    -> (a -> Rep a p) -> a -> Data (Rep a) p
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . a -> Rep a p
    forall x. a -> Rep a x
    forall a x. Generic a => a -> Rep a x
    from

    -- | Inverse of 'toData'.
    fromData :: Generic a => Data (Rep a) p -> a
    fromData :: forall a p. Generic a => Data (Rep a) p -> a
    fromData = Rep a p -> a
    forall a x. Generic a => Rep a x -> a
    forall x. Rep a x -> a
    to (Rep a p -> a)
    -> (Data (Rep a) p -> Rep a p) -> Data (Rep a) p -> a
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Data (Rep a) p -> Rep a p
    forall (r :: * -> *) p. Data r p -> r p
    unData

    instance (Functor r, Contravariant r) => Generic (Data r p) where
      type Rep (Data r p) = r
      to :: forall x. Rep (Data r p) x -> Data r p
    to = r p -> Data r p
    forall (r :: * -> *) p. r p -> Data r p
    Data (r p -> Data r p) -> (r x -> r p) -> r x -> Data r p
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . r x -> r p
    forall (f :: * -> *) a b.
    (Functor f, Contravariant f) =>
    f a -> f b
    phantom
      from :: forall x. Data r p -> Rep (Data r p) x
    from = r p -> r x
    forall (f :: * -> *) a b.
    (Functor f, Contravariant f) =>
    f a -> f b
    phantom (r p -> r x) -> (Data r p -> r p) -> Data r p -> r x
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Data r p -> r p
    forall (r :: * -> *) p. Data r p -> r p
    unData

    instance Generic1 (Data r) where
      type Rep1 (Data r) = r
      to1 :: forall a. Rep1 (Data r) a -> Data r a
    to1 = r a -> Data r a
    Rep1 (Data r) a -> Data r a
    forall (r :: * -> *) p. r p -> Data r p
    Data
      from1 :: forall a. Data r a -> Rep1 (Data r) a
    from1 = Data r a -> r a
    Data r a -> Rep1 (Data r) a
    forall (r :: * -> *) p. Data r p -> r p
    unData

    instance (GShow1 r, Show p) => Show (Data r p) where
      showsPrec :: Int -> Data r p -> ShowS
    showsPrec = (Data r p -> Int -> ShowS) -> Int -> Data r p -> ShowS
    forall a b c. (a -> b -> c) -> b -> a -> c
    flip ((Int -> p -> ShowS) -> ([p] -> ShowS) -> r p -> Int -> ShowS
    forall (f :: * -> *) a.
    GShow1 f =>
    (Int -> a -> ShowS) -> ([a] -> ShowS) -> f a -> Int -> ShowS
    gLiftPrecShows Int -> p -> ShowS
    forall a. Show a => Int -> a -> ShowS
    showsPrec [p] -> ShowS
    forall a. Show a => [a] -> ShowS
    showList (r p -> Int -> ShowS)
    -> (Data r p -> r p) -> Data r p -> Int -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Data r p -> r p
    forall (r :: * -> *) p. Data r p -> r p
    unData)

    instance GShow1 r => Show1 (Data r) where
      liftShowsPrec :: forall a.
    (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Data r a -> ShowS
    liftShowsPrec = (((([a] -> ShowS) -> r a -> Int -> ShowS)
     -> ([a] -> ShowS) -> Int -> Data r a -> ShowS)
    -> ((Int -> a -> ShowS) -> ([a] -> ShowS) -> r a -> Int -> ShowS)
    -> (Int -> a -> ShowS)
    -> ([a] -> ShowS)
    -> Int
    -> Data r a
    -> ShowS
    forall a b.
    (a -> b) -> ((Int -> a -> ShowS) -> a) -> (Int -> a -> ShowS) -> b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap (((([a] -> ShowS) -> r a -> Int -> ShowS)
      -> ([a] -> ShowS) -> Int -> Data r a -> ShowS)
     -> ((Int -> a -> ShowS) -> ([a] -> ShowS) -> r a -> Int -> ShowS)
     -> (Int -> a -> ShowS)
     -> ([a] -> ShowS)
     -> Int
     -> Data r a
     -> ShowS)
    -> (((r a -> Int -> ShowS) -> Int -> Data r a -> ShowS)
        -> (([a] -> ShowS) -> r a -> Int -> ShowS)
        -> ([a] -> ShowS)
        -> Int
        -> Data r a
        -> ShowS)
    -> ((r a -> Int -> ShowS) -> Int -> Data r a -> ShowS)
    -> ((Int -> a -> ShowS) -> ([a] -> ShowS) -> r a -> Int -> ShowS)
    -> (Int -> a -> ShowS)
    -> ([a] -> ShowS)
    -> Int
    -> Data r a
    -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ((r a -> Int -> ShowS) -> Int -> Data r a -> ShowS)
    -> (([a] -> ShowS) -> r a -> Int -> ShowS)
    -> ([a] -> ShowS)
    -> Int
    -> Data r a
    -> ShowS
    forall a b.
    (a -> b) -> (([a] -> ShowS) -> a) -> ([a] -> ShowS) -> b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap) ((Data r a -> Int -> ShowS) -> Int -> Data r a -> ShowS
    forall a b c. (a -> b -> c) -> b -> a -> c
    flip ((Data r a -> Int -> ShowS) -> Int -> Data r a -> ShowS)
    -> ((r a -> Int -> ShowS) -> Data r a -> Int -> ShowS)
    -> (r a -> Int -> ShowS)
    -> Int
    -> Data r a
    -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ((r a -> Int -> ShowS)
    -> (Data r a -> r a) -> Data r a -> Int -> ShowS
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Data r a -> r a
    forall (r :: * -> *) p. Data r p -> r p
    unData)) (Int -> a -> ShowS) -> ([a] -> ShowS) -> r a -> Int -> ShowS
    forall (f :: * -> *) a.
    GShow1 f =>
    (Int -> a -> ShowS) -> ([a] -> ShowS) -> f a -> Int -> ShowS
    gLiftPrecShows

    instance GEnum StandardEnum r => Enum (Data r p) where
      toEnum :: Int -> Data r p
    toEnum = r p -> Data r p
    forall (r :: * -> *) p. r p -> Data r p
    Data (r p -> Data r p) -> (Int -> r p) -> Int -> Data r p
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . forall opts (f :: * -> *) p. GEnum opts f => Int -> f p
    gToEnum @StandardEnum
      fromEnum :: Data r p -> Int
    fromEnum = forall opts (f :: * -> *) p. GEnum opts f => f p -> Int
    gFromEnum @StandardEnum (r p -> Int) -> (Data r p -> r p) -> Data r p -> Int
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Data r p -> r p
    forall (r :: * -> *) p. Data r p -> r p
    unData

    instance GBounded r => Bounded (Data r p) where
      minBound :: Data r p
    minBound = r p -> Data r p
    forall (r :: * -> *) p. r p -> Data r p
    Data r p
    forall p. r p
    forall (f :: * -> *) p. GBounded f => f p
    gMinBound
      maxBound :: Data r p
    maxBound = r p -> Data r p
    forall (r :: * -> *) p. r p -> Data r p
    Data r p
    forall p. r p
    forall (f :: * -> *) p. GBounded f => f p
    gMaxBound