From e99252026ad1b50215b86ffe30038351ca486bfa Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Fri, 22 Aug 2014 12:14:16 +0800 Subject: Move Haddock API to a separate package --- .gitignore | 3 +- .travis.yml | 1 + LICENSE | 4 +- haddock-api/LICENSE | 23 + haddock-api/Setup.lhs | 3 + haddock-api/haddock-api.cabal | 94 ++++ .../resources/html/Classic.theme/haskell_icon.gif | Bin 0 -> 911 bytes haddock-api/resources/html/Classic.theme/minus.gif | Bin 0 -> 56 bytes haddock-api/resources/html/Classic.theme/plus.gif | Bin 0 -> 59 bytes .../resources/html/Classic.theme/xhaddock.css | 499 ++++++++++++++++++ .../resources/html/Ocean.std-theme/hslogo-16.png | Bin 0 -> 1684 bytes .../resources/html/Ocean.std-theme/minus.gif | Bin 0 -> 56 bytes .../resources/html/Ocean.std-theme/ocean.css | 577 +++++++++++++++++++++ .../resources/html/Ocean.std-theme/plus.gif | Bin 0 -> 59 bytes .../resources/html/Ocean.std-theme/synopsis.png | Bin 0 -> 11327 bytes haddock-api/resources/html/frames.html | 30 ++ haddock-api/resources/html/haddock-util.js | 344 ++++++++++++ haddock-api/resources/latex/haddock.sty | 57 ++ haddock-api/src | 1 + haddock.cabal | 116 +---- resources/html/Classic.theme/haskell_icon.gif | Bin 911 -> 0 bytes resources/html/Classic.theme/minus.gif | Bin 56 -> 0 bytes resources/html/Classic.theme/plus.gif | Bin 59 -> 0 bytes resources/html/Classic.theme/xhaddock.css | 499 ------------------ resources/html/Ocean.std-theme/hslogo-16.png | Bin 1684 -> 0 bytes resources/html/Ocean.std-theme/minus.gif | Bin 56 -> 0 bytes resources/html/Ocean.std-theme/ocean.css | 577 --------------------- resources/html/Ocean.std-theme/plus.gif | Bin 59 -> 0 bytes resources/html/Ocean.std-theme/synopsis.png | Bin 11327 -> 0 bytes resources/html/frames.html | 30 -- resources/html/haddock-util.js | 344 ------------ resources/latex/haddock.sty | 57 -- src/Haddock.hs | 3 +- src/Haddock/Version.hs | 9 +- 34 files changed, 1645 insertions(+), 1626 deletions(-) create mode 100644 haddock-api/LICENSE create mode 100755 haddock-api/Setup.lhs create mode 100644 haddock-api/haddock-api.cabal create mode 100644 haddock-api/resources/html/Classic.theme/haskell_icon.gif create mode 100644 haddock-api/resources/html/Classic.theme/minus.gif create mode 100644 haddock-api/resources/html/Classic.theme/plus.gif create mode 100644 haddock-api/resources/html/Classic.theme/xhaddock.css create mode 100644 haddock-api/resources/html/Ocean.std-theme/hslogo-16.png create mode 100644 haddock-api/resources/html/Ocean.std-theme/minus.gif create mode 100644 haddock-api/resources/html/Ocean.std-theme/ocean.css create mode 100644 haddock-api/resources/html/Ocean.std-theme/plus.gif create mode 100644 haddock-api/resources/html/Ocean.std-theme/synopsis.png create mode 100644 haddock-api/resources/html/frames.html create mode 100644 haddock-api/resources/html/haddock-util.js create mode 100644 haddock-api/resources/latex/haddock.sty create mode 120000 haddock-api/src delete mode 100644 resources/html/Classic.theme/haskell_icon.gif delete mode 100644 resources/html/Classic.theme/minus.gif delete mode 100644 resources/html/Classic.theme/plus.gif delete mode 100644 resources/html/Classic.theme/xhaddock.css delete mode 100644 resources/html/Ocean.std-theme/hslogo-16.png delete mode 100644 resources/html/Ocean.std-theme/minus.gif delete mode 100644 resources/html/Ocean.std-theme/ocean.css delete mode 100644 resources/html/Ocean.std-theme/plus.gif delete mode 100644 resources/html/Ocean.std-theme/synopsis.png delete mode 100644 resources/html/frames.html delete mode 100644 resources/html/haddock-util.js delete mode 100644 resources/latex/haddock.sty diff --git a/.gitignore b/.gitignore index d3ca28b8..6b8d26e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /dist/ -/haddock-library/dist +/haddock-api/dist/ +/haddock-library/dist/ /html-test/out/ /latex-test/out/ diff --git a/.travis.yml b/.travis.yml index 338d394d..98720920 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ before_install: - doctest -isrc -i$(echo vendor/attoparsec-*) -optP-include -optPdist/build/autogen/cabal_macros.h src/Documentation/Haddock/Parser.hs - cabal install - cd .. + - (cd haddock-api/ && cabal configure --enable-tests --ghc-options=-Werror && cabal build && cabal test && cabal install) script: - cabal configure --enable-tests --ghc-options=-Werror && cabal build && cabal test diff --git a/LICENSE b/LICENSE index 1636bfcd..460decfc 100644 --- a/LICENSE +++ b/LICENSE @@ -5,11 +5,11 @@ modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR diff --git a/haddock-api/LICENSE b/haddock-api/LICENSE new file mode 100644 index 00000000..460decfc --- /dev/null +++ b/haddock-api/LICENSE @@ -0,0 +1,23 @@ +Copyright 2002-2010, Simon Marlow. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/haddock-api/Setup.lhs b/haddock-api/Setup.lhs new file mode 100755 index 00000000..5bde0de9 --- /dev/null +++ b/haddock-api/Setup.lhs @@ -0,0 +1,3 @@ +#!/usr/bin/env runhaskell +> import Distribution.Simple +> main = defaultMain diff --git a/haddock-api/haddock-api.cabal b/haddock-api/haddock-api.cabal new file mode 100644 index 00000000..c40edb14 --- /dev/null +++ b/haddock-api/haddock-api.cabal @@ -0,0 +1,94 @@ +name: haddock-api +version: 2.14.4 +synopsis: A documentation-generation tool for Haskell libraries +description: Haddock is a documentation-generation tool for Haskell + libraries +license: BSD3 +license-file: LICENSE +author: Simon Marlow, David Waern +maintainer: Simon Hengel , Mateusz Kowalczyk +homepage: http://www.haskell.org/haddock/ +bug-reports: https://github.com/haskell/haddock/issues +copyright: (c) Simon Marlow, David Waern +category: Documentation +build-type: Simple +cabal-version: >= 1.10 +stability: experimental + +data-dir: + resources +data-files: + html/frames.html + html/haddock-util.js + html/Classic.theme/haskell_icon.gif + html/Classic.theme/minus.gif + html/Classic.theme/plus.gif + html/Classic.theme/xhaddock.css + html/Ocean.std-theme/hslogo-16.png + html/Ocean.std-theme/minus.gif + html/Ocean.std-theme/ocean.css + html/Ocean.std-theme/plus.gif + html/Ocean.std-theme/synopsis.png + latex/haddock.sty + +library + default-language: + Haskell2010 + + build-depends: + base >= 4.3 && < 4.8 + , bytestring + , filepath + , directory + , containers + , deepseq + , array + , xhtml >= 3000.2 && < 3000.3 + , Cabal >= 1.10 + , ghc == 7.8.3 + + , ghc-paths + , haddock-library + + hs-source-dirs: + src + + ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2 + + exposed-modules: + Documentation.Haddock + + other-modules: + Haddock + Haddock.Interface + Haddock.Interface.Rename + Haddock.Interface.Create + Haddock.Interface.AttachInstances + Haddock.Interface.LexParseRn + Haddock.Interface.ParseModuleHeader + Haddock.Parser + Haddock.Utils + Haddock.Backends.Xhtml + Haddock.Backends.Xhtml.Decl + Haddock.Backends.Xhtml.DocMarkup + Haddock.Backends.Xhtml.Layout + Haddock.Backends.Xhtml.Names + Haddock.Backends.Xhtml.Themes + Haddock.Backends.Xhtml.Types + Haddock.Backends.Xhtml.Utils + Haddock.Backends.LaTeX + Haddock.Backends.HaddockDB + Haddock.Backends.Hoogle + Haddock.ModuleTree + Haddock.Types + Haddock.Doc + Haddock.Version + Haddock.InterfaceFile + Haddock.Options + Haddock.GhcUtils + Haddock.Convert + Paths_haddock_api + +source-repository head + type: git + location: https://github.com/haskell/haddock.git diff --git a/haddock-api/resources/html/Classic.theme/haskell_icon.gif b/haddock-api/resources/html/Classic.theme/haskell_icon.gif new file mode 100644 index 00000000..10589f91 Binary files /dev/null and b/haddock-api/resources/html/Classic.theme/haskell_icon.gif differ diff --git a/haddock-api/resources/html/Classic.theme/minus.gif b/haddock-api/resources/html/Classic.theme/minus.gif new file mode 100644 index 00000000..1deac2fe Binary files /dev/null and b/haddock-api/resources/html/Classic.theme/minus.gif differ diff --git a/haddock-api/resources/html/Classic.theme/plus.gif b/haddock-api/resources/html/Classic.theme/plus.gif new file mode 100644 index 00000000..2d15c141 Binary files /dev/null and b/haddock-api/resources/html/Classic.theme/plus.gif differ diff --git a/haddock-api/resources/html/Classic.theme/xhaddock.css b/haddock-api/resources/html/Classic.theme/xhaddock.css new file mode 100644 index 00000000..ed231b5a --- /dev/null +++ b/haddock-api/resources/html/Classic.theme/xhaddock.css @@ -0,0 +1,499 @@ +* { + margin: 0; + padding: 0; +} + +.extension-list { + list-style-type: none; + margin-left: 0; + padding-left: 0; +} + +body { + background-color: #ffffff; + color: #000000; + font-size: 100%; + font-family: sans-serif; + padding: 8px; +} + +a:link { color: #0000e0; text-decoration: none } +a:visited { color: #0000a0; text-decoration: none } +a:hover { background-color: #e0e0ff; text-decoration: none } + +/* font is a little too small in MSIE */ +tt { font-size: 100%; } +pre { font-size: 100%; } +.keyword { text-decoration: underline; } +.caption { + font-weight: bold; + margin: 0; + padding: 0; +} + +h1 { + padding-top: 15px; + font-weight: bold; + font-size: 150%; +} + +h2 { + padding-top: 10px; + font-weight: bold; + font-size: 130% + } + +h3 { + padding-top: 5px; + font-weight: bold; + font-size: 110% + } + +h4, h5 { + font-weight: bold; + font-size: 100% + } + +h1, h2, h3, h4, h5 { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +p { + padding-top: 2px; + padding-left: 10px; +} + +ul, ol, dl { + padding-top: 2px; + padding-left: 10px; + margin-left: 2.5em; +} + +pre { + padding-top: 2px; + padding-left: 20px; +} + +* + p, * + pre { + margin-top: 1em; +} +.caption + p, .src + p { + margin-top: 0; +} + +.def { + font-weight: bold; +} + +ul.links { + list-style: none; + text-align: left; + float: right; + display: inline-table; + padding: 0; +} + +ul.links li { + display: inline; + border-left-width: 1px; + border-left-color: #ffffff; + border-left-style: solid; + white-space: nowrap; + padding: 1px 5px; +} + +.hide { display: none; } +.show { } +.collapser { + background: url(minus.gif) no-repeat 0 0.3em; +} +.expander { + background: url(plus.gif) no-repeat 0 0.3em; +} +.collapser, .expander { + padding-left: 14px; + cursor: pointer; +} + +#package-header { + color: #ffffff; + padding: 5px 5px 5px 31px; + margin: 0 0 1px; + background: #000099 url(haskell_icon.gif) no-repeat 5px 6px; + position: relative; +} + +#package-header .caption { + font-weight: normal; + font-style: normal; +} +#package-header a:link { color: #ffffff } +#package-header a:visited { color: #ffff00 } +#package-header a:hover { background-color: #6060ff; } +#package-header ul.links li:hover { background-color: #6060ff; } + +div#style-menu-holder { + position: relative; + z-index: 2; + display: inline; +} + +#style-menu { + position: absolute; + z-index: 1; + overflow: visible; + background-color: #000099; + margin: 0; + width: 6em; + text-align: center; + right: 0; + padding: 2px 2px 1px; +} + +#style-menu li { + display: list-item; + border-style: none; + margin: 0; + padding: 3px; + color: #000; + list-style-type: none; + border-top: 1px solid #ffffff; +} + +#module-header { + overflow: hidden; /* makes sure info float is properly contained */ + display: inline-block; /* triggers hasLayout in IE*/ +} + +#module-header { + display: block; /* back to block */ + background-color: #0077dd; + padding: 5px; +} + +#module-header .caption { + font-size: 200%; + padding: .35em 0; + font-weight: normal; + font-style: normal; +} + +table.info { + color: #ffffff; + display: block; + float: right; + max-width: 50%; +} + +.info th, .info td { + text-align: left; + padding: 0 10px 0 0; +} + + +#table-of-contents { + margin-top: 1em; + margin-bottom: 2em; +} + +#table-of-contents ul { + margin-top: 1em; + margin-bottom: 1em; + margin-left: 0; + list-style-type: none; + padding: 0; +} + +#table-of-contents ul ul { + margin-left: 2.5em; +} + +#description .caption, +#synopsis .caption, +#module-list .caption, +#index .caption { + padding-top: 15px; + font-weight: bold; + font-size: 150% +} + +#synopsis { + margin-bottom: 2em; +} + +#synopsis .expander, +#synopsis .collapser { + background: none; + padding-left: inherit; +} + +#synopsis .hide { + display: inherit; +} + +#synopsis ul { + margin: 0; + padding-top: 0; + padding-left: 20px; + list-style-type: none; +} + +#synopsis li { + margin-top: 8px; + margin-bottom: 8px; + padding: 3px; +} + +#synopsis li li { + padding: 0; + margin-top: 0; + margin-bottom: 0; +} + + +div.top { + margin-top: 1em; + clear: left; + margin-bottom: 1em; +} + +div.top h5 { + margin-left: 10px; +} + + +.src { + padding: 3px; + background-color: #f0f0f0; + font-family: monospace; + margin-bottom: 0; +} + + +.src a.link { + float: right; + border-left-width: 1px; + border-left-color: #000099; + border-left-style: solid; + white-space: nowrap; + font-size: small; + padding: 0 8px 2px 5px; + margin-right: -3px; + background-color: #f0f0f0; +} + +div.subs { + margin-left: 10px; + clear: both; + margin-top: 2px; +} + +.subs dl { + margin-left: 0; +} + +.subs dl dl { + padding-left: 0; + padding-top: 4px; +} + +.subs dd +{ + margin: 2px 0 9px 2em; +} + +.subs dd.empty { + display: none; +} + +.subs table { + margin-left: 10px; + border-spacing: 1px 1px; + margin-top: 4px; + margin-bottom: 4px; +} + +.subs table table { + margin-left: 0; +} + +.arguments .caption, +.fields .caption { + display: none; +} + +/* need extra .subs in the selector to make it override the rules for .subs and .subs table */ + +.subs.arguments { + margin: 0; +} + +.subs.arguments table { + border-spacing: 0; + margin-top: 0; + margin-bottom: 0; +} + +.subs.arguments td.src { + white-space: nowrap; +} + +.subs.arguments + p { + margin-top: 0; +} + +.subs.associated-types, +.subs.methods { + margin-left: 20px; +} + +.subs.associated-types .caption, +.subs.methods .caption { + margin-top: 0.5em; + margin-left: -10px; +} + +.subs.associated-types .src + .src, +.subs.methods .src + .src { + margin-top: 8px; +} + +p.arg { + margin-bottom: 0; +} +p.arg span { + background-color: #f0f0f0; + font-family: monospace; + white-space: nowrap; + float: none; +} + + +img.coll { + width : 0.75em; height: 0.75em; margin-bottom: 0; margin-right: 0.5em +} + + +td.arg { + padding: 3px; + background-color: #f0f0f0; + font-family: monospace; + margin-bottom: 0; +} + +td.rdoc p { + margin-bottom: 0; +} + + + +#footer { + background-color: #000099; + color: #ffffff; + padding: 4px + } + +#footer p { + padding: 1px; + margin: 0; +} + +#footer a:link { + color: #ffffff; + text-decoration: underline + } +#footer a:visited { + color: #ffff00 + } +#footer a:hover { + background-color: #6060ff + } + + +#module-list ul { + list-style: none; + padding-bottom: 15px; + padding-left: 2px; + margin: 0; +} + +#module-list ul ul { + padding-bottom: 0; + padding-left: 20px; +} + +#module-list li .package { + float: right; +} +#mini #module-list .caption { + display: none; +} + +#index .caption { +} + +#alphabet ul { + list-style: none; + padding: 0; + margin: 0.5em 0 0; +} + +#alphabet li { + display: inline; + margin: 0 0.2em; +} + +#index .src { + background: none; + font-family: inherit; +} + +#index td.alt { + padding-left: 2em; +} + +#index td { + padding-top: 2px; + padding-bottom: 1px; + padding-right: 1em; +} + + +#mini h1 { font-size: 130%; } +#mini h2 { font-size: 110%; } +#mini h3 { font-size: 100%; } +#mini h1, #mini h2, #mini h3 { + margin-top: 0.5em; + margin-bottom: 0.25em; + padding: 0 0; +} + +#mini h1 { border-bottom: 1px solid #ccc; } + +#mini #module-header { + margin: 0; + padding: 0; +} +#mini #module-header .caption { + font-size: 130%; + background: #0077dd; + padding: 0.25em; + height: inherit; + margin: 0; +} + +#mini #interface .top { + margin: 0; + padding: 0; +} +#mini #interface .src { + margin: 0; + padding: 0; + font-family: inherit; + background: inherit; +} + +.warning { + color: red; +} diff --git a/haddock-api/resources/html/Ocean.std-theme/hslogo-16.png b/haddock-api/resources/html/Ocean.std-theme/hslogo-16.png new file mode 100644 index 00000000..0ff8579f Binary files /dev/null and b/haddock-api/resources/html/Ocean.std-theme/hslogo-16.png differ diff --git a/haddock-api/resources/html/Ocean.std-theme/minus.gif b/haddock-api/resources/html/Ocean.std-theme/minus.gif new file mode 100644 index 00000000..1deac2fe Binary files /dev/null and b/haddock-api/resources/html/Ocean.std-theme/minus.gif differ diff --git a/haddock-api/resources/html/Ocean.std-theme/ocean.css b/haddock-api/resources/html/Ocean.std-theme/ocean.css new file mode 100644 index 00000000..de436324 --- /dev/null +++ b/haddock-api/resources/html/Ocean.std-theme/ocean.css @@ -0,0 +1,577 @@ +/* @group Fundamentals */ + +* { margin: 0; padding: 0 } + +/* Is this portable? */ +html { + background-color: white; + width: 100%; + height: 100%; +} + +body { + background: white; + color: black; + text-align: left; + min-height: 100%; + position: relative; +} + +p { + margin: 0.8em 0; +} + +ul, ol { + margin: 0.8em 0 0.8em 2em; +} + +dl { + margin: 0.8em 0; +} + +dt { + font-weight: bold; +} +dd { + margin-left: 2em; +} + +a { text-decoration: none; } +a[href]:link { color: rgb(196,69,29); } +a[href]:visited { color: rgb(171,105,84); } +a[href]:hover { text-decoration:underline; } + +/* @end */ + +/* @group Fonts & Sizes */ + +/* Basic technique & IE workarounds from YUI 3 + For reasons, see: + http://yui.yahooapis.com/3.1.1/build/cssfonts/fonts.css + */ + +body { + font:13px/1.4 sans-serif; + *font-size:small; /* for IE */ + *font:x-small; /* for IE in quirks mode */ +} + +h1 { font-size: 146.5%; /* 19pt */ } +h2 { font-size: 131%; /* 17pt */ } +h3 { font-size: 116%; /* 15pt */ } +h4 { font-size: 100%; /* 13pt */ } +h5 { font-size: 100%; /* 13pt */ } + +select, input, button, textarea { + font:99% sans-serif; +} + +table { + font-size:inherit; + font:100%; +} + +pre, code, kbd, samp, tt, .src { + font-family:monospace; + *font-size:108%; + line-height: 124%; +} + +.links, .link { + font-size: 85%; /* 11pt */ +} + +#module-header .caption { + font-size: 182%; /* 24pt */ +} + +.info { + font-size: 85%; /* 11pt */ +} + +#table-of-contents, #synopsis { + /* font-size: 85%; /* 11pt */ +} + + +/* @end */ + +/* @group Common */ + +.caption, h1, h2, h3, h4, h5, h6 { + font-weight: bold; + color: rgb(78,98,114); + margin: 0.8em 0 0.4em; +} + +* + h1, * + h2, * + h3, * + h4, * + h5, * + h6 { + margin-top: 2em; +} + +h1 + h2, h2 + h3, h3 + h4, h4 + h5, h5 + h6 { + margin-top: inherit; +} + +ul.links { + list-style: none; + text-align: left; + float: right; + display: inline-table; + margin: 0 0 0 1em; +} + +ul.links li { + display: inline; + border-left: 1px solid #d5d5d5; + white-space: nowrap; + padding: 0; +} + +ul.links li a { + padding: 0.2em 0.5em; +} + +.hide { display: none; } +.show { display: inherit; } +.clear { clear: both; } + +.collapser { + background-image: url(minus.gif); + background-repeat: no-repeat; +} +.expander { + background-image: url(plus.gif); + background-repeat: no-repeat; +} +p.caption.collapser, +p.caption.expander { + background-position: 0 0.4em; +} +.collapser, .expander { + padding-left: 14px; + margin-left: -14px; + cursor: pointer; +} + +pre { + padding: 0.25em; + margin: 0.8em 0; + background: rgb(229,237,244); + overflow: auto; + border-bottom: 0.25em solid white; + /* white border adds some space below the box to compensate + for visual extra space that paragraphs have between baseline + and the bounding box */ +} + +.src { + background: #f0f0f0; + padding: 0.2em 0.5em; +} + +.keyword { font-weight: normal; } +.def { font-weight: bold; } + + +/* @end */ + +/* @group Page Structure */ + +#content { + margin: 0 auto; + padding: 0 2em 6em; +} + +#package-header { + background: rgb(41,56,69); + border-top: 5px solid rgb(78,98,114); + color: #ddd; + padding: 0.2em; + position: relative; + text-align: left; +} + +#package-header .caption { + background: url(hslogo-16.png) no-repeat 0em; + color: white; + margin: 0 2em; + font-weight: normal; + font-style: normal; + padding-left: 2em; +} + +#package-header a:link, #package-header a:visited { color: white; } +#package-header a:hover { background: rgb(78,98,114); } + +#module-header .caption { + color: rgb(78,98,114); + font-weight: bold; + border-bottom: 1px solid #ddd; +} + +table.info { + float: right; + padding: 0.5em 1em; + border: 1px solid #ddd; + color: rgb(78,98,114); + background-color: #fff; + max-width: 40%; + border-spacing: 0; + position: relative; + top: -0.5em; + margin: 0 0 0 2em; +} + +.info th { + padding: 0 1em 0 0; +} + +div#style-menu-holder { + position: relative; + z-index: 2; + display: inline; +} + +#style-menu { + position: absolute; + z-index: 1; + overflow: visible; + background: #374c5e; + margin: 0; + text-align: center; + right: 0; + padding: 0; + top: 1.25em; +} + +#style-menu li { + display: list-item; + border-style: none; + margin: 0; + padding: 0; + color: #000; + list-style-type: none; +} + +#style-menu li + li { + border-top: 1px solid #919191; +} + +#style-menu a { + width: 6em; + padding: 3px; + display: block; +} + +#footer { + background: #ddd; + border-top: 1px solid #aaa; + padding: 0.5em 0; + color: #666; + text-align: center; + position: absolute; + bottom: 0; + width: 100%; + height: 3em; +} + +/* @end */ + +/* @group Front Matter */ + +#table-of-contents { + float: right; + clear: right; + background: #faf9dc; + border: 1px solid #d8d7ad; + padding: 0.5em 1em; + max-width: 20em; + margin: 0.5em 0 1em 1em; +} + +#table-of-contents .caption { + text-align: center; + margin: 0; +} + +#table-of-contents ul { + list-style: none; + margin: 0; +} + +#table-of-contents ul ul { + margin-left: 2em; +} + +#description .caption { + display: none; +} + +#synopsis { + display: none; +} + +.no-frame #synopsis { + display: block; + position: fixed; + right: 0; + height: 80%; + top: 10%; + padding: 0; +} + +#synopsis .caption { + float: left; + width: 29px; + color: rgba(255,255,255,0); + height: 110px; + margin: 0; + font-size: 1px; + padding: 0; +} + +#synopsis p.caption.collapser { + background: url(synopsis.png) no-repeat -64px -8px; +} + +#synopsis p.caption.expander { + background: url(synopsis.png) no-repeat 0px -8px; +} + +#synopsis ul { + height: 100%; + overflow: auto; + padding: 0.5em; + margin: 0; +} + +#synopsis ul ul { + overflow: hidden; +} + +#synopsis ul, +#synopsis ul li.src { + background-color: #faf9dc; + white-space: nowrap; + list-style: none; + margin-left: 0; +} + +/* @end */ + +/* @group Main Content */ + +#interface div.top { margin: 2em 0; } +#interface h1 + div.top, +#interface h2 + div.top, +#interface h3 + div.top, +#interface h4 + div.top, +#interface h5 + div.top { + margin-top: 1em; +} +#interface p.src .link { + float: right; + color: #919191; + border-left: 1px solid #919191; + background: #f0f0f0; + padding: 0 0.5em 0.2em; + margin: 0 -0.5em 0 0.5em; +} + +#interface span.fixity { + color: #919191; + border-left: 1px solid #919191; + padding: 0.2em 0.5em 0.2em 0.5em; + margin: 0 -1em 0 1em; +} + +#interface span.rightedge { + border-left: 1px solid #919191; + padding: 0.2em 0 0.2em 0; + margin: 0 0 0 1em; +} + +#interface table { border-spacing: 2px; } +#interface td { + vertical-align: top; + padding-left: 0.5em; +} +#interface td.src { + white-space: nowrap; +} +#interface td.doc p { + margin: 0; +} +#interface td.doc p + p { + margin-top: 0.8em; +} + +.subs dl { + margin: 0; +} + +.subs dt { + float: left; + clear: left; + display: block; + margin: 1px 0; +} + +.subs dd { + float: right; + width: 90%; + display: block; + padding-left: 0.5em; + margin-bottom: 0.5em; +} + +.subs dd.empty { + display: none; +} + +.subs dd p { + margin: 0; +} + +/* Render short-style data instances */ +.inst ul { + height: 100%; + padding: 0.5em; + margin: 0; +} + +.inst, .inst li { + list-style: none; + margin-left: 1em; +} + +.top p.src { + border-top: 1px solid #ccc; +} + +.subs, .doc { + /* use this selector for one level of indent */ + padding-left: 2em; +} + +.warning { + color: red; +} + +.arguments { + margin-top: -0.4em; +} +.arguments .caption { + display: none; +} + +.fields { padding-left: 1em; } + +.fields .caption { display: none; } + +.fields p { margin: 0 0; } + +/* this seems bulky to me +.methods, .constructors { + background: #f8f8f8; + border: 1px solid #eee; +} +*/ + +/* @end */ + +/* @group Auxillary Pages */ + + +.extension-list { + list-style-type: none; + margin-left: 0; +} + +#mini { + margin: 0 auto; + padding: 0 1em 1em; +} + +#mini > * { + font-size: 93%; /* 12pt */ +} + +#mini #module-list .caption, +#mini #module-header .caption { + font-size: 125%; /* 15pt */ +} + +#mini #interface h1, +#mini #interface h2, +#mini #interface h3, +#mini #interface h4 { + font-size: 109%; /* 13pt */ + margin: 1em 0 0; +} + +#mini #interface .top, +#mini #interface .src { + margin: 0; +} + +#mini #module-list ul { + list-style: none; + margin: 0; +} + +#alphabet ul { + list-style: none; + padding: 0; + margin: 0.5em 0 0; + text-align: center; +} + +#alphabet li { + display: inline; + margin: 0 0.25em; +} + +#alphabet a { + font-weight: bold; +} + +#index .caption, +#module-list .caption { font-size: 131%; /* 17pt */ } + +#index table { + margin-left: 2em; +} + +#index .src { + font-weight: bold; +} +#index .alt { + font-size: 77%; /* 10pt */ + font-style: italic; + padding-left: 2em; +} + +#index td + td { + padding-left: 1em; +} + +#module-list ul { + list-style: none; + margin: 0 0 0 2em; +} + +#module-list li { + clear: right; +} + +#module-list span.collapser, +#module-list span.expander { + background-position: 0 0.3em; +} + +#module-list .package { + float: right; +} + +/* @end */ diff --git a/haddock-api/resources/html/Ocean.std-theme/plus.gif b/haddock-api/resources/html/Ocean.std-theme/plus.gif new file mode 100644 index 00000000..2d15c141 Binary files /dev/null and b/haddock-api/resources/html/Ocean.std-theme/plus.gif differ diff --git a/haddock-api/resources/html/Ocean.std-theme/synopsis.png b/haddock-api/resources/html/Ocean.std-theme/synopsis.png new file mode 100644 index 00000000..85fb86ec Binary files /dev/null and b/haddock-api/resources/html/Ocean.std-theme/synopsis.png differ diff --git a/haddock-api/resources/html/frames.html b/haddock-api/resources/html/frames.html new file mode 100644 index 00000000..1b4e38d4 --- /dev/null +++ b/haddock-api/resources/html/frames.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + diff --git a/haddock-api/resources/html/haddock-util.js b/haddock-api/resources/html/haddock-util.js new file mode 100644 index 00000000..9a6fccf7 --- /dev/null +++ b/haddock-api/resources/html/haddock-util.js @@ -0,0 +1,344 @@ +// Haddock JavaScript utilities + +var rspace = /\s\s+/g, + rtrim = /^\s+|\s+$/g; + +function spaced(s) { return (" " + s + " ").replace(rspace, " "); } +function trim(s) { return s.replace(rtrim, ""); } + +function hasClass(elem, value) { + var className = spaced(elem.className || ""); + return className.indexOf( " " + value + " " ) >= 0; +} + +function addClass(elem, value) { + var className = spaced(elem.className || ""); + if ( className.indexOf( " " + value + " " ) < 0 ) { + elem.className = trim(className + " " + value); + } +} + +function removeClass(elem, value) { + var className = spaced(elem.className || ""); + className = className.replace(" " + value + " ", " "); + elem.className = trim(className); +} + +function toggleClass(elem, valueOn, valueOff, bool) { + if (bool == null) { bool = ! hasClass(elem, valueOn); } + if (bool) { + removeClass(elem, valueOff); + addClass(elem, valueOn); + } + else { + removeClass(elem, valueOn); + addClass(elem, valueOff); + } + return bool; +} + + +function makeClassToggle(valueOn, valueOff) +{ + return function(elem, bool) { + return toggleClass(elem, valueOn, valueOff, bool); + } +} + +toggleShow = makeClassToggle("show", "hide"); +toggleCollapser = makeClassToggle("collapser", "expander"); + +function toggleSection(id) +{ + var b = toggleShow(document.getElementById("section." + id)); + toggleCollapser(document.getElementById("control." + id), b); + rememberCollapsed(id, b); + return b; +} + +var collapsed = {}; +function rememberCollapsed(id, b) +{ + if(b) + delete collapsed[id] + else + collapsed[id] = null; + + var sections = []; + for(var i in collapsed) + { + if(collapsed.hasOwnProperty(i)) + sections.push(i); + } + // cookie specific to this page; don't use setCookie which sets path=/ + document.cookie = "collapsed=" + escape(sections.join('+')); +} + +function restoreCollapsed() +{ + var cookie = getCookie("collapsed"); + if(!cookie) + return; + + var ids = cookie.split('+'); + for(var i in ids) + { + if(document.getElementById("section." + ids[i])) + toggleSection(ids[i]); + } +} + +function setCookie(name, value) { + document.cookie = name + "=" + escape(value) + ";path=/;"; +} + +function clearCookie(name) { + document.cookie = name + "=;path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT;"; +} + +function getCookie(name) { + var nameEQ = name + "="; + var ca = document.cookie.split(';'); + for(var i=0;i < ca.length;i++) { + var c = ca[i]; + while (c.charAt(0)==' ') c = c.substring(1,c.length); + if (c.indexOf(nameEQ) == 0) { + return unescape(c.substring(nameEQ.length,c.length)); + } + } + return null; +} + + + +var max_results = 75; // 50 is not enough to search for map in the base libraries +var shown_range = null; +var last_search = null; + +function quick_search() +{ + perform_search(false); +} + +function full_search() +{ + perform_search(true); +} + + +function perform_search(full) +{ + var text = document.getElementById("searchbox").value.toLowerCase(); + if (text == last_search && !full) return; + last_search = text; + + var table = document.getElementById("indexlist"); + var status = document.getElementById("searchmsg"); + var children = table.firstChild.childNodes; + + // first figure out the first node with the prefix + var first = bisect(-1); + var last = (first == -1 ? -1 : bisect(1)); + + if (first == -1) + { + table.className = ""; + status.innerHTML = "No results found, displaying all"; + } + else if (first == 0 && last == children.length - 1) + { + table.className = ""; + status.innerHTML = ""; + } + else if (last - first >= max_results && !full) + { + table.className = ""; + status.innerHTML = "More than " + max_results + ", press Search to display"; + } + else + { + // decide what you need to clear/show + if (shown_range) + setclass(shown_range[0], shown_range[1], "indexrow"); + setclass(first, last, "indexshow"); + shown_range = [first, last]; + table.className = "indexsearch"; + status.innerHTML = ""; + } + + + function setclass(first, last, status) + { + for (var i = first; i <= last; i++) + { + children[i].className = status; + } + } + + + // do a binary search, treating 0 as ... + // return either -1 (no 0's found) or location of most far match + function bisect(dir) + { + var first = 0, finish = children.length - 1; + var mid, success = false; + + while (finish - first > 3) + { + mid = Math.floor((finish + first) / 2); + + var i = checkitem(mid); + if (i == 0) i = dir; + if (i == -1) + finish = mid; + else + first = mid; + } + var a = (dir == 1 ? first : finish); + var b = (dir == 1 ? finish : first); + for (var i = b; i != a - dir; i -= dir) + { + if (checkitem(i) == 0) return i; + } + return -1; + } + + + // from an index, decide what the result is + // 0 = match, -1 is lower, 1 is higher + function checkitem(i) + { + var s = getitem(i).toLowerCase().substr(0, text.length); + if (s == text) return 0; + else return (s > text ? -1 : 1); + } + + + // from an index, get its string + // this abstracts over alternates + function getitem(i) + { + for ( ; i >= 0; i--) + { + var s = children[i].firstChild.firstChild.data; + if (s.indexOf(' ') == -1) + return s; + } + return ""; // should never be reached + } +} + +function setSynopsis(filename) { + if (parent.window.synopsis) { + if (parent.window.synopsis.location.replace) { + // In Firefox this avoids adding the change to the history. + parent.window.synopsis.location.replace(filename); + } else { + parent.window.synopsis.location = filename; + } + } +} + +function addMenuItem(html) { + var menu = document.getElementById("page-menu"); + if (menu) { + var btn = menu.firstChild.cloneNode(false); + btn.innerHTML = html; + menu.appendChild(btn); + } +} + +function adjustForFrames() { + var bodyCls; + + if (parent.location.href == window.location.href) { + // not in frames, so add Frames button + addMenuItem("Frames"); + bodyCls = "no-frame"; + } + else { + bodyCls = "in-frame"; + } + addClass(document.body, bodyCls); +} + +function reframe() { + setCookie("haddock-reframe", document.URL); + window.location = "frames.html"; +} + +function postReframe() { + var s = getCookie("haddock-reframe"); + if (s) { + parent.window.main.location = s; + clearCookie("haddock-reframe"); + } +} + +function styles() { + var i, a, es = document.getElementsByTagName("link"), rs = []; + for (i = 0; a = es[i]; i++) { + if(a.rel.indexOf("style") != -1 && a.title) { + rs.push(a); + } + } + return rs; +} + +function addStyleMenu() { + var as = styles(); + var i, a, btns = ""; + for(i=0; a = as[i]; i++) { + btns += "
  • " + + a.title + "
  • " + } + if (as.length > 1) { + var h = "
    " + + "Style ▾" + + "
      " + btns + "
    " + + "
    "; + addMenuItem(h); + } +} + +function setActiveStyleSheet(title) { + var as = styles(); + var i, a, found; + for(i=0; a = as[i]; i++) { + a.disabled = true; + // need to do this always, some browsers are edge triggered + if(a.title == title) { + found = a; + } + } + if (found) { + found.disabled = false; + setCookie("haddock-style", title); + } + else { + as[0].disabled = false; + clearCookie("haddock-style"); + } + styleMenu(false); +} + +function resetStyle() { + var s = getCookie("haddock-style"); + if (s) setActiveStyleSheet(s); +} + + +function styleMenu(show) { + var m = document.getElementById('style-menu'); + if (m) toggleShow(m, show); +} + + +function pageLoad() { + addStyleMenu(); + adjustForFrames(); + resetStyle(); + restoreCollapsed(); +} + diff --git a/haddock-api/resources/latex/haddock.sty b/haddock-api/resources/latex/haddock.sty new file mode 100644 index 00000000..6e031a98 --- /dev/null +++ b/haddock-api/resources/latex/haddock.sty @@ -0,0 +1,57 @@ +% Default Haddock style definitions. To use your own style, invoke +% Haddock with the option --latex-style=mystyle. + +\usepackage{tabulary} % see below + +% make hyperlinks in the PDF, and add an expandabale index +\usepackage[pdftex,bookmarks=true]{hyperref} + +\newenvironment{haddocktitle} + {\begin{center}\bgroup\large\bfseries} + {\egroup\end{center}} +\newenvironment{haddockprologue}{\vspace{1in}}{} + +\newcommand{\haddockmoduleheading}[1]{\chapter{\texttt{#1}}} + +\newcommand{\haddockbeginheader}{\hrulefill} +\newcommand{\haddockendheader}{\noindent\hrulefill} + +% a little gap before the ``Methods'' header +\newcommand{\haddockpremethods}{\vspace{2ex}} + +% inserted before \\begin{verbatim} +\newcommand{\haddockverb}{\small} + +% an identifier: add an index entry +\newcommand{\haddockid}[1]{\haddocktt{#1}\index{#1@\texttt{#1}}} + +% The tabulary environment lets us have a column that takes up ``the +% rest of the space''. Unfortunately it doesn't allow +% the \end{tabulary} to be in the expansion of a macro, it must appear +% literally in the document text, so Haddock inserts +% the \end{tabulary} itself. +\newcommand{\haddockbeginconstrs}{\begin{tabulary}{\linewidth}{@{}llJ@{}}} +\newcommand{\haddockbeginargs}{\begin{tabulary}{\linewidth}{@{}llJ@{}}} + +\newcommand{\haddocktt}[1]{{\small \texttt{#1}}} +\newcommand{\haddockdecltt}[1]{{\small\bfseries \texttt{#1}}} + +\makeatletter +\newenvironment{haddockdesc} + {\list{}{\labelwidth\z@ \itemindent-\leftmargin + \let\makelabel\haddocklabel}} + {\endlist} +\newcommand*\haddocklabel[1]{\hspace\labelsep\haddockdecltt{#1}} +\makeatother + +% after a declaration, start a new line for the documentation. +% Otherwise, the documentation starts right after the declaration, +% because we're using the list environment and the declaration is the +% ``label''. I tried making this newline part of the label, but +% couldn't get that to work reliably (the space seemed to stretch +% sometimes). +\newcommand{\haddockbegindoc}{\hfill\\[1ex]} + +% spacing between paragraphs and no \parindent looks better +\parskip=10pt plus2pt minus2pt +\setlength{\parindent}{0cm} diff --git a/haddock-api/src b/haddock-api/src new file mode 120000 index 00000000..e057607e --- /dev/null +++ b/haddock-api/src @@ -0,0 +1 @@ +../src/ \ No newline at end of file diff --git a/haddock.cabal b/haddock.cabal index 7e3fa0e2..57f6d15c 100644 --- a/haddock.cabal +++ b/haddock.cabal @@ -35,45 +35,21 @@ extra-source-files: latex-test/ref/Simple/*.tex latex-test/ref/Simple/*.sty -data-dir: resources -data-files: html/frames.html - html/haddock-util.js - html/Classic.theme/haskell_icon.gif - html/Classic.theme/minus.gif - html/Classic.theme/plus.gif - html/Classic.theme/xhaddock.css - html/Ocean.std-theme/hslogo-16.png - html/Ocean.std-theme/minus.gif - html/Ocean.std-theme/ocean.css - html/Ocean.std-theme/plus.gif - html/Ocean.std-theme/synopsis.png - latex/haddock.sty - flag in-ghc-tree description: Are we in a GHC tree? default: False manual: True --- Using this disables -O2, and hence allows to use --disable-optimization, --- which is about twice as fast. This should probably be the default, but we --- need some benchmarks first.. -flag dev - default: False - manual: True - executable haddock default-language: Haskell2010 main-is: Main.hs hs-source-dirs: driver - if flag(dev) - ghc-options: -funbox-strict-fields -Wall -fwarn-tabs - else - ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2 + ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2 build-depends: base >= 4.3 && < 4.8 if flag(in-ghc-tree) - hs-source-dirs: src, haddock-library/vendor/attoparsec-0.12.1.1, haddock-library/src + hs-source-dirs: haddock-api/src, haddock-library/vendor/attoparsec-0.12.1.1, haddock-library/src cpp-options: -DIN_GHC_TREE build-depends: filepath, @@ -134,93 +110,7 @@ executable haddock Haddock.GhcUtils Haddock.Convert else - build-depends: haddock, haddock-library - -library - default-language: Haskell2010 - - build-depends: - base >= 4.3 && < 4.8, - bytestring, - filepath, - directory, - containers, - deepseq, - array, - xhtml >= 3000.2 && < 3000.3, - Cabal >= 1.10, - ghc == 7.8.3 - - if flag(in-ghc-tree) - cpp-options: -DIN_GHC_TREE - hs-source-dirs: src, haddock-library/vendor/attoparsec-0.12.1.1, haddock-library/src - - exposed-modules: - Documentation.Haddock.Parser - Documentation.Haddock.Types - Documentation.Haddock.Doc - - other-modules: - Data.Attoparsec - Data.Attoparsec.ByteString - Data.Attoparsec.ByteString.Buffer - Data.Attoparsec.ByteString.Char8 - Data.Attoparsec.ByteString.FastSet - Data.Attoparsec.ByteString.Internal - Data.Attoparsec.Combinator - Data.Attoparsec.Internal - Data.Attoparsec.Internal.Fhthagn - Data.Attoparsec.Internal.Types - Data.Attoparsec.Number - Documentation.Haddock.Utf8 - Documentation.Haddock.Parser.Util - - else - build-depends: ghc-paths, haddock-library - hs-source-dirs: src - - - if flag(dev) - ghc-options: -funbox-strict-fields -Wall -fwarn-tabs - else - ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2 - - exposed-modules: - Documentation.Haddock - - other-modules: - Haddock - Haddock.Interface - Haddock.Interface.Rename - Haddock.Interface.Create - Haddock.Interface.AttachInstances - Haddock.Interface.LexParseRn - Haddock.Interface.ParseModuleHeader - Haddock.Parser - Haddock.Utils - Haddock.Backends.Xhtml - Haddock.Backends.Xhtml.Decl - Haddock.Backends.Xhtml.DocMarkup - Haddock.Backends.Xhtml.Layout - Haddock.Backends.Xhtml.Names - Haddock.Backends.Xhtml.Themes - Haddock.Backends.Xhtml.Types - Haddock.Backends.Xhtml.Utils - Haddock.Backends.LaTeX - Haddock.Backends.HaddockDB - Haddock.Backends.Hoogle - Haddock.ModuleTree - Haddock.Types - Haddock.Doc - Haddock.Version - Haddock.InterfaceFile - Haddock.Options - Haddock.GhcUtils - Haddock.Convert - Paths_haddock - - if flag(in-ghc-tree) - buildable: False + build-depends: haddock-api, haddock-library test-suite html-test type: exitcode-stdio-1.0 diff --git a/resources/html/Classic.theme/haskell_icon.gif b/resources/html/Classic.theme/haskell_icon.gif deleted file mode 100644 index 10589f91..00000000 Binary files a/resources/html/Classic.theme/haskell_icon.gif and /dev/null differ diff --git a/resources/html/Classic.theme/minus.gif b/resources/html/Classic.theme/minus.gif deleted file mode 100644 index 1deac2fe..00000000 Binary files a/resources/html/Classic.theme/minus.gif and /dev/null differ diff --git a/resources/html/Classic.theme/plus.gif b/resources/html/Classic.theme/plus.gif deleted file mode 100644 index 2d15c141..00000000 Binary files a/resources/html/Classic.theme/plus.gif and /dev/null differ diff --git a/resources/html/Classic.theme/xhaddock.css b/resources/html/Classic.theme/xhaddock.css deleted file mode 100644 index ed231b5a..00000000 --- a/resources/html/Classic.theme/xhaddock.css +++ /dev/null @@ -1,499 +0,0 @@ -* { - margin: 0; - padding: 0; -} - -.extension-list { - list-style-type: none; - margin-left: 0; - padding-left: 0; -} - -body { - background-color: #ffffff; - color: #000000; - font-size: 100%; - font-family: sans-serif; - padding: 8px; -} - -a:link { color: #0000e0; text-decoration: none } -a:visited { color: #0000a0; text-decoration: none } -a:hover { background-color: #e0e0ff; text-decoration: none } - -/* font is a little too small in MSIE */ -tt { font-size: 100%; } -pre { font-size: 100%; } -.keyword { text-decoration: underline; } -.caption { - font-weight: bold; - margin: 0; - padding: 0; -} - -h1 { - padding-top: 15px; - font-weight: bold; - font-size: 150%; -} - -h2 { - padding-top: 10px; - font-weight: bold; - font-size: 130% - } - -h3 { - padding-top: 5px; - font-weight: bold; - font-size: 110% - } - -h4, h5 { - font-weight: bold; - font-size: 100% - } - -h1, h2, h3, h4, h5 { - margin-top: 0.5em; - margin-bottom: 0.5em; -} - -p { - padding-top: 2px; - padding-left: 10px; -} - -ul, ol, dl { - padding-top: 2px; - padding-left: 10px; - margin-left: 2.5em; -} - -pre { - padding-top: 2px; - padding-left: 20px; -} - -* + p, * + pre { - margin-top: 1em; -} -.caption + p, .src + p { - margin-top: 0; -} - -.def { - font-weight: bold; -} - -ul.links { - list-style: none; - text-align: left; - float: right; - display: inline-table; - padding: 0; -} - -ul.links li { - display: inline; - border-left-width: 1px; - border-left-color: #ffffff; - border-left-style: solid; - white-space: nowrap; - padding: 1px 5px; -} - -.hide { display: none; } -.show { } -.collapser { - background: url(minus.gif) no-repeat 0 0.3em; -} -.expander { - background: url(plus.gif) no-repeat 0 0.3em; -} -.collapser, .expander { - padding-left: 14px; - cursor: pointer; -} - -#package-header { - color: #ffffff; - padding: 5px 5px 5px 31px; - margin: 0 0 1px; - background: #000099 url(haskell_icon.gif) no-repeat 5px 6px; - position: relative; -} - -#package-header .caption { - font-weight: normal; - font-style: normal; -} -#package-header a:link { color: #ffffff } -#package-header a:visited { color: #ffff00 } -#package-header a:hover { background-color: #6060ff; } -#package-header ul.links li:hover { background-color: #6060ff; } - -div#style-menu-holder { - position: relative; - z-index: 2; - display: inline; -} - -#style-menu { - position: absolute; - z-index: 1; - overflow: visible; - background-color: #000099; - margin: 0; - width: 6em; - text-align: center; - right: 0; - padding: 2px 2px 1px; -} - -#style-menu li { - display: list-item; - border-style: none; - margin: 0; - padding: 3px; - color: #000; - list-style-type: none; - border-top: 1px solid #ffffff; -} - -#module-header { - overflow: hidden; /* makes sure info float is properly contained */ - display: inline-block; /* triggers hasLayout in IE*/ -} - -#module-header { - display: block; /* back to block */ - background-color: #0077dd; - padding: 5px; -} - -#module-header .caption { - font-size: 200%; - padding: .35em 0; - font-weight: normal; - font-style: normal; -} - -table.info { - color: #ffffff; - display: block; - float: right; - max-width: 50%; -} - -.info th, .info td { - text-align: left; - padding: 0 10px 0 0; -} - - -#table-of-contents { - margin-top: 1em; - margin-bottom: 2em; -} - -#table-of-contents ul { - margin-top: 1em; - margin-bottom: 1em; - margin-left: 0; - list-style-type: none; - padding: 0; -} - -#table-of-contents ul ul { - margin-left: 2.5em; -} - -#description .caption, -#synopsis .caption, -#module-list .caption, -#index .caption { - padding-top: 15px; - font-weight: bold; - font-size: 150% -} - -#synopsis { - margin-bottom: 2em; -} - -#synopsis .expander, -#synopsis .collapser { - background: none; - padding-left: inherit; -} - -#synopsis .hide { - display: inherit; -} - -#synopsis ul { - margin: 0; - padding-top: 0; - padding-left: 20px; - list-style-type: none; -} - -#synopsis li { - margin-top: 8px; - margin-bottom: 8px; - padding: 3px; -} - -#synopsis li li { - padding: 0; - margin-top: 0; - margin-bottom: 0; -} - - -div.top { - margin-top: 1em; - clear: left; - margin-bottom: 1em; -} - -div.top h5 { - margin-left: 10px; -} - - -.src { - padding: 3px; - background-color: #f0f0f0; - font-family: monospace; - margin-bottom: 0; -} - - -.src a.link { - float: right; - border-left-width: 1px; - border-left-color: #000099; - border-left-style: solid; - white-space: nowrap; - font-size: small; - padding: 0 8px 2px 5px; - margin-right: -3px; - background-color: #f0f0f0; -} - -div.subs { - margin-left: 10px; - clear: both; - margin-top: 2px; -} - -.subs dl { - margin-left: 0; -} - -.subs dl dl { - padding-left: 0; - padding-top: 4px; -} - -.subs dd -{ - margin: 2px 0 9px 2em; -} - -.subs dd.empty { - display: none; -} - -.subs table { - margin-left: 10px; - border-spacing: 1px 1px; - margin-top: 4px; - margin-bottom: 4px; -} - -.subs table table { - margin-left: 0; -} - -.arguments .caption, -.fields .caption { - display: none; -} - -/* need extra .subs in the selector to make it override the rules for .subs and .subs table */ - -.subs.arguments { - margin: 0; -} - -.subs.arguments table { - border-spacing: 0; - margin-top: 0; - margin-bottom: 0; -} - -.subs.arguments td.src { - white-space: nowrap; -} - -.subs.arguments + p { - margin-top: 0; -} - -.subs.associated-types, -.subs.methods { - margin-left: 20px; -} - -.subs.associated-types .caption, -.subs.methods .caption { - margin-top: 0.5em; - margin-left: -10px; -} - -.subs.associated-types .src + .src, -.subs.methods .src + .src { - margin-top: 8px; -} - -p.arg { - margin-bottom: 0; -} -p.arg span { - background-color: #f0f0f0; - font-family: monospace; - white-space: nowrap; - float: none; -} - - -img.coll { - width : 0.75em; height: 0.75em; margin-bottom: 0; margin-right: 0.5em -} - - -td.arg { - padding: 3px; - background-color: #f0f0f0; - font-family: monospace; - margin-bottom: 0; -} - -td.rdoc p { - margin-bottom: 0; -} - - - -#footer { - background-color: #000099; - color: #ffffff; - padding: 4px - } - -#footer p { - padding: 1px; - margin: 0; -} - -#footer a:link { - color: #ffffff; - text-decoration: underline - } -#footer a:visited { - color: #ffff00 - } -#footer a:hover { - background-color: #6060ff - } - - -#module-list ul { - list-style: none; - padding-bottom: 15px; - padding-left: 2px; - margin: 0; -} - -#module-list ul ul { - padding-bottom: 0; - padding-left: 20px; -} - -#module-list li .package { - float: right; -} -#mini #module-list .caption { - display: none; -} - -#index .caption { -} - -#alphabet ul { - list-style: none; - padding: 0; - margin: 0.5em 0 0; -} - -#alphabet li { - display: inline; - margin: 0 0.2em; -} - -#index .src { - background: none; - font-family: inherit; -} - -#index td.alt { - padding-left: 2em; -} - -#index td { - padding-top: 2px; - padding-bottom: 1px; - padding-right: 1em; -} - - -#mini h1 { font-size: 130%; } -#mini h2 { font-size: 110%; } -#mini h3 { font-size: 100%; } -#mini h1, #mini h2, #mini h3 { - margin-top: 0.5em; - margin-bottom: 0.25em; - padding: 0 0; -} - -#mini h1 { border-bottom: 1px solid #ccc; } - -#mini #module-header { - margin: 0; - padding: 0; -} -#mini #module-header .caption { - font-size: 130%; - background: #0077dd; - padding: 0.25em; - height: inherit; - margin: 0; -} - -#mini #interface .top { - margin: 0; - padding: 0; -} -#mini #interface .src { - margin: 0; - padding: 0; - font-family: inherit; - background: inherit; -} - -.warning { - color: red; -} diff --git a/resources/html/Ocean.std-theme/hslogo-16.png b/resources/html/Ocean.std-theme/hslogo-16.png deleted file mode 100644 index 0ff8579f..00000000 Binary files a/resources/html/Ocean.std-theme/hslogo-16.png and /dev/null differ diff --git a/resources/html/Ocean.std-theme/minus.gif b/resources/html/Ocean.std-theme/minus.gif deleted file mode 100644 index 1deac2fe..00000000 Binary files a/resources/html/Ocean.std-theme/minus.gif and /dev/null differ diff --git a/resources/html/Ocean.std-theme/ocean.css b/resources/html/Ocean.std-theme/ocean.css deleted file mode 100644 index de436324..00000000 --- a/resources/html/Ocean.std-theme/ocean.css +++ /dev/null @@ -1,577 +0,0 @@ -/* @group Fundamentals */ - -* { margin: 0; padding: 0 } - -/* Is this portable? */ -html { - background-color: white; - width: 100%; - height: 100%; -} - -body { - background: white; - color: black; - text-align: left; - min-height: 100%; - position: relative; -} - -p { - margin: 0.8em 0; -} - -ul, ol { - margin: 0.8em 0 0.8em 2em; -} - -dl { - margin: 0.8em 0; -} - -dt { - font-weight: bold; -} -dd { - margin-left: 2em; -} - -a { text-decoration: none; } -a[href]:link { color: rgb(196,69,29); } -a[href]:visited { color: rgb(171,105,84); } -a[href]:hover { text-decoration:underline; } - -/* @end */ - -/* @group Fonts & Sizes */ - -/* Basic technique & IE workarounds from YUI 3 - For reasons, see: - http://yui.yahooapis.com/3.1.1/build/cssfonts/fonts.css - */ - -body { - font:13px/1.4 sans-serif; - *font-size:small; /* for IE */ - *font:x-small; /* for IE in quirks mode */ -} - -h1 { font-size: 146.5%; /* 19pt */ } -h2 { font-size: 131%; /* 17pt */ } -h3 { font-size: 116%; /* 15pt */ } -h4 { font-size: 100%; /* 13pt */ } -h5 { font-size: 100%; /* 13pt */ } - -select, input, button, textarea { - font:99% sans-serif; -} - -table { - font-size:inherit; - font:100%; -} - -pre, code, kbd, samp, tt, .src { - font-family:monospace; - *font-size:108%; - line-height: 124%; -} - -.links, .link { - font-size: 85%; /* 11pt */ -} - -#module-header .caption { - font-size: 182%; /* 24pt */ -} - -.info { - font-size: 85%; /* 11pt */ -} - -#table-of-contents, #synopsis { - /* font-size: 85%; /* 11pt */ -} - - -/* @end */ - -/* @group Common */ - -.caption, h1, h2, h3, h4, h5, h6 { - font-weight: bold; - color: rgb(78,98,114); - margin: 0.8em 0 0.4em; -} - -* + h1, * + h2, * + h3, * + h4, * + h5, * + h6 { - margin-top: 2em; -} - -h1 + h2, h2 + h3, h3 + h4, h4 + h5, h5 + h6 { - margin-top: inherit; -} - -ul.links { - list-style: none; - text-align: left; - float: right; - display: inline-table; - margin: 0 0 0 1em; -} - -ul.links li { - display: inline; - border-left: 1px solid #d5d5d5; - white-space: nowrap; - padding: 0; -} - -ul.links li a { - padding: 0.2em 0.5em; -} - -.hide { display: none; } -.show { display: inherit; } -.clear { clear: both; } - -.collapser { - background-image: url(minus.gif); - background-repeat: no-repeat; -} -.expander { - background-image: url(plus.gif); - background-repeat: no-repeat; -} -p.caption.collapser, -p.caption.expander { - background-position: 0 0.4em; -} -.collapser, .expander { - padding-left: 14px; - margin-left: -14px; - cursor: pointer; -} - -pre { - padding: 0.25em; - margin: 0.8em 0; - background: rgb(229,237,244); - overflow: auto; - border-bottom: 0.25em solid white; - /* white border adds some space below the box to compensate - for visual extra space that paragraphs have between baseline - and the bounding box */ -} - -.src { - background: #f0f0f0; - padding: 0.2em 0.5em; -} - -.keyword { font-weight: normal; } -.def { font-weight: bold; } - - -/* @end */ - -/* @group Page Structure */ - -#content { - margin: 0 auto; - padding: 0 2em 6em; -} - -#package-header { - background: rgb(41,56,69); - border-top: 5px solid rgb(78,98,114); - color: #ddd; - padding: 0.2em; - position: relative; - text-align: left; -} - -#package-header .caption { - background: url(hslogo-16.png) no-repeat 0em; - color: white; - margin: 0 2em; - font-weight: normal; - font-style: normal; - padding-left: 2em; -} - -#package-header a:link, #package-header a:visited { color: white; } -#package-header a:hover { background: rgb(78,98,114); } - -#module-header .caption { - color: rgb(78,98,114); - font-weight: bold; - border-bottom: 1px solid #ddd; -} - -table.info { - float: right; - padding: 0.5em 1em; - border: 1px solid #ddd; - color: rgb(78,98,114); - background-color: #fff; - max-width: 40%; - border-spacing: 0; - position: relative; - top: -0.5em; - margin: 0 0 0 2em; -} - -.info th { - padding: 0 1em 0 0; -} - -div#style-menu-holder { - position: relative; - z-index: 2; - display: inline; -} - -#style-menu { - position: absolute; - z-index: 1; - overflow: visible; - background: #374c5e; - margin: 0; - text-align: center; - right: 0; - padding: 0; - top: 1.25em; -} - -#style-menu li { - display: list-item; - border-style: none; - margin: 0; - padding: 0; - color: #000; - list-style-type: none; -} - -#style-menu li + li { - border-top: 1px solid #919191; -} - -#style-menu a { - width: 6em; - padding: 3px; - display: block; -} - -#footer { - background: #ddd; - border-top: 1px solid #aaa; - padding: 0.5em 0; - color: #666; - text-align: center; - position: absolute; - bottom: 0; - width: 100%; - height: 3em; -} - -/* @end */ - -/* @group Front Matter */ - -#table-of-contents { - float: right; - clear: right; - background: #faf9dc; - border: 1px solid #d8d7ad; - padding: 0.5em 1em; - max-width: 20em; - margin: 0.5em 0 1em 1em; -} - -#table-of-contents .caption { - text-align: center; - margin: 0; -} - -#table-of-contents ul { - list-style: none; - margin: 0; -} - -#table-of-contents ul ul { - margin-left: 2em; -} - -#description .caption { - display: none; -} - -#synopsis { - display: none; -} - -.no-frame #synopsis { - display: block; - position: fixed; - right: 0; - height: 80%; - top: 10%; - padding: 0; -} - -#synopsis .caption { - float: left; - width: 29px; - color: rgba(255,255,255,0); - height: 110px; - margin: 0; - font-size: 1px; - padding: 0; -} - -#synopsis p.caption.collapser { - background: url(synopsis.png) no-repeat -64px -8px; -} - -#synopsis p.caption.expander { - background: url(synopsis.png) no-repeat 0px -8px; -} - -#synopsis ul { - height: 100%; - overflow: auto; - padding: 0.5em; - margin: 0; -} - -#synopsis ul ul { - overflow: hidden; -} - -#synopsis ul, -#synopsis ul li.src { - background-color: #faf9dc; - white-space: nowrap; - list-style: none; - margin-left: 0; -} - -/* @end */ - -/* @group Main Content */ - -#interface div.top { margin: 2em 0; } -#interface h1 + div.top, -#interface h2 + div.top, -#interface h3 + div.top, -#interface h4 + div.top, -#interface h5 + div.top { - margin-top: 1em; -} -#interface p.src .link { - float: right; - color: #919191; - border-left: 1px solid #919191; - background: #f0f0f0; - padding: 0 0.5em 0.2em; - margin: 0 -0.5em 0 0.5em; -} - -#interface span.fixity { - color: #919191; - border-left: 1px solid #919191; - padding: 0.2em 0.5em 0.2em 0.5em; - margin: 0 -1em 0 1em; -} - -#interface span.rightedge { - border-left: 1px solid #919191; - padding: 0.2em 0 0.2em 0; - margin: 0 0 0 1em; -} - -#interface table { border-spacing: 2px; } -#interface td { - vertical-align: top; - padding-left: 0.5em; -} -#interface td.src { - white-space: nowrap; -} -#interface td.doc p { - margin: 0; -} -#interface td.doc p + p { - margin-top: 0.8em; -} - -.subs dl { - margin: 0; -} - -.subs dt { - float: left; - clear: left; - display: block; - margin: 1px 0; -} - -.subs dd { - float: right; - width: 90%; - display: block; - padding-left: 0.5em; - margin-bottom: 0.5em; -} - -.subs dd.empty { - display: none; -} - -.subs dd p { - margin: 0; -} - -/* Render short-style data instances */ -.inst ul { - height: 100%; - padding: 0.5em; - margin: 0; -} - -.inst, .inst li { - list-style: none; - margin-left: 1em; -} - -.top p.src { - border-top: 1px solid #ccc; -} - -.subs, .doc { - /* use this selector for one level of indent */ - padding-left: 2em; -} - -.warning { - color: red; -} - -.arguments { - margin-top: -0.4em; -} -.arguments .caption { - display: none; -} - -.fields { padding-left: 1em; } - -.fields .caption { display: none; } - -.fields p { margin: 0 0; } - -/* this seems bulky to me -.methods, .constructors { - background: #f8f8f8; - border: 1px solid #eee; -} -*/ - -/* @end */ - -/* @group Auxillary Pages */ - - -.extension-list { - list-style-type: none; - margin-left: 0; -} - -#mini { - margin: 0 auto; - padding: 0 1em 1em; -} - -#mini > * { - font-size: 93%; /* 12pt */ -} - -#mini #module-list .caption, -#mini #module-header .caption { - font-size: 125%; /* 15pt */ -} - -#mini #interface h1, -#mini #interface h2, -#mini #interface h3, -#mini #interface h4 { - font-size: 109%; /* 13pt */ - margin: 1em 0 0; -} - -#mini #interface .top, -#mini #interface .src { - margin: 0; -} - -#mini #module-list ul { - list-style: none; - margin: 0; -} - -#alphabet ul { - list-style: none; - padding: 0; - margin: 0.5em 0 0; - text-align: center; -} - -#alphabet li { - display: inline; - margin: 0 0.25em; -} - -#alphabet a { - font-weight: bold; -} - -#index .caption, -#module-list .caption { font-size: 131%; /* 17pt */ } - -#index table { - margin-left: 2em; -} - -#index .src { - font-weight: bold; -} -#index .alt { - font-size: 77%; /* 10pt */ - font-style: italic; - padding-left: 2em; -} - -#index td + td { - padding-left: 1em; -} - -#module-list ul { - list-style: none; - margin: 0 0 0 2em; -} - -#module-list li { - clear: right; -} - -#module-list span.collapser, -#module-list span.expander { - background-position: 0 0.3em; -} - -#module-list .package { - float: right; -} - -/* @end */ diff --git a/resources/html/Ocean.std-theme/plus.gif b/resources/html/Ocean.std-theme/plus.gif deleted file mode 100644 index 2d15c141..00000000 Binary files a/resources/html/Ocean.std-theme/plus.gif and /dev/null differ diff --git a/resources/html/Ocean.std-theme/synopsis.png b/resources/html/Ocean.std-theme/synopsis.png deleted file mode 100644 index 85fb86ec..00000000 Binary files a/resources/html/Ocean.std-theme/synopsis.png and /dev/null differ diff --git a/resources/html/frames.html b/resources/html/frames.html deleted file mode 100644 index 1b4e38d4..00000000 --- a/resources/html/frames.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/resources/html/haddock-util.js b/resources/html/haddock-util.js deleted file mode 100644 index 9a6fccf7..00000000 --- a/resources/html/haddock-util.js +++ /dev/null @@ -1,344 +0,0 @@ -// Haddock JavaScript utilities - -var rspace = /\s\s+/g, - rtrim = /^\s+|\s+$/g; - -function spaced(s) { return (" " + s + " ").replace(rspace, " "); } -function trim(s) { return s.replace(rtrim, ""); } - -function hasClass(elem, value) { - var className = spaced(elem.className || ""); - return className.indexOf( " " + value + " " ) >= 0; -} - -function addClass(elem, value) { - var className = spaced(elem.className || ""); - if ( className.indexOf( " " + value + " " ) < 0 ) { - elem.className = trim(className + " " + value); - } -} - -function removeClass(elem, value) { - var className = spaced(elem.className || ""); - className = className.replace(" " + value + " ", " "); - elem.className = trim(className); -} - -function toggleClass(elem, valueOn, valueOff, bool) { - if (bool == null) { bool = ! hasClass(elem, valueOn); } - if (bool) { - removeClass(elem, valueOff); - addClass(elem, valueOn); - } - else { - removeClass(elem, valueOn); - addClass(elem, valueOff); - } - return bool; -} - - -function makeClassToggle(valueOn, valueOff) -{ - return function(elem, bool) { - return toggleClass(elem, valueOn, valueOff, bool); - } -} - -toggleShow = makeClassToggle("show", "hide"); -toggleCollapser = makeClassToggle("collapser", "expander"); - -function toggleSection(id) -{ - var b = toggleShow(document.getElementById("section." + id)); - toggleCollapser(document.getElementById("control." + id), b); - rememberCollapsed(id, b); - return b; -} - -var collapsed = {}; -function rememberCollapsed(id, b) -{ - if(b) - delete collapsed[id] - else - collapsed[id] = null; - - var sections = []; - for(var i in collapsed) - { - if(collapsed.hasOwnProperty(i)) - sections.push(i); - } - // cookie specific to this page; don't use setCookie which sets path=/ - document.cookie = "collapsed=" + escape(sections.join('+')); -} - -function restoreCollapsed() -{ - var cookie = getCookie("collapsed"); - if(!cookie) - return; - - var ids = cookie.split('+'); - for(var i in ids) - { - if(document.getElementById("section." + ids[i])) - toggleSection(ids[i]); - } -} - -function setCookie(name, value) { - document.cookie = name + "=" + escape(value) + ";path=/;"; -} - -function clearCookie(name) { - document.cookie = name + "=;path=/;expires=Thu, 01-Jan-1970 00:00:01 GMT;"; -} - -function getCookie(name) { - var nameEQ = name + "="; - var ca = document.cookie.split(';'); - for(var i=0;i < ca.length;i++) { - var c = ca[i]; - while (c.charAt(0)==' ') c = c.substring(1,c.length); - if (c.indexOf(nameEQ) == 0) { - return unescape(c.substring(nameEQ.length,c.length)); - } - } - return null; -} - - - -var max_results = 75; // 50 is not enough to search for map in the base libraries -var shown_range = null; -var last_search = null; - -function quick_search() -{ - perform_search(false); -} - -function full_search() -{ - perform_search(true); -} - - -function perform_search(full) -{ - var text = document.getElementById("searchbox").value.toLowerCase(); - if (text == last_search && !full) return; - last_search = text; - - var table = document.getElementById("indexlist"); - var status = document.getElementById("searchmsg"); - var children = table.firstChild.childNodes; - - // first figure out the first node with the prefix - var first = bisect(-1); - var last = (first == -1 ? -1 : bisect(1)); - - if (first == -1) - { - table.className = ""; - status.innerHTML = "No results found, displaying all"; - } - else if (first == 0 && last == children.length - 1) - { - table.className = ""; - status.innerHTML = ""; - } - else if (last - first >= max_results && !full) - { - table.className = ""; - status.innerHTML = "More than " + max_results + ", press Search to display"; - } - else - { - // decide what you need to clear/show - if (shown_range) - setclass(shown_range[0], shown_range[1], "indexrow"); - setclass(first, last, "indexshow"); - shown_range = [first, last]; - table.className = "indexsearch"; - status.innerHTML = ""; - } - - - function setclass(first, last, status) - { - for (var i = first; i <= last; i++) - { - children[i].className = status; - } - } - - - // do a binary search, treating 0 as ... - // return either -1 (no 0's found) or location of most far match - function bisect(dir) - { - var first = 0, finish = children.length - 1; - var mid, success = false; - - while (finish - first > 3) - { - mid = Math.floor((finish + first) / 2); - - var i = checkitem(mid); - if (i == 0) i = dir; - if (i == -1) - finish = mid; - else - first = mid; - } - var a = (dir == 1 ? first : finish); - var b = (dir == 1 ? finish : first); - for (var i = b; i != a - dir; i -= dir) - { - if (checkitem(i) == 0) return i; - } - return -1; - } - - - // from an index, decide what the result is - // 0 = match, -1 is lower, 1 is higher - function checkitem(i) - { - var s = getitem(i).toLowerCase().substr(0, text.length); - if (s == text) return 0; - else return (s > text ? -1 : 1); - } - - - // from an index, get its string - // this abstracts over alternates - function getitem(i) - { - for ( ; i >= 0; i--) - { - var s = children[i].firstChild.firstChild.data; - if (s.indexOf(' ') == -1) - return s; - } - return ""; // should never be reached - } -} - -function setSynopsis(filename) { - if (parent.window.synopsis) { - if (parent.window.synopsis.location.replace) { - // In Firefox this avoids adding the change to the history. - parent.window.synopsis.location.replace(filename); - } else { - parent.window.synopsis.location = filename; - } - } -} - -function addMenuItem(html) { - var menu = document.getElementById("page-menu"); - if (menu) { - var btn = menu.firstChild.cloneNode(false); - btn.innerHTML = html; - menu.appendChild(btn); - } -} - -function adjustForFrames() { - var bodyCls; - - if (parent.location.href == window.location.href) { - // not in frames, so add Frames button - addMenuItem("Frames"); - bodyCls = "no-frame"; - } - else { - bodyCls = "in-frame"; - } - addClass(document.body, bodyCls); -} - -function reframe() { - setCookie("haddock-reframe", document.URL); - window.location = "frames.html"; -} - -function postReframe() { - var s = getCookie("haddock-reframe"); - if (s) { - parent.window.main.location = s; - clearCookie("haddock-reframe"); - } -} - -function styles() { - var i, a, es = document.getElementsByTagName("link"), rs = []; - for (i = 0; a = es[i]; i++) { - if(a.rel.indexOf("style") != -1 && a.title) { - rs.push(a); - } - } - return rs; -} - -function addStyleMenu() { - var as = styles(); - var i, a, btns = ""; - for(i=0; a = as[i]; i++) { - btns += "
  • " - + a.title + "
  • " - } - if (as.length > 1) { - var h = "
    " - + "Style ▾" - + "
      " + btns + "
    " - + "
    "; - addMenuItem(h); - } -} - -function setActiveStyleSheet(title) { - var as = styles(); - var i, a, found; - for(i=0; a = as[i]; i++) { - a.disabled = true; - // need to do this always, some browsers are edge triggered - if(a.title == title) { - found = a; - } - } - if (found) { - found.disabled = false; - setCookie("haddock-style", title); - } - else { - as[0].disabled = false; - clearCookie("haddock-style"); - } - styleMenu(false); -} - -function resetStyle() { - var s = getCookie("haddock-style"); - if (s) setActiveStyleSheet(s); -} - - -function styleMenu(show) { - var m = document.getElementById('style-menu'); - if (m) toggleShow(m, show); -} - - -function pageLoad() { - addStyleMenu(); - adjustForFrames(); - resetStyle(); - restoreCollapsed(); -} - diff --git a/resources/latex/haddock.sty b/resources/latex/haddock.sty deleted file mode 100644 index 6e031a98..00000000 --- a/resources/latex/haddock.sty +++ /dev/null @@ -1,57 +0,0 @@ -% Default Haddock style definitions. To use your own style, invoke -% Haddock with the option --latex-style=mystyle. - -\usepackage{tabulary} % see below - -% make hyperlinks in the PDF, and add an expandabale index -\usepackage[pdftex,bookmarks=true]{hyperref} - -\newenvironment{haddocktitle} - {\begin{center}\bgroup\large\bfseries} - {\egroup\end{center}} -\newenvironment{haddockprologue}{\vspace{1in}}{} - -\newcommand{\haddockmoduleheading}[1]{\chapter{\texttt{#1}}} - -\newcommand{\haddockbeginheader}{\hrulefill} -\newcommand{\haddockendheader}{\noindent\hrulefill} - -% a little gap before the ``Methods'' header -\newcommand{\haddockpremethods}{\vspace{2ex}} - -% inserted before \\begin{verbatim} -\newcommand{\haddockverb}{\small} - -% an identifier: add an index entry -\newcommand{\haddockid}[1]{\haddocktt{#1}\index{#1@\texttt{#1}}} - -% The tabulary environment lets us have a column that takes up ``the -% rest of the space''. Unfortunately it doesn't allow -% the \end{tabulary} to be in the expansion of a macro, it must appear -% literally in the document text, so Haddock inserts -% the \end{tabulary} itself. -\newcommand{\haddockbeginconstrs}{\begin{tabulary}{\linewidth}{@{}llJ@{}}} -\newcommand{\haddockbeginargs}{\begin{tabulary}{\linewidth}{@{}llJ@{}}} - -\newcommand{\haddocktt}[1]{{\small \texttt{#1}}} -\newcommand{\haddockdecltt}[1]{{\small\bfseries \texttt{#1}}} - -\makeatletter -\newenvironment{haddockdesc} - {\list{}{\labelwidth\z@ \itemindent-\leftmargin - \let\makelabel\haddocklabel}} - {\endlist} -\newcommand*\haddocklabel[1]{\hspace\labelsep\haddockdecltt{#1}} -\makeatother - -% after a declaration, start a new line for the documentation. -% Otherwise, the documentation starts right after the declaration, -% because we're using the list environment and the declaration is the -% ``label''. I tried making this newline part of the label, but -% couldn't get that to work reliably (the space seemed to stretch -% sometimes). -\newcommand{\haddockbegindoc}{\hfill\\[1ex]} - -% spacing between paragraphs and no \parindent looks better -\parskip=10pt plus2pt minus2pt -\setlength{\parindent}{0cm} diff --git a/src/Haddock.hs b/src/Haddock.hs index 3d049b18..ad78c50d 100644 --- a/src/Haddock.hs +++ b/src/Haddock.hs @@ -19,7 +19,6 @@ ----------------------------------------------------------------------------- module Haddock (haddock, readPackagesAndProcessModules, withGhc') where - import Haddock.Backends.Xhtml import Haddock.Backends.Xhtml.Themes (getThemes) import Haddock.Backends.LaTeX @@ -54,7 +53,7 @@ import Data.Int import System.FilePath #else import qualified GHC.Paths as GhcPaths -import Paths_haddock +import Paths_haddock_api (getDataDir) #endif import GHC hiding (verbosity) diff --git a/src/Haddock/Version.hs b/src/Haddock/Version.hs index f4729c7d..2ef3a257 100644 --- a/src/Haddock/Version.hs +++ b/src/Haddock/Version.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Haddock.Version @@ -12,11 +13,17 @@ module Haddock.Version ( projectName, projectVersion, projectUrl ) where +#ifdef IN_GHC_TREE import Paths_haddock ( version ) +#else +import Paths_haddock_api ( version ) +#endif import Data.Version ( showVersion ) -projectName, projectUrl :: String +projectName :: String projectName = "Haddock" + +projectUrl :: String projectUrl = "http://www.haskell.org/haddock/" projectVersion :: String -- cgit v1.2.3