
It seems like you're being bitten by precedence rules. Your expression
mapM (...) screenScraping responseBody evaluates like this: (mapM
(...) screenScraping) responseBody. You probably want parentheses
aroung screenScraping responseBody. So something like:
mapM (flip ....) (screenScraping responseBody)
or
mapM (flip ...) $ screenScraping responseBody
On Tue, Feb 8, 2011 at 5:48 PM, Michael Litchard
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'
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners