[clean-list] mod function

=?iso-8859-1?q?Alves=20da=20Silva=20Cruz=20Willer?= willeralves@yahoo.com.br
Thu, 11 Dec 2003 12:00:43 -0300 (ART)


--0-911963716-1071154843=:83587
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hello people,
 
It looks like the instance of "mod" function is missing in the StdInt on Clean 2.0.2 (Win version):
 
Start :: Int
Start = 2 mod 4

Compiler: Overloading error: "mod" no instance available of type Int
 
I changed it to:
 
mod :: Int Int -> Int
mod a b = a - (a/b)*b
 
But I think it is a little bit dirty trick :-).
 
Willer Alves
Uberlandia, MG - Brazil



---------------------------------
Yahoo! Mail - 6MB, anti-spam e antivírus gratuito. Crie sua conta agora!
--0-911963716-1071154843=:83587
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<DIV>Hello people,</DIV>
<DIV>&nbsp;</DIV>
<DIV>It looks like the instance of "mod" function is missing in the StdInt on Clean 2.0.2 (Win version):</DIV>
<DIV>&nbsp;</DIV>
<DIV>Start :: Int<BR>Start = 2 mod 4<BR></DIV>
<DIV>Compiler: Overloading error: "mod" no instance available of type Int</DIV>
<DIV>&nbsp;</DIV>
<DIV>I changed it to:</DIV>
<DIV>&nbsp;</DIV>
<DIV>mod :: Int Int -&gt; Int<BR>mod a b = a - (a/b)*b</DIV>
<DIV>&nbsp;</DIV>
<DIV>But I think it is a little bit dirty trick :-).</DIV>
<DIV>&nbsp;</DIV>
<DIV>Willer Alves</DIV>
<DIV>Uberlandia, MG - Brazil</DIV><p><br><hr size=1><b><a href="http://br.rd.yahoo.com//mail_br/tagline/?http://mail.yahoo.com.br">Yahoo! Mail</a></b> - 6MB, anti-spam e antivírus gratuito. <a href="http://br.rd.yahoo.com//mail_br/tagline/?http://br.yahoo.com/info/mail.html">Crie sua conta agora!</a>
--0-911963716-1071154843=:83587--