transformers-compat-0.6.2: A small compatibility shim for the transformers library

Copyright | (C) 2015-2016 Edward Kmett Ryan Scott
License | BSD-style (see the file LICENSE)
Maintainer | Ryan Scott
Stability | Provisional
Portability | GHC
Safe Haskell | None
Language | Haskell98

Data.Functor.Classes.Generic.Internal

Contents

- Options
- `Eq1`
- `Ord1`
- `Read1`
- `Show1`
- Miscellaneous types

Description

Internal functionality for Data.Functor.Classes.Generic.

This is an internal module and, as such, the API is not guaranteed to remain the same between any given release.

Synopsis

- newtype Options = Options {
  - ghc8ShowBehavior :: Bool
  }
- defaultOptions :: Options
- latestGHCOptions :: Options
- liftEqDefault :: (GEq1 NonV4 (Rep1 f), Generic1 f) => (a -> b -> Bool) -> f a -> f b -> Bool
- liftEqOptions :: (GEq1 NonV4 (Rep1 f), Generic1 f) => Options -> (a -> b -> Bool) -> f a -> f b -> Bool
- class GEq1 v t where
  - gliftEq :: Eq1Args v a b -> t a -> t b -> Bool
- data Eq1Args v a b where
  - V4Eq1Args :: Eq a => Eq1Args V4 a a
  - NonV4Eq1Args :: (a -> b -> Bool) -> Eq1Args NonV4 a b
- liftCompareDefault :: (GOrd1 NonV4 (Rep1 f), Generic1 f) => (a -> b -> Ordering) -> f a -> f b -> Ordering
- liftCompareOptions :: (GOrd1 NonV4 (Rep1 f), Generic1 f) => Options -> (a -> b -> Ordering) -> f a -> f b -> Ordering
- class GEq1 v t => GOrd1 v t where
  - gliftCompare :: Ord1Args v a b -> t a -> t b -> Ordering
- data Ord1Args v a b where
  - V4Ord1Args :: Ord a => Ord1Args V4 a a
  - NonV4Ord1Args :: (a -> b -> Ordering) -> Ord1Args NonV4 a b
