<div class="gmail_quote"><div>Hi Tsun,<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>some details regarding my question. I got this assignment which gives me the following: SomeFunction :: Integer -&gt; String. Which uses the show function to convert the Integer to String.</div></blockquote><div><br>
I believe you got that problem from the function showCC in Ex. 6 in my assignment ( <a href="http://www.cs.uu.nl/wiki/FP/Practicum#PracticumOne">http://www.cs.uu.nl/wiki/FP/Practicum#PracticumOne</a> ), since you&#39;re in my course.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div> However it asks me how my function can fail?</div></blockquote><div><br>I want to know how, given the function&#39;s type, it can fail. This is particular to your definition. This is different from using the function on an expected type. That is not a case of the function failing but a case of the typechecker telling you the program is invalid.<br>
<br>Are there any values of Integer for which showCC produces an unexpected output? What about negative numbers, large numbers, etc? What does your function do for these cases?<br><br>I didn&#39;t ask you to do any error checking, so instead, I want you to tell me the limits of your function definition.<br>
 <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div> Now I also know that when I use &#39;undefined&#39; I would get an error. So what other cases are there? (I asked my question about Floating because I guessed it would be similiar to Integers)</div>
</blockquote><div><br>The function is strict, so undefined would cause it to fail. I&#39;m not really concerned with that kind of answer, because we aren&#39;t working with these values in the course, yet.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<div>At this moment I really can&#39;t figure out how my function can fail other than the inputs described above.</div></blockquote><div><br>AFAIKT, you just mentioned Float. This is a type mismatch, not a case in which showCC fails or provides unexpected output.<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div>Thanks for your help!<br></div></blockquote></div><br>I&#39;m glad that you&#39;re being creative with how you&#39;re asking questions. I hope you have been taking advantage of the werkcollege and practicum sessions, too. Just so you know, there are some guidelines about asking homework questions on the mailing lists.<br>
<br>  <a href="http://www.haskell.org/haskellwiki/Homework_help">http://www.haskell.org/haskellwiki/Homework_help</a><br><br>Don&#39;t forget: the deadline is tonight at 23:59. Good luck!<br><br>Regards,<br>Sean<br>