Data.Generics.Builders

syb-0.3.3: Scrap Your Boilerplate

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

Data.Generics.Builders

Description

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

Synopsis

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

# Documentation

empty :: forall a. Data a => a

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

constrs :: forall a. Data a => [a]

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