Opened 4 years ago

Closed 3 years ago

#6129 closed bug (fixed)

Failure when using promoted data family instances, again

Reported by: dreixel Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.5
Keywords: PolyKinds Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: polykinds/T6129
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


The following code should fail (since we don't promote data families), but it should do so gracefully:

{-# LANGUAGE GADTs        #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE PolyKinds    #-}
{-# LANGUAGE DataKinds    #-}

data family D a
data instance D a = DInt

data X a where
  X1 :: X DInt

With ghc-7.5.20120513 it produces:

    GHC internal error: `DInt' is not in scope during type checking, but it passed the renamer
    tcl_env of environment: [(a1t1, AThing k_a1t8),
                             (rVJ, AThing k_a1t8 -> *), (rW1, ANothing)]
    In the type `X DInt'
    In the definition of data constructor `X1'
    In the data declaration for `X'

#5716 seems not to have fixed this particular case.

Change History (1)

comment:1 Changed 3 years ago by simonpj

  • difficulty set to Unknown
  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to polykinds/T6129
Note: See TracTickets for help on using tickets.