pandora-0.2.8: A box of patterns and paradigms

Safe HaskellSafe
LanguageHaskell2010

Pandora.Pattern.Functor.Representable

Synopsis

Documentation

class Pointable t => Representable t where Source #

When providing a new instance, you should ensure it satisfies the three laws:
* Isomorphism (to): tabulate . index ≡ identity
* Isomorphism (from): index . tabulate ≡ identity
* Right adjoint: tabulate . point ≡ point
* Interchange tabulation: comap f . tabulate ≡ tabulate . comap f

Minimal complete definition

(<#>), tabulate

Associated Types

type Representation t :: * Source #

Methods

(<#>) :: Representation t -> a <-| t Source #

Infix and flipped version of index

tabulate :: (Representation t -> a) -> t a Source #

index :: t a -> Representation t -> a Source #

Prefix and flipped version of <#>

Instances
Representable Delta Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Functor.Delta

Associated Types

type Representation Delta :: Type Source #

Representable Identity Source # 
Instance details

Defined in Pandora.Paradigm.Primary.Functor.Identity

Associated Types

type Representation Identity :: Type Source #

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

Defined in Pandora.Pattern.Functor.Representable

Associated Types

type Representation ((->) e) :: Type Source #

Methods

(<#>) :: Representation ((->) e) -> a <-| (->) e Source #

tabulate :: (Representation ((->) e) -> a) -> e -> a Source #

index :: (e -> a) -> Representation ((->) e) -> a Source #