[GHC] #12826: TyVar ASSERT failure in type family checking: T12041
#12826: TyVar ASSERT failure in type family checking: T12041 -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 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: -------------------------------------+------------------------------------- In HEAD, if you build the compiler with -DDEBUG, test `indexed- types/should_fail/T12041` fails thus {{{ +ghc: panic! (the 'impossible' happened) + (GHC version 8.1.20161109 for x86_64-unknown-linux): + ASSERT failed! + i_axb + Call stack: + CallStack (from HasCallStack): + prettyCurrentCallStack, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + callStackDoc, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + assertPprPanic, called at compiler/typecheck/TcType.hs:<line>:<column> in <package-id>:TcType + Call stack: + CallStack (from HasCallStack): + prettyCurrentCallStack, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + callStackDoc, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + pprPanic, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable + assertPprPanic, called at compiler/typecheck/TcType.hs:<line>:<column> in <package-id>:TcType }}} A `TyVar` is showing up where a `TcTyVar` is expected. I'm pretty certain this is harmless in a production compiler, but reflects an infelicity somewhere. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12826> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12826: TyVar ASSERT failure in type family checking: T12041 -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 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: | -------------------------------------+------------------------------------- Comment (by Simon Marlow <marlowsd@…>): In [changeset:"642adec4da8df4ae39b884b30c47284a3c9d0f30/ghc" 642adec4/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="642adec4da8df4ae39b884b30c47284a3c9d0f30" Mark T12041 as expect_broken with -DDEBUG (#12826) }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12826#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12826: TyVar ASSERT failure in type family checking: T12041 -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 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: | -------------------------------------+------------------------------------- Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"18d0bdd3848201882bae167e3b15fd797d217e93/ghc" 18d0bdd3/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="18d0bdd3848201882bae167e3b15fd797d217e93" Allow TyVars in TcTypes Up to now we've had a rule that a TyVar can't apppear in a type seen by the type checker; they should all be TcTyVars. But: a) With -XTypeInType it becomes much harder to exclude them; see Note [TcTyVars in the typechecker] in TcType. b) It's unnecessary to exculde them; instead we can just treat a TyVar just like vanillaSkolemTv. This is what was causing an ASSERT error in indexed-types/should_fail/T12041, reported in Trac #12826. That patch allows a TyVar in a TcType. The most significant change is to make Var.tcTyVarDetails return vanillaSkolemTv. In fact it already did, but (a) it was not documented, and (b) we never exploited it. Now we rely on it. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12826#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12826: TyVar ASSERT failure in type family checking: T12041 -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: fixed | 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 simonpj): * status: new => closed * resolution: => fixed Comment: Fixed. T12041 now works even with `-DEEBUG`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12826#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC