Dear bug chasers,
ghc's latest version sometimes misses conflicting function definitions.
Consider the following *wrong* program:
%------------------------------------------------------------------------------
> module Small ( module Small )
> where
> data MinView t a = Min a (t a)
> | Infty
> newtype ToppedTree a = P (MinView BinTree a)
> data BinTree a = Bin a (BinTree a) (BinTree a)
> | Empty
> P Infty /\ u = P Infty
> t@(P (Min _ _)) /\ P Infty = P Infty
> P (Min a t) /\ P (Min b u)
> | a <= b = P (Min a (Bin b u t))
> | otherwise = P (Min b (Bin a t u))
> data Tree a = Root a (Forest a)
> | Void
> type Forest a = [Tree a]
> Void /\ u = Void
> t@(Root _ _) /\ Void = Void
> t@(Root a ts) /\ u@(Root b us)
> | a <= b = Root a (u : ts)
> | otherwise = Root b (t : us)
%------------------------------------------------------------------------------
Note that /\ is defined twice at different types.