Dear Haskell Cafe,

I've been playing around with the -fhpc option to GHC and have come across some things being highlighted yellow in the HTML markup for which I can't work out the right way to 'cover' them.

A cut down program that shows what I'm talking about is at http://hpaste.org/68888

Looking at the output of hpc show, I see:

   47          0 Main                            15:6-15:9 ExpBox False
   48          2 Main                            15:6-15:9 ExpBox False
   49          0 Main                            15:6-15:9 ExpBox False
   50          0 Main                            15:6-15:9 ExpBox False
51 1 Main 22:13-22:14 TopLevelBox ["=="] 52 0 Main 22:13-22:14 TopLevelBox ["/="] 53 1 Main 22:17-22:20 TopLevelBox ["showsPrec"] 54 0 Main 22:17-22:20 TopLevelBox ["showList"]

I.e. each of those bits whose highlighting I don't understand is made of some overlapping boxes, one of which is used.

Now, if I fiddle in the .tix file by hand to fake a usage of (/=) by changing the 52nd entry from 0 to 1, the Eq instance isn't highlighted any more in the HTML output. More strangely, if I then remove the usage of (==) by changing the 51st entry from 1 to 0, the Eq instance still isn't highlighted. A similar effect happens with the Show instance. It seems to be highlighting based only on the last entry in the .tix file, where there are two or more identically-placed boxes. Is this right? I'd have expected that if I use (==) then the deriving (Eq) clause should be considered 'used'.

Secondly, I can't work out what the four boxes in position 15:6-15:9 are supposed to be. If I use -ddump-simpl I can see many calls to 'tick' but there's no mention of numbers 47, 49 or 50. Perhaps they've been simplified away? I'm afraid I don't know what else to try dumping to get at the instrumented code before the simplifier's had a go at it.

I'm using Haskell Platform 2011.2.0.1 (GHC 7.0.3) on Windows if that's relevant.

Thanks in advance,

David

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to