generic-deriving-1.12.2: Generic programming library for generalised deriving.

Portabilitynon-portable
Stabilityexperimental
Maintainergenerics@haskell.org
Safe HaskellSafe

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

Methods

gconNames :: f a -> [String]

gconNameOf :: f a -> String

Instances

(ConNames * f, ConNames * g) => ConNames * (:+: f g) 
ConNames * f => ConNames * (D1 c f) 
Constructor c => ConNames * (C1 c f) 

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