HfT 01 02 03 04 05 06     01 02 03 04 05 06 07 08 09 10 11 12 13 14        

module Main where

hello  String
hello = "hello"

The definition of endline can be simplified by using an operator section. Leaving s out of the parenthesized concatenation creates an unnamed function with the same type as endline.

endline  String  String
endline = (++ "\n")

The $ operator applies its left argument to its right argument. Here, we use $ in place of parentheses.

main  IO ()
main = putStr $ endline hello
hello

Main.hs