SPJ, quoting Marc:
> | Could somebody tell me how to disambiguate the following program
> | 
> | > module Tmp( g ) where
> | > data A p q = A
> | > g :: (Num p,Ord q) => (A p q) -> Bool
> | > g A = g A
> 
> I don't understand this.  "g" always returns bottom.

If only!  The above example looks pathological mainly because Marc was
in Mega-terse mode when producing a canonical example of this bug/feature,
I think; one could expand it back to a more meaningful program, with
the same disambiguation problem.

The trouble here is that compiling this, under 2.02, gives:

tmp.lhs:1: tmp.lhs:4: Ambiguous overloading:
               at a use of an overloaded identifier: `g' PrelBase.Ord q{-av0-}
    When checking signature(s) for: Tmp.g


2.01 (and earlier) thinks it's OK.  I'm not sure which of these is
correct behaviour (or if some tweak in the standard means both are
(or were)).

Alex.

Reply via email to