syb-0.7.2.4: Scrap Your Boilerplate

Copyright | (c) 2008 Universiteit Utrecht
License | BSD-style
Maintainer | generics@haskell.org
Stability | experimental
Portability | non-portable
Safe Haskell | Safe-Inferred
Language | Haskell98

Data.Generics.Builders

Description

This module provides generic builder functions. These functions construct values of a given type.

Synopsis

- empty :: Data a => a
- constrs :: Data a => [a]

# Documentation

empty :: Data a => a Source #

Construct the empty value for a datatype. For algebraic datatypes, the leftmost constructor is chosen.

Since: 0.2

constrs :: Data a => [a] Source #

Return a list of values of a datatype. Each value is one of the possible constructors of the datatype, populated with `empty` values.

Since: 0.2