Marc van Dongen writes: > While I was constructing an example for ghc-users, I created the following > program which crashed ghc-2.03. > > > module Tmp( g ) where > > > data AB p q = A > > | B p q > > > g :: (Ord p,Ord q) => (AB p q) -> Bool > > g (B _ _) > > = g A > > [details of fixed panic deleted] Sigbjorn writes: > [...] this panic has been cured in ghc-2.04, > you'll now instead get a type error about overloading being ambiguous. > > I notice that the Hugs type checker accepts `g' above, but I'll leave > it to others to pass judgement on what is the right behaviour. I don't see anything ambiguous about this type. Can someone explain why this is ambiguous. There used to be problems figuring out what rule 2 of the monomorphism restriction was trying to say about exported values - but that's not an issue here since there's an explicit type signature. -- Alastair Reid Yale Haskell Project Hacker [EMAIL PROTECTED] http://WWW.CS.Yale.EDU/homes/reid-alastair/
