
#13006: Possible program should type check but does not using Implicit Parameters and Vectors -------------------------------------+------------------------------------- Reporter: clinton | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.2-rc2 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): It depends what you mean by "derive". Injectivity gives rise to so-called "Derived equalities" which guide unification (often called "improvement"). They do not provide ''evidence'' in the sense of System FC. So, with your type family {{{ f :: F a -> F a f x = x }}} would not be reported as an ambiguous type; without the injectivity constraint it would. I wish there was a comprehensive writeup about this... it's too much folk lore. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13006#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler