#11811 closed bug (fixed)

GHC sometimes misses a CUSK

Reported by: goldfire Owned by: goldfire
Priority: normal Milestone: 8.0.1
Component: Compiler Version: 8.1
Keywords: TypeInType Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: typecheck/should_compile/T11811
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


{-# LANGUAGE TypeInType #-}

data Test (a :: x) (b :: x) :: x -> *
  where K :: Test Int Bool Double

fails, because GHC thinks that Test does not have a CUSK.

It should have a CUSK, because while there is no forall x in the result kind, the x is in scope from previous use in kinds.

Fix en route.

Change History (5)

comment:1 Changed 18 months ago by goldfire

Keywords: TypeInType added

comment:2 Changed 18 months ago by Richard Eisenberg <eir@…>

In b1084fd7/ghc:

Fix #11811.

Previously, I had forgotten to omit variables already in scope
from the TypeInType CUSK check. Simple enough to fix.

Test case: typecheck/should_compile/T11811

comment:3 Changed 18 months ago by goldfire

Milestone: 8.0.1
Status: newmerge

I think this is worth merging, as it seems to be needed to compile singletons. If there's a merge problem, I can probably work around it.

comment:4 Changed 18 months ago by goldfire

Test Case: typecheck/should_compile/T11811

comment:5 Changed 18 months ago by bgamari

Resolution: fixed
Status: mergeclosed
Note: See TracTickets for help on using tickets.