Re: int to float problem

2003-03-02 Thread Jorge Adriano
> "Mike T. Machenry" <[EMAIL PROTECTED]> writes: > > I recently desided I wanted a bunch function to return > > float instead of Int. [...] I found fromInteger but it > > didn't seem to work on the return value of the cardinality > > function for instance. > > Try fromIntegral, which works for Int

Re: How to catch and error message and how to make it create unix files instead of dos files??

2003-03-02 Thread Alexandre Weffort Thenorio
Thanks I actually have done that but couldn't understand how to use them. Can you give me an example on a function that reads a file and in case the file is not found you throw a string like "File not found" or so?? Best Regards NooK - Original Message - From: "Hal Daume III" <[EMAIL PRO

Re: How to catch and error message and how to make it create unix files instead of dos files??

2003-03-02 Thread Hal Daume III
main = do v <- try $ readFile "foo" case v of Left _ -> putStrLn "an error occurred" Right t -> putStrLn t should work -- Hal Daume III | [EMAIL PROTECTED] "Arrest this man, he talks in maths." | www.isi.edu/~hdaume On Sun, 2 Mar 2003, Al

How to force UNIX text files as output instead of DOS text files??

2003-03-02 Thread Alexandre Weffort Thenorio
I am working on a small program which writes a text file but I need this file to be in UNIX format and as it is a Windows program I am compiling it, the output file tends to be in DSO format. Is there anyway that I can force it to create the file in UNIX format???   Best Regards   NooK

Re: How to force UNIX text files as output instead of DOS text files??

2003-03-02 Thread Nick Name
On Mon, 3 Mar 2003 00:35:47 +0100 "Alexandre Weffort Thenorio" <[EMAIL PROTECTED]> wrote: > the output file tends to be in DSO format. Is there anyway that I can > force it to create the file in UNIX format??? I am not an expert on the subject, but ... maybe you just have to use a string constant

Re: How to force UNIX text files as output instead of DOS text files??

2003-03-02 Thread Glynn Clements
Alexandre Weffort Thenorio wrote: > I am working on a small program which writes a text file but I need this > file to be in UNIX format and as it is a Windows program I am compiling > it, the output file tends to be in DSO format. Is there anyway that I > can force it to create the file in UNIX