
#13962: GHCi allows unsaturated type family -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: TypeFamilies Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12089 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): GHC is behaving according to its manual. See [https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghci.html #ghci-cmd-:kind this section]. We made a special case for `:kind` some years ago to allow queries like `:kind Map`. The user sensibly wants `Map`'s kind, and we should give it to them. So the TF-saturation requirement is dropped in `:kind`. I support this design choice. On the other hand, it's very suspect in `:kind!`. It's surprising to me, too, that this gives the right result. But, after all, TF evaluation makes fine sense with unsaturated type families -- it's just type inference that gets muddled. So: we could keep the current behavior (which doesn't seem to be hurting anyone), or restrict the behavior of `kind!` to disallow partially applied type families. Maybe an intermediate approach is to keep the current behavior but issue a warning in the event of a partially applied family. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13962#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler