diff --git a/src/Data/AffineSpace.hs b/src/Data/AffineSpace.hs
--- a/src/Data/AffineSpace.hs
+++ b/src/Data/AffineSpace.hs
@@ -21,8 +21,9 @@
   (
     AffineSpace(..), (.-^), distanceSq, distance, alerp, affineCombo
   ) where
-
+#if !MIN_VERSION_base(4,10,0)
 import Control.Applicative (liftA2)
+#endif
 import Data.Ratio
 import Foreign.C.Types (CSChar, CInt, CShort, CLong, CLLong, CIntMax, CFloat, CDouble)
 import Control.Arrow(first)
@@ -149,7 +150,7 @@
 
 instance AdditiveGroup (Diff (VRep p)) => AdditiveGroup (GenericDiff p)
 instance VectorSpace (Diff (VRep p)) => VectorSpace (GenericDiff p)
-instance InnerSpace (Diff (VRep p)) => InnerSpace (GenericDiff p)
+instance (AdditiveGroup (Scalar (Diff (VRep p))), InnerSpace (Diff (VRep p))) => InnerSpace (GenericDiff p)
 instance HasBasis (Diff (VRep p)) => HasBasis (GenericDiff p)
 
 data AffineDiffProductSpace f g p = AffineDiffProductSpace
@@ -160,7 +161,8 @@
          , VectorSpace (Diff (f p)), VectorSpace (Diff (g p))
          , Scalar (Diff (f p)) ~ Scalar (Diff (g p)) )
     => VectorSpace (AffineDiffProductSpace f g p)
-instance ( AffineSpace (f p), AffineSpace (g p)
+instance ( AdditiveGroup (Scalar (Diff (g p)))
+         , AffineSpace (f p), AffineSpace (g p)
          , InnerSpace (Diff (f p)), InnerSpace (Diff (g p))
          , Scalar (Diff (f p)) ~ Scalar (Diff (g p))
          , Num (Scalar (Diff (f p))) )
diff --git a/src/Data/Basis.hs b/src/Data/Basis.hs
--- a/src/Data/Basis.hs
+++ b/src/Data/Basis.hs
@@ -23,6 +23,7 @@
 import Control.Arrow (first)
 import Data.Ratio
 import Foreign.C.Types (CFloat, CDouble)
+import Data.Kind
 -- import Data.Either
 
 import Data.VectorSpace
@@ -36,7 +37,7 @@
 
 class VectorSpace v => HasBasis v where
   -- | Representation of the canonical basis for @v@
-  type Basis v :: *
+  type Basis v :: Type
   type Basis v = Basis (VRep v)
   -- | Interpret basis rep as a vector
   basisValue   :: Basis v -> v
diff --git a/src/Data/LinearMap.hs b/src/Data/LinearMap.hs
--- a/src/Data/LinearMap.hs
+++ b/src/Data/LinearMap.hs
@@ -25,9 +25,9 @@
   where
 
 #if !(MIN_VERSION_base(4,8,0))
-import Control.Applicative (Applicative)
+import Control.Applicative (Applicative, liftA2)
 #endif
-import Control.Applicative (liftA2, liftA3)
+import Control.Applicative (liftA3)
 import Control.Arrow       (first,second)
 
 import Data.MemoTrie      (HasTrie(..),(:->:))
diff --git a/src/Data/VectorSpace.hs b/src/Data/VectorSpace.hs
--- a/src/Data/VectorSpace.hs
+++ b/src/Data/VectorSpace.hs
@@ -32,11 +32,13 @@
   , InnerSpace(..)
   , lerp, linearCombo, magnitudeSq, magnitude, normalized, project
   ) where
-
+#if !(MIN_VERSION_base(4,8,0))
 import Control.Applicative (liftA2)
+#endif
 import Data.Complex hiding (magnitude)
 import Foreign.C.Types (CSChar, CInt, CShort, CLong, CLLong, CIntMax, CFloat, CDouble)
 import Data.Ratio
+import Data.Kind
 
 import Data.AdditiveGroup
 import Data.MemoTrie
@@ -49,7 +51,7 @@
 
 -- | Vector space @v@.
 class AdditiveGroup v => VectorSpace v where
-  type Scalar v :: *
+  type Scalar v :: Type
   type Scalar v = Scalar (VRep v)
   -- | Scale a vector
   (*^) :: Scalar v -> v -> v
@@ -105,8 +107,8 @@
 magnitude = sqrt . magnitudeSq
 {-# INLINE magnitude #-}
 
--- | Vector in same direction as given one but with length of one.  If
--- given the zero vector, then return it.
+-- | Vector in same direction as given one but with length of one.
+-- Divides by zero for the zero vector.
 normalized :: (InnerSpace v, s ~ Scalar v, Floating s) =>  v -> v
 normalized v = v ^/ magnitude v
 {-# INLINE normalized #-}
diff --git a/vector-space.cabal b/vector-space.cabal
--- a/vector-space.cabal
+++ b/vector-space.cabal
@@ -1,6 +1,6 @@
 Name:                vector-space
-Version:             0.16
-Cabal-Version:       >= 1.8
+Version:             0.19
+Cabal-Version:       >= 1.10
 Synopsis:            Vector & affine spaces, linear maps, and derivatives
 Category:            math
 Description:
@@ -29,6 +29,7 @@
   location: git://github.com/conal/vector-space.git
 
 Library
+  default-language:  Haskell2010
   hs-Source-Dirs:      src
   Extensions:          
   Build-Depends:       base<5, MemoTrie >= 0.5
@@ -52,4 +53,3 @@
   if !impl(ghc >= 7.6) { Build-Depends: ghc-prim >= 0.2 }
   if !impl(ghc >= 7.9) { Build-Depends: void >= 0.4 }
   if !impl(ghc >= 8.0) { Build-Depends: semigroups >= 0.16 }
-  ghc-options:         -Wall -O2
