[GHC] #8390: regression in handling of type variables in constraints on instances which do not appear in the instance head

GHC ghc-devs
Thu Oct 3 16:25:05 UTC 2013


#8390: regression in handling of type variables in constraints on instances which
do not appear in the instance head
----------------------------------------------+----------------------------
        Reporter:  aavogt                     |            Owner:
            Type:  bug                        |           Status:  new
        Priority:  normal                     |        Milestone:
       Component:  Compiler                   |          Version:  7.7
      Resolution:                             |         Keywords:
Operating System:  Unknown/Multiple           |     Architecture:
 Type of failure:  GHC rejects valid program  |  Unknown/Multiple
       Test Case:                             |       Difficulty:  Unknown
        Blocking:                             |       Blocked By:
                                              |  Related Tickets:
----------------------------------------------+----------------------------

Comment (by goldfire):

 No, not quite. I think that, given that uses of the `Compose` instance
 work just fine without extra annotations, then that means that the
 instance is not ambiguous, tautologically by my operating definition of
 "ambiguous". So, I think we need to choose between these two design
 alternatives:

 1. Permit the instance for `Compose` without `-XAllowAmbiguousTypes`.

 2. Admit that the ambiguity checker is over-eager and sometimes rejects
 code that is unambiguous.

 Or, I suppose

 3. Define ambiguous differently.

 It's possible that I'm very confused about something here, so if that's
 the case, please try to enlighten me!

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8390#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list