[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:22:38 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 rwbarton):

 > Unfortunatelly I can not :( Look, Vector_testid indicates, that it holds
 "testid" method (it should be named Vector_method1 instead - sorry for
 that typo.
 > If we get more associated functions, we would have Vector_method2,
 Vector_method3 etc, so we need to distinguish them - see the sample code
 in this comment.

 That doesn't seem to be a problem, as those will be instances of different
 classes `Method2`, `Method3`.

 {{{#!haskell
 instance (m ~ Vector_method1, out ~ (t1->t1)) => Method1 (Vector a) m out
 where
   method1 = (Vector_method1 . testid)

 instance (m ~ Vector_method2, out ~ (t1->(t1,t1))) => Method2 (Vector a) m
 out where
   method2 = (Vector_method2 . testf2)
 }}}

 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.

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


More information about the ghc-tickets mailing list