Skip to content

Inconsistent RuntimeRep defaulting in :info

With this module

{-# LANGUAGE RankNTypes, DataKinds, StandaloneKindSignatures, PolyKinds #-}
import GHC.Types
import GHC.Exts
type A :: forall (rep1 :: RuntimeRep) (rep2 :: RuntimeRep). TYPE rep1 -> TYPE rep2 -> Type
type A = FUN 'Many

ghci reports (-fno-print-explicit-foralls):

ghci> :i A
type A :: * -> * -> *
type A = (->) :: TYPE rep1 -> TYPE rep2 -> *

The RuntimeReps are hidden in the first line, but not in the second.

Edit: it's a bit clearer with -fprint-explicit-kinds:

type A :: * -> * -> *
type A @rep1 @rep2 = (->) rep1 rep2 :: TYPE rep1 -> TYPE rep2 -> *
Edited by Krzysztof Gogolewski
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information