[Haskell-cafe] What does "1 = 2" mean in Haskell?
Alexey Muranov
alexey.muranov at gmail.com
Mon Feb 27 06:51:29 UTC 2017
On Monday, February 27, 2017 at 12:35:26 AM UTC+1, o... at cs.otago.ac.nz
wrote:
>
> >
> > Furthermore, you would not want
> > ```
> > main = let 1 = 2 in print "foo"
> > ```
> > to error, since the pattern match is unused, and haskell is a lazy
> > language.
>
> That's not at all clear. In fact, I believe this thread exists
> because the OP's daughter expected that it WOULD raise an error.
>
I think i agree with this. IMO it should raise an error as well as
(\1 -> "hello") 2
does.
Alexey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170226/24bcceac/attachment.html>
More information about the Haskell-Cafe
mailing list