generic-data-1.1.0.0: Deriving instances with GHC.Generics and related utilities
Safe HaskellSafe-Inferred
LanguageHaskell2010

Generic.Data

Description

Generic combinators to derive type class instances.

Orphans

The Orphans module should be imported to derive the following classes using this library:

Minor discrepancies

Expand

Here are documented some corner cases of deriving, both by GHC and generic-data. They are all minor and unlikely to cause problems in practice.

Empty types

  • Some of the derived methods are lazy, which might result in errors being silenced, though unlikely.
  • The only generic-data implementation which differs from GHC stock instances is gfoldMap.
Class methodGHC stockgeneric-dataComment
(==)lazylazyTrue
comparelazylazyEQ
fmapstrictstrictmust be bottom anyway
foldMaplazystrictmempty if lazy
foldrlazylazyreturns accumulator
traversestrictstrict
sequenceAstrictstrict

Single-constructor single-field types

data types with one constructor and one field are extremely rare. newtype is almost always more appropriate (for which there is no issue).

That said, for data types both strict and lazy, all generic-data implementations are lazy (they don't even force the constructor), whereas GHC stock implementations, when they exist, are strict.

Functor composition

Fields of functors involving the composition of two or more functors f (g (h a)) result in some overhead using GHC.Generics.Generic1.

This is due to a particular encoding choice of GHC.Generics, where composition are nested to the right instead of to the left. f (g (h _)) is represented by the functor f :.: (g :.: Rec1 h), so one must use fmap on f to convert that back to f (g (h _)). A better choice would have been to encode it as (Rec1 f :.: g) :.: h, because that is coercible back to f (g (h _)).

Synopsis

Newtypes for Deriving Via

newtype Generically a Source #

A datatype whose instances are defined generically, using the Generic representation. Generically1 is a higher-kinded version of Generically that uses Generic1.

Generic instances can be derived via Generically A using -XDerivingVia.

{-# LANGUAGE DeriveGeneric      #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia        #-}

import GHC.Generics (Generic)

data V4 a = V4 a a a a
  deriving stock Generic

  deriving (Semigroup, Monoid)
  via Generically (V4 a)

This corresponds to Semigroup and Monoid instances defined by pointwise lifting:

instance Semigroup a => Semigroup (V4 a) where
  (<>) :: V4 a -> V4 a -> V4 a
  V4 a1 b1 c1 d1 <> V4 a2 b2 c2 d2 =
    V4 (a1 <> a2) (b1 <> b2) (c1 <> c2) (d1 <> d2)

instance Monoid a => Monoid (V4 a) where
  mempty :: V4 a
  mempty = V4 mempty mempty mempty mempty

Historically this required modifying the type class to include generic method definitions (-XDefaultSignatures) and deriving it with the anyclass strategy (-XDeriveAnyClass). Having a /via type/ like Generically decouples the instance from the type class.

Since: base-4.17.0.0

Constructors

Generically a 

Instances

Instances details
(Generic a, Monoid (Rep a ())) => Monoid (Generically a)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

(Generic a, Semigroup (Rep a ())) => Semigroup (Generically a)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

(Generic a, GBounded (Rep a)) => Bounded (Generically a) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

(Generic a, GEnum StandardEnum (Rep a)) => Enum (Generically a) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

Generic a => Generic (Generically a) Source #

This is a hack to implicitly wrap/unwrap in the instances of Generically.

Instance details

Defined in Generic.Data.Internal.Generically

Associated Types

type Rep (Generically a) :: Type -> Type Source #

(Generic a, Ord (Rep a ()), GIx (Rep a)) => Ix (Generically a) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

(Generic a, GRead0 (Rep a)) => Read (Generically a) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

(Generic a, GShow0 (Rep a)) => Show (Generically a) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

(Generic a, Eq (Rep a ())) => Eq (Generically a) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

(Generic a, Ord (Rep a ())) => Ord (Generically a) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

type Rep (Generically a) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

type Rep (Generically a) = Rep a

newtype GenericProduct a Source #

Product type with generic instances of Semigroup and Monoid.

This is similar to Generically in most cases, but GenericProduct also works for types T with deriving via GenericProduct U, where U is a generic product type coercible to, but distinct from T. In particular, U may not have an instance of Semigroup, which Generically requires.

Example

Expand
>>> import Data.Monoid (Sum(..))
>>> data Point a = Point a a deriving Generic
>>> :{
  newtype Vector a = Vector (Point a)
    deriving (Semigroup, Monoid)
      via GenericProduct (Point (Sum a))
:}

If it were via Generically (Point (Sum a)) instead, then Vector's mappend (the Monoid method) would be defined as Point's (<>) (the Semigroup method), which might not exist, or might not be equivalent to Vector's generic Semigroup instance, which would be unlawful.

Constructors

GenericProduct a 

newtype FiniteEnumeration a Source #

Type with Enum instance derived via Generic with FiniteEnum option. This allows deriving Enum for types whose constructors have fields.

Some caution is advised; see details in FiniteEnum.

Example

Expand
>>> :{
data Booool = Booool Bool Bool
  deriving Generic
  deriving (Enum, Bounded) via (FiniteEnumeration Booool)
:}

Constructors

FiniteEnumeration a 

newtype Generically1 (f :: k -> Type) (a :: k) where Source #

A type whose instances are defined generically, using the Generic1 representation. Generically1 is a higher-kinded version of Generically that uses Generic.

Generic instances can be derived for type constructors via Generically1 F using -XDerivingVia.

{-# LANGUAGE DeriveGeneric      #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia        #-}

import GHC.Generics (Generic)

data V4 a = V4 a a a a
  deriving stock (Functor, Generic1)

  deriving Applicative
  via Generically1 V4

This corresponds to Applicative instances defined by pointwise lifting:

instance Applicative V4 where
  pure :: a -> V4 a
  pure a = V4 a a a a

  liftA2 :: (a -> b -> c) -> (V4 a -> V4 b -> V4 c)
  liftA2 (·) (V4 a1 b1 c1 d1) (V4 a2 b2 c2 d2) =
    V4 (a1 · a2) (b1 · b2) (c1 · c2) (d1 · d2)

Historically this required modifying the type class to include generic method definitions (-XDefaultSignatures) and deriving it with the anyclass strategy (-XDeriveAnyClass). Having a /via type/ like Generically1 decouples the instance from the type class.

Since: base-4.17.0.0

Constructors

Generically1 :: forall {k} (f :: k -> Type) (a :: k). f a -> Generically1 f a 

Instances

Instances details
Generic1 f => Generic1 (Generically1 f :: Type -> Type) Source #

This is a hack to implicitly wrap/unwrap in the instances of Generically1.

Instance details

Defined in Generic.Data.Internal.Generically

Associated Types

type Rep1 (Generically1 f) :: k -> Type Source #

Methods

from1 :: forall (a :: k). Generically1 f a -> Rep1 (Generically1 f) a Source #

to1 :: forall (a :: k). Rep1 (Generically1 f) a -> Generically1 f a Source #

(Generic1 f, GFoldable (Rep1 f)) => Foldable (Generically1 f) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

Methods

fold :: Monoid m => Generically1 f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Generically1 f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Generically1 f a -> m Source #

foldr :: (a -> b -> b) -> b -> Generically1 f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Generically1 f a -> b Source #

foldl :: (b -> a -> b) -> b -> Generically1 f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Generically1 f a -> b Source #

foldr1 :: (a -> a -> a) -> Generically1 f a -> a Source #

foldl1 :: (a -> a -> a) -> Generically1 f a -> a Source #

toList :: Generically1 f a -> [a] Source #

null :: Generically1 f a -> Bool Source #

length :: Generically1 f a -> Int Source #

elem :: Eq a => a -> Generically1 f a -> Bool Source #

maximum :: Ord a => Generically1 f a -> a Source #

minimum :: Ord a => Generically1 f a -> a Source #

sum :: Num a => Generically1 f a -> a Source #

product :: Num a => Generically1 f a -> a Source #

(Generic1 f, Eq1 (Rep1 f)) => Eq1 (Generically1 f)

Since: base-4.17.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Generically1 f a -> Generically1 f b -> Bool Source #

(Generic1 f, Ord1 (Rep1 f)) => Ord1 (Generically1 f)

Since: base-4.17.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Generically1 f a -> Generically1 f b -> Ordering Source #

(Generic1 f, GRead1 (Rep1 f)) => Read1 (Generically1 f) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

(Generic1 f, GShow1 (Rep1 f)) => Show1 (Generically1 f) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Generically1 f a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Generically1 f a] -> ShowS Source #

(Generic1 f, Functor (Rep1 f), GFoldable (Rep1 f), GTraversable (Rep1 f)) => Traversable (Generically1 f) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Generically1 f a -> f0 (Generically1 f b) Source #

sequenceA :: Applicative f0 => Generically1 f (f0 a) -> f0 (Generically1 f a) Source #

mapM :: Monad m => (a -> m b) -> Generically1 f a -> m (Generically1 f b) Source #

sequence :: Monad m => Generically1 f (m a) -> m (Generically1 f a) Source #

(Generic1 f, Alternative (Rep1 f)) => Alternative (Generically1 f)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

(Generic1 f, Applicative (Rep1 f)) => Applicative (Generically1 f)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> Generically1 f a Source #

(<*>) :: Generically1 f (a -> b) -> Generically1 f a -> Generically1 f b Source #

liftA2 :: (a -> b -> c) -> Generically1 f a -> Generically1 f b -> Generically1 f c Source #

(*>) :: Generically1 f a -> Generically1 f b -> Generically1 f b Source #

(<*) :: Generically1 f a -> Generically1 f b -> Generically1 f a Source #

(Generic1 f, Functor (Rep1 f)) => Functor (Generically1 f)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> Generically1 f a -> Generically1 f b Source #

(<$) :: a -> Generically1 f b -> Generically1 f a Source #

Generic (f a) => Generic (Generically1 f a) Source #

This is a hack to implicitly wrap/unwrap in the instances of Generically1.

Instance details

Defined in Generic.Data.Internal.Generically

Associated Types

type Rep (Generically1 f a) :: Type -> Type Source #

Methods

from :: Generically1 f a -> Rep (Generically1 f a) x Source #

to :: Rep (Generically1 f a) x -> Generically1 f a Source #

(Generic1 f, GRead1 (Rep1 f), Read a) => Read (Generically1 f a) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

(Generic1 f, GShow1 (Rep1 f), Show a) => Show (Generically1 f a) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

(Generic1 f, Eq (Rep1 f a)) => Eq (Generically1 f a)

Since: base-4.18.0.0

Instance details

Defined in GHC.Generics

(Generic1 f, Ord (Rep1 f a)) => Ord (Generically1 f a)

Since: base-4.18.0.0

Instance details

Defined in GHC.Generics

type Rep1 (Generically1 f :: Type -> Type) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

type Rep1 (Generically1 f :: Type -> Type) = Rep1 f
type Rep (Generically1 f a) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

type Rep (Generically1 f a) = Rep (f a)

Regular classes

Default implementations for classes indexed by types (kind Type).

Semigroup

gmappend :: (Generic a, Semigroup (Rep a ())) => a -> a -> a Source #

Generic (<>) (or mappend).

instance Semigroup MyType where
  (<>) = gmappend

See also gmempty.

Monoid

gmempty :: (Generic a, Monoid (Rep a ())) => a Source #

Generic mempty.

instance Monoid MyType where
  mempty = gmempty

gmappend' :: (Generic a, Monoid (Rep a ())) => a -> a -> a Source #

Generic (<>) (or mappend).

The difference from gmappend is the Monoid constraint instead of Semigroup, for older versions of base where Semigroup is not a superclass of Monoid.

Eq

Can also be derived by GHC as part of the standard.

geq :: (Generic a, Eq (Rep a ())) => a -> a -> Bool Source #

Generic (==).

instance Eq MyType where
  (==) = geq

Ord

Can also be derived by GHC as part of the standard.

gcompare :: (Generic a, Ord (Rep a ())) => a -> a -> Ordering Source #

Generic compare.

instance Ord MyType where
  compare = gcompare

Read

Can also be derived by GHC as part of the standard.

type GRead0 = GRead Proxy Source #

Generic representation of Read types.

Show

Can also be derived by GHC as part of the standard.

gshowsPrec :: (Generic a, GShow0 (Rep a)) => Int -> a -> ShowS Source #

Generic showsPrec.

instance Show MyType where
  showsPrec = gshowsPrec

type GShow0 = GShow Proxy Source #

Generic representation of Show types.

Enum

class GEnum opts f Source #

Generic representation of Enum types.

The opts parameter is a type-level option to select different implementations.

Minimal complete definition

gCardinality, gFromEnum, gToEnum

Instances

Instances details
GEnum opts (U1 :: Type -> Type) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

(GEnum FiniteEnum f, GEnum FiniteEnum g) => GEnum FiniteEnum (f :*: g) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gCardinality :: Int Source #

gFromEnum :: (f :*: g) p -> Int Source #

gToEnum :: Int -> (f :*: g) p Source #

(Bounded c, Enum c) => GEnum FiniteEnum (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gCardinality :: Int Source #

gFromEnum :: K1 i c p -> Int Source #

gToEnum :: Int -> K1 i c p Source #

(GEnum opts f, GEnum opts g) => GEnum opts (f :+: g) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gCardinality :: Int Source #

gFromEnum :: (f :+: g) p -> Int Source #

gToEnum :: Int -> (f :+: g) p Source #

GEnum opts f => GEnum opts (M1 i c f) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gCardinality :: Int Source #

gFromEnum :: M1 i c f p -> Int Source #

gToEnum :: Int -> M1 i c f p Source #

StandardEnum option

Can also be derived by GHC as part of the standard.

data StandardEnum Source #

Standard option for GEnum: derive Enum for types with only nullary constructors (the same restrictions as in the Haskell 2010 report).

gfromEnum :: (Generic a, GEnum StandardEnum (Rep a)) => a -> Int Source #

Generic fromEnum generated with the StandardEnum option.

See also gtoEnum.

genumFrom :: (Generic a, GEnum StandardEnum (Rep a)) => a -> [a] Source #

Generic enumFrom generated with the StandardEnum option.

See also gtoEnum.

genumFromThen :: (Generic a, GEnum StandardEnum (Rep a)) => a -> a -> [a] Source #

Generic enumFromThen generated with the StandardEnum option.

See also gtoEnum.

genumFromTo :: (Generic a, GEnum StandardEnum (Rep a)) => a -> a -> [a] Source #

Generic enumFromTo generated with the StandardEnum option.

See also gtoEnum.

genumFromThenTo :: (Generic a, GEnum StandardEnum (Rep a)) => a -> a -> a -> [a] Source #

Generic enumFromThenTo generated with the StandardEnum option.

See also gtoEnum.

FiniteEnum option

data FiniteEnum Source #

Extends the StandardEnum option for GEnum to allow all constructors to have arbitrary many fields. Each field type must be an instance of both Enum and Bounded. Avoid fields of types Int and Word.

Details

Expand

Two restrictions require the user's attention:

  • The Enum instances of the field types need to start enumerating from 0. In particular, Int is an unfit field type, because the enumeration of the negative values starts before 0.
  • There can only be up to maxBound :: Int values (because the implementation represents the cardinality explicitly as an Int). This restriction makes Word an invalid field type as well. Notably, it is insufficient for each individual field types to stay below this limit. Instead it applies to the generic type as a whole.

Elements are numbered by toEnum, from 0 up to (cardinality - 1). The resulting ordering matches the generic Ord instance defined by gcompare. The values from different constructors are enumerated sequentially.

data Example = C0 Bool Bool | C1 Bool
  deriving (Eq, Ord, Show, Generic)

cardinality = 6  -- 2    * 2    + 2
                 -- Bool * Bool | Bool

enumeration =
    [ C0 False False
    , C0 False  True
    , C0  True False
    , C0  True  True
    , C1 False
    , C1 True
    ]

enumeration == map gtoFiniteEnum [0 .. 5]
[0 .. 5] == map gfromFiniteEnum enumeration

Instances

Instances details
(GEnum FiniteEnum f, GEnum FiniteEnum g) => GEnum FiniteEnum (f :*: g) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gCardinality :: Int Source #

gFromEnum :: (f :*: g) p -> Int Source #

gToEnum :: Int -> (f :*: g) p Source #

(Bounded c, Enum c) => GEnum FiniteEnum (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gCardinality :: Int Source #

gFromEnum :: K1 i c p -> Int Source #

gToEnum :: Int -> K1 i c p Source #

gfromFiniteEnum :: (Generic a, GEnum FiniteEnum (Rep a)) => a -> Int Source #

Generic fromEnum generated with the FiniteEnum option.

See also gtoFiniteEnum.

gfiniteEnumFrom :: (Generic a, GEnum FiniteEnum (Rep a)) => a -> [a] Source #

Generic enumFrom generated with the FiniteEnum option.

See also gtoFiniteEnum.

gfiniteEnumFromThen :: (Generic a, GEnum FiniteEnum (Rep a)) => a -> a -> [a] Source #

Generic enumFromThen generated with the FiniteEnum option.

See also gtoFiniteEnum.

gfiniteEnumFromTo :: (Generic a, GEnum FiniteEnum (Rep a)) => a -> a -> [a] Source #

Generic enumFromTo generated with the FiniteEnum option.

See also gtoFiniteEnum.

gfiniteEnumFromThenTo :: (Generic a, GEnum FiniteEnum (Rep a)) => a -> a -> a -> [a] Source #

Generic enumFromThenTo generated with the FiniteEnum option.

See also gtoFiniteEnum.

Bounded

Can also be derived by GHC as part of the standard.

gminBound :: (Generic a, GBounded (Rep a)) => a Source #

Generic minBound.

instance Bounded MyType where
  minBound = gminBound
  maxBound = gmaxBound

gmaxBound :: (Generic a, GBounded (Rep a)) => a Source #

Generic maxBound.

See also gminBound.

class GBounded f Source #

Generic representation of Bounded types.

Minimal complete definition

gMinBound, gMaxBound

Instances

Instances details
GBounded (U1 :: Type -> Type) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

(GBounded f, GBounded g) => GBounded (f :*: g) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gMinBound :: (f :*: g) p Source #

gMaxBound :: (f :*: g) p Source #

(GBounded f, GBounded g) => GBounded (f :+: g) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gMinBound :: (f :+: g) p Source #

gMaxBound :: (f :+: g) p Source #

Bounded c => GBounded (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gMinBound :: K1 i c p Source #

gMaxBound :: K1 i c p Source #

GBounded f => GBounded (M1 i c f) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gMinBound :: M1 i c f p Source #

gMaxBound :: M1 i c f p Source #

Ix

Can also be derived by GHC as part of the standard.

grange :: (Generic a, GIx (Rep a)) => (a, a) -> [a] Source #

Generic range.

import Data.Ix
instance Ix MyType where
  range = grange
  index = gindex
  inRange = ginRange

gindex :: (Generic a, GIx (Rep a)) => (a, a) -> a -> Int Source #

Generic index.

See also grange.

ginRange :: (Generic a, GIx (Rep a)) => (a, a) -> a -> Bool Source #

Generic inRange.

See also grange.

class GIx f Source #

Generic representation of Ix types.

Minimal complete definition

gRange, gUnsafeIndex, gInRange

Instances

Instances details
GIx (U1 :: Type -> Type) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gRange :: (U1 p, U1 p) -> [U1 p] Source #

gUnsafeIndex :: (U1 p, U1 p) -> U1 p -> Int Source #

gInRange :: (U1 p, U1 p) -> U1 p -> Bool Source #

(GIx f, GIx g) => GIx (f :*: g) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gRange :: ((f :*: g) p, (f :*: g) p) -> [(f :*: g) p] Source #

gUnsafeIndex :: ((f :*: g) p, (f :*: g) p) -> (f :*: g) p -> Int Source #

gInRange :: ((f :*: g) p, (f :*: g) p) -> (f :*: g) p -> Bool Source #

(GEnum StandardEnum f, GEnum StandardEnum g) => GIx (f :+: g) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gRange :: ((f :+: g) p, (f :+: g) p) -> [(f :+: g) p] Source #

gUnsafeIndex :: ((f :+: g) p, (f :+: g) p) -> (f :+: g) p -> Int Source #

gInRange :: ((f :+: g) p, (f :+: g) p) -> (f :+: g) p -> Bool Source #

Ix c => GIx (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gRange :: (K1 i c p, K1 i c p) -> [K1 i c p] Source #

gUnsafeIndex :: (K1 i c p, K1 i c p) -> K1 i c p -> Int Source #

gInRange :: (K1 i c p, K1 i c p) -> K1 i c p -> Bool Source #

GIx f => GIx (M1 i c f) Source # 
Instance details

Defined in Generic.Data.Internal.Enum

Methods

gRange :: (M1 i c f p, M1 i c f p) -> [M1 i c f p] Source #

gUnsafeIndex :: (M1 i c f p, M1 i c f p) -> M1 i c f p -> Int Source #

gInRange :: (M1 i c f p, M1 i c f p) -> M1 i c f p -> Bool Source #

gunsafeIndex :: (Generic a, GIx (Rep a)) => (a, a) -> a -> Int Source #

Generic unsafeIndex.

Details

Expand

The functions unsafeIndex and unsafeRangeSize belong to Ix but are internal to GHC and hence not exported from the module Data.Ix. However they are exported from the module GHC.Arr. See grange for how to define an instance of Ix such that it does not depend on the stability of GHCs internal API. Unfortunately this results in additional (unnecessary) bound checks. With the danger of having no stability guarantees for GHC's internal API one can alternatively define an instance of Ix as

import GHC.Arr
instance Ix MyType where
  range = grange
  unsafeIndex = gunsafeIndex
  inRange = ginRange

Higher-kinded classes

Default implementations for classes indexed by type constructors (kind Type -> Type).

Functor

Can also be derived by GHC (DeriveFunctor extension).

gfmap :: (Generic1 f, Functor (Rep1 f)) => (a -> b) -> f a -> f b Source #

Generic fmap.

instance Functor MyTypeF where
  fmap = gfmap

gconstmap :: (Generic1 f, Functor (Rep1 f)) => a -> f b -> f a Source #

Generic (<$).

See also gfmap.

Foldable

Can also be derived by GHC (DeriveFoldable extension).

gfoldMap :: (Generic1 f, GFoldable (Rep1 f), Monoid m) => (a -> m) -> f a -> m Source #

Generic foldMap.

instance Foldable MyTypeF where
  foldMap = gfoldMap

gfoldr :: (Generic1 f, Foldable (Rep1 f)) => (a -> b -> b) -> b -> f a -> b Source #

Generic foldr.

instance Foldable MyTypeF where
  foldr = gfoldr

See also gfoldMap.

class GFoldable_ t => GFoldable t Source #

Class of generic representations for which Foldable can be derived.

Instances

Instances details
GFoldable_ t => GFoldable t Source # 
Instance details

Defined in Generic.Data.Internal.Traversable

Traversable

Can also be derived by GHC (DeriveTraversable extension).

gtraverse :: (Generic1 f, GTraversable (Rep1 f), Applicative m) => (a -> m b) -> f a -> m (f b) Source #

Generic traverse.

instance Traversable MyTypeF where
  traverse = gtraverse

gsequenceA :: (Generic1 f, GTraversable (Rep1 f), Applicative m) => f (m a) -> m (f a) Source #

Generic sequenceA.

instance Traversable MyTypeF where
  sequenceA = gsequenceA

See also gtraverse.

class GTraversable_ t => GTraversable t Source #

Class of generic representations for which Traversable can be derived.

Instances

Instances details
GTraversable_ t => GTraversable t Source # 
Instance details

Defined in Generic.Data.Internal.Traversable

Applicative

gpure :: (Generic1 f, Applicative (Rep1 f)) => a -> f a Source #

Generic pure.

instance Applicative MyTypeF where
  pure = gpure
  (<*>) = gap

gap :: (Generic1 f, Applicative (Rep1 f)) => f (a -> b) -> f a -> f b Source #

Generic (<*>) (or ap).

See also gpure.

gliftA2 :: (Generic1 f, Applicative (Rep1 f)) => (a -> b -> c) -> f a -> f b -> f c Source #

Generic liftA2.

See also gpure.

Alternative

gempty :: (Generic1 f, Alternative (Rep1 f)) => f a Source #

Generic empty.

instance Alternative MyTypeF where
  empty = gempty
  (<|>) = galt

galt :: (Generic1 f, Alternative (Rep1 f)) => f a -> f a -> f a Source #

Generic (<|>).

See also gempty.

Eq1

gliftEq :: (Generic1 f, Eq1 (Rep1 f)) => (a -> b -> Bool) -> f a -> f b -> Bool Source #

Generic liftEq.

Ord1

gliftCompare :: (Generic1 f, Ord1 (Rep1 f)) => (a -> b -> Ordering) -> f a -> f b -> Ordering Source #

Generic liftCompare.

Read1

gliftReadPrec :: (Generic1 f, GRead1 (Rep1 f)) => ReadPrec a -> ReadPrec [a] -> ReadPrec (f a) Source #

Generic liftReadPrec.

type GRead1 = GRead Identity Source #

Generic representation of Read1 types.

Show1

gliftShowsPrec :: (Generic1 f, GShow1 (Rep1 f)) => (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> f a -> ShowS Source #

Generic liftShowsPrec.

type GShow1 = GShow Identity Source #

Generic representation of Show1 types.

Fields wrappers for deriving

newtype Id1 f a Source #

A newtype whose instances for simple classes (Eq, Ord, Read, Show) use higher-kinded class instances for f (Eq1, Ord1, Read1, Show1).

Constructors

Id1 

Fields

Instances

Instances details
Eq1 f => Eq1 (Id1 f) Source # 
Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

liftEq :: (a -> b -> Bool) -> Id1 f a -> Id1 f b -> Bool Source #

Ord1 f => Ord1 (Id1 f) Source # 
Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

liftCompare :: (a -> b -> Ordering) -> Id1 f a -> Id1 f b -> Ordering Source #

Read1 f => Read1 (Id1 f) Source # 
Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Id1 f a) Source #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Id1 f a] Source #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Id1 f a) Source #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Id1 f a] Source #

Show1 f => Show1 (Id1 f) Source # 
Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Id1 f a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Id1 f a] -> ShowS Source #

(Read1 f, Read a) => Read (Id1 f a) Source # 
Instance details

Defined in Generic.Data.Internal.Resolvers

(Show1 f, Show a) => Show (Id1 f a) Source # 
Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

showsPrec :: Int -> Id1 f a -> ShowS Source #

show :: Id1 f a -> String Source #

showList :: [Id1 f a] -> ShowS Source #

(Eq1 f, Eq a) => Eq (Id1 f a) Source # 
Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

(==) :: Id1 f a -> Id1 f a -> Bool Source #

(/=) :: Id1 f a -> Id1 f a -> Bool Source #

(Ord1 f, Ord a) => Ord (Id1 f a) Source # 
Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

compare :: Id1 f a -> Id1 f a -> Ordering Source #

(<) :: Id1 f a -> Id1 f a -> Bool Source #

(<=) :: Id1 f a -> Id1 f a -> Bool Source #

(>) :: Id1 f a -> Id1 f a -> Bool Source #

(>=) :: Id1 f a -> Id1 f a -> Bool Source #

max :: Id1 f a -> Id1 f a -> Id1 f a Source #

min :: Id1 f a -> Id1 f a -> Id1 f a Source #

newtype Opaque a Source #

A newtype with trivial instances, that considers every value equivalent to every other one, and shows as just "_".

Constructors

Opaque 

Fields

Instances

Instances details
Eq1 Opaque Source #

All equal.

Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

liftEq :: (a -> b -> Bool) -> Opaque a -> Opaque b -> Bool Source #

Ord1 Opaque Source #

All equal.

Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

liftCompare :: (a -> b -> Ordering) -> Opaque a -> Opaque b -> Ordering Source #

Show1 Opaque Source #

Shown as "_".

Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Opaque a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Opaque a] -> ShowS Source #

Show (Opaque a) Source #

Shown as "_".

Instance details

Defined in Generic.Data.Internal.Resolvers

Eq (Opaque a) Source #

All equal.

Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

(==) :: Opaque a -> Opaque a -> Bool Source #

(/=) :: Opaque a -> Opaque a -> Bool Source #

Ord (Opaque a) Source #

All equal.

Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

compare :: Opaque a -> Opaque a -> Ordering Source #

(<) :: Opaque a -> Opaque a -> Bool Source #

(<=) :: Opaque a -> Opaque a -> Bool Source #

(>) :: Opaque a -> Opaque a -> Bool Source #

(>=) :: Opaque a -> Opaque a -> Bool Source #

max :: Opaque a -> Opaque a -> Opaque a Source #

min :: Opaque a -> Opaque a -> Opaque a Source #

newtype Opaque1 f a Source #

A higher-kinded version of Opaque.

Constructors

Opaque1 

Fields

Instances

Instances details
Eq1 (Opaque1 f) Source #

All equal.

Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

liftEq :: (a -> b -> Bool) -> Opaque1 f a -> Opaque1 f b -> Bool Source #

Ord1 (Opaque1 f) Source #

All equal.

Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

liftCompare :: (a -> b -> Ordering) -> Opaque1 f a -> Opaque1 f b -> Ordering Source #

Show1 (Opaque1 f) Source #

Shown as "_".

Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Opaque1 f a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Opaque1 f a] -> ShowS Source #

Show (Opaque1 f a) Source #

Shown as "_".

Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

showsPrec :: Int -> Opaque1 f a -> ShowS Source #

show :: Opaque1 f a -> String Source #

showList :: [Opaque1 f a] -> ShowS Source #

Eq (Opaque1 f a) Source #

All equal.

Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

(==) :: Opaque1 f a -> Opaque1 f a -> Bool Source #

(/=) :: Opaque1 f a -> Opaque1 f a -> Bool Source #

Ord (Opaque1 f a) Source #

All equal.

Instance details

Defined in Generic.Data.Internal.Resolvers

Methods

compare :: Opaque1 f a -> Opaque1 f a -> Ordering Source #

(<) :: Opaque1 f a -> Opaque1 f a -> Bool Source #

(<=) :: Opaque1 f a -> Opaque1 f a -> Bool Source #

(>) :: Opaque1 f a -> Opaque1 f a -> Bool Source #

(>=) :: Opaque1 f a -> Opaque1 f a -> Bool Source #

max :: Opaque1 f a -> Opaque1 f a -> Opaque1 f a Source #

min :: Opaque1 f a -> Opaque1 f a -> Opaque1 f a Source #

Newtype

Generic pack/unpack.

class (Generic a, Coercible a (Old a), Newtype' a) => Newtype a Source #

Class of newtypes. There is an instance Newtype a if and only if a is a newtype and an instance of Generic.

Instances

Instances details
(Generic a, Coercible a (Old a), Newtype' a) => Newtype a Source # 
Instance details

Defined in Generic.Data.Internal.Newtype

type Old a = GOld (Rep a) Source #

The type wrapped by a newtype.

newtype Foo = Foo { bar :: Bar } deriving Generic
-- Old Foo ~ Bar

pack :: Newtype a => Old a -> a Source #

Generic newtype constructor.

unpack :: Newtype a => a -> Old a Source #

Generic newtype destructor.

Generic coercions

gcoerce :: (Generic a, Generic b, Coercible (Rep a) (Rep b)) => a -> b Source #

Convert between types with representationally equivalent generic representations.

gcoerceBinop :: (Generic a, Generic b, Coercible (Rep a) (Rep b)) => (a -> a -> a) -> b -> b -> b Source #

Compose gcoerce with a binary operation.

Accessing metadata

Using TypeApplications.

Datatype

gdatatypeName :: forall a. (Generic a, GDatatype (Rep a)) => String Source #

Name of the first data constructor in a type as a string.

>>> gdatatypeName @(Maybe Int)
"Maybe"

gmoduleName :: forall a. (Generic a, GDatatype (Rep a)) => String Source #

Name of the module where the first type constructor is defined.

>>> gmoduleName @(ZipList Int)
"Control.Applicative"

gpackageName :: forall a. (Generic a, GDatatype (Rep a)) => String Source #

Name of the package where the first type constructor is defined.

>>> gpackageName @(Maybe Int)
"base"

gisNewtype :: forall a. (Generic a, GDatatype (Rep a)) => Bool Source #

True if the first type constructor is a newtype.

>>> gisNewtype @[Int]
False
>>> gisNewtype @(ZipList Int)
True

class GDatatype f Source #

Generic representations that contain datatype metadata.

Minimal complete definition

gDatatypeName, gModuleName, gPackageName, gIsNewtype

Instances

Instances details
Datatype d => GDatatype (M1 D d f :: k -> Type) Source # 
Instance details

Defined in Generic.Data.Internal.Meta

Constructor

gconName :: forall a. Constructors a => a -> String Source #

Name of the first constructor in a value.

>>> gconName (Just 0)
"Just"

gconFixity :: forall a. Constructors a => a -> Fixity Source #

The fixity of the first constructor.

>>> import GHC.Generics ((:*:)(..))
>>> gconFixity (Just 0)
Prefix
>>> gconFixity ([] :*: id)
Infix RightAssociative 6

gconIsRecord :: forall a. Constructors a => a -> Bool Source #

True if the constructor is a record.

>>> gconIsRecord (Just 0)
False
>>> gconIsRecord (Sum 0)   -- Note:  newtype Sum a = Sum { getSum :: a }
True

gconNum :: forall a. Constructors a => Int Source #

Number of constructors.

>>> gconNum @(Maybe Int)
2

gconIndex :: forall a. Constructors a => a -> Int Source #

Index of a constructor.

>>> gconIndex Nothing
0
>>> gconIndex (Just "test")
1

class (Generic a, GConstructors (Rep a)) => Constructors a Source #

Constraint synonym for Generic and GConstructors.

Instances

Instances details
(Generic a, GConstructors (Rep a)) => Constructors a Source # 
Instance details

Defined in Generic.Data.Internal.Meta

class GConstructors r Source #

Generic representations that contain constructor metadata.

Minimal complete definition

gConIdToString, gConId, gConNum, gConFixity, gConIsRecord

Instances

Instances details
GConstructors (V1 :: k -> Type) Source # 
Instance details

Defined in Generic.Data.Internal.Meta

Methods

gConIdToString :: GConId V1 -> String Source #

gConId :: forall (p :: k0). V1 p -> GConId V1 Source #

gConNum :: Int Source #

gConFixity :: forall (p :: k0). V1 p -> Fixity Source #

gConIsRecord :: forall (p :: k0). V1 p -> Bool Source #

(GConstructors f, GConstructors g) => GConstructors (f :+: g :: k -> Type) Source # 
Instance details

Defined in Generic.Data.Internal.Meta

Methods

gConIdToString :: GConId (f :+: g) -> String Source #

gConId :: forall (p :: k0). (f :+: g) p -> GConId (f :+: g) Source #

gConNum :: Int Source #

gConFixity :: forall (p :: k0). (f :+: g) p -> Fixity Source #

gConIsRecord :: forall (p :: k0). (f :+: g) p -> Bool Source #

Constructor c => GConstructors (M1 C c f :: k -> Type) Source # 
Instance details

Defined in Generic.Data.Internal.Meta

Methods

gConIdToString :: GConId (M1 C c f) -> String Source #

gConId :: forall (p :: k0). M1 C c f p -> GConId (M1 C c f) Source #

gConNum :: Int Source #

gConFixity :: forall (p :: k0). M1 C c f p -> Fixity Source #

gConIsRecord :: forall (p :: k0). M1 C c f p -> Bool Source #

GConstructors f => GConstructors (M1 D c f :: k -> Type) Source # 
Instance details

Defined in Generic.Data.Internal.Meta

Methods

gConIdToString :: GConId (M1 D c f) -> String Source #

gConId :: forall (p :: k0). M1 D c f p -> GConId (M1 D c f) Source #

gConNum :: Int Source #

gConFixity :: forall (p :: k0). M1 D c f p -> Fixity Source #

gConIsRecord :: forall (p :: k0). M1 D c f p -> Bool Source #

Constructor tags

data ConId a Source #

An opaque identifier for a constructor.

Instances

Instances details
Show (ConId a) Source # 
Instance details

Defined in Generic.Data.Internal.Meta

Eq (ConId a) Source # 
Instance details

Defined in Generic.Data.Internal.Meta

Methods

(==) :: ConId a -> ConId a -> Bool Source #

(/=) :: ConId a -> ConId a -> Bool Source #

Ord (ConId a) Source # 
Instance details

Defined in Generic.Data.Internal.Meta

Methods

compare :: ConId a -> ConId a -> Ordering Source #

(<) :: ConId a -> ConId a -> Bool Source #

(<=) :: ConId a -> ConId a -> Bool Source #

(>) :: ConId a -> ConId a -> Bool Source #

(>=) :: ConId a -> ConId a -> Bool Source #

max :: ConId a -> ConId a -> ConId a Source #

min :: ConId a -> ConId a -> ConId a Source #

conId :: forall a. Constructors a => a -> ConId a Source #

Identifier of a constructor.

conIdToInt :: forall a. ConId a -> Int Source #

Index of a constructor, given its identifier. See also gconIndex.

conIdToString :: forall a. Constructors a => ConId a -> String Source #

Name of a constructor. See also gconName.

conIdEnum :: forall a. Constructors a => [ConId a] Source #

All constructor identifiers.

gconNum @a = length (conIdEnum @a)

conIdNamed :: forall s a. ConIdNamed s a => ConId a Source #

Get a ConId by name.

>>> conIdNamed @"Nothing" :: ConId (Maybe Int)
ConId 0
>>> conIdNamed @"Just"    :: ConId (Maybe Int)
ConId 1

class (Generic a, KnownNat (ConIdNamed' n a)) => ConIdNamed n a Source #

Constraint synonym for generic types a with a constructor named n.

Instances

Instances details
(Generic a, KnownNat (ConIdNamed' n a)) => ConIdNamed n a Source # 
Instance details

Defined in Generic.Data.Internal.Meta

conIdMin :: forall a. (Constructors a, NonEmptyType "conIdMin" a) => ConId a Source #

The first constructor. This must not be called on an empty type.

conIdMax :: forall a. (Constructors a, NonEmptyType "conIdMax" a) => ConId a Source #

The last constructor. This must not be called on an empty type.

class NonEmptyType_ fname a => NonEmptyType fname a Source #

Constraint that a generic type a is not empty. Producing an error message otherwise.

The Symbol parameter fname is used only for error messages.

It is implied by the simpler constraint IsEmptyType a ~ 'False

Instances

Instances details
NonEmptyType_ fname a => NonEmptyType fname a Source # 
Instance details

Defined in Generic.Data.Internal.Meta

type IsEmptyType a = IsEmptyType_ a Source #

True if the generic type a is empty.

Using type families

type family MetaOf (f :: Type -> Type) :: Meta where ... Source #

Meta field of the M1 type constructor.

Equations

MetaOf (M1 i d f) = d 

type family MetaDataName (m :: Meta) :: Symbol where ... Source #

Name of the data type (MetaData).

Equations

MetaDataName ('MetaData n _m _p _nt) = n 

type family MetaDataModule (m :: Meta) :: Symbol where ... Source #

Name of the module where the data type is defined (MetaData)

Equations

MetaDataModule ('MetaData _n m _p _nt) = m 

type family MetaDataPackage (m :: Meta) :: Symbol where ... Source #

Name of the package where the data type is defined (MetaData)

Equations

MetaDataPackage ('MetaData _n _m p _nt) = p 

type family MetaDataNewtype (m :: Meta) :: Bool where ... Source #

True if the data type is a newtype (MetaData).

Equations

MetaDataNewtype ('MetaData _n _m _p nt) = nt 

type family MetaConsName (m :: Meta) :: Symbol where ... Source #

Name of the constructor (MetaCons).

Equations

MetaConsName ('MetaCons n _f _s) = n 

type family MetaConsFixity (m :: Meta) :: FixityI where ... Source #

Fixity of the constructor (MetaCons).

Equations

MetaConsFixity ('MetaCons _n f s) = f 

type family MetaConsRecord (m :: Meta) :: Bool where ... Source #

True for a record constructor (MetaCons).

Equations

MetaConsRecord ('MetaCons _n _f s) = s 

type family MetaSelNameM (m :: Meta) :: Maybe Symbol where ... Source #

Just the name of the record field, if it is one (MetaSel).

Equations

MetaSelNameM ('MetaSel mn _su _ss _ds) = mn 

type family MetaSelName (m :: Meta) :: Symbol where ... Source #

Name of the record field; undefined for non-record fields (MetaSel).

Equations

MetaSelName ('MetaSel ('Just n) _su _ss _ds) = n 

type family MetaSelUnpack (m :: Meta) :: SourceUnpackedness where ... Source #

Unpackedness annotation of a field (MetaSel).

Equations

MetaSelUnpack ('MetaSel _mn su _ss _ds) = su 

type family MetaSelSourceStrictness (m :: Meta) :: SourceStrictness where ... Source #

Strictness annotation of a field (MetaSel).

Equations

MetaSelSourceStrictness ('MetaSel _mn _su ss _ds) = ss 

type family MetaSelStrictness (m :: Meta) :: DecidedStrictness where ... Source #

Inferred strictness of a field (MetaSel).

Equations

MetaSelStrictness ('MetaSel _mn _su _ss ds) = ds 

The Generic class

Reexported from GHC.Generics.

class Generic a Source #

Representable types of kind *. This class is derivable in GHC with the DeriveGeneric flag on.

A Generic instance must satisfy the following laws:

from . toid
to . fromid

Minimal complete definition

from, to

Instances

Instances details
Generic All 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep All :: Type -> Type Source #

Methods

from :: All -> Rep All x Source #

to :: Rep All x -> All Source #

Generic Any 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any :: Type -> Type Source #

Methods

from :: Any -> Rep Any x Source #

to :: Rep Any x -> Any Source #

Generic Version 
Instance details

Defined in Data.Version

Associated Types

type Rep Version :: Type -> Type Source #

Generic Void 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Void :: Type -> Type Source #

Methods

from :: Void -> Rep Void x Source #

to :: Rep Void x -> Void Source #

Generic Fingerprint 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fingerprint :: Type -> Type Source #

Generic Associativity 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Associativity :: Type -> Type Source #

Generic DecidedStrictness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep DecidedStrictness :: Type -> Type Source #

Generic Fixity 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fixity :: Type -> Type Source #

Generic SourceStrictness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceStrictness :: Type -> Type Source #

Generic SourceUnpackedness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceUnpackedness :: Type -> Type Source #

Generic ExitCode 
Instance details

Defined in GHC.IO.Exception

Associated Types

type Rep ExitCode :: Type -> Type Source #

Generic CCFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep CCFlags :: Type -> Type Source #

Generic ConcFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep ConcFlags :: Type -> Type Source #

Generic DebugFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep DebugFlags :: Type -> Type Source #

Generic DoCostCentres 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep DoCostCentres :: Type -> Type Source #

Generic DoHeapProfile 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep DoHeapProfile :: Type -> Type Source #

Generic DoTrace 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep DoTrace :: Type -> Type Source #

Generic GCFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep GCFlags :: Type -> Type Source #

Generic GiveGCStats 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep GiveGCStats :: Type -> Type Source #

Generic MiscFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep MiscFlags :: Type -> Type Source #

Generic ParFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep ParFlags :: Type -> Type Source #

Generic ProfFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep ProfFlags :: Type -> Type Source #

Generic RTSFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep RTSFlags :: Type -> Type Source #

Generic TickyFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep TickyFlags :: Type -> Type Source #

Generic TraceFlags 
Instance details

Defined in GHC.RTS.Flags

Associated Types

type Rep TraceFlags :: Type -> Type Source #

Generic SrcLoc 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SrcLoc :: Type -> Type Source #

Generic GCDetails 
Instance details

Defined in GHC.Stats

Associated Types

type Rep GCDetails :: Type -> Type Source #

Generic RTSStats 
Instance details

Defined in GHC.Stats

Associated Types

type Rep RTSStats :: Type -> Type Source #

Generic GeneralCategory 
Instance details

Defined in GHC.Generics

Associated Types

type Rep GeneralCategory :: Type -> Type Source #

Generic Ordering 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Ordering :: Type -> Type Source #

Generic () 
Instance details

Defined in GHC.Generics

Associated Types

type Rep () :: Type -> Type Source #

Methods

from :: () -> Rep () x Source #

to :: Rep () x -> () Source #

Generic Bool 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type Source #

Methods

from :: Bool -> Rep Bool x Source #

to :: Rep Bool x -> Bool Source #

Generic (ZipList a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (ZipList a) :: Type -> Type Source #

Methods

from :: ZipList a -> Rep (ZipList a) x Source #

to :: Rep (ZipList a) x -> ZipList a Source #

Generic (Complex a) 
Instance details

Defined in Data.Complex

Associated Types

type Rep (Complex a) :: Type -> Type Source #

Methods

from :: Complex a -> Rep (Complex a) x Source #

to :: Rep (Complex a) x -> Complex a Source #

Generic (Identity a) 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep (Identity a) :: Type -> Type Source #

Methods

from :: Identity a -> Rep (Identity a) x Source #

to :: Rep (Identity a) x -> Identity a Source #

Generic (First a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (First a) :: Type -> Type Source #

Methods

from :: First a -> Rep (First a) x Source #

to :: Rep (First a) x -> First a Source #

Generic (Last a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Last a) :: Type -> Type Source #

Methods

from :: Last a -> Rep (Last a) x Source #

to :: Rep (Last a) x -> Last a Source #

Generic (Down a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Down a) :: Type -> Type Source #

Methods

from :: Down a -> Rep (Down a) x Source #

to :: Rep (Down a) x -> Down a Source #

Generic (First a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (First a) :: Type -> Type Source #

Methods

from :: First a -> Rep (First a) x Source #

to :: Rep (First a) x -> First a Source #

Generic (Last a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Last a) :: Type -> Type Source #

Methods

from :: Last a -> Rep (Last a) x Source #

to :: Rep (Last a) x -> Last a Source #

Generic (Max a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Max a) :: Type -> Type Source #

Methods

from :: Max a -> Rep (Max a) x Source #

to :: Rep (Max a) x -> Max a Source #

Generic (Min a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Min a) :: Type -> Type Source #

Methods

from :: Min a -> Rep (Min a) x Source #

to :: Rep (Min a) x -> Min a Source #

Generic (WrappedMonoid m) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (WrappedMonoid m) :: Type -> Type Source #

Generic (Dual a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Dual a) :: Type -> Type Source #

Methods

from :: Dual a -> Rep (Dual a) x Source #

to :: Rep (Dual a) x -> Dual a Source #

Generic (Endo a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Endo a) :: Type -> Type Source #

Methods

from :: Endo a -> Rep (Endo a) x Source #

to :: Rep (Endo a) x -> Endo a Source #

Generic (Product a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Product a) :: Type -> Type Source #

Methods

from :: Product a -> Rep (Product a) x Source #

to :: Rep (Product a) x -> Product a Source #

Generic (Sum a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Sum a) :: Type -> Type Source #

Methods

from :: Sum a -> Rep (Sum a) x Source #

to :: Rep (Sum a) x -> Sum a Source #

Generic (NonEmpty a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (NonEmpty a) :: Type -> Type Source #

Methods

from :: NonEmpty a -> Rep (NonEmpty a) x Source #

to :: Rep (NonEmpty a) x -> NonEmpty a Source #

Generic a => Generic (Generically a) Source #

This is a hack to implicitly wrap/unwrap in the instances of Generically.

Instance details

Defined in Generic.Data.Internal.Generically

Associated Types

type Rep (Generically a) :: Type -> Type Source #

Generic (Par1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Par1 p) :: Type -> Type Source #

Methods

from :: Par1 p -> Rep (Par1 p) x Source #

to :: Rep (Par1 p) x -> Par1 p Source #

Generic a => Generic (FiniteEnumeration a) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

Associated Types

type Rep (FiniteEnumeration a) :: Type -> Type Source #

Generic a => Generic (GenericProduct a) Source # 
Instance details

Defined in Generic.Data.Internal.Generically

Associated Types

type Rep (GenericProduct a) :: Type -> Type Source #

Generic (Maybe a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Maybe a) :: Type -> Type Source #

Methods

from :: Maybe a -> Rep (Maybe a) x Source #

to :: Rep (Maybe a) x -> Maybe a Source #

Generic (a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a) :: Type -> Type Source #

Methods

from :: (a) -> Rep (a) x Source #

to :: Rep (a) x -> (a) Source #

Generic [a] 
Instance details

Defined in GHC.Generics

Associated Types

type Rep [a] :: Type -> Type Source #

Methods

from :: [a] -> Rep [a] x Source #

to :: Rep [a] x -> [a] Source #

Generic (WrappedMonad m a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedMonad m a) :: Type -> Type Source #

Methods

from :: WrappedMonad m a -> Rep (WrappedMonad m a) x Source #

to :: Rep (WrappedMonad m a) x -> WrappedMonad m a Source #

Generic (Either a b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Either a b) :: Type -> Type Source #

Methods

from :: Either a b -> Rep (Either a b) x Source #

to :: Rep (Either a b) x -> Either a b Source #

Generic (Proxy t) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Proxy t) :: Type -> Type Source #

Methods

from :: Proxy t -> Rep (Proxy t) x Source #

to :: Rep (Proxy t) x -> Proxy t Source #

Generic (Arg a b) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Arg a b) :: Type -> Type Source #

Methods

from :: Arg a b -> Rep (Arg a b) x Source #

to :: Rep (Arg a b) x -> Arg a b Source #

Generic (U1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (U1 p) :: Type -> Type Source #

Methods

from :: U1 p -> Rep (U1 p) x Source #

to :: Rep (U1 p) x -> U1 p Source #

Generic (V1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (V1 p) :: Type -> Type Source #

Methods

from :: V1 p -> Rep (V1 p) x Source #

to :: Rep (V1 p) x -> V1 p Source #

(Functor r, Contravariant r) => Generic (Data r p) Source # 
Instance details

Defined in Generic.Data.Internal.Data

Associated Types

type Rep (Data r p) :: Type -> Type Source #

Methods

from :: Data r p -> Rep (Data r p) x Source #

to :: Rep (Data r p) x -> Data r p Source #

(Generic a, Coercible (GSurgery s (Rep a)) (Rep a)) => Generic (Surgery' s a) Source # 
Instance details

Defined in Generic.Data.Internal.Microsurgery

Associated Types

type Rep (Surgery' s a) :: Type -> Type Source #

Methods

from :: Surgery' s a -> Rep (Surgery' s a) x Source #

to :: Rep (Surgery' s a) x -> Surgery' s a Source #

Generic (a, b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b) :: Type -> Type Source #

Methods

from :: (a, b) -> Rep (a, b) x Source #

to :: Rep (a, b) x -> (a, b) Source #

Generic (WrappedArrow a b c) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedArrow a b c) :: Type -> Type Source #

Methods

from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x Source #

to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c Source #

Generic (Kleisli m a b) 
Instance details

Defined in Control.Arrow

Associated Types

type Rep (Kleisli m a b) :: Type -> Type Source #

Methods

from :: Kleisli m a b -> Rep (Kleisli m a b) x Source #

to :: Rep (Kleisli m a b) x -> Kleisli m a b Source #

Generic (Const a b) 
Instance details

Defined in Data.Functor.Const

Associated Types

type Rep (Const a b) :: Type -> Type Source #

Methods

from :: Const a b -> Rep (Const a b) x Source #

to :: Rep (Const a b) x -> Const a b Source #

Generic (Ap f a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Ap f a) :: Type -> Type Source #

Methods

from :: Ap f a -> Rep (Ap f a) x Source #

to :: Rep (Ap f a) x -> Ap f a Source #

Generic (Alt f a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Alt f a) :: Type -> Type Source #

Methods

from :: Alt f a -> Rep (Alt f a) x Source #

to :: Rep (Alt f a) x -> Alt f a Source #

Generic (f a) => Generic (Generically1 f a) Source #

This is a hack to implicitly wrap/unwrap in the instances of Generically1.

Instance details

Defined in Generic.Data.Internal.Generically

Associated Types

type Rep (Generically1 f a) :: Type -> Type Source #

Methods

from :: Generically1 f a -> Rep (Generically1 f a) x Source #

to :: Rep (Generically1 f a) x -> Generically1 f a Source #

Generic (Rec1 f p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Rec1 f p) :: Type -> Type Source #

Methods

from :: Rec1 f p -> Rep (Rec1 f p) x Source #

to :: Rep (Rec1 f p) x -> Rec1 f p Source #

Generic (URec (Ptr ()) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec (Ptr ()) p) :: Type -> Type Source #

Methods

from :: URec (Ptr ()) p -> Rep (URec (Ptr ()) p) x Source #

to :: Rep (URec (Ptr ()) p) x -> URec (Ptr ()) p Source #

Generic (URec Char p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Char p) :: Type -> Type Source #

Methods

from :: URec Char p -> Rep (URec Char p) x Source #

to :: Rep (URec Char p) x -> URec Char p Source #

Generic (URec Double p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Double p) :: Type -> Type Source #

Methods

from :: URec Double p -> Rep (URec Double p) x Source #

to :: Rep (URec Double p) x -> URec Double p Source #

Generic (URec Float p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Float p) :: Type -> Type Source #

Methods

from :: URec Float p -> Rep (URec Float p) x Source #

to :: Rep (URec Float p) x -> URec Float p Source #

Generic (URec Int p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Int p) :: Type -> Type Source #

Methods

from :: URec Int p -> Rep (URec Int p) x Source #

to :: Rep (URec Int p) x -> URec Int p Source #

Generic (URec Word p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Word p) :: Type -> Type Source #

Methods

from :: URec Word p -> Rep (URec Word p) x Source #

to :: Rep (URec Word p) x -> URec Word p Source #

Generic (a, b, c) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c) :: Type -> Type Source #

Methods

from :: (a, b, c) -> Rep (a, b, c) x Source #

to :: Rep (a, b, c) x -> (a, b, c) Source #

Generic (Product f g a) 
Instance details

Defined in Data.Functor.Product

Associated Types

type Rep (Product f g a) :: Type -> Type Source #

Methods

from :: Product f g a -> Rep (Product f g a) x Source #

to :: Rep (Product f g a) x -> Product f g a Source #

Generic (Sum f g a) 
Instance details

Defined in Data.Functor.Sum

Associated Types

type Rep (Sum f g a) :: Type -> Type Source #

Methods

from :: Sum f g a -> Rep (Sum f g a) x Source #

to :: Rep (Sum f g a) x -> Sum f g a Source #

Generic ((f :*: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :*: g) p) :: Type -> Type Source #

Methods

from :: (f :*: g) p -> Rep ((f :*: g) p) x Source #

to :: Rep ((f :*: g) p) x -> (f :*: g) p Source #

Generic ((f :+: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :+: g) p) :: Type -> Type Source #

Methods

from :: (f :+: g) p -> Rep ((f :+: g) p) x Source #

to :: Rep ((f :+: g) p) x -> (f :+: g) p Source #

Generic (K1 i c p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (K1 i c p) :: Type -> Type Source #

Methods

from :: K1 i c p -> Rep (K1 i c p) x Source #

to :: Rep (K1 i c p) x -> K1 i c p Source #

Generic (a, b, c, d) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d) :: Type -> Type Source #

Methods

from :: (a, b, c, d) -> Rep (a, b, c, d) x Source #

to :: Rep (a, b, c, d) x -> (a, b, c, d) Source #

Generic (Compose f g a) 
Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep (Compose f g a) :: Type -> Type Source #

Methods

from :: Compose f g a -> Rep (Compose f g a) x Source #

to :: Rep (Compose f g a) x -> Compose f g a Source #

Generic ((f :.: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :.: g) p) :: Type -> Type Source #

Methods

from :: (f :.: g) p -> Rep ((f :.: g) p) x Source #

to :: Rep ((f :.: g) p) x -> (f :.: g) p Source #

Generic (M1 i c f p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (M1 i c f p) :: Type -> Type Source #

Methods

from :: M1 i c f p -> Rep (M1 i c f p) x Source #

to :: Rep (M1 i c f p) x -> M1 i c f p Source #

Generic (a, b, c, d, e) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e) -> Rep (a, b, c, d, e) x Source #

to :: Rep (a, b, c, d, e) x -> (a, b, c, d, e) Source #

Generic (a, b, c, d, e, f) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f) -> Rep (a, b, c, d, e, f) x Source #

to :: Rep (a, b, c, d, e, f) x -> (a, b, c, d, e, f) Source #

Generic (a, b, c, d, e, f, g) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g) -> Rep (a, b, c, d, e, f, g) x Source #

to :: Rep (a, b, c, d, e, f, g) x -> (a, b, c, d, e, f, g) Source #

Generic (a, b, c, d, e, f, g, h) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h) -> Rep (a, b, c, d, e, f, g, h) x Source #

to :: Rep (a, b, c, d, e, f, g, h) x -> (a, b, c, d, e, f, g, h) Source #

Generic (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h, i) -> Rep (a, b, c, d, e, f, g, h, i) x Source #

to :: Rep (a, b, c, d, e, f, g, h, i) x -> (a, b, c, d, e, f, g, h, i) Source #

Generic (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h, i, j) -> Rep (a, b, c, d, e, f, g, h, i, j) x Source #

to :: Rep (a, b, c, d, e, f, g, h, i, j) x -> (a, b, c, d, e, f, g, h, i, j) Source #

Generic (a, b, c, d, e, f, g, h, i, j, k) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k) -> Rep (a, b, c, d, e, f, g, h, i, j, k) x Source #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k) x -> (a, b, c, d, e, f, g, h, i, j, k) Source #

Generic (a, b, c, d, e, f, g, h, i, j, k, l) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l) x Source #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l) x -> (a, b, c, d, e, f, g, h, i, j, k, l) Source #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) x Source #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) x Source #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) x Source #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

class Generic1 (f :: k -> Type) Source #

Representable types of kind * -> * (or kind k -> *, when PolyKinds is enabled). This class is derivable in GHC with the DeriveGeneric flag on.

A Generic1 instance must satisfy the following laws:

from1 . to1id
to1 . from1id

Minimal complete definition

from1, to1

Instances

Instances details
Generic1 ZipList 
Instance details

Defined in Control.Applicative

Associated Types

type Rep1 ZipList :: k -> Type Source #

Methods

from1 :: forall (a :: k). ZipList a -> Rep1 ZipList a Source #

to1 :: forall (a :: k). Rep1 ZipList a -> ZipList a Source #

Generic1 Complex 
Instance details

Defined in Data.Complex

Associated Types

type Rep1 Complex :: k -> Type Source #

Methods

from1 :: forall (a :: k). Complex a -> Rep1 Complex a Source #

to1 :: forall (a :: k). Rep1 Complex a -> Complex a Source #

Generic1 Identity 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep1 Identity :: k -> Type Source #

Methods

from1 :: forall (a :: k). Identity a -> Rep1 Identity a Source #

to1 :: forall (a :: k). Rep1 Identity a -> Identity a Source #

Generic1 First 
Instance details

Defined in Data.Monoid

Associated Types

type Rep1 First :: k -> Type Source #

Methods

from1 :: forall (a :: k). First a -> Rep1 First a Source #

to1 :: forall (a :: k). Rep1 First a -> First a Source #

Generic1 Last 
Instance details

Defined in Data.Monoid

Associated Types

type Rep1 Last :: k -> Type Source #

Methods

from1 :: forall (a :: k). Last a -> Rep1 Last a Source #

to1 :: forall (a :: k). Rep1 Last a -> Last a Source #

Generic1 Down 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Down :: k -> Type Source #

Methods

from1 :: forall (a :: k). Down a -> Rep1 Down a Source #

to1 :: forall (a :: k). Rep1 Down a -> Down a Source #

Generic1 First 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 First :: k -> Type Source #

Methods

from1 :: forall (a :: k). First a -> Rep1 First a Source #

to1 :: forall (a :: k). Rep1 First a -> First a Source #

Generic1 Last 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Last :: k -> Type Source #

Methods

from1 :: forall (a :: k). Last a -> Rep1 Last a Source #

to1 :: forall (a :: k). Rep1 Last a -> Last a Source #

Generic1 Max 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Max :: k -> Type Source #

Methods

from1 :: forall (a :: k). Max a -> Rep1 Max a Source #

to1 :: forall (a :: k). Rep1 Max a -> Max a Source #

Generic1 Min 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Min :: k -> Type Source #

Methods

from1 :: forall (a :: k). Min a -> Rep1 Min a Source #

to1 :: forall (a :: k). Rep1 Min a -> Min a Source #

Generic1 WrappedMonoid 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 WrappedMonoid :: k -> Type Source #

Methods

from1 :: forall (a :: k). WrappedMonoid a -> Rep1 WrappedMonoid a Source #

to1 :: forall (a :: k). Rep1 WrappedMonoid a -> WrappedMonoid a Source #

Generic1 Dual 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Dual :: k -> Type Source #

Methods

from1 :: forall (a :: k). Dual a -> Rep1 Dual a Source #

to1 :: forall (a :: k). Rep1 Dual a -> Dual a Source #

Generic1 Product 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Product :: k -> Type Source #

Methods

from1 :: forall (a :: k). Product a -> Rep1 Product a Source #

to1 :: forall (a :: k). Rep1 Product a -> Product a Source #

Generic1 Sum 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Sum :: k -> Type Source #

Methods

from1 :: forall (a :: k). Sum a -> Rep1 Sum a Source #

to1 :: forall (a :: k). Rep1 Sum a -> Sum a Source #

Generic1 NonEmpty 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 NonEmpty :: k -> Type Source #

Methods

from1 :: forall (a :: k). NonEmpty a -> Rep1 NonEmpty a Source #

to1 :: forall (a :: k). Rep1 NonEmpty a -> NonEmpty a Source #

Generic1 Par1 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Par1 :: k -> Type Source #

Methods

from1 :: forall (a :: k). Par1 a -> Rep1 Par1 a Source #

to1 :: forall (a :: k). Rep1 Par1 a -> Par1 a Source #

Generic1 Maybe 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Maybe :: k -> Type Source #

Methods

from1 :: forall (a :: k). Maybe a -> Rep1 Maybe a Source #

to1 :: forall (a :: k). Rep1 Maybe a -> Maybe a Source #

Generic1 Solo 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Solo :: k -> Type Source #

Methods

from1 :: forall (a :: k). Solo a -> Rep1 Solo a Source #

to1 :: forall (a :: k). Rep1 Solo a -> Solo a Source #

Generic1 List 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 List :: k -> Type Source #

Methods

from1 :: forall (a :: k). [a] -> Rep1 List a Source #

to1 :: forall (a :: k). Rep1 List a -> [a] Source #

Generic1 (WrappedMonad m :: Type -> Type) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep1 (WrappedMonad m) :: k -> Type Source #

Methods

from1 :: forall (a :: k). WrappedMonad m a -> Rep1 (WrappedMonad m) a Source #

to1 :: forall (a :: k). Rep1 (WrappedMonad m) a -> WrappedMonad m a Source #

Generic1 (Either a :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (Either a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Either a a0 -> Rep1 (Either a) a0 Source #

to1 :: forall (a0 :: k). Rep1 (Either a) a0 -> Either a a0 Source #

Generic1 (Arg a :: Type -> Type) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 (Arg a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Arg a a0 -> Rep1 (Arg a) a0 Source #

to1 :: forall (a0 :: k). Rep1 (Arg a) a0 -> Arg a a0 Source #

Generic1 (Data r :: Type -> Type) Source # 
Instance details

Defined in Generic.Data.Internal.Data

Associated Types

type Rep1 (Data r) :: k -> Type Source #

Methods

from1 :: forall (a :: k). Data r a -> Rep1 (Data r) a Source #

to1 :: forall (a :: k). Rep1 (Data r) a -> Data r a Source #

Generic1 ((,) a :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,) a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, a0) -> Rep1 ((,) a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ((,) a) a0 -> (a, a0) Source #

Generic1 (Proxy :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Proxy :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Proxy a -> Rep1 Proxy a Source #

to1 :: forall (a :: k0). Rep1 Proxy a -> Proxy a Source #

Generic1 (U1 :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 U1 :: k -> Type Source #

Methods

from1 :: forall (a :: k0). U1 a -> Rep1 U1 a Source #

to1 :: forall (a :: k0). Rep1 U1 a -> U1 a Source #

Generic1 (V1 :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 V1 :: k -> Type Source #

Methods

from1 :: forall (a :: k0). V1 a -> Rep1 V1 a Source #

to1 :: forall (a :: k0). Rep1 V1 a -> V1 a Source #

Generic1 (WrappedArrow a b :: Type -> Type) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep1 (WrappedArrow a b) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). WrappedArrow a b a0 -> Rep1 (WrappedArrow a b) a0 Source #

to1 :: forall (a0 :: k). Rep1 (WrappedArrow a b) a0 -> WrappedArrow a b a0 Source #

Generic1 (Kleisli m a :: Type -> Type) 
Instance details

Defined in Control.Arrow

Associated Types

type Rep1 (Kleisli m a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Kleisli m a a0 -> Rep1 (Kleisli m a) a0 Source #

to1 :: forall (a0 :: k). Rep1 (Kleisli m a) a0 -> Kleisli m a a0 Source #

Generic1 f => Generic1 (Generically1 f :: Type -> Type) Source #

This is a hack to implicitly wrap/unwrap in the instances of Generically1.

Instance details

Defined in Generic.Data.Internal.Generically

Associated Types

type Rep1 (Generically1 f) :: k -> Type Source #

Methods

from1 :: forall (a :: k). Generically1 f a -> Rep1 (Generically1 f) a Source #

to1 :: forall (a :: k). Rep1 (Generically1 f) a -> Generically1 f a Source #

Generic1 ((,,) a b :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,) a b) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, b, a0) -> Rep1 ((,,) a b) a0 Source #

to1 :: forall (a0 :: k). Rep1 ((,,) a b) a0 -> (a, b, a0) Source #

Generic1 (Const a :: k -> Type) 
Instance details

Defined in Data.Functor.Const

Associated Types

type Rep1 (Const a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k0). Const a a0 -> Rep1 (Const a) a0 Source #

to1 :: forall (a0 :: k0). Rep1 (Const a) a0 -> Const a a0 Source #

Generic1 (Ap f :: k -> Type) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep1 (Ap f) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Ap f a -> Rep1 (Ap f) a Source #

to1 :: forall (a :: k0). Rep1 (Ap f) a -> Ap f a Source #

Generic1 (Alt f :: k -> Type) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 (Alt f) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Alt f a -> Rep1 (Alt f) a Source #

to1 :: forall (a :: k0). Rep1 (Alt f) a -> Alt f a Source #

Generic1 (Rec1 f :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (Rec1 f) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Rec1 f a -> Rep1 (Rec1 f) a Source #

to1 :: forall (a :: k0). Rep1 (Rec1 f) a -> Rec1 f a Source #

Generic1 (URec (Ptr ()) :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec (Ptr ())) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec (Ptr ()) a -> Rep1 (URec (Ptr ())) a Source #

to1 :: forall (a :: k0). Rep1 (URec (Ptr ())) a -> URec (Ptr ()) a Source #

Generic1 (URec Char :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Char) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec Char a -> Rep1 (URec Char) a Source #

to1 :: forall (a :: k0). Rep1 (URec Char) a -> URec Char a Source #

Generic1 (URec Double :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Double) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec Double a -> Rep1 (URec Double) a Source #

to1 :: forall (a :: k0). Rep1 (URec Double) a -> URec Double a Source #

Generic1 (URec Float :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Float) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec Float a -> Rep1 (URec Float) a Source #

to1 :: forall (a :: k0). Rep1 (URec Float) a -> URec Float a Source #

Generic1 (URec Int :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Int) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec Int a -> Rep1 (URec Int) a Source #

to1 :: forall (a :: k0). Rep1 (URec Int) a -> URec Int a Source #

Generic1 (URec Word :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Word) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec Word a -> Rep1 (URec Word) a Source #

to1 :: forall (a :: k0). Rep1 (URec Word) a -> URec Word a Source #

Generic1 ((,,,) a b c :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,) a b c) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, b, c, a0) -> Rep1 ((,,,) a b c) a0 Source #

to1 :: forall (a0 :: k). Rep1 ((,,,) a b c) a0 -> (a, b, c, a0) Source #

Generic1 (Product f g :: k -> Type) 
Instance details

Defined in Data.Functor.Product

Associated Types

type Rep1 (Product f g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Product f g a -> Rep1 (Product f g) a Source #

to1 :: forall (a :: k0). Rep1 (Product f g) a -> Product f g a Source #

Generic1 (Sum f g :: k -> Type) 
Instance details

Defined in Data.Functor.Sum

Associated Types

type Rep1 (Sum f g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Sum f g a -> Rep1 (Sum f g) a Source #

to1 :: forall (a :: k0). Rep1 (Sum f g) a -> Sum f g a Source #

Generic1 (f :*: g :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (f :*: g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). (f :*: g) a -> Rep1 (f :*: g) a Source #

to1 :: forall (a :: k0). Rep1 (f :*: g) a -> (f :*: g) a Source #

Generic1 (f :+: g :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (f :+: g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). (f :+: g) a -> Rep1 (f :+: g) a Source #

to1 :: forall (a :: k0). Rep1 (f :+: g) a -> (f :+: g) a Source #

Generic1 (K1 i c :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (K1 i c) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). K1 i c a -> Rep1 (K1 i c) a Source #

to1 :: forall (a :: k0). Rep1 (K1 i c) a -> K1 i c a Source #

Generic1 ((,,,,) a b c d :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,,) a b c d) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, b, c, d, a0) -> Rep1 ((,,,,) a b c d) a0 Source #

to1 :: forall (a0 :: k). Rep1 ((,,,,) a b c d) a0 -> (a, b, c, d, a0) Source #

Functor f => Generic1 (Compose f g :: k -> Type) 
Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep1 (Compose f g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Compose f g a -> Rep1 (Compose f g) a Source #

to1 :: forall (a :: k0). Rep1 (Compose f g) a -> Compose f g a Source #

Functor f => Generic1 (f :.: g :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (f :.: g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). (f :.: g) a -> Rep1 (f :.: g) a Source #

to1 :: forall (a :: k0). Rep1 (f :.: g) a -> (f :.: g) a Source #

Generic1 (M1 i c f :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (M1 i c f) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). M1 i c f a -> Rep1 (M1 i c f) a Source #

to1 :: forall (a :: k0). Rep1 (M1 i c f) a -> M1 i c f a Source #

Generic1 ((,,,,,) a b c d e :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,,,) a b c d e) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, b, c, d, e, a0) -> Rep1 ((,,,,,) a b c d e) a0 Source #

to1 :: forall (a0 :: k). Rep1 ((,,,,,) a b c d e) a0 -> (a, b, c, d, e, a0) Source #

Generic1 ((,,,,,,) a b c d e f :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,,,,) a b c d e f) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, b, c, d, e, f, a0) -> Rep1 ((,,,,,,) a b c d e f) a0 Source #

to1 :: forall (a0 :: k). Rep1 ((,,,,,,) a b c d e f) a0 -> (a, b, c, d, e, f, a0) Source #

Generic1 ((,,,,,,,) a b c d e f g :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,,,,,) a b c d e f g) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, b, c, d, e, f, g, a0) -> Rep1 ((,,,,,,,) a b c d e f g) a0 Source #

to1 :: forall (a0 :: k). Rep1 ((,,,,,,,) a b c d e f g) a0 -> (a, b, c, d, e, f, g, a0) Source #

Generic1 ((,,,,,,,,) a b c d e f g h :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,,,,,,) a b c d e f g h) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, b, c, d, e, f, g, h, a0) -> Rep1 ((,,,,,,,,) a b c d e f g h) a0 Source #

to1 :: forall (a0 :: k). Rep1 ((,,,,,,,,) a b c d e f g h) a0 -> (a, b, c, d, e, f, g, h, a0) Source #

Generic1 ((,,,,,,,,,) a b c d e f g h i :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,,,,,,,) a b c d e f g h i) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, b, c, d, e, f, g, h, i, a0) -> Rep1 ((,,,,,,,,,) a b c d e f g h i) a0 Source #

to1 :: forall (a0 :: k). Rep1 ((,,,,,,,,,) a b c d e f g h i) a0 -> (a, b, c, d, e, f, g, h, i, a0) Source #

Generic1 ((,,,,,,,,,,) a b c d e f g h i j :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,,,,,,,,) a b c d e f g h i j) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, b, c, d, e, f, g, h, i, j, a0) -> Rep1 ((,,,,,,,,,,) a b c d e f g h i j) a0 Source #

to1 :: forall (a0 :: k). Rep1 ((,,,,,,,,,,) a b c d e f g h i j) a0 -> (a, b, c, d, e, f, g, h, i, j, a0) Source #

Generic1 ((,,,,,,,,,,,) a b c d e f g h i j k :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,,,,,,,,,) a b c d e f g h i j k) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k0). (a, b, c, d, e, f, g, h, i, j, k, a0) -> Rep1 ((,,,,,,,,,,,) a b c d e f g h i j k) a0 Source #

to1 :: forall (a0 :: k0). Rep1 ((,,,,,,,,,,,) a b c d e f g h i j k) a0 -> (a, b, c, d, e, f, g, h, i, j, k, a0) Source #

Generic1 ((,,,,,,,,,,,,) a b c d e f g h i j k l :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k0). (a, b, c, d, e, f, g, h, i, j, k, l, a0) -> Rep1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) a0 Source #

to1 :: forall (a0 :: k0). Rep1 ((,,,,,,,,,,,,) a b c d e f g h i j k l) a0 -> (a, b, c, d, e, f, g, h, i, j, k, l, a0) Source #

Generic1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k0). (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) -> Rep1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) a0 Source #

to1 :: forall (a0 :: k0). Rep1 ((,,,,,,,,,,,,,) a b c d e f g h i j k l m) a0 -> (a, b, c, d, e, f, g, h, i, j, k, l, m, a0) Source #

Generic1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k0). (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) -> Rep1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) a0 Source #

to1 :: forall (a0 :: k0). Rep1 ((,,,,,,,,,,,,,,) a b c d e f g h i j k l m n) a0 -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, a0) Source #