How do I code an &#39;instance&#39; declaration for &#39;(Show ([(String, Int)] -&gt; Int))&#39;.<div><br></div><div>I am new to instance declarations and am following the Happy examples :-</div><div><br></div><div>    <a href="http://www.haskell.org/happy/doc/html/sec-using.html#sec-other-datatypes">http://www.haskell.org/happy/doc/html/sec-using.html#sec-other-datatypes</a></div>

<div><br></div><div>The compiler is requesting an instance declaration for Show :-</div><div><br></div><div><div>  expr-eval.hs:334:23:</div><div>      No instance for (Show ([(String, Int)] -&gt; Int))</div><div>        arising from a use of `print&#39; at expr-eval.hs:334:23-27</div>

<div>      Possible fix:</div><div>        add an instance declaration for (Show ([(String, Int)] -&gt; Int))</div><div>      In the first argument of `(.)&#39;, namely `print&#39;</div><div>      In the second argument of `(&gt;&gt;=)&#39;, namely `print . calc . lexer&#39;</div>

<div>      In the expression: getContents &gt;&gt;= print . calc . lexer</div></div><div><br></div><div>Many thanks in advance,</div><div><br></div><div>Aaron</div><div><br></div>