diff --git a/Generics/RepLib/Derive.hs b/Generics/RepLib/Derive.hs
--- a/Generics/RepLib/Derive.hs
+++ b/Generics/RepLib/Derive.hs
@@ -28,7 +28,7 @@
 
 
 module Generics.RepLib.Derive (
-	derive, derive_abstract
+  derive, derive_abstract
 ) where
 
 import Generics.RepLib.R
@@ -157,9 +157,12 @@
 extractParamEqualities tyVars = filterWith extractLHSVars
                               . filterWith extractEq
   where extractEq :: Pred -> Maybe (Type, Type)
-        extractEq (EqualP ty1 ty2)  = Just (ty1, ty2)
-        extractEq _                 = Nothing
-
+#if MIN_VERSION_template_haskell(2,10,0)
+        extractEq (AppT (AppT EqualityT ty1) ty2) = Just (ty1, ty2)
+#else
+        extractEq (EqualP ty1 ty2)                = Just (ty1, ty2)
+#endif
+        extractEq _                               = Nothing
         extractLHSVars (VarT n, t2) | any ((==n) . tyVarBndrName) tyVars = Just (n,t2)
         extractLHSVars _            = Nothing
         -- Note, assuming here that equalities involving type parameters
@@ -280,13 +283,17 @@
                      Conc -> [| Data $(repDT nm paramNames)
                                      (catMaybes $(return (ListE rcons))) |]
                      Abs  -> [| Abstract $(repDT nm paramNames) |]
+#if MIN_VERSION_template_haskell(2,10,0)
+                  let ctx = map (\p -> AppT (ConT (mkName "Rep")) (VarT p)) paramNames
+#else
                   let ctx = map (\p -> ClassP (mkName "Rep") [VarT p]) paramNames
+#endif
                   let rTypeName :: Name
                       rTypeName = rName n
                       rSig :: Dec
                       rSig = SigD rTypeName (ForallT (map PlainTV paramNames)
                                                      ctx ((ConT (mkName "R"))
-         	                                          `AppT` ty))
+                                                          `AppT` ty))
                       rType :: Dec
                       rType = ValD (VarP rTypeName) (NormalB body) []
                   let inst  = InstanceD ctx ((ConT (mkName "Rep")) `AppT` ty)
@@ -418,7 +425,11 @@
                        Nothing -> VarT a
 
       satInst  = InstanceD
+#if MIN_VERSION_template_haskell(2,10,0)
+                   (map (\x -> AppT (ConT ''Sat) x) (cpPayloadElts ctxParam))
+#else
                    (map (ClassP ''Sat . (:[])) (cpPayloadElts ctxParam))
