[GHC] #13135: Typechecker: the 'impossible' happened
#13135: Typechecker: the 'impossible' happened -------------------------------------+------------------------------------- Reporter: Saulzar | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 (Type checker) | 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: -------------------------------------+------------------------------------- May be something to do with type family dependencies? Unclear - but I've attached a reduced source. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13135> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13135: Typechecker: the 'impossible' happened -------------------------------------+------------------------------------- Reporter: Saulzar | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.2 checker) | 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 Saulzar): * Attachment "NanoFeldspar.hs" added. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13135> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13135: Typechecker "panic! the 'impossible' happened" -------------------------------------+------------------------------------- Reporter: Saulzar | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.2 checker) | 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: | -------------------------------------+------------------------------------- -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13135#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13135: Typechecker "panic! the 'impossible' happened" -------------------------------------+------------------------------------- Reporter: Saulzar | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.2 checker) | 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 RyanGlScott): To be precise, here's the particular panic it gives: {{{ $ /opt/ghc/8.0.2/bin/ghci NanoFeldspar.hs GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci [1 of 1] Compiling NanoFeldspar ( NanoFeldspar.hs, interpreted ) NanoFeldspar.hs:122:10: error:ghc: panic! (the 'impossible' happened) (GHC version 8.0.2 for x86_64-unknown-linux): No skolem info: t_a2xN }}} Reproducible on GHC 8.0.1, 8.0.2, and HEAD. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13135#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13135: Typechecker "panic! the 'impossible' happened" -------------------------------------+------------------------------------- Reporter: Saulzar | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.2 checker) | 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 simonpj): OK this is a real bug, to do with the implementation of injective type families. I'm struggling with time, but I at least understand the problem -- thank you! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13135#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13135: Typechecker "panic! the 'impossible' happened" -------------------------------------+------------------------------------- Reporter: Saulzar | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.2 checker) | 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:"2b64e926a628fb2a3710b0360123ea73331166fe/ghc" 2b64e926/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="2b64e926a628fb2a3710b0360123ea73331166fe" Apply the right substitution in ty-fam improvement Trac #13135 showed that we were failing to apply the correct substitution to the un-substituted tyvars during type-family improvement using injectivity. Specifically in TcInteractlinjImproveEqns we need to use instFlexiX. An outright bug, easy to fix. Slight refactoring along the way. The quantified tyars of the axiom are readily to hand; we don't need to take the free tyvars of the LHS }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13135#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13135: Typechecker "panic! the 'impossible' happened" -------------------------------------+------------------------------------- Reporter: Saulzar | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.2 checker) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_fail/T13135 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => dependent/should_fail/T13135 * status: new => closed * resolution: => fixed Comment: Thanks for reporting this, with such a nice test case. Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13135#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13135: Typechecker "panic! the 'impossible' happened" -------------------------------------+------------------------------------- Reporter: Saulzar | Owner: Type: bug | Status: merge Priority: normal | Milestone: 8.0.3 Component: Compiler (Type | Version: 8.0.2 checker) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_fail/T13135 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: closed => merge * milestone: => 8.0.3 Comment: I guess we could merge this to 8.03, if that happens. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13135#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13135: Typechecker "panic! the 'impossible' happened" -------------------------------------+------------------------------------- Reporter: Saulzar | Owner: Type: bug | Status: merge Priority: normal | Milestone: 8.0.3 Component: Compiler (Type | Version: 8.0.2 checker) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_fail/T13135 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Saulzar): Great job, glad it was useful. I thought I'd try simplifying the syntactic library with new ghc features and this was a bit of a stumbling block, cheers! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13135#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#13135: Typechecker "panic! the 'impossible' happened" -------------------------------------+------------------------------------- Reporter: Saulzar | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler (Type | Version: 8.0.2 checker) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | dependent/should_fail/T13135 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"e61900c994334c209a9de763993716314abf9f6d/ghc" e61900c9/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="e61900c994334c209a9de763993716314abf9f6d" Add regression test for #13538 Commit 2b64e926a628fb2a3710b0360123ea73331166fe (#13135) ended up fixing #13538 as well. Let's add a regression test so that it stays fixed. Test Plan: make test TEST=T13538 Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13538 Differential Revision: https://phabricator.haskell.org/D3426 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13135#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC