How can I use pure functions inside IO functions? :-/
For example: I\'m reading a file (IO function) and I want to parse its context, a string, by using a pure funct
You can also consider liftM function from Control.Monad.
A little example to help you (run it into ghci as you are under the IO Monad)   
$ import Control.Monad -- to emerge liftM
$ import Data.Char     -- to emerge toUpper
$ :t map to Upper -- A pure function
map toUpper :: [Char] -> [Char]
$ :t liftM 
liftM :: Monad m => (a1 -> r) -> m a1 -> m r
$ liftM (map toUpper) getLine