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

GHC ghc-devs
Tue Oct 1 05:24:28 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 aavogt):

 While Compose may not be so interesting, the same thing prevents HList
 from having both a single class for polymorphic functions (Fun above) and
 having higher-order functions that work for some instances of that class
 (ones like F).

 Some faking can be done by having some associated types for Fun to
 calculate the argument from the result type etc. But that is uglier (see
 attached inf2).

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



More information about the ghc-tickets mailing list