Skip to content

Core Lint error with representation polymorphism and partial type sigs

The following program slips through the representation polymorphism check and creates a polymorphic binder, causing a panic or a Lint error

{-# LANGUAGE PartialTypeSignatures #-}
module M where

import GHC.Exts

f x = x :: (_ :: (TYPE (_ _)))

I've tried pinpointing the problem. The call to newInferExpTypeFRR in Tc/Utils/Unify.hs creates an ExpType with ir_frr containing the fixed representation constraint. But apparently that information is not acted upon.

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