diff --git a/src/GHC/Vacuum.hs b/src/GHC/Vacuum.hs
--- a/src/GHC/Vacuum.hs
+++ b/src/GHC/Vacuum.hs
@@ -40,6 +40,8 @@
   ,vacuumTo,dumpTo
   ,toAdjList
   ,nameGraph
+  ,ShowHNode(..)
+  ,showHNodes
   ,ppHs,ppDot
   ,Closure(..)
   ,InfoTab(..)
@@ -96,6 +98,16 @@
                           (IM.lookup i m)
               in fmap (\(x,xs) -> (pp x, fmap pp xs)) g
 
+data ShowHNode = ShowHNode
+  {showHNode :: HNode -> String
+  ,externHNode :: String}
+
+showHNodes :: ShowHNode -> IntMap HNode -> [(String, [String])]
+showHNodes (ShowHNode showN externN) m
+  = let g = toAdjList m
+        pp i = maybe externN showN (IM.lookup i m)
+    in fmap (\(x,xs) -> (pp x, fmap pp xs)) g
+
 -----------------------------------------------------------------------------
 
 ppHs :: (Show a) => a -> Doc
@@ -297,6 +309,8 @@
                               "MVar"  -> return []            -- avoid the MVar#
                               "STRef" -> return []            -- avoid the MutVar#
                               "Array" -> return (take 2 ptrs) -- avoid the Array#
+                              "MallocPtr" -> return (drop 1 ptrs) -- ForeignPtr
+                              "PlainPtr" -> return []             -- ForeignPtr
                               _       -> return ptrs
                 | otherwise -> return ptrs
   xs <- mapM getId ptrs'
diff --git a/vacuum.cabal b/vacuum.cabal
--- a/vacuum.cabal
+++ b/vacuum.cabal
@@ -1,5 +1,5 @@
 name:               vacuum
-version:            0.0.4
+version:            0.0.5
 cabal-version:      >= 1.6
 build-type:         Simple
 license:            LGPL
