#2296: Functional dependencies error message has no position information
---------------------------+------------------------------------------------
Reporter: NeilMitchell | Owner: simonpj
Type: bug | Status: closed
Priority: high | Milestone: 7.0.1
Component: Compiler | Version: 6.8.2
Resolution: fixed | Keywords:
Testcase: | Blockedby: 4232
Difficulty: Unknown | Os: Unknown/Multiple
Blocking: | Architecture: Unknown/Multiple
Failure: None/Unknown |
---------------------------+------------------------------------------------
Changes (by simonpj):
* status: new => closed
* resolution: => fixed
Comment:
I've tried your example `Proof_default2` with the new typechecker, and
locations are better. In your second example we get
{{{
T2296b.hs:402:31:
Couldn't match type `Expr' with `[Char]'
In the first argument of `satE'', namely
`(pre (body f) / (args f, xs))'
In the first argument of `(&&)', namely
`satE' (pre (body f) / (args f, xs))'
In the first argument of `(==>)', namely
`satE' (pre (body f) / (args f, xs)) && all (satE' . pre) xs'
}}}
Now, I have not unravelled all the twisty functional dependencies, but the
location is at least right!
Incidentally, you have this definition earlier in the file
{{{
auto_24 = satE' $ reduce x / (vs,xs) ==> satE' $ x / (vs, xs)
where
x = undefined
vs = undefined
xs = undefined
}}}
For reasons desribed in our paper "Let should not be generalised", when
fundeps and GADTs are in play we don't generalise local lets. So those
`x`, `vs`, and `xs` are not generalised, and that gives a type error. I
ignored it because it looks as if you were just stubbing out bindings.
I'll close this ticket. Do re-open it if you aren't satisfied. But I
expect you've moved on to other things now!
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2296#comment:11>
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