Simon Peyton-Jones wrote:
> 
> Fair enough.  But would you like to suggest an algorithm GHC could use
> to decide what to put in the .hi file?  
Well that's a big question.  As I understand it, the errant value,
lvl20, is a string representing an error message (which I suppose is to
be thrown in the event of a matching failure).  Since it should
only be used on error, surely there is no speed benefit to inlining it,
and probably there is a space penalty (since you store the string 
multiple times).  In this case there is a very real disadvantage, since
inlining forces everything that imports that module to recompile.  So
my suggestion would be that values required only for errors should never
be inlined or put in a .hi file.

Reply via email to