Thu Oct 30 07:39:47 PDT 2008 [EMAIL PROTECTED]
* Improve error reporting for non-rigid GADT matches
Following suggestions from users, this patch improves the error message
when a GADT match needs a rigid type:
tcfail172.hs:19:10:
GADT pattern match in non-rigid context for `Nil'
- Solution: add a type signature
+ Probable solution: add a type signature for `is_normal'
In the pattern: Nil
In the definition of `is_normal': is_normal Nil = True
Now GHC tries to tell you what to give a type signature *for*.
Thanks to Daniel Gorin and others for the suggestions.
M ./compiler/hsSyn/HsExpr.lhs -4 +4
M ./compiler/typecheck/TcArrows.lhs -3 +3
M ./compiler/typecheck/TcMatches.lhs -9 +9
M ./compiler/typecheck/TcPat.lhs -28 +45
View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20081030143947-1287e-0b0f16b670d0d780ca2eebbee5886814fec0b55e.gz
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc