Call Arity, oneShot or both

Simon Peyton Jones simonpj at
Tue Oct 28 22:02:25 UTC 2014

| But since it is plausible that there are cases out there where it might
| help, even if just a little, we could go forward  –unless the
| implementation becomes ugly.

Yes, I'm content with that, provided it is well documented.  In general, I think that when a programmer wants to be sure something is going to happen, it's better to allow them provide a pragma or annotation to say "this is what I want" rather than to rely on a complex and (who knows?) perhaps fragile analysis.  

So I'm all for keeping 'oneShot' in the definition of foldl or whatever, even if the analysis spots it. But with a Note please!


More information about the ghc-devs mailing list