Skip to content

Commit c994bf4

Browse files
committed
Build and test on GHC 8.2
Two doctests still fail
1 parent 4912132 commit c994bf4

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

clash-prelude.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,14 @@ Library
179179
deepseq >= 1.4.1.0 && < 1.5,
180180
ghc-prim >= 0.3.1.0 && < 0.6,
181181
ghc-typelits-extra >= 0.2.1 && < 0.3,
182-
ghc-typelits-knownnat >= 0.2.2 && < 0.3,
182+
ghc-typelits-knownnat >= 0.2.2 && < 0.4,
183183
ghc-typelits-natnormalise >= 0.4.2 && < 0.6,
184184
half >= 0.2.2.3 && < 1.0,
185185
lens >= 4.9 && < 4.16,
186186
QuickCheck >= 2.7 && < 2.10,
187187
reflection >= 2 && < 2.2,
188188
singletons >= 1.0 && < 3.0,
189-
template-haskell >= 2.9.0.0 && < 2.12,
189+
template-haskell >= 2.9.0.0 && < 2.13,
190190
vector >= 0.11 && < 1.0
191191

192192
if flag(doclinks)
@@ -222,7 +222,7 @@ benchmark benchmark-clash-prelude
222222
clash-prelude,
223223
criterion >= 1.1.1.0 && < 1.2,
224224
deepseq >= 1.4.0.1 && < 1.5,
225-
template-haskell >= 2.9.0.0 && < 2.12
225+
template-haskell >= 2.9.0.0 && < 2.13
226226

227227
Other-Modules: BenchBitVector
228228
BenchFixed

src/CLaSH/Signal/Bundle.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ class Bundle a where
8484
bundle :: Unbundled' clk a -> Signal' clk a
8585

8686
{-# INLINE bundle #-}
87-
default bundle :: Signal' clk a -> Signal' clk a
87+
default bundle :: (Signal' clk a ~ Unbundled' clk a)
88+
=> Unbundled' clk a -> Signal' clk a
8889
bundle s = s
8990
-- | Example:
9091
--
@@ -100,7 +101,8 @@ class Bundle a where
100101
unbundle :: Signal' clk a -> Unbundled' clk a
101102

102103
{-# INLINE unbundle #-}
103-
default unbundle :: Signal' clk a -> Signal' clk a
104+
default unbundle :: (Unbundled' clk a ~ Signal' clk a)
105+
=> Signal' clk a -> Unbundled' clk a
104106
unbundle s = s
105107

106108
instance Bundle Bool

tests/doctests.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
{-# LANGUAGE CPP #-}
12
module Main where
23

34
import Test.DocTest (doctest)
45

56
main :: IO ()
6-
main = doctest ["-i src","CLaSH.Prelude","CLaSH.Examples","CLaSH.Tutorial"]
7+
main = doctest $
8+
#if __GLASGOW_HASKELL__ >= 802
9+
("-fdiagnostics-color=never":)
10+
#endif
11+
["-i src","CLaSH.Prelude","CLaSH.Examples","CLaSH.Tutorial"]

0 commit comments

Comments
 (0)