[GHC] #14563: GHC Panic with TypeInType / levity polymorphism
#14563: GHC Panic with TypeInType / levity polymorphism -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple LevityPolymorphism, TypeInType | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: #14555 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This code is rightfully rejected. {{{#!hs -- {-# Language TypeInType #-} {-# Language RankNTypes, KindSignatures, PolyKinds #-} import GHC.Types (TYPE) import Data.Kind data Lan (g::TYPE rep -> TYPE rep') (h::TYPE rep -> TYPE rep'') a where Lan :: forall xx (g::TYPE rep -> TYPE rep') (h::TYPE rep -> Type) a. (g xx -> a) -> h xx -> Lan g h a }}} But uncomment first line and it panics {{{ $ ghci2 ~/hs/132-bug.hs GHCi, version 8.3.20171122: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( /home/baldur/hs/132-bug.hs, interpreted ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.3.20171122 for x86_64-unknown-linux): zonkTcTyVarToVar 'LiftedRep Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/utils/Outputable.hs:1147:37 in ghc:Outputable pprPanic, called at compiler/typecheck/TcType.hs:1640:17 in ghc:TcType Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}} Maybe the same as #14555. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14563> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14563: GHC Panic with TypeInType / levity polymorphism -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: | LevityPolymorphism, TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #14555 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"8361b2c5a9f7a00f0024f44a43b851998ae41e33/ghc" 8361b2c5/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="8361b2c5a9f7a00f0024f44a43b851998ae41e33" Fix SigTvs at the kind level This patch fixes two bugs in the treatment of SigTvs at the kind level: - We should always generalise them, never default them (Trac #14555, #14563) - We should check if they get unified with each other (Trac #11203) Both are described in TcHsType Note [Kind generalisation and SigTvs] }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14563#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14563: GHC Panic with TypeInType / levity polymorphism -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: fixed | Keywords: | LevityPolymorphism, TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | testsuite/tests/polykinds/T14563 Blocked By: | Blocking: Related Tickets: #14555 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * testcase: => testsuite/tests/polykinds/T14563 * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14563#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC