constraints-0.13.4: Constraint manipulation
Copyright (C) 2011-2015 Edward Kmett
License BSD-style (see the file LICENSE)
Maintainer Edward Kmett <ekmett@gmail.com>
Stability experimental
Portability non-portable
Safe Haskell Trustworthy
Language Haskell2010

Data.Constraint

Description

ConstraintKinds made type classes into types of a new kind, Constraint .

Eq :: * -> Constraint
Ord :: * -> Constraint
Monad :: (* -> *) -> Constraint

The need for this extension was first publicized in the paper

Scrap your boilerplate with class: extensible generic functions

by Ralf Lämmel and Simon Peyton Jones in 2005, which shoehorned all the things they needed into a custom Sat typeclass.

With ConstraintKinds we can put into code a lot of tools for manipulating these new types without such awkward workarounds.

Synopsis

The Kind of Constraints

data Constraint Source #

The kind of constraints, like Show a

Dictionary

data Dict :: Constraint -> * where Source #

Values of type Dict p capture a dictionary for a constraint of type p .

e.g.

Dict :: Dict (Eq Int)

captures a dictionary that proves we have an:

instance Eq Int

Pattern matching on the Dict constructor will bring this instance into scope.

Constructors

Dict :: a => Dict a

Instances

Instances details
a :=> ( Monoid ( Dict a)) Source #
Instance details

Defined in Data.Constraint

a :=> ( Read ( Dict a)) Source #
Instance details

Defined in Data.Constraint

a :=> ( Bounded ( Dict a)) Source #
Instance details

Defined in Data.Constraint

a :=> ( Enum ( Dict a)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Eq ( Dict a)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Ord ( Dict a)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Show ( Dict a)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Semigroup ( Dict a)) Source #
Instance details

Defined in Data.Constraint

HasDict a ( Dict a) Source #
Instance details

Defined in Data.Constraint

a => Bounded ( Dict a) Source #
Instance details

Defined in Data.Constraint

a => Enum ( Dict a) Source #
Instance details

Defined in Data.Constraint

Eq ( Dict a) Source #
Instance details

Defined in Data.Constraint

( Typeable p, p) => Data ( Dict p) Source #
Instance details

Defined in Data.Constraint

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Dict p -> c ( Dict p) Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ( Dict p) Source #

toConstr :: Dict p -> Constr Source #

dataTypeOf :: Dict p -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ( Dict p)) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ( Dict p)) Source #

gmapT :: ( forall b. Data b => b -> b) -> Dict p -> Dict p Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Dict p -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Dict p -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Dict p -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Dict p -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Dict p -> m ( Dict p) Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Dict p -> m ( Dict p) Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Dict p -> m ( Dict p) Source #

Ord ( Dict a) Source #
Instance details

Defined in Data.Constraint

a => Read ( Dict a) Source #
Instance details

Defined in Data.Constraint

Show ( Dict a) Source #
Instance details

Defined in Data.Constraint

Semigroup ( Dict a) Source #
Instance details

Defined in Data.Constraint

a => Monoid ( Dict a) Source #
Instance details

Defined in Data.Constraint

NFData ( Dict c) Source #
Instance details

Defined in Data.Constraint

Methods

rnf :: Dict c -> () Source #

class HasDict c e | e -> c where Source #

Witnesses that a value of type e contains evidence of the constraint c .

Mainly intended to allow ( \\ ) to be overloaded, since it's a useful operator.

withDict :: HasDict c e => e -> (c => r) -> r Source #

From a Dict , takes a value in an environment where the instance witnessed by the Dict is in scope, and evaluates it.

Essentially a deconstruction of a Dict into its continuation-style form.

Can also be used to deconstruct an entailment, a :- b , using a context a .

withDict :: Dict c -> (c => r) -> r
withDict :: a => (a :- c) -> (c => r) -> r

(\\) :: HasDict c e => (c => r) -> e -> r infixl 1 Source #

Operator version of withDict , with the arguments flipped

Entailment

