diff --git a/.travis.yml b/.travis.yml
new file mode 100644
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,1 @@
+language: haskell
diff --git a/ad.cabal b/ad.cabal
--- a/ad.cabal
+++ b/ad.cabal
@@ -1,5 +1,5 @@
 name:         ad
-version:      1.5.0.1
+version:      1.5.0.2
 license:      BSD3
 license-File: LICENSE
 copyright:    (c) Edward Kmett 2010-2012,
@@ -9,11 +9,11 @@
 stability:    Experimental
 category:     Math
 homepage:     http://github.com/ekmett/ad
+bug-reports:  http://github.com/ekmett/ad/issues
 build-type:   Simple
 cabal-version: >= 1.6
-extra-source-files: TODO
+extra-source-files: TODO .travis.yml
 synopsis:     Automatic Differentiation
-
 description:
     Forward-, reverse- and mixed- mode automatic differentiation combinators with a common API.
     .
@@ -108,7 +108,7 @@
     array            >= 0.2     && < 0.5,
     comonad          >= 1.1.1.5 && < 1.2,
     free             >= 2.1.1   && < 2.2,
-    template-haskell >= 2.6     && < 2.8
+    template-haskell >= 2.5     && < 2.8
 
   exposed-modules:
     Numeric.AD
diff --git a/src/Numeric/AD/Internal/Composition.hs b/src/Numeric/AD/Internal/Composition.hs
--- a/src/Numeric/AD/Internal/Composition.hs
+++ b/src/Numeric/AD/Internal/Composition.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE Rank2Types, TypeFamilies, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, FlexibleContexts, TemplateHaskell, UndecidableInstances, TypeOperators #-}
 -- {-# OPTIONS_HADDOCK hide, prune #-}
 -----------------------------------------------------------------------------
@@ -18,9 +19,17 @@
     , decomposeMode
     ) where
 
+#ifndef MIN_VERSION_base
+#define MIN_VERSION_base(x,y,z) 1
+#endif
+
 import Control.Applicative hiding ((<**>))
 import Data.Data (Data(..), mkDataType, DataType, mkConstr, Constr, constrIndex, Fixity(..))
+#if MIN_VERSION_base(4,4,0)
 import Data.Typeable (Typeable1(..), Typeable(..), TyCon, mkTyCon3, mkTyConApp, typeOfDefault, gcast1)
+#else
+import Data.Typeable (Typeable1(..), Typeable(..), TyCon, mkTyCon, mkTyConApp, typeOfDefault, gcast1)
+#endif
 import Data.Foldable (Foldable(foldMap))
 import Data.Traversable (Traversable(traverse))
 import Numeric.AD.Internal.Classes
@@ -46,7 +55,12 @@
               ga = undefined
 
 composeFunctorTyCon :: TyCon
+#if MIN_VERSION_base(4,4,0)
 composeFunctorTyCon = mkTyCon3 "ad" "Numeric.AD.Internal.Composition" "ComposeFunctor"
+#else
+composeFunctorTyCon = mkTyCon "Numeric.AD.Internal.Composition.ComposeFunctor"
+#endif
+
 {-# NOINLINE composeFunctorTyCon #-}
 
 composeFunctorConstr :: Constr
@@ -161,7 +175,11 @@
     typeOf = typeOfDefault
     
 composeModeTyCon :: TyCon
+#if MIN_VERSION_base(4,4,0)
 composeModeTyCon = mkTyCon3 "ad" "Numeric.AD.Internal.Composition" "ComposeMode"
+#else
+composeModeTyCon = mkTyCon "Numeric.AD.Internal.Composition.ComposeMode"
+#endif
 {-# NOINLINE composeModeTyCon #-}
 
 composeModeConstr :: Constr
diff --git a/src/Numeric/AD/Internal/Jet.hs b/src/Numeric/AD/Internal/Jet.hs
--- a/src/Numeric/AD/Internal/Jet.hs
+++ b/src/Numeric/AD/Internal/Jet.hs
@@ -18,14 +18,18 @@
     , jet
     ) where
 
+#ifndef MIN_VERSION_base
+#define MIN_VERSION_base(x,y,z) 1
+#endif
+
 import Control.Applicative
 import Data.Foldable
 import Data.Traversable
 import Data.Monoid
-#if __GLASGOW_HASKELL__ < 704
-import Data.Typeable (Typeable1(..), TyCon, mkTyCon, mkTyConApp)
-#else
+#if MIN_VERSION_base(4,4,0)
 import Data.Typeable (Typeable1(..), TyCon, mkTyCon3, mkTyConApp)
+#else
+import Data.Typeable (Typeable1(..), TyCon, mkTyCon, mkTyConApp)
 #endif
 import Control.Comonad.Cofree
 
@@ -78,9 +82,9 @@
               asArgsType = const
 
 jetTyCon :: TyCon
-#if __GLASGOW_HASKELL__ < 704
-jetTyCon = mkTyCon "Numeric.AD.Internal.Jet.Jet"
-#else
+#if MIN_VERSION_base(4,4,0)
 jetTyCon = mkTyCon3 "ad" "Numeric.AD.Internal.Jet" "Jet"
+#else
+jetTyCon = mkTyCon "Numeric.AD.Internal.Jet.Jet"
 #endif
 {-# NOINLINE jetTyCon #-}
diff --git a/src/Numeric/AD/Internal/Types.hs b/src/Numeric/AD/Internal/Types.hs
--- a/src/Numeric/AD/Internal/Types.hs
+++ b/src/Numeric/AD/Internal/Types.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE Rank2Types, GeneralizedNewtypeDeriving, TemplateHaskell, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, UndecidableInstances #-}
 {-# OPTIONS_HADDOCK hide #-}
 -----------------------------------------------------------------------------
@@ -14,8 +15,16 @@
     ( AD(..)
     ) where
 
+#ifndef MIN_VERSION_base
+#define MIN_VERSION_base (x,y,z) 1
+#endif
+
 import Data.Data (Data(..), mkDataType, DataType, mkConstr, Constr, constrIndex, Fixity(..))
+#if MIN_VERSION_base(4,4,0)
 import Data.Typeable (Typeable1(..), Typeable(..), TyCon, mkTyCon3, mkTyConApp, gcast1)
+#else
+import Data.Typeable (Typeable1(..), Typeable(..), TyCon, mkTyCon, mkTyConApp, gcast1)
+#endif
 import Language.Haskell.TH
 import Numeric.AD.Internal.Classes
 
@@ -38,7 +47,11 @@
               asArgsType = const
 
 adTyCon :: TyCon
+#if MIN_VERSION_base(4,4,0)
 adTyCon = mkTyCon3 "ad" "Numeric.AD.Internal.Types" "AD"
+#else
+adTyCon = mkTyCon "Numeric.AD.Internal.Types.AD"
+#endif
 {-# NOINLINE adTyCon #-}
 
 adConstr :: Constr