- liftReadsPrecDefault :: (GRead1 NonV4 (Rep1 f), Generic1 f) => (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (f a)
- liftReadsPrecOptions :: (GRead1 NonV4 (Rep1 f), Generic1 f) => Options -> (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (f a)
- class GRead1 v f where
  - gliftReadPrec :: Read1Args v a -> ReadPrec (f a)
- class GRead1Con v f where
  - gliftReadPrecCon :: ConType -> Read1Args v a -> ReadPrec (f a)
- data Read1Args v a where
  - V4Read1Args :: Read a => Read1Args V4 a
  - NonV4Read1Args :: ReadPrec a -> ReadPrec [a] -> Read1Args NonV4 a
- liftShowsPrecDefault :: (GShow1 NonV4 (Rep1 f), Generic1 f) => (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> f a -> ShowS
- liftShowsPrecOptions :: (GShow1 NonV4 (Rep1 f), Generic1 f) => Options -> (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> f a -> ShowS
- class GShow1 v f where
  - gliftShowsPrec :: Options -> Show1Args v a -> Int -> f a -> ShowS
- class GShow1Con v f where
  - gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> f a -> ShowS
- data Show1Args v a where
  - V4Show1Args :: Show a => Show1Args V4 a
  - NonV4Show1Args :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Show1Args NonV4 a
- data V4
- data NonV4
- data ConType
  - = Rec
  - | Tup
  - | Pref
  - | Inf String
- class IsNullary f where
  - isNullary :: f a -> Bool

# Options

newtype Options #

Options that further configure how the functions in Data.Functor.Classes.Generic should behave.

Constructors

Options |
Fields ghc8ShowBehavior :: Bool If `True`, a default `Show1` implementation will show hash signs (`#`) when showing unlifted types.

defaultOptions :: Options #

Options that match the behavior of the installed version of GHC.

latestGHCOptions :: Options #

Options that match the behavior of the most recent GHC release.

# `Eq1`

liftEqDefault :: (GEq1 NonV4 (Rep1 f), Generic1 f) => (a -> b -> Bool) -> f a -> f b -> Bool #

A sensible default `liftEq` implementation for `Generic1` instances.

liftEqOptions :: (GEq1 NonV4 (Rep1 f), Generic1 f) => Options -> (a -> b -> Bool) -> f a -> f b -> Bool #

Like `liftEqDefault`, but with configurable `Options`. Currently, the `Options` have no effect (but this may change in the future).

class GEq1 v t where #

Class of generic representation types that can be checked for equality.

Methods

gliftEq :: Eq1Args v a b -> t a -> t b -> Bool #

#### Instances

Instances details

GEq1 NonV4 Par1 # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args NonV4 a b -> Par1 a -> Par1 b -> Bool #
GEq1 v (UWord :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> UWord a -> UWord b -> Bool #
GEq1 v (UInt :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> UInt a -> UInt b -> Bool #
GEq1 v (UFloat :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> UFloat a -> UFloat b -> Bool #
GEq1 v (UDouble :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> UDouble a -> UDouble b -> Bool #
GEq1 v (UChar :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> UChar a -> UChar b -> Bool #
GEq1 v (UAddr :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> UAddr a -> UAddr b -> Bool #
GEq1 v (V1 :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> V1 a -> V1 b -> Bool #
GEq1 v (U1 :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> U1 a -> U1 b -> Bool #
Eq1 f => GEq1 NonV4 (Rec1 f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args NonV4 a b -> Rec1 f a -> Rec1 f b -> Bool #
(GEq1 v f, GEq1 v g) => GEq1 v (f :+: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> (f :+: g) a -> (f :+: g) b -> Bool #
(GEq1 v f, GEq1 v g) => GEq1 v (f :*: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> (f :*: g) a -> (f :*: g) b -> Bool #
Eq c => GEq1 v (K1 i c :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> K1 i c a -> K1 i c b -> Bool #
GEq1 v f => GEq1 v (M1 i c f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args v a b -> M1 i c f a -> M1 i c f b -> Bool #
(Eq1 f, GEq1 NonV4 g) => GEq1 NonV4 (f :.: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args NonV4 a b -> (f :.: g) a -> (f :.: g) b -> Bool #

data Eq1Args v a b where #

An `Eq1Args` value either stores an `Eq a` dictionary (for the `transformers-0.4` version of `Eq1`), or it stores the function argument that checks the equality of occurrences of the type parameter (for the non-`transformers-0.4` version of `Eq1`).

Constructors

V4Eq1Args :: Eq a => Eq1Args V4 a a |
NonV4Eq1Args :: (a -> b -> Bool) -> Eq1Args NonV4 a b |

# `Ord1`

liftCompareDefault :: (GOrd1 NonV4 (Rep1 f), Generic1 f) => (a -> b -> Ordering) -> f a -> f b -> Ordering #

A sensible default `liftCompare` implementation for `Generic1` instances.

liftCompareOptions :: (GOrd1 NonV4 (Rep1 f), Generic1 f) => Options -> (a -> b -> Ordering) -> f a -> f b -> Ordering #

Like `liftCompareDefault`, but with configurable `Options`. Currently, the `Options` have no effect (but this may change in the future).

class GEq1 v t => GOrd1 v t where #

Class of generic representation types that can be totally ordered.

Methods

gliftCompare :: Ord1Args v a b -> t a -> t b -> Ordering #

#### Instances

Instances details

GOrd1 NonV4 Par1 # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args NonV4 a b -> Par1 a -> Par1 b -> Ordering #
GOrd1 v (UWord :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> UWord a -> UWord b -> Ordering #
GOrd1 v (UInt :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> UInt a -> UInt b -> Ordering #
GOrd1 v (UFloat :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> UFloat a -> UFloat b -> Ordering #
GOrd1 v (UDouble :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> UDouble a -> UDouble b -> Ordering #
GOrd1 v (UChar :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> UChar a -> UChar b -> Ordering #
GOrd1 v (UAddr :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> UAddr a -> UAddr b -> Ordering #
GOrd1 v (V1 :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> V1 a -> V1 b -> Ordering #
GOrd1 v (U1 :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> U1 a -> U1 b -> Ordering #
Ord1 f => GOrd1 NonV4 (Rec1 f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args NonV4 a b -> Rec1 f a -> Rec1 f b -> Ordering #
(GOrd1 v f, GOrd1 v g) => GOrd1 v (f :+: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> (f :+: g) a -> (f :+: g) b -> Ordering #
(GOrd1 v f, GOrd1 v g) => GOrd1 v (f :*: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> (f :*: g) a -> (f :*: g) b -> Ordering #
Ord c => GOrd1 v (K1 i c :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> K1 i c a -> K1 i c b -> Ordering #
GOrd1 v f => GOrd1 v (M1 i c f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args v a b -> M1 i c f a -> M1 i c f b -> Ordering #
(Ord1 f, GOrd1 NonV4 g) => GOrd1 NonV4 (f :.: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args NonV4 a b -> (f :.: g) a -> (f :.: g) b -> Ordering #

data Ord1Args v a b where #

An `Ord1Args` value either stores an `Ord a` dictionary (for the `transformers-0.4` version of `Ord1`), or it stores the function argument that compares occurrences of the type parameter (for the non-`transformers-0.4` version of `Ord1`).

Constructors

V4Ord1Args :: Ord a => Ord1Args V4 a a |
NonV4Ord1Args :: (a -> b -> Ordering) -> Ord1Args NonV4 a b |

# `Read1`

liftReadsPrecDefault :: (GRead1 NonV4 (Rep1 f), Generic1 f) => (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (f a) #

A sensible default `liftReadsPrec` implementation for `Generic1` instances.

liftReadsPrecOptions :: (GRead1 NonV4 (Rep1 f), Generic1 f) => Options -> (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (f a) #

Like `liftReadsPrecDefault`, but with configurable `Options`. Currently, the `Options` have no effect (but this may change in the future).

class GRead1 v f where #

Class of generic representation types that can be parsed from a `String`.

Methods

gliftReadPrec :: Read1Args v a -> ReadPrec (f a) #

#### Instances

Instances details

GRead1 v (V1 :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftReadPrec :: Read1Args v a -> ReadPrec (V1 a) #
(Constructor c, GRead1Con v f, IsNullary f) => GRead1 v (C1 c f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftReadPrec :: Read1Args v a -> ReadPrec (C1 c f a) #
(GRead1 v f, GRead1 v g) => GRead1 v (f :+: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftReadPrec :: Read1Args v a -> ReadPrec ((f :+: g) a) #
GRead1 v f => GRead1 v (D1 d f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftReadPrec :: Read1Args v a -> ReadPrec (D1 d f a) #

class GRead1Con v f where #

Class of generic representation types that can be parsed from a `String`, and for which the `ConType` has been determined.

Methods

gliftReadPrecCon :: ConType -> Read1Args v a -> ReadPrec (f a) #

#### Instances

Instances details

GRead1Con NonV4 Par1 # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftReadPrecCon :: ConType -> Read1Args NonV4 a -> ReadPrec (Par1 a) #
GRead1Con v (U1 :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftReadPrecCon :: ConType -> Read1Args v a -> ReadPrec (U1 a) #
Read1 f => GRead1Con NonV4 (Rec1 f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftReadPrecCon :: ConType -> Read1Args NonV4 a -> ReadPrec (Rec1 f a) #
(GRead1Con v f, GRead1Con v g) => GRead1Con v (f :*: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftReadPrecCon :: ConType -> Read1Args v a -> ReadPrec ((f :*: g) a) #
(Selector s, GRead1Con v f) => GRead1Con v (S1 s f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftReadPrecCon :: ConType -> Read1Args v a -> ReadPrec (S1 s f a) #
Read c => GRead1Con v (K1 i c :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftReadPrecCon :: ConType -> Read1Args v a -> ReadPrec (K1 i c a) #
(Read1 f, GRead1Con NonV4 g) => GRead1Con NonV4 (f :.: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftReadPrecCon :: ConType -> Read1Args NonV4 a -> ReadPrec ((f :.: g) a) #

data Read1Args v a where #

A `Read1Args` value either stores a `Read a` dictionary (for the `transformers-0.4` version of `Read1`), or it stores the two function arguments that parse occurrences of the type parameter (for the non-`transformers-0.4` version of `Read1`).

Constructors

V4Read1Args :: Read a => Read1Args V4 a |
NonV4Read1Args :: ReadPrec a -> ReadPrec [a] -> Read1Args NonV4 a |

# `Show1`

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

A sensible default `liftShowsPrec` implementation for `Generic1` instances.

liftShowsPrecOptions :: (GShow1 NonV4 (Rep1 f), Generic1 f) => Options -> (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> f a -> ShowS #

Like `liftShowsPrecDefault`, but with configurable `Options`.

class GShow1 v f where #

Class of generic representation types that can be converted to a `String`.

Methods

gliftShowsPrec :: Options -> Show1Args v a -> Int -> f a -> ShowS #

#### Instances

Instances details

GShow1 v (V1 :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrec :: Options -> Show1Args v a -> Int -> V1 a -> ShowS #
(Constructor c, GShow1Con v f, IsNullary f) => GShow1 v (C1 c f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrec :: Options -> Show1Args v a -> Int -> C1 c f a -> ShowS #
(GShow1 v f, GShow1 v g) => GShow1 v (f :+: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrec :: Options -> Show1Args v a -> Int -> (f :+: g) a -> ShowS #
GShow1 v f => GShow1 v (D1 d f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrec :: Options -> Show1Args v a -> Int -> D1 d f a -> ShowS #

class GShow1Con v f where #

Class of generic representation types that can be converted to a `String`, and for which the `ConType` has been determined.

Methods

gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> f a -> ShowS #

#### Instances

Instances details

GShow1Con NonV4 Par1 # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args NonV4 a -> Int -> Par1 a -> ShowS #
GShow1Con v (UWord :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> UWord a -> ShowS #
GShow1Con v (UInt :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> UInt a -> ShowS #
GShow1Con v (UFloat :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> UFloat a -> ShowS #
GShow1Con v (UDouble :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> UDouble a -> ShowS #
GShow1Con v (UChar :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> UChar a -> ShowS #
GShow1Con v (U1 :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> U1 a -> ShowS #
Show1 f => GShow1Con NonV4 (Rec1 f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args NonV4 a -> Int -> Rec1 f a -> ShowS #
(GShow1Con v f, GShow1Con v g) => GShow1Con v (f :*: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> (f :*: g) a -> ShowS #
(Selector s, GShow1Con v f) => GShow1Con v (S1 s f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> S1 s f a -> ShowS #
Show c => GShow1Con v (K1 i c :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> K1 i c a -> ShowS #
(Show1 f, GShow1Con NonV4 g) => GShow1Con NonV4 (f :.: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args NonV4 a -> Int -> (f :.: g) a -> ShowS #

data Show1Args v a where #

A `Show1Args` value either stores a `Show a` dictionary (for the `transformers-0.4` version of `Show1`), or it stores the two function arguments that show occurrences of the type parameter (for the non-`transformers-0.4` version of `Show1`).

Constructors

V4Show1Args :: Show a => Show1Args V4 a |
NonV4Show1Args :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Show1Args NonV4 a |

# Miscellaneous types

data V4 #

A type-level indicator that the `transformers-0.4` version of a class method is being derived generically.

data NonV4 #

A type-level indicator that the non-`transformers-0.4` version of a class method is being derived generically.

#### Instances

Instances details

GShow1Con NonV4 Par1 # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args NonV4 a -> Int -> Par1 a -> ShowS #
GRead1Con NonV4 Par1 # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftReadPrecCon :: ConType -> Read1Args NonV4 a -> ReadPrec (Par1 a) #
GOrd1 NonV4 Par1 # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args NonV4 a b -> Par1 a -> Par1 b -> Ordering #
GEq1 NonV4 Par1 # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args NonV4 a b -> Par1 a -> Par1 b -> Bool #
Show1 f => GShow1Con NonV4 (Rec1 f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args NonV4 a -> Int -> Rec1 f a -> ShowS #
Read1 f => GRead1Con NonV4 (Rec1 f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftReadPrecCon :: ConType -> Read1Args NonV4 a -> ReadPrec (Rec1 f a) #
Ord1 f => GOrd1 NonV4 (Rec1 f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args NonV4 a b -> Rec1 f a -> Rec1 f b -> Ordering #
Eq1 f => GEq1 NonV4 (Rec1 f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args NonV4 a b -> Rec1 f a -> Rec1 f b -> Bool #
(Show1 f, GShow1Con NonV4 g) => GShow1Con NonV4 (f :.: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftShowsPrecCon :: Options -> ConType -> Show1Args NonV4 a -> Int -> (f :.: g) a -> ShowS #
(Read1 f, GRead1Con NonV4 g) => GRead1Con NonV4 (f :.: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftReadPrecCon :: ConType -> Read1Args NonV4 a -> ReadPrec ((f :.: g) a) #
(Ord1 f, GOrd1 NonV4 g) => GOrd1 NonV4 (f :.: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftCompare :: Ord1Args NonV4 a b -> (f :.: g) a -> (f :.: g) b -> Ordering #
(Eq1 f, GEq1 NonV4 g) => GEq1 NonV4 (f :.: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods gliftEq :: Eq1Args NonV4 a b -> (f :.: g) a -> (f :.: g) b -> Bool #

data ConType #

Whether a constructor is a record (`Rec`), a tuple (`Tup`), is prefix (`Pref`), or infix (`Inf`).

Constructors

Rec |
Tup |
Pref |
Inf String |

class IsNullary f where #

Class of generic representation types that represent a constructor with zero or more fields.

Methods

isNullary :: f a -> Bool #

#### Instances

Instances details

IsNullary Par1 # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullary :: Par1 a -> Bool #
IsNullary (U1 :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullary :: U1 a -> Bool #
IsNullary (UChar :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullary :: UChar a -> Bool #
IsNullary (UDouble :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullary :: UDouble a -> Bool #
IsNullary (UFloat :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullary :: UFloat a -> Bool #
IsNullary (UInt :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullary :: UInt a -> Bool #
IsNullary (UWord :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullary :: UWord a -> Bool #
IsNullary (Rec1 f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullary :: Rec1 f a -> Bool #
IsNullary (K1 i c :: Type -> Type) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullary :: K1 i c a -> Bool #
IsNullary (f :*: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullary :: (f :*: g) a -> Bool #
IsNullary f => IsNullary (S1 s f) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullary :: S1 s f a -> Bool #
IsNullary (f :.: g) # |
Instance details Defined in Data.Functor.Classes.Generic.Internal Methods isNullary :: (f :.: g) a -> Bool #