[Haskell-cafe] Guards on variable bindings
Brandon Allbery
allbery.b at gmail.com
Mon Jan 24 21:24:43 UTC 2022
I think because it desugars to a case-of and there's nothing to case
on in the first one?
On Mon, Jan 24, 2022 at 4:18 PM Tom Ellis
<tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk> wrote:
>
> According to GHC there are multiple declarations of bar, but not of
> foo. I don't understand. Why is it not valid to have multiple
> clauses for a variable binding?
>
>
> Tom
>
>
> bar | False = ()
> bar = ()
>
> foo _ | False = ()
> foo _ = ()
> _______________________________________________
> 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.
--
brandon s allbery kf8nh
allbery.b at gmail.com
More information about the Haskell-Cafe
mailing list