diff --git a/src/Data/AdditiveGroup.hs b/src/Data/AdditiveGroup.hs
--- a/src/Data/AdditiveGroup.hs
+++ b/src/Data/AdditiveGroup.hs
@@ -24,6 +24,7 @@
 import Data.Foldable (Foldable,foldr)
 import Data.Complex hiding (magnitude)
 import Data.Ratio
+import Foreign.C.Types (CSChar, CInt, CShort, CLong, CLLong, CIntMax, CFloat, CDouble)
 
 import Data.MemoTrie
 
@@ -64,6 +65,14 @@
 ScalarType(Integer)
 ScalarType(Float)
 ScalarType(Double)
+ScalarType(CSChar)
+ScalarType(CInt)
+ScalarType(CShort)
+ScalarType(CLong)
+ScalarType(CLLong)
+ScalarType(CIntMax)
+ScalarType(CFloat)
+ScalarType(CDouble)
 ScalarTypeCon(Integral a,Ratio a)
 
 instance (RealFloat v, AdditiveGroup v) => AdditiveGroup (Complex v) where
diff --git a/src/Data/AffineSpace.hs b/src/Data/AffineSpace.hs
--- a/src/Data/AffineSpace.hs
+++ b/src/Data/AffineSpace.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE MultiParamTypeClasses, FlexibleContexts, TypeFamilies #-}
+{-# LANGUAGE MultiParamTypeClasses, FlexibleContexts, TypeFamilies, CPP #-}
 ----------------------------------------------------------------------
 -- |
 -- Module      :  Data.AffineSpace
@@ -18,6 +18,7 @@
 
 import Control.Applicative (liftA2)
 import Data.Ratio
+import Foreign.C.Types (CFloat, CDouble)
 
 import Data.VectorSpace
 
@@ -65,20 +66,20 @@
          p -> p -> Scalar (Diff p) -> p
 alerp p p' s = p .+^ (s *^ (p' .-. p))
 
-instance  AffineSpace Double where
-  type Diff Double = Double
-  (.-.) =  (-)
-  (.+^) =  (+)
 
-instance  AffineSpace Float where
-  type Diff Float = Float
-  (.-.) =  (-)
-  (.+^) =  (+)
+#define ScalarTypeCon(con,t) \
+  instance con => AffineSpace (t) where \
+    { type Diff (t) = t \
+    ; (.-.) = (-) \
+    ; (.+^) = (+) }
 
-instance Integral a => AffineSpace (Ratio a) where
-  type Diff (Ratio a) = Ratio a
-  (.-.) = (-)
-  (.+^) = (+)
+#define ScalarType(t) ScalarTypeCon((),t)
+
+ScalarType(Double)
+ScalarType(CDouble)
+ScalarType(Float)
+ScalarType(CFloat)
+ScalarTypeCon(Integral a,Ratio a)
 
 instance (AffineSpace p, AffineSpace q) => AffineSpace (p,q) where
   type Diff (p,q)   = (Diff p, Diff q)
diff --git a/src/Data/Basis.hs b/src/Data/Basis.hs
--- a/src/Data/Basis.hs
+++ b/src/Data/Basis.hs
@@ -1,9 +1,5 @@
--- WARNING: this module depends on type families working fairly well, and
--- requires ghc version at least 6.9.  I didn't find a way to specify that
--- dependency in the .cabal.
--- 
 {-# LANGUAGE TypeOperators, TypeFamilies, UndecidableInstances
-  , FlexibleInstances, MultiParamTypeClasses
+  , FlexibleInstances, MultiParamTypeClasses, CPP
   #-}
 {-# OPTIONS_GHC -Wall -fno-warn-orphans #-}
 ----------------------------------------------------------------------
@@ -24,6 +20,7 @@
 -- import Control.Applicative ((<$>))
 import Control.Arrow (first)
 import Data.Ratio
+import Foreign.C.Types (CFloat, CDouble)
 -- import Data.Either
 
 import Data.VectorSpace
@@ -62,23 +59,20 @@
 -- However, I don't seem to use recompose anywhere.
 -- I don't even use basisValue or decompose.
 
-instance HasBasis Float where
-  type Basis Float = ()
-  basisValue ()    = 1
-  decompose s      = [((),s)]
-  decompose' s     = const s
+#define ScalarTypeCon(con,t) \
+  instance con => HasBasis (t) where \
+    { type Basis (t) = () \
+    ; basisValue ()  = 1 \
+    ; decompose s    = [((),s)] \
+    ; decompose' s   = const s }
 
-instance HasBasis Double where
-  type Basis Double = ()
-  basisValue ()     = 1
-  decompose s       = [((),s)]
-  decompose' s      = const s
+#define ScalarType(t) ScalarTypeCon((),t)
 
-instance Integral a => HasBasis (Ratio a) where
-  type Basis (Ratio a) = ()
-  basisValue ()        = 1
-  decompose s          = [((),s)]
-  decompose' s         = const s
+ScalarType(Float)
+ScalarType(CFloat)
+ScalarType(Double)
+ScalarType(CDouble)
+ScalarTypeCon(Integral a, Ratio a)
 
 instance ( HasBasis u, s ~ Scalar u
          , HasBasis v, s ~ Scalar v )
diff --git a/src/Data/VectorSpace.hs b/src/Data/VectorSpace.hs
--- a/src/Data/VectorSpace.hs
+++ b/src/Data/VectorSpace.hs
@@ -33,6 +33,7 @@
 
 import Control.Applicative (liftA2)
 import Data.Complex hiding (magnitude)
+import Foreign.C.Types (CSChar, CInt, CShort, CLong, CLLong, CIntMax, CFloat, CDouble)
 import Data.Ratio
 
 import Data.AdditiveGroup
@@ -98,6 +99,14 @@
 ScalarType(Integer)
 ScalarType(Double)
 ScalarType(Float)
+ScalarType(CSChar)
+ScalarType(CInt)
+ScalarType(CShort)
+ScalarType(CLong)
+ScalarType(CLLong)
+ScalarType(CIntMax)
+ScalarType(CDouble)
+ScalarType(CFloat)
 
 instance Integral a => VectorSpace (Ratio a) where
   type Scalar (Ratio a) = Ratio a
diff --git a/vector-space.cabal b/vector-space.cabal
--- a/vector-space.cabal
+++ b/vector-space.cabal
@@ -1,5 +1,5 @@
 Name:                vector-space
-Version:             0.8.5
+Version:             0.8.6
 Cabal-Version:       >= 1.6
 Synopsis:            Vector & affine spaces, linear maps, and derivatives
 Category:            math
@@ -11,7 +11,7 @@
   (scalars, vectors, matrices, ...).
   .
   /Warning/: this package depends on type families working fairly well,
-  and requires ghc version at least 6.9.
+  requiring GHC version at least 6.9.
   .
   Project wiki page: <http://haskell.org/haskellwiki/vector-space>
   .
