Support GHC 7.8's new Data.Typeable module.
diff --git a/enumerator.cabal b/enumerator.cabal
index c54e47a..617a0dc 100644
--- a/enumerator.cabal
+++ b/enumerator.cabal
@@ -147,6 +147,9 @@
     , containers >= 0.1
     , text >= 0.7
 
+  if impl(ghc >= 7.7)
+    ghc-options: -DGHC78_DATA_TYPEABLE=1
+
   exposed-modules:
     Data.Enumerator
     Data.Enumerator.Binary
diff --git a/lib/Data/Enumerator/Internal.hs b/lib/Data/Enumerator/Internal.hs
index e5ab4f9..86ff2b9 100644
--- a/lib/Data/Enumerator/Internal.hs
+++ b/lib/Data/Enumerator/Internal.hs
@@ -1,3 +1,6 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE StandaloneDeriving #-}
 -- |
 -- Module: Data.Enumerator.Internal
 -- Copyright: 2010-2011 John Millikin
@@ -45,9 +48,14 @@
 import           Control.Monad.Trans.Class (MonadTrans, lift)
 import           Data.Function (fix)
 import           Data.Monoid (Monoid, mempty, mappend, mconcat)
+
+#if GHC78_DATA_TYPEABLE
+import           Data.Typeable (Typeable)
+#else
 import           Data.Typeable ( Typeable, typeOf
                                , Typeable1, typeOf1
                                , mkTyConApp, mkTyCon)
+#endif
 
 -- | A 'Stream' is a sequence of chunks generated by an 'Enumerator'.
 --
@@ -143,6 +151,14 @@
 -- is passed between elements of the data processing pipeline.
 type Enumeratee ao ai m b = Step ai m b -> Iteratee ao m (Step ai m b)
 
+#if GHC78_DATA_TYPEABLE
+
+deriving instance Typeable Stream
+deriving instance Typeable Step
+deriving instance Typeable Iteratee
+
+#else
+
 -- | Since: 0.4.8
 instance Typeable1 Stream where
 	typeOf1 _ = mkTyConApp tyCon [] where
@@ -172,6 +188,8 @@
 			
 			in mkTyConApp tyCon [typeOf a, typeOf1 m]
 
+#endif
+
 instance Monad m => Functor (Iteratee a m) where
 	fmap = CM.liftM