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

Portability | non-portable
Stability | experimental
Maintainer | generics@haskell.org
Safe Haskell | Safe-Inferred

Generics.Deriving.ConNames

Contents

- Functionality for retrieving the names of all the possible contructors

Description

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

Synopsis

- class ConNames f where
  - gconNames :: f a -> [String]
- conNames :: (Generic a, ConNames (Rep a)) => a -> [String]

# Functionality for retrieving the names of all the possible contructors

class ConNames f where Source

Methods

gconNames :: f a -> [String]Source

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

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