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

GHC ghc-devs at haskell.org
Sun Feb 7 19:58:21 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 ekmett):

 Just another data point about when people use functional dependencies over
 class associated types:

 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`.

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


More information about the ghc-tickets mailing list