\n dont work in haskell

In Haskell, the newline character \n is not used to represent a line break. Instead, you can use the putStrLn function to print a string followed by a newline character. Here's an example:

main :: IO ()
main = do
  putStrLn "Hello"
  putStrLn "World"

This code will output:


Please note that the putStrLn function automatically adds a newline character at the end of the string. If you want to print a string without a newline character, you can use the putStr function instead.