Skip to content

Non-abstract types also have skolem nature

In #12680, we determined that abstract types from signatures need to be treated like skolem variables.

But it turns out other types from signatures also need to be treated like skolem variables too:

{-# LANGUAGE GADTs #-}
unit p where
    signature M1 where
        data A = MkA
    signature M2 where
        data A = MkA
    module A where
        import qualified M1
        import qualified M2
        f :: M1.A ~ M2.A => a -> b
        f x = x

This is bad because these As could be the same thing in the end. I think the real, final fix, is to not test for "skolem abstractness" (as we do now), but just look and see if the Name for the TyCon is a name hole or not. Then we can eliminate skolem abstract completely.

Trac metadata
Trac field Value
Version 8.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information