Help

Jay Cox sqrtofone@yahoo.com
Thu, 28 Feb 2002 20:05:05 -0600 (CST)


On Wed, 27 Feb 2002, Juan M. Duran wrote:

> I got a function with type :: IO [[Double]], and what I want is write this
> output in a file, how can I do it... I mean, I cannot doit by just using
> writeFile....

How about..

do double_list_result <- your_function
   writefile "/file/path/foo" (show double_list_result)


> And one more thing: the Glasglow compiler doesn let me compile because I use
>  the function readFloat (declare in the Prelude of Hugs 98), but Hugs lets
>  me, why? How can I solve it?

a solution is

myreadfloat string = (read string) :: Float

(assuming readFloat is  a function String -> Float and not something like
Handle -> IO Float)


Jay Cox