Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Text.XML.Stream.Parse.choose seems to be awkward to use. #72
getTagContent :: Name -> Consumer Event IO (Maybe (Name, Text)) getTagContent tag = fmap (\content -> fmap (\c -> (tag, c)) content) $ tagIgnoreAttrs tag content getTagsContent :: [Name] -> Consumer Event IO (Maybe (Name, Text)) getTagsContent tags = choose $ (fmap getTagContent tags)
The compile fails with:
See also (someone else having this issue): http://stackoverflow.com/questions/33606038/xml-conduit-combining-tagparsers
Asking in #haskell-beginners on Freenode there was a suggestion that the forall in the expansion of Consumer was at the root of this, which seems to make sense, but I've been unable to determine why. Removing the type definition has no material effect on the error either.
It boils down to the distinction between