Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class Representable t where
- type Representation t :: *
- (<#>) :: Representation t -> a <:= t
- tabulate :: (Representation t -> a) -> t a
- index :: t a -> Representation t -> a
Documentation
class Representable t where Source #
When providing a new instance, you should ensure it satisfies: * Isomorphism (to): tabulate . index ≡ identity * Isomorphism (from): index . tabulate ≡ identity * Right adjoint: tabulate . point ≡ point * Interchange tabulation: comap f . tabulate ≡ tabulate . comap f
type Representation t :: * Source #
(<#>) :: Representation t -> a <:= t infixr 7 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 Exactly Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Exactly type Representation Exactly Source # |