Skip to content
  • David Feuer's avatar
    Add explicit foldMap implementation for Maybe · bf1e1f32
    David Feuer authored
    Eric Mertens pointed out that using the default `foldMap`
    implementation for `Maybe` led to an efficiency problem by
    implementing `foldMap f (Just x)` as `f x <> mempty` rather than
    as `f x`. This should solve the problem.
    
    Reviewers: hvr, austin, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: glguy, thomie
    
    Differential Revision: https://phabricator.haskell.org/D2988
    bf1e1f32