[GHC] #8331: GHC fails to apply {-# SPECIALIZE #-} for dubious reasons

GHC ghc-devs at haskell.org
Fri Aug 1 13:57:45 UTC 2014


#8331: GHC fails to apply {-# SPECIALIZE #-} for dubious reasons
-------------------------------------+-------------------------------------
              Reporter:  blitzcode   |            Owner:
                  Type:  bug         |           Status:  closed
              Priority:  normal      |        Milestone:  7.10.1
             Component:  Compiler    |          Version:  7.8.3
            Resolution:  duplicate   |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:  Incorrect   |       Blocked By:
  warning at compile-time            |  Related Tickets:  #8848
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"d4d4bef2a2a3b90e6c5cb3544e1c2057920ed572/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="d4d4bef2a2a3b90e6c5cb3544e1c2057920ed572"
 Improve the desugaring of RULES, esp those from SPECIALISE pragmas

 In the code for Trac #8331 we were not getting a complaint, but
 we *were* getting a terrible (and virtually useless) RULE, looking
 like
    useAbstractMonad (complicated-dictionary-expresion) =
 $fuseAbstractMonad
 where we wanted
    useAbstractMonad d = $fuseAbstractMonad

 This commit improves the desugaring algorithm.  More comments
 explain; see Note [Drop dictionary bindings on rule LHS]
 }}}

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


More information about the ghc-tickets mailing list