constraint-tuples: Partially applicable constraint tuples
This library provides classes and type aliases that emulate the behavior of GHC's constraint tuple syntax. Unlike GHC's built-in constraint tuples, the types in this library can be partially applied.
This library exposes four different modules that provide essentially the same API with slight differences in their implementation:
Data.Tuple.Constraint: A
CTupleNclass compiles to a dictionary data type withNfields.Data.Tuple.Constraint.ClassNewtype: A
CTupleNclass compiles to a newtype around the corresponding built-in constraint tuple type withNarguments.Data.Tuple.Constraint.TypeFamily: ACTupleNtype alias is a constraint tuple type constructor withNarguments obtained by way of a type family. This will compile to a built-in constraint tuple, but casted with a type family axiom.Data.Tuple.Constraint.TypeSynonym: ACTupleNtype alias is a constraint tuple type constructor withNarguments obtained by way of a type synonym. This will compile directly to a built-in constraint tuple, but because this requires use of GHC features only present on 8.0 or later, this module does not export anything on earlier versions of GHC.
[Skip to Readme]
Modules
[Index] [Quick Jump]
Downloads
- constraint-tuples-0.1.2.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1, 0.1.1, 0.1.2, 0.2 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4.6 && <5) [details] |
| Tested with | ghc ==7.6.3, ghc ==7.8.4, ghc ==7.10.3, ghc ==8.0.2, ghc ==8.2.2, ghc ==8.4.4, ghc ==8.6.5, ghc ==8.8.1 |
| License | BSD-3-Clause |
| Copyright | (C) 2018-2019 Ryan Scott |
| Author | Ryan Scott |
| Maintainer | ryan.gl.scott@gmail.com |
| Uploaded | by ryanglscott at 2019-11-24T14:40:41Z |
| Category | Data |
| Home page | https://github.com/RyanGlScott/constraint-tuples |
| Bug tracker | https://github.com/RyanGlScott/constraint-tuples/issues |
| Source repo | head: git clone https://github.com/RyanGlScott/constraint-tuples |
| Distributions | LTSHaskell:0.2, Stackage:0.2 |
| Downloads | 1893 total (26 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2019-11-24 [all 1 reports] |