[prev in list] [next in list] [prev in thread] [next in thread]
List: haskell-cafe
Subject: Re: [Haskell-cafe] What does "1 = 2" mean in Haskell?
From: Alexey Muranov <alexey.muranov () gmail ! com>
Date: 2017-02-27 6:51:29
Message-ID: 4b07c138-02f9-4a04-b76a-fecf511e9bb4 () googlegroups ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Monday, February 27, 2017 at 12:35:26 AM UTC+1, o...@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.
[Attachment #5 (text/html)]
<div dir="ltr">On Monday, February 27, 2017 at 12:35:26 AM UTC+1, o...@cs.otago.ac.nz \
wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: \
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">><br>> Furthermore, you \
would not want<br>> ```<br>> main = let 1 = 2 in print "foo"<br>> \
```<br>> to error, since the pattern match is unused, and haskell is a \
lazy<br>> language.<p>That's not at all clear. In fact, I believe this \
thread exists<br>because the OP's daughter expected that it WOULD raise an \
error.</p></blockquote><div><br> I think i agree with this. IMO it should raise an \
error as well as<br><br> (\1 -> "hello") \
2<br><br>does.<br><br>Alexey.<br></div></div>
[Attachment #6 (text/plain)]
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic