Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Http :: Effect where
- HttpLbs :: Request -> Http m (Response ByteString)
- GenBoundary :: Http m ByteString
- data Telegraph :: Effect where
- type Telegraph' = Bundle '[Telegraph, Http, Error HttpException]
- type Http' = Bundle '[Http, Error HttpException]
- data TelegraphH
- type TelegraphC = InterpretC TelegraphH Telegraph
- telegraph :: Effs '[Embed IO, Reader (MVar TS)] m => TelegraphC m a -> m a
- data HttpH
- type HttpC = InterpretC HttpH Http
- http :: Effs '[Embed IO, Reader Manager] m => HttpC m a -> m a
- errorToErrorIO' :: (Exception e, Effs '[ErrorIO, Embed IO] m) => InterpretErrorC e m a -> m (Either e a)
- errorToErrorIOThrowing :: (Exception e, Effs '[ErrorIO, Embed IO] m) => InterpretErrorC e m a -> m a
- errorToIO' :: (Exception e, Eff (Embed IO) m, MonadCatch m) => ErrorToIOC e m a -> m (Either e a)
- errorToIOThrowing :: (Exception e, Eff (Embed IO) m, MonadCatch m) => ErrorToIOC e m a -> m a
- takeTS :: Eff Telegraph m => m TS
- readTS :: Eff Telegraph m => m TS
- putTS :: Eff Telegraph m => TS -> m ()
- httpLbs :: Effs '[Http, Error HttpException] m => Request -> m (Response ByteString)
- genBoundary :: Eff Http m => m ByteString
- data TS = TS {
- accessToken :: Text
- shortName :: Text
- authorName :: Text
- authorUrl :: Text
Documentation
data Http :: Effect where Source #
HttpLbs :: Request -> Http m (Response ByteString) | |
GenBoundary :: Http m ByteString |
Instances
Effs '[Embed IO, Reader Manager] m => Handler HttpH Http m Source # | |
Defined in Control.Effect.Telegraph effHandler :: EffHandler Http m # |
data Telegraph :: Effect where Source #
Instances
Effs '[Embed IO, Reader (MVar TS)] m => Handler TelegraphH Telegraph m Source # | |
Defined in Control.Effect.Telegraph effHandler :: EffHandler Telegraph m # |
type Telegraph' = Bundle '[Telegraph, Http, Error HttpException] Source #
data TelegraphH Source #
Instances
Effs '[Embed IO, Reader (MVar TS)] m => Handler TelegraphH Telegraph m Source # | |
Defined in Control.Effect.Telegraph effHandler :: EffHandler Telegraph m # |
type TelegraphC = InterpretC TelegraphH Telegraph Source #
Instances
Effs '[Embed IO, Reader Manager] m => Handler HttpH Http m Source # | |
Defined in Control.Effect.Telegraph effHandler :: EffHandler Http m # |
errorToErrorIO' :: (Exception e, Effs '[ErrorIO, Embed IO] m) => InterpretErrorC e m a -> m (Either e a) Source #
errorToErrorIOThrowing :: (Exception e, Effs '[ErrorIO, Embed IO] m) => InterpretErrorC e m a -> m a Source #
errorToIO' :: (Exception e, Eff (Embed IO) m, MonadCatch m) => ErrorToIOC e m a -> m (Either e a) Source #
errorToIOThrowing :: (Exception e, Eff (Embed IO) m, MonadCatch m) => ErrorToIOC e m a -> m a Source #
httpLbs :: Effs '[Http, Error HttpException] m => Request -> m (Response ByteString) Source #
genBoundary :: Eff Http m => m ByteString Source #
Telegraph state
TS | |
|
Instances
Eq TS Source # | |
Show TS Source # | |
Generic TS Source # | |
type Rep TS Source # | |
Defined in Control.Effect.Telegraph type Rep TS = D1 ('MetaData "TS" "Control.Effect.Telegraph" "telegraph-1.0.0-inplace" 'False) (C1 ('MetaCons "TS" 'PrefixI 'True) ((S1 ('MetaSel ('Just "accessToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "shortName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "authorName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "authorUrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) |