[GHC] #12017: GHC panics on pattern synonym ‘kindPrimRep’
GHC
ghc-devs at haskell.org
Thu May 5 19:44:02 UTC 2016
#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
More information about the ghc-tickets
mailing list