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.

Reusing named chunks in other modules #179

Open
@ghc-mirror

Description

@ghc-mirror

Original reporter: reiner.pope@

Similar to #97. Consider the following:

module A (
  -- $note
  f,
  )    
  where

  -- $note
  -- This is a long note.

  -- | This is a function
  f :: Int -> Int
  f x = x

module B (
  -- $A.note
  f,
 )
 where

  import A

Currently, there is no way to insert the documentation chunk named $note (which is defined in module A) into the documentation for B. I propose the above syntax as a way to do this.

The motivation for this construct is as follows. Since A and B export (at least some of) the same API, the $note chunk should be included in both of their Haddocks. It is possible to work around this need by using anchors to link to A's note from B, but this a workaround rather than a solution.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions