deriving-compat-0.5.9: Backports of GHC deriving extensions

Copyright(C) 2015-2017 Ryan Scott
LicenseBSD-style (see the file LICENSE)
MaintainerRyan Scott
PortabilityTemplate Haskell
Safe HaskellNone
LanguageHaskell2010

Data.Bounded.Deriving.Internal

Contents

Description

Exports functions to mechanically derive Bounded instances.

Note: this is an internal module, and as such, the API presented here is not guaranteed to be stable, even between minor releases of this library.

Synopsis

Bounded

deriveBounded :: Name -> Q [Dec] Source #

Generates a Bounded instance declaration for the given data type or data family instance.

makeMinBound :: Name -> Q Exp Source #

Generates a lambda expression which behaves like minBound (without requiring a Bounded instance).

makeMaxBound :: Name -> Q Exp Source #

Generates a lambda expression which behaves like maxBound (without requiring a Bounded instance).