
I'm also having some fun with profiling...
First: The GHC manual might want to mention that running ghc --show-iface on an interface file won't work if it was compiled with -prof. You get: "mismatched interface file versions: expected 5042, found 5042p" Compiling sans -prof works.
This bug has been fixed.
Second: Heap profiling falls over (seg fault) in some cases unless I compile with -O2.
This is a bug - could you provide us with the source and instructions to reproduce?
Third: How do I tell if my functions are strict or not? The manual says: "Look for your function in the interface file, then for the third field in the pragma; it should say __S <string>. The <string> gives the strictness of the function's arguments. L is lazy (bad), S and E are strict (good), P is primitive (good), U(...) is strict and unpackable (very good), and A is absent (very good)."
To see the pragmas, you need to compile the module with -O. You can view the interface with --show-iface. For example, here's 'not' from the Prelude: 1 not :: Bool -> Bool {-## __A 1 __C __S S __U (\ ds :: Bool -> case ds of wild {False -> $wTrue; True -> $wFalse;}) ##-}; You can see that strictness pragma (following __S) is "S", which means the function is strict in its single argument. Cheers, Simon