Does the main-function in Haskell always start with main = do?
In java we always write: public static void main(String[] args){...} when we want to start writing a program. My question is, is it the same for Haskell, IE: can I always be sure to declare: main = do, when I want to write code for a program in Haskell? for example: main = do putStrLn "What's your name?" name <- getLine putStrLn ("Hello " ++ name) This program is going to ask the user "What's your name?" the user input will then be stored inside of the name-variable, and "Hello" ++ name will be displayed before the program terminates. Short answer : No , we have to declare a main = , but not a