diff --git a/CHANGELOG.txt b/CHANGELOG.txt
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,11 @@
+0.2.1 Thomas Gibson-Robinson <thomas.gibsonrobinson@gmail.com> 2012-01-18
+    * Fixed a bug in the typechecker that prevented certain (uncommon)
+      functions that took function arguments that were polymorphic in dot from
+      being type checked.
+    * Exposed ErrorMessages to allow clients to present them more usefully.
+    * Added location information to renamer errors.
+    * Made compatible with GHC 7.0.4.
+
 0.2.0 Thomas Gibson-Robinson <thomas.gibsonrobinson@gmail.com> 2012-01-04
     * Enhanced the evaluator:
         * Dot is not handled correctly;
diff --git a/libcspm.cabal b/libcspm.cabal
--- a/libcspm.cabal
+++ b/libcspm.cabal
@@ -32,7 +32,7 @@
     from @x.y.z@ to @x.y'.z'@) will not be backwards compatible, but should be
     relatively easy to port to. Major changes (i.e. from @x.y.z@ to @x'.y'.z'@)
     will not be backwards compatible and may include large API redesigns.
-Version: 0.2.0
+Version: 0.2.1
 Extra-source-files: 
     README.md,
     CHANGELOG.txt
@@ -44,7 +44,7 @@
 Source-repository this
     type:     git
     location: https://github.com/tomgr/libcspm
-    tag: release-0.2.0
+    tag: release-0.2.1
 
 Library
     Build-Depends:
diff --git a/src/CSPM.hs b/src/CSPM.hs
--- a/src/CSPM.hs
+++ b/src/CSPM.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
 -- | This module provides the main high-level interface to the library 
 -- functionality. It does this through a monadic interface, mainly due to the
 -- fact that several of the components require the use of the IO monad. It is
diff --git a/src/CSPM/Compiler/Events.hs b/src/CSPM/Compiler/Events.hs
--- a/src/CSPM/Compiler/Events.hs
+++ b/src/CSPM/Compiler/Events.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
 module CSPM.Compiler.Events (
     Event(..),
     EventSet
diff --git a/src/CSPM/Compiler/Map.hs b/src/CSPM/Compiler/Map.hs
--- a/src/CSPM/Compiler/Map.hs
+++ b/src/CSPM/Compiler/Map.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
 module CSPM.Compiler.Map ( 
     Map,
     lookup,
diff --git a/src/CSPM/Renamer.hs b/src/CSPM/Renamer.hs
--- a/src/CSPM/Renamer.hs
+++ b/src/CSPM/Renamer.hs
@@ -33,7 +33,8 @@
 type RenameEnvironment = HM.HierarchicalMap UnRenamedName Name
 
 data RenamerState = RenamerState {
-        environment :: RenameEnvironment
+        environment :: RenameEnvironment,
+        srcSpan :: SrcSpan
     }
 
 type RenamerMonad = StateT RenamerState IO
@@ -44,7 +45,8 @@
     let bs = map (\b -> (UnQual (OccName (stringName b)), name b)) (builtins False)
     return $ RenamerState {
         -- We insert a new layer to allow builtins to be overridden
-        environment = HM.newLayer (HM.updateMulti HM.new bs)
+        environment = HM.newLayer (HM.updateMulti HM.new bs),
+        srcSpan = Unknown
     }
 
 -- | Runs the renamer starting at the given state and returning the given state.
@@ -80,6 +82,9 @@
         environment = HM.update (environment st) rn n
     })
 
+setSrcSpan :: SrcSpan -> RenamerMonad ()
+setSrcSpan loc = modify (\ st -> st { srcSpan = loc })
+
 -- **********************
 -- Renaming Class and basic instances
 
@@ -94,7 +99,9 @@
     rename Nothing = return Nothing
 
 instance Renamable e1 e2 => Renamable (Annotated a e1) (Annotated a e2) where
-    rename (An a b e) = rename e >>= return . An a b
+    rename (An a b e) = do
+        setSrcSpan a
+        rename e >>= return . An a b
 
 instance (Renamable e1 e2, Renamable e1' e2') => Renamable (e1, e1') (e2, e2') where
     rename (a, b) = do
@@ -273,8 +280,9 @@
         nameLocMap = 
             concatMap (\(ns, d) -> [(n, loc d) | n <- ns])  (zip fvss aps)
     
+    loc <- gets srcSpan
     if duped /= [] then
-        throwSourceError (map (mkErrorMessage Unknown) (duplicatedDefinitionsMessage nameLocMap))
+        throwSourceError (map (mkErrorMessage loc) (duplicatedDefinitionsMessage nameLocMap))
     else return ()
 
 -- | Rename a variable on the left hand side of a definition.
@@ -285,9 +293,10 @@
 renameVarRHS :: UnRenamedName -> RenamerMonad Name
 renameVarRHS n = do
     mn <- lookupName n
+    loc <- gets srcSpan
     case mn of
         Just x -> return x
-        Nothing -> throwSourceError [mkErrorMessage Unknown (varNotInScopeMessage n)]
+        Nothing -> throwSourceError [mkErrorMessage loc (varNotInScopeMessage n)]
 
 renameFields :: [PField] -> RenamerMonad a -> RenamerMonad ([TCField], a)
 renameFields fs inner = do
diff --git a/src/CSPM/TypeChecker/Decl.hs b/src/CSPM/TypeChecker/Decl.hs
--- a/src/CSPM/TypeChecker/Decl.hs
+++ b/src/CSPM/TypeChecker/Decl.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
+{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-}
 module CSPM.TypeChecker.Decl (typeCheckDecls) where
 
 import Control.Monad
diff --git a/src/CSPM/TypeChecker/Expr.hs b/src/CSPM/TypeChecker/Expr.hs
--- a/src/CSPM/TypeChecker/Expr.hs
+++ b/src/CSPM/TypeChecker/Expr.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
+{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-}
 module CSPM.TypeChecker.Expr () where
 
 import Control.Monad
diff --git a/src/CSPM/TypeChecker/Pat.hs b/src/CSPM/TypeChecker/Pat.hs
--- a/src/CSPM/TypeChecker/Pat.hs
+++ b/src/CSPM/TypeChecker/Pat.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
+{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-}
 module CSPM.TypeChecker.Pat () where
 
 import CSPM.DataStructures.Names
diff --git a/src/CSPM/TypeChecker/Unification.hs b/src/CSPM/TypeChecker/Unification.hs
--- a/src/CSPM/TypeChecker/Unification.hs
+++ b/src/CSPM/TypeChecker/Unification.hs
@@ -546,6 +546,10 @@
 evaluateDots (TSet t) = evaluateDots t >>= return . TSet
 evaluateDots (TSeq t) = evaluateDots t >>= return . TSeq
 evaluateDots (TTuple ts) = mapM evaluateDots ts >>= return . TTuple
+evaluateDots (TFunction t1 t2) = do
+    t1' <- mapM evaluateDots t1
+    t2' <- evaluateDots t2
+    return $ TFunction t1' t2'
 evaluateDots t = do
     ts <- typeToDotList t
     ts <- mapM (\t -> compress t >>= return . toNormalForm) ts
diff --git a/src/Util/Exception.hs b/src/Util/Exception.hs
--- a/src/Util/Exception.hs
+++ b/src/Util/Exception.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE DeriveDataTypeable, FlexibleInstances #-}
+{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, TypeSynonymInstances #-}
 module Util.Exception (
     Exception,
     LibCSPMException(..),
@@ -6,7 +6,7 @@
     MonadIOException(..),
     panic, throwSourceError,
     mkErrorMessage, mkWarningMessage, 
-    ErrorMessage, ErrorMessages,
+    ErrorMessage(..), ErrorMessages,
 )
 where
 
