[Haskell-cafe] Guards on variable bindings

Tom Ellis tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk
Mon Jan 24 21:17:53 UTC 2022


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 _ = ()


More information about the Haskell-Cafe mailing list