| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Stock.Bounded
Description
Bounded via the SOP-EDSL. minBound/maxBound are values, so this is
pure injectSOP (no matchSOP): an enumeration injects its first/last
(nullary) constructor; a single-constructor product injects that constructor
with each field set to its own minBound/maxBound (pureFields +
field). A clean demonstration that the SDK alone expresses a real
synthesizer — this module needs nothing from the plugin substrate.
Synopsis
Documentation
boundedDeriver :: Deriver Source #
The caller guarantees the type is an enumeration or a single constructor
(GHC's Bounded deriving has the same restriction).