ghc -o test test.hc
test.hc:1:1: error:
warning: data definition has no type or storage class
main = putStrLn "Hello"
^~~~
test.hc:1:1: error:
warning: type defaults to ‘int’ in declaration of ‘main’ [-Wimplicit-int]
test.hc:1:8: error:
error: ‘putStrLn’ undeclared here (not in a function)
main = putStrLn "Hello"
^~~~~~~~
test.hc:1:17: error:
error: expected ‘,’ or ‘;’ before string constant
main = putStrLn "Hello"
^~~~~~~
`gcc' failed in phase `C Compiler'. (Exit code: 1)
.hc? ты уверен?
Обсуждают сегодня