newtype a :- b infixr 9 Source #

This is the type of entailment.

a :- b is read as a "entails" b .

With this we can actually build a category for Constraint resolution.

e.g.

Because Eq a is a superclass of Ord a , we can show that Ord a entails Eq a .

Because instance Ord a => Ord [a] exists, we can show that Ord a entails Ord [a] as well.

This relationship is captured in the :- entailment type here.

Since p :- p and entailment composes, :- forms the arrows of a Category of constraints. However, Category only became sufficiently general to support this instance in GHC 7.8, so prior to 7.8 this instance is unavailable.

But due to the coherence of instance resolution in Haskell, this Category has some very interesting properties. Notably, in the absence of IncoherentInstances , this category is "thin", which is to say that between any two objects (constraints) there is at most one distinguishable arrow.

This means that for instance, even though there are two ways to derive Ord a :- Eq [a] , the answers from these two paths _must_ by construction be equal. This is a property that Haskell offers that is pretty much unique in the space of languages with things they call "type classes".

What are the two ways?

Well, we can go from Ord a :- Eq a via the superclass relationship, and then from Eq a :- Eq [a] via the instance, or we can go from Ord a :- Ord [a] via the instance then from Ord [a] :- Eq [a] through the superclass relationship and this diagram by definition must "commute".

Diagrammatically,

                   Ord a
               ins /     \ cls
                  v       v
            Ord [a]     Eq a
               cls \     / ins
                    v   v
                   Eq [a]

This safety net ensures that pretty much anything you can write with this library is sensible and can't break any assumptions on the behalf of library authors.

Constructors

Sub (a => Dict b)

Instances

Instances details
Category (:-) Source #

Possible since GHC 7.8, when Category was made polykinded.

Instance details

Defined in Data.Constraint

Methods

id :: forall (a :: k). a :- a Source #

(.) :: forall (b :: k) (c :: k) (a :: k). (b :- c) -> (a :- b) -> a :- c Source #

() :=> ( Eq (a :- b)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Ord (a :- b)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Show (a :- b)) Source #
Instance details

Defined in Data.Constraint

a => HasDict b (a :- b) Source #
Instance details

Defined in Data.Constraint

Eq (a :- b) Source #

Assumes IncoherentInstances doesn't exist.

Instance details

Defined in Data.Constraint

( Typeable p, Typeable q, p, q) => Data (p :- q) Source #
Instance details

Defined in Data.Constraint

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> (p :- q) -> c (p :- q) Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c (p :- q) Source #

toConstr :: (p :- q) -> Constr Source #

dataTypeOf :: (p :- q) -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c (p :- q)) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c (p :- q)) Source #

gmapT :: ( forall b. Data b => b -> b) -> (p :- q) -> p :- q Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> (p :- q) -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> (p :- q) -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> (p :- q) -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> (p :- q) -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> (p :- q) -> m (p :- q) Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> (p :- q) -> m (p :- q) Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> (p :- q) -> m (p :- q) Source #

Ord (a :- b) Source #

Assumes IncoherentInstances doesn't exist.

Instance details

Defined in Data.Constraint

Show (a :- b) Source #
Instance details

Defined in Data.Constraint

a => NFData (a :- b) Source #
Instance details

Defined in Data.Constraint

Methods

rnf :: (a :- b) -> () Source #

type (⊢) = (:-) infixr 9 Source #

Type entailment, as written with a single character.

weaken1 :: (a, b) :- a Source #

Weakening a constraint product

The category of constraints is Cartesian. We can forget information.

weaken2 :: (a, b) :- b Source #

Weakening a constraint product

The category of constraints is Cartesian. We can forget information.

contract :: a :- (a, a) Source #

Contracting a constraint / diagonal morphism

The category of constraints is Cartesian. We can reuse information.

(&&&) :: (a :- b) -> (a :- c) -> a :- (b, c) Source #

Constraint product

trans weaken1 (f &&& g) = f
trans weaken2 (f &&& g) = g

(***) :: (a :- b) -> (c :- d) -> (a, c) :- (b, d) Source #

due to the hack for the kind of (,) in the current version of GHC we can't actually make instances for (,) :: Constraint -> Constraint -> Constraint , but (,) is a bifunctor on the category of constraints. This lets us map over both sides.

trans :: (b :- c) -> (a :- b) -> a :- c Source #

Transitivity of entailment

If we view ( :- ) as a Constraint-indexed category, then this is ( . )

refl :: a :- a Source #

Reflexivity of entailment

If we view ( :- ) as a Constraint-indexed category, then this is id

implied :: forall a b. (a => b) => a :- b Source #

Convert a quantified constraint into an entailment.

Only available on GHC 8.6 or later.

class Any => Bottom where Source #

Any inhabits every kind, including Constraint but is uninhabited, making it impossible to define an instance.

Methods

no :: a Source #

top :: a :- () Source #

Every constraint implies truth

These are the terminal arrows of the category, and () is the terminal object.

Given any constraint there is a unique entailment of the () constraint from that constraint.

bottom :: Bottom :- a Source #

This demonstrates the law of classical logic "ex falso quodlibet"

Dict is fully faithful

mapDict :: (a :- b) -> Dict a -> Dict b Source #

Apply an entailment to a dictionary.

From a category theoretic perspective Dict is a functor that maps from the category of constraints (with arrows in :- ) to the category Hask of Haskell data types.

unmapDict :: ( Dict a -> Dict b) -> a :- b Source #

This functor is fully faithful, which is to say that given any function you can write Dict a -> Dict b there also exists an entailment a :- b in the category of constraints that you can build.

Reflection

class Class b h | h -> b where Source #

Reify the relationship between a class and its superclass constraints as a class

Given a definition such as

class Foo a => Bar a

you can capture the relationship between 'Bar a' and its superclass 'Foo a' with

instance Class (Foo a) (Bar a) where cls = Sub Dict

Now the user can use 'cls :: Bar a :- Foo a'

Instances

Instances details
Class () () Source #
Instance details

Defined in Data.Constraint

Methods

cls :: () :- () Source #

Class () ( Bounded a) Source #
Instance details

Defined in Data.Constraint

Class () ( Enum a) Source #
Instance details

Defined in Data.Constraint

Class () ( Eq a) Source #
Instance details

Defined in Data.Constraint

Class () ( Functor f) Source #
Instance details

Defined in Data.Constraint

Class () ( Num a) Source #
Instance details

Defined in Data.Constraint

Class () ( Read a) Source #
Instance details

Defined in Data.Constraint

Class () ( Show a) Source #
Instance details

Defined in Data.Constraint

Class () ( Semigroup a) Source #
Instance details

Defined in Data.Constraint

Class b a => () :=> ( Class b a) Source #
Instance details

Defined in Data.Constraint

Class () (b :=> a) Source #
Instance details

Defined in Data.Constraint

Class () ( Class b a) Source #
Instance details

Defined in Data.Constraint

Class ( Eq a) ( Bits a) Source #
Instance details

Defined in Data.Constraint

Class ( Eq a) ( Ord a) Source #
Instance details

Defined in Data.Constraint

Class ( Fractional a) ( Floating a) Source #
Instance details

Defined in Data.Constraint

Class ( Functor f) ( Applicative f) Source #
Instance details

Defined in Data.Constraint

Class ( Num a) ( Fractional a) Source #
Instance details

Defined in Data.Constraint

Class ( Applicative f) ( Monad f) Source #
Instance details

Defined in Data.Constraint

Class ( Applicative f) ( Alternative f) Source #
Instance details

Defined in Data.Constraint

Class ( Semigroup a) ( Monoid a) Source #
Instance details

Defined in Data.Constraint

Class ( Monad f, Alternative f) ( MonadPlus f) Source #
Instance details

Defined in Data.Constraint

Class ( Num a, Ord a) ( Real a) Source #
Instance details

Defined in Data.Constraint

Class ( Real a, Fractional a) ( RealFrac a) Source #
Instance details

Defined in Data.Constraint

Class ( Real a, Enum a) ( Integral a) Source #
Instance details

Defined in Data.Constraint

Class ( RealFrac a, Floating a) ( RealFloat a) Source #
Instance details

Defined in Data.Constraint

class b :=> h | h -> b where infixr 9 Source #

Reify the relationship between an instance head and its body as a class

Given a definition such as

instance Foo a => Foo [a]

you can capture the relationship between the instance head and its body with

instance Foo a :=> Foo [a] where ins = Sub Dict

Instances

Instances details
() :=> () Source #
Instance details

Defined in Data.Constraint

Methods

ins :: () :- () Source #

a :=> ( Monoid ( Dict a)) Source #
Instance details

Defined in Data.Constraint

a :=> ( Read ( Dict a)) Source #
Instance details

Defined in Data.Constraint

a :=> ( Bounded ( Dict a)) Source #
Instance details

Defined in Data.Constraint

a :=> ( Enum ( Dict a)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Bounded Bool ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Bounded Char ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Bounded Int ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Bounded Ordering ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Bounded Word ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Bounded ()) Source #
Instance details

Defined in Data.Constraint

() :=> ( Enum Bool ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Enum Char ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Enum Double ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Enum Float ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Enum Int ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Enum Integer ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Enum Natural ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Enum Ordering ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Enum Word ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Enum ()) Source #
Instance details

Defined in Data.Constraint

() :=> ( Eq Bool ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Eq Double ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Eq Float ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Eq Int ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Eq Integer ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Eq Natural ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Eq Word ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Eq ()) Source #
Instance details

Defined in Data.Constraint

() :=> ( Eq (a :- b)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Eq ( Dict a)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Floating Double ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Floating Float ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Fractional Double ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Fractional Float ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Integral Int ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Integral Integer ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Integral Natural ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Integral Word ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Monad ((->) a :: Type -> Type )) Source #
Instance details

Defined in Data.Constraint

Methods

ins :: () :- Monad ((->) a) Source #

() :=> ( Monad []) Source #
Instance details

Defined in Data.Constraint

() :=> ( Monad IO ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Monad ( Either a)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Monad Identity ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Functor ((->) a :: Type -> Type )) Source #
Instance details

Defined in Data.Constraint

() :=> ( Functor []) Source #
Instance details

Defined in Data.Constraint

() :=> ( Functor Maybe ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Functor IO ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Functor ( Either a)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Functor ( (,) a)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Functor Identity ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Functor ( Const a :: Type -> Type )) Source #
Instance details

Defined in Data.Constraint

() :=> ( Num Double ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Num Float ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Num Int ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Num Integer ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Num Natural ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Num Word ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Ord Bool ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Ord Char ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Ord Double ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Ord Float ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Ord Int ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Ord Integer ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Ord Natural ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Ord Word ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Ord ()) Source #
Instance details

Defined in Data.Constraint

() :=> ( Ord (a :- b)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Ord ( Dict a)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Read Bool ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Read Char ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Read Int ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Read Natural ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Read Ordering ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Read Word ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Read ()) Source #
Instance details

Defined in Data.Constraint

() :=> ( Real Double ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Real Float ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Real Int ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Real Integer ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Real Natural ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Real Word ) Source #
Instance details

Defined in Data.Constraint

() :=> ( RealFloat Double ) Source #
Instance details

Defined in Data.Constraint

() :=> ( RealFloat Float ) Source #
Instance details

Defined in Data.Constraint

() :=> ( RealFrac Double ) Source #
Instance details

Defined in Data.Constraint

() :=> ( RealFrac Float ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Show Bool ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Show Char ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Show Int ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Show Natural ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Show Ordering ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Show Word ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Show ()) Source #
Instance details

Defined in Data.Constraint

() :=> ( Show (a :- b)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Show ( Dict a)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Applicative ((->) a :: Type -> Type )) Source #
Instance details

Defined in Data.Constraint

() :=> ( Applicative []) Source #
Instance details

Defined in Data.Constraint

() :=> ( Applicative Maybe ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Applicative IO ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Applicative ( Either a)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Semigroup [a]) Source #
Instance details

Defined in Data.Constraint

() :=> ( Semigroup Ordering ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Semigroup ()) Source #
Instance details

Defined in Data.Constraint

() :=> ( Semigroup ( Dict a)) Source #
Instance details

Defined in Data.Constraint

() :=> ( Monoid [a]) Source #
Instance details

Defined in Data.Constraint

() :=> ( Monoid Ordering ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Monoid ()) Source #
Instance details

Defined in Data.Constraint

() :=> ( Bits Bool ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Bits Int ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Bits Integer ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Bits Natural ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Bits Word ) Source #
Instance details

Defined in Data.Constraint

() :=> ( Alternative []) Source #
Instance details

Defined in Data.Constraint

() :=> ( Alternative Maybe ) Source #
Instance details

Defined in Data.Constraint

() :=> ( MonadPlus []) Source #
Instance details

Defined in Data.Constraint

() :=> ( MonadPlus Maybe ) Source #
Instance details

Defined in Data.Constraint

b :=> a => () :=> (b :=> a) Source #
Instance details

Defined in Data.Constraint

Class b a => () :=> ( Class b a) Source #
Instance details

Defined in Data.Constraint

Class () (b :=> a) Source #
Instance details

Defined in Data.Constraint

