[Haddock] Fully qualified identifiers

David Waern david.waern at gmail.com
Thu Aug 26 06:50:56 EDT 2010


2010/8/26 Tobias Brandt <tob.brandt at googlemail.com>:
> Hi all,
> I found the following message in the mailing list archive:
>
> On Tue, 8 Jan 2008, David Waern wrote:
>>  I like to have the following enhancements:
>>
>>  * Optionally show qualifications of identifiers, that is print
>> "Sequence.map" rather than "map", "Music.T" rather than just "T". The
>> option for haddock could be
>>      --qualification QUAL
>>            QUAL=none   (default) strip off qualification (just "map")
>>            QUAL=orig   show the identifiers as they are written in the module (e.g. "map" or "List.map")
>>            QUAL=full   show all identifiers with full qualification (Data.List.map)
>>    Actually I tried to implement it by myself in the old Haddock, but I
>> could not precisely identify the place, where the qualification is
>> removed.
>
> Is somebody working or planning to work on that?
>
> It would be really useful for packages like numeric-prelude that use C
> for the main class and T for the
> main type in a module intended for qualified import. Also, it would
> help in case a module was imported
> qualified because of name clashes. Atm, those name clashes still exist
> in the haddock output.

Noone is working or planning to work on this at the moment. I agree
that it would be useful. If you want to take a look at it yourself
then we can try to help out by telling you where to look and so on. I
think full qualification would be quite easy to implement, since the
backends in Haddock have that information available already. The
"orig" qualification style would take a bit more work, I suppose.

David



More information about the Haddock mailing list