Alfonso Acosta wrote:

I'm beginning to get familiar with Haddock and I want to document a
library which, as usually happens, has some ADT definitions.

I'd like to document the ADTs both for the end-user (who shouldn't be
told about its internal implementation) and future developers.

Haddock is designed to document APIs for the end-user rather than the developer, although it has been suggested several times that it could generate source-code documentation too.

One way to do what you want is to split the module into two:

module Lib.ADT.Internals (ADT(..)) where
data ADT = C1 | ... | Cn

module Lib.ADT (ADT) where
import Lib.ADT.Internals

developers can import the .Internals module, and end-users import the ADT module.

Cheers,
        Simon

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to