
#13731: DeriveFunctor and friends don't understand type families -------------------------------------+------------------------------------- Reporter: spacekitteh | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): The error message is terrible. (Ryan might you look at that?) But the program IS wrong. In Haskell you can't write {{{ f (xs ++ ys) = ... }}} which pattern-matches on a function call. And similarly at the type level you can't pattern match on a function call, as in `instance Functor (Test ListExtension)`. Instead write `instance Functor []`. Oh! We have that instance already; so you can just omit it! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13731#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler