I am taking input from the user and the code is as follows:
putStrLn $ "Enter number"
num <- getLine
main = print $ num
When I run this code, the compiler gives following error:
ra.hs:10:5: parse error on input `<-'
How can I remove this error? I have tried to use spaces, as well as tab characters, but the error persists. Please help.