Check whether a type is an instance of Show in Haskell at runtime?
<p>Suppose I have a simple data type in Haskell for storing a value:</p>

<pre><code>data V a = V a
</code></pre>

<p>I want to make V an instance of Show, regardless of a's type. If a is an instance of Show, then <code>show (V a)</code> should return <code>show a</code> otherwise an error message should be returned. Or in Pseudo-Haskell:</p>

<pre><code>instance Show (V a) where
    show (V a) = if a instanceof Show
                   then show a
                   else "Some Error."
</code></pre>

<p>How could this behaviour be implemented in Haskell?</p>