invertible-0.2.0.8: bidirectional arrows, bijective functions, and invariant functors
Safe HaskellSafe-Inferred
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.

Methods

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

Instances

Instances details
Functor Endo Source # 
Instance details

Defined in Control.Invertible.Functor

Methods

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

Functor BiEndo Source # 
Instance details

Defined in Control.Invertible.Functor

Methods

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

Functor (Free f) Source # 
Instance details

Defined in Control.Invertible.Monoidal.Free

Methods

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

Functor m => Functor (MaybeT m) Source # 
Instance details

Defined in Control.Invertible.Monoidal

Methods

fmap :: (a <-> b) -> MaybeT m a -> MaybeT m b Source #

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

Defined in Control.Invertible.Functor

Methods

fmap :: (a0 <-> b0) -> Bijection a b a0 -> Bijection a b b0 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.