
#9270: GHC HEAD accepts a manual instance decl but not equivalent TH decl -------------------------------------+------------------------------------ Reporter: Feuerbach | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.9 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by goldfire): * status: new => closed * resolution: => invalid Comment: The code in `traverse-with-class` is incorrect and should lead to exactly this error. It calls `classP` on a type variable `c`. `classP` is meant to make a class-predicate, and should be passed the name of a class, not a type variable. The fact that this worked previously was in error. To be fair, using a type variable in a constraint was not possible before GHC 7.9, so the author of `traverse-with-class` didn't really have another choice. Now that TH supports a full variety of constraints, the code can be rewritten to use `AppT` and `VarT` instead of `classP`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9270#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler