[GHC] #14729: normaliseType is not well-kinded

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Suppose we have {{{ Proxy :: forall k. k -> Type type family F a type instance F Int = Bool }}} and we're trying to normalise the target {{{ Proxy (F Int) x }}} Clearly, for this target to be well kinded, we need `x :: F Int`. Currently, the output of `normaliseType` is `Proxy Bool x`, which is just plain wrong. I need to implement logic like in `flatten_args` on [https://github.com/goldfirere/ghc my branch] in `normaliseType` to fix this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: RyanGlScott (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Iceland_jack): * cc: Iceland_jack (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15549 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * related: => #15549 Comment: See #15549 for a program which fails Core Lint due to this issue. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15549 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): It'd be great to fix this -- and document the invariant on `normaliseType`, namely that the result has the same kind as its argument. As I understand it, that's entirely consistent with our new (and now implemented in HEAD) story, that flattening does not change the kind of the type being flattened. Richard: are you up for doing this? I assume that the "my branch" part is now water under the bridge, because the new flattening stuff is done. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15549 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * milestone: => 8.8.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15549 | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/208 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => https://gitlab.haskell.org/ghc/ghc/merge_requests/208 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15549 | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/208 -------------------------------------+------------------------------------- Comment (by simonpj): Hang on. It's possible that the patch for #16188 fixes this one too -- but the underlying cause of this ticket in `normaliseType` remains. Richard has an entirely separate (and sadly more substantial) patch for that, which he and I went through on Friday. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15549 | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/208 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: patch => new Comment: Sorry! The description in https://gitlab.haskell.org/ghc/ghc/merge_requests/208 very strongly implies that it fixes this ticket, so I was just following suit. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15549 | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/208 -------------------------------------+------------------------------------- Comment (by simonpj): Oh my bad. MR!208 is indeed the right one for this ticket. I was just mixed up. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15549 | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/208 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.2.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_compile/T14729{,kind}, | typecheck/should_compile/T15549[ab] Blocked By: | Blocking: Related Tickets: #15549 | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/208 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * testcase: => dependent/should_compile/T14729{,kind}, typecheck/should_compile/T15549[ab] * status: patch => closed * resolution: => fixed Comment: Landed in [https://gitlab.haskell.org/ghc/ghc/commit/2b90356d26b4699227816ad9424e766ecc... 2b90356d26b4699227816ad9424e766eccdb6c36]. (Given the complexity of this patch, I'm not sure if it's worth trying to merge to 8.8 or not.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.10.1 Component: Compiler | Version: 8.2.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_compile/T14729{,kind}, | typecheck/should_compile/T15549[ab] Blocked By: | Blocking: Related Tickets: #15549 | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/208 -------------------------------------+------------------------------------- Changes (by goldfire): * status: closed => merge Comment: I think we should merge if possible. While complex, the changes are local to just a few places, and these places don't get a ton of traffic (because they're rather challenging to update). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.2.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_compile/T14729{,kind}, | typecheck/should_compile/T15549[ab] Blocked By: | Blocking: Related Tickets: #15549 | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/208 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * milestone: 8.10.1 => 8.8.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.2.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_compile/T14729{,kind} Blocked By: | Blocking: Related Tickets: #15549 | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/208 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * testcase: dependent/should_compile/T14729{,kind}, typecheck/should_compile/T15549[ab] => dependent/should_compile/T14729{,kind} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14729#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14729: normaliseType is not well-kinded
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: (none)
Type: bug | Status: merge
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.2.2
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| dependent/should_compile/T14729{,kind}
Blocked By: | Blocking:
Related Tickets: #15549 | Differential Rev(s):
Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/208
-------------------------------------+-------------------------------------
Comment (by Marge Bot
participants (1)
-
GHC