[GHC] #15798: Flag to warn when deriving strategy is not explicitly specified
GHC
ghc-devs at haskell.org
Wed Oct 24 18:30:30 UTC 2018
#15798: Flag to warn when deriving strategy is not explicitly specified
-------------------------------------+-------------------------------------
Reporter: andrewthad | Owner: (none)
Type: feature | Status: new
request |
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
In my code, I aim to always specify deriving strategies. I would like to
add a flag `-fwarn-unspecified-deriving` that would cause a warning to be
emitted when someone wrote this:
{{{
newtype Foo = Foo Int
deriving (Show)
}}}
The user would be required to instead write:
{{{
newtype Foo = Foo Int
deriving newtype (Show)
}}}
Or they could use `stock` if that was the behavior they wanted. This flag
would be off by default.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15798>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list