( Bounded a) :=> ( Bounded ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( Bounded a) :=> ( Bounded ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( Enum a) :=> ( Enum ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( Enum a) :=> ( Enum ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( Eq a) :=> ( Eq ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( Eq a) :=> ( Eq ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( Eq a) :=> ( Eq ( Ratio a)) Source #
Instance details

Defined in Data.Constraint

( Eq a) :=> ( Eq ( Complex a)) Source #
Instance details

Defined in Data.Constraint

( Eq a) :=> ( Eq ( Maybe a)) Source #
Instance details

Defined in Data.Constraint

( Eq a) :=> ( Eq [a]) Source #
Instance details

Defined in Data.Constraint

( Floating a) :=> ( Floating ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( Floating a) :=> ( Floating ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( Fractional a) :=> ( Fractional ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( Fractional a) :=> ( Fractional ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( Integral a) :=> ( RealFrac ( Ratio a)) Source #
Instance details

Defined in Data.Constraint

( Integral a) :=> ( Fractional ( Ratio a)) Source #
Instance details

Defined in Data.Constraint

( Integral a) :=> ( Integral ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( Integral a) :=> ( Integral ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( Integral a) :=> ( Real ( Ratio a)) Source #
Instance details

Defined in Data.Constraint

( Integral a) :=> ( Num ( Ratio a)) Source #
Instance details

Defined in Data.Constraint

( Integral a) :=> ( Enum ( Ratio a)) Source #
Instance details

Defined in Data.Constraint

( Integral a) :=> ( Ord ( Ratio a)) Source #
Instance details

Defined in Data.Constraint

( Monad m) :=> ( Applicative ( WrappedMonad m)) Source #
Instance details

Defined in Data.Constraint

( Monad m) :=> ( Functor ( WrappedMonad m)) Source #
Instance details

Defined in Data.Constraint

( Num a) :=> ( Num ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( Num a) :=> ( Num ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( Ord a) :=> ( Ord ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( Ord a) :=> ( Ord ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( Ord a) :=> ( Ord [a]) Source #
Instance details

Defined in Data.Constraint

( Ord a) :=> ( Ord ( Maybe a)) Source #
Instance details

Defined in Data.Constraint

( Read a) :=> ( Read ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( Read a) :=> ( Read ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( Read a) :=> ( Read ( Maybe a)) Source #
Instance details

Defined in Data.Constraint

( Read a) :=> ( Read [a]) Source #
Instance details

Defined in Data.Constraint

( Read a) :=> ( Read ( Complex a)) Source #
Instance details

Defined in Data.Constraint

( Real a) :=> ( Real ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( Real a) :=> ( Real ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( RealFloat a) :=> ( RealFloat ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( RealFloat a) :=> ( RealFloat ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( RealFloat a) :=> ( Floating ( Complex a)) Source #
Instance details

Defined in Data.Constraint

( RealFloat a) :=> ( Fractional ( Complex a)) Source #
Instance details

Defined in Data.Constraint

( RealFloat a) :=> ( Num ( Complex a)) Source #
Instance details

Defined in Data.Constraint

( RealFrac a) :=> ( RealFrac ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( RealFrac a) :=> ( RealFrac ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( Show a) :=> ( Show ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( Show a) :=> ( Show ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( Show a) :=> ( Show ( Maybe a)) Source #
Instance details

Defined in Data.Constraint

( Show a) :=> ( Show [a]) Source #
Instance details

Defined in Data.Constraint

( Show a) :=> ( Show ( Complex a)) Source #
Instance details

Defined in Data.Constraint

( Semigroup a) :=> ( Semigroup ( IO a)) Source #
Instance details

Defined in Data.Constraint

( Semigroup a) :=> ( Semigroup ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( Semigroup a) :=> ( Semigroup ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( Semigroup a) :=> ( Semigroup ( Maybe a)) Source #
Instance details

Defined in Data.Constraint

( Monoid a) :=> ( Applicative ( Const a :: Type -> Type )) Source #
Instance details

Defined in Data.Constraint

( Monoid a) :=> ( Applicative ( (,) a)) Source #
Instance details

Defined in Data.Constraint

( Monoid a) :=> ( Monoid ( IO a)) Source #
Instance details

Defined in Data.Constraint

( Monoid a) :=> ( Monoid ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( Monoid a) :=> ( Monoid ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( Monoid a) :=> ( Monoid ( Maybe a)) Source #
Instance details

Defined in Data.Constraint

( Bits a) :=> ( Bits ( Const a b)) Source #
Instance details

Defined in Data.Constraint

( Bits a) :=> ( Bits ( Identity a)) Source #
Instance details

Defined in Data.Constraint

( MonadPlus m) :=> ( Alternative ( WrappedMonad m)) Source #
Instance details

Defined in Data.Constraint

( Bounded a, Bounded b) :=> ( Bounded (a, b)) Source #
Instance details

Defined in Data.Constraint

( Eq a, Eq b) :=> ( Eq ( Either a b)) Source #
Instance details

Defined in Data.Constraint

( Eq a, Eq b) :=> ( Eq (a, b)) Source #
Instance details

Defined in Data.Constraint

( Integral a, Read a) :=> ( Read ( Ratio a)) Source #
Instance details

Defined in Data.Constraint

( Integral a, Show a) :=> ( Show ( Ratio a)) Source #
Instance details

Defined in Data.Constraint

( Ord a, Ord b) :=> ( Ord ( Either a b)) Source #
Instance details

Defined in Data.Constraint

( Ord a, Ord b) :=> ( Ord (a, b)) Source #
Instance details

Defined in Data.Constraint

( Read a, Read b) :=> ( Read ( Either a b)) Source #
Instance details

Defined in Data.Constraint

( Read a, Read b) :=> ( Read (a, b)) Source #
Instance details

Defined in Data.Constraint

( Show a, Show b) :=> ( Show ( Either a b)) Source #
Instance details

Defined in Data.Constraint

( Show a, Show b) :=> ( Show (a, b)) Source #
Instance details

Defined in Data.Constraint

( Semigroup a, Semigroup b) :=> ( Semigroup (a, b)) Source #
Instance details

Defined in Data.Constraint

( Monoid a, Monoid b) :=> ( Monoid (a, b)) Source #
Instance details

Defined in Data.Constraint