The files here can be used to produce statistics of number of functions which are in total discharge form in (core form of) a haskell module(s). In our work we used sources of the GHC itself. The source archive is here
apt-get build-dep ghctar zxvf haskell_stats.tar.gz && cd haskell_stats && ghc -package ghc -O2
analyse.lhsGHC := /home/.../haskell_stats/recordpaths.sh to mk/build.mk. We use
this script to record each invocation of GHC. Our counting program analyse
is able to compile a module and use most GHC flags, but does not link and
may be missing some edge cases, so first we compile everything with the
normal compiler and then analyse. The commands to be ran to perform the
analysis are saved to /tmp/ghcpaths.txt.make clean && makesh /tmp/ghcpaths.txt runs the analysis. The program itself is in
analyse.lsh and is written in Literate Haskell and the documentation is available in pdf format.