diff --git a/Language/Haskell/TH/ExpandSyns.hs b/Language/Haskell/TH/ExpandSyns.hs
--- a/Language/Haskell/TH/ExpandSyns.hs
+++ b/Language/Haskell/TH/ExpandSyns.hs
@@ -11,6 +11,9 @@
 import Data.Set as Set    
 import Data.Generics
 import Control.Monad
+
+packagename :: String
+packagename = "th-expand-syns"
     
     
 -- Compatibility layer for TH 2.4 vs. 2.3
@@ -58,16 +61,16 @@
   i <- reify n
   case i of
     TyConI d -> return (decIsSyn d)
-    ClassI _ -> return Nothing
-    PrimTyConI _ _ _ -> return Nothing
-    _ -> fail ("nameIsSyn: unexpected info: "++show(n,i))
+    ClassI {} -> return Nothing
+    PrimTyConI {} -> return Nothing
+    _ -> fail (packagename ++ ": nameIsSyn: unexpected Info: "++show(n,i))
 
 decIsSyn :: Dec -> Maybe SynInfo
-decIsSyn (ClassD _ _ _ _ _) = Nothing
-decIsSyn (DataD _ _ _ _ _) = Nothing
-decIsSyn (NewtypeD _ _ _ _ _) = Nothing
+decIsSyn (ClassD {}) = Nothing
+decIsSyn (DataD {}) = Nothing
+decIsSyn (NewtypeD {}) = Nothing
 decIsSyn (TySynD _ vars t) = Just (tyVarBndrGetName <$> vars,t)
-decIsSyn x = error ("decIsSyn: unexpected dec: "++show x)
+decIsSyn x = error (packagename ++ ": decIsSyn: unexpected Dec: "++show x)
 
 -- | Expands type synonyms...
 expandSyns :: Type -> Q Type
@@ -90,7 +93,7 @@
         return ([],ForallT ns cxt' t')
 
       go acc x@(ForallT _ _ _) = 
-          fail ("Unexpected application of the local quantification: "
+          fail (packagename++": Unexpected application of the local quantification: "
                 ++show x
                 ++"\n    (to the arguments "++show acc++")")
                                   
@@ -106,7 +109,7 @@
               Nothing -> return (acc,x)
               Just (vars,body) ->
                   if length acc < length vars
-                  then fail ("expandSyns: Underapplied type synonym:"++show(n,acc))
+                  then fail (packagename++": expandSyns: Underapplied type synonym:"++show(n,acc))
                   else 
                       let
                           substs = zip vars acc
diff --git a/testing/Main.hs b/testing/Main.hs
--- a/testing/Main.hs
+++ b/testing/Main.hs
@@ -1,9 +1,9 @@
 {-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE RankNTypes #-}
 {-# LANGUAGE KindSignatures #-}
-module Tests where
+module Main where
 
-import ExpandSyns
+import Language.Haskell.TH.ExpandSyns
 import Language.Haskell.TH
 import Language.Haskell.TH.Syntax
     
@@ -14,7 +14,15 @@
 type C f = f Integer
 
 
-foo = $(    lift . show 
-            =<< expandSyns 
-            =<< [t| (forall a. Show a => a -> B [] -> (Int,C [])) |]
-       )
+test1 = $(
+    do
+      t1 <-       [t| forall a. Show a => a -> B []            -> (Int,C []) |]
+      expected <- [t| forall a. Show a => a -> (forall x. [] x) -> (Int,[] Integer) |]
+      report False ("expected: "++pprint expected)
+      actual <- expandSyns t1
+      report False ("actual: "++pprint actual)
+      if (pprint expected==pprint actual) then [| putStrLn "Ok" |] else [| error "expected /= actual" |] 
+
+ )
+
+main = test1
diff --git a/th-expand-syns.cabal b/th-expand-syns.cabal
--- a/th-expand-syns.cabal
+++ b/th-expand-syns.cabal
@@ -1,5 +1,5 @@
 name:                th-expand-syns
-version:             0.1.0.1
+version:             0.1.1.0
 synopsis:            Expands type synonyms in Template Haskell ASTs
 description:         Expands type synonyms in Template Haskell ASTs
 category:            Template Haskell
