ghc -C in 7.4.1

Serge D. Mechveliani mechvel at
Sun Feb 5 18:11:56 CET 2012

Dear GHC team,

I needed to look into the C code made by     ghc-7.4.1 
(made from source by 7.0.1 on Debian Linux)
  module TT (dropCWhile) where

  dropCWhile :: (Char -> Bool) -> [Char] -> [Char]
  dropCWhile p xs =  case xs of []    -> []
                                x: ys -> if p x then  dropCWhile p ys 
                                         else         xs
And applied
             ghc -C -O TT.hs
It reports
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

Please report this as a GHC bug:

1. A bug report.
2. How to see this C code? What GHC version shows it?
   If you have such a version installed, can you, please, send me the 
   C code?


mechvel at

More information about the Glasgow-haskell-users mailing list