Skip to content

:info no longer shows instances of poly-kinded data families in GHC 9.2+

If you load this program into GHCi:

{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
module Bug where

data family D (a :: k)
data instance D Int = DInt

In GHCi 9.0.1, running :info D will show the data family instance:

$ /opt/ghc/9.0.1/bin/ghci Bug.hs
GHCi, version 9.0.1: https://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /home/ryanglscott/.ghci
[1 of 1] Compiling Bug              ( Bug.hs, interpreted )
Ok, one module loaded.
λ> :info D
type D :: forall k. k -> *
data family D a
        -- Defined at Bug.hs:5:1
data instance D Int = DInt      -- Defined at Bug.hs:6:15

In GHCi 9.2.1-alpha1, however, this no longer happens:

$ ~/Software/ghc-9.2.1-alpha1/bin/ghci Bug.hs
GHCi, version 9.2.0.20210331: https://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /home/ryanglscott/.ghci
[1 of 1] Compiling Bug              ( Bug.hs, interpreted )
Ok, one module loaded.
λ> :info D
type D :: forall k. k -> *
data family D a
        -- Defined at Bug.hs:5:1

This regression was introduced in commit aaa5fc21 (Replace Ord TyLit with nonDetCmpTyLit (#19441)). cc @int-index Actually, it was introduced in 3e082f8f (Implement BoxedRep proposal).

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