Skip to content

Commit af37307

Browse files
Merge pull request #2992 from clash-lang/bump-haddock-ghc
Bump Haddock GHC to 9.6.7
2 parents 67e7f5d + 8796f56 commit af37307

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

.ci/build_docs.sh

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
set -xueo pipefail
33

44
# Check that documentation was generated successfully
5-
if [[ "$GHC_VERSION" = "8.6.5" ]]; then
6-
haddock_pkgs="clash-lib clash-lib-hedgehog clash-cosim"
7-
else
8-
haddock_pkgs="clash-prelude clash-prelude-hedgehog clash-lib clash-lib-hedgehog clash-cosim"
9-
fi
5+
haddock_pkgs="clash-prelude clash-prelude-hedgehog clash-lib clash-lib-hedgehog clash-cosim"
106

117
mkdir -p hadocs
128

@@ -16,9 +12,20 @@ for pkg in ${haddock_pkgs}; do
1612
# Cache dependencies
1713
cabal v2-build ${pkg} -O0 --enable-documentation --only-dependencies
1814

19-
# HaskellPrelude yields warnings we cannot fix
15+
# The preludes yield link destination warnings we cannot fix. Maybe fixed by:
16+
# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/14447?
17+
#
18+
# Some other modules complain about ambiguous identifiers, but they're
19+
# complaining about identifiers in temporary files, i.e. some Haddock
20+
# implementation detail.
2021
cabal v2-haddock ${pkg} -O0 --enable-documentation \
21-
|& grep -v "Clash.HaskellPrelude" \
22+
|& grep -v "Warning: Clash.HaskellPrelude: could not find link destinations for" \
23+
|& grep -v "Warning: Clash.Explicit.Prelude.Safe: could not find link destinations for" \
24+
|& grep -v "Warning: Clash.Prelude.Safe: could not find link destinations for" \
25+
|& grep -v "Warning: Clash.Explicit.Prelude: could not find link destinations for" \
26+
|& grep -v "Warning: Clash.Prelude: could not find link destinations for" \
27+
|& grep -v "Warning: 'SNat' is ambiguous. It is defined" \
28+
|& grep -v "Warning: 'head' is ambiguous. It is defined" \
2229
| tee haddock_log
2330

2431
set +e
@@ -53,8 +60,8 @@ for pkg in ${haddock_pkgs}; do
5360
exit 1
5461
fi
5562

56-
ambiguous_warn="You may be able to disambiguate the identifier by"
57-
if grep -q "${ambiguous_warn}" haddock_log; then
63+
ambiguous_warn="^Warning: '.*' is ambiguous. It is defined"
64+
if grep -E -q "${ambiguous_warn}" haddock_log; then
5865
echo -e "\e[1m\e[31mAmbiguous identifier found in ${pkg}! Scroll up for full log.\e[0m"
5966
grep --color=always -n -C 5 "${ambiguous_warn}" haddock_log
6067
exit 1

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ include:
66
variables:
77
# Default GHC / Cabal version. Used for generating Haddock and releasing to
88
# Hackage.
9-
GHC_VERSION: 8.10.7
9+
GHC_VERSION: 9.6.7
1010

1111
# https://docs.gitlab.com/runner/executors/custom.html#system-failure
1212
GET_SOURCES_ATTEMPTS: 5

0 commit comments

Comments
 (0)