haskellyesodconduit

Yesod respondSource from source that has PrimMonad constraint


I am working on a website using Yesod and am trying to stream a file from a zip archive into the HTTP response.

I choose the zip package, the relevant function is getEntrySource.

It returns a

ConduitT () ByteString m ()

where m has to satisfy

One type that would fit those constraints would be ResourceT IO

In order to stream data Yesod provides the respondSource function that takes a

ConduitT () (Flush Builder) (HandlerFor site) ()

My Problem is:


Solution

  • Looks like a pure oversight that HandlerFor isn't an instance of PrimMonad. I've pushed a commit that should address this, and will release to Hackage once CI tells me it's safe.