When you are using any type in a monad, you do not need to convert it from
IO a to a. You simply pass IO a into a function that takes type a. (I am a
bit rusty, so bear with me). For example:
 
addone    :: Int -> Int
addone x = x+1
 
toIO    :: a -> IO a
toIO x = (return x)::IO
 
 
 
int i = 12
 
main
    y = toIO i
    j = addone y
 
 
 
the syntax might be a bit off, but that is how it works.
 
 
cheers,
Micha
 
 

-----Original Message-----
From: Jaci Junior [mailto:[EMAIL PROTECTED]]
Sent: Saturday, September 23, 2000 13:49 PM
To: [EMAIL PROTECTED]
Subject: En: 


Dear reader,
 
Is there a function that takes an "IO String" and  make it into String?
 
  


Reply via email to