Ticket #71 (new enhancement)

Opened 4 years ago

Last modified 8 months ago

Derive portability information from pragmas

Reported by: haddock@… Owned by:
Priority: minor Milestone:
Version: Keywords:
Cc: haddock@…

Description

It's too easy to write wrong Portability information in the Portability field of a module's haddock header. I wish that Portability information is automatically derived from a LANGUAGE or OPTIONS_GHC pragma, e.g. when no Portability field is specified. Somehow related to ticket #33.

Change History

Changed 4 years ago by anonymous

  • cc haddock@… added

Changed 4 years ago by waern

  • milestone changed from 2.5.0 to 2.6.0

It would be nice if the portability status of a module could be automatically inferred, yes. There is plan to implement something like this in Cabal. See:

http://hackage.haskell.org/trac/hackage/ticket/370

Cabal could easily pass this information via a command-line flag to Haddock. Now the question is: is it worth doing this in Haddock as well, for those cases when Cabal is not used to invoke Haddock? It might be, but we should not prioritise this issue much, IMHO.

If we'd do it, we could look directly in the DynFlags? (The GHC data type that represents compiler options) to determine exactly which extensions are used, so that we don't miss extensions turned on via the command line.

Changed 8 months ago by anonymous

  • milestone 2.6.0 deleted

Milestone 2.6.0 deleted

Note: See TracTickets for help on using tickets.