I have an haskell problem. putStrLn is supposed to take a [Char], or a String, and even though it seems like I give that to mr Compiler, he still complains.
*** Expression : putStrLn line
*** Term : line
*** Type : Char
*** Does not match : [Char]
The code that it refers to is this:
getV::[[(Char,Float)]] -> IO ()
getV [] = putStrLn ""
getV (x:xs) = do line <- getS x
putStrLn line <-- Complaining line
getV xs
getS::[(Char,Float)] -> String
getS [] = ""
getS ((c,f):str) = do a <- "(L" ++ [c] ++")" ++ getS str
return a
I did strip it a little bit, but it should be exactly the same behaviour. getS do return a String and that string is the argument for putStrLn. So what is the problem? :/