
#11450: Associated types at wrong type in instance -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.3 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): That would also make sense. So you would also like to be able to write {{{ class C v where type T v instance C (Either a b) where type T (Either x y) = y -> x }}} But I think the current intent is "equal" not "equal up to alpha equivalence". Which do people like best? I in the class decl you obviously must use the same `v`; that's how you link the associated type to its class. In the instance we could loosen it. It's a usability issue not a technical one. Which is best? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11450#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler