
#10835: Regression in standalone Data deriving for phantom types -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- Thise code {{{#!hs {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving, PolyKinds #-} module M where import Data.Data import Data.Typeable data Phantom t = Phantom deriving Typeable deriving instance Typeable t => Data (Phantom t) }}} compiles with 7.8.4 but not with 7.10.2. The error is {{{ data.hs:8:1: Could not deduce (Typeable Phantom) arising from the superclasses of an instance declaration from the context (Typeable t) bound by the instance declaration at data.hs:8:1-48 In the instance declaration for ‘Data (Phantom t)’ }}} PolyKinds here is a hack I came up with to make this compile with 7.8; but ideally, this code should compile whether PolyKinds is enabled or not. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10835 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler