Speed up MonadUtils.mapMaybeM
Speed up MonadUtils.mapMaybeM

Summary: This version is nearly 2x faster according to a few small benchmarks.

Reviewers: bgamari, monoidal

Reviewed By: monoidal

Subscribers: rwbarton, carter

Differential Revision: https://phabricator.haskell.org/D5344

sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc,sdiehl/ghc