BSD-3-Clause licensed by Ryan Scott
Maintained by [email protected]
This version can be pinned in stack with:constraint-tuples-0.2@sha256:21b5c43b70920afdc2a6cba902a2a86251ede4bcf344598f10d70121448d936c,3525
Depends on 2 packages(full list with versions):

constraint-tuples

Hackage Hackage Dependencies Haskell Programming Language BSD3 License Build Status

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 CTupleN class compiles to a dictionary data type with N fields. (When building with GHC 9.10 or later, this will simply re-export the constraint tuples offered by GHC.Classes.)
  • Data.Tuple.Constraint.ClassNewtype: A CTupleN class compiles to a newtype around the corresponding built-in constraint tuple type with N arguments.
  • Data.Tuple.Constraint.TypeFamily: A CTupleN type alias is a constraint tuple type constructor with N arguments 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: A CTupleN type alias is a constraint tuple type constructor with N arguments obtained by way of a type synonym. This will compile directly to a built-in constraint tuple.

Changes

0.2 [2024.05.03]

  • Drop support for GHC 7.10 and earlier.
  • When building with GHC 9.10 or later, Data.Tuple.Constraint will simply re-export constraint tuple definitions found in GHC.Classes. If building with an older version of GHC, Data.Tuple.Constraint will backport the definitions from `GHC.Classes.
  • Provide nullary constraint tuples named CUnit and unary constraint tuples named CSolo for consistency with GHC.Classes in GHC 9.10+.
  • Provide constraint tuples up to size 64 when building with GHC 9.2 or later. (Earlier versions of GHC impose a maximum tuple size of 62.)

0.1.2 [2019.11.24]

  • Introduce the Data.Tuple.Constraint.{TypeFamily,TypeSynonym} modules that provide ways of directly accessing constraint tuple type constructors through various means of type-level trickery.
  • Make Data.Tuple.Constraint.ClassNewtype.CTuple0 actually be a class newtype.

0.1.1 [2019.10.21]

  • Split generator-script out of the main .cabal file, as it is only used for development purposes.
  • Minor Haddock fixes.

0.1 [2019.10.14]

  • First version.