diff --git a/haskell-docs.cabal b/haskell-docs.cabal
--- a/haskell-docs.cabal
+++ b/haskell-docs.cabal
@@ -1,5 +1,5 @@
 name:                haskell-docs
-version:             4.1.4
+version:             4.1.5
 synopsis:            A program to find and display the docs and type of a name
 description:         Given a module name and a name, or just a name, it will find and display
                      the documentation of that name.
diff --git a/src/Haskell/Docs.hs b/src/Haskell/Docs.hs
--- a/src/Haskell/Docs.hs
+++ b/src/Haskell/Docs.hs
@@ -14,6 +14,7 @@
 import Haskell.Docs.Haddock
 import Haskell.Docs.Types
 
+import Control.Exception
 import Control.Monad
 import Data.List
 import Data.Ord
@@ -32,7 +33,7 @@
   do (result,printPkg,printModule) <- search
      case result of
        Left err ->
-         error (show err)
+         throw err
        Right (sortBy (comparing identDocPackageName) -> docs) ->
           if ss
              then printSexp (nub docs)
diff --git a/src/Haskell/Docs/Formatting.hs b/src/Haskell/Docs/Formatting.hs
--- a/src/Haskell/Docs/Formatting.hs
+++ b/src/Haskell/Docs/Formatting.hs
@@ -29,20 +29,20 @@
               -> Ghc ()
 printIdentDoc True _ _ idoc =
   do d <- getSessionDynFlags
-     maybe (return ())
-            (\i -> liftIO (putStrLn (showppr d (moduleName (nameModule (getName i))))))
-            (identDocIdent idoc)
+     maybe (liftIO (putStrLn (showppr d (identDocModuleName idoc))))
+           (\i -> liftIO (putStrLn (showppr d (moduleName (nameModule (getName i))))))
+           (identDocIdent idoc)
 printIdentDoc _ printPkg printModule idoc =
   do d <- getSessionDynFlags
      when printPkg
           (liftIO (putStrLn ("Package: " ++ showPackageName (identDocPackageName idoc))))
      when printModule
-          (maybe (return ())
+          (maybe (liftIO (putStrLn ("Module: " ++ showppr d (identDocModuleName idoc))))
                  (\i -> liftIO (putStrLn ("Module: " ++
                                           showppr d (moduleName (nameModule (getName i))))))
                  (identDocIdent idoc))
      case identDocIdent idoc of
-       Nothing -> return ()
+       Nothing -> liftIO (putStrLn (unIdentifier (identDocIdentifier idoc)))
        Just i -> liftIO (putStrLn (showppr d i ++ " :: " ++ showppr d (idType i)))
      liftIO (putStrLn (formatDoc (identDocDocs idoc)))
      case identDocArgDocs idoc of
diff --git a/src/Haskell/Docs/Haddock.hs b/src/Haskell/Docs/Haddock.hs
--- a/src/Haskell/Docs/Haddock.hs
+++ b/src/Haskell/Docs/Haddock.hs
@@ -142,6 +142,8 @@
              return
                (Right
                   [IdentDoc (sourcePackageId package)
+                            name
+                            (moduleName (instMod interface))
                             d
                             mi
                             margs])
diff --git a/src/Haskell/Docs/Types.hs b/src/Haskell/Docs/Types.hs
--- a/src/Haskell/Docs/Types.hs
+++ b/src/Haskell/Docs/Types.hs
@@ -27,6 +27,8 @@
 -- | Identier documentation along with argument docs and identifiers.
 data IdentDoc = IdentDoc
   { identDocPackageName :: !PackageIdentifier
+  , identDocIdentifier  :: !Identifier
+  , identDocModuleName  :: !ModuleName
   , identDocDocs        :: !(Doc String)
   , identDocIdent       :: !(Maybe Id)
   , identDocArgDocs     :: !(Maybe [(Int, Doc String)])
diff --git a/src/main/Main.hs b/src/main/Main.hs
--- a/src/main/Main.hs
+++ b/src/main/Main.hs
@@ -11,6 +11,7 @@
 import           Control.Exception
 import           Control.Exception (IOException)
 import qualified Control.Exception as E
+import           Data.Typeable
 import           GHC
 import           GhcMonad
 import           System.Environment
@@ -25,7 +26,7 @@
 
 -- | Do the printing.
 app :: [String] -> IO ()
-app (extract -> (gs,ms,as,ss)) =
+app (extract -> x@(gs,ms,as,ss)) =
   withInitializedPackages
     gs
     (catchErrors
@@ -62,17 +63,20 @@
     go (gs,ms,as,ss) ("--modules":ys) = go (gs,True,as,ss) ys
     go (gs,ms,as,ss) ("--sexp":ys)    = go (gs,ms,as,True) ys
     go (gs,ms,as,ss) (y:ys)           = go (gs,ms,y:as,ss) ys
-    go (gs,ms,as,ss) []               = (gs,ms,as,ss)
+    go (gs,ms,as,ss) []               = (gs,ms,reverse as,ss)
 
 -- | Catch errors and print 'em out.
 catchErrors :: Ghc () -> Ghc ()
 catchErrors m =
-  gcatch (gcatch m
-                 (\x ->
-                    do bail (printEx x)
-                       liftIO exitFailure))
-         (\(e::SomeException) ->
-            bail (show e))
+  gcatch
+    m
+    (\(SomeException e) ->
+       case cast e of
+         Just ex ->
+           do bail (printEx ex)
+              liftIO exitFailure
+         Nothing ->
+           bail ("Exception: " ++ show e ++ " :: " ++ show (typeOf e) ++ ""))
 
 -- | Print an error and bail out.
 bail :: String -> Ghc ()
