gasp-1.4.0.0: A framework of algebraic classes
Safe HaskellSafe-Inferred
LanguageHaskell2010

Algebra.Types

Documentation

class SumKind k Source #

Associated Types

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

data Zero :: k Source #

Instances

Instances details
SumKind Type Source # 
Instance details

Defined in Algebra.Types

Associated Types

data a b :: k Source #

data Zero :: k Source #

SumKind (Type -> Type) Source # 
Instance details

Defined in Algebra.Types

Associated Types

data a b :: k Source #

data Zero :: k Source #

class ProdKind k Source #

Associated Types

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

data One :: k Source #

Instances

Instances details
ProdKind Type Source # 
Instance details

Defined in Algebra.Types

Associated Types

data a b :: k Source #

data One :: k Source #

ProdKind (Type -> Type) Source # 
Instance details

Defined in Algebra.Types

Associated Types

data a b :: k Source #

data One :: k Source #

class DualKind k Source #

Associated Types

data Dual (a :: k) :: k Source #

Instances

Instances details
DualKind Type Source # 
Instance details

Defined in Algebra.Types

Associated Types

data Dual a :: k Source #

DualKind (Type -> Type) Source # 
Instance details

Defined in Algebra.Types

Associated Types

data Dual a :: k Source #

data Repr x i t o :: k -> Type where Source #

Constructors

RPlus :: Repr x i t o a -> Repr x i t o b -> Repr x i t o (a `t` b) 
RTimes :: Repr x i t o a -> Repr x i t o b -> Repr x i t o (a `x` b) 
ROne :: Repr x i t o i 
RZero :: Repr x i t o o 

Instances

Instances details
Arbitrary (Some1 (Repr x i t o)) Source # 
Instance details

Defined in Algebra.Category.Objects

Methods

arbitrary :: Gen (Some1 (Repr x i t o)) #

shrink :: Some1 (Repr x i t o) -> [Some1 (Repr x i t o)] #

Show (Repr x i t o a) Source # 
Instance details

Defined in Algebra.Types

Methods

showsPrec :: Int -> Repr x i t o a -> ShowS #

show :: Repr x i t o a -> String #

showList :: [Repr x i t o a] -> ShowS #

class (Enum a, Bounded a, Eq a, Ord a) => Finite a where Source #

Minimal complete definition

Nothing

Methods

typeSize :: Int Source #

finiteFstsnd :: forall α β. a ~ β) => Dict (Finite α, Finite β) Source #

finiteLeftRight :: forall α β. a ~ β) => Dict (Finite α, Finite β) Source #

Instances

Instances details
Finite Bool Source # 
Instance details

Defined in Algebra.Types

Methods

typeSize :: Int Source #

finiteFstsnd :: Bool ~ β) => Dict (Finite α, Finite β) Source #

finiteLeftRight :: Bool ~ β) => Dict (Finite α, Finite β) Source #

Finite (One :: Type) Source # 
Instance details

Defined in Algebra.Types

Methods

typeSize :: Int Source #

finiteFstsnd :: One ~ β) => Dict (Finite α, Finite β) Source #

finiteLeftRight :: One ~ β) => Dict (Finite α, Finite β) Source #

Finite (Zero :: Type) Source # 
Instance details

Defined in Algebra.Types

Methods

typeSize :: Int Source #

finiteFstsnd :: Zero ~ β) => Dict (Finite α, Finite β) Source #

finiteLeftRight :: Zero ~ β) => Dict (Finite α, Finite β) Source #

Finite a => Finite (Dual a) Source # 
Instance details

Defined in Algebra.Types

Methods

typeSize :: Int Source #

finiteFstsnd :: Dual a ~ β) => Dict (Finite α, Finite β) Source #

finiteLeftRight :: Dual a ~ β) => Dict (Finite α, Finite β) Source #

(Finite x, Finite y) => Finite (x y) Source # 
Instance details

Defined in Algebra.Types

Methods

typeSize :: Int Source #

finiteFstsnd :: (x y) ~ β) => Dict (Finite α, Finite β) Source #

finiteLeftRight :: (x y) ~ β) => Dict (Finite α, Finite β) Source #

(Finite x, Finite y) => Finite (x y) Source # 
Instance details

Defined in Algebra.Types

Methods

typeSize :: Int Source #

finiteFstsnd :: (x y) ~ β) => Dict (Finite α, Finite β) Source #

finiteLeftRight :: (x y) ~ β) => Dict (Finite α, Finite β) Source #

fromZero :: forall a. Finite a => Int -> a Source #

newtype (f g) x Source #

Constructors

Comp 

Fields

Instances

Instances details
Functor f => Generic1 (f g :: k -> Type) Source # 
Instance details

