[GHC] #13071: GHCi 8.0.1 panic with PatternSynonyms

#13071: GHCi 8.0.1 panic with PatternSynonyms ----------------------------------------+------------------------------- Reporter: taktoa | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.0.1 Keywords: PatternSynonyms | Operating System: Linux Architecture: Unknown/Multiple | Type of failure: GHCi crash Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: ----------------------------------------+------------------------------- Loading this code: {{{#!hs {-# LANGUAGE PatternSynonyms #-} data D1 = MkD1 () data D2 = MkD2 D1 pattern P1 x = MkD1 x pattern P2 x = MkD2 (P1 x) }}} in GHCi 8.0.1 results in the following panic: {{{ $ ghci Broken.hs GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( Broken.hs, interpreted ) ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): kindPrimRep.go rep_a18s Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}} The unique name in the error message (`rep_a18s`) seems to be consistent between executions, but varies after `:reload`ing. The panic does not occur when the module is simply compiled with `ghc`; it only occurs when loaded into `ghci`. According to Gergő Érdi, who is CCed, the error does not occur in GHCi 7.10.3 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13071 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13071: GHCi 8.0.1 panic with PatternSynonyms -------------------------------+---------------------------------------- Reporter: taktoa | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.0.1 Resolution: | Keywords: PatternSynonyms Operating System: Linux | Architecture: Unknown/Multiple Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------+---------------------------------------- Comment (by cactus): We can simplify the code even further, and still have it crash GHCi: {{{ {-# LANGUAGE PatternSynonyms #-} data D1 = MkD1 data D2 = MkD2 D1 pattern P1 = MkD1 pattern P2 = MkD2 P1 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13071#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13071: GHCi 8.0.1 panic with PatternSynonyms -------------------------------+---------------------------------------- Reporter: taktoa | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.0.1 Resolution: | Keywords: PatternSynonyms Operating System: Linux | Architecture: Unknown/Multiple Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------+---------------------------------------- Comment (by taktoa): Looks like this might be a dupe of https://ghc.haskell.org/trac/ghc/ticket/12007 and https://ghc.haskell.org/trac/ghc/ticket/12017 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13071#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13071: GHCi 8.0.1 panic with PatternSynonyms -------------------------------+---------------------------------------- Reporter: taktoa | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.0.1 Resolution: | Keywords: PatternSynonyms Operating System: Linux | Architecture: Unknown/Multiple Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------+---------------------------------------- Comment (by simonpj): Yes, pls check with 8.0.2. Thanks. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13071#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13071: GHCi 8.0.1 panic with PatternSynonyms -------------------------------+---------------------------------------- Reporter: taktoa | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.0.1 Resolution: | Keywords: PatternSynonyms Operating System: Linux | Architecture: Unknown/Multiple Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------+---------------------------------------- Comment (by taktoa): I don't have easy access to GHC 8.0.2 (I'm on NixOS), but I tried it with GHC HEAD and the problem seems to be solved: {{{ ~ $ /nix/store/0sww5ii70bn8b8w3g8lszqn7pwxl4axs-ghc-8.1.20160930/bin/ghci Broken.hs GHCi, version 8.1.20160930: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( Broken.hs, interpreted ) Ok, modules loaded: Main. *Main> Leaving GHCi. }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13071#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13071: GHCi 8.0.1 panic with PatternSynonyms -------------------------------+---------------------------------------- Reporter: taktoa | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: GHCi | Version: 8.0.1 Resolution: duplicate | Keywords: PatternSynonyms Operating System: Linux | Architecture: Unknown/Multiple Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------+---------------------------------------- Changes (by taktoa): * status: new => closed * resolution: => duplicate -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13071#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13071: GHCi 8.0.1 panic with PatternSynonyms -------------------------------+---------------------------------------- Reporter: taktoa | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: GHCi | Version: 8.0.1 Resolution: duplicate | Keywords: PatternSynonyms Operating System: Linux | Architecture: Unknown/Multiple Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------+---------------------------------------- Comment (by mpickering): I am fairly certain this is solved in 8.0.2 as well. The 8.0.2 release candidate is on nixpkgs if you want to try, the attribute name is `haskell.compiler.ghc802`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13071#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13071: GHCi 8.0.1 panic with PatternSynonyms -------------------------------+---------------------------------------- Reporter: taktoa | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: GHCi | Version: 8.0.1 Resolution: duplicate | Keywords: PatternSynonyms Operating System: Linux | Architecture: Unknown/Multiple Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------+---------------------------------------- Comment (by RyanGlScott): I can confirm it's fixed in 8.0.2: {{{ $ /opt/ghc/8.0.2/bin/ghci Bug.hs GHCi, version 8.0.1.20161213: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci [1 of 1] Compiling Main ( Bug.hs, interpreted ) Ok, modules loaded: Main. }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13071#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC