{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE RoleAnnotations #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE UndecidableSuperClasses #-}
{-# LANGUAGE UnicodeSyntax #-}

-- |
-- Copyright   :  (C) 2011-2015 Edward Kmett,
-- License     :  BSD-style (see the file LICENSE)
-- Maintainer  :  Edward Kmett <ekmett@gmail.com>
-- Stability   :  experimental
-- Portability :  non-portable
--
-- @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
--
-- <https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/gmap3.pdf 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.

module Data.Constraint
  (
  -- * The Kind of Constraints
    Constraint
  -- * Dictionary
  , Dict(Dict)
  , HasDict(..)
  , withDict
  , (\\)
  -- * Entailment
  , (:-)(Sub)
  , type (⊢)
  , type (|-)
  , type (&)
  , weaken1, weaken2, contract
  , strengthen1, strengthen2
  , (&&&), (***)
  , trans, refl
  , implied
  , Bottom(no)
  , top, bottom
  -- * Dict is fully faithful
  , mapDict
  , unmapDict
  -- * Reflection
  , Class(..)
  , (:=>)(..)
  ) where
import Control.Applicative
import Control.Category
import Control.DeepSeq
import Control.Monad
import Data.Complex
import Data.Ratio
import Data.Data hiding (TypeRep)
import qualified GHC.Exts as Exts (Any)
import GHC.Exts (Constraint)
import Data.Bits (Bits)
import Data.Functor.Identity (Identity)
import Numeric.Natural (Natural)
import Data.Coerce (Coercible)
import Data.Type.Coercion(Coercion(..))
import Data.Type.Equality (type (~~))
import qualified Data.Type.Equality.Hetero as Hetero
import Type.Reflection (TypeRep, typeRepKind, withTypeable)
import Data.Boring (Boring (..))

-- | 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.
--
data Dict :: Constraint -> * where
  Dict :: a => Dict a
  deriving Typeable

deriving stock instance (Typeable p, p) => Data (Dict p)
deriving stock instance Eq (Dict a)
deriving stock instance Ord (Dict a)
deriving stock instance Show (Dict a)

instance c => Boring (Dict c) where
    boring :: Dict c
boring = forall (c :: Constraint). c => Dict c
Dict

{-
instance (Typeable p, p) => Data (Dict p) where
  gfoldl _ z Dict = z Dict
  toConstr _ = dictConstr
  gunfold _ z c = case constrIndex c of
    1 -> z Dict
    _ -> error "gunfold"
  dataTypeOf _ = dictDataType

dictConstr :: Constr
dictConstr = mkConstr dictDataType "Dict" [] Prefix

dictDataType :: DataType
dictDataType = mkDataType "Data.Constraint.Dict" [dictConstr]
-}


instance NFData (Dict c) where
  rnf :: Dict c -> ()
rnf Dict c
Dict = ()

-- | 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.
class HasDict c e | e -> c where
  evidence :: e -> Dict c

instance HasDict a (Dict a) where
  evidence :: Dict a -> Dict a
evidence = forall a. a -> a
Prelude.id

instance a => HasDict b (a :- b) where
  evidence :: (a :- b) -> Dict b
evidence (Sub a => Dict b
x) = a => Dict b
x

instance HasDict (Coercible a b) (Coercion a b) where
  evidence :: Coercion a b -> Dict (Coercible a b)
evidence Coercion a b
Coercion = forall (c :: Constraint). c => Dict c
Dict

instance HasDict (a ~ b) (a :~: b) where
  evidence :: (a :~: b) -> Dict (a ~ b)
evidence a :~: b
Refl = forall (c :: Constraint). c => Dict c
Dict

instance HasDict (a ~~ b) (a Hetero.:~~: b) where
  evidence :: (a :~~: b) -> Dict (a ~~ b)
evidence a :~~: b
Hetero.HRefl = forall (c :: Constraint). c => Dict c
Dict

instance HasDict (Typeable k, Typeable a) (TypeRep (a :: k)) where
  evidence :: TypeRep a -> Dict (Typeable k, Typeable a)
evidence TypeRep a
tr = forall k (a :: k) r. TypeRep a -> (Typeable a => r) -> r
withTypeable TypeRep a
tr forall a b. (a -> b) -> a -> b
$ forall k (a :: k) r. TypeRep a -> (Typeable a => r) -> r
withTypeable (forall k (a :: k). TypeRep a -> TypeRep k
typeRepKind TypeRep a
tr) forall (c :: Constraint). c => Dict c
Dict

-- | 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
-- @
withDict :: HasDict c e => e -> (c => r) -> r
withDict :: forall (c :: Constraint) e r. HasDict c e => e -> (c => r) -> r
withDict e
d c => r
r = case forall (c :: Constraint) e. HasDict c e => e -> Dict c
evidence e
d of
                 Dict c
Dict -> c => r
r

infixl 1 \\ -- required comment

-- | Operator version of 'withDict', with the arguments flipped
(\\) :: HasDict c e => (c => r) -> e -> r
c => r
r \\ :: forall (c :: Constraint) e r. HasDict c e => (c => r) -> e -> r
\\ e
d = forall (c :: Constraint) e r. HasDict c e => e -> (c => r) -> r
withDict e
d c => r
r

infixr 9 :-
infixr 9 

-- | Type entailment, as written with a single character.
type (⊢) = (:-)

-- | 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.
newtype a :- b = Sub (a => Dict b)

type role (:-) nominal nominal

instance (Typeable p, Typeable q, p => q) => Data (p :- q) where
  gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> (p :- q) -> c (p :- q)
gfoldl forall d b. Data d => c (d -> b) -> d -> c b
_ forall g. g -> c g
z p :- q
d = forall g. g -> c g
z p :- q
d
  gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (p :- q)
gunfold forall b r. Data b => c (b -> r) -> c r
_ forall r. r -> c r
z Constr
c = case Constr -> Int
constrIndex Constr
c of
     Int
1 -> forall r. r -> c r
z (forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict)
     Int
_ -> forall a. HasCallStack => String -> a
error String
"Data.Data.Data: Data.Constraint.:- constructor out of bounds"
  toConstr :: (p :- q) -> Constr
toConstr p :- q
_ = Constr
subCon
  dataTypeOf :: (p :- q) -> DataType
dataTypeOf p :- q
_ = DataType
subTy

subCon :: Constr
subCon :: Constr
subCon = DataType -> String -> [String] -> Fixity -> Constr
mkConstr DataType
subTy String
"Sub Dict" [] Fixity
Prefix
{-# noinline subCon #-}
subTy :: DataType
subTy :: DataType
subTy = String -> [Constr] -> DataType
mkDataType String
"Data.Constraint.:-" [Constr
subCon]
{-# noinline subTy #-}

-- | Possible since GHC 7.8, when 'Category' was made polykinded.
instance Category (:-) where
  id :: forall (a :: Constraint). a :- a
id  = forall (a :: Constraint). a :- a
refl
  . :: forall (b :: Constraint) (c :: Constraint) (a :: Constraint).
(b :- c) -> (a :- b) -> a :- c
(.) = forall (b :: Constraint) (c :: Constraint) (a :: Constraint).
(b :- c) -> (a :- b) -> a :- c
trans

-- | Assumes 'IncoherentInstances' doesn't exist.
instance Eq (a :- b) where
  a :- b
_ == :: (a :- b) -> (a :- b) -> Bool
== a :- b
_ = Bool
True

-- | Assumes 'IncoherentInstances' doesn't exist.
instance Ord (a :- b) where
  compare :: (a :- b) -> (a :- b) -> Ordering
compare a :- b
_ a :- b
_ = Ordering
EQ

instance Show (a :- b) where
  showsPrec :: Int -> (a :- b) -> ShowS
showsPrec Int
d a :- b
_ = Bool -> ShowS -> ShowS
showParen (Int
d forall a. Ord a => a -> a -> Bool
> Int
10) forall a b. (a -> b) -> a -> b
$ String -> ShowS
showString String
"Sub Dict"

instance a => NFData (a :- b) where
  rnf :: (a :- b) -> ()
rnf (Sub Dict b
a => Dict b
Dict) = ()

--------------------------------------------------------------------------------
-- Constraints form a Category
--------------------------------------------------------------------------------

-- | Transitivity of entailment
--
-- If we view @(':-')@ as a Constraint-indexed category, then this is @('.')@
trans :: (b :- c) -> (a :- b) -> a :- c
trans :: forall (b :: Constraint) (c :: Constraint) (a :: Constraint).
(b :- c) -> (a :- b) -> a :- c
trans b :- c
f a :- b
g = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall a b. (a -> b) -> a -> b
$ forall (c :: Constraint). c => Dict c
Dict forall (c :: Constraint) e r. HasDict c e => (c => r) -> e -> r
\\ b :- c
f forall (c :: Constraint) e r. HasDict c e => (c => r) -> e -> r
\\ a :- b
g

-- | Reflexivity of entailment
--
-- If we view @(':-')@ as a Constraint-indexed category, then this is 'id'
refl :: a :- a
refl :: forall (a :: Constraint). a :- a
refl = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

--------------------------------------------------------------------------------
-- QuantifiedConstraints
--------------------------------------------------------------------------------

-- | Convert a quantified constraint into an entailment.
implied :: forall a b. (a => b) => a :- b
implied :: forall (a :: Constraint) (b :: Constraint). (a => b) => a :- b
implied = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub (forall (c :: Constraint). c => Dict c
Dict :: Dict b)

-- | The internal hom for the category of constraints.
--
-- This version can be passed around inside Dict, whereas (a => b) is impredicative
--
-- @
-- foo :: Dict (Ord a => Eq a)
-- foo = Dict
-- @
--
-- fails to typecheck due to the lack of impredicative polymorphism, but
--
-- @
-- foo :: Dict (Ord a |- Eq a)
-- foo = Dict
-- @
--
-- typechecks just fine.

class (p => q) => p |- q
instance (p => q) => p |- q


--------------------------------------------------------------------------------
-- (,) is a Bifunctor
--------------------------------------------------------------------------------

-- | 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 we can define
-- an equivalent type, that converts back and forth to @(,)@, and lets you hang instances.
class (p,q) => p & q
instance (p,q) => p & q

-- | 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.
(***) :: (a :- b) -> (c :- d) -> (a, c) :- (b, d)
a :- b
f *** :: forall (a :: Constraint) (b :: Constraint) (c :: Constraint)
       (d :: Constraint).
(a :- b) -> (c :- d) -> (a, c) :- (b, d)
*** c :- d
g = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall a b. (a -> b) -> a -> b
$ forall (c :: Constraint). c => Dict c
Dict forall (c :: Constraint) e r. HasDict c e => (c => r) -> e -> r
\\ a :- b
f forall (c :: Constraint) e r. HasDict c e => (c => r) -> e -> r
\\ c :- d
g

--------------------------------------------------------------------------------
-- Constraints are Cartesian
--------------------------------------------------------------------------------

-- | Weakening a constraint product
--
-- The category of constraints is Cartesian. We can forget information.
weaken1 :: (a, b) :- a
weaken1 :: forall (a :: Constraint) (b :: Constraint). (a, b) :- a
weaken1 = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- | Weakening a constraint product
--
-- The category of constraints is Cartesian. We can forget information.
weaken2 :: (a, b) :- b
weaken2 :: forall (a :: Constraint) (b :: Constraint). (a, b) :- b
weaken2 = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

strengthen1 :: Dict b -> a :- c -> a :- (b,c)
strengthen1 :: forall (b :: Constraint) (a :: Constraint) (c :: Constraint).
Dict b -> (a :- c) -> a :- (b, c)
strengthen1 Dict b
d a :- c
e = forall (a :: Constraint) (b :: Constraint).
(Dict a -> Dict b) -> a :- b
unmapDict (forall a b. a -> b -> a
const Dict b
d) forall (a :: Constraint) (b :: Constraint) (c :: Constraint).
(a :- b) -> (a :- c) -> a :- (b, c)
&&& a :- c
e

strengthen2 :: Dict b -> a :- c -> a :- (c,b)
strengthen2 :: forall (b :: Constraint) (a :: Constraint) (c :: Constraint).
Dict b -> (a :- c) -> a :- (c, b)
strengthen2 Dict b
d a :- c
e = a :- c
e forall (a :: Constraint) (b :: Constraint) (c :: Constraint).
(a :- b) -> (a :- c) -> a :- (b, c)
&&& forall (a :: Constraint) (b :: Constraint).
(Dict a -> Dict b) -> a :- b
unmapDict (forall a b. a -> b -> a
const Dict b
d)

-- | Contracting a constraint / diagonal morphism
--
-- The category of constraints is Cartesian. We can reuse information.
contract :: a :- (a, a)
contract :: forall (a :: Constraint). a :- (a, a)
contract = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- | Constraint product
--
-- > trans weaken1 (f &&& g) = f
-- > trans weaken2 (f &&& g) = g
(&&&) :: (a :- b) -> (a :- c) -> a :- (b, c)
a :- b
f &&& :: forall (a :: Constraint) (b :: Constraint) (c :: Constraint).
(a :- b) -> (a :- c) -> a :- (b, c)
&&& a :- c
g = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall a b. (a -> b) -> a -> b
$ forall (c :: Constraint). c => Dict c
Dict forall (c :: Constraint) e r. HasDict c e => (c => r) -> e -> r
\\ a :- b
f forall (c :: Constraint) e r. HasDict c e => (c => r) -> e -> r
\\ a :- c
g

--------------------------------------------------------------------------------
-- Initial and terminal morphisms
--------------------------------------------------------------------------------

-- | 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.
top :: a :- ()
top :: forall (a :: Constraint). a :- (() :: Constraint)
top = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- | 'Any' inhabits every kind, including 'Constraint' but is uninhabited, making it impossible to define an instance.
class Exts.Any => Bottom where
  no :: a

-- |
-- This demonstrates the law of classical logic <http://en.wikipedia.org/wiki/Principle_of_explosion "ex falso quodlibet">
bottom :: Bottom :- a
bottom :: forall (a :: Constraint). Bottom :- a
bottom = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall a. Bottom => a
no

--------------------------------------------------------------------------------
-- Dict is fully faithful
--------------------------------------------------------------------------------

-- | 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.
mapDict :: (a :- b) -> Dict a -> Dict b
mapDict :: forall (a :: Constraint) (b :: Constraint).
(a :- b) -> Dict a -> Dict b
mapDict a :- b
p Dict a
Dict = case a :- b
p of Sub a => Dict b
q -> a => Dict b
q

-- |
-- 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.
unmapDict :: (Dict a -> Dict b) -> a :- b
unmapDict :: forall (a :: Constraint) (b :: Constraint).
(Dict a -> Dict b) -> a :- b
unmapDict Dict a -> Dict b
f = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub (Dict a -> Dict b
f forall (c :: Constraint). c => Dict c
Dict)

type role Dict nominal

--------------------------------------------------------------------------------
-- Reflection
--------------------------------------------------------------------------------

-- | 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'
class Class b h | h -> b where
  cls :: h :- b

infixr 9 :=>
-- | 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'
-- @
class b :=> h | h -> b where
  ins :: b :- h

-- Bootstrapping

instance Class () (Class b a) where cls :: Class b a :- (() :: Constraint)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Class () (b :=> a) where cls :: (b :=> a) :- (() :: Constraint)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

instance Class b a => () :=> Class b a where ins :: (() :: Constraint) :- Class b a
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance (b :=> a) => () :=> (b :=> a) where ins :: (() :: Constraint) :- (b :=> a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

instance Class () () where cls :: (() :: Constraint) :- (() :: Constraint)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> () where ins :: (() :: Constraint) :- (() :: Constraint)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Local, Prelude, Applicative, C.M.I and Data.Monoid instances

-- Eq
instance Class () (Eq a) where cls :: Eq a :- (() :: Constraint)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Eq () where ins :: (() :: Constraint) :- Eq ()
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Eq Int where ins :: (() :: Constraint) :- Eq Int
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Eq Bool where ins :: (() :: Constraint) :- Eq Bool
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Eq Integer where ins :: (() :: Constraint) :- Eq Integer
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Eq Float where ins :: (() :: Constraint) :- Eq Float
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Eq Double where ins :: (() :: Constraint) :- Eq Double
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Eq a :=> Eq [a] where ins :: Eq a :- Eq [a]
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Eq a :=> Eq (Maybe a) where ins :: Eq a :- Eq (Maybe a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Eq a :=> Eq (Complex a) where ins :: Eq a :- Eq (Complex a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Eq a :=> Eq (Ratio a) where ins :: Eq a :- Eq (Ratio a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance (Eq a, Eq b) :=> Eq (a, b) where ins :: (Eq a, Eq b) :- Eq (a, b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance (Eq a, Eq b) :=> Eq (Either a b) where ins :: (Eq a, Eq b) :- Eq (Either a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Eq (Dict a) where ins :: (() :: Constraint) :- Eq (Dict a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Eq (a :- b) where ins :: (() :: Constraint) :- Eq (a :- b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Eq Word where ins :: (() :: Constraint) :- Eq Word
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Eq a :=> Eq (Identity a) where ins :: Eq a :- Eq (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Eq a :=> Eq (Const a b) where ins :: Eq a :- Eq (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Eq Natural where ins :: (() :: Constraint) :- Eq Natural
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Ord
instance Class (Eq a) (Ord a) where cls :: Ord a :- Eq a
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Ord () where ins :: (() :: Constraint) :- Ord ()
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Ord Bool where ins :: (() :: Constraint) :- Ord Bool
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Ord Int where ins :: (() :: Constraint) :- Ord Int
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance ():=> Ord Integer where ins :: (() :: Constraint) :- Ord Integer
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Ord Float where ins :: (() :: Constraint) :- Ord Float
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance ():=> Ord Double where ins :: (() :: Constraint) :- Ord Double
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Ord Char where ins :: (() :: Constraint) :- Ord Char
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Ord a :=> Ord (Maybe a) where ins :: Ord a :- Ord (Maybe a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Ord a :=> Ord [a] where ins :: Ord a :- Ord [a]
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance (Ord a, Ord b) :=> Ord (a, b) where ins :: (Ord a, Ord b) :- Ord (a, b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance (Ord a, Ord b) :=> Ord (Either a b) where ins :: (Ord a, Ord b) :- Ord (Either a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Integral a :=> Ord (Ratio a) where ins :: Integral a :- Ord (Ratio a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Ord (Dict a) where ins :: (() :: Constraint) :- Ord (Dict a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Ord (a :- b) where ins :: (() :: Constraint) :- Ord (a :- b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Ord Word where ins :: (() :: Constraint) :- Ord Word
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Ord a :=> Ord (Identity a) where ins :: Ord a :- Ord (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Ord a :=> Ord (Const a b) where ins :: Ord a :- Ord (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Ord Natural where ins :: (() :: Constraint) :- Ord Natural
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Show
instance Class () (Show a) where cls :: Show a :- (() :: Constraint)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Show () where ins :: (() :: Constraint) :- Show ()
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Show Bool where ins :: (() :: Constraint) :- Show Bool
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Show Ordering where ins :: (() :: Constraint) :- Show Ordering
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Show Char where ins :: (() :: Constraint) :- Show Char
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Show Int where ins :: (() :: Constraint) :- Show Int
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Show a :=> Show (Complex a) where ins :: Show a :- Show (Complex a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Show a :=> Show [a] where ins :: Show a :- Show [a]
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Show a :=> Show (Maybe a) where ins :: Show a :- Show (Maybe a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance (Show a, Show b) :=> Show (a, b) where ins :: (Show a, Show b) :- Show (a, b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance (Show a, Show b) :=> Show (Either a b) where ins :: (Show a, Show b) :- Show (Either a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance (Integral a, Show a) :=> Show (Ratio a) where ins :: (Integral a, Show a) :- Show (Ratio a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Show (Dict a) where ins :: (() :: Constraint) :- Show (Dict a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Show (a :- b) where ins :: (() :: Constraint) :- Show (a :- b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Show Word where ins :: (() :: Constraint) :- Show Word
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Show a :=> Show (Identity a) where ins :: Show a :- Show (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Show a :=> Show (Const a b) where ins :: Show a :- Show (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Show Natural where ins :: (() :: Constraint) :- Show Natural
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Read
instance Class () (Read a) where cls :: Read a :- (() :: Constraint)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Read () where ins :: (() :: Constraint) :- Read ()
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Read Bool where ins :: (() :: Constraint) :- Read Bool
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Read Ordering where ins :: (() :: Constraint) :- Read Ordering
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Read Char where ins :: (() :: Constraint) :- Read Char
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Read Int where ins :: (() :: Constraint) :- Read Int
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Read a :=> Read (Complex a) where ins :: Read a :- Read (Complex a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Read a :=> Read [a] where ins :: Read a :- Read [a]
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Read a :=> Read (Maybe a) where ins :: Read a :- Read (Maybe a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance (Read a, Read b) :=> Read (a, b) where ins :: (Read a, Read b) :- Read (a, b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance (Read a, Read b) :=> Read (Either a b) where ins :: (Read a, Read b) :- Read (Either a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance (Integral a, Read a) :=> Read (Ratio a) where ins :: (Integral a, Read a) :- Read (Ratio a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Read Word where ins :: (() :: Constraint) :- Read Word
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Read a :=> Read (Identity a) where ins :: Read a :- Read (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Read a :=> Read (Const a b) where ins :: Read a :- Read (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Read Natural where ins :: (() :: Constraint) :- Read Natural
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Enum
instance Class () (Enum a) where cls :: Enum a :- (() :: Constraint)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Enum () where ins :: (() :: Constraint) :- Enum ()
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Enum Bool where ins :: (() :: Constraint) :- Enum Bool
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Enum Ordering where ins :: (() :: Constraint) :- Enum Ordering
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Enum Char where ins :: (() :: Constraint) :- Enum Char
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Enum Int where ins :: (() :: Constraint) :- Enum Int
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Enum Integer where ins :: (() :: Constraint) :- Enum Integer
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Enum Float where ins :: (() :: Constraint) :- Enum Float
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Enum Double where ins :: (() :: Constraint) :- Enum Double
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Integral a :=> Enum (Ratio a) where ins :: Integral a :- Enum (Ratio a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Enum Word where ins :: (() :: Constraint) :- Enum Word
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Enum a :=> Enum (Identity a) where ins :: Enum a :- Enum (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Enum a :=> Enum (Const a b) where ins :: Enum a :- Enum (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Enum Natural where ins :: (() :: Constraint) :- Enum Natural
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Bounded
instance Class () (Bounded a) where cls :: Bounded a :- (() :: Constraint)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Bounded () where ins :: (() :: Constraint) :- Bounded ()
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Bounded Ordering where ins :: (() :: Constraint) :- Bounded Ordering
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Bounded Bool where ins :: (() :: Constraint) :- Bounded Bool
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Bounded Int where ins :: (() :: Constraint) :- Bounded Int
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Bounded Char where ins :: (() :: Constraint) :- Bounded Char
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance (Bounded a, Bounded b) :=> Bounded (a,b) where ins :: (Bounded a, Bounded b) :- Bounded (a, b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Bounded Word where ins :: (() :: Constraint) :- Bounded Word
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Bounded a :=> Bounded (Identity a) where ins :: Bounded a :- Bounded (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Bounded a :=> Bounded (Const a b) where ins :: Bounded a :- Bounded (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Num
instance Class () (Num a) where cls :: Num a :- (() :: Constraint)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Num Int where ins :: (() :: Constraint) :- Num Int
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Num Integer where ins :: (() :: Constraint) :- Num Integer
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Num Float where ins :: (() :: Constraint) :- Num Float
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Num Double where ins :: (() :: Constraint) :- Num Double
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance RealFloat a :=> Num (Complex a) where ins :: RealFloat a :- Num (Complex a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Integral a :=> Num (Ratio a) where ins :: Integral a :- Num (Ratio a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Num Word where ins :: (() :: Constraint) :- Num Word
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Num a :=> Num (Identity a) where ins :: Num a :- Num (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Num a :=> Num (Const a b) where ins :: Num a :- Num (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Num Natural where ins :: (() :: Constraint) :- Num Natural
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Real
instance Class (Num a, Ord a) (Real a) where cls :: Real a :- (Num a, Ord a)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Real Int where ins :: (() :: Constraint) :- Real Int
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Real Integer where ins :: (() :: Constraint) :- Real Integer
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Real Float where ins :: (() :: Constraint) :- Real Float
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Real Double where ins :: (() :: Constraint) :- Real Double
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Integral a :=> Real (Ratio a) where ins :: Integral a :- Real (Ratio a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Real Word where ins :: (() :: Constraint) :- Real Word
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Real a :=> Real (Identity a) where ins :: Real a :- Real (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Real a :=> Real (Const a b) where ins :: Real a :- Real (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Real Natural where ins :: (() :: Constraint) :- Real Natural
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Integral
instance Class (Real a, Enum a) (Integral a) where cls :: Integral a :- (Real a, Enum a)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Integral Int where ins :: (() :: Constraint) :- Integral Int
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Integral Integer where ins :: (() :: Constraint) :- Integral Integer
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Integral Word where ins :: (() :: Constraint) :- Integral Word
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Integral a :=> Integral (Identity a) where ins :: Integral a :- Integral (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Integral a :=> Integral (Const a b) where ins :: Integral a :- Integral (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Integral Natural where ins :: (() :: Constraint) :- Integral Natural
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Bits
instance Class (Eq a) (Bits a) where cls :: Bits a :- Eq a
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Bits Bool where ins :: (() :: Constraint) :- Bits Bool
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Bits Int where ins :: (() :: Constraint) :- Bits Int
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Bits Integer where ins :: (() :: Constraint) :- Bits Integer
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Bits Word where ins :: (() :: Constraint) :- Bits Word
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Bits a :=> Bits (Identity a) where ins :: Bits a :- Bits (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Bits a :=> Bits (Const a b) where ins :: Bits a :- Bits (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Bits Natural where ins :: (() :: Constraint) :- Bits Natural
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Fractional
instance Class (Num a) (Fractional a) where cls :: Fractional a :- Num a
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Fractional Float where ins :: (() :: Constraint) :- Fractional Float
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Fractional Double where ins :: (() :: Constraint) :- Fractional Double
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance RealFloat a :=> Fractional (Complex a) where ins :: RealFloat a :- Fractional (Complex a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Integral a :=> Fractional (Ratio a) where ins :: Integral a :- Fractional (Ratio a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Fractional a :=> Fractional (Identity a) where ins :: Fractional a :- Fractional (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Fractional a :=> Fractional (Const a b) where ins :: Fractional a :- Fractional (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Floating
instance Class (Fractional a) (Floating a) where cls :: Floating a :- Fractional a
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Floating Float where ins :: (() :: Constraint) :- Floating Float
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Floating Double where ins :: (() :: Constraint) :- Floating Double
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance RealFloat a :=> Floating (Complex a) where ins :: RealFloat a :- Floating (Complex a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Floating a :=> Floating (Identity a) where ins :: Floating a :- Floating (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Floating a :=> Floating (Const a b) where ins :: Floating a :- Floating (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- RealFrac
instance Class (Real a, Fractional a) (RealFrac a) where cls :: RealFrac a :- (Real a, Fractional a)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> RealFrac Float where ins :: (() :: Constraint) :- RealFrac Float
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> RealFrac Double where ins :: (() :: Constraint) :- RealFrac Double
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Integral a :=> RealFrac (Ratio a) where ins :: Integral a :- RealFrac (Ratio a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance RealFrac a :=> RealFrac (Identity a) where ins :: RealFrac a :- RealFrac (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance RealFrac a :=> RealFrac (Const a b) where ins :: RealFrac a :- RealFrac (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- RealFloat
instance Class (RealFrac a, Floating a) (RealFloat a) where cls :: RealFloat a :- (RealFrac a, Floating a)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> RealFloat Float where ins :: (() :: Constraint) :- RealFloat Float
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> RealFloat Double where ins :: (() :: Constraint) :- RealFloat Double
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance RealFloat a :=> RealFloat (Identity a) where ins :: RealFloat a :- RealFloat (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance RealFloat a :=> RealFloat (Const a b) where ins :: RealFloat a :- RealFloat (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Semigroup
instance Class () (Semigroup a) where cls :: Semigroup a :- (() :: Constraint)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Semigroup () where ins :: (() :: Constraint) :- Semigroup ()
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Semigroup Ordering where ins :: (() :: Constraint) :- Semigroup Ordering
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Semigroup [a] where ins :: (() :: Constraint) :- Semigroup [a]
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Semigroup a :=> Semigroup (Maybe a) where ins :: Semigroup a :- Semigroup (Maybe a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance (Semigroup a, Semigroup b) :=> Semigroup (a, b) where ins :: (Semigroup a, Semigroup b) :- Semigroup (a, b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Semigroup a :=> Semigroup (Const a b) where ins :: Semigroup a :- Semigroup (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Semigroup a :=> Semigroup (Identity a) where ins :: Semigroup a :- Semigroup (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Semigroup a :=> Semigroup (IO a) where ins :: Semigroup a :- Semigroup (IO a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Monoid
instance Class (Semigroup a) (Monoid a) where cls :: Monoid a :- Semigroup a
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Monoid () where ins :: (() :: Constraint) :- Monoid ()
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Monoid Ordering where ins :: (() :: Constraint) :- Monoid Ordering
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Monoid [a] where ins :: (() :: Constraint) :- Monoid [a]
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Monoid a :=> Monoid (Maybe a) where ins :: Monoid a :- Monoid (Maybe a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance (Monoid a, Monoid b) :=> Monoid (a, b) where ins :: (Monoid a, Monoid b) :- Monoid (a, b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Monoid a :=> Monoid (Const a b) where ins :: Monoid a :- Monoid (Const a b)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Monoid a :=> Monoid (Identity a) where ins :: Monoid a :- Monoid (Identity a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Monoid a :=> Monoid (IO a) where ins :: Monoid a :- Monoid (IO a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Functor
instance Class () (Functor f) where cls :: Functor f :- (() :: Constraint)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Functor [] where ins :: (() :: Constraint) :- Functor []
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Functor Maybe where ins :: (() :: Constraint) :- Functor Maybe
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Functor (Either a) where ins :: (() :: Constraint) :- Functor (Either a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Functor ((->) a) where ins :: (() :: Constraint) :- Functor ((->) a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Functor ((,) a) where ins :: (() :: Constraint) :- Functor ((,) a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Functor IO where ins :: (() :: Constraint) :- Functor IO
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Monad m :=> Functor (WrappedMonad m) where ins :: Monad m :- Functor (WrappedMonad m)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Functor Identity where ins :: (() :: Constraint) :- Functor Identity
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Functor (Const a) where ins :: (() :: Constraint) :- Functor (Const a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Applicative
instance Class (Functor f) (Applicative f) where cls :: Applicative f :- Functor f
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Applicative [] where ins :: (() :: Constraint) :- Applicative []
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Applicative Maybe where ins :: (() :: Constraint) :- Applicative Maybe
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Applicative (Either a) where ins :: (() :: Constraint) :- Applicative (Either a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Applicative ((->)a) where ins :: (() :: Constraint) :- Applicative ((->) a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Applicative IO where ins :: (() :: Constraint) :- Applicative IO
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Monoid a :=> Applicative ((,)a) where ins :: Monoid a :- Applicative ((,) a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Monoid a :=> Applicative (Const a) where ins :: Monoid a :- Applicative (Const a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Monad m :=> Applicative (WrappedMonad m) where ins :: Monad m :- Applicative (WrappedMonad m)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Alternative
instance Class (Applicative f) (Alternative f) where cls :: Alternative f :- Applicative f
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Alternative [] where ins :: (() :: Constraint) :- Alternative []
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Alternative Maybe where ins :: (() :: Constraint) :- Alternative Maybe
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance MonadPlus m :=> Alternative (WrappedMonad m) where ins :: MonadPlus m :- Alternative (WrappedMonad m)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- Monad
instance Class (Applicative f) (Monad f) where cls :: Monad f :- Applicative f
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Monad [] where ins :: (() :: Constraint) :- Monad []
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Monad ((->) a) where ins :: (() :: Constraint) :- Monad ((->) a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Monad (Either a) where ins :: (() :: Constraint) :- Monad (Either a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Monad IO where ins :: (() :: Constraint) :- Monad IO
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> Monad Identity where ins :: (() :: Constraint) :- Monad Identity
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

-- MonadPlus
instance Class (Monad f, Alternative f) (MonadPlus f) where cls :: MonadPlus f :- (Monad f, Alternative f)
cls = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> MonadPlus [] where ins :: (() :: Constraint) :- MonadPlus []
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance () :=> MonadPlus Maybe where ins :: (() :: Constraint) :- MonadPlus Maybe
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict

--------------------------------------------------------------------------------
-- UndecidableInstances
--------------------------------------------------------------------------------

instance a :=> Enum (Dict a) where ins :: a :- Enum (Dict a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance a => Enum (Dict a) where
  toEnum :: Int -> Dict a
toEnum Int
_ = forall (c :: Constraint). c => Dict c
Dict
  fromEnum :: Dict a -> Int
fromEnum Dict a
Dict = Int
0

instance a :=> Bounded (Dict a) where ins :: a :- Bounded (Dict a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance a => Bounded (Dict a) where
  minBound :: Dict a
minBound = forall (c :: Constraint). c => Dict c
Dict
  maxBound :: Dict a
maxBound = forall (c :: Constraint). c => Dict c
Dict

instance a :=> Read (Dict a) where ins :: a :- Read (Dict a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
deriving instance a => Read (Dict a)

instance () :=> Semigroup (Dict a) where ins :: (() :: Constraint) :- Semigroup (Dict a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance Semigroup (Dict a) where
  Dict a
Dict <> :: Dict a -> Dict a -> Dict a
<> Dict a
Dict = forall (c :: Constraint). c => Dict c
Dict

instance a :=> Monoid (Dict a) where ins :: a :- Monoid (Dict a)
ins = forall (a :: Constraint) (b :: Constraint). (a => Dict b) -> a :- b
Sub forall (c :: Constraint). c => Dict c
Dict
instance a => Monoid (Dict a) where
  mempty :: Dict a
mempty = forall (c :: Constraint). c => Dict c
Dict