Data.List.cycle is not a good producer
Data.List.cycle is not a good producer. I believe the following fixes it. The tests I've profiled so far suggest it does so.
{-# INLINE cycle #-}
cycle :: [a] -> [a]
cycle [] = error "Empty cycle."
cycle xs = let cyc = augment cycle' cyc in cyc
where cycle' c n = foldr c n xs