[Haskell-cafe] HPC of several modules?

2008-01-16 Thread Magnus Therning
How do I get reports on coverage of all modules in a program?

The documentation I've found http://blog.unsafeperformio.com/?p=18 and
http://www.haskell.org/ghc/docs/latest/html/users_guide/hpc.html both do
coverage of a single module.  Going the naive route of first making sure
there are no compiled modules in my source tree (i.e. removing all .o and
.hi files) then running 'ghc --make -fhpc MyTool.hs' succeeds in building
the program, and I get a MyTool.tix and a .mix file in .hpc/ for each module
after running it, but how do I get 'hpc' to produce reports containing more
than just Main?

'hpc6 markup MyTool' includes only Main
'hpc6 markup MyTool Main My.Module' includes only Main
'hpc6 markup MyTool My.Module' results in an error:
Writing: hpc_index.html
hpc6: Prelude.foldr1: empty list

None of the arguments shown by 'hpc6 help markup' stands out as a clear
candidate either...

'hpc6 report --per-module MyTool' generates this:

-module Main-
 80% expressions used (386/479)
100% boolean coverage (0/0)
 100% guards (0/0)
 100% 'if' conditions (0/0)
 100% qualifiers (0/0)
100% alternatives used (0/0)
100% local declarations used (0/0)
100% top-level declarations used (17/17)

Where are my other modules???

Any and all help is appreciated.

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


Re: [Haskell-cafe] HPC of several modules?

2008-01-16 Thread Neil Mitchell
Hi

 and .hi files) then running 'ghc --make -fhpc MyTool.hs' succeeds in

That's all I do.

 'hpc6 markup MyTool' includes only Main

I do:

hpc markup MyTool.tix

Then it all Just Works (TM). What is hpc6? I am using the version
supplied with GHC 6.8.

Thanks

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


Re: [Haskell-cafe] HPC of several modules?

2008-01-16 Thread Christopher Lane Hinson



What is hpc6? I am using the version supplied with GHC 6.8.


This is just hpc on debian/ubuntu systems, where all the binaries have 
symlinks that append a version number.


ghc6.8 on debian doesn't provide hpc without the 6.  I just reportbugged 
this.


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