regular-0.3.4.4: Generic programming library for regular datatypes.

Copyright(c) 2009 Universiteit Utrecht
LicenseBSD3
Maintainergenerics@haskell.org
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell98

Generics.Regular.Functions.ConNames

Contents

Description

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

Synopsis

Functionality for retrieving the names of all the possible contructors

class ConNames f where Source

Methods

hconNames :: f a -> [String] Source

Instances

ConNames U 
ConNames I 
ConNames (K a) 
ConNames (S s f) 
(ConNames f, Constructor c) => ConNames (C c f) 
(ConNames f, ConNames g) => ConNames ((:*:) f g) 
(ConNames f, ConNames g) => ConNames ((:+:) f g) 

conNames :: (Regular a, ConNames (PF a)) => a -> [String] Source

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