diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown
--- a/CHANGELOG.markdown
+++ b/CHANGELOG.markdown
@@ -1,3 +1,7 @@
+1.21.5 [2021.02.18]
+-------------------
+* Allow building with `lens-5.*`.
+
 1.21.4 [2021.01.29]
 -------------------
 * Allow building with `vector-0.12.2` or later.
diff --git a/linear.cabal b/linear.cabal
--- a/linear.cabal
+++ b/linear.cabal
@@ -1,6 +1,6 @@
 name:          linear
 category:      Math, Algebra
-version:       1.21.4
+version:       1.21.5
 license:       BSD3
 cabal-version: >= 1.10
 license-file:  LICENSE
@@ -60,7 +60,8 @@
     distributive         >= 0.2.2 && < 1,
     ghc-prim,
     hashable             >= 1.1   && < 1.4,
-    lens                 >= 4.15.2 && < 5,
+    indexed-traversable  >= 0.1.1 && < 0.2,
+    lens                 >= 4.15.2 && < 6,
     random               >= 1.0   && < 1.3,
     reflection           >= 1.3.2 && < 3,
     semigroups           >= 0.9   && < 1,
diff --git a/src/Linear/Plucker.hs b/src/Linear/Plucker.hs
--- a/src/Linear/Plucker.hs
+++ b/src/Linear/Plucker.hs
@@ -65,18 +65,21 @@
 import Control.Monad (liftM)
 import Control.Monad.Fix
 import Control.Monad.Zip
-import Control.Lens hiding (index, (<.>))
+import Control.Lens as Lens hiding (index, (<.>))
 import Data.Binary as Binary
 import Data.Bytes.Serial
 import Data.Distributive
 import Data.Foldable as Foldable
+import qualified Data.Foldable.WithIndex as WithIndex
 import Data.Functor.Bind
 import Data.Functor.Classes
 import Data.Functor.Rep
+import qualified Data.Functor.WithIndex as WithIndex
 import Data.Hashable
 import Data.Semigroup
 import Data.Semigroup.Foldable
 import Data.Serialize as Cereal
+import qualified Data.Traversable.WithIndex as WithIndex
 #if __GLASGOW_HASKELL__ >= 707
 import qualified Data.Vector as V
 #endif
@@ -431,19 +434,25 @@
 e31 = E p31
 e12 = E p12
 
