diff --git a/psc-docs/CTags.hs b/psc-docs/CTags.hs
deleted file mode 100644
--- a/psc-docs/CTags.hs
+++ /dev/null
@@ -1,13 +0,0 @@
-module Ctags (dumpCtags) where
-
-import qualified Language.PureScript as P
-import Tags
-import Data.List (sort)
-
-dumpCtags :: [(String, P.Module)] -> [String]
-dumpCtags = sort . concat . (map renderModCtags)
-
-renderModCtags :: (String, P.Module) -> [String]
-renderModCtags (path, mdl) = sort tagLines
-  where tagLines = map tagLine $ tags mdl
-        tagLine (name, line) = name ++ "\t" ++ path ++ "\t" ++ show line
diff --git a/psc-docs/Ctags.hs b/psc-docs/Ctags.hs
new file mode 100644
--- /dev/null
+++ b/psc-docs/Ctags.hs
@@ -0,0 +1,13 @@
+module Ctags (dumpCtags) where
+
+import qualified Language.PureScript as P
+import Tags
+import Data.List (sort)
+
+dumpCtags :: [(String, P.Module)] -> [String]
+dumpCtags = sort . concat . (map renderModCtags)
+
+renderModCtags :: (String, P.Module) -> [String]
+renderModCtags (path, mdl) = sort tagLines
+  where tagLines = map tagLine $ tags mdl
+        tagLine (name, line) = name ++ "\t" ++ path ++ "\t" ++ show line
diff --git a/psc-docs/ETags.hs b/psc-docs/ETags.hs
deleted file mode 100644
--- a/psc-docs/ETags.hs
+++ /dev/null
@@ -1,15 +0,0 @@
-module Etags (dumpEtags) where
-
-import qualified Language.PureScript as P
-import Tags
-
-dumpEtags :: [(String, P.Module)] -> [String]
-dumpEtags = concat . (map renderModEtags)
-
-renderModEtags :: (String, P.Module) -> [String]
-renderModEtags (path, mdl) = ["\x0c", path ++ "," ++ show tagsLen] ++ tagLines
-  where tagsLen = sum $ map length tagLines
-        tagLines = map tagLine $ tags mdl
-        tagLine (name, line) = "\x7f" ++ name ++ "\x01" ++ show line ++ ","
-
-
diff --git a/psc-docs/Etags.hs b/psc-docs/Etags.hs
new file mode 100644
--- /dev/null
+++ b/psc-docs/Etags.hs
@@ -0,0 +1,15 @@
+module Etags (dumpEtags) where
+
+import qualified Language.PureScript as P
+import Tags
+
+dumpEtags :: [(String, P.Module)] -> [String]
+dumpEtags = concat . (map renderModEtags)
+
+renderModEtags :: (String, P.Module) -> [String]
+renderModEtags (path, mdl) = ["\x0c", path ++ "," ++ show tagsLen] ++ tagLines
+  where tagsLen = sum $ map length tagLines
+        tagLines = map tagLine $ tags mdl
+        tagLine (name, line) = "\x7f" ++ name ++ "\x01" ++ show line ++ ","
+
+
diff --git a/psc-docs/Tags.hs b/psc-docs/Tags.hs
new file mode 100644
--- /dev/null
+++ b/psc-docs/Tags.hs
@@ -0,0 +1,18 @@
+module Tags where
+
+import qualified Language.PureScript as P
+
+tags :: P.Module -> [(String, Int)]
+tags = concatMap dtags . P.exportedDeclarations
+  where dtags (P.PositionedDeclaration sp _ d) = map tag $ names d
+          where tag name = (name, line)
+                line = P.sourcePosLine $ P.spanStart sp
+        dtags _ = []
+        names (P.DataDeclaration _ name _ dcons) = P.runProperName name : consNames
+          where consNames = map (\(cname, _) -> P.runProperName cname) dcons
+        names (P.TypeDeclaration ident _) = [show ident]
+        names (P.ExternDeclaration _ ident _ _) = [show ident]
+        names (P.TypeSynonymDeclaration name _ _) = [P.runProperName name]
+        names (P.TypeClassDeclaration name _ _ _) = [P.runProperName name]
+        names (P.TypeInstanceDeclaration name _ _ _ _) = [show name]
+        names _ = []
diff --git a/purescript.cabal b/purescript.cabal
--- a/purescript.cabal
+++ b/purescript.cabal
@@ -1,5 +1,5 @@
 name: purescript
-version: 0.6.9.2
+version: 0.6.9.3
 cabal-version: >=1.8
 build-type: Simple
 license: MIT
@@ -160,8 +160,9 @@
     main-is: Main.hs
     buildable: True
     hs-source-dirs: psc-docs
-    other-modules: CTags
-                   ETags
+    other-modules: Ctags
+                   Etags
+                   Tags
     ghc-options: -Wall -O2
 
 executable psc-hierarchy