+#endif
                    satInstHead
                    [ValD (VarP dictNm)
                          (NormalB (LamE (replicate (length eqs) (ConP 'Refl []))
@@ -469,7 +480,11 @@
                        Abs  -> return []
 
      r1Ty <- [t| $(conT $ ''R1) $(varT ctx) $(return ty) |]
+#if MIN_VERSION_template_haskell(2,10,0)
+     let ctxRep = map (\p -> AppT (ConT ''Rep) (VarT p)) paramNames
+#else
      let ctxRep = map (\p -> ClassP (''Rep) [VarT p]) paramNames
+#endif
          rSig = SigD rTypeName
                   (ForallT
                     (map PlainTV (ctx : paramNames))
@@ -491,8 +506,13 @@
      -- equality proofs
      (ctxParams', satClasses) <- genSatClasses ctxParams
      let mkCtxRec c = case cpSat c of
+#if MIN_VERSION_template_haskell(2,10,0)
+                        Nothing    -> map (\x -> AppT (ConT ''Sat) x) (cpPayloadElts c)
+                        Just (s,_) -> [foldl AppT (ConT s) (map VarT (cpCtxName c : paramNames))]
+#else
                         Nothing    -> map (ClassP ''Sat . (:[])) (cpPayloadElts c)
                         Just (s,_) -> [ClassP s (map VarT (cpCtxName c : paramNames))]
+#endif
          ctxRec = nub $ concatMap mkCtxRec ctxParams'
          mkDictArg c = case cpSat c of
                          Just (_,dn) -> VarE dn
@@ -655,7 +675,11 @@
 deriveResultCon n c a bs =
     ForallC
       (map PlainTV bs)
+#if MIN_VERSION_template_haskell(2,10,0)
+      (map (\x -> AppT (ConT ''Rep) (VarT x)) bs)
+#else
       (map (ClassP ''Rep . (:[]) . VarT) bs)
+#endif
       (NormalC (mkName $ "Result" ++ show n)
         [(NotStrict, deriveResultEq c a bs)]
       )
diff --git a/Generics/RepLib/Lib.hs b/Generics/RepLib/Lib.hs
--- a/Generics/RepLib/Lib.hs
+++ b/Generics/RepLib/Lib.hs
@@ -10,7 +10,6 @@
 -- License     :  BSD
 --
 -- Maintainer  :  sweirich@cis.upenn.edu
--- Stability   :  experimental
 -- Portability :  non-portable
 --
 -- A library of type-indexed functions
@@ -336,10 +335,10 @@
 
 -- For example
 -- @ instance Fold [] where
---	 foldRight op = rreduceR1 (rList1 (RreduceD { rreduceD = op })
---					  (RreduceD { rreduceD = foldRight op }))
---	 foldLeft op = lreduceR1 (rList1 (LreduceD  { lreduceD = op })
---					 (LreduceD { lreduceD = foldLeft op }))
+--    foldRight op = rreduceR1 (rList1 (RreduceD { rreduceD = op })
+--                             (RreduceD { rreduceD = foldRight op }))
+--    foldLeft op = lreduceR1 (rList1 (LreduceD  { lreduceD = op })
+--                            (LreduceD { lreduceD = foldLeft op }))
 -- @
 
 instance Rreduce b a => Sat (RreduceD b a) where
@@ -382,8 +381,8 @@
 -- | All of the functions below are defined using instances
 -- of the following class
 class Fold f where
-	 foldRight :: Rep a => (a -> b -> b) -> f a -> b -> b
-	 foldLeft  :: Rep a => (b -> a -> b) -> b -> f a -> b
+  foldRight :: Rep a => (a -> b -> b) -> f a -> b -> b
+  foldLeft  :: Rep a => (b -> a -> b) -> b -> f a -> b
 
 -- | Fold a bindary operation left over a datastructure
 crush      :: (Rep a, Fold t) => (a -> a -> a) -> a -> t a -> a
@@ -432,14 +431,14 @@
 
 
 instance Fold [] where
-	 foldRight op = rreduceR1 (rList1 (RreduceD { rreduceD = op })
-					  (RreduceD { rreduceD = foldRight op }))
-	 foldLeft op = lreduceR1 (rList1 (LreduceD  { lreduceD = op })
-					 (LreduceD { lreduceD = foldLeft op }))
+  foldRight op = rreduceR1 (rList1 (RreduceD { rreduceD = op })
+                           (RreduceD { rreduceD = foldRight op }))
+  foldLeft op = lreduceR1 (rList1 (LreduceD  { lreduceD = op })
+                          (LreduceD { lreduceD = foldLeft op }))
 
 instance Fold Set where
-	 foldRight op x b = foldRight op (Set.toList x) b
-	 foldLeft op b x = foldLeft op b (Set.toList x)
+  foldRight op x b = foldRight op (Set.toList x) b
+  foldLeft op b x = foldLeft op b (Set.toList x)
 
 instance Fold (Map k) where
   foldRight op x b = foldRight op (Map.elems x) b
diff --git a/Generics/RepLib/PreludeLib.hs b/Generics/RepLib/PreludeLib.hs
--- a/Generics/RepLib/PreludeLib.hs
+++ b/Generics/RepLib/PreludeLib.hs
@@ -36,7 +36,7 @@
 --   >
 --   > instance Show T where
 --   >   showsPrec = showsPrecR1 rep1   -- showsPrecR1 is defined in this module
-													 --
+--
 --  * This library also serves as a model for generic functions that are
 -- slight modifications to these prelude operations. For example, if you
 -- wanted to define reverse lexicographic ordering or an XML pretty
@@ -153,14 +153,14 @@
 data ShowD a = ShowD { showsPrecD :: Int -> a -> ShowS }
 
 instance Show a => Sat (ShowD a) where
-	 dict = ShowD { showsPrecD = showsPrec }
+  dict = ShowD { showsPrecD = showsPrec }
 
 getFixity :: Emb a b -> Int
 getFixity c = case fixity c of
-				    Nonfix   -> 0
-				    Infix  i -> i
-				    Infixl i -> i
-				    Infixr i -> i
+               Nonfix   -> 0
+               Infix  i -> i
+               Infixl i -> i
+               Infixr i -> i
 
 -- | Minimal completion of the show class
 showsPrecR1 :: R1 ShowD a ->
@@ -168,13 +168,13 @@
                a    -> -- value to be shown
                ShowS
 showsPrecR1 (Data1 (DT _ _) cons) = \p v ->
-	case (findCon cons v) of
+    case (findCon cons v) of
       Val c rec kids ->
           case (labels c) of
             Just labs -> par $ showString (name c) .
                                showString "{" .
-	 		       showRecord rec kids labs .
-			       showString "}"
+                               showRecord rec kids labs .
+                               showString "}"
             Nothing   -> par $ showString (name c) .
                                maybespace .
                                showKids rec kids
@@ -191,7 +191,7 @@
                 showRecord (r :+: rs) (a :*: aa) (l : ls) =
                     showString l . ('=':) . showKid r a . showString (", ") . showRecord rs aa ls
                 showRecord _ _ _ = error ("Incorrect representation: " ++
-				          "wrong number of labels in record type")
+                                          "wrong number of labels in record type")
 
                 showKids :: MTup ShowD l -> l -> ShowS
                 showKids MNil Nil = id
diff --git a/Generics/RepLib/R.hs b/Generics/RepLib/R.hs
--- a/Generics/RepLib/R.hs
+++ b/Generics/RepLib/R.hs
@@ -139,7 +139,7 @@
 rUnitEmb :: Emb Nil ()
 rUnitEmb = Emb { to = \Nil -> (),
                  from = \() -> Just Nil,
-			        labels = Nothing,
+                 labels = Nothing,
                  name = "()",
                  fixity = Nonfix }
 
@@ -156,7 +156,7 @@
 
 rTup2 :: forall a b. (Rep a, Rep b) => R (a,b)
 rTup2 = let args =  ((rep :: R a) :+: (rep :: R b) :+: MNil) in
-			Data (DT "(,)" args) [ Con rPairEmb args ]
+            Data (DT "(,)" args) [ Con rPairEmb args ]
 
 rPairEmb :: Emb (a :*: b :*: Nil) (a,b)
 rPairEmb =
@@ -179,7 +179,7 @@
                            []    -> Just Nil,
                   labels = Nothing,
                   name = "[]",
-		  fixity = Nonfix
+                  fixity = Nonfix
                  }
 
 rConsEmb :: Emb (a :*: [a] :*: Nil) [a]
@@ -191,7 +191,7 @@
                     []        -> Nothing,
             labels = Nothing,
             name = ":",
-	    fixity = Nonfix -- ???
+            fixity = Nonfix -- ???
           }
 
 instance Rep a => Rep [a] where
diff --git a/Generics/RepLib/RepAux.hs b/Generics/RepLib/RepAux.hs
--- a/Generics/RepLib/RepAux.hs
+++ b/Generics/RepLib/RepAux.hs
@@ -280,8 +280,9 @@
 gmapQ :: forall a r. Rep a => Query r -> a -> [r]
 gmapQ q =
   case (rep :: R a) of
-    (Data _ cons) -> \x -> case (findCon cons x) of
-		Val _ reps ys -> mapQ_l (const q) reps ys
+    (Data _ cons) -> \x ->
+      case (findCon cons x) of
+       Val _ reps ys -> mapQ_l (const q) reps ys
     _ -> const []
 
 
@@ -290,9 +291,10 @@
 
 gmapM   :: forall a m. (Rep a, Monad m) => MapM m -> a -> m a
 gmapM m = case (rep :: R a) of
-   (Data _ cons) -> \x -> case (findCon cons x) of
-     Val emb reps ys -> do l <- mapM_l (const m) reps ys
-                           return (to emb l)
+   (Data _ cons) -> \x ->
+     case (findCon cons x) of
+      Val emb reps ys -> do l <- mapM_l (const m) reps ys
+                            return (to emb l)
    _ -> return
 
 
@@ -311,16 +313,18 @@
 gmapQ1 :: forall a ctx r. (Rep1 ctx a) => Query1 ctx r -> a -> [r]
 gmapQ1 q  =
   case (rep1 :: R1 ctx a) of
-    (Data1 _ cons) -> \x -> case (findCon cons x) of
-		Val _ recs kids -> mapQ_l q recs kids
+    (Data1 _ cons) -> \x ->
+      case (findCon cons x) of
+       Val _ recs kids -> mapQ_l q recs kids
     _ -> const []
 
 type MapM1 ctx m = forall a. Rep a => ctx a -> a -> m a
 gmapM1  :: forall a ctx m. (Rep1 ctx a, Monad m) => MapM1 ctx m -> a -> m a
 gmapM1 m = case (rep1 :: R1 ctx a) of
-   (Data1 _ cons) -> \x -> case (findCon cons x) of
-     Val emb rec ys -> do l <- mapM_l m rec ys
-                          return (to emb l)
+   (Data1 _ cons) -> \x ->
+     case (findCon cons x) of
+      Val emb rec ys -> do l <- mapM_l m rec ys
+                           return (to emb l)
    _ -> return
 
 -------------- Spine from SYB Reloaded ---------------------------
@@ -329,20 +333,20 @@
 infixr 7 :::
 
 data Spine a where
-	 Constr :: a -> Spine a
-	 (:<>)  :: Spine (a -> b) -> Typed a -> Spine b
+  Constr :: a -> Spine a
+  (:<>)  :: Spine (a -> b) -> Typed a -> Spine b
 
 toSpineR :: R a -> a -> Spine a
 toSpineR (Data _ cons) a =
-	 case (findCon cons a) of
-	    Val emb reps kids -> toSpineRl reps kids (to emb)
+  case (findCon cons a) of
+   Val emb reps kids -> toSpineRl reps kids (to emb)
 toSpineR _ a = Constr a
 
 toSpineRl :: MTup R l -> l -> (l -> a) -> Spine a
 toSpineRl MNil Nil into = Constr (into Nil)
 toSpineRl (ra :+: rs) (a :*: l) into =
-	 (toSpineRl rs l into') :<> (a ::: ra)
-		  where into' tl1 x1 = into (x1 :*: tl1)
+  (toSpineRl rs l into') :<> (a ::: ra)
+   where into' tl1 x1 = into (x1 :*: tl1)
 
 toSpine :: Rep a => a -> Spine a
 toSpine = toSpineR rep
diff --git a/Generics/RepLib/SYB/Aliases.hs b/Generics/RepLib/SYB/Aliases.hs
--- a/Generics/RepLib/SYB/Aliases.hs
+++ b/Generics/RepLib/SYB/Aliases.hs
@@ -19,36 +19,36 @@
 -----------------------------------------------------------------------------
 module Generics.RepLib.SYB.Aliases (
 
-	-- * Combinators to \"make\" generic functions via cast
-	mkT, mkQ, mkM, mkMp, mkR,
-	ext0, extT, extQ, extM, extMp, extB, extR,
+   -- * Combinators to \"make\" generic functions via cast
+   mkT, mkQ, mkM, mkMp, mkR,
+   ext0, extT, extQ, extM, extMp, extB, extR,
 
-	-- * Type synonyms for generic function types
-	GenericT,
-	GenericQ,
-	GenericM,
-	GenericB,
-	GenericR,
+   -- * Type synonyms for generic function types
+   GenericT,
+   GenericQ,
+   GenericM,
+   GenericB,
+   GenericR,
    Generic,
    Generic'(..),
    GenericT'(..),
    GenericQ'(..),
    GenericM'(..),
 
-	-- * Inredients of generic functions
-	orElse,
+   -- * Inredients of generic functions
+   orElse,
 
-	-- * Function combinators on generic functions
-	recoverMp,
-	recoverQ,
-	choiceMp,
-	choiceQ
+   -- * Function combinators on generic functions
+   recoverMp,
+   recoverQ,
+   choiceMp,
+   choiceQ
 
-	-- * Type extension for unary type constructors
---	ext1T,
---	ext1M,
---	ext1Q,
---	ext1R
+   -- * Type extension for unary type constructors
+-- ext1T,
+-- ext1M,
+-- ext1Q,
+-- ext1R
 
   ) where
 
@@ -62,8 +62,8 @@
 
 ------------------------------------------------------------------------------
 --
---	Combinators to "make" generic functions
---	We use type-safe cast in a number of ways to make generic functions.
+-- Combinators to "make" generic functions
+-- We use type-safe cast in a number of ways to make generic functions.
 --
 ------------------------------------------------------------------------------
 
@@ -209,7 +209,7 @@
 
 ------------------------------------------------------------------------------
 --
---	Type synonyms for generic function types
+-- Type synonyms for generic function types
 --
 ------------------------------------------------------------------------------
 
@@ -258,9 +258,9 @@
 
 
 -- | Other first-class polymorphic wrappers
-newtype GenericT'   = GT { unGT :: Rep a => a -> a }
+newtype GenericT'   = GT { unGT :: forall a. Rep a => a -> a }
 newtype GenericQ' r = GQ { unGQ :: GenericQ r }
-newtype GenericM' m = GM { unGM :: Rep a => a -> m a }
+newtype GenericM' m = GM { unGM :: forall a. Rep a => a -> m a }
 
 
 -- | Left-biased choice on maybies
@@ -305,7 +305,7 @@
 
 ------------------------------------------------------------------------------
 --
---	Type extension for unary type constructors
+-- Type extension for unary type constructors
 --
 ------------------------------------------------------------------------------
 
@@ -355,7 +355,7 @@
 
 ------------------------------------------------------------------------------
 --
---	Type constructors for type-level lambdas
+-- Type constructors for type-level lambdas
 --
 ------------------------------------------------------------------------------
 
diff --git a/Generics/RepLib/SYB/Schemes.hs b/Generics/RepLib/SYB/Schemes.hs
--- a/Generics/RepLib/SYB/Schemes.hs
+++ b/Generics/RepLib/SYB/Schemes.hs
@@ -26,17 +26,17 @@
    everywhereBut,
    everywhereM,
 --   somewhere,
-	everything,
-	listify,
+   everything,
+   listify,
    something,
-	synthesize,
-	gsize,
-	glength,
-	gdepth,
-	gcount,
-	gnodecount,
-	gtypecount,
-	gfindtype
+   synthesize,
+   gsize,
+   glength,
+   gdepth,
+   gcount,
+   gnodecount,
+   gtypecount,
+   gfindtype
 
  ) where
 
diff --git a/Generics/RepLib/Unify.hs b/Generics/RepLib/Unify.hs
--- a/Generics/RepLib/Unify.hs
+++ b/Generics/RepLib/Unify.hs
@@ -1,7 +1,11 @@
-{-# LANGUAGE UndecidableInstances, OverlappingInstances, IncoherentInstances,
+{-# LANGUAGE UndecidableInstances, IncoherentInstances,
     ExistentialQuantification, ScopedTypeVariables, EmptyDataDecls,
-    MultiParamTypeClasses, FlexibleInstances, FlexibleContexts
+    MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, CPP
   #-}
+#if MIN_VERSION_template_haskell(2,10,0)
+#else
+{-# LANGUAGE OverlappingInstances #-}
+#endif
 {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}
 
 -----------------------------------------------------------------------------
@@ -27,7 +31,11 @@
 import Generics.RepLib.RepAux
 import Generics.RepLib.PreludeReps()
 import Control.Monad.State
+#if MIN_VERSION_transformers(0,4,0)
+import Control.Monad.Except
+#else
 import Control.Monad.Error
+#endif
 
 data Proxy a
 
@@ -47,12 +55,16 @@
 
 
 -- Error/State monad for unification. This version does not abstract the monad.
+#if MIN_VERSION_transformers(0,4,0)
+type UM n a b = ExceptT UnifyError (State (UnificationState n a)) b
+#else
 type UM n a b = ErrorT UnifyError (State (UnificationState n a)) b
+#endif
 
 
 data UnifySubD n a b = UnifySubD { unifyStepD :: Proxy (n, a) -> b -> b -> UM n a (),
-				   substD:: n -> a -> b -> b,
-				   occursCheckD :: n -> Proxy a -> b -> Bool}
+                                   substD:: n -> a -> b -> b,
+                                   occursCheckD :: n -> Proxy a -> b -> Bool}
 
 instance (Unify n a b, Subst n a b, Occurs n a b) => Sat (UnifySubD n a b) where
     dict = UnifySubD {unifyStepD = unifyStep, substD = subst, occursCheckD = occursCheck}
@@ -60,7 +72,7 @@
 
 data UConstraint n a = forall b. UC (UnifySubD n a b) b b
 data UnificationState n a = UState {uConstraints :: [UConstraint n a],
-				    uSubst :: [(n, a)]}
+                                    uSubst :: [(n, a)]}
 
 
 
@@ -85,11 +97,11 @@
     \ x y ->
        let loop (Con rcd rec : rest) =
               case (from rcd x, from rcd y) of
-	         (Just p1, Just p2) -> addConstraintsRL1 rec dum p1 p2
-		 (Nothing, Nothing) -> loop rest
-		 (_,_) -> throwError (strMsg $ "constructor mismatch when trying to match " ++ show x ++ " = " ++ show y)
-	   in loop cons
-unifyStepR1 _ _ = \_ _ -> throwError (strMsg ("unifyStepR1 unhandled generic type constructor"))
+               (Just p1, Just p2) -> addConstraintsRL1 rec dum p1 p2
+               (Nothing, Nothing) -> loop rest
+               (_,_) -> throwError ("constructor mismatch when trying to match " ++ show x ++ " = " ++ show y)
+        in loop cons
+unifyStepR1 _ _ = \_ _ -> throwError ("unifyStepR1 unhandled generic type constructor")
 
 
 
@@ -101,29 +113,29 @@
 
 unifyStepEq :: (Eq b, Show b) => b -> b -> UM n a ()
 unifyStepEq x y = if x == y
-		    then return ()
-		    else throwError $ strMsg ("unify failed when testing equality for " ++ show x ++ " = " ++ show y)    -- " show x ++ " /= " ++ show y)
+                   then return ()
+                   else throwError $ "unify failed when testing equality for " ++ show x ++ " = " ++ show y    -- " show x ++ " /= " ++ show y
 
 
 -- a a instance
 instance (Eq n, Show n, Show a, HasVar n a, Rep1 (UnifySubD n a) a) => Unify n a a where
     unifyStep (dum :: Proxy (n, a)) (a1::a) a2 =
-	case ((is_var a1) :: Maybe n, (is_var a2) :: Maybe n) of
-	    (Just n1, Just n2) ->  if n1 == n2
-				     then return ()
-				     else addSub n1 ((var n2) :: a);
-	    (Just n1, _) -> addSub n1 a2
-	    (_, Just n2) ->  addSub n2 a1
-	    (_, _) -> unifyStepR1 rep1 dum a1 a2
-	where
+     case ((is_var a1) :: Maybe n, (is_var a2) :: Maybe n) of
+      (Just n1, Just n2) ->  if n1 == n2
+                              then return ()
+                              else addSub n1 ((var n2) :: a);
+      (Just n1, _) -> addSub n1 a2
+      (_, Just n2) ->  addSub n2 a1
+      (_, _) -> unifyStepR1 rep1 dum a1 a2
+     where
         addSub n t = extendSubstitution (n, t)
 
 
 dequeueConstraint :: UM n a (Maybe (UConstraint n a))
 dequeueConstraint = do s <- get
-		       case s of (UState [] _) -> return Nothing
-				 (UState (x : xs) sub) -> do put $ UState xs sub
-							     return $ Just x
+                       case s of (UState [] _) -> return Nothing
+                                 (UState (x : xs) sub) -> do put $ UState xs sub
+                                                             return $ Just x
 
 queueConstraint ::  UConstraint n a -> UM n a ()
 queueConstraint eq = modify (\ (UState xs sub) -> (UState (eq : xs) sub))
@@ -151,7 +163,7 @@
     if (occursCheck n (undefined :: Proxy a) a)
        then throwError $ "occurs check failed when extending sub with " ++ (show n) ++ " = " ++ (show a)
        else do (UState xs sub) <- get
- 	       let sub' = [(n', subst n a a') | (n', a') <- sub]                            -- these might have side effects if we want to handle binding via freshmonad.
+               let sub' = [(n', subst n a a') | (n', a') <- sub]                            -- these might have side effects if we want to handle binding via freshmonad.
                let xs' = [UC d (substD d n a b1) (substD d n a b2) | (UC d b1 b2) <- xs]
                put (UState xs' (asgn : sub'))
 
@@ -164,15 +176,15 @@
 solveUnification :: (HasVar n a, Eq n, Show n, Show a, Rep1 (UnifySubD n a) a) => [(a, a)] -> Maybe [(n, a)]
 solveUnification (eqs :: [(a, a)]) =
     case r of Left e -> error e
-	      Right _ -> Just $ uSubst final
+              Right _ -> Just $ uSubst final
     where
-    (r, final) = runState (runErrorT rwConstraints) (UState cs [])
+    (r, final) = runState (runExceptT rwConstraints) (UState cs [])
     cs = [(UC dict a1 a2) | (a1, a2) <- eqs]
     rwConstraints :: UM n a ()
     rwConstraints = do c <- dequeueConstraint
-		       case c of Just (UC d a1 a2) -> do _ <- unifyStepD d (undefined :: Proxy (n, a)) a1 a2
-							 rwConstraints
-				 Nothing -> return ()
+                       case c of Just (UC d a1 a2) -> do _ <- unifyStepD d (undefined :: Proxy (n, a)) a1 a2
+                                                         rwConstraints
+                                 Nothing -> return ()
 
 
 
@@ -184,15 +196,15 @@
 solveUnification' :: (HasVar n a, Eq n, Show n, Show a, Show b, Rep1 (UnifySubD n a) b) => Proxy (n, a) -> [(b, b)] -> Maybe [(n, a)]
 solveUnification' (dum :: Proxy (n, a)) (eqs :: [(b, b)]) =
     case r of Left e -> error e
-	      Right _ -> Just $ uSubst final
+              Right _ -> Just $ uSubst final
     where
-    (r, final) = runState (runErrorT rwConstraints) (UState cs [])
+    (r, final) = runState (runExceptT rwConstraints) (UState cs [])
     cs = [(UC dict a1 a2) | (a1, a2) <- eqs]
     rwConstraints :: UM n a ()
     rwConstraints = do c <- dequeueConstraint
-		       case c of Just (UC d a1 a2) -> do _ <- unifyStepD d dum a1 a2
-							 rwConstraints
-				 Nothing -> return ()
+                       case c of Just (UC d a1 a2) -> do _ <- unifyStepD d dum a1 a2
+                                                         rwConstraints
+                                 Nothing -> return ()
 
 
 
@@ -219,8 +231,8 @@
 -- a a instance
 instance (Eq a, HasVar a t, Rep1 (UnifySubD a t) t) => Subst a t t where
     subst a t t' = if is_var t' == Just a
-		  then t
-		  else gmapT1 (\cb b -> substD cb a t b) t'
+                    then t
+                    else gmapT1 (\cb b -> substD cb a t b) t'
 
 
 -- Generic Occurs checking
@@ -238,7 +250,7 @@
 -- a a instance.
 instance (Eq n, HasVar n a, Rep1 (UnifySubD n a) a) => Occurs n a a where
     occursCheck n pa a = if is_var a == Just n
-		  then True
-		  else or $ gmapQ1 (\cb b -> occursCheckD cb n pa b) a
+                          then True
+                          else or $ gmapQ1 (\cb b -> occursCheckD cb n pa b) a
 
 
diff --git a/README b/README
--- a/README
+++ b/README
@@ -1,21 +1,17 @@
 -----------------------------------------------------------------------------
 -- 
--- Copyright   :  (c) 2006-2011, RepLib team (see LICENSE)
+-- Copyright   :  (c) 2006-2015, RepLib team (see LICENSE)
 -- License     :  BSD
 -- 
--- Maintainer  :  sweirich@cis.upenn.edu, byorgey@cis.upenn.edu
+-- Maintainer  :  sweirich@cis.upenn.edu
 -- Stability   :  experimental
 -- Portability :  non-portable
 --
 -- RepLib 
 --    a library of derivable type classes based on representation types
 --
---  See http://code.google.com/p/replib/ for more information.
 -----------------------------------------------------------------------------
 
-RepLib has been tested with GHC 7.0.1.  It currently does not compile with 
-GHC 6.12.x or earlier.
-
 This library contains the following modules:
 
 Generics.RepLib.R           - Basic type representations
@@ -35,9 +31,7 @@
 
 To use this library, import RepLib and derive representations of your
 datatypes. The "Lib" module contains a number of type-indexed
-operations that have been predefined.  To see an example of
-automatically deriving the representation of a datatype, see the file
-Main.hs.
+operations that have been predefined.  
 
-Currently, the representations of datatypes with record components,
-GADTs and nested datatypes cannot be automatically derived.
+Currently, representations of datatypes with record components, GADTs and
+nested datatypes cannot be automatically derived.
diff --git a/RepLib.cabal b/RepLib.cabal
--- a/RepLib.cabal
+++ b/RepLib.cabal
@@ -1,5 +1,5 @@
 name:           RepLib
-version:        0.5.3.3
+version:        0.5.3.4
 license:        BSD3
 license-file:   LICENSE
 build-type:     Simple
@@ -8,12 +8,12 @@
                 GHC == 7.2.1,
                 GHC == 7.4.1,
                 GHC == 7.6.1,
-                GHC == 7.8.1
+                GHC == 7.8.1,
+                GHC == 7.8.3,
+                GHC == 7.10.2
 author:         Stephanie Weirich
-maintainer:     Brent Yorgey <byorgey@cis.upenn.edu>
-                Chris Casinghino <ccasin@cis.upenn.edu>
-                Stephanie Weirich <sweirich@cis.upenn.edu>
-homepage:       http://code.google.com/p/replib/
+maintainer:     Stephanie Weirich <sweirich@cis.upenn.edu>
+homepage:       https://github.com/sweirich/replib
 category:       Generics
 extra-source-files: README
 synopsis:       Generic programming library with representation types
@@ -21,14 +21,15 @@
                 polymorphism and other features.
 
 Source-repository head
-  type: svn
-  location: http://replib.googlecode.com/svn/trunk/
+  type: git
+  location: https://github.com/sweirich/replib
 
 Library
   build-depends: base >= 4.3 && < 5,
-                 template-haskell >= 2.4 && < 2.10,
+                 template-haskell >= 2.4 && < 2.11,
                  mtl >= 2.0 && < 2.3,
-                 containers >= 0.4 && < 0.6
+                 containers >= 0.4 && < 0.6,
+                 transformers
 
   if impl(ghc < 7.8)
     build-depends: type-equality >= 0.1.0.2 && < 0.2
