[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-cafe
Subject:    Re: [Haskell-cafe] Is this a GHC parser error? A test case compiles from one line but not another.
From:       Alexis King <lexi.lambda () gmail ! com>
Date:       2017-09-10 4:54:19
Message-ID: 0AC2708B-5FA9-433E-9138-DC2CF2169A90 () gmail ! com
[Download RAW message or body]

> On Sep 9, 2017, at 18:14, David Feuer <david.feuer@gmail.com> wrote:
> 
> Where clauses are not *always* attached to definitions. They can also
> be attached to case branches.

Ah, you're right of course, I forgot about this.

> What I believe is true is that anywhere a set of guards could occur,
> they may be followed by a where clause, and vice versa.

This appears to be true in standard Haskell, but interestingly, it seems
that where clauses *cannot* be attached to a multi-way if expression.
Whether or not that counts as a "set of guards" is debatable, but I
usually think of them that way, so it's potentially worth nothing.

_______________________________________________
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