Converting IO Int --> Int

Tim Stitt tim.stitt at
Sun Nov 9 14:36:08 EST 2003

Can anyone tell me how to convert a value of type IO Int to a value of ty=
I wrote a simple script to read an integer from the user using IO and the=
the value is returned from the IO function using =0D
return value=0D
with a return type of IO Int.=0D
In the calling function I wish to do a comparison with the user value and=
hard-coded integer. Unfortunately I keep getting type errors between the =
and the IO Int.=0D
I would be grateful for any assistance in this.=0D
Thanks in advance,=0D
Tim Stitt

More information about the Haskell-Cafe mailing list