[Haskell-cafe] Prolog-style list syntax?

Jeff Clites jclites at mac.com
Thu Jul 8 17:11:48 UTC 2021

> On Jul 8, 2021, at 5:05 AM, Richard O'Keefe <raoknz at gmail.com> wrote:
> (3) There doesn't seem to be any reason why [p1,p2,p3]++pr could not be
> a pattern, where p1, p2, p3 match elements and pr  the rest.

The problem with that one is that:

    [p1,p2,p3]++pr = list

is interpreted as defining “++”.

If the outermost expression isn’t a constructor or some new syntax (i.e., previously a syntax error) then I think you’ll have that problem.


More information about the Haskell-Cafe mailing list