Data.Vector.foldl' hangs GHC indefinitely with -O2
Running 'ghc -O2 -fforce-recomp -c Bug.hs' on the following
module Bug where
import qualified Data.Vector as V
data Tree = Empty | Node !(V.Vector Tree)
f :: k -> Tree -> Tree
f k' (Node ch) = head $ V.foldl' (\u t' -> case t' of Empty -> u; _ -> t' : u) [] ch
will hang forever (or at least >5m). Builds fine with -O1 / V.foldl.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |