
17 Jun
2003
17 Jun
'03
11 a.m.
In the ghc manual I read :
"How do I find out a function's strictness?" Don't guess-look it up.
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).
--
When I look in the *.hi binary files generated by ghc with ghc --show-iface, I don't see anything like "__S" anywhere.
Where should I look ?
Make sure the module is compiled with -O, otherwise the strictness analyser isn't run and you don't get any strictness info. Cheers, Simon