[GHC] #11795: Performance issues with replicateM_