Q:

whats the difference between getLine, readLn and print and putStrLn

I'm trying to read 2 values and add them.  When I do this: 
add a b = a + b

main = do
    x <- readLn
    y <- readLn
    let sum = add x y
    print sum

it works.  But when I do this: 
add a b = a + b

main = do
    x <- getLine
    y <- getLine
    let sum = add x y
    print sum

it doesn't.  I would like to know why.  

A:

getLine has getLine :: IO String type
That's why in this line x <- getLine, x gets String value, but (+) :: Num a => a -> a -> a is only defined for Num instances. 
readLn :: Read a => IO a gets the line and read the value, i.e. parses a string and returns a value of a particular type. 
Thus, readLn is the same as read <$> getLine.