ambiguity problem

Martin Sulzmann sulzmann at comp.nus.edu.sg
Tue Apr 22 04:42:00 EDT 2003


Hi,

I'm using 

 ghci --version
The Glorious Glasgow Haskell Compilation System, version 5.04.2

ghci -fglasgow-exts

doesn't seem to report ambiguity of type schemes.

Take a look at the following program.

class Bar a b | a -> b where
  bar :: a -> b

class Foo a b  where
  foo :: Bar b c => a -> c
-- ambiguous
-- should be foo :: foo :: Bar b c => a -> b

g :: Foo a b => a
g = undefined

-- ambiguous

No ambiguity error is reported. This seems like a bug.

Martin




More information about the Glasgow-haskell-bugs mailing list