
27 Jan
2022
27 Jan
'22
7:21 a.m.
Hello Francesco,
Thanks for your help.
Francesco Ariis
Simple quiz: do you understand why
main :: IO () main = "prova"
That returns a String rather than an "IO something".
does nor work (nor compile) while
main :: IO () main = putStrLn "prova"
does?
putStrLn returns an "IO something" and so is campatible with the type of main. Thank you for the help & encouragement. Roger