-instance FunctorWithIndex (E Plucker) Plucker where
+instance WithIndex.FunctorWithIndex (E Plucker) Plucker where
   imap f (Plucker a b c d e g) = Plucker (f e01 a) (f e02 b) (f e03 c) (f e23 d) (f e31 e) (f e12 g)
   {-# INLINE imap #-}
 
-instance FoldableWithIndex (E Plucker) Plucker where
+instance WithIndex.FoldableWithIndex (E Plucker) Plucker where
   ifoldMap f (Plucker a b c d e g) = f e01 a `mappend` f e02 b `mappend` f e03 c
                            `mappend` f e23 d `mappend` f e31 e `mappend` f e12 g
   {-# INLINE ifoldMap #-}
 
-instance TraversableWithIndex (E Plucker) Plucker where
+instance WithIndex.TraversableWithIndex (E Plucker) Plucker where
   itraverse f (Plucker a b c d e g) = Plucker <$> f e01 a <*> f e02 b <*> f e03 c
                                               <*> f e23 d <*> f e31 e <*> f e12 g
   {-# INLINE itraverse #-}
+
+#if !MIN_VERSION_lens(5,0,0)
+instance Lens.FunctorWithIndex     (E Plucker) Plucker where imap      = WithIndex.imap
+instance Lens.FoldableWithIndex    (E Plucker) Plucker where ifoldMap  = WithIndex.ifoldMap
+instance Lens.TraversableWithIndex (E Plucker) Plucker where itraverse = WithIndex.itraverse
+#endif
 
 type instance Index (Plucker a) = E Plucker
 type instance IxValue (Plucker a) = a
diff --git a/src/Linear/Quaternion.hs b/src/Linear/Quaternion.hs
--- a/src/Linear/Quaternion.hs
+++ b/src/Linear/Quaternion.hs
@@ -63,16 +63,18 @@
 import Control.Monad (liftM)
 import Control.Monad.Fix
 import Control.Monad.Zip
-import Control.Lens hiding ((<.>))
+import Control.Lens as Lens hiding ((<.>))
 import Data.Binary as Binary
 import Data.Bytes.Serial
 import Data.Complex (Complex((:+)))
 import Data.Data
 import Data.Distributive
 import Data.Foldable
+import qualified Data.Foldable.WithIndex as WithIndex
 import Data.Functor.Bind
 import Data.Functor.Classes
 import Data.Functor.Rep
+import qualified Data.Functor.WithIndex as WithIndex
 import Data.Hashable
 #if (MIN_VERSION_hashable(1,2,5))
 import Data.Hashable.Lifted
@@ -86,6 +88,7 @@
 #if !(MIN_VERSION_base(4,8,0))
 import Data.Monoid (Monoid(..))
 #endif
+import qualified Data.Traversable.WithIndex as WithIndex
 #if __GLASGOW_HASKELL__ >= 707
 import qualified Data.Vector as V
 #endif
@@ -210,17 +213,23 @@
   index xs (E l) = view l xs
   {-# INLINE index #-}
 
-instance FunctorWithIndex (E Quaternion) Quaternion where
+instance WithIndex.FunctorWithIndex (E Quaternion) Quaternion where
   imap f (Quaternion a (V3 b c d)) = Quaternion (f ee a) $ V3 (f ei b) (f ej c) (f ek d)
   {-# INLINE imap #-}
 
-instance FoldableWithIndex (E Quaternion) Quaternion where
+instance WithIndex.FoldableWithIndex (E Quaternion) Quaternion where
   ifoldMap f (Quaternion a (V3 b c d)) = f ee a `mappend` f ei b `mappend` f ej c `mappend` f ek d
   {-# INLINE ifoldMap #-}
 
-instance TraversableWithIndex (E Quaternion) Quaternion where
+instance WithIndex.TraversableWithIndex (E Quaternion) Quaternion where
   itraverse f (Quaternion a (V3 b c d)) = Quaternion <$> f ee a <*> (V3 <$> f ei b <*> f ej c <*> f ek d)
   {-# INLINE itraverse #-}
+
+#if !MIN_VERSION_lens(5,0,0)
+instance Lens.FunctorWithIndex     (E Quaternion) Quaternion where imap      = WithIndex.imap
+instance Lens.FoldableWithIndex    (E Quaternion) Quaternion where ifoldMap  = WithIndex.ifoldMap
+instance Lens.TraversableWithIndex (E Quaternion) Quaternion where itraverse = WithIndex.itraverse
+#endif
 
 type instance Index (Quaternion a) = E Quaternion
 type instance IxValue (Quaternion a) = a
diff --git a/src/Linear/V.hs b/src/Linear/V.hs
--- a/src/Linear/V.hs
+++ b/src/Linear/V.hs
@@ -83,9 +83,11 @@
 import Data.Data
 import Data.Distributive
 import Data.Foldable as Foldable
+import qualified Data.Foldable.WithIndex as WithIndex
 import Data.Functor.Bind
 import Data.Functor.Classes
 import Data.Functor.Rep as Rep
+import qualified Data.Functor.WithIndex as WithIndex
 import Data.Hashable
 #if (MIN_VERSION_hashable(1,2,5))
 import Data.Hashable.Lifted
@@ -98,6 +100,7 @@
 #if __GLASGOW_HASKELL__ < 710
 import Data.Traversable (sequenceA)
 #endif
+import qualified Data.Traversable.WithIndex as WithIndex
 import qualified Data.Vector as V
 import Data.Vector (Vector)
 import qualified Data.Vector.Generic as G
@@ -229,7 +232,7 @@
   fmap f (V as) = V (fmap f as)
   {-# INLINE fmap #-}
 
-instance FunctorWithIndex Int (V n) where
+instance WithIndex.FunctorWithIndex Int (V n) where
   imap f (V as) = V (Lens.imap f as)
   {-# INLINE imap #-}
 
@@ -272,7 +275,7 @@
   {-# INLINE product #-}
 #endif
 
-instance FoldableWithIndex Int (V n) where
+instance WithIndex.FoldableWithIndex Int (V n) where
   ifoldMap f (V as) = ifoldMap f as
   {-# INLINE ifoldMap #-}
 
@@ -280,9 +283,15 @@
   traverse f (V as) = V <$> traverse f as
   {-# INLINE traverse #-}
 
-instance TraversableWithIndex Int (V n) where
+instance WithIndex.TraversableWithIndex Int (V n) where
   itraverse f (V as) = V <$> itraverse f as
   {-# INLINE itraverse #-}
+
+#if !MIN_VERSION_lens(5,0,0)
+instance Lens.FunctorWithIndex     Int (V n) where imap      = WithIndex.imap
+instance Lens.FoldableWithIndex    Int (V n) where ifoldMap  = WithIndex.ifoldMap
+instance Lens.TraversableWithIndex Int (V n) where itraverse = WithIndex.itraverse
+#endif
 
 instance Apply (V n) where
   V as <.> V bs = V (V.zipWith id as bs)
diff --git a/src/Linear/V0.hs b/src/Linear/V0.hs
--- a/src/Linear/V0.hs
+++ b/src/Linear/V0.hs
@@ -51,7 +51,7 @@
 
 import Control.Applicative
 import Control.DeepSeq (NFData(rnf))
-import Control.Lens
+import Control.Lens as Lens
 import Control.Monad.Fix
 import Control.Monad.Zip
 import Data.Binary -- binary
@@ -59,9 +59,11 @@
 import Data.Data
 import Data.Distributive
 import Data.Foldable
+import qualified Data.Foldable.WithIndex as WithIndex
 import Data.Functor.Bind
 import Data.Functor.Classes
 import Data.Functor.Rep
+import qualified Data.Functor.WithIndex as WithIndex
 import Data.Hashable
 #if (MIN_VERSION_hashable(1,2,5))
 import Data.Hashable.Lifted
@@ -71,6 +73,7 @@
 import Data.Semigroup
 #endif
 import Data.Serialize -- cereal
+import qualified Data.Traversable.WithIndex as WithIndex
 #if __GLASGOW_HASKELL__ >= 707
 import qualified Data.Vector as V
 #endif
@@ -304,17 +307,23 @@
   peek _ = return V0
   {-# INLINE peek #-}
 
-instance FunctorWithIndex (E V0) V0 where
+instance WithIndex.FunctorWithIndex (E V0) V0 where
   imap _ V0 = V0
   {-# INLINE imap #-}
 
-instance FoldableWithIndex (E V0) V0 where
+instance WithIndex.FoldableWithIndex (E V0) V0 where
   ifoldMap _ V0 = mempty
   {-# INLINE ifoldMap #-}
 
-instance TraversableWithIndex (E V0) V0 where
+instance WithIndex.TraversableWithIndex (E V0) V0 where
   itraverse _ V0 = pure V0
   {-# INLINE itraverse #-}
+
+#if !MIN_VERSION_lens(5,0,0)
+instance Lens.FunctorWithIndex     (E V0) V0 where imap      = WithIndex.imap
+instance Lens.FoldableWithIndex    (E V0) V0 where ifoldMap  = WithIndex.ifoldMap
+instance Lens.TraversableWithIndex (E V0) V0 where itraverse = WithIndex.itraverse
+#endif
 
 instance Representable V0 where
   type Rep V0 = E V0
diff --git a/src/Linear/V1.hs b/src/Linear/V1.hs
--- a/src/Linear/V1.hs
+++ b/src/Linear/V1.hs
@@ -58,21 +58,24 @@
 import Control.Monad (liftM)
 import Control.Monad.Fix
 import Control.Monad.Zip
-import Control.Lens
+import Control.Lens as Lens
 import Data.Binary as Binary
 import Data.Bytes.Serial
 import Data.Serialize as Cereal
 import Data.Data
 import Data.Distributive
 import Data.Foldable
+import qualified Data.Foldable.WithIndex as WithIndex
 import Data.Functor.Bind
 import Data.Functor.Classes
 import Data.Functor.Rep
+import qualified Data.Functor.WithIndex as WithIndex
 import Data.Hashable
 #if (MIN_VERSION_hashable(1,2,5))
 import Data.Hashable.Lifted
 #endif
 import Data.Semigroup.Foldable
+import qualified Data.Traversable.WithIndex as WithIndex
 #if __GLASGOW_HASKELL__ >= 707
 import qualified Data.Vector as V
 import Linear.V
@@ -311,17 +314,23 @@
   index xs (E l) = view l xs
   {-# INLINE index #-}
 
-instance FunctorWithIndex (E V1) V1 where
+instance WithIndex.FunctorWithIndex (E V1) V1 where
   imap f (V1 a) = V1 (f ex a)
   {-# INLINE imap #-}
 
-instance FoldableWithIndex (E V1) V1 where
+instance WithIndex.FoldableWithIndex (E V1) V1 where
   ifoldMap f (V1 a) = f ex a
   {-# INLINE ifoldMap #-}
 
-instance TraversableWithIndex (E V1) V1 where
+instance WithIndex.TraversableWithIndex (E V1) V1 where
   itraverse f (V1 a) = V1 <$> f ex a
   {-# INLINE itraverse #-}
+
+#if !MIN_VERSION_lens(5,0,0)
+instance Lens.FunctorWithIndex     (E V1) V1 where imap      = WithIndex.imap
+instance Lens.FoldableWithIndex    (E V1) V1 where ifoldMap  = WithIndex.ifoldMap
+instance Lens.TraversableWithIndex (E V1) V1 where itraverse = WithIndex.itraverse
+#endif
 
 type instance Index (V1 a) = E V1
 type instance IxValue (V1 a) = a
diff --git a/src/Linear/V2.hs b/src/Linear/V2.hs
--- a/src/Linear/V2.hs
+++ b/src/Linear/V2.hs
@@ -61,15 +61,17 @@
 import Control.Monad (liftM)
 import Control.Monad.Fix
 import Control.Monad.Zip
-import Control.Lens hiding ((<.>))
+import Control.Lens as Lens hiding ((<.>))
 import Data.Binary as Binary
 import Data.Bytes.Serial
 import Data.Data
 import Data.Distributive
 import Data.Foldable
+import qualified Data.Foldable.WithIndex as WithIndex
 import Data.Functor.Bind
 import Data.Functor.Classes
 import Data.Functor.Rep
+import qualified Data.Functor.WithIndex as WithIndex
 import Data.Hashable
 #if (MIN_VERSION_hashable(1,2,5))
 import Data.Hashable.Lifted
@@ -77,6 +79,7 @@
 import Data.Semigroup
 import Data.Semigroup.Foldable
 import Data.Serialize as Cereal
+import qualified Data.Traversable.WithIndex as WithIndex
 #if __GLASGOW_HASKELL__ >= 707
 import qualified Data.Vector as V
 #endif
@@ -374,17 +377,23 @@
   index xs (E l) = view l xs
   {-# INLINE index #-}
 
-instance FunctorWithIndex (E V2) V2 where
+instance WithIndex.FunctorWithIndex (E V2) V2 where
   imap f (V2 a b) = V2 (f ex a) (f ey b)
   {-# INLINE imap #-}
 
-instance FoldableWithIndex (E V2) V2 where
+instance WithIndex.FoldableWithIndex (E V2) V2 where
   ifoldMap f (V2 a b) = f ex a `mappend` f ey b
   {-# INLINE ifoldMap #-}
 
-instance TraversableWithIndex (E V2) V2 where
+instance WithIndex.TraversableWithIndex (E V2) V2 where
   itraverse f (V2 a b) = V2 <$> f ex a <*> f ey b
   {-# INLINE itraverse #-}
+
+#if !MIN_VERSION_lens(5,0,0)
+instance Lens.FunctorWithIndex     (E V2) V2 where imap      = WithIndex.imap
+instance Lens.FoldableWithIndex    (E V2) V2 where ifoldMap  = WithIndex.ifoldMap
+instance Lens.TraversableWithIndex (E V2) V2 where itraverse = WithIndex.itraverse
+#endif
 
 type instance Index (V2 a) = E V2
 type instance IxValue (V2 a) = a
diff --git a/src/Linear/V3.hs b/src/Linear/V3.hs
--- a/src/Linear/V3.hs
+++ b/src/Linear/V3.hs
@@ -57,15 +57,17 @@
 import Control.Monad (liftM)
 import Control.Monad.Fix
 import Control.Monad.Zip
-import Control.Lens hiding ((<.>))
+import Control.Lens as Lens hiding ((<.>))
 import Data.Binary as Binary -- binary
 import Data.Bytes.Serial -- bytes
 import Data.Data
 import Data.Distributive
 import Data.Foldable
+import qualified Data.Foldable.WithIndex as WithIndex
 import Data.Functor.Bind
 import Data.Functor.Classes
 import Data.Functor.Rep
+import qualified Data.Functor.WithIndex as WithIndex
 import Data.Hashable
 #if (MIN_VERSION_hashable(1,2,5))
 import Data.Hashable.Lifted
@@ -75,6 +77,7 @@
 #endif
 import Data.Semigroup.Foldable
 import Data.Serialize as Cereal -- cereal
+import qualified Data.Traversable.WithIndex as WithIndex
 #if __GLASGOW_HASKELL__ >= 707
 import qualified Data.Vector as V
 #endif
@@ -390,17 +393,23 @@
   index xs (E l) = view l xs
   {-# INLINE index #-}
 
-instance FunctorWithIndex (E V3) V3 where
+instance WithIndex.FunctorWithIndex (E V3) V3 where
   imap f (V3 a b c) = V3 (f ex a) (f ey b) (f ez c)
   {-# INLINE imap #-}
 
-instance FoldableWithIndex (E V3) V3 where
+instance WithIndex.FoldableWithIndex (E V3) V3 where
   ifoldMap f (V3 a b c) = f ex a `mappend` f ey b `mappend` f ez c
   {-# INLINE ifoldMap #-}
 
-instance TraversableWithIndex (E V3) V3 where
+instance WithIndex.TraversableWithIndex (E V3) V3 where
   itraverse f (V3 a b c) = V3 <$> f ex a <*> f ey b <*> f ez c
   {-# INLINE itraverse #-}
+
+#if !MIN_VERSION_lens(5,0,0)
+instance Lens.FunctorWithIndex     (E V3) V3 where imap      = WithIndex.imap
+instance Lens.FoldableWithIndex    (E V3) V3 where ifoldMap  = WithIndex.ifoldMap
+instance Lens.TraversableWithIndex (E V3) V3 where itraverse = WithIndex.itraverse
+#endif
 
 type instance Index (V3 a) = E V3
 type instance IxValue (V3 a) = a
diff --git a/src/Linear/V4.hs b/src/Linear/V4.hs
--- a/src/Linear/V4.hs
+++ b/src/Linear/V4.hs
@@ -63,15 +63,17 @@
 import Control.Monad (liftM)
 import Control.Monad.Fix
 import Control.Monad.Zip
-import Control.Lens hiding ((<.>))
+import Control.Lens as Lens hiding ((<.>))
 import Data.Binary as Binary
 import Data.Bytes.Serial
 import Data.Data
 import Data.Distributive
 import Data.Foldable
+import qualified Data.Foldable.WithIndex as WithIndex
 import Data.Functor.Bind
 import Data.Functor.Classes
 import Data.Functor.Rep
+import qualified Data.Functor.WithIndex as WithIndex
 import Data.Hashable
 #if (MIN_VERSION_hashable(1,2,5))
 import Data.Hashable.Lifted
@@ -81,6 +83,7 @@
 #endif
 import Data.Semigroup.Foldable
 import Data.Serialize as Cereal
+import qualified Data.Traversable.WithIndex as WithIndex
 #if __GLASGOW_HASKELL__ >= 707
 import qualified Data.Vector as V
 #endif
@@ -539,17 +542,23 @@
   index xs (E l) = view l xs
   {-# INLINE index #-}
 
-instance FunctorWithIndex (E V4) V4 where
+instance WithIndex.FunctorWithIndex (E V4) V4 where
   imap f (V4 a b c d) = V4 (f ex a) (f ey b) (f ez c) (f ew d)
   {-# INLINE imap #-}
 
-instance FoldableWithIndex (E V4) V4 where
+instance WithIndex.FoldableWithIndex (E V4) V4 where
   ifoldMap f (V4 a b c d) = f ex a `mappend` f ey b `mappend` f ez c `mappend` f ew d
   {-# INLINE ifoldMap #-}
 
-instance TraversableWithIndex (E V4) V4 where
+instance WithIndex.TraversableWithIndex (E V4) V4 where
   itraverse f (V4 a b c d) = V4 <$> f ex a <*> f ey b <*> f ez c <*> f ew d
   {-# INLINE itraverse #-}
+
+#if !MIN_VERSION_lens(5,0,0)
+instance Lens.FunctorWithIndex     (E V4) V4 where imap      = WithIndex.imap
+instance Lens.FoldableWithIndex    (E V4) V4 where ifoldMap  = WithIndex.ifoldMap
+instance Lens.TraversableWithIndex (E V4) V4 where itraverse = WithIndex.itraverse
+#endif
 
 type instance Index (V4 a) = E V4
 type instance IxValue (V4 a) = a
