<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Yep, that fixed it..<br><br>Thanks, Brandon.<br><br>Michael<br><br>--- On <b>Tue, 4/28/09, Brandon S. Allbery KF8NH <i>&lt;allbery@ece.cmu.edu&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Brandon S. Allbery KF8NH &lt;allbery@ece.cmu.edu&gt;<br>Subject: Re: [Haskell-cafe] chr/ord?<br>To: "michael rice" &lt;nowgate@yahoo.com&gt;<br>Cc: "Brandon S. Allbery KF8NH" &lt;allbery@ece.cmu.edu&gt;, "Tim Wawrzynczak" &lt;inforichland@gmail.com&gt;, "Lennart Augustsson" &lt;lennart.augustsson@gmail.com&gt;, "haskell-cafe@haskell.org" &lt;haskell-cafe@haskell.org&gt;<br>Date: Tuesday, April 28, 2009, 11:44 PM<br><br><div id="yiv1447512828"><div><div>On Apr 28, 2009, at 23:32 , michael rice wrote:</div><blockquote type="cite"><table style="" border="0" cellpadding="0"
 cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">Thank guys,<br><br>Now what am I misunderstanding in the code below?<br><br>lst = [('A',65),('B',66),('C',67),('D',68)]<br></td></tr></tbody></table></blockquote></div><div><br></div><div>You didn't give a type for lst, so it defaulted to [(Char,Integer)]. &nbsp;This is a manifestation of the Monomorphism Restriction, invoked because lst doesn't take any arguments: &nbsp;it forces lst to have a definite type, so defaulting is used to fix the numeric part to Integer.</div><div><br></div><div>If you add a type specification for lst, things will work as you expect.</div><br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family:
 Helvetica; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"><div style=""><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing:
 0px;"><div><font class="Apple-style-span" face="Monaco"><span class="Apple-style-span" style="font-family: Monaco;"><span class="Apple-style-span" style="font-family: Monaco;">--&nbsp;</span></span></font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-style-span" style="font-family: Monaco;"><span class="Apple-style-span" style="font-family: Monaco;">brandon s. allbery [solaris,freebsd,perl,pugs,haskell] <a rel="nofollow" ymailto="mailto:allbery@kf8nh.com" target="_blank" href="/mc/compose?to=allbery@kf8nh.com">allbery@kf8nh.com</a></span></span></font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-style-span" style="font-family: Monaco;"><span class="Apple-style-span" style="font-family: Monaco;">system administrator [openafs,heimdal,too many hats] <a rel="nofollow" ymailto="mailto:allbery@ece.cmu.edu" target="_blank"
 href="/mc/compose?to=allbery@ece.cmu.edu">allbery@ece.cmu.edu</a></span></span></font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-style-span" style="font-family: Monaco;"><span class="Apple-style-span" style="font-family: Monaco;">electrical and computer engineering, carnegie mellon university &nbsp; &nbsp;KF8NH</span></span></font></div><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"><br class="Apple-interchange-newline"></span></span></span></div></span> </div><br></div></blockquote></td></tr></table><br>