
#9858: Typeable instances should be kind-aware -------------------------------------+------------------------------------- Reporter: dreixel | Owner: Type: bug | Status: merge Priority: highest | Milestone: 7.10.2 Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | typecheck/should_fail/T9858a, | should_run/T9858b | Blocking: | Differential Revisions: Phab:D652 -------------------------------------+------------------------------------- Comment (by oerjan): Looking at [https://git.haskell.org/ghc.git/commitdiff/d8d541d85defcf3bbbddaeee8cfac70b7... the fix], I suspect it still does not disallow constructing `Typeable (Eq Int => Int)` by roundabout means - the test seems to be only for the fully applied form, not the lone `=>` constructor. However, with all the tuple constructors properly disambiguated, I don't think there's an exploit any more. I just realized my proof above doesn't handle kinds of `->` variants like `* -> # -> *`. But I'm not aware of any way to create an ambiguous `TypeRep` of possible kind `#`, so it should hopefully be fine. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9858#comment:97 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler