transformers-compat-0.7.2: A small compatibility shim for the transformers library
Copyright(C) 2015-2016 Edward Kmett Ryan Scott
LicenseBSD-style (see the file LICENSE)
MaintainerRyan Scott
StabilityProvisional
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Data.Functor.Classes.Generic.Internal

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

Options

newtype Options Source #

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

Constructors

Options 

Fields

defaultOptions :: Options Source #

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

latestGHCOptions :: Options Source #

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 Source #

A sensible default liftEq implementation for Generic1 instances.

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

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

class (forall a. Eq a => GEq (t a)) => GEq1 v t where Source #

Class of generic representation types that can lift equality through unary type constructors.

Methods

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

Instances

Instances details
GEq1 NonV4 Par1 Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args NonV4 a b -> Par1 a -> Par1 b -> Bool Source #

GEq1 v (UWord :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args v a b -> UWord a -> UWord b -> Bool Source #

GEq1 v (UInt :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args v a b -> UInt a -> UInt b -> Bool Source #

GEq1 v (UFloat :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args v a b -> UFloat a -> UFloat b -> Bool Source #

GEq1 v (UDouble :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args v a b -> UDouble a -> UDouble b -> Bool Source #

GEq1 v (UChar :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args v a b -> UChar a -> UChar b -> Bool Source #

GEq1 v (UAddr :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args v a b -> UAddr a -> UAddr b -> Bool Source #

GEq1 v (V1 :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args v a b -> V1 a -> V1 b -> Bool Source #

GEq1 v (U1 :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args v a b -> U1 a -> U1 b -> Bool Source #

Eq1 f => GEq1 NonV4 (Rec1 f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args NonV4 a b -> Rec1 f a -> Rec1 f b -> Bool Source #

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args v a b -> (f :+: g) a -> (f :+: g) b -> Bool Source #

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args v a b -> (f :*: g) a -> (f :*: g) b -> Bool Source #

Eq c => GEq1 v (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args v a b -> K1 i c a -> K1 i c b -> Bool Source #

GEq1 v f => GEq1 v (M1 i c f) Source # 
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 Source #

(Eq1 f, GEq1 NonV4 g) => GEq1 NonV4 (f :.: g) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args NonV4 a b -> (f :.: g) a -> (f :.: g) b -> Bool Source #

data Eq1Args v a b where Source #

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 Source #

A sensible default liftCompare implementation for Generic1 instances.

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

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

class (GEq1 v t, forall a. Ord a => GOrd (t a)) => GOrd1 v t where Source #

Class of generic representation types that can lift a total order through unary type constructors.

Methods

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

Instances

Instances details
GOrd1 NonV4 Par1 Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args NonV4 a b -> Par1 a -> Par1 b -> Ordering Source #

GOrd1 v (UWord :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args v a b -> UWord a -> UWord b -> Ordering Source #

GOrd1 v (UInt :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args v a b -> UInt a -> UInt b -> Ordering Source #

GOrd1 v (UFloat :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args v a b -> UFloat a -> UFloat b -> Ordering Source #

GOrd1 v (UDouble :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args v a b -> UDouble a -> UDouble b -> Ordering Source #

GOrd1 v (UChar :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args v a b -> UChar a -> UChar b -> Ordering Source #

GOrd1 v (UAddr :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args v a b -> UAddr a -> UAddr b -> Ordering Source #

GOrd1 v (V1 :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args v a b -> V1 a -> V1 b -> Ordering Source #

GOrd1 v (U1 :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args v a b -> U1 a -> U1 b -> Ordering Source #

Ord1 f => GOrd1 NonV4 (Rec1 f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args NonV4 a b -> Rec1 f a -> Rec1 f b -> Ordering Source #

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args v a b -> (f :+: g) a -> (f :+: g) b -> Ordering Source #

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args v a b -> (f :*: g) a -> (f :*: g) b -> Ordering Source #

Ord c => GOrd1 v (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args v a b -> K1 i c a -> K1 i c b -> Ordering Source #

GOrd1 v f => GOrd1 v (M1 i c f) Source # 
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 Source #

(Ord1 f, GOrd1 NonV4 g) => GOrd1 NonV4 (f :.: g) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args NonV4 a b -> (f :.: g) a -> (f :.: g) b -> Ordering Source #

data Ord1Args v a b where Source #

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) Source #

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) Source #

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

class (forall a. Read a => GRead (f a)) => GRead1 v f where Source #

Class of generic representation types for unary type constructors that can be parsed from a String.

Methods

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

Instances

Instances details
GRead1 v (V1 :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftReadPrec :: Read1Args v a -> ReadPrec (V1 a) Source #

(Constructor c, GRead1Con v f, IsNullaryCon f) => GRead1 v (C1 c f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

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

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

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

(GRead1 v f, IsNullaryDataType f) => GRead1 v (D1 d f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

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

class (forall a. Read a => GReadCon (f a)) => GRead1Con v f where Source #

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

Instances

Instances details
GRead1Con NonV4 Par1 Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

GRead1Con v (U1 :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Read1 f => GRead1Con NonV4 (Rec1 f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

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

(Selector s, GRead1Con v f) => GRead1Con v (S1 s f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

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

Read c => GRead1Con v (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftReadPrecCon :: ConType -> Read1Args v a -> ReadPrec (K1 i c a) Source #

(Read1 f, GRead1Con NonV4 g) => GRead1Con NonV4 (f :.: g) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

data Read1Args v a where Source #

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 Source #

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 Source #

Like liftShowsPrecDefault, but with configurable Options.

class (forall a. Show a => GShow (f a)) => GShow1 v f where Source #

Class of generic representation types for unary type constructors that can be converted to a String.

Methods

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

Instances

Instances details
GShow1 v (V1 :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftShowsPrec :: Options -> Show1Args v a -> Int -> V1 a -> ShowS Source #

(Constructor c, GShow1Con v f, IsNullaryCon f) => GShow1 v (C1 c f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

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

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftShowsPrec :: Options -> Show1Args v a -> Int -> (f :+: g) a -> ShowS Source #

GShow1 v f => GShow1 v (D1 d f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

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

class (forall a. Show a => GShowCon (f a)) => GShow1Con v f where Source #

Class of generic representation types for unary type constructors 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 Source #

Instances

Instances details
GShow1Con NonV4 Par1 Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

GShow1Con v (UWord :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

GShow1Con v (UInt :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

GShow1Con v (UFloat :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

GShow1Con v (UDouble :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

GShow1Con v (UChar :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

GShow1Con v (U1 :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

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

Show1 f => GShow1Con NonV4 (Rec1 f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> (f :*: g) a -> ShowS Source #

(Selector s, GShow1Con v f) => GShow1Con v (S1 s f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

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

Show c => GShow1Con v (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftShowsPrecCon :: Options -> ConType -> Show1Args v a -> Int -> K1 i c a -> ShowS Source #

(Show1 f, GShow1Con NonV4 g) => GShow1Con NonV4 (f :.: g) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftShowsPrecCon :: Options -> ConType -> Show1Args NonV4 a -> Int -> (f :.: g) a -> ShowS Source #

data Show1Args v a where Source #

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 

Eq

eqDefault :: (GEq (Rep1 f a), Generic1 f) => f a -> f a -> Bool Source #

A default (==) implementation for Generic1 instances that leverages Eq1.

class GEq a where Source #

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

Methods

geq :: a -> a -> Bool Source #

Instances

Instances details
Eq p => GEq (Par1 p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

geq :: Par1 p -> Par1 p -> Bool Source #

GEq (V1 p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

geq :: V1 p -> V1 p -> Bool Source #

GEq (U1 p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

geq :: U1 p -> U1 p -> Bool Source #

GEq (UAddr p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

geq :: UAddr p -> UAddr p -> Bool Source #

GEq (UChar p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

geq :: UChar p -> UChar p -> Bool Source #

GEq (UDouble p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

geq :: UDouble p -> UDouble p -> Bool Source #

GEq (UFloat p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

geq :: UFloat p -> UFloat p -> Bool Source #

GEq (UInt p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

geq :: UInt p -> UInt p -> Bool Source #

GEq (UWord p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

geq :: UWord p -> UWord p -> Bool Source #

(Eq1 f, Eq p) => GEq (Rec1 f p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

geq :: Rec1 f p -> Rec1 f p -> Bool Source #

Eq c => GEq (K1 i c p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

geq :: K1 i c p -> K1 i c p -> Bool Source #

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

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

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

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

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

geq :: M1 i c f p -> M1 i c f p -> Bool Source #

(Eq1 f, GEq (g p)) => GEq ((f :.: g) p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

geq :: (f :.: g) p -> (f :.: g) p -> Bool Source #

Ord

compareDefault :: (GOrd (Rep1 f a), Generic1 f) => f a -> f a -> Ordering Source #

A default compare implementation for Generic1 instances that leverages Ord1.

class GEq a => GOrd a where Source #

Class of generic representation types that can be totally ordered.

Methods

gcompare :: a -> a -> Ordering Source #

Instances

Instances details
Ord p => GOrd (Par1 p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: Par1 p -> Par1 p -> Ordering Source #

GOrd (V1 p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: V1 p -> V1 p -> Ordering Source #

GOrd (U1 p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: U1 p -> U1 p -> Ordering Source #

GOrd (UAddr p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: UAddr p -> UAddr p -> Ordering Source #

GOrd (UChar p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: UChar p -> UChar p -> Ordering Source #

GOrd (UDouble p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: UDouble p -> UDouble p -> Ordering Source #

GOrd (UFloat p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: UFloat p -> UFloat p -> Ordering Source #

GOrd (UInt p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: UInt p -> UInt p -> Ordering Source #

GOrd (UWord p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: UWord p -> UWord p -> Ordering Source #

(Ord1 f, Ord p) => GOrd (Rec1 f p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: Rec1 f p -> Rec1 f p -> Ordering Source #

Ord c => GOrd (K1 i c p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: K1 i c p -> K1 i c p -> Ordering Source #

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: (f :+: g) p -> (f :+: g) p -> Ordering Source #

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: (f :*: g) p -> (f :*: g) p -> Ordering Source #

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: M1 i c f p -> M1 i c f p -> Ordering Source #

(Ord1 f, GOrd (g p)) => GOrd ((f :.: g) p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gcompare :: (f :.: g) p -> (f :.: g) p -> Ordering Source #

Read

readsPrecDefault :: (GRead (Rep1 f a), Generic1 f) => Int -> ReadS (f a) Source #

A default readsPrec implementation for Generic1 instances that leverages Read1.

class GRead a where Source #

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

Instances

Instances details
GRead (V1 p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

greadPrec :: ReadPrec (V1 p) Source #

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

greadPrec :: ReadPrec ((f :+: g) p) Source #

(GRead (f p), IsNullaryDataType f) => GRead (D1 d f p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

greadPrec :: ReadPrec (D1 d f p) Source #

(Constructor c, GReadCon (f p), IsNullaryCon f) => GRead (C1 c f p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

greadPrec :: ReadPrec (C1 c f p) Source #

Show

showsPrecDefault :: (GShow (Rep1 f a), Generic1 f) => Int -> f a -> ShowS Source #

A default showsPrec implementation for Generic1 instances that leverages Show1.

showsPrecOptions :: (GShow (Rep1 f a), Generic1 f) => Options -> Int -> f a -> ShowS Source #

Like showsPrecDefault, but with configurable Options.

class GShow a where Source #

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

Methods

gshowsPrec :: Options -> Int -> a -> ShowS Source #

Instances

Instances details
GShow (V1 p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gshowsPrec :: Options -> Int -> V1 p -> ShowS Source #

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

gshowsPrec :: Options -> Int -> (f :+: g) p -> ShowS Source #

GShow (f p) => GShow (D1 d f p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gshowsPrec :: Options -> Int -> D1 d f p -> ShowS Source #

(Constructor c, GShowCon (f p), IsNullaryCon f) => GShow (C1 c f p) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gshowsPrec :: Options -> Int -> C1 c f p -> ShowS Source #

FunctorClassesDefault

newtype FunctorClassesDefault f a Source #

An adapter newtype, suitable for DerivingVia. Its Eq1, Ord1, Read1, and Show1 instances leverage Generic1-based defaults.

Instances

Instances details
(GEq1 NonV4 (Rep1 f), Generic1 f) => Eq1 (FunctorClassesDefault f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

liftEq :: (a -> b -> Bool) -> FunctorClassesDefault f a -> FunctorClassesDefault f b -> Bool #

(GOrd1 NonV4 (Rep1 f), Generic1 f) => Ord1 (FunctorClassesDefault f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

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

Defined in Data.Functor.Classes.Generic.Internal

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

Defined in Data.Functor.Classes.Generic.Internal

Methods

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

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

(GEq (Rep1 f a), Generic1 f) => Eq (FunctorClassesDefault f a) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

(GOrd (Rep1 f a), Generic1 f) => Ord (FunctorClassesDefault f a) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

(GRead (Rep1 f a), Generic1 f) => Read (FunctorClassesDefault f a) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

(GShow (Rep1 f a), Generic1 f) => Show (FunctorClassesDefault f a) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Miscellaneous types

data V4 Source #

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

data NonV4 Source #

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 Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

GRead1Con NonV4 Par1 Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

GOrd1 NonV4 Par1 Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args NonV4 a b -> Par1 a -> Par1 b -> Ordering Source #

GEq1 NonV4 Par1 Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args NonV4 a b -> Par1 a -> Par1 b -> Bool Source #

Show1 f => GShow1Con NonV4 (Rec1 f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Read1 f => GRead1Con NonV4 (Rec1 f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Ord1 f => GOrd1 NonV4 (Rec1 f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args NonV4 a b -> Rec1 f a -> Rec1 f b -> Ordering Source #

Eq1 f => GEq1 NonV4 (Rec1 f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args NonV4 a b -> Rec1 f a -> Rec1 f b -> Bool Source #

(Show1 f, GShow1Con NonV4 g) => GShow1Con NonV4 (f :.: g) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftShowsPrecCon :: Options -> ConType -> Show1Args NonV4 a -> Int -> (f :.: g) a -> ShowS Source #

(Read1 f, GRead1Con NonV4 g) => GRead1Con NonV4 (f :.: g) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

(Ord1 f, GOrd1 NonV4 g) => GOrd1 NonV4 (f :.: g) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftCompare :: Ord1Args NonV4 a b -> (f :.: g) a -> (f :.: g) b -> Ordering Source #

(Eq1 f, GEq1 NonV4 g) => GEq1 NonV4 (f :.: g) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

gliftEq :: Eq1Args NonV4 a b -> (f :.: g) a -> (f :.: g) b -> Bool Source #

data ConType Source #

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

Constructors

Rec 
Tup 
Pref 
Inf String 

class IsNullaryDataType f where Source #

Class of generic representation types that represent a data type with zero or more constructors.

Methods

isNullaryDataType :: f a -> Bool Source #

Returns True if the data type has no constructors.

Instances

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

Defined in Data.Functor.Classes.Generic.Internal

IsNullaryDataType (f :+: g) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

isNullaryDataType :: (f :+: g) a -> Bool Source #

IsNullaryDataType (C1 c f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

isNullaryDataType :: C1 c f a -> Bool Source #

class IsNullaryCon f where Source #

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

Methods

isNullaryCon :: f a -> Bool Source #

Returns True if the constructor has no fields.

Instances

Instances details
IsNullaryCon Par1 Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

isNullaryCon :: Par1 a -> Bool Source #

IsNullaryCon (U1 :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

isNullaryCon :: U1 a -> Bool Source #

IsNullaryCon (UChar :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

isNullaryCon :: UChar a -> Bool Source #

IsNullaryCon (UDouble :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

IsNullaryCon (UFloat :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

IsNullaryCon (UInt :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

isNullaryCon :: UInt a -> Bool Source #

IsNullaryCon (UWord :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

isNullaryCon :: UWord a -> Bool Source #

IsNullaryCon (Rec1 f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

isNullaryCon :: Rec1 f a -> Bool Source #

IsNullaryCon (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

isNullaryCon :: K1 i c a -> Bool Source #

IsNullaryCon (f :*: g) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

isNullaryCon :: (f :*: g) a -> Bool Source #

IsNullaryCon f => IsNullaryCon (S1 s f) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

isNullaryCon :: S1 s f a -> Bool Source #

IsNullaryCon (f :.: g) Source # 
Instance details

Defined in Data.Functor.Classes.Generic.Internal

Methods

isNullaryCon :: (f :.: g) a -> Bool Source #