Skip to content

tcIfaceGlobal error with existentially quantified types

Consider the following program:

-- A.hs-boot
module A where
data D

-- B.hs
module B where
import {-# SOURCE #-} A
class K a where
  method :: D -> a

-- A.hs
{-# LANGUAGE ExistentialQuantification #-}
module A where
import B
data D = forall n. K n => D

We get a tcIfaceGlobal error in this case (one-shot of course.) I reduced this case out of prog006.

So for some reason we're tugging on K too early—that's as far as I know at this point.

Edited by Edward Z. Yang
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information