Ticket #85 (closed enhancement: fixed)

Opened 9 years ago

Last modified 3 years ago

show kind signatures for (gadt) type constructors

Reported by: rwbarton@… Owned by: Fūzetsu
Priority: minor Milestone: 2.15.0
Version: 2.14.0 Keywords:
Cc: mmitar@…, eir@…


I like to write GADT declarations in the following style:

{-# LANGUAGE GADTs, KindSignatures #-}
data Foo :: (* -> *) -> * -> * where
  Bar :: f x -> Foo f (f x)

so I don't give (necessarily unused) names to the type parameters of the type constructor Foo. If I don't export the data constructors of Foo but only Foo itself then the documentation generated by Haddock consists solely of

data Foo

This is uninformative and potentially misleading (it seems to suggest that Foo has kind *). It would be better to produce

data Foo :: (* -> *) -> * -> *

This is a particularly bad set of circumstances (no constructors for the reader to infer the kind from) but in general I think it would be nice to preserve any kind signatures written in the program source.

Change History

Changed 7 years ago by mitar

  • cc mmitar@… added

Changed 4 years ago by goldfire

  • cc eir@… added

Changed 4 years ago by Fūzetsu

  • owner set to Fūzetsu
  • status changed from new to assigned
  • version changed from 2.5.0 to 2.14.0
  • milestone set to 2.15.0

Changed 3 years ago by Fūzetsu

  • status changed from assigned to closed
  • resolution set to fixed

Kind signatures will now print whenever one is present.

data Foo :: * where

will get one

data Foo' where


Obviously the example in the OP will now be shown with a signature.

Note: See TracTickets for help on using tickets.