[Haskell-cafe] Guards on variable bindings
Tom Ellis
tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk
Mon Jan 24 21:32:16 UTC 2022
On Mon, Jan 24, 2022 at 09:28:32PM +0000, Tom Ellis wrote:
> I don't think that can be the reason. It is possible to have a single
> clause with multiple guards:
>
> bar | False = ()
> | True = ()
>
> It's just not possible to have multiple clauses if one of them is
> guarded, apparently.
Or rather "even if one of them is guarded". It's a bit more
understandable to forbid multiple clauses if the first one isn't
guarded.
More information about the Haskell-Cafe
mailing list