clash-prelude 0.7 → 0.7.1
raw patch · 3 files changed
+13/−8 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- clash-prelude.cabal +1/−1
- src/CLaSH/Sized/Vector.hs +8/−7
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog for [`clash-prelude` package](http://hackage.haskell.org/package/clash-prelude) +## 0.7.1 *March 25th 2015*+* Fixes bugs:+ * Fix laziness bug in Vector.(!!) and Vector.replace+ ## 0.7 *March 13th 2015* * New features: * Switch types of 'bundle' and 'bundle'', and 'unbundle' and 'unbundle''.
clash-prelude.cabal view
@@ -1,5 +1,5 @@ Name: clash-prelude-Version: 0.7+Version: 0.7.1 Synopsis: CAES Language for Synchronous Hardware - Prelude library Description: CλaSH (pronounced ‘clash’) is a functional hardware description language that
src/CLaSH/Sized/Vector.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-}@@ -426,7 +427,7 @@ zipWith f (x :> xs) ys = f x (head ys) :> zipWith f xs (tail ys) {-# INLINABLE foldr #-}--- | 'vfoldr', applied to a binary operator, a starting value (typically+-- | 'foldr', applied to a binary operator, a starting value (typically -- the right-identity of the operator), and a vector, reduces the vector -- using the binary operator, from right to left: --@@ -638,9 +639,9 @@ , " is larger than maximum index " , show (maxIndex xs) ])- sub (y:>ys) n = if isTrue# (n ==# 0#)- then y- else sub ys (n -# 1#)+ sub (y:>(!ys)) n = if isTrue# (n ==# 0#)+ then y+ else sub ys (n -# 1#) {-# INLINE (!!) #-} -- | Vector index (subscript) operator.@@ -687,9 +688,9 @@ , " is larger than maximum index " , show (maxIndex xs) ])- sub (y:>ys) n b = if isTrue# (n ==# 0#)- then b :> ys- else y :> sub ys (n -# 1#) b+ sub (y:>(!ys)) n b = if isTrue# (n ==# 0#)+ then b :> ys+ else y :> sub ys (n -# 1#) b {-# INLINE replace #-} -- | Replace an element of a vector at the given index (subscript).