one-liner-instances-0.1.2.1: Generics-based implementations for common typeclasses

Data.Bounded.OneLiner

Description

Derived methods for Bounded, using Generics.OneLiner and GHC.Generics.

Can be used for any types (deriving Generic) where every field is an instance of Bounded.

Also includes a newtype wrapper that imbues any such data type with an instant Bounded instance, which can one day be used with DerivingVia syntax to derive instances automatically.

Synopsis

# Newtype wrapper

newtype GBounded a Source #

If a is a data type whose fields are all instances of Bounded, then GBounded a has a Bounded instance.

Will one day be able to be used with DerivingVia syntax, to derive instances automatically.

Constructors

 GBounded FieldsgetGBounded :: a

Instances

minBound implemented by using minBound for all of the components for the first constructor
maxBound implemented by using maxBound for all of the components for the last constructor