diff --git a/src/Data/Basis.hs b/src/Data/Basis.hs
--- a/src/Data/Basis.hs
+++ b/src/Data/Basis.hs
@@ -102,14 +102,14 @@
 nest3 (a,b,c) = (a,(b,c))
 
 
-instance (Eq a, HasBasis u) => HasBasis (a -> u) where
-  type Basis (a -> u) = (a, Basis u)
-  basisValue (a,b) = f
-    where f a' | a == a'   = bv
-               | otherwise = zeroV
-          bv = basisValue b
-  decompose = error "decompose: not defined on functions"
-  decompose' g (a,b) = decompose' (g a) b
+-- instance (Eq a, HasBasis u) => HasBasis (a -> u) where
+--   type Basis (a -> u) = (a, Basis u)
+--   basisValue (a,b) = f
+--     where f a' | a == a'   = bv
+--                | otherwise = zeroV
+--           bv = basisValue b
+--   decompose = error "decompose: not defined on functions"
+--   decompose' g (a,b) = decompose' (g a) b
 
 
 -- Simpler but less efficient:
diff --git a/src/Data/VectorSpace.hs b/src/Data/VectorSpace.hs
--- a/src/Data/VectorSpace.hs
+++ b/src/Data/VectorSpace.hs
@@ -30,6 +30,7 @@
   , lerp, magnitudeSq, magnitude, normalized
   ) where
 
+import Control.Applicative (liftA2)
 import Data.Complex hiding (magnitude)
 
 import Data.AdditiveGroup
@@ -160,16 +161,28 @@
   type Scalar (Maybe v) = Scalar v
   (*^) s = fmap (s *^)
 
+-- instance VectorSpace v => VectorSpace (a -> v) where
+--   type Scalar (a -> v) = Scalar v
+--   (*^) s = fmap (s *^)
+
+-- No 'InnerSpace' instance for @a -> v@.
+
+-- Or the following definition, which is useful for the higher-order
+-- shading dsel in Shady (borrowed from Vertigo).
+
 instance VectorSpace v => VectorSpace (a -> v) where
-  type Scalar (a -> v) = Scalar v
-  (*^) s = fmap (s *^)
+  type Scalar (a -> v) = a -> Scalar v
+  (*^) = liftA2 (*^)
 
-instance (HasTrie a, VectorSpace v)
-         => VectorSpace (a :->: v) where
+instance InnerSpace v => InnerSpace (a -> v) where
+  (<.>) = liftA2 (<.>)
+
+
+
+instance (HasTrie a, VectorSpace v) => VectorSpace (a :->: v) where
   type Scalar (a :->: v) = Scalar v
   (*^) s = fmap (s *^)
 
--- No 'InnerSpace' instance for @a -> v@.
 
 
 instance (InnerSpace a, AdditiveGroup (Scalar a)) => InnerSpace (Maybe a) where
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.5.6
+Version:             0.5.7
 Cabal-Version:       >= 1.2
 Synopsis:            Vector & affine spaces, linear maps, and derivatives (requires ghc 6.9 or better)
 Category:            math
