knit-haskell-0.8.0.0: a minimal Rmarkdown sort-of-thing for haskell, by way of Pandoc
Safe HaskellNone
LanguageHaskell2010

Knit.Utilities.Streamly

Synopsis

Documentation

data StreamlyM a Source #

IO with a ReaderTlayer we can use to expose effects we need. For now just logging.

Instances

Instances details
Monad StreamlyM Source # 
Instance details

Defined in Knit.Utilities.Streamly

Methods

(>>=) :: StreamlyM a -> (a -> StreamlyM b) -> StreamlyM b #

(>>) :: StreamlyM a -> StreamlyM b -> StreamlyM b #

return :: a -> StreamlyM a #

Functor StreamlyM Source # 
Instance details

Defined in Knit.Utilities.Streamly

Methods

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

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

Applicative StreamlyM Source # 
Instance details

Defined in Knit.Utilities.Streamly

Methods

pure :: a -> StreamlyM a #

(<*>) :: StreamlyM (a -> b) -> StreamlyM a -> StreamlyM b #

liftA2 :: (a -> b -> c) -> StreamlyM a -> StreamlyM b -> StreamlyM c #

(*>) :: StreamlyM a -> StreamlyM b -> StreamlyM b #

(<*) :: StreamlyM a -> StreamlyM b -> StreamlyM a #

MonadIO StreamlyM Source # 
Instance details

Defined in Knit.Utilities.Streamly

Methods

liftIO :: IO a -> StreamlyM a #

MonadThrow StreamlyM Source # 
Instance details

Defined in Knit.Utilities.Streamly

Methods

throwM :: Exception e => e -> StreamlyM a #

MonadCatch StreamlyM Source # 
Instance details

Defined in Knit.Utilities.Streamly

Methods

catch :: Exception e => StreamlyM a -> (e -> StreamlyM a) -> StreamlyM a #

MonadReader StreamlyEffects StreamlyM Source # 
Instance details

Defined in Knit.Utilities.Streamly

MonadBase IO StreamlyM Source # 
Instance details

Defined in Knit.Utilities.Streamly

Methods

liftBase :: IO α -> StreamlyM α #

MonadBaseControl IO StreamlyM Source # 
Instance details

Defined in Knit.Utilities.Streamly

Associated Types

type StM StreamlyM a #

type StM StreamlyM a Source # 
Instance details

Defined in Knit.Utilities.Streamly

data StreamlyEffects Source #

record-of-functions to hold access to effects we want to have available in this ReaderT over IO wrapper for Streamly

Constructors

StreamlyEffects 

Fields

streamlyToKnit :: (Member (Embed IO) r, LogWithPrefixesLE r) => StreamlyM a -> Sem r a Source #

lift a StreamlyM computation into a Sem computation

streamlyToKnitS :: (Member (Embed IO) r, LogWithPrefixesLE r) => SerialT StreamlyM a -> SerialT (Sem r) a Source #

Serial streams work fine over Sem, so we can lift the effectful serial stream into Sem r without running.

logStreamly :: LogSeverity -> Text -> StreamlyM () Source #

Use the logging function in the Reader to log in a StreamlyM context.