[GHC] #10586: GHC 7.10.1 panic due to wildcard in data family instance

GHC ghc-devs at haskell.org
Mon Jun 29 08:48:07 UTC 2015


#10586: GHC 7.10.1 panic due to wildcard in data family instance
-------------------------------------+-------------------------------------
              Reporter:              |             Owner:
  WrenThornton                       |            Status:  new
                  Type:  bug         |         Milestone:
              Priority:  normal      |           Version:  7.10.1
             Component:  Compiler    |  Operating System:  Unknown/Multiple
              Keywords:              |   Type of failure:  None/Unknown
          Architecture:              |        Blocked By:
  Unknown/Multiple                   |   Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 The following simple program causes GHC 7.10.1 (for x86_64-apple-darwin)
 to panic (rnHsTyKi HsWildcardTy):

 {{{#!hs
  {-# LANGUAGE TypeFamilies, GADTs, DataKinds, PolyKinds #-}

 data MyKind = A | B

 data family Sing (a :: k)

 data instance Sing (_ :: MyKind) where
     SingA :: Sing A
     SingB :: Sing B
 }}}

 Because data family instances must be fully saturated, we must give some
 name to the parameter; but because our instance is a GADT, the name of
 that parameter is meaningless, so using the wildcard makes complete sense
 here.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10586>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list