base-deriving-via-0.1.0.1: A general hook newtype for use with deriving via
Safe Haskell None
Language Haskell2010

Data.DerivingVia

Description

Newtype wrappers for us in deriving via clauses that " should " have been defined in base and other packages we depend on but do not control

We expected variations of these to eventually be defined upstream, but we'd like to use these concepts before that happens.

Synopsis

Documentation

newtype InstantiatedAt (c :: Type -> Constraint ) a infix 0 Source #

A hook that represents a deriving via scheme via some class constraint

The most notable example is Generic .

data T = ...
  deriving (Monoid, Semigroup)
       via InstantiatedAt Generic T

This type's parameterization is useful because many such schemes are similarly identified by a single type class, such as Ord .

Constructors

InstantiatedAt a infix 0

Instances

Instances details
Eq a => Eq ( InstantiatedAt c a) Source #
Instance details

Defined in Data.DerivingVia

Ord a => Ord ( InstantiatedAt c a) Source #
Instance details

Defined in Data.DerivingVia

Show a => Show ( InstantiatedAt c a) Source #
Instance details

Defined in Data.DerivingVia

( Generic a, GSemigroup ( Rep a)) => Semigroup ( InstantiatedAt Generic a) Source #
Instance details

Defined in Data.DerivingVia

( Generic a, GSemigroup ( Rep a), GMonoid ( Rep a)) => Monoid ( InstantiatedAt Generic a) Source #
Instance details

Defined in Data.DerivingVia