
25 May
2015
25 May
'15
2:44 a.m.
Hi All, I'm writing a code, where the input is read from a text file using: readValues = readFile "Input.txt" Since the type of this is 'IO String', I can't use this in the consequent functions. For an example: I want to split this as follows within another function extractInput url method template | isURI url == True = getList values components | otherwise = [] where components = splitTemplate readValues values = getURL (splitURL url) method This gives the following error: Couldn't match type ‘IO String’ with ‘[Char]’ Expected type: String Actual type: IO String How can I solve this? Thanks in advance! -- Regards, Dananji Liyanage