[Haskell-cafe] do

jerzy.karczmarczuk at info.unicaen.fr jerzy.karczmarczuk at info.unicaen.fr
Sat Oct 13 18:47:12 EDT 2007

PR Stanley wrote:
>>> Hi
>>> "do", what's its role?
>>> I know a few uses for it but can't quite understand the semantics - e.g. 
>>> do putStrLn "bla bla"
>>> So, what does do, do?

> On Sat, 13 Oct 2007, Henning Thielemann wrote:

>> It's syntactic sugar. 
>> http://www.haskell.org/onlinereport/exps.html#sect3.14


Actually, there is a SURGEON GENERAL'S WARNING: the "do" construct is a
syntactic Monosodium Glutamate (MSG), known sometimes as Syntactic
Ajinomoto. Whether it is responsable for the Syntactic Chinese Restaurant
Syndrom or not, is under investigation. 

Whether it increases really the flavour of the Monosod... argh... Monadic
meals, it depends on your metabolism, and of your preferred table tools.
People enjoying the consumption of long, long spaghetti use rarely
chopstics, and prefer efficient forks like >>=, ==><<=<<, etc. 

Jerzy Karczmarczuk 

More information about the Haskell-Cafe mailing list