[Haskell-beginners] Help me make sense of this error
Michael Litchard
michael at schmong.org
Wed Feb 9 00:48:52 CET 2011
Here's the three main functions involved. Let me know if I am missing
pertinent information.
I'm having difficulty unraveling this error message. Help?
> obtainCookies :: Curl -> String -> IO ()
> obtainCookies curl responseBody = do
> return $ last $ liftM $
> mapM (flip (curlResp2 curl) resourceOpts)
> screenScraping responseBody
> screenScraping :: String -> [URLString]
> screenScraping responseBody =
> let collectedStrings = processHTML responseBody
> collectedIDLists = createIDList collectedStrings
> in constructedResourceURIs urlBase collectedIDLists
> constructedResourceURIs :: String -> [String] -> [URLString]
> constructedResourceURIs url resourceIDs =
> let frontURI = url ++ "/launchWebForward.do?"
> midURI = map (frontURI ++) resourceIDs
> in map (++ "&policy=0&returnTo=%2FshowWebForwards.do") midURI
HtmlParsing.lhs:81:22:
Couldn't match expected type `[URLString]'
against inferred type `String -> [URLString]'
In the second argument of `mapM', namely `screenScraping'
In the second argument of `($)', namely
`mapM
(flip (curlResp2 curl) resourceOpts) screenScraping responseBody'
In the second argument of `($)', namely
`liftM
$ mapM
(flip (curlResp2 curl) resourceOpts) screenScraping responseBody'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110208/a53c08ae/attachment.htm>
More information about the Beginners
mailing list