diff --git a/Text/HTML/TagStream/Types.hs b/Text/HTML/TagStream/Types.hs
--- a/Text/HTML/TagStream/Types.hs
+++ b/Text/HTML/TagStream/Types.hs
@@ -5,6 +5,7 @@
 import Data.ByteString (ByteString)
 import qualified Data.ByteString.Char8 as S
 import Blaze.ByteString.Builder (Builder, fromByteString, toByteString)
+import Control.Arrow ((***))
 
 type Attr' s = (s, s)
 type Attr = Attr' ByteString
@@ -47,3 +48,11 @@
 
 encodeHL :: (ByteString -> ByteString) -> [Token] -> ByteString
 encodeHL hl = toByteString . mconcat . map (showToken hl)
+
+instance Functor Token' where
+    fmap f (TagOpen x pairs b) = TagOpen (f x) (map (f *** f) pairs) b
+    fmap f (TagClose x) = TagClose (f x)
+    fmap f (Text x) = Text (f x)
+    fmap f (Comment x) = Comment (f x)
+    fmap f (Special x y) = Special (f x) (f y)
+    fmap f (Incomplete x) = Incomplete (f x)
diff --git a/tagstream-conduit.cabal b/tagstream-conduit.cabal
--- a/tagstream-conduit.cabal
+++ b/tagstream-conduit.cabal
@@ -1,5 +1,5 @@
 Name:                tagstream-conduit
-Version:             0.3.1
+Version:             0.3.2
 Synopsis:            streamlined html tag parser
 Description:
     Tag-stream is a library for parsing HTML//XML to a token stream.
