@@ -273,13 +273,14 @@ label :: forall m s a. Monad m => String -> ParserT s m a -> ParserT s m a
273273label messagePrefix p = catchError p $ \ (ParseError message pos) ->
274274 throwError $ ParseError (messagePrefix <> message) pos
275275
276+-- | Merge the new left with the old right.
276277mergeWith :: forall a. (a -> a -> a) -> Maybe a -> Maybe a -> Maybe a
277278mergeWith f (Just l) (Just r) = Just (f l r)
278279mergeWith _ l Nothing = l
279280mergeWith _ Nothing r = r
280−mergeWith _ _ _ = Nothing
281281
282282-- | This is not quite the `Alt` class, because we need to flip the list append for `alt`.
283+-- | TODO this class should not exist.
283284class Mergeable a
284285 where
285286 -- | Merge the new left with the old right.