I tried to follow along this connecting-http-conduit-to-xml-conduit stackoverflow question, as it looks exactly like what I want to do.
I'm building off of the example from the http-conduit section of the yesod book.
The Code
getBody = do
manager <- liftIO $ newManager def
req <- liftIO $ parseUrl fredURL
http req manager
The Error
No instance for (monad-control-0.3.1.3:Control.Monad.Trans.Control.MonadBaseControl
IO m0)
arising from a use of `http'
Possible fix:
add an instance declaration for
(monad-control-0.3.1.3:Control.Monad.Trans.Control.MonadBaseControl
IO m0)
In a stmt of a 'do' block: http req manager
In the expression:
do { manager <- liftIO $ newManager def;
req <- liftIO $ parseUrl fredURL;
http req manager }
In an equation for `getBody':
getBody
= do { manager <- liftIO $ newManager def;
req <- liftIO $ parseUrl fredURL;
http req manager }
The Goal
I'm trying to return a Source that will be used by an xml-conduit Sink, the intent being that I want to use XML-Conduit to parse the XML and express it as a Haskell data
type.
Could I get some elucidation as to why I am getting my error?