> "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
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
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
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
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
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