[GHC] #12017: GHC panics on pattern synonym ‘kindPrimRep’

#12017: GHC panics on pattern synonym ‘kindPrimRep’ -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Keywords: | Operating System: Unknown/Multiple PatternSynonyms | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{#!hs {-# Language PatternSynonyms, GADTs #-} data Ty a where B :: Ty Bool class (Eq a, Ord a, Show a) => GetTy a where getTy :: Ty a instance GetTy Bool where getTy = B data Exp a where Constant :: GetTy a => Ty a -> a -> Exp a pattern MkBool :: () => (GetTy t, Bool ~ t) => t -> Exp t pattern MkBool bool = Constant B bool pattern Tru :: () => Bool ~ t => Exp t pattern Tru = MkBool True }}} with head: {{{ $ ghci -ignore-dot-ghci /tmp/tywM.hs GHCi, version 8.1.20160503: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( /tmp/tywM.hs, interpreted ) ghc: panic! (the 'impossible' happened) (GHC version 8.1.20160503 for x86_64-unknown-linux): kindPrimRep.go rep_a2tC Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}} {{{#!hs pattern Tru :: () => Bool ~ t => Exp t pattern Tru = Constant B True }}} works fine -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12017 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12017: GHC panics on pattern synonym ‘kindPrimRep’ -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: | PatternSynonyms 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): Simplied {{{#!hs {-# Language PatternSynonyms, GADTs #-} data Exp a where Constant :: a -> Exp a pattern MkBool :: Bool -> Exp Bool pattern MkBool bool = Constant bool pattern Tru :: Exp Bool pattern Tru = MkBool True }}} this breaks my stuff, but it's easy to work around. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12017#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12017: GHC panics on pattern synonym ‘kindPrimRep’ -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: duplicate | Keywords: | PatternSynonyms 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): * status: new => closed * resolution: => duplicate Comment: Always worth searching to see if someone has already reported! Dup of #12007 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12017#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12017: GHC panics on pattern synonym ‘kindPrimRep’ -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: duplicate | Keywords: | PatternSynonyms 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): How embarrassing, I even commented on that ticket so there is no excuse :) thanks Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12017#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC