GHC fails to stop at phase HCc
I tried with several different haskell source code and all got the same error:
[liuexp@liuexp pearls]$ ghc -C minfree.hs
addFlag by -C on the commandline:
Warning: The -fvia-C flag does nothing; it will be removed in a future GHC release
ghc: panic! (the 'impossible' happened)
(GHC version 7.4.1 for i386-unknown-linux):
pipeLoop: at phase As but I wanted to stop at phase HCc
here's minfree.hs for reference:
[liuexp@liuexp pearls]$ cat minfree.hs {-# OPTIONS_GHC -O2 #-} module Pearls where import Data.List hiding (union) import Data.List.Ordered (minus,union) import Data.Map (Map) import Data.Set (Set) import qualified Data.Set as DS import qualified Data.Map as DM import Data.Sequence (Seq, (<|), (|>), (><)) import qualified Data.Sequence as S import qualified Data.Foldable as F
import Control.Monad import Control.Applicative
--assuming no duplicates
minfree xs = minfrom 0 (length xs,xs)
minfrom a (n,xs)
|n == 0 = a
|m == b -a = minfrom b (n-m,vs)
|otherwise = minfrom a (m,us)
where (us,vs)= partition (<b) xs
b = a + 1 + n div
2
m = length us
Trac metadata
Trac field | Value |
---|---|
Version | 7.4.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |