Eta-expand argument to foldr in mapM_ for []
Eta-expand argument to foldr in mapM_ for []

Summary:
This improves performance, at least sometimes--the previous
implementation can be worse than the version in base 4.7. I
have not had the time to run benchmarks and such, but `mapM`
already does this.

Also, inline `mapM_`, like `mapM`.

Reviewers: hvr, nomeata, ekmett, austin

Reviewed By: ekmett, austin

Subscribers: thomie

Projects: #ghc

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

GHC Trac Issues: #10034

mfine/ghc,nushio3/ghc,shlevy/ghc,nkaretnikov/ghc,sgillespie/ghc,christiaanb/ghc,acowley/ghc,ezyang/ghc,urbanslug/ghc,sdiehl/ghc,GaloisInc/halvm-ghc,fmthoma/ghc,urbanslug/ghc,shlevy/ghc,vTurbine/ghc,gcampax/ghc,gridaphobe/ghc,siddhanathan/ghc,anton-dessiatov/ghc,ml9951/ghc,acowley/ghc,vTurbine/ghc,mfine/ghc,nushio3/ghc,gridaphobe/ghc,siddhanathan/ghc,TomMD/ghc,siddhanathan/ghc,nushio3/ghc,ml9951/ghc,TomMD/ghc,nkaretnikov/ghc,GaloisInc/halvm-ghc,gridaphobe/ghc,ghc-android/ghc,TomMD/ghc,ezyang/ghc,ghc-android/ghc,christiaanb/ghc,tjakway/ghcjvm,mfine/ghc,olsner/ghc,elieux/ghc,ghc-android/ghc,nushio3/ghc,gcampax/ghc,olsner/ghc,gridaphobe/ghc,vikraman/ghc,mettekou/ghc,fmthoma/ghc,sgillespie/ghc,ml9951/ghc,ezyang/ghc,mettekou/ghc,ghc-android/ghc,sgillespie/ghc,olsner/ghc,anton-dessiatov/ghc,urbanslug/ghc,urbanslug/ghc,shlevy/ghc,mcschroeder/ghc,snoyberg/ghc,ezyang/ghc,mettekou/ghc,mcschroeder/ghc,acowley/ghc,elieux/ghc,ml9951/ghc,urbanslug/ghc,AlexanderPankiv/ghc,ml9951/ghc,wxwxwwxxx/ghc,ghc-android/ghc,GaloisInc/halvm-ghc,fmthoma/ghc,ml9951/ghc,oldmanmike/ghc,siddhanathan/ghc,christiaanb/ghc,snoyberg/ghc,anton-dessiatov/ghc,vikraman/ghc,wxwxwwxxx/ghc,ghc-android/ghc,TomMD/ghc,siddhanathan/ghc,elieux/ghc,siddhanathan/ghc,vTurbine/ghc,da-x/ghc,acowley/ghc,sdiehl/ghc,mcschroeder/ghc,AlexanderPankiv/ghc,oldmanmike/ghc,gridaphobe/ghc,christiaanb/ghc,nkaretnikov/ghc,shlevy/ghc,tjakway/ghcjvm,snoyberg/ghc,oldmanmike/ghc,sdiehl/ghc,vikraman/ghc,TomMD/ghc,snoyberg/ghc,mfine/ghc,tjakway/ghcjvm,fmthoma/ghc,vTurbine/ghc,GaloisInc/halvm-ghc,christiaanb/ghc,da-x/ghc,wxwxwwxxx/ghc,AlexanderPankiv/ghc,sdiehl/ghc,vTurbine/ghc,gcampax/ghc,mcschroeder/ghc,christiaanb/ghc,TomMD/ghc,tjakway/ghcjvm,christiaanb/ghc,mettekou/ghc,TomMD/ghc,olsner/ghc,mfine/ghc,sdiehl/ghc,urbanslug/ghc,mcschroeder/ghc,vikraman/ghc,elieux/ghc,nkaretnikov/ghc,snoyberg/ghc,vTurbine/ghc,vikraman/ghc,snoyberg/ghc,mcschroeder/ghc,gcampax/ghc,GaloisInc/halvm-ghc,elieux/ghc,mettekou/ghc,vTurbine/ghc,wxwxwwxxx/ghc,sgillespie/ghc,da-x/ghc,nkaretnikov/ghc,snoyberg/ghc,da-x/ghc,acowley/ghc,da-x/ghc,sgillespie/ghc,acowley/ghc,da-x/ghc,ezyang/ghc,mfine/ghc,sdiehl/ghc,nushio3/ghc,sgillespie/ghc,oldmanmike/ghc,mfine/ghc,ghc-android/ghc,gcampax/ghc,wxwxwwxxx/ghc,mettekou/ghc,gridaphobe/ghc,ezyang/ghc,urbanslug/ghc,nkaretnikov/ghc,AlexanderPankiv/ghc,oldmanmike/ghc,da-x/ghc,nushio3/ghc,fmthoma/ghc,shlevy/ghc,mettekou/ghc,wxwxwwxxx/ghc,nushio3/ghc,gcampax/ghc,elieux/ghc,AlexanderPankiv/ghc,anton-dessiatov/ghc,sdiehl/ghc,tjakway/ghcjvm,oldmanmike/ghc,tjakway/ghcjvm,anton-dessiatov/ghc,shlevy/ghc,fmthoma/ghc,siddhanathan/ghc,gcampax/ghc,fmthoma/ghc,gridaphobe/ghc,wxwxwwxxx/ghc,acowley/ghc,ml9951/ghc,vikraman/ghc,olsner/ghc,AlexanderPankiv/ghc,sgillespie/ghc,GaloisInc/halvm-ghc,shlevy/ghc,mcschroeder/ghc,anton-dessiatov/ghc,olsner/ghc,olsner/ghc,vikraman/ghc,nkaretnikov/ghc,ezyang/ghc,GaloisInc/halvm-ghc,oldmanmike/ghc,elieux/ghc,AlexanderPankiv/ghc,ml9951/ghc,anton-dessiatov/ghc,tjakway/ghcjvm