
#15591: Inconsistent kind variable binder visibility between associated and non- associated type families -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.5 Resolution: | Keywords: | TypeApplications, TypeFamilies 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 RyanGlScott): Oops, it just hit me why I was getting `forall {k}. Maybe k` for `ZT`'s kind even after the patch in comment:1 — `ZT` doesn't have a CUSK! (See #15592 for more on this point in particular.) If I change the definition to this: {{{#!hs class Z (k :: Type) where type ZT :: Maybe k type ZT = (Nothing :: Maybe k) }}} //Then// I get `forall k. Maybe k` for the kind of `ZT`, as expected, and the default definition is no longer rejected. Yay! But all is not well yet. There remains the mystery of why the CUSK-less version of `ZT` is being rejected after applying the patch in comment:1. One clue is that if I apply the patch in comment:1 (and comment out the default definition for `ZT`), then GHCi gives me the following kind for `Z`: {{{ Z :: forall {k}. k -> Constraint }}} This doesn't seem right, since without the patch, I get the following kind for `Z`: {{{ Z :: * -> Constraint }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15591#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler