BSD-2-Clause licensed by Edward A. Kmett
Maintained by Edward A. Kmett
This version can be pinned in stack with:constraints-0.9@sha256:ff87b46f90e72afb5718160a81e743a782c2a8fde2b926fa74fcb212458e5d6f,1688

constraints

Hackage Build Status

This package provides data types and classes for manipulating the ‘ConstraintKinds’ exposed by GHC in 7.4.

Contact Information

Contributions and bug reports are welcome!

Please feel free to contact me through github or on the #haskell IRC channel on irc.freenode.net.

-Edward Kmett

Changes

0.9

  • Changes to Data.Constraint:
    • Add strengthen1 and strengthen2
  • Changes to Data.Constraint.Deferrable:
    • Add a Deferrable () instance
    • The Deferrable (a ~ b) instance now shows the TypeReps of a and b when a type mismatch error is thrown
    • Add defer_ and deferEither_, counterparts to defer and deferEither which do not require proxy arguments
    • Enable PolyKinds. This allows the Deferrable (a ~ b instance to be polykinded on all supported versions of GHC except 7.10, where the kinds must be * due to an old GHC bug
    • Introduce a heterogeneous equality type (:~~:), and use it to define a Deferrable (a ~~ b) instance on GHC 8.0 or later
  • Changes to Data.Constraint.Forall:
    • Implement ForallF and ForallT in terms of Forall
    • Add ForallV and InstV (supporting a variable number of parameters)
    • Add a forall combinator
  • Introduce Data.Constraint.Nat and Data.Constraint.Symbol, which contain utilities for working with KnownNat and KnownSymbol constraints, respectively. These modules are only available on GHC 8.0 or later.

0.8

  • GHC 8 compatibility
  • transformers 0.5 compatibility
  • binary 0.8 compatibility
  • Dropped support for GHC 7.6 in favor of a nicer Bottom representation.

0.7

  • Found a nicer encoding of the initial object in the category of constraints using a nullary constraint.

0.6.1

  • Remove the need for closed type families from the new Forall.

0.6

  • Completely redesigned Data.Constraint.Forall. The old design is unsound and can be abused to define unsafeCoerce! The new design requires closed type families, so this module now requires GHC 7.8+

0.5.1

  • Added Data.Constraint.Deferrable.

0.5

  • Added Data.Constraint.Lifting.

0.4.1.3

  • Acknowledge we actually need at least base 4.5

0.4.1.2

  • Restore support for building on older GHCs

0.4.1.1

  • Minor documentation fixes.

0.4.1

  • Added mapDict and unmapDict.
  • Added a lot of documentation.

0.4

  • Typeable and Data. The Data instance for (:-) is a conservative approximation that avoids having to turn (:-) into a cartesian closed category. If it becomes a pain point for users, I know how to do that, and have done so in other libraries – see hask, but I’m hesitant to bring such heavy machinery to bear and it isn’t clear how to do it in a way that is compatible with those other libraries.

0.3.5

  • Explicit role annotations

0.3.4.1

  • Fixed build failures.
  • Fixed an unused import warning on older GHCs.

0.3.4

  • Added bottom