generics-sop-0.5.1.4: Generic Programming using True Sums of Products

Safe Haskell | None
Language | Haskell2010

Generics.SOP.Type.Metadata

Contents

- re-exports

Description

Type-level metadata

This module provides datatypes (to be used promoted) that can represent the metadata of Haskell datatypes on the type level.

We do not reuse the term-level metadata types, because these are GADTs that incorporate additional invariants. We could (at least in GHC 8) impose the same invariants on the type level as well, but some tests have revealed that the resulting type are rather inconvenient to work with.

So we use simple datatypes to represent the type-level metadata, even if this means that some invariants are not explicitly captured.

We establish a relation between the term- and type-level versions of the metadata by automatically computing the term-level version from the type-level version.

As we now have two versions of metadata (term-level and type-level) with very similar, yet slightly different datatype definitions, the names between the modules clash, and this module is recommended to be imported qualified when needed.

The interface exported by this module is still somewhat experimental.

Since: 0.3.0.0

Synopsis

- data ConstructorInfo
  - = Constructor ConstructorName
  - | Infix ConstructorName Associativity Fixity
  - | Record ConstructorName [FieldInfo]
- type Fixity = Nat
- data DatatypeInfo
  - = ADT ModuleName DatatypeName [ConstructorInfo] [[StrictnessInfo]]
  - | Newtype ModuleName DatatypeName ConstructorInfo
- data FieldInfo = FieldInfo FieldName
- type DatatypeName = Symbol
- type ModuleName = Symbol
- type ConstructorName = Symbol
- type FieldName = Symbol
- data StrictnessInfo = StrictnessInfo SourceUnpackedness SourceStrictness DecidedStrictness
- class DemoteDatatypeInfo (x :: DatatypeInfo) (xss :: [[Type]]) where
  - demoteDatatypeInfo :: proxy x -> DatatypeInfo xss
- class DemoteConstructorInfos (cs :: [ConstructorInfo]) (xss :: [[Type]]) where
  - demoteConstructorInfos :: proxy cs -> NP ConstructorInfo xss
- class DemoteStrictnessInfoss (sss :: [[StrictnessInfo]]) (xss :: [[Type]]) where
  - demoteStrictnessInfoss :: proxy sss -> NP (NP StrictnessInfo) xss
- class DemoteConstructorInfo (x :: ConstructorInfo) (xs :: [Type]) where
  - demoteConstructorInfo :: proxy x -> ConstructorInfo xs
- class DemoteAssociativity (a :: Associativity) where
  - demoteAssociativity :: proxy a -> Associativity
- class SListI xs => DemoteFieldInfos (fs :: [FieldInfo]) (xs :: [Type]) where
  - demoteFieldInfos :: proxy fs -> NP FieldInfo xs
- class DemoteStrictnessInfos (ss :: [StrictnessInfo]) (xs :: [Type]) where
  - demoteStrictnessInfos :: proxy ss -> NP StrictnessInfo xs
- class DemoteStrictnessInfo (s :: StrictnessInfo) x where
  - demoteStrictnessInfo :: proxy s -> StrictnessInfo x
- class DemoteSourceUnpackedness (a :: SourceUnpackedness) where
  - demoteSourceUnpackedness :: proxy a -> SourceUnpackedness
- class DemoteSourceStrictness (a :: SourceStrictness) where
  - demoteSourceStrictness :: proxy a -> SourceStrictness
- class DemoteDecidedStrictness (a :: DecidedStrictness) where
  - demoteDecidedStrictness :: proxy a -> DecidedStrictness
- class DemoteFieldInfo (x :: FieldInfo) a where
  - demoteFieldInfo :: proxy x -> FieldInfo a
- data Associativity
  - = LeftAssociative
  - | RightAssociative
  - | NotAssociative

# Documentation

data ConstructorInfo Source #

Metadata for a single constructors (to be used promoted).

Since: 0.3.0.0

Constructors

