#11252 closed feature request (fixed)

:kind command hides the explicit kind

Reported by: Iceland_jack Owned by: goldfire
Priority: normal Milestone: 8.0.1
Component: GHCi Version: 7.11
Keywords: TypeInType Cc:
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by Iceland_jack)

-- /tmp/test.hs
{-# LANGUAGE TypeInType #-}

data Proxy1 k (a :: k) = P1
data Proxy2   (a :: k) = P2

if I load the following into ghci (head) the :kind command gives the same result

% ghci -ignore-dot-ghci /tmp/test.hs
GHCi, version 7.11.20151216: http://www.haskell.org/ghc/  :? for help
[1 of 1] Compiling Main             ( test.hs, interpreted )
Ok, modules loaded: Main.
*Main> :kind Proxy1
Proxy1 :: k -> *
*Main> :kind Proxy2
Proxy2 :: k -> *

edit: I asked on #ghc, was told this was undesirable

Change History (7)

comment:1 Changed 22 months ago by Iceland_jack

Description: modified (diff)

comment:2 Changed 22 months ago by Iceland_jack

Description: modified (diff)

comment:3 Changed 22 months ago by Iceland_jack

Example from System FC with Explicit Kind Equality (Extended Version):

data Kind = Star | Arr Kind Kind

data Ty :: Kind -> * where
  TInt :: Ty Star
  ...

data TypeRep (k :: Kind) (t :: Ty k) where
  TyInt :: TyRep Star TInt
  ...

gives

>>> :kind TyRep
TyRep :: Ty k -> *

making the user think they should provide a Ty k

>>> :kind TyRep TInt
<error>

when they should really provide a Kind and then some Ty k:

>>> :kind TyRep Star
TyRep Star :: Ty 'Star -> *
>>> :kind TyRep Star TInt
TyRep Star TInt :: *

comment:4 Changed 22 months ago by goldfire

Owner: set to goldfire

Another bug for me. Will fix.

comment:5 Changed 21 months ago by Richard Eisenberg <eir@…>

In d4af57fa/ghc:

Test #11252 in ghci/scripts/T11252

This one worked for me out of the box.

comment:6 Changed 21 months ago by goldfire

Milestone: 8.0.1
Status: newmerge

It's just the test case that I added. But that should be merged.

comment:7 Changed 21 months ago by bgamari

Resolution: fixed
Status: mergeclosed

This was merged to ghc-8.0 in b41586be7ba0659216c74ef8a58a0aa4d2cc2195.

Note: See TracTickets for help on using tickets.