[GHC] #11611: ghc panics

#11611: ghc panics -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.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: -------------------------------------+------------------------------------- {{{#!hs {-# LANGUAGE DataKinds, StandaloneDeriving, TypeOperators, GADTs, FlexibleInstances #-} data A a where A :: A (a:as) -> a -> A as deriving instance Show a => Show (A a) }}} gives {{{#!hs % ghci -ignore-dot-ghci Panic.hs GHCi, version 8.1.20160117: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( Panic.hs, interpreted ) ghc: panic! (the 'impossible' happened) (GHC version 8.1.20160117 for x86_64-unknown-linux): fvProv falls into a hole {a1aV} Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11611 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11611: ghc panics -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.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 hvr): I notice you're not using a recent GHC HEAD snapshot. I've just tried in recent GHC HEAD & GHC 8.0RC and in both cases GHC does not panic: {{{ $ ghci-8.0.0.20160218 -ignore-dot-ghci Panic.hs GHCi, version 8.0.0.20160218: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( Panic.hs, interpreted ) Panic.hs:6:37: error: • Expected kind ‘[*]’, but ‘a’ has kind ‘*’ • In the first argument of ‘A’, namely ‘a’ In the first argument of ‘Show’, namely ‘A a’ In the stand-alone deriving instance for ‘Show a => Show (A a)’ }}} {{{ $ ghci-8.1.20160218 -ignore-dot-ghci Panic.hs GHCi, version 8.1.20160218: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( Panic.hs, interpreted ) Panic.hs:6:37: error: • Expected kind ‘[*]’, but ‘a’ has kind ‘*’ • In the first argument of ‘A’, namely ‘a’ In the first argument of ‘Show’, namely ‘A a’ In the stand-alone deriving instance for ‘Show a => Show (A a)’ Failed, modules loaded: none. Prelude> }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11611#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11611: ghc panics -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.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 have yet to upgrade my compiler. Can someone confirm that this is the same bug: {{{#!hs {-# LANGUAGE MultiParamTypeClasses, TypeOperators, PolyKinds, TypeInType, FunctionalDependencies, AllowAmbiguousTypes, FlexibleInstances, FlexibleContexts #-} import Data.Kind (Type) class ToMimeType k (a :: k) | a -> k where toMimeType :: String instance ToMimeType Type Int where toMimeType = "int" instance ToMimeType Type Float where toMimeType = "fl" instance (ToMimeType a x, ToMimeType [a] xs) => ToMimeType [u] (x:xs) where }}} Feel free to close the ticket if so -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11611#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11611: ghc panics -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11563, #11520, | Differential Rev(s): #11516, #11399 | Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * version: 8.1 => 8.0.1-rc1 * component: Compiler => Compiler (Type checker) * related: => #11563, #11520, #11516, #11399 * milestone: => 8.0.1 Comment: Looks fine: {{{ Test.hs:15:65: error: • Expected kind ‘[u]’, but ‘x : xs’ has kind ‘[a]’ • In the second argument of ‘ToMimeType’, namely ‘x : xs’ In the instance declaration for ‘ToMimeType [u] (x : xs)’ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11611#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11611: ghc panics
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 8.0.1
Component: Compiler (Type | Version: 8.0.1-rc1
checker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #11563, #11520, | Differential Rev(s):
#11516, #11399 |
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#11611: ghc panics -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc1 checker) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | polykinds/T11611 Blocked By: | Blocking: Related Tickets: #11563, #11520, | Differential Rev(s): #11516, #11399 | Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => polykinds/T11611 * status: new => closed * resolution: => fixed Comment: Both programs produce a kind error; neither panics. So I think we are good and I'll close. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11611#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC