[Haskell-cafe] GHC magic optimization ?
wren ng thornton
wren at freegeek.org
Sat Dec 5 00:28:08 EST 2009
Luke Palmer wrote:
> On Fri, Dec 4, 2009 at 9:44 AM, Mark Lentczner <markl at glyphic.com> wrote:
>> On Dec 4, 2009, at 2:43 AM, Luke Palmer wrote:
>>> So GHC leaves it to the user to specify sharing. If you want an
>>> expression shared, let bind it and reuse.
>> Does GHC treat where and let the same in this regard? Or in code, are these treated the same?
> where is just sugar for let.
Well, they have different scoping properties because they're in
different syntactic classes in the parser (let is an expression whereas
where is a modifier on statements), but other than that yes they're the
More information about the Haskell-Cafe