[GHC] #12791: Superclass methods could be more aggressively specialised.

GHC ghc-devs at haskell.org
Wed Nov 2 09:36:08 UTC 2016


#12791: Superclass methods could be more aggressively specialised.
-------------------------------------+-------------------------------------
        Reporter:  mpickering        |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by mpickering):

 Yes and here is another example from transformers.

 {{{#!hs
 class (Monoid w, Monad m) => MonadWriter w m | m -> w where
 }}}

 It is suggested to write functions of the form,

 {{{#!hs
 f :: (MonadWriter MyMonoid m) => m ....
 }}}

 which will have the same problem.

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


More information about the ghc-tickets mailing list