Haskell98 nonconformance: contexts on member functions

Alastair Reid reid@moab.cs.utah.edu
Sat, 21 Apr 2001 13:49:37 -0600 (MDT)


The H98 report explicitly says (section 4.3.1) that the type of member
functions may only add constraints to the type variables which are
local to the member.  

Hugs accepts this (illegal program from the testsuite) without
reporting an error.
  
  tests/static/mod39.hs:
    --!!! Illegal constraints on member funs
    module M where
    class C a where f :: Eq a => a
  
If someone can do one of the following, I'll update the testsuite (so
it isn't reported as an error) accordingly:

1) Add this to the list of Hugs' non-conformance to the standard.
2) Make this report an error in Haskell 98 mode.
3) Make this report an error in both Haskell 98 and Hugs mode

-- 
Alastair Reid        reid@cs.utah.edu        http://www.cs.utah.edu/~reid/