[GHC] #10675: GHC does not check the functional dependency consistency condition correctly
GHC
ghc-devs at haskell.org
Fri Apr 14 03:40:51 UTC 2017
#10675: GHC does not check the functional dependency consistency condition
correctly
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.1
Resolution: | Keywords: FunDeps
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by AntC):
hmm curioser and curioser. Going back to the O.P., I see this behaviour at
both GHC 7.10 and 8.0.1:
* Take out the `instance C Char ...`; and `f` is happy with any type of
operand, not necessarily a `Maybe`.
* Keep in the `instance C Char ...`; but give `f` a signature and again
it's happy:
`f :: (C Bool [a] [a]) => a -> [a]`
* Keep in the `instance C Char ...`; give `f` this signature, and we're
back needing `Maybe`:
`f :: (C Bool [a] b) => a -> b`
So there is something wrong: why is the `C Char ...` instance getting
tangled up with the `C Bool ...` instance? The only connection would be
checking conformance with FunDeps; but that should be only for validation,
not 'type improvement' for function `f`(?)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10675#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list