Ticket #189 (assigned defect)

Opened 3 years ago

Last modified 6 months ago

Incorrect or at least misleading output with PolyKinds + TypeOperators

Reported by: illissius Owned by: haasn
Priority: minor Milestone:
Version: 2.14.0 Keywords:
Cc:

Description

The code

{-# LANGUAGE PolyKinds, ConstraintKinds, TypeOperators, MultiParamTypeClasses, FlexibleInstances, UndecidableInstances #-}
class    (c a, d a) => (c :&: d) a
instance (c a, d a) => (c :&: d) a

produces the following documentation for the instance:

Instances
(c a, d a) => (k :&: c) d a

I don't know where it should be, but that k is clearly not in the right place.

Change History

Changed 2 years ago by anonymous

  • milestone 2.10.0 deleted

Milestone 2.10.0 deleted

Changed 6 months ago by haasn

  • owner set to haasn
  • status changed from new to assigned

Due to bc5756d062bbc5cad5d4fa60798435ed020c518e this now displays as:

Instances
(c a, d a) => (:&:) k c d a

This matches GHC's behavior in 7.6 and earlier, but it looks like GHC 7.8 just silently omits the kind annotation altogether - I'm not to keen on removing them altogether though since it can remove valuable information.

I'm not sure what a better resolution would be. Maybe we could display kind parameters using a different font style? Perhaps italic.

Otherwise, if I get no further feedback I'm going to go ahead and close this issue.

Changed 6 months ago by Fūzetsu

  • version changed from 2.9.2 to 2.14.0

I think it'd be worth-while to indicate that k is a kind annotation as currently it just looks like Haddock randomly inserted something. I'd be either for making k display differently/in a different place or for removing it all together like 7.8 does.

Note: See TracTickets for help on using tickets.