stock-profunctors: Derive Profunctor via the stock plugin
The stock plugin
provides a newtype
Stock
for deriving and synthesising instances at compile
time. stock-profunctors extends it to support
Profunctor.
{-# options_ghc -fplugin Stock #-}
{-# language DerivingVia #-}
import Data.Kind
import Stock
import Stock.Profunctor
type Foo :: Type -> Type -> Type
newtype Foo i o = Foo ((((o -> i) -> o) -> i)
-> (((i -> o) -> i) -> o))
deriving Functor via Stock1 (Foo i)
deriving Profunctor via Stock2 Foostock-profunctors provides an instance for DeriveStock2
Profunctor that signals to the plugin how to derive
Profunctor.
stock companion packages include:
stock-aeson:ToJSON,ToJSON1,ToJSON2;FromJSON,FromJSON1,FromJSON2stock-quickcheck:Arbitrary,Arbitrary1,Arbitrary2;CoArbitrarystock-profunctors:Profunctor
Downloads
- stock-profunctors-0.1.0.0.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0 |
|---|---|
| Dependencies | base (>=4.18 && <5), ghc (>=9.6 && <9.16), profunctors (>=5.6 && <6), stock (>=0.1 && <0.2) [details] |
| Tested with | ghc ==9.8.1, ghc ==9.10.3, ghc ==9.12.4, ghc ==9.14.1 |
| License | BSD-3-Clause |
| Author | Baldur Blöndal |
| Maintainer | baldur.blondal@iohk.io |
| Uploaded | by BaldurBlondal at 2026-06-23T15:43:50Z |
| Revised | Revision 11 made by BaldurBlondal at 2026-06-24T01:42:50Z |
| Category | Type System |
| Source repo | head: git clone https://github.com/Icelandjack/stock.git(profunctors) |
| Distributions | |
| Downloads | 2 total (2 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2026-06-23 [all 1 reports] |