invertible-0.2.0.5: bidirectional arrows, bijective functions, and invariant functors

Control.Invertible.Functor

Description

This provides a subset of the functionality as the invariant package's Data.Functor.Invariant module, but based on Data.Invertible, without all the instances, and with an interface matching Data.Functor.

This module is intended to be imported qualified, e.g.,:

import qualified Control.Invertible.Functor as Inv

Synopsis

Documentation

class Functor f where Source #

An invariant version of Functor, equivalent to Invariant.

Minimal complete definition

fmap

Methods

fmap :: (a <-> b) -> f a -> f b Source #

Instances

 Source # Methodsfmap :: (a <-> b) -> Endo a -> Endo b Source # Source # Methodsfmap :: (a <-> b) -> BiEndo a -> BiEndo b Source # Functor (Free f) Source # Methodsfmap :: (a <-> b) -> Free f a -> Free f b Source # (Semigroupoid * a, Arrow a) => Functor (Bijection a b) Source # Methodsfmap :: (a <-> b) -> Bijection a b a -> Bijection a b b Source #

fmapDefault :: Functor f => (a <-> b) -> f a -> f b Source #

Default invertible Functor implementation for simple non-invertible Functors.

(<\$>) :: Functor f => (a <-> b) -> f a -> f b infixl 4 Source #

An infix synnonym for fmap.