rings-0.1.1.1: Ring-like objects.

Safe HaskellSafe
LanguageHaskell2010

Data.Semimodule.Transform

Contents

Synopsis

Types

type (**) f g = Compose f g infixr 2 Source #

A tensor product of semimodule morphisms.

type (++) f g = Product f g infixr 1 Source #

A direct sum of free semimodule elements.

Linear functionals

data Dual a c Source #

Linear functionals from elements of a free semimodule to a scalar.

f !* (x + y) = (f !* x) + (f !* y)
f !* (x .* a) = a * (f !* x)
Instances
RightSemimodule r s => RightSemimodule r (Dual s m) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

rscale :: r -> Dual s m -> Dual s m Source #

LeftSemimodule r s => LeftSemimodule r (Dual s m) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

lscale :: r -> Dual s m -> Dual s m Source #

Monad (Dual a) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

(>>=) :: Dual a a0 -> (a0 -> Dual a b) -> Dual a b #

(>>) :: Dual a a0 -> Dual a b -> Dual a b #

return :: a0 -> Dual a a0 #

fail :: String -> Dual a a0 #

Functor (Dual a) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

fmap :: (a0 -> b) -> Dual a a0 -> Dual a b #

(<$) :: a0 -> Dual a b -> Dual a a0 #

Applicative (Dual a) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

pure :: a0 -> Dual a a0 #

(<*>) :: Dual a (a0 -> b) -> Dual a a0 -> Dual a b #

liftA2 :: (a0 -> b -> c) -> Dual a a0 -> Dual a b -> Dual a c #

(*>) :: Dual a a0 -> Dual a b -> Dual a b #

(<*) :: Dual a a0 -> Dual a b -> Dual a a0 #

Coalgebra a b => Semigroup (Multiplicative (Dual a b)) Source # 
Instance details

Defined in Data.Semimodule.Transform

(Additive - Semigroup) a => Semigroup (Additive (Dual a b)) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

(<>) :: Additive (Dual a b) -> Additive (Dual a b) -> Additive (Dual a b) #

sconcat :: NonEmpty (Additive (Dual a b)) -> Additive (Dual a b) #

stimes :: Integral b0 => b0 -> Additive (Dual a b) -> Additive (Dual a b) #

Counital a b => Monoid (Multiplicative (Dual a b)) Source # 
Instance details

Defined in Data.Semimodule.Transform

(Additive - Monoid) a => Monoid (Additive (Dual a b)) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

mempty :: Additive (Dual a b) #

mappend :: Additive (Dual a b) -> Additive (Dual a b) -> Additive (Dual a b) #

mconcat :: [Additive (Dual a b)] -> Additive (Dual a b) #

(Additive - Monoid) a => Alternative (Dual a) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

empty :: Dual a a0 #

(<|>) :: Dual a a0 -> Dual a a0 -> Dual a a0 #

some :: Dual a a0 -> Dual a [a0] #

many :: Dual a a0 -> Dual a [a0] #

(Additive - Monoid) a => MonadPlus (Dual a) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

mzero :: Dual a a0 #

mplus :: Dual a a0 -> Dual a a0 -> Dual a a0 #

(Additive - Group) a => Group (Additive (Dual a b)) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

inv :: Additive (Dual a b) -> Additive (Dual a b) #

greplicate :: Integer -> Additive (Dual a b) -> Additive (Dual a b) #

(Additive - Group) a => Loop (Additive (Dual a b)) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

lempty :: Additive (Dual a b) #

lreplicate :: Natural -> Additive (Dual a b) -> Additive (Dual a b) #

(Additive - Group) a => Quasigroup (Additive (Dual a b)) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

(//) :: Additive (Dual a b) -> Additive (Dual a b) -> Additive (Dual a b) #

(\\) :: Additive (Dual a b) -> Additive (Dual a b) -> Additive (Dual a b) #

(Additive - Group) a => Magma (Additive (Dual a b)) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

(<<) :: Additive (Dual a b) -> Additive (Dual a b) -> Additive (Dual a b) #

(Ring a, Counital a b) => Ring (Dual a b) Source # 
Instance details

Defined in Data.Semimodule.Transform

Counital a b => Semiring (Dual a b) Source # 
Instance details

Defined in Data.Semimodule.Transform

Coalgebra a b => Presemiring (Dual a b) Source # 
Instance details

Defined in Data.Semimodule.Transform

Counital r m => RightSemimodule (Dual r m) (Dual r m) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

rscale :: Dual r m -> Dual r m -> Dual r m Source #

Counital r m => LeftSemimodule (Dual r m) (Dual r m) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

lscale :: Dual r m -> Dual r m -> Dual r m Source #

dual :: FreeCounital a f => f a -> Dual a (Rep f) Source #

Take the dual of a vector.

>>> dual (V2 3 4) !% V2 1 2 :: Int
11

image' :: Semiring a => Foldable f => f (a, c) -> Dual a c Source #

Create a Dual from a linear combination of basis vectors.

>>> image' [(2, E31),(3, E32)] !* V3 1 1 1 :: Int
5

(!*) :: Free f => Dual a (Rep f) -> f a -> a infixr 3 Source #

Apply a linear functional to a vector.

(*!) :: Free f => f a -> Dual a (Rep f) -> a infixl 3 Source #

Apply a linear functional to a vector.

toTran :: (b -> Dual a c) -> Tran a b c Source #

Obtain a linear transfrom from a linear functional.

fromTran :: Tran a b c -> b -> Dual a c Source #

Obtain a linear functional from a linear transform.

Linear transformations

type Endo a b = Tran a b b Source #

An endomorphism over a free semimodule.

>>> one + two !# V2 1 2 :: V2 Double
V2 3.0 6.0

data Tran a b c Source #

A linear transformation between free semimodules indexed with bases b and c.

f '!#' x '+' y = (f '!#' x) + (f '!#' y)
f '!#' (r '.*' x) = r '.*' (f '!#' x)
Instances
RightSemimodule r s => RightSemimodule r (Tran s b m) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

rscale :: r -> Tran s b m -> Tran s b m Source #

LeftSemimodule r s => LeftSemimodule r (Tran s b m) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

lscale :: r -> Tran s b m -> Tran s b m Source #

Coalgebra a c => Semigroup (Multiplicative (Tran a b c)) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

(<>) :: Multiplicative (Tran a b c) -> Multiplicative (Tran a b c) -> Multiplicative (Tran a b c) #

sconcat :: NonEmpty (Multiplicative (Tran a b c)) -> Multiplicative (Tran a b c) #

stimes :: Integral b0 => b0 -> Multiplicative (Tran a b c) -> Multiplicative (Tran a b c) #

(Additive - Semigroup) a => Semigroup (Additive (Tran a b c)) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

(<>) :: Additive (Tran a b c) -> Additive (Tran a b c) -> Additive (Tran a b c) #

sconcat :: NonEmpty (Additive (Tran a b c)) -> Additive (Tran a b c) #

stimes :: Integral b0 => b0 -> Additive (Tran a b c) -> Additive (Tran a b c) #

Counital a c => Monoid (Multiplicative (Tran a b c)) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

mempty :: Multiplicative (Tran a b c) #

mappend :: Multiplicative (Tran a b c) -> Multiplicative (Tran a b c) -> Multiplicative (Tran a b c) #

mconcat :: [Multiplicative (Tran a b c)] -> Multiplicative (Tran a b c) #

(Additive - Monoid) a => Monoid (Additive (Tran a b c)) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

mempty :: Additive (Tran a b c) #

mappend :: Additive (Tran a b c) -> Additive (Tran a b c) -> Additive (Tran a b c) #

mconcat :: [Additive (Tran a b c)] -> Additive (Tran a b c) #

Arrow (Tran a) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

arr :: (b -> c) -> Tran a b c #

first :: Tran a b c -> Tran a (b, d) (c, d) #

second :: Tran a b c -> Tran a (d, b) (d, c) #

(***) :: Tran a b c -> Tran a b' c' -> Tran a (b, b') (c, c') #

(&&&) :: Tran a b c -> Tran a b c' -> Tran a b (c, c') #

(Additive - Monoid) a => ArrowZero (Tran a) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

zeroArrow :: Tran a b c #

(Additive - Monoid) a => ArrowPlus (Tran a) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

(<+>) :: Tran a b c -> Tran a b c -> Tran a b c #

ArrowChoice (Tran a) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

left :: Tran a b c -> Tran a (Either b d) (Either c d) #

right :: Tran a b c -> Tran a (Either d b) (Either d c) #

(+++) :: Tran a b c -> Tran a b' c' -> Tran a (Either b b') (Either c c') #

(|||) :: Tran a b d -> Tran a c d -> Tran a (Either b c) d #

ArrowApply (Tran a) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

app :: Tran a (Tran a b c, b) c #

(Additive - Group) a => Group (Additive (Tran a b c)) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

inv :: Additive (Tran a b c) -> Additive (Tran a b c) #

greplicate :: Integer -> Additive (Tran a b c) -> Additive (Tran a b c) #

(Additive - Group) a => Loop (Additive (Tran a b c)) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

lempty :: Additive (Tran a b c) #

lreplicate :: Natural -> Additive (Tran a b c) -> Additive (Tran a b c) #

(Additive - Group) a => Quasigroup (Additive (Tran a b c)) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

(//) :: Additive (Tran a b c) -> Additive (Tran a b c) -> Additive (Tran a b c) #

(\\) :: Additive (Tran a b c) -> Additive (Tran a b c) -> Additive (Tran a b c) #

(Additive - Group) a => Magma (Additive (Tran a b c)) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

(<<) :: Additive (Tran a b c) -> Additive (Tran a b c) -> Additive (Tran a b c) #

Category (Tran a :: Type -> Type -> Type) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

id :: Tran a a0 a0 #

(.) :: Tran a b c -> Tran a a0 b -> Tran a a0 c #

Monad (Tran a b) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

(>>=) :: Tran a b a0 -> (a0 -> Tran a b b0) -> Tran a b b0 #

(>>) :: Tran a b a0 -> Tran a b b0 -> Tran a b b0 #

return :: a0 -> Tran a b a0 #

fail :: String -> Tran a b a0 #

Functor (Tran a b) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

fmap :: (a0 -> b0) -> Tran a b a0 -> Tran a b b0 #

(<$) :: a0 -> Tran a b b0 -> Tran a b a0 #

Applicative (Tran a b) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

pure :: a0 -> Tran a b a0 #

(<*>) :: Tran a b (a0 -> b0) -> Tran a b a0 -> Tran a b b0 #

liftA2 :: (a0 -> b0 -> c) -> Tran a b a0 -> Tran a b b0 -> Tran a b c #

(*>) :: Tran a b a0 -> Tran a b b0 -> Tran a b b0 #

(<*) :: Tran a b a0 -> Tran a b b0 -> Tran a b a0 #

(Ring a, Counital a c) => Ring (Tran a b c) Source # 
Instance details

Defined in Data.Semimodule.Transform

Counital a c => Semiring (Tran a b c) Source # 
Instance details

Defined in Data.Semimodule.Transform

Coalgebra a c => Presemiring (Tran a b c) Source # 
Instance details

Defined in Data.Semimodule.Transform

Counital a m => RightSemimodule (Tran a b m) (Tran a b m) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

rscale :: Tran a b m -> Tran a b m -> Tran a b m Source #

Counital a m => LeftSemimodule (Tran a b m) (Tran a b m) Source # 
Instance details

Defined in Data.Semimodule.Transform

Methods

lscale :: Tran a b m -> Tran a b m -> Tran a b m Source #

arr :: Arrow a => (b -> c) -> a b c #

Lift a function to an arrow.

tran :: Free f => FreeCounital a g => (f ** g) a -> Tran a (Rep f) (Rep g) Source #

Lift a matrix into a linear transformation

 (.#) = (!#) . tran

image :: Semiring a => (b -> [(a, c)]) -> Tran a b c Source #

Create a Tran from a linear combination of basis vectors.

>>> image (e2 [(2, E31),(3, E32)] [(1, E33)]) !# V3 1 1 1 :: V2 Int
V2 5 1

(!#) :: Free f => Free g => Tran a (Rep f) (Rep g) -> g a -> f a infixr 2 Source #

Apply a transformation to a vector.

(#!) :: Free f => Free g => g a -> Tran a (Rep f) (Rep g) -> f a infixl 2 Source #

Apply a transformation to a vector.

(!#!) :: Tran a c d -> Tran a b c -> Tran a b d infix 2 Source #

Compose two transformations.

dimap :: (b1 -> b2) -> (c1 -> c2) -> Tran a b2 c1 -> Tran a b1 c2 Source #

Tran is a profunctor in the category of semimodules.

Caution: Arbitrary mapping functions may violate linearity.

>>> dimap id (e3 True True False) (arr id) !# 4 :+ 5 :: V3 Int
V3 5 5 4

invmap :: (a1 -> a2) -> (a2 -> a1) -> Tran a1 b c -> Tran a2 b c Source #

Tran is an invariant functor.

See also http://comonad.com/reader/2008/rotten-bananas/.

Common linear functionals and transformations

init :: Unital a b => Tran a b () Source #

TODO: Document

init' :: Unital a b => b -> Dual a () Source #

TODO: Document

coinit :: Counital a c => Tran a () c Source #

TODO: Document

coinit' :: Counital a c => Dual a c Source #

TODO: Document

braid :: Tran a (b, c) (c, b) Source #

Swap components of a tensor product.

cobraid :: Tran a (b + c) (c + b) Source #

Swap components of a direct sum.

join :: Algebra a b => Tran a b (b, b) Source #

TODO: Document

join' :: Algebra a b => b -> Dual a (b, b) Source #

TODO: Document

cojoin :: Coalgebra a c => Tran a (c, c) c Source #

TODO: Document

cojoin' :: Coalgebra a c => c -> c -> Dual a c Source #

TODO: Document

Other operations on linear functionals and transformations

split :: (b -> (b1, b2)) -> Tran a b1 c -> Tran a b2 c -> Tran a b c Source #

TODO: Document

cosplit :: ((c1 + c2) -> c) -> Tran a b c1 -> Tran a b c2 -> Tran a b c Source #

TODO: Document

convolve :: Algebra a b => Coalgebra a c => Tran a b c -> Tran a b c -> Tran a b c Source #

Convolution with an associative algebra and coassociative coalgebra

convolve' :: Algebra a b => Coalgebra a c => (b -> Dual a c) -> (b -> Dual a c) -> b -> Dual a c Source #

TODO: Document

commutator :: (Additive - Group) a => Endo a b -> Endo a b -> Endo a b Source #

Commutator or Lie bracket of two semimodule endomorphisms.

Matrix arithmetic

(.#) :: Free f => FreeCounital a g => (f ** g) a -> g a -> f a infixr 7 Source #

Multiply a matrix on the right by a column vector.

 (.#) = (!#) . tran
>>> tran (m23 1 2 3 4 5 6) !# V3 7 8 9 :: V2 Int
V2 50 122
>>> m23 1 2 3 4 5 6 .# V3 7 8 9 :: V2 Int
V2 50 122
>>> m22 1 0 0 0 .# m23 1 2 3 4 5 6 .# V3 7 8 9 :: V2 Int
V2 50 0

(#.) :: FreeCounital a f => Free g => f a -> (f ** g) a -> g a infixl 7 Source #

Multiply a matrix on the left by a row vector.

>>> V2 1 2 #. m23 3 4 5 6 7 8
V3 15 18 21
>>> V2 1 2 #. m23 3 4 5 6 7 8 #. m32 1 0 0 0 0 0 :: V2 Int
V2 15 0

(.#.) :: Free f => FreeCounital a g => Free h => (f ** g) a -> (g ** h) a -> (f ** h) a infixr 7 Source #

Multiply two matrices.

>>> m22 1 2 3 4 .#. m22 1 2 3 4 :: M22 Int
Compose (V2 (V2 7 10) (V2 15 22))
>>> m23 1 2 3 4 5 6 .#. m32 1 2 3 4 4 5 :: M22 Int
Compose (V2 (V2 19 25) (V2 43 58))

outer :: Semiring a => Free f => Free g => f a -> g a -> (f ** g) a Source #

Outer product.

>>> V2 1 1 `outer` V2 1 1
Compose (V2 (V2 1 1) (V2 1 1))

inner :: FreeCounital a f => f a -> f a -> a infix 6 Source #

Inner product.

This is a variant of xmult restricted to free functors.

>>> V3 1 2 3 `inner` V3 1 2 3
14

quadrance :: FreeCounital a f => f a -> a Source #

Squared l2 norm of a vector.

trace :: FreeBialgebra a f => (f ** f) a -> a Source #

Trace of an endomorphism.

>>> trace $ m22 1.0 2.0 3.0 4.0
5.0

transpose :: Free f => Free g => (f ** g) a -> (g ** f) a Source #

Transpose a matrix.

>>> transpose $ m23 1 2 3 4 5 6 :: M32 Int
V3 (V2 1 4) (V2 2 5) (V2 3 6)

Matrix constructors and accessors

diag :: FreeCoalgebra a f => f a -> (f ** f) a Source #

Obtain a diagonal matrix from a vector.

 diag = flip bindRep id . getCompose

codiag :: FreeAlgebra a f => (f ** f) a -> f a Source #

Obtain the diagonal of a matrix as a vector.

 codiag f = tabulate $ append (index . index (getCompose f))
>>> codiag $ m22 1.0 2.0 3.0 4.0
V2 1.0 4.0

scalar :: FreeCoalgebra a f => a -> (f ** f) a Source #

Obtain a scalar matrix from a scalar.

>>> scalar 4.0 :: M22 Double
Compose (V2 (V2 4.0 0.0) (V2 0.0 4.0))

identity :: FreeCoalgebra a f => (f ** f) a Source #

Obtain an identity matrix.

>>> identity :: M33 Int
Compose (V3 (V3 1 0 0) (V3 0 1 0) (V3 0 0 1))

row :: Free f => Rep f -> (f ** g) a -> g a Source #

Retrieve a row of a matrix.

>>> row E22 $ m23 1 2 3 4 5 6
V3 4 5 6

rows :: Free f => Free g => g a -> (f ** g) a Source #

Obtain a matrix by stacking rows.

>>> rows (V2 1 2) :: M22 Int
V2 (V2 1 2) (V2 1 2)

col :: Free f => Free g => Rep g -> (f ** g) a -> f a Source #

Retrieve a column of a matrix.

>>> elt E22 . col E31 $ m23 1 2 3 4 5 6
4

cols :: Free f => Free g => f a -> (f ** g) a Source #

Obtain a matrix by stacking columns.

>>> cols (V2 1 2) :: M22 Int
V2 (V2 1 1) (V2 2 2)

projl :: Free f => Free g => (f ++ g) a -> f a Source #

Project onto the left-hand component of a direct sum.

projr :: Free f => Free g => (f ++ g) a -> g a Source #

Project onto the right-hand component of a direct sum.

compl :: Free f1 => Free f2 => Free g => Tran a (Rep f1) (Rep f2) -> (f2 ** g) a -> (f1 ** g) a Source #

Left (post) composition with a linear transformation.

compr :: Free f => Free g1 => Free g2 => Tran a (Rep g1) (Rep g2) -> (f ** g2) a -> (f ** g1) a Source #

Right (pre) composition with a linear transformation.

complr :: Free f1 => Free f2 => Free g1 => Free g2 => Tran a (Rep f1) (Rep f2) -> Tran a (Rep g1) (Rep g2) -> (f2 ** g2) a -> (f1 ** g1) a Source #

Left and right composition with a linear transformation.

 complr f g = compl f >>> compr g

Reexports

class Distributive f => Representable (f :: Type -> Type) where #

A Functor f is Representable if tabulate and index witness an isomorphism to (->) x.

Every Distributive Functor is actually Representable.

Every Representable Functor from Hask to Hask is a right adjoint.

tabulate . index  ≡ id
index . tabulate  ≡ id
tabulate . returnreturn

Minimal complete definition

Nothing

Associated Types

type Rep (f :: Type -> Type) :: Type #

If no definition is provided, this will default to GRep.

Methods

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

fmap f . tabulatetabulate . fmap f

If no definition is provided, this will default to gtabulate.

index :: f a -> Rep f -> a #

If no definition is provided, this will default to gindex.

Instances
Representable Par1 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Par1 :: Type #

Methods

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

index :: Par1 a -> Rep Par1 -> a #

Representable Complex 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Complex :: Type #

Methods

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

index :: Complex a -> Rep Complex -> a #

Representable Identity 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Identity :: Type #

Methods

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

index :: Identity a -> Rep Identity -> a #

Representable Dual 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Dual :: Type #

Methods

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

index :: Dual a -> Rep Dual -> a #

Representable Sum 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Sum :: Type #

Methods

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

index :: Sum a -> Rep Sum -> a #

Representable Product 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Product :: Type #

Methods

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

index :: Product a -> Rep Product -> a #

Representable Multiplicative Source # 
Instance details

Defined in Data.Semigroup.Additive

Associated Types

type Rep Multiplicative :: Type #

Representable Additive Source # 
Instance details

Defined in Data.Semigroup.Additive

Associated Types

type Rep Additive :: Type #

Methods

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

index :: Additive a -> Rep Additive -> a #

Representable V4 Source # 
Instance details

Defined in Data.Semimodule.Free

Associated Types

type Rep V4 :: Type #

Methods

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

index :: V4 a -> Rep V4 -> a #

Representable V3 Source # 
Instance details

Defined in Data.Semimodule.Free

Associated Types

type Rep V3 :: Type #

Methods

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

index :: V3 a -> Rep V3 -> a #

Representable V2 Source # 
Instance details

Defined in Data.Semimodule.Free

Associated Types

type Rep V2 :: Type #

Methods

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

index :: V2 a -> Rep V2 -> a #

Representable V1 Source # 
Instance details

Defined in Data.Semimodule.Free

Associated Types

type Rep V1 :: Type #

Methods

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

index :: V1 a -> Rep V1 -> a #

Representable (U1 :: Type -> Type) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep U1 :: Type #

Methods

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

index :: U1 a -> Rep U1 -> a #

Representable f => Representable (Co f) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (Co f) :: Type #

Methods

tabulate :: (Rep (Co f) -> a) -> Co f a #

index :: Co f a -> Rep (Co f) -> a #

Representable (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Proxy :: Type #

Methods

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

index :: Proxy a -> Rep Proxy -> a #

Representable f => Representable (Cofree f) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (Cofree f) :: Type #

Methods

tabulate :: (Rep (Cofree f) -> a) -> Cofree f a #

index :: Cofree f a -> Rep (Cofree f) -> a #

Representable f => Representable (Rec1 f) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (Rec1 f) :: Type #

Methods

tabulate :: (Rep (Rec1 f) -> a) -> Rec1 f a #

index :: Rec1 f a -> Rep (Rec1 f) -> a #

Representable w => Representable (TracedT s w) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (TracedT s w) :: Type #

Methods

tabulate :: (Rep (TracedT s w) -> a) -> TracedT s w a #

index :: TracedT s w a -> Rep (TracedT s w) -> a #

Representable m => Representable (IdentityT m) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (IdentityT m) :: Type #

Methods

tabulate :: (Rep (IdentityT m) -> a) -> IdentityT m a #

index :: IdentityT m a -> Rep (IdentityT m) -> a #

Representable m => Representable (ReaderT e m) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (ReaderT e m) :: Type #

Methods

tabulate :: (Rep (ReaderT e m) -> a) -> ReaderT e m a #

index :: ReaderT e m a -> Rep (ReaderT e m) -> a #

Representable (Tagged t) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (Tagged t) :: Type #

Methods

tabulate :: (Rep (Tagged t) -> a) -> Tagged t a #

index :: Tagged t a -> Rep (Tagged t) -> a #

Representable f => Representable (Reverse f) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (Reverse f) :: Type #

Methods

tabulate :: (Rep (Reverse f) -> a) -> Reverse f a #

index :: Reverse f a -> Rep (Reverse f) -> a #

Representable f => Representable (Backwards f) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (Backwards f) :: Type #

Methods

tabulate :: (Rep (Backwards f) -> a) -> Backwards f a #

index :: Backwards f a -> Rep (Backwards f) -> a #

Representable ((->) e :: Type -> Type) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep ((->) e) :: Type #

Methods

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

index :: (e -> a) -> Rep ((->) e) -> a #

(Representable f, Representable g) => Representable (f :*: g) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (f :*: g) :: Type #

Methods

tabulate :: (Rep (f :*: g) -> a) -> (f :*: g) a #

index :: (f :*: g) a -> Rep (f :*: g) -> a #

(Representable f, Representable g) => Representable (Product f g) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (Product f g) :: Type #

Methods

tabulate :: (Rep (Product f g) -> a) -> Product f g a #

index :: Product f g a -> Rep (Product f g) -> a #

Representable f => Representable (M1 i c f) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (M1 i c f) :: Type #

Methods

tabulate :: (Rep (M1 i c f) -> a) -> M1 i c f a #

index :: M1 i c f a -> Rep (M1 i c f) -> a #

(Representable f, Representable g) => Representable (f :.: g) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (f :.: g) :: Type #

Methods

tabulate :: (Rep (f :.: g) -> a) -> (f :.: g) a #

index :: (f :.: g) a -> Rep (f :.: g) -> a #

(Representable f, Representable g) => Representable (Compose f g) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (Compose f g) :: Type #

Methods

tabulate :: (Rep (Compose f g) -> a) -> Compose f g a #

index :: Compose f g a -> Rep (Compose f g) -> a #