[GHC] #10675: GHC does not check the functional dependency consistency condition correctly
GHC
ghc-devs at haskell.org
Wed Apr 19 11:34:43 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):
Replying to [comment:15 simonpj]:
Thanks Simon. I fear we're in danger of getting two separate issues
confused. (I guess that comes with the territory.) On the narrow issue
raised in the O.P.:
* __If__ both instance decls are to be accepted, nevertheless, at sites
where the first `C Bool` instance applies, `op True` should accept any
`[alpha]` and return exactly type `[alpha]`.
* Note that the `C Bool` instance meets the coverage conditions/doesn't
need `UndecidableInstances`.
* I'm saying: once the instance is selected, GHC should treat that use
site as if that's the only instance.
* So where your O.P. says "As a result [of accepting both instance decls],
it'll use ''both'' instances for improvement.", I think that's just plain
wrong.
I don't see anything in the FDs-via-CHRs paper '''Definition 6''' (or in
Mark Jones 2000 paper) to suggest attempting mutual improvement. The
'''Consitency Condition''' is purely about validating instances.
The bulk of your comment is on the different issue of whether those
instances should be accepted together. I'll reply separately.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10675#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list