diff --git a/fixed-vector/ChangeLog.md b/fixed-vector/ChangeLog.md index 6d5192c..4dc9904 100644 --- a/fixed-vector/ChangeLog.md +++ b/fixed-vector/ChangeLog.md @@ -1,3 +1,8 @@ +2.1.1.0 [2026.02.28] +------------- +* Missing `Prod` and `Vector` instances are added for `ContVec`. + + 2.1.0.0 [2026.01.27] ------------- * New API for working with vectors that are not parametric in element: diff --git a/fixed-vector/Data/Vector/Fixed/Mono.hs b/fixed-vector/Data/Vector/Fixed/Mono.hs index 020266e..25f3fbf 100644 --- a/fixed-vector/Data/Vector/Fixed/Mono.hs +++ b/fixed-vector/Data/Vector/Fixed/Mono.hs @@ -910,6 +910,13 @@ pattern V4 t x y z <- (convert -> (t,x,y,z)) where -- Instances ---------------------------------------------------------------- +instance (ArityPeano n) => Prod a (C.ContVec n a) where + inspect = C.inspect + construct = C.construct + {-# INLINE inspect #-} + {-# INLINE construct #-} +instance (ArityPeano n) => Vector a (C.ContVec n a) where + instance Prod a (Complex a) where inspect (r :+ i) (C.Fun f) = f r i construct = C.Fun (:+) diff --git a/fixed-vector/fixed-vector.cabal b/fixed-vector/fixed-vector.cabal index 8e2bd39..0fe5a79 100644 --- a/fixed-vector/fixed-vector.cabal +++ b/fixed-vector/fixed-vector.cabal @@ -2,7 +2,7 @@ Cabal-Version: 3.0 Build-Type: Simple Name: fixed-vector -Version: 2.1.0.0 +Version: 2.1.1.0 Synopsis: Generic vectors with statically known size. Description: Generic library for vectors with statically known