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

Safe HaskellNone
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 #

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.