I tried to run in playground my original code where the values of year, month and day entered in terminal are read by readLn.
It works in playground only using fixed values of year, month and day.
As I added this to read a year value
main = do
print "Year: "
year :: Int <- readLn
It claimed this
Main.hs:25:10: error:
Illegal type signature: ‘Int’
Type signatures are only allowed in patterns with ScopedTypeVariables
|
25 | year :: Int <- readLn
| ^^^^^^^^^^^
Removing signature does not help anything.