Defined in Algebra.Types

Associated Types

type Rep1 (f g) :: k -> Type #

Methods

from1 :: forall (a :: k0). (f g) a -> Rep1 (f g) a #

to1 :: forall (a :: k0). Rep1 (f g) a -> (f g) a #

Monoidal ((∘) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) Id NatTrans Source # 
Instance details

Defined in Algebra.Category.NatTrans

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj NatTrans a, Obj NatTrans b, Obj NatTrans c, Obj NatTrans d) => NatTrans a b -> NatTrans c d -> NatTrans (a c) (b d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj NatTrans a, Obj NatTrans b, Obj NatTrans c) => NatTrans ((a b) c) (a (b c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj NatTrans a, Obj NatTrans b, Obj NatTrans c) => NatTrans (a (b c)) ((a b) c) Source #

unitorR :: forall (a :: k). (Obj NatTrans a, Obj NatTrans Id) => NatTrans a (a Id) Source #

unitorR_ :: forall (a :: k). (Obj NatTrans a, Obj NatTrans Id) => NatTrans (a Id) a Source #

unitorL :: forall (a :: k). (Obj NatTrans a, Obj NatTrans Id) => NatTrans a (Id a) Source #

unitorL_ :: forall (a :: k). (Obj NatTrans a, Obj NatTrans Id) => NatTrans (Id a) a Source #

Ring s => Braided ((∘) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) Id (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

Methods

swap :: forall (a :: k) (b :: k). (Obj (Mat s) a, Obj (Mat s) b) => Mat s (a b) (b a) Source #

swap_ :: forall (a :: k) (b :: k). (Obj (Mat s) a, Obj (Mat s) b) => Mat s (a b) (b a) Source #

Ring s => Monoidal ((∘) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) Id (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c, Obj (Mat s) d) => Mat s a b -> Mat s c d -> Mat s (a c) (b d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c) => Mat s ((a b) c) (a (b c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c) => Mat s (a (b c)) ((a b) c) Source #

unitorR :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) Id) => Mat s a (a Id) Source #

unitorR_ :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) Id) => Mat s (a Id) a Source #

unitorL :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) Id) => Mat s a (Id a) Source #

unitorL_ :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) Id) => Mat s (Id a) a Source #

Ring s => Symmetric ((∘) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) Id (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

(Arbitrary1 f, Arbitrary1 g) => Arbitrary1 (f g) Source # 
Instance details

Defined in Algebra.Types

Methods

liftArbitrary :: Gen a -> Gen ((f g) a) #

liftShrink :: (a -> [a]) -> (f g) a -> [(f g) a] #

(Representable v, Representable w) => Representable (v w) Source # 
Instance details

Defined in Algebra.Types

Associated Types

type Rep (v w) #

Methods

tabulate :: (Rep (v w) -> a) -> (v w) a #

index :: (v w) a -> Rep (v w) -> a #

(Foldable f, Foldable g) => Foldable (f g) Source # 
Instance details

Defined in Algebra.Types

Methods

fold :: Monoid m => (f g) m -> m #

foldMap :: Monoid m => (a -> m) -> (f g) a -> m #

foldMap' :: Monoid m => (a -> m) -> (f g) a -> m #

foldr :: (a -> b -> b) -> b -> (f g) a -> b #

foldr' :: (a -> b -> b) -> b -> (f g) a -> b #

foldl :: (b -> a -> b) -> b -> (f g) a -> b #

foldl' :: (b -> a -> b) -> b -> (f g) a -> b #

foldr1 :: (a -> a -> a) -> (f g) a -> a #

foldl1 :: (a -> a -> a) -> (f g) a -> a #

toList :: (f g) a -> [a] #

null :: (f g) a -> Bool #

length :: (f g) a -> Int #

elem :: Eq a => a -> (f g) a -> Bool #

maximum :: Ord a => (f g) a -> a #

minimum :: Ord a => (f g) a -> a #

sum :: Num a => (f g) a -> a #

product :: Num a => (f g) a -> a #

(Traversable f, Traversable g) => Traversable (f g) Source # 
Instance details

Defined in Algebra.Types

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f g) a -> f0 ((f g) b) #

sequenceA :: Applicative f0 => (f g) (f0 a) -> f0 ((f g) a) #

mapM :: Monad m => (a -> m b) -> (f g) a -> m ((f g) b) #

sequence :: Monad m => (f g) (m a) -> m ((f g) a) #

(Applicative f, Applicative g) => Applicative (f g) Source # 
Instance details

Defined in Algebra.Types

Methods

pure :: a -> (f g) a #

(<*>) :: (f g) (a -> b) -> (f g) a -> (f g) b #

