
#11509: Incorrect error message in StandaloneDeriving: "The data constructors of <typeclass> are not all in scope" -------------------------------------+------------------------------------- Reporter: edsko | Owner: RyanGlScott Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.0.1-rc1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2558 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D2558 Comment: At least, I thought deriving strategies would come into play, but it turns out a different check already present in GHC gives a pretty reasonable error message for this scenario already. So now the code above gives the error message: {{{ • Can't make a derived instance of ‘SC (Serializable (MyList a))’: ‘SC’ is not a stock derivable class (Eq, Show, etc.) Try enabling DeriveAnyClass • In the stand-alone deriving instance for ‘(Typeable a, SC (Serializable a)) => SC (Serializable (MyList a))’ }}} `DeriveAnyClass` technically can't be used derive instances of kind `a -> Constraint` right now, but they will be able to once #12144 is fixed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11509#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler