Simplifier output explanation needed

Simon Peyton-Jones simonpj at microsoft.com
Tue Jun 7 04:27:38 EDT 2005


Yes $s is for specialised versions of (usually overloaded) functions.
If you are using -02 you can also get specialised versions from
so-called constructor specialisation, when the function is specialised
for a particular argument pattern.

I don't know why the strictness annotations disappear, but the
specialised function probably has a different type, and different
arguments, than the un-specialised one, so that might be part of it.

This stuff is not documented, I'm afraid.  I'll volunteer to explain
what you are seeing (if you send me a small example) if you volunteer to
write some documentation.  Seriously.

Simon

| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org
[mailto:glasgow-haskell-users-
| bounces at haskell.org] On Behalf Of Jens Fisseler
| Sent: 01 June 2005 13:54
| To: glasgow-haskell-users at haskell.org
| Subject: Simplifier output explanation needed
| 
| Hi everbody!
| 
| I'm currently trying to optimize some code, in particular trying to
make
| some functions as strict as possible. To do this, I quite often look
for
| strictness annotations either in the interface files or the the
| simplifier output. Doing this, something odd occured to me: inserting
a
| '$!' into a function call, trying to enforce eager evaluation, the
| simplifier output changed. Ok, I should expect this, but I don't
| understand the change. The function name got '$s' as a prefix and the
| strictness annotation ('Str: DmdType SSL') vanished.
| 
| So my question is what all those different prefixes mean. I've
stumbled
| across at least '$s' and '$w' (worker wrapper?). Why did the
strictness
| annotation disappear? Is there any documentation that can enlighten
me?
| 
| Regards,
| 
| 	Jens
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


More information about the Glasgow-haskell-users mailing list