Thank you for a fine bug report. It's a definite and embarassing bug, I'm
afraid.
Adding a type signature for minInRow would be a workaround, but it
may be hard to find the right places in your big program. I guess we'll
have to put out 3.03 shortly to fix this (and other trivia). If you are stuck
we'll hurry it up.
Thanks again for boiling it down to a small example. It makes it much
easier to find.
Simon
> ghc-3.02-i386-unknown-bin... taken from
> dcs.gla.ac.uk..../glasgow/3.02
> runs into a bug (?) when compiling the program
>
>
> --------------------------------------------------------------------
> module T where
>
> type Cp a = a -> a -> Ordering
>
> m :: Eq a => Cp a -> [a] -> a
> m _ [x,y,z] = if x==y then x else z
>
> cpPairs :: Cp [j] -> (a,[j]) -> (a,[j]) -> Ordering
> cpPairs cp (_,p) (_,q) = cp p q
>
> mp :: (Eq i,Eq j) => Cp [j] -> [(i,[j])] -> (i,[j])
> mp cp dD =
> let minInRow = m (cpPairs cp)
> in minInRow dD
>
> -- m (cpPairs cp) dD
> ------------------------------------------------------------------
>
> T.hs:24:
> Ambiguous type variable(s)
> `j' in the constraint `Eq (aYD, [j])'
> arising from use of `m' at T.hs:24
> In an equation for function `mp':
> mp cp dD = let minInRow = m (cpPairs cp) in minInRow dD
> T.hs:24:
> Ambiguous type variable(s)
> `j' in the constraint `Eq (aYD, [j])'
> arising from use of `m' at T.hs:24
> In an equation for function `mp':
> mp cp dD = let minInRow = m (cpPairs cp) in minInRow dD