shell to run functions

Johansson Mikael
Fri, 7 Sep 2001 07:02:58 +0200


I have problems running functions in a haskell program being able to
give input and get output via the keyboard.
I have a glasgow compiler and have successfully made a=20
compiled and runned a program wich read a char and writes it
back to screen.

main :: IO ()
main =3D 	do=20
	c <- getChar=20
        putChar c

But when I try to write a program with this function:

f x 	=3D x mod 7 =3D=3D 0 ||=20
 	   x mod 10 =3D=3D 7 ||=20
 	   x div 10 mod 10 =3D=3D 7

The IO doesn't seem to work
How do I put programs like this in a IO shell.

Thanks in advance.

Mikael Johansson=20

Volvo Aero Corporation
Military Engines Trollh=E4ttan
Dept. 7164MJ
SE-461 81 Trollh=E4ttan, Sweden
phone +46 520 940 61