:info prints kinds in closed type family equations without enabling -fprint-explicit-kinds
Load this file into GHCi:
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
module Bug where
type family Foo (a :: k) :: k where
Foo a = a
And run :info on Foo:
$ /opt/ghc/8.4.3/bin/ghci Bug.hs
GHCi, version 8.4.3: http://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.
λ> :i Foo
type family Foo (a :: k) :: k
where Foo k a = a
-- Defined at Bug.hs:5:1
Note that when printing the equation for Foo, the kind k is treated as though it were the first visible argument to Foo, even though -fprint-explicit-kinds is not enabled. This is because ppr_tc_args in IfaceType does not take -fprint-explicit-kinds into account.
Patch incoming (pending a ./validate).
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.4.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |