[GHC] #8634: Code valid in GHC 7.6 is impossible to move over GHC 7.7 (because of liberal coverage condition)

GHC ghc-devs at haskell.org
Fri Dec 27 19:37:55 UTC 2013


#8634: Code valid in GHC 7.6 is impossible to move over GHC 7.7 (because of
liberal coverage condition)
-----------------------------------+---------------------------------------
        Reporter:  danilo2         |            Owner:
            Type:  bug             |           Status:  new
        Priority:  high            |        Milestone:
       Component:  Compiler        |          Version:  7.7
      Resolution:                  |         Keywords:
Operating System:                  |     Architecture:  Unknown/Multiple
  Unknown/Multiple                 |       Difficulty:  Unknown
 Type of failure:  None/Unknown    |       Blocked By:
       Test Case:                  |  Related Tickets:  #1241, #2247, #8356
        Blocking:                  |
-----------------------------------+---------------------------------------

Comment (by danilo2):

 Replying to [comment:4 rwbarton]:
 > That doesn't seem to be a problem, as those will be instances of
 different classes `Method2`, `Method3`.
 Ouch, of course, you are right. I wanted to tell about the problem you've
 discovered later:

 > (...)
 > With these changes your second program runs for me with GHC HEAD as long
 as I comment out `testx`--which is not used in the program.

 And this is the problem I was talking about on StackOverflow and my
 original question - I marked it as "the problematic function" in GHC 7.7.
 It is now impossible, to make this function an "Vectora associated method"
 `method3`.

 We are generating all type class instances with template Haskell reifying
 needed functions to get their type signatures. If such function does not
 compile, reify would also fail.

 Even writing type class instances manually, it is impossible to make
 instances of `Method3` and `Call` for it, because it does not compile.
 By the way, this function will make more sense if it will be written as:
 {{{#!haskell
 testx v x = call (method1 x) (OneTuple "test")
 }}}
 , which means, calling associated "method1" of "x" with one argument of
 "test". It is still working in GHC 7.6.

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


More information about the ghc-tickets mailing list