| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Stock.Type
Description
Newtype wrappers that drive the Stock plugin. Writing
deriving C via Stock T (or via Stock1 F for a class over a type
constructor) asks the plugin to synthesize the instance from T's
structure — no Generic, no hand-written instances.
Documentation
Wrap a type a so that deriving C via Stock a synthesizes C a.
newtype Stock1 (f :: k -> Type) (a :: k) Source #
Wrap a type constructor f so that deriving C via Stock1 f synthesizes
a C f instance (for classes over type constructors, e.g. Functor).
Poly-kinded in the index (f :: k -> Type) so it works for classes over
non-Type indices too (e.g. TestEquality) — maximally polymorphic.