int to float problem

Ketil Z. Malde ketil@ii.uib.no
03 Mar 2003 09:25:09 +0100


"Mike T. Machenry" <dskippy@ccs.neu.edu> writes:

>   I am having a problem. I recently desided I wanted a bunch function to return
> float instead of Int. I changed their type and wrote a new function that
> returned a float. I figured it'd be okay if all the others still returned
> Int since it's trivial to convert Int to Float.

Perhaps the other functions could be written with a more general type?
(E.g. :: Num a => ... -> a)

Try to remove the type declaration, and see what Hugs or GHCi :t has
to say about it!

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants