reddit-0.3.0.0: Library for interfacing with Reddit's API
Safe HaskellNone
LanguageHaskell2010

Reddit.Types.Reddit

Documentation

type Reddit a = RedditT IO a Source #

newtype RedditT m a Source #

Constructors

RedditT (FreeT (RedditF m) m a) 

Instances

Instances details
MonadTrans RedditT Source # 
Instance details

Defined in Reddit.Types.Reddit

Methods

lift :: Monad m => m a -> RedditT m a #

Monad m => Monad (RedditT m) Source # 
Instance details

Defined in Reddit.Types.Reddit

Methods

(>>=) :: RedditT m a -> (a -> RedditT m b) -> RedditT m b #

(>>) :: RedditT m a -> RedditT m b -> RedditT m b #

return :: a -> RedditT m a #

Monad m => Functor (RedditT m) Source # 
Instance details

Defined in Reddit.Types.Reddit

Methods

fmap :: (a -> b) -> RedditT m a -> RedditT m b #

(<$) :: a -> RedditT m b -> RedditT m a #

Monad m => Applicative (RedditT m) Source # 
Instance details

Defined in Reddit.Types.Reddit

Methods

pure :: a -> RedditT m a #

(<*>) :: RedditT m (a -> b) -> RedditT m a -> RedditT m b #

liftA2 :: (a -> b -> c) -> RedditT m a -> RedditT m b -> RedditT m c #

(*>) :: RedditT m a -> RedditT m b -> RedditT m b #

(<*) :: RedditT m a -> RedditT m b -> RedditT m a #

MonadIO m => MonadIO (RedditT m) Source # 
Instance details

Defined in Reddit.Types.Reddit

Methods

liftIO :: IO a -> RedditT m a #

data RedditF m a where Source #

Constructors

FailWith :: APIError RedditError -> RedditF m a 
Nest :: RedditT m b -> (Either (APIError RedditError) b -> a) -> RedditF m a 
NestResuming :: RedditT m b -> (Either (APIError RedditError, Maybe (RedditT m b)) b -> a) -> RedditF m a 
ReceiveRoute :: Receivable b => Route -> (b -> a) -> RedditF m a 
RunRoute :: FromJSON b => Route -> (b -> a) -> RedditF m a 
WithBaseURL :: Text -> RedditT m b -> (b -> a) -> RedditF m a 
WithHeaders :: ([Header] -> [Header]) -> RedditT m b -> (b -> a) -> RedditF m a 

Instances

Instances details
Functor (RedditF m) Source # 
Instance details

Defined in Reddit.Types.Reddit

Methods

fmap :: (a -> b) -> RedditF m a -> RedditF m b #

(<$) :: a -> RedditF m b -> RedditF m a #

withBaseURL :: Monad m => Text -> RedditT m a -> RedditT m a Source #

withHeaders :: Monad m => ([Header] -> [Header]) -> RedditT m a -> RedditT m a Source #

newtype Modhash Source #

Constructors

Modhash Text 

Instances

Instances details
Eq Modhash Source # 
Instance details

Defined in Reddit.Types.Reddit

Methods

(==) :: Modhash -> Modhash -> Bool #

(/=) :: Modhash -> Modhash -> Bool #

Read Modhash Source # 
Instance details

Defined in Reddit.Types.Reddit

Show Modhash Source # 
Instance details

Defined in Reddit.Types.Reddit

FromJSON Modhash Source # 
Instance details

Defined in Reddit.Types.Reddit

newtype POSTWrapped a Source #

Constructors

POSTWrapped a 

Instances

Instances details
Functor POSTWrapped Source # 
Instance details

Defined in Reddit.Types.Reddit

Methods

fmap :: (a -> b) -> POSTWrapped a -> POSTWrapped b #

(<$) :: a -> POSTWrapped b -> POSTWrapped a #

Eq a => Eq (POSTWrapped a) Source # 
Instance details

Defined in Reddit.Types.Reddit

Read a => Read (POSTWrapped a) Source # 
Instance details

Defined in Reddit.Types.Reddit

Show a => Show (POSTWrapped a) Source # 
Instance details

Defined in Reddit.Types.Reddit

FromJSON (POSTWrapped [CommentReference]) Source # 
Instance details

Defined in Reddit.Types.Comment

FromJSON (POSTWrapped CaptchaID) Source # 
Instance details

Defined in Reddit.Types.Captcha

FromJSON (POSTWrapped PostID) Source # 
Instance details

Defined in Reddit.Types.Post

FromJSON (POSTWrapped Comment) Source # 
Instance details

Defined in Reddit.Types.Comment

FromJSON (POSTWrapped CommentID) Source # 
Instance details

Defined in Reddit.Types.Comment

FromJSON (POSTWrapped MessageID) Source # 
Instance details

Defined in Reddit.Types.Message