categories-1.0.7: Categories

Copyright | 2008-2010 Edward Kmett
License | BSD3
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | non-portable (functional-dependencies)
Safe Haskell | Trustworthy
Language | Haskell2010

Control.Categorical.Functor

Description

A more categorical definition of `Functor`

# Documentation

class (Category r, Category t) => Functor (f :: Type -> Type) (r :: Type -> Type -> Type) (t :: Type -> Type -> Type) | f r -> t, f t -> r where Source #

Methods

fmap :: r a b -> t (f a) (f b) Source #

#### Instances

Instances details

Functor IO (->) (->) Source # |
Instance details Defined in Control.Categorical.Functor Methods fmap :: (a -> b) -> IO a -> IO b Source #
Functor Maybe (->) (->) Source # |
Instance details Defined in Control.Categorical.Functor Methods fmap :: (a -> b) -> Maybe a -> Maybe b Source #
Functor [] (->) (->) Source # |
Instance details Defined in Control.Categorical.Functor Methods fmap :: (a -> b) -> [a] -> [b] Source #
Functor f => Functor (LiftedFunctor f) (->) (->) Source # |
Instance details Defined in Control.Categorical.Functor Methods fmap :: (a -> b) -> LiftedFunctor f a -> LiftedFunctor f b Source #
Functor (Either a) (->) (->) Source # |
Instance details Defined in Control.Categorical.Functor Methods fmap :: (a0 -> b) -> Either a a0 -> Either a b Source #
Functor ((,) a) (->) (->) Source # |
Instance details Defined in Control.Categorical.Functor Methods fmap :: (a0 -> b) -> (a, a0) -> (a, b) Source #

class Functor f a a => Endofunctor (f :: Type -> Type) (a :: Type -> Type -> Type) Source #

#### Instances

Instances details

Functor f a a => Endofunctor f a Source # |
Instance details Defined in Control.Categorical.Functor

newtype LiftedFunctor (f :: Type -> Type) a Source #

Constructors

LiftedFunctor (f a) |

#### Instances

Instances details

Functor f => Functor (LiftedFunctor f) (->) (->) Source # |
Instance details Defined in Control.Categorical.Functor Methods fmap :: (a -> b) -> LiftedFunctor f a -> LiftedFunctor f b Source #
(Typeable f, Data (f a), Data a) => Data (LiftedFunctor f a) Source # |

Instance details

Defined in Control.Categorical.Functor

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LiftedFunctor f a -> c (LiftedFunctor f a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LiftedFunctor f a) Source #

toConstr :: LiftedFunctor f a -> Constr Source #

dataTypeOf :: LiftedFunctor f a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (LiftedFunctor f a)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LiftedFunctor f a)) Source #

gmapT :: (forall b. Data b => b -> b) -> LiftedFunctor f a -> LiftedFunctor f a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LiftedFunctor f a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LiftedFunctor f a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> LiftedFunctor f a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LiftedFunctor f a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LiftedFunctor f a -> m (LiftedFunctor f a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LiftedFunctor f a -> m (LiftedFunctor f a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LiftedFunctor f a -> m (LiftedFunctor f a) Source #

Read (f a) => Read (LiftedFunctor f a) Source # |
Instance details Defined in Control.Categorical.Functor Methods readsPrec :: Int -> ReadS (LiftedFunctor f a) Source # readList :: ReadS [LiftedFunctor f a] Source # readPrec :: ReadPrec (LiftedFunctor f a) Source # readListPrec :: ReadPrec [LiftedFunctor f a] Source #
Show (f a) => Show (LiftedFunctor f a) Source # |
Instance details Defined in Control.Categorical.Functor Methods showsPrec :: Int -> LiftedFunctor f a -> ShowS Source # show :: LiftedFunctor f a -> String Source # showList :: [LiftedFunctor f a] -> ShowS Source #

newtype LoweredFunctor (f :: Type -> Type) a Source #

Constructors

LoweredFunctor (f a) |

#### Instances

Instances details

Functor f (->) (->) => Functor (LoweredFunctor f) Source # |
Instance details Defined in Control.Categorical.Functor Methods fmap :: (a -> b) -> LoweredFunctor f a -> LoweredFunctor f b Source # (<$) :: a -> LoweredFunctor f b -> LoweredFunctor f a Source #
(Typeable f, Data (f a), Data a) => Data (LoweredFunctor f a) Source # |

Instance details

Defined in Control.Categorical.Functor

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LoweredFunctor f a -> c (LoweredFunctor f a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LoweredFunctor f a) Source #

toConstr :: LoweredFunctor f a -> Constr Source #

dataTypeOf :: LoweredFunctor f a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (LoweredFunctor f a)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LoweredFunctor f a)) Source #

gmapT :: (forall b. Data b => b -> b) -> LoweredFunctor f a -> LoweredFunctor f a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LoweredFunctor f a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LoweredFunctor f a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> LoweredFunctor f a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LoweredFunctor f a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LoweredFunctor f a -> m (LoweredFunctor f a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LoweredFunctor f a -> m (LoweredFunctor f a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LoweredFunctor f a -> m (LoweredFunctor f a) Source #

Read (f a) => Read (LoweredFunctor f a) Source # |
Instance details Defined in Control.Categorical.Functor Methods readsPrec :: Int -> ReadS (LoweredFunctor f a) Source # readList :: ReadS [LoweredFunctor f a] Source # readPrec :: ReadPrec (LoweredFunctor f a) Source # readListPrec :: ReadPrec [LoweredFunctor f a] Source #
Show (f a) => Show (LoweredFunctor f a) Source # |
Instance details Defined in Control.Categorical.Functor Methods showsPrec :: Int -> LoweredFunctor f a -> ShowS Source # show :: LoweredFunctor f a -> String Source # showList :: [LoweredFunctor f a] -> ShowS Source #