#4484: Regression: Combination of GADTs and Type families
---------------------------------+------------------------------------------
Reporter: sjoerd_visscher | Owner:
Type: bug | Status: merge
Priority: highest | Milestone: 7.0.1
Component: Compiler | Version: 7.1
Keywords: | Testcase:
indexed-types/should_compile/T4484
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: GHC rejects valid program
---------------------------------+------------------------------------------
Changes (by simonpj):
* status: new => merge
* testcase: => indexed-types/should_compile/T4484
Comment:
Fixed by
{{{
Fri Nov 12 05:00:11 PST 2010 [email protected]
* A (final) re-engineering of the new typechecker
Regression testing and user feedback for GHC 7.0 taught
us a lot. This patch fixes numerous small bugs, and some
major ones (eg Trac #4484, #4492), and improves type
error messages.
The main changes are:
* Entirely remove the "skolem equivalance class" stuff;
a very useful simplification
* Instead, when flattening "wanted" constraints we generate
unification variables (not flatten-skolems) for the
flattened type function application
* We then need a fixup pass at the end, TcSimplify.solveCTyFunEqs,
which resolves any residual equalities of form
F xi ~ alpha
* When we come across a definite failure (e.g. Int ~ [a]),
we now defer reporting the error until the end, in case we
learn more about 'a'. That is particularly important for
occurs-check errors. These are called "frozen" type errors.
* Other improvements in error message generation.
* Better tracing messages
M ./compiler/typecheck/Inst.lhs -5 +3
M ./compiler/typecheck/TcCanonical.lhs -148 +228
M ./compiler/typecheck/TcErrors.lhs -97 +160
M ./compiler/typecheck/TcInteract.lhs -471 +180
M ./compiler/typecheck/TcRnTypes.lhs -4 +13
M ./compiler/typecheck/TcSMonad.lhs -84 +163
M ./compiler/typecheck/TcSimplify.lhs -84 +245
M ./compiler/typecheck/TcType.lhs +3
M ./compiler/types/Coercion.lhs -1 +3
}}}
Regression test added.
Pls merge
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4484#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs