diff --git a/repa-linear-algebra.cabal b/repa-linear-algebra.cabal
--- a/repa-linear-algebra.cabal
+++ b/repa-linear-algebra.cabal
@@ -1,5 +1,5 @@
 name:                repa-linear-algebra
-version:             0.3.0.0
+version:             0.3.0.1
 synopsis:            HMatrix operations for Repa.
 description:      HMatrix Vector and Matrix conversions to and from REPA Array F DIM1/2 (Complex) Double, together with a port of linear algebraic functions.
 license:             BSD3
diff --git a/src/Numeric/LinearAlgebra/Repa/Conversion.hs b/src/Numeric/LinearAlgebra/Repa/Conversion.hs
--- a/src/Numeric/LinearAlgebra/Repa/Conversion.hs
+++ b/src/Numeric/LinearAlgebra/Repa/Conversion.hs
@@ -131,8 +131,7 @@
 -- ^O(1). Convert a Repa Array to a HMatrix Matrix.
 repa2hm r = H.reshape c $ V.unsafeFromForeignPtr0 (toForeignPtr r) ln
   where ln = size e
-        (_:c:[]) = listOfShape e
-        e = extent r
+        e@(_:.c) = extent r
 
 repa2hmS :: Storable t => Array D DIM2 t -> H.Matrix t
 -- ^Convert a delayed Repa Array to a HMatrix Matrix, evaluating it sequentially.
@@ -145,8 +144,7 @@
     computeIntoS ptr r
     return . H.reshape c  $ V.unsafeFromForeignPtr0 ptr ln
   where ln = size e
-        (_:c:[]) = listOfShape e
-        e = extent r
+        e@(_:.c) = extent r
 
 repa2hmP :: (Storable t, Monad m) => Array D DIM2 t -> m (H.Matrix t)
 -- ^Convert a delayed Repa Array to a HMatrix Matrix, evaluating it in parallel.
@@ -159,5 +157,4 @@
     computeIntoP ptr r
     return . H.reshape c  $ V.unsafeFromForeignPtr0 ptr ln
   where ln = size e
-        (_:c:[]) = listOfShape e
-        e = extent r
+        e@(_:.c) = extent r
