Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Html output doesn't include documentation for data/newtype instance constructors or arguments #1212

Open
@lukel97

Description

@lukel97

This sample file Foo.hs documents some data/newtype instance constructors and arguments

{-# LANGUAGE TypeFamilies #-}
module Foo where

data family T a
-- | A data instance
data    instance T Int  =
  -- | A data instance constructor
    T1 Int    -- ^ A data instance argument
  | T2 Bool   -- ^ A data instance argument
-- | A newtype instance
newtype instance T Char =
  -- | A newtype instance constructor
  TC { runTC :: Bool -- ^ A newtype instance record selector
     }

The documentation for the constructors and arguments are present in the .hi file:

module header:
  Nothing
declaration docs:
  T1:
    " A data instance constructor"
  T2:
    " A data instance argument
 | A newtype instance"
  TC:
    " A newtype instance constructor"
  runTC:
    " A newtype instance record selector"
  D:R:TInt0:
    " A data instance"
arg docs:

But the haddock html output doesn't seem to include them, when compiled with haddock Foo.hs -html
Screenshot 2020-07-03 at 17 15 34

Found when working on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3330

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:webUI, UX and rendering for the web backend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions