
#16013: :kind! accepts unsaturated type aliases
-------------------------------------+-------------------------------------
Reporter: dmwit | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.4.3
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| ghci/should_fail/T16013
Blocked By: | Blocking:
Related Tickets: #13962 | Differential Rev(s): Phab:D5471,
Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/90
-------------------------------------+-------------------------------------
Comment (by Ryan Scott
:set -XTypeFamilies -XPolyKinds type family Id (a :: k) type instance Id a = a type Foo x = Maybe :kind! Id Foo
This is probably a stretch too far, so this patch moves to disallow
unsaturated synonyms that aren't at the top level (we still want to
allow `:kind Id`, for instance). We do this by augmenting `GhciCtxt`
with an additional `Bool` field to indicate if we are at the
outermost level of the type being passed to `:kind` or not. See
`Note [Unsaturated type synonyms in GHCi]` in `TcValidity` for the
full story.
Test Plan: make test TEST=T16013
Reviewers: goldfire, bgamari
Reviewed By: goldfire
Subscribers: simonpj, goldfire, rwbarton, carter
GHC Trac Issues: #16013
Differential Revision: https://phabricator.haskell.org/D5471
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16013#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler