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

Safe HaskellSafe
LanguageHaskell2010

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

Functor Endo Source # 

Methods

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

Functor BiEndo Source # 

Methods

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

Functor (Free f) Source # 

Methods

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

(Semigroupoid * a, Arrow a) => Functor (Bijection a b) Source # 

Methods

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

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

An infix synnonym for fmap.