[GHC] #8165: Use GeneralizedNewtypeDeriving to automatically create associated type families
GHC
ghc-devs at haskell.org
Mon Sep 9 16:33:36 CEST 2013
#8165: Use GeneralizedNewtypeDeriving to automatically create associated type
families
-------------------------------------+------------------------------------
Reporter: MikeIzbicki | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by goldfire):
This auto-generation seems to be rather different from the way
`GeneralizedNewtypeDeriving` works in other contexts. In particular, the
instances that you're generating are not directly related to any existing
instances. Are you proposing that type families used on derived instances
should just "look through" the newtype and be applied to the base type? Or
only in cases with type variables? And, where does the `HasRing a =>`
constraint come from?
Without those constraints, I can see more of a coherent and general
picture here... but it doesn't seem like `GeneralizedNewtypeDeriving` to
me. Perhaps you're really proposing a new extension for generation of type
family instances for newtypes?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8165#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list