trivial-constraint

Constraints that any type, resp. no type fulfills

https://github.com/leftaroundabout/trivial-constraint

Version on this page:0.5.1.0
LTS Haskell 22.17:0.7.0.0
Stackage Nightly 2024-04-17:0.7.0.0
Latest on Hackage:0.7.0.0

See all snapshots trivial-constraint appears in

GPL-3.0-only licensed by Justus Sagemüller
Maintained by [email protected]
This version can be pinned in stack with:trivial-constraint-0.5.1.0@sha256:80f052aa9527ed23fe4bf5066535d5a393a1573b9c193a4cddd2c51ab12b310f,1767

Module documentation for 0.5.1.0

Depends on 1 package(full list with versions):
Used by 1 package in nightly-2019-07-12(full list with versions):

Since GHC 7.4, constraints are first-class: we have the constraint kind, and thus type-classes have a kind such as * -> Constraint.

These can be used as parameters to data types. They also can be combined quite nicely,

type NewConstraint a = (Constraint1 a, Constraint2 a)

however you always need to start with a plain old type class when building constraints.

This library provides a type class that is not really a constraint at all, so you can "start from zero" with building up a custom constraint. Also its opposite (a constraint that no type can ever fulfill).