Constructor ConstructorName | Normal constructor
Infix ConstructorName Associativity Fixity | Infix constructor
Record ConstructorName [FieldInfo] | Record constructor

#### Instances

Instances details

DemoteConstructorInfos ('[] :: [ConstructorInfo]) ('[] :: [[Type]]) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteConstructorInfos :: proxy ('[] :: [ConstructorInfo]) -> NP ConstructorInfo ('[] :: [[Type]]) Source #
(DemoteConstructorInfo c xs, DemoteConstructorInfos cs xss) => DemoteConstructorInfos (c ': cs) (xs ': xss) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteConstructorInfos :: proxy (c ': cs) -> NP ConstructorInfo (xs ': xss) Source #

type Fixity = Nat Source #

The fixity of an infix constructor.

data DatatypeInfo Source #

Metadata for a datatype (to be used promoted).

A type of kind ``DatatypeInfo`` contains meta-information about a datatype that is not contained in its code. This information consists primarily of the names of the datatype, its constructors, and possibly its record selectors.

The constructor indicates whether the datatype has been declared using `newtype` or not.

Since: 0.3.0.0

Constructors

ADT ModuleName DatatypeName [ConstructorInfo] [[StrictnessInfo]] | Standard algebraic datatype
Newtype ModuleName DatatypeName ConstructorInfo | Newtype

data FieldInfo Source #

Metadata for a single record field (to be used promoted).

Since: 0.3.0.0

Constructors

FieldInfo FieldName |

#### Instances

Instances details

DemoteFieldInfos ('[] :: [FieldInfo]) ('[] :: [Type]) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteFieldInfos :: proxy ('[] :: [FieldInfo]) -> NP FieldInfo ('[] :: [Type]) Source #
(DemoteFieldInfo f x, DemoteFieldInfos fs xs) => DemoteFieldInfos (f ': fs) (x ': xs) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteFieldInfos :: proxy (f ': fs) -> NP FieldInfo (x ': xs) Source #

type DatatypeName = Symbol Source #

The name of a datatype.

type ModuleName = Symbol Source #

The name of a module.

type ConstructorName = Symbol Source #

The name of a data constructor.

type FieldName = Symbol Source #

The name of a field / record selector.

data StrictnessInfo Source #

Strictness information for a single field (to be used promoted).

Since: 0.4.0.0

Constructors

StrictnessInfo SourceUnpackedness SourceStrictness DecidedStrictness |

#### Instances

Instances details

DemoteStrictnessInfos ('[] :: [StrictnessInfo]) ('[] :: [Type]) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteStrictnessInfos :: proxy ('[] :: [StrictnessInfo]) -> NP StrictnessInfo ('[] :: [Type]) Source #
DemoteStrictnessInfoss ('[] :: [[StrictnessInfo]]) ('[] :: [[Type]]) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteStrictnessInfoss :: proxy ('[] :: [[StrictnessInfo]]) -> NP (NP StrictnessInfo) ('[] :: [[Type]]) Source #
(DemoteStrictnessInfo s x, DemoteStrictnessInfos ss xs) => DemoteStrictnessInfos (s ': ss) (x ': xs) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteStrictnessInfos :: proxy (s ': ss) -> NP StrictnessInfo (x ': xs) Source #
(DemoteStrictnessInfos ss xs, DemoteStrictnessInfoss sss xss) => DemoteStrictnessInfoss (ss ': sss) (xs ': xss) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteStrictnessInfoss :: proxy (ss ': sss) -> NP (NP StrictnessInfo) (xs ': xss) Source #

class DemoteDatatypeInfo (x :: DatatypeInfo) (xss :: [[Type]]) where Source #

Class for computing term-level datatype information from type-level datatype information.

Since: 0.3.0.0

Methods

demoteDatatypeInfo :: proxy x -> DatatypeInfo xss Source #

Given a proxy of some type-level datatype information, return the corresponding term-level information.

Since: 0.3.0.0

#### Instances

Instances details

