title: Show for IO types
body: <p>I have a data type which contains an IORef as an important element. This means there is not a clean way to make it a member of the <code>show</code> type class.  This is not too bad as I have a <code>print</code> function in the IO monad for this type.  But it is annoying in GHCi in that every time I return one of these thing as a result I get an error stating that it cannot be shown.</p>
  
  <p>Is there a way to get GHCi, which operates in the IO monad anyway, to use an IO action to show a result?  If not, would there be any negative consequences to writing <code>show a = unsafePerformIO $ print a</code>?  </p>