Fast loops for Haskell (for when GHC can't optimize forM_)