Re: #16391: "Quantified type's kind mentions quantified type variable" error with fancy-kinded GADT
"GHC" <[email protected]> Fri, 08 Mar 2019 01:44:31 -0000
| Newsgroups | gmane.comp.lang.haskell.glasgow.bugs |
|---|---|
| Message-ID | <[email protected]> |
--===============6211601223984842861==
Content-Type: multipart/related;
boundary="===============7531629245758654509=="
--===============7531629245758654509==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
#16391: "Quantified type's kind mentions quantified type variable" error with
fancy-kinded GADT
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone: 8.10.1
Component: Compiler (Type | Version: 8.6.3
checker) |
Resolution: fixed | Keywords: TypeInType
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: GHC rejects | Test Case:
valid program | dependent/should_compile/T16391a,
| dependent/should_fail/T16391b
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/503
-------------------------------------+-------------------------------------
Comment (by Marge Bot <ben+marge-bot@…>):
In [changeset:"068b7e983f4a0b35f453aa5e609998efd0c3f334/ghc"
068b7e98/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="068b7e983f4a0b35f453aa5e609998efd0c3f334"
Fix #16391 by using occCheckExpand in TcValidity
The type-variables-escaping-their-scope-via-kinds check in
`TcValidity` was failing to properly expand type synonyms, which led
to #16391. This is easily fixed by using `occCheckExpand` before
performing the validity check.
Along the way, I refactored this check out into its own function,
and sprinkled references to Notes to better explain all of the moving
parts. Many thanks to @simonpj for the suggestions.
Bumps the haddock submodule.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16391#comment:6>