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

  • Home
  • SEARCH
  • 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 9005505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:09:45+00:00 2026-06-16T01:09:45+00:00

Suppose I have a library packaged and built using Cabal, and some module Internal

  • 0

Suppose I have a library packaged and built using Cabal, and some module Internal is not in my cabal file’s Exposed-modules. Does it then make any difference if I specify a pragma

{-# OPTIONS_HADDOCK hide #-}

at the top of Internal.hs, or is it already automatically hidden according to Haddock?

If it does make a difference, what effect does it have?

  • 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-16T01:09:46+00:00Added an answer on June 16, 2026 at 1:09 am

    It does make a difference if the haddocks of the package are created with the --internal flag to cabal haddock.

    $ cabal help haddock
    Usage: cabal haddock [FLAGS]
    
    Flags for haddock:
     -h --help                  Show this help text
     -v --verbose[=n]           Control verbosity (n is 0--3, default verbosity
                                level is 1)
      <snip>
        --executables           Run haddock for Executables targets
        --internal              Run haddock for internal modules and include all
                                symbols
      <snip>
    

    If the haddocks are created without the --internal flag, the hide module attribute has no effect: no documentation is created for the module anyway.

    If --internal is given, then documentation is created for non-exposed modules except those that specify the hide attribute.

    In other words, documentation is generated if hide is not set and either --internal is specified or the module is exported.

    The use of --internal for cabal haddock can be specified with cabal install --haddock-internal, or when manually invoking cabal haddock, or with the runhaskell ./Setup.hs ... interface.

    Most people just run cabal install with the default options, so only few would observe the difference.

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

Sidebar

Related Questions

Suppose, I have an opensource project that depends on some library, that must be
Suppose I have the following Java file in a library: package test; public abstract
Suppose I have taken a video file from iphone library. I want to put
Suppose there is a library module Foo which is not under my control: module
Suppose I have an shared library file (say libtemp.so) which has a global variable.
Suppose we have a shared library named libtest.so, there is one function foo in
Suppose you have a library that provides a method that accepts an object that
I am using a library (written in C) that is not reentrant(i.e no function
Suppose I have a library that uses exceptions to indicate success or failure. I
Suppose we have a user library project ProjectUserlib that uses an external jar external.jar,

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.