[Haskell-cafe] Prolog-style patterns
Tom Murphy
amindfv at gmail.com
Mon Apr 8 17:53:23 CEST 2013
On Mon, Apr 8, 2013 at 7:59 AM, Joachim Breitner
<mail at joachim-breitner.de>wrote:
> Hi,
>
> I believe one problem with non-linear patterns would be that the
> compiler has to figure out what notion of equality you want here. An
> obvious choice is (==), but the Eq instances might not do what you want.
> Using pattern guards or view patterns explicates this choice.
>
What other types of equality would be possibilities?
Also, for some history, this was discussed a while back:
http://www.mail-archive.com/haskell@haskell.org/msg03721.html
Erlang programmers have this feature without shooting themselves in the
foot too often. That said, I'm happy without it.
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130408/681df60e/attachment.htm>
More information about the Haskell-Cafe
mailing list