Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8307585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:33:23+00:00 2026-06-08T18:33:23+00:00

Is there a way to add Haddock documentation to an entity in the module

  • 0

Is there a way to add Haddock documentation to an entity in the module which exports it, rather than the one that declares it?

I’ve got a hidden module that declares a dozen types or so, and then another module which exports just the parts that the end-user is supposed to see. It would be logical to put the documentation in the exposed module rather than the hidden one. But I can’t figure out how to do that…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:33:24+00:00Added an answer on June 8, 2026 at 6:33 pm

    No, it’s not possible. Functions can have per-argument and per-type-param documentation, and it would make documentation inconsistent if you could:

    1. write different versions in different locations
    2. have one version override another
    3. introduce inconsistencies in argument documentation: what if you override the main doc string for a function; should the argument doc strings be removed?

    The following file:

    module Bla
           ( -- * Fooishness
    
             -- | This is 'foo'. It is not 'bar'.
             foo
           , -- * Barishness
    
             -- | This is 'bar'. It is sometimes a little 'foo'.
             bar
           ) where
    
    -- | The actual foo documentation
    foo :: a -- ^ The a
        -> b -- ^ The b
        -> c
    foo = undefined
    
    -- | The actual bar documentation
    bar :: a
    bar = undefined
    

    …yields this documentation:

    Haddock documentation

    As you can see, you can use section comments to kind of emulate function documentation strings, but the documentation will only be properly generated if you use function documentation comments right by the type signatures.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to add a text-shadow in CSS that is similar to
Is there a way add data to a couchdb that runs on another domain
Is there a way to add a listener that triggers a function when an
Is there a way to add an item which has no text and even
Is there a way to add custom buttons to the WMD Editor that extends
Is there a way to add a leading zero to a date that is
Is there a way add an event handler in a Thunderbird extension that fires
Is there a way/add-on that I can use so everytime any javascript function is
Is there any way to add one string to the end of another in
Is there any way to add an icon to a windows console application (that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.