[Haskell] Hugs Nov2003 X Nov2002

2004-03-16 Thread Stenio
I was using Hugs November 2002 and the function fromInt works fine, but
in the version November 2003 the same function doesn´t work. The same
happens with the functions ord and chr. But in this case I find the
solution, chr and ord are in the module Char in version November 2003 so I
have to do :import Char in my Haskell script.Stenio.

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] Hugs Nov2003 X Nov2002

2004-03-16 Thread Stenio
fromInteger works, but it converts from Integer to Float. In my script, I
need fromInt because it converts from Int to
Float.Example:average :: Int - Floataverage n =
fromInt ( sum n ) :: Float / fromIntn :: FloatIt works only in
Hugs November 2002Stenio.

- Mensagem Original De:
"Ketil Malde" [EMAIL PROTECTED]Para: "Stenio"
[EMAIL PROTECTED]Cópia: [EMAIL PROTECTED]Assunto: Re:
[Haskell] Hugs Nov2003 X Nov2002Data: 16/03/04 12:07"Stenio" [EMAIL PROTECTED]
writes: I was using Hugs November 2002 and the function fromInt
works fine, but in the version November 2003 the same function
doesn´t work.I'm too lazy to check the standard, so I'll just assume
Hugs waswrong. I think the solution is to use "fromIntegral" instead.
GHCialso has "fromInteger", although I'm not quite sure why we need
thisin addition to "fromIntegral"? (Possibly because it is a member
ofNum, and it would break too much code to remove
it)-kzm--If I haven't seen further, it is by standing in the
footprints of giants

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


[Haskell] Hugs Nov2003 X Nov2002

2004-03-16 Thread Stenio
It is strange because fromInt works in the hugs prompt But when I use it
in my haskell script it doesn´t work.PreludefromInt 5 :: Float
(ok!)butaverage :: Int -
Floataverage n = fromInt ( sum n ) :: Float / fromInt n ::
Floatdoesn´t work...fromInteger works in hugs prompt
and inside the haskell script too.Stenio.

- Mensagem Original De:
"Iavor S. Diatchki" [EMAIL PROTECTED]Para:
"[EMAIL PROTECTED]" [EMAIL PROTECTED]Cópia:
[EMAIL PROTECTED], [EMAIL PROTECTED]Assunto: Re: AW: [Haskell] Hugs
Nov2003 X Nov2002Data: 16/03/04 16:52hi,i believe you should usefromIntegral :: (Integral a,
Num b) = a - bSince Int is in the Integral class, and Float
is in the Num classthis should do exactly the job you need.For
the other functions that were not working --- they were moved tothe Char
module, so you need to add "import Char" at the top of
yourprogram.[EMAIL PROTECTED]
wrote: try fromInt = fromInteger .
toIntegerthis does not seem like a good idea, as you start with an
Int,then convert it to an Integer, and then you make a Float out of
that.seems like a waste.hope this
helps-iavor Markus
-- Markus Schnell -Ursprüngliche
Nachricht- *Von:* [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] *Im Auftrag von *Stenio
*Gesendet:* Dienstag, 16. März 2004 10:29 *An:* Ketil Malde
*Cc:* [EMAIL PROTECTED] *Betreff:*
Re: [Haskell] Hugs Nov2003 X Nov2002 fromInteger works, but
it converts from Integer to Float. In my script, I need fromInt
because it converts from Int to Float.
Example: average :: Int - Float average n =
fromInt ( sum n ) :: Float / fromInt n :: Float It works
only in Hugs November 2002 Stenio. -
Mensagem Original  De: "Ketil Malde"
[EMAIL PROTECTED] Para: "Stenio"
[EMAIL PROTECTED] Cópia: [EMAIL PROTECTED] Assunto:
Re: [Haskell] Hugs Nov2003 X Nov2002 Data: 16/03/04
12:07 "Stenio" [EMAIL PROTECTED]
writes:  I was using Hugs November 2002 and the function
fromInt works fine,  but in the version November 2003
the same function doesn´t work. I'm too lazy to check the
standard, so I'll just assume Hugs was wrong. I think the solution
is to use "fromIntegral" instead. GHCi also has "fromInteger",
although I'm not quite sure why we need this in addition to
"fromIntegral"? (Possibly because it is a member of Num, and it
would break too much code to remove it) -kzm
-- If I haven't seen further, it is by standing in the
footprints of
giants___Haskell
mailing
list[EMAIL PROTECTED]http://www.haskell.org/mailman/listinfo/haskell___Haskell
mailing list[EMAIL PROTECTED]http://www.haskell.org/mailman/listinfo/haskell

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


[Haskell] GHC EXE Windows

2004-03-04 Thread Stenio
GHC executable file only works in MS-DOS. I would like run the
executable file on Windows. Can someone help meThanks

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


[Haskell] hs2lhs

2004-02-14 Thread Stenio
I need to convert some scripts (hs) to lhs (literate script) and lhs
(literate script) to hs using GHC. Can someone help me. ThanksStenio

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Help

2001-07-18 Thread stenio


I would like to print something in my HP 600 (DeskJet Printer) using Hugs98
(Windows)
Can someone help me?
Thanks.

Stenio.



___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell