[Haskell-cafe] \_ -> not equivalent to const $

Luke Palmer lrpalmer at gmail.com
Thu Jan 10 18:20:36 EST 2008


On Jan 10, 2008 11:15 PM, Victor Nazarov <asviraspossible at gmail.com> wrote:
> On Jan 11, 2008 2:11 AM, Felipe Lessa <felipe.lessa at gmail.com> wrote:
> > On Jan 10, 2008 8:54 PM, Luke Palmer <lrpalmer at gmail.com> wrote:
> > > Can someone explain what the heck is going on here?
> >
> > AFAICT, nothing is wrong. You see, both returned the very same values.
> [snip]
> > But referential transparency wasn't broken at all =).
> >
> Referential transparency wasn't broken, but I wonder what was the
> compiler, and what were it's options.

Ahh, it was ghc 6.8.1, without any optimization.  If I turn on optimization,
the behavior goes away, and they both behave like the const version.

Darn.

Luke

> --
> vir
> http://vir.comtv.ru/
>


More information about the Haskell-Cafe mailing list