Hello,
feeding the (incorrect) program given below to ghc (version 5.02 or
today's CVS version from ghc-5-02-branch ) results in
Test.hs:8:
Could not deduce (Integral (Ratio a)) from the context (Integral
a)
Probable fix:
Add (Integral (Ratio a)) to the type signature(s) for f
Or add an instance declaration for (Integral (Ratio a))
arising fromghc-5.02.1: panic! (the `impossible' happened, GHC
version 5.02.1):
typecheck/TcMonad.lhs:736: Non-exhaustive patterns in function
pp_orig
If my quick look at TcMonad.lhs is correct, pp_orig doesn't
handle RecordUpdOrigin and DataDeclOrigin.
Regards,
Armin
module Test where
import Ratio
data Integral a => P a = P { p :: a }
f :: Integral a => P (Ratio a) -> P (Ratio a)
f x = x { p = p x }
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs