Now, when parser1 <|> parser2 is failed to parse, the result becomes Left ParseFailed[reason1, reason2].
But if either of these consists of choice((<|>), choice), the result becomes a nest of ParseFailed [].
It doesn't seem better method.
Does anyone be coming up with better way?
(ParseFailed may be used for generating compilation errors. So I wish it be meaningful for it.)
Now, when
parser1 <|> parser2
is failed to parse, the result becomesLeft ParseFailed[reason1, reason2]
. But if either of these consists of choice((<|>)
,choice
), the result becomes a nest ofParseFailed []
. It doesn't seem better method.Does anyone be coming up with better way? (
ParseFailed
may be used for generating compilation errors. So I wish it be meaningful for it.)