Data.Text.isPrefixOf fails to terminate
The function Data.Text.isPrefixOf
fails to terminate with GHC 7.4-rc1, although it terminates with GHC-7.2. Reproduction instructions:
$ cd ghc-7.4.0.20111219
$ sudo make install
$ cabal -V
cabal-install version 0.10.2
using version 1.10.1.0 of the Cabal library
$ cabal install text-0.11.1.12
$ cd /tmp
$ cat >Test.hs
import Data.Text
main = print (pack "A" `isPrefixOf` pack "AB")
$ runghc Test.hs
<program hangs on 100% CPU use, without producing any output>
Unfortunately, it appears to be rather difficult to create a reduced test case; the problem disappears when I make any attempt to minimize it.
I have verified this on Mac OS X 10.7.2 and 64-bit Ubuntu 10.10.
Trac metadata
Trac field | Value |
---|---|
Version | 7.4.1-rc1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |