File tree 10 files changed +32
-25
lines changed
10 files changed +32
-25
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [[ " $check_haddock " != @ (true| false) ]]; then
4
+ echo " check_haddock: Expected true or false, got \" $check_haddock \" " >&2
5
+ exit 1
6
+ fi
7
+ sed < .ci/cabal.project.local.in > cabal.project.local "
8
+ s/__CHECK_HADDOCK__/$check_haddock /"
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -xeou pipefail
3
3
4
- # Build dependencies first, so they don't end up in logs
5
- cabal v2-build \
6
- --constraint=clash-prelude==$clash_version \
7
- --enable-documentation \
8
- --allow-newer=circuit-notation:ghc \
9
- clash-protocols
10
-
11
- # circuit-notation currently _compiles on 8.10, but isn't usable. The only
12
- # other GHC version it supports is 8.6.5, but this GHC bundles a Haddock that
13
- # cannot generate documentation for clash-prelude. Hence, we build docs with
14
- # 8.10 and relax circuit-notation's ghc bounds
15
4
cabal v2-haddock \
16
5
--constraint=clash-prelude==$clash_version \
17
- --enable-documentation \
18
- --allow-newer=circuit-notation:ghc \
19
6
clash-protocols \
20
7
| & tee haddock_log
21
8
Original file line number Diff line number Diff line change
1
+ package *
2
+ documentation: __CHECK_HADDOCK__
3
+
1
4
package clash-protocols
2
5
ghc-options: -Werror
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -xeou pipefail
3
3
4
- cabal v2-build all --constraint=clash-prelude==$clash_version -fci
5
4
cabal v2-run unittests --constraint=clash-prelude==$clash_version -fci --enable-tests
6
5
cabal v2-run doctests --constraint=clash-prelude==$clash_version -fci --enable-tests
7
6
cabal v2-sdist clash-protocols
Original file line number Diff line number Diff line change @@ -47,23 +47,30 @@ jobs:
47
47
.ci/test_stack.sh
48
48
49
49
cabal :
50
- name : Cabal tests - ghc ${{ matrix.ghc }} / clash ${{ matrix.clash }}
50
+ name : Cabal tests - ghc ${{ matrix.ghc }} / clash ${{ matrix.clash }} / doc ${{ matrix.check_haddock }}
51
51
runs-on : ${{ matrix.os }}
52
52
strategy :
53
53
fail-fast : false
54
54
matrix :
55
55
os : [ubuntu-latest]
56
56
clash :
57
- - " 1.8.1 "
57
+ - " 1.8.2 "
58
58
cabal :
59
59
- " 3.10"
60
60
ghc :
61
61
- " 9.0.2"
62
62
- " 9.2.8"
63
63
- " 9.4.8"
64
- - " 9.6.4"
64
+ - " 9.8.4"
65
+ - " 9.10.1"
66
+ check_haddock :
67
+ - " false"
68
+ include :
69
+ - ghc : " 9.6.4"
70
+ check_haddock : " true"
65
71
66
72
env :
73
+ check_haddock : ${{ matrix.check_haddock }}
67
74
clash_version : ${{ matrix.clash }}
68
75
69
76
steps :
79
86
80
87
- name : Use CI specific settings
81
88
run : |
82
- cp .ci/cabal.project.local .
89
+ .ci/apply_settings.sh
83
90
84
91
- name : Setup CI
85
92
run : |
@@ -105,6 +112,7 @@ jobs:
105
112
.ci/test_cabal.sh
106
113
107
114
- name : Documentation
115
+ if : ${{ matrix.check_haddock }}
108
116
run : |
109
117
.ci/build_docs.sh
110
118
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ package clash-prelude
14
14
source-repository-package
15
15
type : git
16
16
location : https://github.com/cchalmers/circuit-notation.git
17
- tag : 19b386c4aa3ff690758ae089c7754303f3500cc9
17
+ tag : 564769c52aa05b90f81bbc898b7af7087d96613d
18
18
19
19
package clash-protocols-base
20
20
-- Reduces compile times by ~20%
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ library
104
104
, circuit-notation
105
105
, deepseq
106
106
, extra
107
- , ghc >= 8.7 && < 9.7
107
+ , ghc >= 8.7 && < 9.11
108
108
, hashable
109
109
, tagged
110
110
, template-haskell
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ library
120
120
, data-default ^>= 0.7.1.1
121
121
, deepseq
122
122
, extra
123
- , ghc >= 8.7 && < 9.7
123
+ , ghc >= 8.7 && < 9.11
124
124
, hashable
125
125
, hedgehog >= 1.0.2
126
126
, lifted-async
Original file line number Diff line number Diff line change @@ -114,9 +114,13 @@ import Prelude hiding (
114
114
import qualified Data.Bifunctor as B
115
115
import Data.Bool (bool )
116
116
import qualified Data.Coerce as Coerce
117
+ #if MIN_VERSION_base(4,19,0)
118
+ import qualified Data.Functor as Functor (unzip )
119
+ #else
120
+ import qualified Data.List.NonEmpty as Functor (unzip )
121
+ #endif
117
122
import Data.Kind (Type )
118
123
import Data.List ((\\) )
119
- import qualified Data.List.NonEmpty
120
124
import qualified Data.Maybe as Maybe
121
125
import Data.Proxy
122
126
import qualified Prelude as P
@@ -862,7 +866,7 @@ roundrobinCollect Parallel =
862
866
nacks = C. repeat (Ack False )
863
867
acks = Maybe. fromMaybe nacks ((\ i -> C. replace i ack nacks) <$> iM)
864
868
dat1 = Maybe. fromMaybe NoData dat0
865
- (iM, dat0) = Data.List.NonEmpty .unzip dats1
869
+ (iM, dat0) = Functor .unzip dats1
866
870
dats1 = C. fold @ (n C. - 1 ) (<|>) (C. zipWith goDat C. indicesI dats0)
867
871
868
872
goDat i dat
Original file line number Diff line number Diff line change 6
6
{-# LANGUAGE TypeFamilyDependencies #-}
7
7
{-# LANGUAGE UndecidableInstances #-}
8
8
{-# OPTIONS_GHC -fconstraint-solver-iterations=20 #-}
9
- #if !MIN_VERSION_clash_prelude(1, 8, 2)
10
9
{-# OPTIONS_GHC -fno-warn-orphans #-}
11
- #endif
12
10
13
11
-- TODO: Hide internal documentation
14
12
-- {-# OPTIONS_HADDOCK hide #-}
You can’t perform that action at this time.
0 commit comments