
#11511: Type family producing infinite type accepted as injective -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Keywords: TypeFamilies, Resolution: | Injective 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 jstolarek): I had a talk about injective type families yesterday and it provoked me to rethink this issue. What we do in the pre-unification algorithm is: 1. assume that type family applications unify with anything 2. but we look under injective type family applications and unify the arguments Now, my question is: when we are checking whether `F` is injective why do we assume that `F`'s injectivity annotation is true? This is what we're trying to prove and I think we should not assume that as part of our proof. This is exactly what's happening here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11511#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler