<p class="MsoNormal"><span>Hi there folks, I'm trying to learn some functional programming in
Haskell, well, at the College, but they don't teach anything, lol, so I have a
very simple question about type creation.</span></p>

<p class="MsoNormal"><span>This is a new type that contains the int and the new infinity number</span></p>



<p class="MsoNormal"><span><strong>data NatInf = Infinity | Num Int</strong></span></p>



<p class="MsoNormal"><span>At this point every seems to be ok, but when I load the file in Hugs,
and then write </span></p>



<p class="MsoNormal"><span><strong>Num 5 (or Infinity)</strong></span></p>



<p class="MsoNormal"><span>the following error appears:</span></p>







<p class="MsoNormal"><span><strong>ERROR &ndash; Cannot find &quot;show&quot; function for:<br />*** Expression : Num 5<br />*** Of type:<span>&nbsp;&nbsp;&nbsp; </span>: NatInf</strong></span></p>



<p class="MsoNormal"><span>Surely I have to create a new show function, but I don't know where or
how write this. It must be easy but hard to learn for myself, so if any of you
can explain me this it would be great, thank you and greetings!</span></p>
<BR><br><addr>------------------------------------------------------------------------<br>
Conectate a <b><a href=http://free.internet.argentina.com/promointernet/>Internet Gratis Ultraveloz</b></
a> en Buenos Aires - <b>5254-5000</b><br>
</addr>
<br>
<center>
<a href="http://be.argentina.com/cgi-bin/clk.cgi?gid=170&id=371" target=_top>
<img src="http://be.argentina.com/cgi-bin/arg.cgi?gid=170&id=371" width=467 height=60 border=0></a>
</center>