[GHC] #11534: Allow class associated types to reference functional dependencies

GHC ghc-devs at haskell.org
Mon Feb 8 16:26:03 UTC 2016


#11534: Allow class associated types to reference functional dependencies
-------------------------------------+-------------------------------------
        Reporter:  ekmett            |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  7.10.3
  checker)                           |             Keywords:  TypeFamilies,
      Resolution:                    |  FunctionalDependencies
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Other             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 =
 > I'm at the Compose conference in New York talking to Brian Hurt who is
 refactoring the `monad-control` package to switch ''to'' functional
 dependencies from a class associated type so that he can support
 `GeneralizedNewtypeDeriving`.
 >
 > This also arises as a common idiom with the `mtl`, because you can use
 GND to derive `MonadState MyState`.

 Would you (or he) care to give a small self-contained example of why GND
 works for fundeps but not for associated types?

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


More information about the ghc-tickets mailing list