line number for GADT type error is very inaccurate
|Reported by:||nr||Owned by:|
|Type of failure:||Test Case:|
|Related Tickets:||Differential Revisions:|
Here is an error message from 6.11:
cmm/ZDF5ex.hs:528:2: Couldn't match expected type `ZOpen' against inferred type `ZClosed' Expected type: ZipGF m l e x Inferred type: ZipGF m l C O In the first argument of `anal_f', namely `g' In the expression: anal_f g (return . fromZJust) ZNothing
This is all very well, but the offending term (the one shown in the message) is actually on line 697, not line 528. The term is part of one declaration in a monster 'where' clause attached to the definition on line 528, column 2. The next one might not be so easy to find.
I'm attaching the file, which is part of some new GHC code I'm hoping to deliver one of these months. If you need access to the whole thing I'll have a branch in a git repository.