logo       

ambiguity problem: msg#00057

lang.haskell.glasgow.bugs

Subject: ambiguity problem

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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise