#3191: hpc reports spurious results with .lhs files even after processing with 
ghc
-E
-----------------------------+----------------------------------------------
Reporter:  dominic           |          Owner:  a...@galois.com 
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Code Coverage   
 Version:  6.10.2            |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 I've done a bit of investigation and it seems there are at least two
 problems:

 1. I have literate haskell files (.lhs).

 2. Even if I run them through the pre-processor (ghc -E) they still don't
 work
 but if I manually remove these lines (which seem to get inserted by the
 pre-processor)

 {-# LINE 1 "ASNTYPE.lhs" #-}
 #line 1 "ASNTYPE.lhs"

 then it does actually work.

 I still have a problem with another project which doesn't use literate
 haskell
 but does require the use of -cpp and has got #ifdef's. I haven't got to
 the
 bottom of it yet but I'm suspicious that lines starting with # cause hpc
 to
 misbehave.

 It's strange that hpc should behave like this as I would have thought it
 wouldn't care about hs / lhs and # as ghc would have done some of its
 standard
 processing before hpc got engaged.

 This happens on linux and windows (not surprisingly).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3191>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to