This line of code should return a string but it returns IO(String).
simpleHTTP (getRequest "http://www.haskell.org/") >>= fmap (take 100) . getResponseBody
How can I pass the return value from the line above to getAllTextMatches?
import Network.HTTP
import Text.Regex.Posix
search :: String -> IO(String)
search url = do
let link = (simpleHTTP (getRequest url) >>= fmap (take 50000). getResponseBody)
getAllTextMatches (link =~ "(<[a-zA-Z]+>)|(<[a-zA-Z][a-zA-Z]*\s)" :: AllTextMatches [] String)