<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Right, I read more about it and found this out. The 'main' function is apparently magical at runtime and allows you to break the with pure functionality just once but since it can call other functions this allows for useful programs to be written.<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Jules Bean <jules@jellybean.co.uk><br>To: Gregory Propf <gregorypropf@yahoo.com><br>Cc: haskell-cafe@haskell.org<br>Sent: Monday, July 2, 2007 1:40:09 AM<br>Subject: Re: [Haskell-cafe] Re: Parsers are monadic?<br><br><div>Gregory Propf wrote:<br>> Thanks, that was helpful. I didn't realize that there were pure <br>> functional
monads.<br><br><br>Actually, it's stronger than that. All monads are pure functional, even <br>IO. Haskell is an entirely 100% pure functional language[*]. The IO <br>monad allows you to build up, in a pure, referentially transparent way, <br>an object call an 'IO action' which you have no way of actually <br>executing, per se.<br><br>Fortunately, this isn't as useless as it sounds since the runtime system <br>contains the support to "actually run" the special IO action called <br>'main', which bootstraps the whole setup.<br><br>Jules<br><br>[*] non-functions like unsafePerformIO are not technically part of the <br>haskell language!<br></div></div><br></div></div><br>
<hr size=1>Now that's room service! <a href="http://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--
">Choose from over 150,000 hotels <br>in 45,000 destinations on Yahoo! Travel</a> to find your fit.</body></html>