... = do let part1 = getLeft keyno orgFile let part2 = getRight keyno orgFile let total = part1 ++ (strUpper key) ++ part2 ++ "\n" ... <- ... getLeft/getRight do not return monadic actions (String -> String -> String, not String -> String -> IO String), so you just bind them using "let" Regards, Michael