[GHC] #14111: strange error when using data families with levity polymorphism and unboxed sums and data families

GHC ghc-devs at haskell.org
Sun Aug 20 15:02:42 UTC 2017


#14111: strange error when using data families with levity polymorphism and unboxed
sums and data families
-------------------------------------+-------------------------------------
        Reporter:  carter            |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:  TypeFamilies
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 RyanGlScott):

 I'm confused - is this GADT behavior, or data family behavior? I can't
 seem to trigger a similar sort of error with a non-family GADT. For
 instance, this works fine:

 {{{#!hs
 {-# LANGUAGE DataKinds #-}
 {-# LANGUAGE GADTs #-}
 {-# LANGUAGE PolyKinds #-}
 {-# LANGUAGE TypeFamilies #-}
 module Foo where

 data M (a :: Bool)

 data F (a :: k) where
   MkF :: M a -> F a
 }}}

 (Granted, these examples aren't quite equivalent, but this was the most
 convenient way I could think of to constraint the type parameter to be of
 kind `Bool` without actually giving it an explicit kind signature.)

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


More information about the ghc-tickets mailing list