generic-deriving-1.12.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

Contents

Description

Summary: Return the name of all the constructors of a type.

Synopsis

Functionality for retrieving the names of the possible contructors

class ConNames f where #

Minimal complete definition

gconNames, gconNameOf

Methods

gconNames :: f a -> [String] #

gconNameOf :: f a -> String #

Instances

Constructor Meta c => ConNames k (C1 k c f) # 

Methods

gconNames :: f a -> [String] #

gconNameOf :: f a -> String #

ConNames k f => ConNames k (D1 k c f) # 

Methods

gconNames :: f a -> [String] #

gconNameOf :: f a -> String #

(ConNames k f, ConNames k g) => ConNames k ((:+:) k f g) # 

Methods

gconNames :: f a -> [String] #

gconNameOf :: f a -> String #

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

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

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

Return the name of the constructor of the given term