(KnownSymbol m, KnownSymbol d, DemoteConstructorInfo c '[x]) => DemoteDatatypeInfo ('Newtype m d c) '['[x]] Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteDatatypeInfo :: proxy ('Newtype m d c) -> DatatypeInfo '['[x]] Source #
(KnownSymbol m, KnownSymbol d, DemoteConstructorInfos cs xss, DemoteStrictnessInfoss sss xss) => DemoteDatatypeInfo ('ADT m d cs sss) xss Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteDatatypeInfo :: proxy ('ADT m d cs sss) -> DatatypeInfo xss Source #

class DemoteConstructorInfos (cs :: [ConstructorInfo]) (xss :: [[Type]]) where Source #

Class for computing term-level constructor information from type-level constructor information.

Since: 0.3.0.0

Methods

demoteConstructorInfos :: proxy cs -> NP ConstructorInfo xss Source #

Given a proxy of some type-level constructor information, return the corresponding term-level information as a product.

Since: 0.3.0.0

#### Instances

Instances details

DemoteConstructorInfos ('[] :: [ConstructorInfo]) ('[] :: [[Type]]) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteConstructorInfos :: proxy ('[] :: [ConstructorInfo]) -> NP ConstructorInfo ('[] :: [[Type]]) Source #
(DemoteConstructorInfo c xs, DemoteConstructorInfos cs xss) => DemoteConstructorInfos (c ': cs) (xs ': xss) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteConstructorInfos :: proxy (c ': cs) -> NP ConstructorInfo (xs ': xss) Source #

class DemoteStrictnessInfoss (sss :: [[StrictnessInfo]]) (xss :: [[Type]]) where Source #

Methods

demoteStrictnessInfoss :: proxy sss -> NP (NP StrictnessInfo) xss Source #

#### Instances

Instances details

DemoteStrictnessInfoss ('[] :: [[StrictnessInfo]]) ('[] :: [[Type]]) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteStrictnessInfoss :: proxy ('[] :: [[StrictnessInfo]]) -> NP (NP StrictnessInfo) ('[] :: [[Type]]) Source #
(DemoteStrictnessInfos ss xs, DemoteStrictnessInfoss sss xss) => DemoteStrictnessInfoss (ss ': sss) (xs ': xss) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteStrictnessInfoss :: proxy (ss ': sss) -> NP (NP StrictnessInfo) (xs ': xss) Source #

class DemoteConstructorInfo (x :: ConstructorInfo) (xs :: [Type]) where Source #

Class for computing term-level constructor information from type-level constructor information.

Since: 0.3.0.0

Methods

demoteConstructorInfo :: proxy x -> ConstructorInfo xs Source #

Given a proxy of some type-level constructor information, return the corresponding term-level information.

Since: 0.3.0.0

#### Instances

Instances details

(KnownSymbol s, SListI xs) => DemoteConstructorInfo ('Constructor s) xs Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteConstructorInfo :: proxy ('Constructor s) -> ConstructorInfo xs Source #
(KnownSymbol s, DemoteFieldInfos fs xs) => DemoteConstructorInfo ('Record s fs) xs Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteConstructorInfo :: proxy ('Record s fs) -> ConstructorInfo xs Source #
(KnownSymbol s, DemoteAssociativity a, KnownNat f) => DemoteConstructorInfo ('Infix s a f) '[y, z] Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteConstructorInfo :: proxy ('Infix s a f) -> ConstructorInfo '[y, z] Source #

class DemoteAssociativity (a :: Associativity) where Source #

Class for computing term-level associativity information from type-level associativity information.

Since: 0.3.0.0

Methods

demoteAssociativity :: proxy a -> Associativity Source #

Given a proxy of some type-level associativity information, return the corresponding term-level information.

Since: 0.3.0.0

#### Instances

Instances details

DemoteAssociativity 'LeftAssociative Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteAssociativity :: proxy 'LeftAssociative -> Associativity Source #
DemoteAssociativity 'NotAssociative Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteAssociativity :: proxy 'NotAssociative -> Associativity Source #
DemoteAssociativity 'RightAssociative Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteAssociativity :: proxy 'RightAssociative -> Associativity Source #

class SListI xs => DemoteFieldInfos (fs :: [FieldInfo]) (xs :: [Type]) where Source #

Class for computing term-level field information from type-level field information.

Since: 0.3.0.0

Methods

demoteFieldInfos :: proxy fs -> NP FieldInfo xs Source #

Given a proxy of some type-level field information, return the corresponding term-level information as a product.

Since: 0.3.0.0

#### Instances

Instances details

DemoteFieldInfos ('[] :: [FieldInfo]) ('[] :: [Type]) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteFieldInfos :: proxy ('[] :: [FieldInfo]) -> NP FieldInfo ('[] :: [Type]) Source #
(DemoteFieldInfo f x, DemoteFieldInfos fs xs) => DemoteFieldInfos (f ': fs) (x ': xs) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteFieldInfos :: proxy (f ': fs) -> NP FieldInfo (x ': xs) Source #

class DemoteStrictnessInfos (ss :: [StrictnessInfo]) (xs :: [Type]) where Source #

Methods

demoteStrictnessInfos :: proxy ss -> NP StrictnessInfo xs Source #

#### Instances

Instances details

DemoteStrictnessInfos ('[] :: [StrictnessInfo]) ('[] :: [Type]) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteStrictnessInfos :: proxy ('[] :: [StrictnessInfo]) -> NP StrictnessInfo ('[] :: [Type]) Source #
(DemoteStrictnessInfo s x, DemoteStrictnessInfos ss xs) => DemoteStrictnessInfos (s ': ss) (x ': xs) Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteStrictnessInfos :: proxy (s ': ss) -> NP StrictnessInfo (x ': xs) Source #

class DemoteStrictnessInfo (s :: StrictnessInfo) x where Source #

Methods

demoteStrictnessInfo :: proxy s -> StrictnessInfo x Source #

#### Instances

Instances details

(DemoteSourceUnpackedness su, DemoteSourceStrictness ss, DemoteDecidedStrictness ds) => DemoteStrictnessInfo ('StrictnessInfo su ss ds) x Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteStrictnessInfo :: proxy ('StrictnessInfo su ss ds) -> StrictnessInfo x Source #

class DemoteSourceUnpackedness (a :: SourceUnpackedness) where Source #

Class for computing term-level source unpackedness information from type-level source unpackedness information.

Since: 0.4.0.0

Methods

demoteSourceUnpackedness :: proxy a -> SourceUnpackedness Source #

Given a proxy of some type-level source unpackedness information, return the corresponding term-level information.

Since: 0.4.0.0

#### Instances

Instances details

DemoteSourceUnpackedness 'NoSourceUnpackedness Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteSourceUnpackedness :: proxy 'NoSourceUnpackedness -> SourceUnpackedness Source #
DemoteSourceUnpackedness 'SourceNoUnpack Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteSourceUnpackedness :: proxy 'SourceNoUnpack -> SourceUnpackedness Source #
DemoteSourceUnpackedness 'SourceUnpack Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteSourceUnpackedness :: proxy 'SourceUnpack -> SourceUnpackedness Source #

class DemoteSourceStrictness (a :: SourceStrictness) where Source #

Class for computing term-level source strictness information from type-level source strictness information.

Since: 0.4.0.0

Methods

demoteSourceStrictness :: proxy a -> SourceStrictness Source #

Given a proxy of some type-level source strictness information, return the corresponding term-level information.

Since: 0.4.0.0

#### Instances

Instances details

DemoteSourceStrictness 'NoSourceStrictness Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteSourceStrictness :: proxy 'NoSourceStrictness -> SourceStrictness Source #
DemoteSourceStrictness 'SourceLazy Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteSourceStrictness :: proxy 'SourceLazy -> SourceStrictness Source #
DemoteSourceStrictness 'SourceStrict Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteSourceStrictness :: proxy 'SourceStrict -> SourceStrictness Source #

class DemoteDecidedStrictness (a :: DecidedStrictness) where Source #

Class for computing term-level decided strictness information from type-level decided strictness information.

Since: 0.4.0.0

Methods

demoteDecidedStrictness :: proxy a -> DecidedStrictness Source #

Given a proxy of some type-level source strictness information, return the corresponding term-level information.

Since: 0.4.0.0

#### Instances

Instances details

DemoteDecidedStrictness 'DecidedLazy Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteDecidedStrictness :: proxy 'DecidedLazy -> DecidedStrictness Source #
DemoteDecidedStrictness 'DecidedStrict Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteDecidedStrictness :: proxy 'DecidedStrict -> DecidedStrictness Source #
DemoteDecidedStrictness 'DecidedUnpack Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteDecidedStrictness :: proxy 'DecidedUnpack -> DecidedStrictness Source #

class DemoteFieldInfo (x :: FieldInfo) a where Source #

Class for computing term-level field information from type-level field information.

Since: 0.3.0.0

Methods

demoteFieldInfo :: proxy x -> FieldInfo a Source #

Given a proxy of some type-level field information, return the corresponding term-level information.

Since: 0.3.0.0

#### Instances

Instances details

KnownSymbol s => DemoteFieldInfo ('FieldInfo s) a Source # |
Instance details Defined in Generics.SOP.Type.Metadata Methods demoteFieldInfo :: proxy ('FieldInfo s) -> FieldInfo a Source #

# re-exports

data Associativity Source #

Datatype to represent the associativity of a constructor

Constructors

LeftAssociative |
RightAssociative |
NotAssociative |

#### Instances

Instances details

Generic Associativity Source # |

Instance details

Defined in Generics.SOP.Instances

Associated Types

type Code Associativity |
Instance details Defined in Generics.SOP.Instances type Code Associativity = '['[] :: [Type], '[] :: [Type], '[] :: [Type]]

Methods

from :: Associativity -> Rep Associativity Source #

to :: Rep Associativity -> Associativity Source #

HasDatatypeInfo Associativity Source # |

Instance details

Defined in Generics.SOP.Instances

Associated Types

type DatatypeInfoOf Associativity |
Instance details Defined in Generics.SOP.Instances type DatatypeInfoOf Associativity = 'ADT "GHC.Internal.Generics" "Associativity" '['Constructor "LeftAssociative", 'Constructor "RightAssociative", 'Constructor "NotAssociative"] '['[] :: [StrictnessInfo], '[] :: [StrictnessInfo], '[] :: [StrictnessInfo]]

Methods

datatypeInfo :: proxy Associativity -> DatatypeInfo (Code Associativity) Source #

Data Associativity | Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Associativity -> c Associativity Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Associativity Source #

toConstr :: Associativity -> Constr Source #

dataTypeOf :: Associativity -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Associativity) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Associativity) Source #

gmapT :: (forall b. Data b => b -> b) -> Associativity -> Associativity Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Associativity -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Associativity -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Associativity -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Associativity -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Associativity -> m Associativity Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Associativity -> m Associativity Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Associativity -> m Associativity Source #

Bounded Associativity | Since: base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods minBound :: Associativity Source # maxBound :: Associativity Source #
Enum Associativity | Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Methods

succ :: Associativity -> Associativity Source #

pred :: Associativity -> Associativity Source #

toEnum :: Int -> Associativity Source #

fromEnum :: Associativity -> Int Source #

enumFrom :: Associativity -> [Associativity] Source #

enumFromThen :: Associativity -> Associativity -> [Associativity] Source #

enumFromTo :: Associativity -> Associativity -> [Associativity] Source #

enumFromThenTo :: Associativity -> Associativity -> Associativity -> [Associativity] Source #

Generic Associativity |

Instance details

Defined in GHC.Internal.Generics

Associated Types

type Rep Associativity | Since: base-4.7.0.0
Instance details Defined in GHC.Internal.Generics type Rep Associativity = D1 ('MetaData "Associativity" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "LeftAssociative" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RightAssociative" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotAssociative" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: Associativity -> Rep Associativity x Source #

to :: Rep Associativity x -> Associativity Source #

SingKind Associativity | Since: base-4.0.0.0

Instance details

Defined in GHC.Internal.Generics

Associated Types

type DemoteRep Associativity |
Instance details Defined in GHC.Internal.Generics type DemoteRep Associativity = Associativity

Methods

fromSing :: forall (a :: Associativity). Sing a -> DemoteRep Associativity

Ix Associativity | Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Generics

Methods

range :: (Associativity, Associativity) -> [Associativity] Source #

index :: (Associativity, Associativity) -> Associativity -> Int Source #

unsafeIndex :: (Associativity, Associativity) -> Associativity -> Int Source #

inRange :: (Associativity, Associativity) -> Associativity -> Bool Source #

rangeSize :: (Associativity, Associativity) -> Int Source #

unsafeRangeSize :: (Associativity, Associativity) -> Int Source #

Read Associativity | Since: base-4.6.0.0
Instance details Defined in GHC.Internal.Generics Methods readsPrec :: Int -> ReadS Associativity Source # readList :: ReadS [Associativity] Source # readPrec :: ReadPrec Associativity Source # readListPrec :: ReadPrec [Associativity] Source #
Show Associativity | Since: base-4.6.0.0
Instance details Defined in GHC.Internal.Generics Methods showsPrec :: Int -> Associativity -> ShowS Source # show :: Associativity -> String Source # showList :: [Associativity] -> ShowS Source #
Eq Associativity | Since: base-4.6.0.0
Instance details Defined in GHC.Internal.Generics Methods (==) :: Associativity -> Associativity -> Bool Source # (/=) :: Associativity -> Associativity -> Bool Source #
Ord Associativity | Since: base-4.6.0.0

Instance details

Defined in GHC.Internal.Generics

Methods

compare :: Associativity -> Associativity -> Ordering Source #

(<) :: Associativity -> Associativity -> Bool Source #

(<=) :: Associativity -> Associativity -> Bool Source #

(>) :: Associativity -> Associativity -> Bool Source #

(>=) :: Associativity -> Associativity -> Bool Source #

max :: Associativity -> Associativity -> Associativity Source #

min :: Associativity -> Associativity -> Associativity Source #

SingI 'LeftAssociative | Since: base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods sing :: Sing 'LeftAssociative
SingI 'NotAssociative | Since: base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods sing :: Sing 'NotAssociative
SingI 'RightAssociative | Since: base-4.9.0.0
Instance details Defined in GHC.Internal.Generics Methods sing :: Sing 'RightAssociative
type Code Associativity Source # |
Instance details Defined in Generics.SOP.Instances type Code Associativity = '['[] :: [Type], '[] :: [Type], '[] :: [Type]]
type DatatypeInfoOf Associativity Source # |
Instance details Defined in Generics.SOP.Instances type DatatypeInfoOf Associativity = 'ADT "GHC.Internal.Generics" "Associativity" '['Constructor "LeftAssociative", 'Constructor "RightAssociative", 'Constructor "NotAssociative"] '['[] :: [StrictnessInfo], '[] :: [StrictnessInfo], '[] :: [StrictnessInfo]]
type DemoteRep Associativity |
Instance details Defined in GHC.Internal.Generics type DemoteRep Associativity = Associativity
type Rep Associativity | Since: base-4.7.0.0
Instance details Defined in GHC.Internal.Generics type Rep Associativity = D1 ('MetaData "Associativity" "GHC.Internal.Generics" "ghc-internal" 'False) (C1 ('MetaCons "LeftAssociative" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RightAssociative" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotAssociative" 'PrefixI 'False) (U1 :: Type -> Type)))
data Sing (a :: Associativity) |

Instance details

Defined in GHC.Internal.Generics

data Sing (a :: Associativity) where

- SLeftAssociative :: Sing 'LeftAssociative
- SRightAssociative :: Sing 'RightAssociative
- SNotAssociative :: Sing 'NotAssociative