constrained-categories-0.4.2.0: Constrained clones of the category-theory type classes, using ConstraintKinds.
Copyright(c) 2018 Justus Sagemüller
LicenseGPL v3 (see COPYING)
Maintainer(@) jsag $ hvl.no
Safe HaskellTrustworthy
LanguageHaskell2010

Control.Category.Discrete

Description

 
Synopsis

Documentation

data Discrete (a :: k) (b :: k) where Source #

The discrete category is the category with the minimum possible amount of arrows: for any given type, there is id, and that's all. You can use this to provide a proof that some endomorphism (of not closer specified category) is the identity.

Constructors

Refl :: forall {k} (a :: k). Discrete a a 

Instances

Instances details
Category (Discrete :: κ -> κ -> Type) Source # 
Instance details

Defined in Control.Category.Constrained

Methods

id :: forall (a :: κ). Object (Discrete :: κ -> κ -> Type) a => Discrete a a Source #

(.) :: forall (a :: κ) (b :: κ) (c :: κ). (Object (Discrete :: κ -> κ -> Type) a, Object (Discrete :: κ -> κ -> Type) b, Object (Discrete :: κ -> κ -> Type) c) => Discrete b c -> Discrete a b -> Discrete a c Source #

Category (Discrete :: k -> k -> Type) Source # 
Instance details

Defined in Control.Category.Discrete

Methods

id :: forall (a :: k). Discrete a a #

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

Functor Complex (Discrete :: Type -> Type -> Type) (Discrete :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Functor.Constrained

Methods

fmap :: (Object (Discrete :: Type -> Type -> Type) a, Object (Discrete :: Type -> Type -> Type) (Complex a), Object (Discrete :: Type -> Type -> Type) b, Object (Discrete :: Type -> Type -> Type) (Complex b)) => Discrete a b -> Discrete (Complex a) (Complex b) Source #

Functor IO (Discrete :: Type -> Type -> Type) (Discrete :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Functor.Constrained

Methods

fmap :: (Object (Discrete :: Type -> Type -> Type) a, Object (Discrete :: Type -> Type -> Type) (IO a), Object (Discrete :: Type -> Type -> Type) b, Object (Discrete :: Type -> Type -> Type) (IO b)) => Discrete a b -> Discrete (IO a) (IO b) Source #

Functor Maybe (Discrete :: Type -> Type -> Type) (Discrete :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Functor.Constrained

Methods

fmap :: (Object (Discrete :: Type -> Type -> Type) a, Object (Discrete :: Type -> Type -> Type) (Maybe a), Object (Discrete :: Type -> Type -> Type) b, Object (Discrete :: Type -> Type -> Type) (Maybe b)) => Discrete a b -> Discrete (Maybe a) (Maybe b) Source #

Functor [] (Discrete :: Type -> Type -> Type) (Discrete :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Functor.Constrained

Methods

fmap :: (Object (Discrete :: Type -> Type -> Type) a, Object (Discrete :: Type -> Type -> Type) [a], Object (Discrete :: Type -> Type -> Type) b, Object (Discrete :: Type -> Type -> Type) [b]) => Discrete a b -> Discrete [a] [b] Source #

HasAgent (Discrete :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Constrained

Associated Types

type AgentVal (Discrete :: Type -> Type -> Type) a v 
Instance details

Defined in Control.Category.Constrained

type AgentVal (Discrete :: Type -> Type -> Type) a v = GenericAgent (Discrete :: Type -> Type -> Type) a v

Methods

alg :: (Object (Discrete :: Type -> Type -> Type) a, Object (Discrete :: Type -> Type -> Type) b) => (forall q. Object (Discrete :: Type -> Type -> Type) q => AgentVal (Discrete :: Type -> Type -> Type) q a -> AgentVal (Discrete :: Type -> Type -> Type) q b) -> Discrete a b Source #

($~) :: (Object (Discrete :: Type -> Type -> Type) a, Object (Discrete :: Type -> Type -> Type) b, Object (Discrete :: Type -> Type -> Type) c) => Discrete b c -> AgentVal (Discrete :: Type -> Type -> Type) a b -> AgentVal (Discrete :: Type -> Type -> Type) a c Source #

EnhancedCat (Coercion :: Type -> Type -> Type) (Discrete :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Arrow.Constrained

Methods

arr :: (Object (Discrete :: Type -> Type -> Type) b, Object (Discrete :: Type -> Type -> Type) c, Object (Coercion :: Type -> Type -> Type) b, Object (Coercion :: Type -> Type -> Type) c) => Discrete b c -> Coercion b c Source #

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

Defined in Control.Functor.Constrained

Methods

fmap :: (Object (Discrete :: Type -> Type -> Type) a0, Object (Discrete :: Type -> Type -> Type) (Either a a0), Object (Discrete :: Type -> Type -> Type) b, Object (Discrete :: Type -> Type -> Type) (Either a b)) => Discrete a0 b -> Discrete (Either a a0) (Either a b) Source #

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

Defined in Control.Functor.Constrained

Methods

fmap :: (Object (Discrete :: Type -> Type -> Type) a0, Object (Discrete :: Type -> Type -> Type) (a, a0), Object (Discrete :: Type -> Type -> Type) b, Object (Discrete :: Type -> Type -> Type) (a, b)) => Discrete a0 b -> Discrete (a, a0) (a, b) Source #

EnhancedCat (Discrete :: Type -> Type -> Type) f => EnhancedCat (Discrete :: Type -> Type -> Type) (o f) Source # 
Instance details

Defined in Control.Arrow.Constrained

Methods

arr :: (Object (o f) b, Object (o f) c, Object (Discrete :: Type -> Type -> Type) b, Object (Discrete :: Type -> Type -> Type) c) => (o f) b c -> Discrete b c Source #

Category f => EnhancedCat (o f) (Discrete :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Arrow.Constrained

Methods

arr :: (Object (Discrete :: Type -> Type -> Type) b, Object (Discrete :: Type -> Type -> Type) c, Object (o f) b, Object (o f) c) => Discrete b c -> (o f) b c Source #

EnhancedCat (->) (Discrete :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Arrow.Constrained

Methods

arr :: (Object (Discrete :: Type -> Type -> Type) b, Object (Discrete :: Type -> Type -> Type) c, Object (->) b, Object (->) c) => Discrete b c -> b -> c Source #

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

Defined in Control.Functor.Constrained

Methods

fmap :: (Object (Discrete :: Type -> Type -> Type) a0, Object (Discrete :: Type -> Type -> Type) (a -> a0), Object (Discrete :: Type -> Type -> Type) b, Object (Discrete :: Type -> Type -> Type) (a -> b)) => Discrete a0 b -> Discrete (a -> a0) (a -> b) Source #

type Object (Discrete :: κ -> κ -> Type) (o :: κ) Source # 
Instance details

Defined in Control.Category.Constrained

type Object (Discrete :: κ -> κ -> Type) (o :: κ) = ()
type AgentVal (Discrete :: Type -> Type -> Type) a v Source # 
Instance details

Defined in Control.Category.Constrained

type AgentVal (Discrete :: Type -> Type -> Type) a v = GenericAgent (Discrete :: Type -> Type -> Type) a v