File tree 10 files changed +36
-26
lines changed
clash-protocols/src/Protocols
10 files changed +36
-26
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
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ package *
2
+ documentation: __CHECK_HADDOCK__
3
+
4
+ package clash-protocols
5
+ documentation: False
6
+ 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,32 @@ 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
+ include :
67
+ - check_haddock : " False"
68
+ - ghc : " 9.6.4"
69
+ check_haddock : " True"
70
+ os : " ubuntu-latest"
71
+ clash : " 1.8.2"
72
+ cabal : " 3.10"
65
73
66
74
env :
75
+ check_haddock : ${{ matrix.check_haddock }}
67
76
clash_version : ${{ matrix.clash }}
68
77
69
78
steps :
79
88
80
89
- name : Use CI specific settings
81
90
run : |
82
- cp .ci/cabal.project.local .
91
+ .ci/apply_settings.sh
83
92
84
93
- name : Setup CI
85
94
run : |
@@ -105,6 +114,7 @@ jobs:
105
114
.ci/test_cabal.sh
106
115
107
116
- name : Documentation
117
+ if : ${{ matrix.check_haddock == 'True' }}
108
118
run : |
109
119
.ci/build_docs.sh
110
120
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 @@ -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 #-}
Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ packages:
6
6
7
7
extra-deps :
8
8
- git : https://github.com/cchalmers/circuit-notation.git
9
- commit : 19b386c4aa3ff690758ae089c7754303f3500cc9
9
+ commit : 564769c52aa05b90f81bbc898b7af7087d96613d
10
10
- clash-prelude-1.8.1
11
11
- clash-prelude-hedgehog-1.8.1
You can’t perform that action at this time.
0 commit comments