haskell print hello world code example
Example 1: haskell print
-- Use 'putStrLn' to print
ghci> putStrLn "Hello World!"
Hello World!
-- Type of 'putStrLn' function
ghci> :t putStrLn
putStrLn :: String -> IO ()
Example 2: hello world in haskell
main :: IO ()
main = putStrLn "Hello, World!"