imm-1.2.1.0: Execute arbitrary actions for each unread element of RSS/Atom feeds

Safe HaskellNone
LanguageHaskell98

Imm.Prelude

Contents

Synopsis

Free monad utilities

type (:::) a b = (a, b) infixr 0 Source #

Right-associative tuple type-constructor

(+:) :: a -> b -> (a, b) infixr 0 Source #

Right-associative tuple data-constructor

(*:) :: (Functor f, Functor g) => (a -> f a) -> (b -> g b) -> (a, b) -> Product f g (a, b) infixr 0 Source #

data HLeft Source #

Instances

Sub HLeft a (Sum * a b) Source # 

Methods

inj' :: Tagged * HLeft (a a -> Sum * a b a) Source #

data HRight Source #

Instances

Sub x f g => Sub (HRight, x) f (Sum * h g) Source # 

Methods

inj' :: Tagged * (HRight, x) (f a -> Sum * h g a) Source #

data HId Source #

Instances

Sub HId a a Source # 

Methods

inj' :: Tagged * HId (a a -> a a) Source #

data HNo Source #

type family Contains a b where ... Source #

Equations

Contains a a = HId 
Contains a (Sum a b) = HLeft 
Contains a (Sum b c) = (HRight, Contains a c) 
Contains a b = HNo 

class Sub i sub sup where Source #

Minimal complete definition

inj'

Methods

inj' :: Tagged i (sub a -> sup a) Source #

Instances

Sub HId a a Source # 

Methods

inj' :: Tagged * HId (a a -> a a) Source #

Sub HLeft a (Sum * a b) Source # 

Methods

inj' :: Tagged * HLeft (a a -> Sum * a b a) Source #

Sub x f g => Sub (HRight, x) f (Sum * h g) Source # 

Methods

inj' :: Tagged * (HRight, x) (f a -> Sum * h g a) Source #

class (Functor sub, Functor sup) => sub :<: sup where Source #

A constraint f :<: g expresses that f is subsumed by g, i.e. f can be used to construct elements in g.

Minimal complete definition

inj

Methods

inj :: sub a -> sup a Source #

Instances

(Functor f, Functor g, Sub (Contains f g) f g) => f :<: g Source # 

Methods

inj :: f a -> g a Source #

class (Monad m, Functor f, Functor g) => PairingM f g m | f -> g where Source #

Functors f and g are paired when they can annihilate each other

Minimal complete definition

pairM

Methods

pairM :: (a -> b -> m r) -> f a -> g b -> m r Source #

Instances

Monad m => PairingM Identity Identity m Source # 

Methods

pairM :: (a -> b -> m r) -> Identity a -> Identity b -> m r Source #

Monad m => PairingM (CoLoggerF m) LoggerF m Source # 

Methods

pairM :: (a -> b -> m r) -> CoLoggerF m a -> LoggerF b -> m r Source #

Monad m => PairingM (CoHooksF m) HooksF m Source # 

Methods

pairM :: (a -> b -> m r) -> CoHooksF m a -> HooksF b -> m r Source #

Monad m => PairingM (CoHttpClientF m) HttpClientF m Source # 

Methods

pairM :: (a -> b -> m r) -> CoHttpClientF m a -> HttpClientF b -> m r Source #

Monad m => PairingM (CoXmlParserF m) XmlParserF m Source # 

Methods

pairM :: (a -> b -> m r) -> CoXmlParserF m a -> XmlParserF b -> m r Source #

Monad m => PairingM (CoDatabaseF t m) (DatabaseF t) m Source # 

Methods

pairM :: (a -> b -> m r) -> CoDatabaseF t m a -> DatabaseF t b -> m r Source #

(PairingM f f' m, PairingM g g' m) => PairingM (Sum * f g) (Product * f' g') m Source # 

Methods

pairM :: (a -> b -> m r) -> Sum * f g a -> Product * f' g' b -> m r Source #

(PairingM f f' m, PairingM g g' m) => PairingM (Product * f g) (Sum * f' g') m Source # 

Methods

pairM :: (a -> b -> m r) -> Product * f g a -> Sum * f' g' b -> m r Source #

interpret :: PairingM f g m => (a -> b -> m r) -> Cofree f a -> FreeT g m b -> m r Source #

Shortcuts

type Text = Text Source #

show :: (Show a, IsString b) => a -> b Source #

Generic show

io :: MonadIO m => IO a -> m a Source #

Shortcut to liftIO

(<++>) :: Doc -> Doc -> Doc Source #

Infix operator for line