#2307: Poor warning for conflicting functional dependencies
-----------------------------------------+----------------------------------
Reporter: NeilMitchell | Owner:
Type: bug | Status: reopened
Priority: normal | Milestone: 6.10.1
Component: Compiler | Version: 6.8.2
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: typecheck/should_fail/T2307 | Architecture: Unknown
Os: Unknown |
-----------------------------------------+----------------------------------
Changes (by igloo):
* status: closed => reopened
* resolution: fixed =>
* milestone: 6.10 branch => 6.10.1
Comment:
The behaviour when the types in the instances were changed felt a little
odd to me, so I had a quick look at the code, and I think it's broken;
e.g. this module:
{{{
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies,
OverlappingInstances, UndecidableInstances,
IncoherentInstances,
FlexibleInstances #-}
module Foo where
class C a b c | b -> c
instance C Bool Int Float
instance C Char Int Double
}}}
is accepted by GHC, but violates `b -> c`.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2307#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs