
#12593: ghci spins forever -------------------------------------+------------------------------------- Reporter: Iceland_jack | 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 run with {{{ ghci -ignore-dot-ghci -XRankNTypes -XTypeInType -XGADTs -XConstraintKinds t5AE.hs }}} the compiler spins -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12593 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12593: ghci spins forever -------------------------------------+------------------------------------- Reporter: Iceland_jack | 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: | -------------------------------------+------------------------------------- Changes (by Iceland_jack): * Attachment "t5AE.hs" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12593 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12593: ghci spins forever -------------------------------------+------------------------------------- Reporter: Iceland_jack | 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 simonpj): To make it easier to read the ticket, the code is very short. {{{ {-# LANGUAGE GADTs, ConstraintKinds, PolyKinds, TypeInType, KindSignatures, RankNTypes #-} module T12593 where import Data.Kind newtype Free k p a b where Free :: (forall q. k q => (forall c d. p c d -> q c d) -> q a b) -> Free k p a b run :: k2 q => Free k k1 k2 p a b -> (forall (c :: k) (d :: k1). p c d -> q c d) -> q a b run (Free cat) = cat }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12593#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12593: ghci spins forever -------------------------------------+------------------------------------- Reporter: Iceland_jack | 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: | -------------------------------------+------------------------------------- Changes (by simonpj): * cc: goldfire (added) Comment: Yes, I can reproduce this with HEAD. It seems that we are updating a unification variable so that it points to itself. I see {{{ Following filled tyvar k_arL[tau:1] = (k_apN[sk] |> Sym U(hole:{arZ}, *, (((k_arR[tau:1] -> k_arU[tau:1] -> TYPE t_arG[tau:1]) -> Constraint) -> (k_arL[tau:1] -> k_arO[tau:1] -> TYPE t_arJ[tau:1]) -> *) -> Constraint)_N) }}} And that is disaster. Remarkable example! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12593#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12593: ghci spins forever -------------------------------------+------------------------------------- Reporter: Iceland_jack | 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 Iceland_jack): I'm glad my penchant for disaster can be put to good use -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12593#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12593: ghci spins forever
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | 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

#12593: ghci spins forever -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: merge 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: | polykinds/T12593 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => polykinds/T12593 * status: new => merge Comment: Thanks for a great example. Ben: this is a relatively big patch. I'm 90% confident it's ok, and it certainly validates, but it's uncomfortably large to merge into a patch release. I'm inclined to merge it none the less, but be prepared to back away if smoke-testing the release candidate shows any problems. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12593#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12593: ghci spins forever -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | polykinds/T12593 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed * milestone: => 8.0.2 Comment: Comment:4 merged to `ghc-8.0` as 836f0e248b21c4f802b3dce1593f975296e56ba4. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12593#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC