Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class Pointable t => Representable t where
- type Representation t :: *
- (<#>) :: Representation t -> a <:= t
- tabulate :: (Representation t -> a) -> t a
- index :: t a -> Representation t -> a
Documentation
class Pointable t => 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 6 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 Identity Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Identity type Representation Identity Source # | |
Representable ((->) e :: Type -> Type) Source # | |
Defined in Pandora.Paradigm.Primary.Functor.Function type Representation ((->) e) Source # (<#>) :: Representation ((->) e) -> a <:= (->) e Source # tabulate :: (Representation ((->) e) -> a) -> e -> a Source # index :: (e -> a) -> Representation ((->) e) -> a Source # |