diff options
author | simonmar <unknown> | 2002-04-24 15:14:12 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-04-24 15:14:12 +0000 |
commit | 995d3f9ed418352cb8e341630e7c7655080c1612 (patch) | |
tree | 48515c410f772e4c84bc3bd9448218ec7b5da500 /src/HaddockHtml.hs | |
parent | 106adbbe619e9bd42a6ca00f097d3eb22011f6f5 (diff) |
[haddock @ 2002-04-24 15:14:11 by simonmar]
Grok the kind of module headers we use in fptools/libraries, and pass
the "portability", "stability", and "maintainer" strings through into
the generated HTML. If the module header doesn't match the pattern,
then we don't include the info in the HTML.
Diffstat (limited to 'src/HaddockHtml.hs')
-rw-r--r-- | src/HaddockHtml.hs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs index 8e02e535..2b2c4f3e 100644 --- a/src/HaddockHtml.hs +++ b/src/HaddockHtml.hs @@ -108,23 +108,28 @@ pageHeader mod iface title source_url = tda [theclass "modulebar"] << (vanillaTable << ( (td << font ! [size "6"] << toHtml mod) <-> - (tda [align "right"] << + moduleInfo iface + ) + ) + +moduleInfo iface + | Nothing <- iface_info iface = Html.emptyTable + | Just info <- iface_info iface = + tda [align "right"] << (table ! [width "300", border 0, cellspacing 0, cellpadding 0] << ( (tda [width "50%"] << font ! [color "#ffffff"] << bold << toHtml "Portability") <-> (tda [width "50%"] << font ! [color "#ffffff"] << - toHtml (iface_portability iface)) </> + toHtml (portability info)) </> (tda [width "50%"] << font ! [color "#ffffff"] << bold << toHtml "Stability") <-> (tda [width "50%"] << font ! [color "#ffffff"] << - toHtml (iface_stability iface)) </> + toHtml (stability info)) </> (tda [width "50%"] << font ! [color "#ffffff"] << bold << toHtml "Maintainer") <-> (tda [width "50%"] << font ! [color "#ffffff"] << - toHtml (iface_maintainer iface)) + toHtml (maintainer info)) )) - )) - ) -- --------------------------------------------------------------------------- -- Generate the module contents |