Type checker too lazy

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Wed Dec 13 07:11:53 EST 2000


> data Record = R {
>      blub :: Foo a => a -> [a]
>     }

Wouldn't the pure-Haskell'98 definition

  data Foo a => Record a = R {
       blub :: a -> [a]
      }

work as well, if not better?  Certainly, ghc accepts both of 

>   print (bar (3::Int)) -- works!
>   print ((blub r) (3::Int)) -- works also!

with this definition.

Regards,
   Malcolm




More information about the Glasgow-haskell-bugs mailing list