[GHC] #12386: Infinite loop when showing type family error

#12386: Infinite loop when showing type family error -------------------------------------+------------------------------------- Reporter: elliottt | 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: -------------------------------------+------------------------------------- When attempting to load this code in ghci with ghc-8.0.1, I get an infinite loop while it attempts to display the error: {{{ {-# LANGUAGE TypeFamilies #-} class C a where type family F a t :: * type family T a :: * type T a = F a }}} {{{ catbug :: ~/Scratch/ast-experiment » ghci test.hs GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /Users/trevor/.ghci [1 of 1] Compiling Main ( test.hs, interpreted ) test.hs:7:14: error: }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12386 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12386: Infinite loop when showing type family error -------------------------------------+------------------------------------- Reporter: elliottt | Owner: simonpj 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: | -------------------------------------+------------------------------------- Changes (by simonpj): * owner: => simonpj Comment: I'm on this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12386#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12386: Infinite loop when showing type family error -------------------------------------+------------------------------------- Reporter: elliottt | Owner: simonpj 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 bgamari): Simon, what ever happened here? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12386#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12386: Infinite loop when showing type family error -------------------------------------+------------------------------------- Reporter: elliottt | Owner: simonpj Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler (Type | Version: 8.0.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * priority: normal => high * failure: None/Unknown => Compile-time crash * component: Compiler => Compiler (Type checker) * milestone: => 8.0.2 @@ -4,1 +4,1 @@ - {{{ + {{{#!hs New description: When attempting to load this code in ghci with ghc-8.0.1, I get an infinite loop while it attempts to display the error: {{{#!hs {-# LANGUAGE TypeFamilies #-} class C a where type family F a t :: * type family T a :: * type T a = F a }}} {{{ catbug :: ~/Scratch/ast-experiment » ghci test.hs GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /Users/trevor/.ghci [1 of 1] Compiling Main ( test.hs, interpreted ) test.hs:7:14: error: }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12386#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12386: Infinite loop when showing type family error -------------------------------------+------------------------------------- Reporter: elliottt | Owner: simonpj Type: bug | Status: new Priority: high | Milestone: 8.0.2 Component: Compiler (Type | Version: 8.0.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): This is a black-hole kind of bug. Works ok if you move `F` out of the type class {{{ type family F a t :: * class C a where type family T a :: * type T a = F a }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12386#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12386: Infinite loop when showing type family error -------------------------------------+------------------------------------- Reporter: elliottt | Owner: simonpj Type: bug | Status: new Priority: highest | Milestone: 8.0.2 Component: Compiler (Type | Version: 8.0.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * priority: high => highest -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12386#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12386: Infinite loop when showing type family error -------------------------------------+------------------------------------- Reporter: elliottt | Owner: simonpj Type: bug | Status: new Priority: highest | Milestone: 8.0.2 Component: Compiler (Type | Version: 8.0.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * cc: goldfire (added) Comment: Richard, might you have some idea of what is going on here? It seems plausibly related to #12174, perhaps you could have a look during your bug sweep? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12386#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12386: Infinite loop when showing type family error -------------------------------------+------------------------------------- Reporter: elliottt | Owner: goldfire Type: bug | Status: new Priority: highest | Milestone: 8.0.2 Component: Compiler (Type | Version: 8.0.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * owner: simonpj => goldfire Comment: Yes, that's plausible. I'll take a look. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12386#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12386: Infinite loop when showing type family error -------------------------------------+------------------------------------- Reporter: elliottt | Owner: goldfire Type: bug | Status: new Priority: highest | Milestone: 8.0.3 Component: Compiler (Type | Version: 8.0.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 8.0.2 => 8.0.3 Comment: Unfortunately it doesn't look like we'll have this fixed for 8.0.2. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12386#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12386: Infinite loop when showing type family error
-------------------------------------+-------------------------------------
Reporter: elliottt | Owner: goldfire
Type: bug | Status: closed
Priority: highest | Milestone: 8.0.3
Component: Compiler (Type | Version: 8.0.1
checker) |
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Compile-time | Test Case: indexed-
crash | types/should_fail/T12386
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by simonpj):
* testcase: => indexed-types/should_fail/T12386
* status: new => closed
* resolution: => fixed
Comment:
Fixed by
{{{
commit 3f5673f34a2f761423027bf46f64f7499708725f
Author: Simon Peyton Jones
participants (1)
-
GHC