[<< wikibooks] Haskell/Syntactic sugar
Syntactic sugar refers to any redundant type of syntax in a programming language that is redundant to the main syntax but which (hopefully) makes the code easier to understand or write.


== Functions and constructors ==
For more information, see the chapter More on functions


== Function Bindings ==
For more information, see the chapter Haskell/Variables_and_functions


== Lists ==
For more information, see the chapters Lists and tuples, Lists II, Lists III, Understanding monads/List and MonadPlus


== Records ==


== Do notation ==
For more information, see the chapters Understanding monads and do Notation. 


== Other constructs ==


== Literals ==
A number (such as 5) in Haskell code is interpreted as fromInteger 5, where the 5 is an Integer. This allows the literal to be interpreted as Integer, Int, Float etc. Same goes with floating point numbers such as 3.3, which are interpreted as fromRational 3.3, where 3.3 is a Rational. GHC has OverloadedStrings extension, which enables the same behaviour for string types such as String and ByteString varieties from the Data.ByteString modules.


== Type level ==
The type [Int] is equivalent to [] Int. This makes it obvious it is an application of [] type constructor (kind * -> *) to Int (kind *).
Analogously, (Bool, String) is equivalent to (,) Bool String, and the same goes with larger tuples.
Function types have the same type of sugar: Int -> Bool can also be written as (->) Int Bool.


== Layout ==
For more information on layout, see the chapter on Indentation


== Notes ==