<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Nachricht</TITLE>

<META content="MSHTML 5.50.4934.1600" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=976005112-16032004>try</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=976005112-16032004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=976005112-16032004>fromInt = fromInteger . toInteger</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=976005112-16032004>Markus</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=976005112-16032004></SPAN></FONT>&nbsp;</DIV><!-- Converted from text/rtf format -->
<P><SPAN lang=de><FONT face="Courier New" color=#000000 size=2>--</FONT></SPAN> 
<BR><SPAN lang=de><FONT face="Courier New" color=#000000 size=2>Markus 
Schnell</FONT></SPAN> <BR></P>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=de dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Ursprüngliche Nachricht-----<BR><B>Von:</B> 
  haskell-bounces@haskell.org [mailto:haskell-bounces@haskell.org] <B>Im Auftrag 
  von </B>Stenio<BR><B>Gesendet:</B> Dienstag, 16. März 2004 10:29<BR><B>An:</B> 
  Ketil Malde<BR><B>Cc:</B> haskell@haskell.org<BR><B>Betreff:</B> Re: [Haskell] 
  Hugs Nov2003 X Nov2002<BR><BR></FONT></DIV>fromInteger works, but it converts 
  from Integer to Float. In my script, I need fromInt because it converts from 
  Int to Float.<BR><BR>Example:<BR><BR>average :: Int -&gt; Float<BR>average n = 
  fromInt ( sum n ) :: Float / fromInt&nbsp;n :: Float<BR><BR>It works only in 
  Hugs November 2002<BR><BR>Stenio.<BR><BR>
  <BLOCKQUOTE dir=ltr 
  style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
    <DIV style="FONT: 10pt arial">--------- Mensagem Original --------<BR>De: 
    "Ketil Malde" &lt;ketil+haskell@ii.uib.no&gt;<BR>Para: "Stenio" 
    &lt;stenio@uesb.br&gt;<BR>Cópia: haskell@haskell.org<BR>Assunto: Re: 
    [Haskell] Hugs Nov2003 X Nov2002<BR>Data: 16/03/04 12:07<BR><BR><FONT 
    face="Courier New" size=2><BR>"Stenio" &lt;stenio@uesb.br&gt; 
    writes:<BR><BR>&gt; I was using Hugs November 2002 and the function fromInt 
    works fine,<BR>&gt; but in the version November 2003 the same function 
    doesn´t work.<BR><BR>I'm too lazy to check the standard, so I'll just assume 
    Hugs was<BR>wrong. I think the solution is to use "fromIntegral" instead. 
    GHCi<BR>also has "fromInteger", although I'm not quite sure why we need 
    this<BR>in addition to "fromIntegral"? (Possibly because it is a member 
    of<BR>Num, and it would break too much code to remove 
    it)<BR><BR>-kzm<BR>--<BR>If I haven't seen further, it is by standing in the 
    footprints of 
giants<BR><BR><BR><BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>