generic-deriving-1.14.2: Generic programming library for generalised deriving.
Copyright(c) 2012 University of Oxford
LicenseBSD3
Maintainergenerics@haskell.org
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell2010

Generics.Deriving.ConNames

Description

 
Synopsis

Functionality for retrieving the names of the possible contructors

class ConNames f where Source #

Methods

gconNames :: f a -> [String] Source #

gconNameOf :: f a -> String Source #

Instances

Instances details
Constructor c => ConNames (C1 c f :: k -> Type) Source # 
Instance details

Defined in Generics.Deriving.ConNames

Methods

gconNames :: forall (a :: k0). C1 c f a -> [String] Source #

gconNameOf :: forall (a :: k0). C1 c f a -> String Source #

ConNames f => ConNames (D1 c f :: k -> Type) Source # 
Instance details

Defined in Generics.Deriving.ConNames

Methods

gconNames :: forall (a :: k0). D1 c f a -> [String] Source #

gconNameOf :: forall (a :: k0). D1 c f a -> String Source #

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

Defined in Generics.Deriving.ConNames

Methods

gconNames :: forall (a :: k0). (f :+: g) a -> [String] Source #

gconNameOf :: forall (a :: k0). (f :+: g) a -> String Source #

conNames :: (Generic a, ConNames (Rep a)) => a -> [String] Source #

Return the name of all the constructors of the type of the given term.

conNameOf :: (ConNames (Rep a), Generic a) => a -> String Source #

Return the name of the constructor of the given term