constraints-extras-0.2.0.0: Utility package for constraints

Safe HaskellSafe
LanguageHaskell2010

Data.Constraint.Extras

Synopsis

Documentation

class ArgDict f where Source #

Provides proof of the existence of a constraint on a GADT

Minimal complete definition

argDict, argDict'

Associated Types

type ConstraintsFor f (c :: k -> Constraint) :: Constraint Source #

type ConstraintsFor' f (c :: k -> Constraint) (g :: k' -> k) :: Constraint Source #

Methods

argDict :: ConstraintsFor f c => f a -> Dict (c a) Source #

argDict' :: ConstraintsFor' f c g => f a -> Dict (c (g a)) Source #

type Has c f = (ArgDict f, ConstraintsFor f c) Source #

type Has' c f g = (ArgDict f, ConstraintsFor' f c g) Source #

has :: forall c f a r. Has c f => f a -> (c a => r) -> r Source #

has' :: forall c g f a r. Has' c f g => f a -> (c (g a) => r) -> r Source #

whichever :: forall c t a r. ForallF c t => (c (t a) => r) -> r Source #

class Implies1 c d where Source #

Allows explicit specification of constraint implication

Minimal complete definition

implies1

Methods

implies1 :: c a :- d a Source #