Skip to content

Commit 4cf4356

Browse files
Vendor documentation styles and harden type precedence
Bundle the existing Pursuit styles with rendered documentation while letting consumers choose their asset URLs. Make converted type precedence exhaustive and cover function and kind arguments.
1 parent 49086c3 commit 4cf4356

10 files changed

Lines changed: 1571 additions & 26 deletions

File tree

‎docgen/README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ The main modules are:
5454
source headers.
5555
- `Registry.Docgen.Package.Render`: package and module HTML rendering.
5656

57+
The Pursuit stylesheets used by the renderer are preserved in `assets/css`.
58+
Rendered documents receive their asset URLs explicitly, so a Pursuit server or
59+
another consumer can serve the vendored files from its own static asset path.
60+
The `render-docs` script copies them to `/static/css` in its output directory.
61+
5762
Filesystem access, compiler invocation, source archive handling, README
5863
acquisition, object storage, and executable migration tools belong in `app` or
5964
`scripts`. The `docgen` package should remain deterministic for the same
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Third-party licenses
2+
3+
The files in `css/` are preserved from the existing Pursuit deployment so
4+
generated documentation does not depend on that deployment remaining online.
5+
6+
## `css/normalize.css`
7+
8+
Source: [normalize.css 3.0.2](https://github.com/necolas/normalize.css/tree/3.0.2)
9+
10+
Copyright (c) Nicolas Gallagher and Jonathan Neal
11+
12+
Permission is hereby granted, free of charge, to any person obtaining a copy of
13+
this software and associated documentation files (the "Software"), to deal in
14+
the Software without restriction, including without limitation the rights to
15+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
16+
of the Software, and to permit persons to whom the Software is furnished to do
17+
so, subject to the following conditions:
18+
19+
The above copyright notice and this permission notice shall be included in all
20+
copies or substantial portions of the Software.
21+
22+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28+
SOFTWARE.
29+
30+
## `css/pursuit.css`
31+
32+
Source: [`purescript/purescript/app/static/pursuit.css`](https://github.com/purescript/purescript/blob/cb3c4965c8468d26c9b14cf0319db6dbd06ee4ff/app/static/pursuit.css)
33+
34+
Except for the `.decl__role_hover` rule noted below, this file is distributed
35+
under the following license:
36+
37+
Copyright (c) 2013-17 Phil Freeman, (c) 2014-2017 Gary Burgess, and other
38+
contributors
39+
40+
All rights reserved.
41+
42+
Redistribution and use in source and binary forms, with or without
43+
modification, are permitted provided that the following conditions are met:
44+
45+
1. Redistributions of source code must retain the above copyright notice,
46+
this list of conditions and the following disclaimer.
47+
48+
2. Redistributions in binary form must reproduce the above copyright notice,
49+
this list of conditions and the following disclaimer in the documentation
50+
and/or other materials provided with the distribution.
51+
52+
3. Neither the name of the copyright holder nor the names of its contributors
53+
may be used to endorse or promote products derived from this software
54+
without specific prior written permission.
55+
56+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
57+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
58+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
59+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
60+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
61+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
62+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
63+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
64+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
65+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
66+
67+
### `.decl__role_hover`
68+
69+
The `.decl__role_hover` rule is adapted from [an answer by
70+
frederickf](https://stackoverflow.com/users/2136552/frederickf) on [Stack
71+
Overflow](https://stackoverflow.com/a/32162038), distributed under [CC BY-SA
72+
3.0](https://creativecommons.org/licenses/by-sa/3.0/).
73+
74+
## `css/extra.css`
75+
76+
Source: [`purescript/pursuit/static/css/extra.css`](https://github.com/purescript/pursuit/blob/b22fa738653f9e5bd7191b256fe4ab375682af24/static/css/extra.css)
77+
78+
Copyright (c) 2015 Phil Freeman, (c) 2015 Harry Garrood
79+
80+
Permission is hereby granted, free of charge, to any person obtaining a copy of
81+
this software and associated documentation files (the "Software"), to deal in
82+
the Software without restriction, including without limitation the rights to
83+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
84+
of the Software, and to permit persons to whom the Software is furnished to do
85+
so, subject to the following conditions:
86+
87+
The above copyright notice and this permission notice shall be included in all
88+
copies or substantial portions of the Software.
89+
90+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
91+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
92+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
93+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
94+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
95+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
96+
SOFTWARE.

‎docgen/assets/css/extra.css‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* Additional Pursuit CSS
2+
* Note that most of the Pursuit-related CSS lives in the compiler, so that it
3+
* can be used for `purs docs`.
4+
*/
5+
6+
/* This is mainly for the help pages */
7+
.col--main > h2:first-child {
8+
margin-top: 0;
9+
}
10+
11+
.badge--deprecated {
12+
color: #fff;
13+
background-color: #c4953a;
14+
padding: 0.1em 0.4em 0.1em 0.4em;
15+
border-radius: 0.3em;
16+
font-size: 77%;
17+
font-weight: bold;
18+
position: relative;
19+
top: -0.1em;
20+
margin-left: 0.4em;
21+
}

0 commit comments

Comments
 (0)