clash-prelude-hedgehog 1.6.2 → 1.6.3
raw patch · 7 files changed
+32/−16 lines, 7 filesdep ~clash-preludePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: clash-prelude
API changes (from Hackage documentation)
+ Clash.Hedgehog.Sized.BitVector: instance GHC.TypeNats.KnownNat atLeast => GHC.Show.Show (Clash.Hedgehog.Sized.BitVector.SomeBitVector atLeast)
+ Clash.Hedgehog.Sized.Index: instance GHC.TypeNats.KnownNat atLeast => GHC.Show.Show (Clash.Hedgehog.Sized.Index.SomeIndex atLeast)
+ Clash.Hedgehog.Sized.RTree: instance (GHC.TypeNats.KnownNat atLeast, GHC.Show.Show a) => GHC.Show.Show (Clash.Hedgehog.Sized.RTree.SomeRTree atLeast a)
+ Clash.Hedgehog.Sized.Signed: instance GHC.TypeNats.KnownNat atLeast => GHC.Show.Show (Clash.Hedgehog.Sized.Signed.SomeSigned atLeast)
+ Clash.Hedgehog.Sized.Unsigned: instance GHC.TypeNats.KnownNat atLeast => GHC.Show.Show (Clash.Hedgehog.Sized.Unsigned.SomeUnsigned atLeast)
+ Clash.Hedgehog.Sized.Vector: instance (GHC.TypeNats.KnownNat atLeast, GHC.Show.Show a) => GHC.Show.Show (Clash.Hedgehog.Sized.Vector.SomeVec atLeast a)
Files
- clash-prelude-hedgehog.cabal +2/−2
- src/Clash/Hedgehog/Sized/BitVector.hs +4/−1
- src/Clash/Hedgehog/Sized/Index.hs +6/−4
- src/Clash/Hedgehog/Sized/RTree.hs +4/−1
- src/Clash/Hedgehog/Sized/Signed.hs +6/−3
- src/Clash/Hedgehog/Sized/Unsigned.hs +6/−4
- src/Clash/Hedgehog/Sized/Vector.hs +4/−1
clash-prelude-hedgehog.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.2 name: clash-prelude-hedgehog-version: 1.6.2+version: 1.6.3 synopsis: Hedgehog Generators for clash-prelude description: Hedgehog Generators for clash-prelude bug-reports: https://github.com/clash-lang/clash-compiler/issues@@ -53,4 +53,4 @@ ghc-typelits-natnormalise >= 0.7.2 && < 0.8, text >= 1.2.2 && < 1.4, - clash-prelude == 1.6.2,+ clash-prelude == 1.6.3,
src/Clash/Hedgehog/Sized/BitVector.hs view
@@ -1,5 +1,5 @@ {-|-Copyright : (C) 2021, QBayLogic B.V.+Copyright : (C) 2021-2022, QBayLogic B.V. License : BSD2 (see the file LICENSE) Maintainer : QBayLogic B.V. <devops@qbaylogic.com> @@ -68,6 +68,9 @@ data SomeBitVector atLeast where SomeBitVector :: SNat n -> BitVector (atLeast + n) -> SomeBitVector atLeast++instance KnownNat atLeast => Show (SomeBitVector atLeast) where+ show (SomeBitVector SNat bv) = show bv genSomeBitVector :: forall m atLeast
src/Clash/Hedgehog/Sized/Index.hs view
@@ -1,5 +1,5 @@ {-|-Copyright : (C) 2021, QBayLogic B.V.+Copyright : (C) 2021-2022, QBayLogic B.V. License : BSD2 (see the file LICENSE) Maintainer : QBayLogic B.V. <devops@qbaylogic.com> @@ -28,13 +28,15 @@ genIndex :: (MonadGen m, KnownNat n) => Range (Index n) -> m (Index n) genIndex range = Gen.frequency- [ (60, Gen.integral range)- , (20, Gen.constant minBound)- , (20, Gen.constant maxBound)+ [ (70, Gen.integral range)+ , (30, Gen.constant (Range.upperBound 99 range)) ] data SomeIndex atLeast where SomeIndex :: SNat n -> Index (atLeast + n) -> SomeIndex atLeast++instance KnownNat atLeast => Show (SomeIndex atLeast) where+ show (SomeIndex SNat ix) = show ix genSomeIndex :: (MonadGen m, KnownNat atLeast)
src/Clash/Hedgehog/Sized/RTree.hs view
@@ -1,5 +1,5 @@ {-|-Copyright : (C) 2021, QBayLogic B.V.+Copyright : (C) 2021-2022, QBayLogic B.V. License : BSD2 (see the file LICENSE) Maintainer : QBayLogic B.V. <devops@qbaylogic.com> @@ -33,6 +33,9 @@ data SomeRTree atLeast a where SomeRTree :: SNat n -> RTree (atLeast + n) a -> SomeRTree atLeast a++instance (KnownNat atLeast, Show a) => Show (SomeRTree atLeast a) where+ show (SomeRTree SNat x) = show x genSomeRTree :: (MonadGen m, KnownNat atLeast)
src/Clash/Hedgehog/Sized/Signed.hs view
@@ -1,5 +1,5 @@ {-|-Copyright : (C) 2021, QBayLogic B.V.+Copyright : (C) 2021-2022, QBayLogic B.V. License : BSD2 (see the file LICENSE) Maintainer : QBayLogic B.V. <devops@qbaylogic.com> @@ -29,12 +29,15 @@ genSigned range = Gen.frequency [ (60, Gen.integral range)- , (20, Gen.constant minBound)- , (20, Gen.constant maxBound)+ , (20, Gen.constant (Range.lowerBound 99 range))+ , (20, Gen.constant (Range.upperBound 99 range)) ] data SomeSigned atLeast where SomeSigned :: SNat n -> Signed (atLeast + n) -> SomeSigned atLeast++instance KnownNat atLeast => Show (SomeSigned atLeast) where+ show (SomeSigned SNat x) = show x genSomeSigned :: (MonadGen m, KnownNat atLeast)
src/Clash/Hedgehog/Sized/Unsigned.hs view
@@ -1,5 +1,5 @@ {-|-Copyright : (C) 2021, QBayLogic B.V.+Copyright : (C) 2021-2022, QBayLogic B.V. License : BSD2 (see the file LICENSE) Maintainer : QBayLogic B.V. <devops@qbaylogic.com> @@ -28,13 +28,15 @@ genUnsigned :: (MonadGen m, KnownNat n) => Range (Unsigned n) -> m (Unsigned n) genUnsigned range = Gen.frequency- [ (60, Gen.integral range)- , (20, Gen.constant minBound)- , (20, Gen.constant maxBound)+ [ (70, Gen.integral range)+ , (30, Gen.constant (Range.upperBound 99 range)) ] data SomeUnsigned atLeast where SomeUnsigned :: SNat n -> Unsigned (atLeast + n) -> SomeUnsigned atLeast++instance KnownNat atLeast => Show (SomeUnsigned atLeast) where+ show (SomeUnsigned SNat x) = show x genSomeUnsigned :: (MonadGen m, KnownNat atLeast)
src/Clash/Hedgehog/Sized/Vector.hs view
@@ -1,5 +1,5 @@ {-|-Copyright : (C) 2021, QBayLogic B.V.+Copyright : (C) 2021-2022, QBayLogic B.V. License : BSD2 (see the file LICENSE) Maintainer : QBayLogic B.V. <devops@qbaylogic.com> @@ -42,6 +42,9 @@ data SomeVec atLeast a where SomeVec :: SNat n -> Vec (atLeast + n) a -> SomeVec atLeast a++instance (KnownNat atLeast, Show a) => Show (SomeVec atLeast a) where+ show (SomeVec SNat xs) = show xs genSomeVec :: (MonadGen m, KnownNat atLeast)