liftA2 :: (a -> b -> c) -> (f g) a -> (f g) b -> (f g) c #

(*>) :: (f g) a -> (f g) b -> (f g) b #

(<*) :: (f g) a -> (f g) b -> (f g) a #

(Functor f, Functor g) => Functor (f g) Source # 
Instance details

Defined in Algebra.Types

Methods

fmap :: (a -> b) -> (f g) a -> (f g) b #

(<$) :: a -> (f g) b -> (f g) a #

(Distributive v, Distributive w) => Distributive (v w) Source # 
Instance details

Defined in Algebra.Types

Methods

distribute :: Functor f => f ((v w) a) -> (v w) (f a) #

collect :: Functor f => (a -> (v w) b) -> f a -> (v w) (f b) #

distributeM :: Monad m => m ((v w) a) -> (v w) (m a) #

collectM :: Monad m => (a -> (v w) b) -> m a -> (v w) (m b) #

(VectorR v, VectorR w) => VectorR (v w) Source # 
Instance details

Defined in Algebra.Linear

Methods

vectorSplit :: forall (f :: Type -> Type) (g :: Type -> Type). (v w) ~ (f g) => Dict (VectorR f, VectorR g) Source #

vectorCut :: forall (f :: Type -> Type) (g :: Type -> Type). (v w) ~ (f g) => Dict (VectorR f, VectorR g) Source #

Show (a (b x)) => Show ((a b) x) Source # 
Instance details

Defined in Algebra.Types

Methods

showsPrec :: Int -> (a b) x -> ShowS #

show :: (a b) x -> String #

showList :: [(a b) x] -> ShowS #

Eq (f (g x)) => Eq ((f g) x) Source # 
Instance details

Defined in Algebra.Types

Methods

(==) :: (f g) x -> (f g) x -> Bool #

(/=) :: (f g) x -> (f g) x -> Bool #

type Rep1 (f g :: k -> Type) Source # 
Instance details

Defined in Algebra.Types

type Rep1 (f g :: k -> Type) = D1 ('MetaData "\8728" "Algebra.Types" "gasp-1.4.0.0-4Z31dYmTpJbCzuuYkBBWRm" 'True) (C1 ('MetaCons "Comp" 'PrefixI 'True) (S1 ('MetaSel ('Just "fromComp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (f :.: Rec1 g)))
type Rep (v w) Source # 
Instance details

Defined in Algebra.Types

type Rep (v w) = Rep v Rep w

newtype Id x Source #

Constructors

Id 

Fields

Instances

Instances details
Arbitrary1 Id Source # 
Instance details

Defined in Algebra.Types

Methods

liftArbitrary :: Gen a -> Gen (Id a) #

liftShrink :: (a -> [a]) -> Id a -> [Id a] #

Representable Id Source # 
Instance details

Defined in Algebra.Types

Associated Types

type Rep Id #

Methods

tabulate :: (Rep Id -> a) -> Id a #

index :: Id a -> Rep Id -> a #

Foldable Id Source # 
Instance details

Defined in Algebra.Types

Methods

fold :: Monoid m => Id m -> m #

foldMap :: Monoid m => (a -> m) -> Id a -> m #

foldMap' :: Monoid m => (a -> m) -> Id a -> m #

foldr :: (a -> b -> b) -> b -> Id a -> b #

foldr' :: (a -> b -> b) -> b -> Id a -> b #

foldl :: (b -> a -> b) -> b -> Id a -> b #

foldl' :: (b -> a -> b) -> b -> Id a -> b #

foldr1 :: (a -> a -> a) -> Id a -> a #

foldl1 :: (a -> a -> a) -> Id a -> a #

toList :: Id a -> [a] #

null :: Id a -> Bool #

length :: Id a -> Int #

elem :: Eq a => a -> Id a -> Bool #

maximum :: Ord a => Id a -> a #

minimum :: Ord a => Id a -> a #

sum :: Num a => Id a -> a #

product :: Num a => Id a -> a #

Traversable Id Source # 
Instance details

Defined in Algebra.Types

Methods

traverse :: Applicative f => (a -> f b) -> Id a -> f (Id b) #

sequenceA :: Applicative f => Id (f a) -> f (Id a) #

mapM :: Monad m => (a -> m b) -> Id a -> m (Id b) #

sequence :: Monad m => Id (m a) -> m (Id a) #

Applicative Id Source # 
Instance details

Defined in Algebra.Types

Methods

pure :: a -> Id a #

(<*>) :: Id (a -> b) -> Id a -> Id b #

liftA2 :: (a -> b -> c) -> Id a -> Id b -> Id c #

(*>) :: Id a -> Id b -> Id b #

(<*) :: Id a -> Id b -> Id a #

Functor Id Source # 
Instance details

Defined in Algebra.Types

Methods

fmap :: (a -> b) -> Id a -> Id b #

(<$) :: a -> Id b -> Id a #

Distributive Id Source # 
Instance details

Defined in Algebra.Types

Methods

distribute :: Functor f => f (Id a) -> Id (f a) #

collect :: Functor f => (a -> Id b) -> f a -> Id (f b) #

distributeM :: Monad m => m (Id a) -> Id (m a) #

collectM :: Monad m => (a -> Id b) -> m a -> Id (m b) #

VectorR Id Source # 
Instance details

Defined in Algebra.Linear

Methods

vectorSplit :: forall (f :: Type -> Type) (g :: Type -> Type). Id ~ (f g) => Dict (VectorR f, VectorR g) Source #

vectorCut :: forall (f :: Type -> Type) (g :: Type -> Type). Id ~ (f g) => Dict (VectorR f, VectorR g) Source #

Generic1 Id Source # 
Instance details

Defined in Algebra.Types

Associated Types

type Rep1 Id :: k -> Type #

Methods

from1 :: forall (a :: k). Id a -> Rep1 Id a #

to1 :: forall (a :: k). Rep1 Id a -> Id a #

Show x => Show (Id x) Source # 
Instance details

Defined in Algebra.Types

Methods

showsPrec :: Int -> Id x -> ShowS #

show :: Id x -> String #

showList :: [Id x] -> ShowS #

Eq x => Eq (Id x) Source # 
Instance details

Defined in Algebra.Types

Methods

(==) :: Id x -> Id x -> Bool #

(/=) :: Id x -> Id x -> Bool #

Monoidal ((∘) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) Id NatTrans Source # 
Instance details

Defined in Algebra.Category.NatTrans

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj NatTrans a, Obj NatTrans b, Obj NatTrans c, Obj NatTrans d) => NatTrans a b -> NatTrans c d -> NatTrans (a c) (b d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj NatTrans a, Obj NatTrans b, Obj NatTrans c) => NatTrans ((a b) c) (a (b c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj NatTrans a, Obj NatTrans b, Obj NatTrans c) => NatTrans (a (b c)) ((a b) c) Source #

unitorR :: forall (a :: k). (Obj NatTrans a, Obj NatTrans Id) => NatTrans a (a Id) Source #

unitorR_ :: forall (a :: k). (Obj NatTrans a, Obj NatTrans Id) => NatTrans (a Id) a Source #

unitorL :: forall (a :: k). (Obj NatTrans a, Obj NatTrans Id) => NatTrans a (Id a) Source #

unitorL_ :: forall (a :: k). (Obj NatTrans a, Obj NatTrans Id) => NatTrans (Id a) a Source #

Ring s => Braided ((∘) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) Id (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

Methods

swap :: forall (a :: k) (b :: k). (Obj (Mat s) a, Obj (Mat s) b) => Mat s (a b) (b a) Source #

swap_ :: forall (a :: k) (b :: k). (Obj (Mat s) a, Obj (Mat s) b) => Mat s (a b) (b a) Source #

Ring s => Monoidal ((∘) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) Id (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

Methods

(⊗) :: forall (a :: k) (b :: k) (c :: k) (d :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c, Obj (Mat s) d) => Mat s a b -> Mat s c d -> Mat s (a c) (b d) Source #

assoc :: forall (a :: k) (b :: k) (c :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c) => Mat s ((a b) c) (a (b c)) Source #

assoc_ :: forall (a :: k) (b :: k) (c :: k). (Obj (Mat s) a, Obj (Mat s) b, Obj (Mat s) c) => Mat s (a (b c)) ((a b) c) Source #

unitorR :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) Id) => Mat s a (a Id) Source #

unitorR_ :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) Id) => Mat s (a Id) a Source #

unitorL :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) Id) => Mat s a (Id a) Source #

unitorL_ :: forall (a :: k). (Obj (Mat s) a, Obj (Mat s) Id) => Mat s (Id a) a Source #

Ring s => Symmetric ((∘) :: (Type -> Type) -> (Type -> Type) -> Type -> Type) Id (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

type Rep Id Source # 
Instance details

Defined in Algebra.Types

type Rep Id = One :: Type
type Rep1 Id Source # 
Instance details

Defined in Algebra.Types

type Rep1 Id = D1 ('MetaData "Id" "Algebra.Types" "gasp-1.4.0.0-4Z31dYmTpJbCzuuYkBBWRm" 'True) (C1 ('MetaCons "Id" 'PrefixI 'True) (S1 ('MetaSel ('Just "fromId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

data CompClosed (con :: Type -> Constraint) Source #

Constructors

CompClosed 

Fields