[Haddock] Issue with support for warnings/deprecations
    David Waern 
    david.waern at gmail.com
       
    Fri May 11 15:06:53 BST 2012
    
    
  
Hi Simon,
2012/5/11 Simon Hengel <sol at typeful.net>:
> Hi David,
> I just discovered an issue with the current warnings/deprecation
> support.  For identifiers that have a warning attached, prune is not
> regarded anymore.  So I guess my approach to add warnings to the Doc
> node has indeed disadvantages, and we probably better put it somewhere
> else in the interface.
OK, I'd be happy if we put it elsewhere!
> From what I remember, this requires separate backend code to handle all
> the cases (types, constructors, value bindings, classes, etc.) for all
> the backends (xhtml, hoogle, latex), so it is quite some work.  And I do
> not really like it, because it's hard to get it right.  If you have any
> ideas on how to make this more tractable, please let me know.
Couldn't it be added at a pretty high level in the backends? It
doesn't need to be done differently for types, constructors, value
bindings, etc, does it? Perhaps we should have a datatype that
contains the doc AST and attributes such as warnings, e.g:
data Documentation =
  {
    doc :: Doc DocName;
    warnings :: [Warning];
    ...
  }
and then store that in the ExportItems that we feed to the backends.
> In addition I'd tend to implement #204 [1] before releasing that
> feature.  Otherwise, it's not on par with handwritten deprecation
> messages.
Ah, great!
Myself, I hope to have some time to work on Haddock this sunday.
David
    
    
More information about the Haddock
mailing list