[GHC] #16179: Mention DerivingStrategies in the warning when DeriveAnyClass and GeneralizedNewtypeDeriving are both enabled

#16179: Mention DerivingStrategies in the warning when DeriveAnyClass and GeneralizedNewtypeDeriving are both enabled -------------------------------------+------------------------------------- Reporter: ckoparkar | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: Keywords: deriving | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When {{{DeriveAnyClass}}} and {{{GeneralizedNewtypeDeriving}}} are both enabled, GHC prints out the following warning for every {{{deriving C}}}: {{{ #!haskell warning: • Both DeriveAnyClass and GeneralizedNewtypeDeriving are enabled Defaulting to the DeriveAnyClass strategy for instantiating C }}} Would it be useful to point the users to {{{DerivingStrategies}}} ? {{{Use DerivingStrategies to pick a different strategy}}}, or something similar? I'm not sure if this was already discussed before, I couldn't find any related tickets. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16179 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16179: Mention DerivingStrategies in the warning when DeriveAnyClass and GeneralizedNewtypeDeriving are both enabled -------------------------------------+------------------------------------- Reporter: ckoparkar | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: Resolution: | Keywords: deriving Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15839 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * related: => #15839 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16179#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16179: Mention DerivingStrategies in the warning when DeriveAnyClass and GeneralizedNewtypeDeriving are both enabled -------------------------------------+------------------------------------- Reporter: ckoparkar | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: Resolution: | Keywords: deriving Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15839 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): That sounds like a reasonable thing to add to the warning. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16179#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16179: Mention DerivingStrategies in the warning when DeriveAnyClass and GeneralizedNewtypeDeriving are both enabled -------------------------------------+------------------------------------- Reporter: ckoparkar | Owner: (none) Type: feature request | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: Resolution: | Keywords: deriving Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15839 | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/120 -------------------------------------+------------------------------------- Changes (by ckoparkar): * status: new => patch * differential: => https://gitlab.haskell.org/ghc/ghc/merge_requests/120 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16179#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16179: Mention DerivingStrategies in the warning when DeriveAnyClass and GeneralizedNewtypeDeriving are both enabled -------------------------------------+------------------------------------- Reporter: ckoparkar | Owner: (none) Type: feature request | Status: closed Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: Resolution: fixed | Keywords: deriving Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | deriving/should_compile/T16179.hs Blocked By: | Blocking: Related Tickets: #15839 | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/120 -------------------------------------+------------------------------------- Changes (by ckoparkar): * cc: bgamari (added) * status: patch => closed * resolution: => fixed * testcase: => deriving/should_compile/T16179.hs Comment: Fixed by [https://gitlab.haskell.org/ghc/ghc/commit/800d77e882f24066a7f6d818b2606ad8a0... 800d77e8]. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16179#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16179: Mention DerivingStrategies in the warning when DeriveAnyClass and GeneralizedNewtypeDeriving are both enabled -------------------------------------+------------------------------------- Reporter: ckoparkar | Owner: (none) Type: feature request | Status: closed Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: Resolution: fixed | Keywords: deriving Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | deriving/should_compile/T16179.hs Blocked By: | Blocking: Related Tickets: #15839 | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/120 -------------------------------------+------------------------------------- Comment (by bgamari): Thanks ckoparkar! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16179#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC