How is error information combined when parsers are combined? For example, using <|> to combine parsers, I would expect the set of expected characters for an error to be the union of the sets of expected characters from the individual parsers. (I’m finding it hard to pin down the behaviour of <|> or even to find the relevant source code.)
The source code appears to be in Text/Megaparsec/Internal.hs, although I haven’t gotten my head around it yet.