
#15868: Standard deriving should be less conservative when `UndecidableInstances` is enabled -------------------------------------+------------------------------------- Reporter: edsko | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: deriving Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11008 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): Replying to [comment:5 edsko]:
Would simply refusing to add constraints without any type variables be sufficient to rule out examples like the one you are worried about?
Not necessarily. Imagine if `NotAShowInstance` had a type parameter, for instance. Under your proposed scheme, we'd still allow `data Foo a = MkFoo Int (NotAShowInstance a) deriving Show`. I think the right way to frame the discussion is to permit constraints that involve non–type constructors (such as type families or higher-kinded type variables) in certain ways. That's still not anything resembling a specification, but it's closer. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15868#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler