[GHC] #12068: RULE too complicated to desugar when using constraint synonyms

GHC ghc-devs at haskell.org
Mon May 16 20:33:32 UTC 2016


#12068: RULE too complicated to desugar when using constraint synonyms
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  warning at compile-time            |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 This is actually OK in HEAD.  We get the RULE
 {{{
 "SPEC bar" [ALWAYS]
     forall (@ q_a1SJ)
            ($dQux_a1SK :: Qux q_a1SJ)
            ($dIntegral_a1U3 :: Integral Int)
            ($dNum_a1U2 :: Num Int)
            ($dClass1_a1SM :: Class1 (Foo q_a1SJ Int)).
       bar @ (Foo q_a1SJ Int)
           $dClass1_a1SM
           (T12068.$fClass2Foo
              @ q_a1SJ @ Int ($dQux_a1SK, $dIntegral_a1U3) $dNum_a1U2)
       = T12068.bar_$sbar @ q_a1SJ $dQux_a1SK
 }}}
 (How likely that rule is to fire in practice isn't clear to me, but
 perhaps it will.)

 It works in HEAD because the "silent superclass" story, which adds extra
 parameters to dfuns, has gone away.

 c.ff #12074, which is defeated by a `let`.

 I'm not sure if it's worth adding a regression test.

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


More information about the ghc-tickets mailing list