[Haskell-cafe] Byte Histogram
Richard O'Keefe
ok at cs.otago.ac.nz
Sat Feb 5 05:17:11 CET 2011
On 4/02/2011, at 8:26 PM, Johan Tibell wrote:
> --show-iface HI_FILE
sort.hs has 50 top level functions.
One of them is main, and the others are all reachable from it.
ghc -O sort.hs
ghc --show-iface sort.hi
The only functions listed are variants of main.
Dropping -O leaves one variant of main only;
the other 49 functions have disappeared.
It is, by the way, something of a nuisance that if you do
ghc sort.hs
...
ghc -O sort.hs
it insists "compilation NOT required" despite the fact that
the previous compilation was with materially *different* options.
(GHC 6.12.3)
Given this clue I was able to get the information I wanted by
exporting all the functions.
This is the wrong interface. If a programmer is concerned that
strictness analysis might not be finding something they thought
was strict, they would ideally like to have *all* the functions
reported, but at a minimum, all of the top level functions.
More information about the Haskell-Cafe
mailing list