
#12245: Deriving Data at higher kinds -------------------------------------+------------------------------------- Reporter: simonpj | Owner: simonpj Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: | QuantifiedConstraints Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | deriving/should_compile/T12245 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): With [https://phabricator.haskell.org/D4353 D4353] this can be written as: {{{#!hs {-# Language QuantifiedConstraints #-} {-# Language StandaloneDeriving #-} {-# Language DeriveDataTypeable #-} {-# Language FlexibleInstances #-} {-# Language UndecidableInstances #-} {-# Language KindSignatures #-} {-# Language RankNTypes #-} {-# Language ConstraintKinds #-} import Data.Data (Data) import Data.Typeable import Data.Kind (Constraint) data Foo f = Foo (f Bool) (f Int) type LevelUp cls f = (forall xx. cls xx => cls (f xx) :: Constraint) deriving instance (Typeable f, LevelUp Data f) => Data (Foo f) }}} Can this ticket be closed? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12245#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler