
#8963: GeneralizedNewtypeDeriving unusable on associated types ------------------------------------+------------------------------------- Reporter: mojojojo | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- This code: {{{ {-# LANGUAGE GeneralizedNewtypeDeriving #-} class C c where data F c r instance C Int where newtype F Int r = F (IO r) deriving (Functor) }}} fails to compile with the following message: {{{ Derived instance `Functor (F Int)' requires illegal partial application of data type family F In the newtype instance declaration for `F' }}} This might be related to https://ghc.haskell.org/trac/ghc/ticket/4185, but then it is marked as fixed in GHC 7.6.2, and I experience my error on 7.6.3. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8963 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler