#7010: Type error in one function causes wrong type error report in another
function when using type families
------------------------------------------------+---------------------------
Reporter: Lemming | Owner:
Type: bug | Status: closed
Priority: low | Milestone: 7.6.1
Component: Compiler | Version: 7.4.1
Resolution: fixed | Keywords:
Os: Unknown/Multiple | Architecture:
Unknown/Multiple
Failure: Incorrect warning at compile-time | Difficulty: Unknown
Testcase: indexed-types/should_fail/T7010 | Blockedby:
Blocking: | Related:
------------------------------------------------+---------------------------
Changes (by simonpj):
* status: new => closed
* testcase: => indexed-types/should_fail/T7010
* resolution: => fixed
Comment:
Recent changes in the type inference engine mean that you now get just one
error, and it's on `filterFormats`, as it should be
{{{
T7010.hs:44:27:
Couldn't match type `Serial (ValueTuple Float)' with `IO Float'
Expected type: (Float, ValueTuple Vector)
Actual type: (Float, ValueTuple Float)
In the first argument of `withArgs', namely `plug'
In the expression: withArgs plug
In an equation for `filterFormants': filterFormants = withArgs plug
}}}
To be honest I'm not 100% certain of why this has come right, and that
means I'm not certain that the solution is robust (mabye it's a fluke).
But I'm sort of time, so I'm closing the ticket. But I'm adding the test
as a regression test so we'll know immediately if it stops working.
Thanks for the example.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7010#comment:2>
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