Laws and partial values (was: [Haskell-cafe] mapM_ -> Monoid.Monad.map)

Luke Palmer lrpalmer at gmail.com
Sun Jan 25 10:28:00 EST 2009


On Sun, Jan 25, 2009 at 8:00 AM, Jonathan Cast <jonathanccast at fastmail.fm>wrote:

> On Sat, 2009-01-24 at 03:08 -0700, Luke Palmer wrote:
> > On Sat, Jan 24, 2009 at 2:40 AM, Ryan Ingram <ryani.spam at gmail.com>
> > wrote:
> >         But _|_ is not ().
> >
> > Correction: _|_ is not always ().
>
> For example: in Haskell.
>
> Prelude> () `seq` True
> True
> Prelude> (undefined `asTypeOf` ()) `seq` True
> *** Exception: Prelude.undefined


Gee, I'm sure glad that I wrote that detailed analysis of what I meant.
It's nice to see people responding to arguments rather than opinions for
once.

Luke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090125/b1d7dc23/attachment.htm


More information about the Haskell-Cafe mailing list