Re: [GHC] #4815: Instance constraints should be used when deriving on associated data types

#4815: Instance constraints should be used when deriving on associated data types -------------------------------------+------------------------------------- Reporter: batterseapower | Owner: Type: feature request | Status: new Priority: low | Milestone: Component: Compiler | Version: 6.12.3 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 RyanGlScott): Replying to [comment:17 simonpj]:
So I'm unconvinced that this is worth the bother.
I completely agree, not only because it might be over-constraining, but in some cases it might even yield redundant constraints, as in this example: {{{#!hs {-# LANGUAGE TypeFamilies #-} class C a where data D a c :: a -> a -> Bool instance Eq a => C [a] where newtype D [a] = DList [a] deriving Show c = (==) }}} This would, under the proposal in this ticket, yield: {{{#!hs instance (Eq a, Show a) => Show (D [a]) }}} which isn't what we want at all. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/4815#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC