Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- newtype InstantiatedAt (c ∷ Type → Constraint) a = InstantiatedAt a
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
.
InstantiatedAt a infix 0 |