categories-1.0.7: Categories
Copyright2008-2010 Edward Kmett
LicenseBSD3
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable (functional-dependencies)
Safe HaskellTrustworthy
LanguageHaskell2010

Control.Categorical.Functor

Description

A more categorical definition of Functor

Documentation

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

Methods

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

Instances

Instances details
Functor [] ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Categorical.Functor

Methods

fmap :: (a -> b) -> [a] -> [b] Source #

Functor Maybe ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Categorical.Functor

Methods

fmap :: (a -> b) -> Maybe a -> Maybe b Source #

Functor IO ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Categorical.Functor

Methods

fmap :: (a -> b) -> IO a -> IO b Source #

Functor (Either a) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Categorical.Functor

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b Source #

Functor ((,) a) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Categorical.Functor

Methods

fmap :: (a0 -> b) -> (a, a0) -> (a, b) Source #

Functor f => Functor (LiftedFunctor f) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Categorical.Functor

Methods

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

class Functor f a a => Endofunctor f a Source #

Instances

Instances details
Functor f a a => Endofunctor f a Source # 
Instance details

Defined in Control.Categorical.Functor

newtype LiftedFunctor f a Source #

Constructors

LiftedFunctor (f a) 

Instances

Instances details
Functor f => Functor (LiftedFunctor f) ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) 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)

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

toConstr :: LiftedFunctor f a -> Constr

dataTypeOf :: LiftedFunctor f a -> DataType

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

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

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

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

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

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

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

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

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

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

Read (f a) => Read (LiftedFunctor f a) Source # 
Instance details

Defined in Control.Categorical.Functor

Methods

readsPrec :: Int -> ReadS (LiftedFunctor f a)

readList :: ReadS [LiftedFunctor f a]

readPrec :: ReadPrec (LiftedFunctor f a)

readListPrec :: ReadPrec [LiftedFunctor f a]

Show (f a) => Show (LiftedFunctor f a) Source # 
Instance details

Defined in Control.Categorical.Functor

Methods

showsPrec :: Int -> LiftedFunctor f a -> ShowS

show :: LiftedFunctor f a -> String

showList :: [LiftedFunctor f a] -> ShowS

newtype LoweredFunctor f a Source #

Constructors

LoweredFunctor (f a) 

Instances

Instances details
Functor f ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) => Functor (LoweredFunctor f) Source # 
Instance details

Defined in Control.Categorical.Functor

Methods

fmap :: (a -> b) -> LoweredFunctor f a -> LoweredFunctor f b

(<$) :: a -> LoweredFunctor f b -> LoweredFunctor f a

(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)

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

toConstr :: LoweredFunctor f a -> Constr

dataTypeOf :: LoweredFunctor f a -> DataType

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

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

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

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

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

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

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

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

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

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

Read (f a) => Read (LoweredFunctor f a) Source # 
Instance details

Defined in Control.Categorical.Functor

Methods

readsPrec :: Int -> ReadS (LoweredFunctor f a)

readList :: ReadS [LoweredFunctor f a]

readPrec :: ReadPrec (LoweredFunctor f a)

readListPrec :: ReadPrec [LoweredFunctor f a]

Show (f a) => Show (LoweredFunctor f a) Source # 
Instance details

Defined in Control.Categorical.Functor

Methods

showsPrec :: Int -> LoweredFunctor f a -> ShowS

show :: LoweredFunctor f a -> String

showList :: [LoweredFunctor f a] -> ShowS