[GHC] #8592: FunDep error message regression

#8592: FunDep error message regression -------------------------------------------+------------------------------- Reporter: nomeata | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.7 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: -------------------------------------------+------------------------------- This code (provided by Cale Gibbard) {{{ #!haskell {-# LANGUAGE FunctionalDependencies, FlexibleContexts #-} class C a b | a -> b where foo :: a -> b instance C Integer Integer where foo = id f :: Integer -> String f = foo }}} produced this error message in GHC 7.6: {{{ fundep.hs:10:5: Couldn't match type `Integer' with `String' When using functional dependencies to combine C Integer Integer, arising from the dependency `a -> b' in the instance declaration at fundep.hs:6:10 C Integer String, arising from a use of `foo' at fundep.hs:10:5-7 In the expression: foo In an equation for `f': f = foo }}} but this one with GHC HEAD {{{ FunDepError.hs:11:5: No instance for (C Integer String) arising from a use of ‛foo’ In the expression: foo In an equation for ‛f’: f = foo }}} which seems to be a regression. It may be that either message is fine (it seems to be in this case), In that case, this bug is about the test suite not having a test case for where we do want to see the `When using functional dependencies to combine` message. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8592 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8592: FunDep error message regression --------------------------------------------+------------------------------ Reporter: nomeata | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: --------------------------------------------+------------------------------ Comment (by nomeata): Branch `wip/T592` contains some refactoring of the `FunDeps` code that I don’t want to push to master before this issue is cleared, and the code tested. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8592#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8592: FunDep error message regression --------------------------------------------+------------------------------ Reporter: nomeata | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: --------------------------------------------+------------------------------ Comment (by nomeata): More examples at http://www.haskell.org/pipermail/haskell- cafe/2008-December/052093.html -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8592#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8592: FunDep error message regression --------------------------------------------+------------------------------ Reporter: nomeata | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: --------------------------------------------+------------------------------ Comment (by nfrisby): My 2 cents: the error message mentioning functional dependencies is far more informative than the one just saying there's no instance for C Integer String. So, in my opinion, the change that prompted this ticket is indeed a regression. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8592#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8592: FunDep error message regression --------------------------------------------+------------------------------ Reporter: nomeata | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: --------------------------------------------+------------------------------ Comment (by nomeata): More examples at http://www.haskell.org/pipermail/ghc- devs/2013-December/003396.html (Collecting these links here because I want to ensure they will enter the testsuite.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8592#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8592: FunDep error message regression --------------------------------------------+------------------------------ Reporter: nomeata | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: --------------------------------------------+------------------------------ Comment (by nomeata): Bah, I need more sleep. Just because the test suite does not contain any examples of the error message now, it does not mean that it did not have in the past. And indeed – `git log -G` to the rescue – there are examples like `FD3`, and commit [69f0da5ddaf90a5fa9eec406ec96a0256428fed9/testsuite] (April 2013, SPJ) updated the output to what it is now, without the “When using functional dependencies to combine” message. Therefore I conclude that the change of output is deliberate, and this bug is just about finding out whether that kind of error message can still occur (in which case a testcase would be nice), or if it is dead code that should be removed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8592#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8592: FunDep error message regression
--------------------------------------------+------------------------------
Reporter: nomeata | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
--------------------------------------------+------------------------------
Comment (by Joachim Breitner

#8592: FunDep error message regression --------------------------------------------+------------------------------ Reporter: nomeata | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: --------------------------------------------+------------------------------ Changes (by nomeata): * status: new => closed * resolution: => fixed Comment: As discussed with SPJ it seems that the such error messages no longer occur. I have removed the code that generates them, closing this bug. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8592#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC