How do I code an 'instance' declaration for '(Show ([(String, Int)] -> Int))'.<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)] -> Int))</div><div> arising from a use of `print' at expr-eval.hs:334:23-27</div>
<div> Possible fix:</div><div> add an instance declaration for (Show ([(String, Int)] -> Int))</div><div> In the first argument of `(.)', namely `print'</div><div> In the second argument of `(>>=)', namely `print . calc . lexer'</div>
<div> In the expression: getContents >>= print . calc . lexer</div></div><div><br></div><div>Many thanks in advance,</div><div><br></div><div>Aaron</div><div><br></div>