adding all of botlist, initial add
[botlist.git] / botlistprojects / botspider / spider / var / lib / spiderdb / examples / dump / _good_haskell_01.html
blobfab62c2366deb423f1ab94858a8f076af74bf8cd
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <meta name="keywords" content="Haskell (programming language),Articles with unsourced statements since February 2007,ANSI C,APL (programming language),Algebraic data type,Association for Computing Machinery,Audrey Tang,Bluespec, Inc.,Bytecode,C-- (intermediate language),CAL (Quark Framework)" />
6 <link rel="shortcut icon" href="/favicon.ico" />
7 <link rel="search" type="application/opensearchdescription+xml" href="/w/opensearch_desc.php" title="Wikipedia (English)" />
8 <link rel="copyright" href="http://www.gnu.org/copyleft/fdl.html" />
9 <link rel="alternate" type="application/rss+xml" title="Wikipedia RSS Feed" href="http://en.wikipedia.org/w/index.php?title=Special:Recentchanges&amp;feed=rss" />
10 <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom Feed" href="http://en.wikipedia.org/w/index.php?title=Special:Recentchanges&amp;feed=atom" />
11 <title>Haskell (programming language) - Wikipedia, the free encyclopedia</title>
12 <style type="text/css" media="screen, projection">/*<![CDATA[*/
13 @import "/skins-1.5/common/shared.css?104";
14 @import "/skins-1.5/monobook/main.css?104";
15 /*]]>*/</style>
16 <link rel="stylesheet" type="text/css" media="print" href="/skins-1.5/common/commonPrint.css?104" />
17 <!--[if lt IE 5.5000]><style type="text/css">@import "/skins-1.5/monobook/IE50Fixes.css?104";</style><![endif]-->
18 <!--[if IE 5.5000]><style type="text/css">@import "/skins-1.5/monobook/IE55Fixes.css?104";</style><![endif]-->
19 <!--[if IE 6]><style type="text/css">@import "/skins-1.5/monobook/IE60Fixes.css?104";</style><![endif]-->
20 <!--[if IE 7]><style type="text/css">@import "/skins-1.5/monobook/IE70Fixes.css?104";</style><![endif]-->
21 <!--[if lt IE 7]><script type="text/javascript" src="/skins-1.5/common/IEFixes.js?104"></script>
22 <meta http-equiv="imagetoolbar" content="no" /><![endif]-->
24 <script type= "text/javascript">/*<![CDATA[*/
25 var skin = "monobook";
26 var stylepath = "/skins-1.5";
27 var wgArticlePath = "/wiki/$1";
28 var wgScriptPath = "/w";
29 var wgScript = "/w/index.php";
30 var wgServer = "http://en.wikipedia.org";
31 var wgCanonicalNamespace = "";
32 var wgCanonicalSpecialPageName = false;
33 var wgNamespaceNumber = 0;
34 var wgPageName = "Haskell_(programming_language)";
35 var wgTitle = "Haskell (programming language)";
36 var wgAction = "view";
37 var wgRestrictionEdit = [];
38 var wgRestrictionMove = [];
39 var wgArticleId = "13630";
40 var wgIsArticle = true;
41 var wgUserName = null;
42 var wgUserGroups = null;
43 var wgUserLanguage = "en";
44 var wgContentLanguage = "en";
45 var wgBreakFrames = false;
46 var wgCurRevisionId = "184140797";
47 /*]]>*/</script>
49 <script type="text/javascript" src="/skins-1.5/common/wikibits.js?104"><!-- wikibits js --></script>
50 <!-- Head Scripts -->
51 <script type="text/javascript" src="/skins-1.5/common/ajax.js?104"></script>
52 <script type="text/javascript" src="/w/index.php?title=-&amp;action=raw&amp;gen=js&amp;useskin=monobook"><!-- site js --></script>
53 <style type="text/css">/*<![CDATA[*/
54 @import "/w/index.php?title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=2678400";
55 @import "/w/index.php?title=MediaWiki:Monobook.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=2678400";
56 @import "/w/index.php?title=-&action=raw&gen=css&maxage=2678400";
57 /*]]>*/</style>
58 </head>
59 <body class="mediawiki ns-0 ltr page-Haskell_programming_language">
60 <div id="globalWrapper">
61 <div id="column-content">
62 <div id="content">
63 <a name="top" id="top"></a>
64 <h1 class="firstHeading">Haskell (programming language)</h1>
65 <div id="bodyContent">
66 <h3 id="siteSub">From Wikipedia, the free encyclopedia</h3>
67 <div id="contentSub"></div>
68 <div id="jump-to-nav">Jump to: <a href="#column-one">navigation</a>, <a href="#searchInput">search</a></div> <!-- start content -->
69 <table class="infobox" cellspacing="5" style="width: 21em; font-size: 90%; text-align: left;">
70 <tr>
71 <th colspan="2" style="text-align: center; font-size: 130%;">Haskell</th>
72 </tr>
73 <tr>
74 <th colspan="2" style="text-align: center;"><a href="/wiki/Image:Haskell_Logo.jpg" class="image" title="Image:Haskell Logo.jpg"><img alt="Image:Haskell Logo.jpg" src="http://upload.wikimedia.org/wikipedia/en/0/0f/Haskell_Logo.jpg" width="185" height="176" border="0" /></a></th>
75 </tr>
76 <tr>
77 <th><a href="/wiki/Programming_paradigm" title="Programming paradigm">Paradigm</a></th>
78 <td><a href="/wiki/Functional_programming" title="Functional programming">functional</a>, non-strict, modular</td>
79 </tr>
80 <tr>
81 <th>Appeared in</th>
82 <td>1990</td>
83 </tr>
84 <tr>
85 <th>Designed by</th>
86 <td><a href="/wiki/Simon_Peyton-Jones" title="Simon Peyton-Jones">Simon Peyton-Jones</a>, <a href="/w/index.php?title=Paul_Hudak&amp;action=edit" class="new" title="Paul Hudak">Paul Hudak</a><sup id="_ref-0" class="reference"><a href="#_note-0" title="">[1]</a></sup>, <a href="/wiki/Philip_Wadler" title="Philip Wadler">Philip Wadler</a>, et al</td>
87 </tr>
88 <tr>
89 <th><a href="/wiki/Type_system" title="Type system">Typing discipline</a></th>
90 <td><a href="/wiki/Static_typing" title="Static typing">static</a>, <a href="/wiki/Strong_typing" title="Strong typing">strong</a>, <a href="/wiki/Type_inference" title="Type inference">inferred</a></td>
91 </tr>
92 <tr>
93 <th><a href="/wiki/Implementation" title="Implementation">Major implementations</a></th>
94 <td><a href="/wiki/Glasgow_Haskell_Compiler" title="Glasgow Haskell Compiler">GHC</a>, <a href="/wiki/Hugs" title="Hugs">Hugs</a>, <a href="http://www.cs.york.ac.uk/fp/nhc98/" class="external text" title="http://www.cs.york.ac.uk/fp/nhc98/" rel="nofollow">NHC</a>, <a href="http://repetae.net/john/computer/jhc/" class="external text" title="http://repetae.net/john/computer/jhc/" rel="nofollow">JHC</a>, <a href="/wiki/Yhc" title="Yhc">Yhc</a></td>
95 </tr>
96 <tr>
97 <th><a href="/wiki/Programming_language_dialect" title="Programming language dialect">Dialects</a></th>
98 <td><a href="/wiki/Helium_%28Haskell%29" title="Helium (Haskell)">Helium</a>, <a href="/wiki/Gofer_%28software%29" title="Gofer (software)">Gofer</a></td>
99 </tr>
100 <tr>
101 <th>Influenced by</th>
102 <td><a href="/wiki/Lisp_%28programming_language%29" title="Lisp (programming language)">Lisp</a> and <a href="/wiki/Scheme_%28programming_language%29" title="Scheme (programming language)">Scheme</a>, <a href="/wiki/ISWIM" title="ISWIM">ISWIM</a>, <a href="/wiki/FP_%28programming_language%29" title="FP (programming language)">FP</a>, <a href="/wiki/APL_%28programming_language%29" title="APL (programming language)">APL</a>, <a href="/wiki/Hope_%28programming_language%29" title="Hope (programming language)">Hope and Hope+</a>, <a href="/wiki/SISAL" title="SISAL">SISAL</a>, <a href="/wiki/Miranda_programming_language" title="Miranda programming language">Miranda</a>, <a href="/wiki/ML_programming_language" title="ML programming language">ML and Standard ML</a>, <a href="/wiki/Lazy_ML" title="Lazy ML">Lazy ML</a>, <a href="/wiki/Orwell_%28programming_language%29" title="Orwell (programming language)">Orwell</a>, <a href="/w/index.php?title=Alfl&amp;action=edit" class="new" title="Alfl">Alfl</a>, <a href="/wiki/Id_%28programming_language%29" title="Id (programming language)">Id</a>, <a href="/w/index.php?title=Ponder_%28programming_language%29&amp;action=edit" class="new" title="Ponder (programming language)">Ponder</a></td>
103 </tr>
104 <tr>
105 <th>Influenced</th>
106 <td><a href="/wiki/Hardware_description_language" title="Hardware description language">Bluespec</a>, <a href="/wiki/C_Sharp_%28programming_language%29" title="C Sharp (programming language)">C#</a>, <a href="/wiki/CAL_%28Quark_Framework%29" title="CAL (Quark Framework)">CAL</a>, <a href="/wiki/Cat_%28programming_language%29" title="Cat (programming language)">Cat</a>, <a href="/wiki/Cayenne_%28programming_language%29" title="Cayenne (programming language)">Cayenne</a>, <a href="/wiki/Clean_%28programming_language%29" title="Clean (programming language)">Clean</a>, <a href="/wiki/Curry_%28programming_language%29" title="Curry (programming language)">Curry</a>, <a href="/wiki/Epigram_%28programming_language%29" title="Epigram (programming language)">Epigram</a>, <a href="/wiki/Escher_%28programming_language%29" title="Escher (programming language)">Escher</a>, <a href="/wiki/F_Sharp_%28programming_language%29" title="F Sharp (programming language)">F#</a>, <a href="/wiki/Factor_%28programming_language%29" title="Factor (programming language)">Factor</a>, <a href="/wiki/Isabelle_theorem_prover" title="Isabelle theorem prover">Isabelle</a>, <a href="/wiki/Mercury_%28programming_language%29" title="Mercury (programming language)">Mercury</a>, <a href="/wiki/Perl_6" title="Perl 6">Perl 6</a>, <a href="/wiki/Python_%28programming_language%29" title="Python (programming language)">Python</a>, <a href="/wiki/Scala_%28programming_language%29" title="Scala (programming language)">Scala</a></td>
107 </tr>
108 <tr>
109 <th><a href="/wiki/Operating_system" title="Operating system">OS</a></th>
110 <td>portable</td>
111 </tr>
112 <tr>
113 <th><a href="/wiki/Website" title="Website">Website</a></th>
114 <td><a href="http://haskell.org/" class="external text" title="http://haskell.org/" rel="nofollow">haskell.org</a></td>
115 </tr>
116 </table>
117 <p><b>Haskell</b> is a standardized <a href="/wiki/Purely_functional" title="Purely functional">purely functional</a> <a href="/wiki/Programming_language" title="Programming language">programming language</a> with <a href="/wiki/Non-strict_programming_language" title="Non-strict programming language">non-strict semantics</a>, named after the <a href="/wiki/Logician" title="Logician">logician</a> <a href="/wiki/Haskell_Curry" title="Haskell Curry">Haskell Curry</a>.</p>
118 <table id="toc" class="toc" summary="Contents">
119 <tr>
120 <td>
121 <div id="toctitle">
122 <h2>Contents</h2>
123 </div>
124 <ul>
125 <li class="toclevel-1"><a href="#History"><span class="tocnumber">1</span> <span class="toctext">History</span></a></li>
126 <li class="toclevel-1"><a href="#Features_and_extensions"><span class="tocnumber">2</span> <span class="toctext">Features and extensions</span></a></li>
127 <li class="toclevel-1"><a href="#Applications"><span class="tocnumber">3</span> <span class="toctext">Applications</span></a></li>
128 <li class="toclevel-1"><a href="#Examples"><span class="tocnumber">4</span> <span class="toctext">Examples</span></a>
129 <ul>
130 <li class="toclevel-2"><a href="#More_complex_examples"><span class="tocnumber">4.1</span> <span class="toctext">More complex examples</span></a></li>
131 </ul>
132 </li>
133 <li class="toclevel-1"><a href="#Criticism"><span class="tocnumber">5</span> <span class="toctext">Criticism</span></a></li>
134 <li class="toclevel-1"><a href="#Implementations"><span class="tocnumber">6</span> <span class="toctext">Implementations</span></a></li>
135 <li class="toclevel-1"><a href="#See_also"><span class="tocnumber">7</span> <span class="toctext">See also</span></a></li>
136 <li class="toclevel-1"><a href="#References"><span class="tocnumber">8</span> <span class="toctext">References</span></a></li>
137 <li class="toclevel-1"><a href="#External_links"><span class="tocnumber">9</span> <span class="toctext">External links</span></a>
138 <ul>
139 <li class="toclevel-2"><a href="#Tutorials"><span class="tocnumber">9.1</span> <span class="toctext">Tutorials</span></a></li>
140 </ul>
141 </li>
142 </ul>
143 </td>
144 </tr>
145 </table>
146 <script type="text/javascript">
147 //<![CDATA[
148 if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); }
149 //]]>
150 </script>
151 <p><a name="History" id="History"></a></p>
152 <h2><span class="editsection">[<a href="/w/index.php?title=Haskell_%28programming_language%29&amp;action=edit&amp;section=1" title="Edit section: History">edit</a>]</span> <span class="mw-headline">History</span></h2>
153 <p>Following the release of <a href="/wiki/Miranda_programming_language" title="Miranda programming language">Miranda</a>, in 1985, functional languages proliferated. By 1987, there existed more than a dozen non-strict, purely functional programming languages. Of these <a href="/wiki/Miranda_programming_language" title="Miranda programming language">Miranda</a> was the most widely used, but was proprietary. At the conference on Functional Programming Languages and Computer Architecture (FPCA '87) in <a href="/wiki/Portland%2C_Oregon" title="Portland, Oregon">Portland, Oregon</a>, a meeting was held during which strong consensus was found among the participants that a committee should be formed to define an <a href="/wiki/Open_standard" title="Open standard">open standard</a> for such languages. This would have the express purpose of consolidating the existing languages into a common one that would serve as a basis for future research in language design.<sup id="_ref-1" class="reference"><a href="#_note-1" title="">[2]</a></sup> The first version of Haskell ("Haskell 1.0") was defined in 1990.<sup id="_ref-2" class="reference"><a href="#_note-2" title="">[3]</a></sup> The committee's efforts resulted in a series of language definitions, which in late 1997, culminated in <b>Haskell 98</b>, intended to specify a stable, minimal, portable version of the language and an accompanying standard <a href="/wiki/Library_%28computer_science%29" title="Library (computer science)">library</a> for teaching, and as a base for future extensions. The committee expressly welcomed the creation of extensions and variants of Haskell 98 via adding and incorporating experimental features.</p>
154 <p>In January 1999, the Haskell 98 language standard was originally published as "The Haskell 98 Report". In January 2003, a revised version was published as "Haskell 98 Language and Libraries: The Revised Report".<sup id="_ref-Revised_report_0" class="reference"><a href="#_note-Revised_report" title="">[4]</a></sup> The language continues to evolve rapidly, with the <a href="/wiki/Hugs" title="Hugs">Hugs</a> and <a href="/wiki/Glasgow_Haskell_Compiler" title="Glasgow Haskell Compiler">GHC</a> implementation (see below) representing the current <i>de facto</i> standard. In early 2006, the process of defining a successor to the Haskell 98 standard, informally named <b>Haskell′</b> ("Haskell Prime"), was begun.<sup id="_ref-3" class="reference"><a href="#_note-3" title="">[5]</a></sup> This process is intended to produce a minor revision of Haskell 98.<sup id="_ref-4" class="reference"><a href="#_note-4" title="">[6]</a></sup></p>
155 <p><a name="Features_and_extensions" id="Features_and_extensions"></a></p>
156 <h2><span class="editsection">[<a href="/w/index.php?title=Haskell_%28programming_language%29&amp;action=edit&amp;section=2" title="Edit section: Features and extensions">edit</a>]</span> <span class="mw-headline">Features and extensions</span></h2>
157 <p>Characteristic features of Haskell include <a href="/wiki/Pattern_matching" title="Pattern matching">pattern matching</a>, <a href="/wiki/Currying" title="Currying">currying</a>, <a href="/wiki/List_comprehension" title="List comprehension">list comprehensions</a> <sup id="_ref-5" class="reference"><a href="#_note-5" title="">[7]</a></sup>, <a href="/wiki/Guard_%28computing%29" title="Guard (computing)">guards</a>, definable <a href="/wiki/Operator_%28programming%29" title="Operator (programming)">operators</a>, and <a href="/wiki/Single_assignment" title="Single assignment">single assignment</a>. The language also supports <a href="/wiki/Recursion" title="Recursion">recursive</a> functions and <a href="/wiki/Algebraic_data_type" title="Algebraic data type">algebraic data types</a>, as well as <a href="/wiki/Lazy_evaluation" title="Lazy evaluation">lazy evaluation</a>. Unique concepts include <a href="/wiki/Monads_in_functional_programming" title="Monads in functional programming">monads</a>, and <a href="/wiki/Type_class" title="Type class">type classes</a>. The combination of such features can make <a href="/wiki/Function_%28programming%29" title="Function (programming)">functions</a> which would be difficult to write in a <a href="/wiki/Procedural_programming_language" title="Procedural programming language">procedural programming language</a> almost trivial to implement in Haskell.</p>
158 <p>Several variants have been developed: parallelizable versions from <a href="/wiki/Massachusetts_Institute_of_Technology" title="Massachusetts Institute of Technology">MIT</a> and <a href="/wiki/Glasgow_University" title="Glasgow University">Glasgow</a>, both called Parallel Haskell; more parallel and distributed versions called <a href="/w/index.php?title=Distributed_Haskell&amp;action=edit" class="new" title="Distributed Haskell">Distributed Haskell</a> (formerly Goffin) and <a href="/w/index.php?title=Eden_programming_language&amp;action=edit" class="new" title="Eden programming language">Eden</a>; a <a href="/wiki/Speculative_execution" title="Speculative execution">speculatively evaluating</a> version called <a href="/wiki/Eager_Haskell" title="Eager Haskell">Eager Haskell</a> and several <a href="/wiki/Object_orientation" title="Object orientation">object oriented</a> versions: Haskell++, <a href="/wiki/O%27Haskell" title="O'Haskell">O'Haskell</a> and <a href="/wiki/Mondrian_programming_language" title="Mondrian programming language">Mondrian</a>.</p>
159 <p>There is also a Haskell-like language that offers a new method of support for <a href="/wiki/GUI" title="GUI">GUI</a> development called <a href="/wiki/Clean_%28programming_language%29" title="Clean (programming language)">Concurrent Clean</a>. Its biggest deviations from Haskell are use of <a href="/wiki/Uniqueness_type" title="Uniqueness type">uniqueness types</a> for input instead of <a href="/wiki/Monads_in_functional_programming" title="Monads in functional programming">monads</a>.</p>
160 <p><a name="Applications" id="Applications"></a></p>
161 <h2><span class="editsection">[<a href="/w/index.php?title=Haskell_%28programming_language%29&amp;action=edit&amp;section=3" title="Edit section: Applications">edit</a>]</span> <span class="mw-headline">Applications</span></h2>
162 <p>Although Haskell has a comparatively small user community, its strengths have been well applied to a few projects. <a href="/wiki/Audrey_Tang" title="Audrey Tang">Audrey Tang</a>'s <a href="/wiki/Pugs" title="Pugs">Pugs</a> is an implementation for the long-term forthcoming <a href="/wiki/Perl_6" title="Perl 6">Perl 6</a> language with an interpreter and compilers that proved useful already after just a few months of its writing; similarly, GHC is often a testbed for advanced functional programming features and optimizations. <a href="/wiki/Darcs" title="Darcs">Darcs</a> is a revision control system, with several innovative features. <a href="/wiki/Linspire" title="Linspire">Linspire</a> GNU/Linux chose Haskell for system tools development.<sup id="_ref-6" class="reference"><a href="#_note-6" title="">[8]</a></sup> <a href="/wiki/Xmonad" title="Xmonad">Xmonad</a> is a <a href="/wiki/Window_manager" title="Window manager">window manager</a> for the <a href="/wiki/X_Window_System" title="X Window System">X Window System</a>, written entirely in Haskell. <a href="/w/index.php?title=Bluespec_SystemVerilog&amp;action=edit" class="new" title="Bluespec SystemVerilog">Bluespec SystemVerilog</a> is a language for semiconductor design that is an extension of Haskell. Additionally, <a href="/wiki/Bluespec%2C_Inc." title="Bluespec, Inc.">Bluespec, Inc.</a>'s tools are implemented in Haskell.</p>
163 <p><a name="Examples" id="Examples"></a></p>
164 <h2><span class="editsection">[<a href="/w/index.php?title=Haskell_%28programming_language%29&amp;action=edit&amp;section=4" title="Edit section: Examples">edit</a>]</span> <span class="mw-headline">Examples</span></h2>
165 <p>A simple example that is often used to demonstrate the syntax of <a href="/wiki/Functional_language" title="Functional language">functional languages</a> is the <a href="/wiki/Factorial" title="Factorial">factorial</a> function for positive integers, shown in Haskell:</p>
166 <pre>
167 fac :: Integer -&gt; Integer
168 fac 0 = 1
169 fac n | n &gt; 0 = n * fac (n-1)
170 </pre>
171 <p>Or in one line:</p>
172 <pre>
173 fac n = if n &gt; 0 then n * fac (n-1) else 1
174 </pre>
175 <p>This describes the factorial as a recursive function, with one terminating base case. It is similar to the descriptions of factorials found in mathematics textbooks. Much of Haskell code is similar to standard mathematical notation in facility and syntax.</p>
176 <p>The first line of the factorial function describes the <i>types</i> of this function; while it is optional, it is considered to be good style<a href="http://www.haskell.org/haskellwiki/Type_signatures_as_good_style" class="external autonumber" title="http://www.haskell.org/haskellwiki/Type_signatures_as_good_style" rel="nofollow">[2]</a> to include it. It can be read as <i>the function fac</i> (<tt>fac</tt>) <i>has type</i> (<tt>::</tt>) <i>from integer to integer</i> (<tt>Integer -&gt; Integer</tt>). That is, it takes an integer as an argument, and returns another integer. The type of a definition is inferred automatically if the programmer didn't supply a type annotation.</p>
177 <p>The second line relies on <a href="/wiki/Pattern_matching" title="Pattern matching">pattern matching</a>, an important feature of Haskell. Note that parameters of a function are not in parentheses but separated by spaces. When the function's argument is 0 (zero) it will return the integer 1 (one). For all other cases the third line is tried. This is the <a href="/wiki/Recursion" title="Recursion">recursion</a>, and executes the function again until the base case is reached.</p>
178 <p>A <a href="/wiki/Guard_%28computing%29" title="Guard (computing)">guard</a> protects the third line from negative numbers for which a factorial is undefined. Without the guard this function would recurse through all negative numbers without ever reaching the base case of 0. As it is, the pattern matching is not complete: if a negative integer is passed to the fac function as an argument, the program will fail with a runtime error. A final case could check for this error condition and print an appropriate error message instead.</p>
179 <p>The "Prelude" is a number of small functions analogous to <a href="/wiki/C_%28programming_language%29" title="C (programming language)">C</a>'s <a href="/wiki/C_standard_library" title="C standard library">standard library</a>. Using the Prelude and writing in the point-free style<a href="http://haskell.org/haskellwiki/Pointfree" class="external autonumber" title="http://haskell.org/haskellwiki/Pointfree" rel="nofollow">[3]</a> of unspecified arguments, it becomes:</p>
180 <pre>
181 fac = product . enumFromTo 1
182 </pre>
183 <p>The above is close to mathematical definitions such as <img class="tex" alt="f = g \circ h" src="http://upload.wikimedia.org/math/9/4/3/943418c96ee6e370d6d5ff2594cdb9fb.png" /> (see <a href="/wiki/Function_composition" title="Function composition">function composition</a>) with the dot acting as the <a href="/wiki/Function_composition_operator" title="Function composition operator">function composition operator</a>, and indeed, it is <i>not</i> an assignment of a numeric value to a variable.</p>
184 <p>In the Hugs interpreter, you often need to define the function and use it on the same line separated by a <tt>where</tt> or <tt>let</tt>..<tt>in</tt>, meaning you need to enter this to test the above examples and see the output <tt>120</tt>:</p>
185 <pre>
186 let { fac 0 = 1; fac n | n &gt; 0 = n * fac (n-1) } in fac 5
187 </pre>
188 <p>or</p>
189 <pre>
190 fac 5 where fac = product . enumFromTo 1
191 </pre>
192 <p>The GHCi interpreter doesn't have this restriction and function definitions can be entered on one line and referenced later.</p>
193 <p><a name="More_complex_examples" id="More_complex_examples"></a></p>
194 <h3><span class="editsection">[<a href="/w/index.php?title=Haskell_%28programming_language%29&amp;action=edit&amp;section=5" title="Edit section: More complex examples">edit</a>]</span> <span class="mw-headline">More complex examples</span></h3>
195 <p>A simple <a href="/wiki/Reverse_Polish_Notation" title="Reverse Polish Notation">Reverse Polish Notation</a> calculator expressed with the <a href="/wiki/Higher-order_function" title="Higher-order function">higher-order function</a> <code><a href="/wiki/Foldl" title="Foldl">foldl</a></code> whose argument <i>f</i> is defined in a <i>where</i> clause using <a href="/wiki/Pattern_matching" title="Pattern matching">pattern matching</a> and the <a href="/wiki/Type_class" title="Type class">type class</a> <i>Read</i>:</p>
196 <pre>
197 calc :: String -&gt; [Float]
198 calc = foldl f [] . words
199 where
200 f (x:y:zs) "+" = y+x:zs
201 f (x:y:zs) "-" = y-x:zs
202 f (x:y:zs) "*" = y*x:zs
203 f (x:y:zs) "/" = y/x:zs
204 f xs y = read y : xs
205 </pre>
206 <p>The empty list is the initial state, and <i>f</i> <a href="/wiki/Interpreter_%28computing%29" title="Interpreter (computing)">interprets</a> one word at a time, either matching two numbers from the head of the list and pushing the result back in, or parsing the word as a <a href="/wiki/Floating-point_number" title="Floating-point number">floating-point number</a> and prepending it to the list.</p>
207 <p>The following definition produces the list of <a href="/wiki/Fibonacci_numbers" title="Fibonacci numbers">Fibonacci numbers</a> in linear time:</p>
208 <pre>
209 fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
210 </pre>
211 <p>The infinite list is produced by <a href="/wiki/Corecursion" title="Corecursion">corecursion</a> — the latter values of the list are computed on demand starting from the initial two items 0 and 1. This kind of a definition is an instance of <a href="/wiki/Lazy_evaluation" title="Lazy evaluation">lazy evaluation</a> and an important part of Haskell programming. For an example of how the evaluation evolves, the following illustrates the values of <i>fibs</i> and <i>tail fibs</i> after the computation of six items and shows how <i>zipWith (+)</i> has produced four items and proceeds to produce the next item:</p>
212 <pre>
213 fibs = 0 : 1 : 1 : 2 : 3 : 5 : ...
214 + + + + + +
215 tail fibs = 1 : 1 : 2 : 3 : 5 : ...
216 = = = = = =
217 zipWith ... = 1 : 2 : 3 : 5 : <b>8</b> : ...
218 fibs = 0 : 1 : 1 : 2 : 3 : 5 : <b>8</b> : ...
219 </pre>
220 <p>The same function, written using GHC's <a href="/wiki/Parallel_list_comprehension" title="Parallel list comprehension">parallel list comprehension</a> syntax (GHC extensions must be enabled using a special command-line flag '-fglasgow-exts'; see GHC's manual for more):</p>
221 <pre>
222 fibs = 0 : 1 : [ a+b | a &lt;- fibs | b &lt;- tail fibs ]
223 </pre>
224 <p>The factorial we saw previously can be written as a sequence of functions:</p>
225 <pre>
226 fac n = (foldl (.) id [\x -&gt; x*k | k &lt;- [1..n]]) 1
227 </pre>
228 <p>A remarkably concise function that returns the list of <a href="/wiki/Hamming_numbers" title="Hamming numbers">Hamming numbers</a> in order:</p>
229 <pre>
230 hamming = 1 : map (2*) hamming `merge` map (3*) hamming `merge` map (5*) hamming
231 where merge (x:xs) (y:ys)
232 | x &lt; y = x : xs `merge` (y:ys)
233 | x &gt; y = y : (x:xs) `merge` ys
234 | otherwise = x : xs `merge` ys
235 </pre>
236 <p>Like the various <code>fibs</code> solutions displayed above, this uses corecursion to produce a list of numbers on demand, starting from the base case of 1 and building new items based on the preceding part of the list.</p>
237 <p>In this case the producer <code>merge</code> is defined in a <code>where</code> clause and used as an operator by enclosing it in back-quotes. The branches of the guards define how <code>merge</code> merges two ascending lists into one ascending list without duplicate items.</p>
238 <dl>
239 <dd><i>See also <a href="http://en.wikibooks.org/wiki/Transwiki:List_of_hello_world_programs#Haskell" class="extiw" title="wikibooks:Transwiki:List_of_hello_world_programs">wikibooks:Transwiki:List of hello world programs#Haskell</a> for an example that prints text.</i></dd>
240 </dl>
241 <p><a name="Criticism" id="Criticism"></a></p>
242 <h2><span class="editsection">[<a href="/w/index.php?title=Haskell_%28programming_language%29&amp;action=edit&amp;section=6" title="Edit section: Criticism">edit</a>]</span> <span class="mw-headline">Criticism</span></h2>
243 <p>While Haskell has many advanced features not found in many other programming languages, some of these features have been criticized as making the language too complex or difficult to understand. In addition, there are complaints stemming from the purity of Haskell and its theoretical roots.<sup class="noprint Template-Fact"><span title="This claim needs references to reliable sources&#160;since February 2007" style="white-space: nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed">citation needed</a></i>]</span></sup></p>
244 <p>Jan-Willem Maessen, in 2002, and <a href="/wiki/Simon_Peyton_Jones" title="Simon Peyton Jones">Simon Peyton Jones</a>, in 2003, discussed problems associated with lazy evaluation while also acknowledging the theoretical motivation for it<sup id="_ref-7" class="reference"><a href="#_note-7" title="">[9]</a></sup><sup id="_ref-8" class="reference"><a href="#_note-8" title="">[10]</a></sup>, in addition to purely practical considerations such as improved performance.<sup id="_ref-9" class="reference"><a href="#_note-9" title="">[11]</a></sup> They note that, in addition to adding some performance overhead, laziness makes it more difficult for programmers to reason about the performance of their code (specifically with regard to space usage).</p>
245 <p><a href="/w/index.php?title=Bastiaan_Heeren&amp;action=edit" class="new" title="Bastiaan Heeren">Bastiaan Heeren</a>, <a href="/w/index.php?title=Daan_Leijen&amp;action=edit" class="new" title="Daan Leijen">Daan Leijen</a>, and <a href="/w/index.php?title=Arjan_van_IJzendoorn&amp;action=edit" class="new" title="Arjan van IJzendoorn">Arjan van IJzendoorn</a> in 2003 also observed some stumbling blocks for Haskell learners, "<i>The subtle syntax and sophisticated type system of Haskell are a double edged sword -- highly appreciated by experienced programmers but also a source of frustration among beginners, since the generality of Haskell often leads to cryptic error messages.</i>" <sup id="_ref-10" class="reference"><a href="#_note-10" title="">[12]</a></sup> To address these, they developed an advanced interpreter called <a href="/wiki/Helium_%28Haskell%29" title="Helium (Haskell)">Helium</a> which improved the user-friendliness of error messages by limiting the generality of some Haskell features, and in particular removing support for type classes.</p>
246 <p><a name="Implementations" id="Implementations"></a></p>
247 <h2><span class="editsection">[<a href="/w/index.php?title=Haskell_%28programming_language%29&amp;action=edit&amp;section=7" title="Edit section: Implementations">edit</a>]</span> <span class="mw-headline">Implementations</span></h2>
248 <p>The following all comply fully, or very nearly, with the Haskell 98 standard, and are distributed under <a href="/wiki/Open_source" title="Open source">open source</a> licenses. There are currently no proprietary Haskell implementations.</p>
249 <ul>
250 <li>The <b><a href="/wiki/Glasgow_Haskell_Compiler" title="Glasgow Haskell Compiler">Glasgow Haskell Compiler</a></b> compiles to native code on a number of different architectures—as well as to <a href="/wiki/ANSI_C" title="ANSI C">ANSI C</a>—using <a href="/wiki/C--_%28intermediate_language%29" title="C-- (intermediate language)">C--</a> as an <a href="/wiki/Intermediate_language" title="Intermediate language">intermediate language</a>. GHC is probably the most popular Haskell compiler, and there are quite a few useful libraries (e.g. bindings to <a href="/wiki/OpenGL" title="OpenGL">OpenGL</a>) that will work only with GHC.</li>
251 <li><b><a href="/wiki/Gofer_%28software%29" title="Gofer (software)">Gofer</a></b> was an educational dialect of Haskell, with a feature called "constructor classes", developed by Mark Jones. It was supplanted by Hugs (see below).</li>
252 <li><b><a href="http://www.cs.chalmers.se/~augustss/hbc/hbc.html" class="external text" title="http://www.cs.chalmers.se/~augustss/hbc/hbc.html" rel="nofollow">HBC</a></b> is another native-code Haskell compiler. It has not been actively developed for some time but is still usable.</li>
253 <li><b><a href="/wiki/Helium_%28Haskell%29" title="Helium (Haskell)">Helium</a></b> is a newer dialect of Haskell. The focus is on making it easy to learn by providing clearer error messages. It currently lacks typeclasses, rendering it incompatible with many Haskell programs.</li>
254 <li><b><a href="/wiki/Hugs" title="Hugs">Hugs</a></b>, the <b>Haskell User's Gofer System</b>, is a <a href="/wiki/Bytecode" title="Bytecode">bytecode</a> interpreter. It offers fast compilation of programs and reasonable execution speed. It also comes with a simple graphics library. Hugs is good for people learning the basics of Haskell, but is by no means a "toy" implementation. It is the most portable and lightweight of the Haskell implementations.</li>
255 <li><b><a href="http://repetae.net/john/computer/jhc/" class="external text" title="http://repetae.net/john/computer/jhc/" rel="nofollow">Jhc</a></b> is a Haskell compiler written by <a href="/w/index.php?title=John_Meacham&amp;action=edit" class="new" title="John Meacham">John Meacham</a> emphasising speed and efficiency of generated programs as well as exploration of new program transformations.</li>
256 <li><b><a href="http://www.cs.york.ac.uk/fp/nhc98/" class="external text" title="http://www.cs.york.ac.uk/fp/nhc98/" rel="nofollow">nhc98</a></b> is another bytecode compiler, but the bytecode runs significantly faster than with Hugs. Nhc98 focuses on minimizing memory usage, and is a particularly good choice for older, slower machines.</li>
257 <li><b><a href="/wiki/Yhc" title="Yhc">Yhc</a></b>, the <b>York Haskell Compiler</b> is a fork of nhc98, with the goals of being simpler, more portable, more efficient, and integrating support for <a href="http://www.haskell.org/hat/" class="external text" title="http://www.haskell.org/hat/" rel="nofollow">Hat</a>, the Haskell tracer.</li>
258 </ul>
259 <p><a name="See_also" id="See_also"></a></p>
260 <h2><span class="editsection">[<a href="/w/index.php?title=Haskell_%28programming_language%29&amp;action=edit&amp;section=8" title="Edit section: See also">edit</a>]</span> <span class="mw-headline">See also</span></h2>
261 <div class="infobox sisterproject">
262 <div style="float: left;">
263 <div class="floatnone"><span><a href="/wiki/Image:Wikibooks-logo-en.svg" class="image" title="Wikibooks"><img alt="Wikibooks" src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/Wikibooks-logo-en.svg/50px-Wikibooks-logo-en.svg.png" width="50" height="57" border="0" /></a></span></div>
264 </div>
265 <div style="margin-left: 60px;"><a href="/wiki/Wikibooks" title="Wikibooks">Wikibooks</a> has a book on the topic of
266 <div style="margin-left:10px;"><i><b><a href="http://en.wikibooks.org/wiki/Haskell" class="extiw" title="wikibooks:Haskell">Haskell</a></b></i></div>
267 </div>
268 </div>
269 <ul>
270 <li><a href="/wiki/O%27Haskell" title="O'Haskell">O'Haskell</a> — an extension of Haskell adding <a href="/wiki/Object-oriented_programming" title="Object-oriented programming">object-orientation</a> and <a href="/wiki/Concurrent_programming" title="Concurrent programming">concurrent programming</a> support.</li>
271 <li><a href="/wiki/Pugs" title="Pugs">Pugs</a> — a compiler and interpreter for the <a href="/wiki/Perl_6" title="Perl 6">Perl 6</a> programming language</li>
272 <li><a href="/wiki/LOLITA" title="LOLITA">LOLITA</a> and <a href="/wiki/Darcs" title="Darcs">Darcs</a> — large applications written in Haskell</li>
273 <li><a href="/wiki/Xmonad" title="Xmonad">Xmonad</a> — a window manager written in Haskell (under 500 lines)</li>
274 <li><a href="/w/index.php?title=Jaskell&amp;action=edit" class="new" title="Jaskell">Jaskell</a> — a functional scripting programming language that runs in Java VM</li>
275 <li><a href="/wiki/Curry_%28programming_language%29" title="Curry (programming language)">Curry</a> — a language based on Haskell</li>
276 </ul>
277 <p><a name="References" id="References"></a></p>
278 <h2><span class="editsection">[<a href="/w/index.php?title=Haskell_%28programming_language%29&amp;action=edit&amp;section=9" title="Edit section: References">edit</a>]</span> <span class="mw-headline">References</span></h2>
279 <div class="references-small">
280 <ol class="references">
281 <li id="_note-0"><b><a href="#_ref-0" title="">^</a></b> <a href="http://www.cs.yale.edu/homes/hudak-paul/" class="external free" title="http://www.cs.yale.edu/homes/hudak-paul/" rel="nofollow">http://www.cs.yale.edu/homes/hudak-paul/</a></li>
282 <li id="_note-1"><b><a href="#_ref-1" title="">^</a></b> <a href="http://haskell.org/onlinereport/preface-jfp.html" class="external text" title="http://haskell.org/onlinereport/preface-jfp.html" rel="nofollow">Preface</a>. <i>Haskell 98 Language and Libraries: The Revised Report</i> (December 2002).</li>
283 <li id="_note-2"><b><a href="#_ref-2" title="">^</a></b> <a href="http://www.haskell.org/haskell-history.html" class="external text" title="http://www.haskell.org/haskell-history.html" rel="nofollow">The History of Haskell</a>.</li>
284 <li id="_note-Revised_report"><b><a href="#_ref-Revised_report_0" title="">^</a></b> <a href="/wiki/Simon_Peyton_Jones" title="Simon Peyton Jones">Simon Peyton Jones (editor)</a> (December 2002). <a href="http://haskell.org/onlinereport/" class="external text" title="http://haskell.org/onlinereport/" rel="nofollow">Haskell 98 Language and Libraries: The Revised Report</a>.</li>
285 <li id="_note-3"><b><a href="#_ref-3" title="">^</a></b> <a href="http://haskell.org/haskellwiki/Future" class="external text" title="http://haskell.org/haskellwiki/Future" rel="nofollow">Future development of Haskell</a>.</li>
286 <li id="_note-4"><b><a href="#_ref-4" title="">^</a></b> <a href="http://hackage.haskell.org/trac/haskell-prime" class="external text" title="http://hackage.haskell.org/trac/haskell-prime" rel="nofollow">Welcome to Haskell'</a>. <i>The Haskell' Wiki</i>.</li>
287 <li id="_note-5"><b><a href="#_ref-5" title="">^</a></b> list comprehension has been adopted by <a href="/wiki/Python_%28programming_language%29" title="Python (programming language)">Python (programming language)</a></li>
288 <li id="_note-6"><b><a href="#_ref-6" title="">^</a></b> <a href="http://urchin.earth.li/pipermail/debian-haskell/2006-May/000169.html" class="external text" title="http://urchin.earth.li/pipermail/debian-haskell/2006-May/000169.html" rel="nofollow">Linspire/Freespire Core OS Team and Haskell</a>. <i>Debian Haskell mailing list</i> (May 2006).</li>
289 <li id="_note-7"><b><a href="#_ref-7" title="">^</a></b> Jan-Willem Maessen. <i>Eager Haskell: Resource-bounded execution yields efficient iteration</i>. Proceedings of the 2002 <a href="/wiki/Association_for_Computing_Machinery" title="Association for Computing Machinery">ACM</a> SIGPLAN workshop on Haskell.</li>
290 <li id="_note-8"><b><a href="#_ref-8" title="">^</a></b> Simon Peyton Jones. <a href="http://research.microsoft.com/~simonpj/papers/haskell-retrospective" class="external text" title="http://research.microsoft.com/~simonpj/papers/haskell-retrospective" rel="nofollow"><i>Wearing the hair shirt: a retrospective on Haskell</i></a>. Invited talk at <a href="/wiki/POPL" title="POPL">POPL</a> 2003.</li>
291 <li id="_note-9"><b><a href="#_ref-9" title="">^</a></b> Lazy evaluation can lead to excellent performance, such as in The Computer Language Benchmarks Game<a href="http://www.mail-archive.com/haskell@haskell.org/msg18863.html" class="external autonumber" title="http://www.mail-archive.com/haskell@haskell.org/msg18863.html" rel="nofollow">[1]</a></li>
292 <li id="_note-10"><b><a href="#_ref-10" title="">^</a></b> Bastiaan Heeren, Daan Leijen, Arjan van IJzendoorn. <a href="http://www.cs.uu.nl/~bastiaan/heeren-helium.pdf" class="external text" title="http://www.cs.uu.nl/~bastiaan/heeren-helium.pdf" rel="nofollow"><i>Helium, for learning Haskell</i></a>. Proceedings of the 2003 ACM SIGPLAN workshop on Haskell.</li>
293 </ol>
294 </div>
295 <p><a name="External_links" id="External_links"></a></p>
296 <h2><span class="editsection">[<a href="/w/index.php?title=Haskell_%28programming_language%29&amp;action=edit&amp;section=10" title="Edit section: External links">edit</a>]</span> <span class="mw-headline">External links</span></h2>
297 <ul>
298 <li><a href="http://haskell.org/" class="external text" title="http://haskell.org/" rel="nofollow">HaskellWiki</a> - The Haskell Home Page</li>
299 <li><a href="http://research.microsoft.com/~simonpj/papers/history-of-haskell/history.pdf" class="external text" title="http://research.microsoft.com/~simonpj/papers/history-of-haskell/history.pdf" rel="nofollow">A History of Haskell: being lazy with class</a> - History of Haskell</li>
300 <li><a href="http://haskell.org/haskellwiki/Humor" class="external text" title="http://haskell.org/haskellwiki/Humor" rel="nofollow">Haskell Humor</a></li>
301 <li><a href="http://haskell.org/papers/NSWC/jfp.ps" class="external text" title="http://haskell.org/papers/NSWC/jfp.ps" rel="nofollow">Haskell vs. Ada vs. C++ vs. Awk vs. ... An Experiment in Software Prototyping Productivity</a> (a PostScript file)</li>
302 <li><a href="http://www.willamette.edu/~fruehr/haskell/evolution.html" class="external text" title="http://www.willamette.edu/~fruehr/haskell/evolution.html" rel="nofollow">The Evolution of a Haskell Programmer</a> - a slightly humorous overview of different programming styles available in Haskell</li>
303 <li><a href="http://haskell.readscheme.org" class="external text" title="http://haskell.readscheme.org" rel="nofollow">An Online Bibliography of Haskell Research</a></li>
304 <li><a href="http://epolyglot.sourceforge.net/" class="external text" title="http://epolyglot.sourceforge.net/" rel="nofollow">ePolyglot - combining Haskell, Python and Eiffel</a></li>
305 </ul>
306 <p><a name="Tutorials" id="Tutorials"></a></p>
307 <h3><span class="editsection">[<a href="/w/index.php?title=Haskell_%28programming_language%29&amp;action=edit&amp;section=11" title="Edit section: Tutorials">edit</a>]</span> <span class="mw-headline">Tutorials</span></h3>
308 <div class="infobox sisterproject">
309 <div style="float: left;">
310 <div class="floatnone"><span><a href="/wiki/Image:Wikibooks-logo-en.svg" class="image" title="Wikibooks"><img alt="Wikibooks" src="http://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/Wikibooks-logo-en.svg/50px-Wikibooks-logo-en.svg.png" width="50" height="57" border="0" /></a></span></div>
311 </div>
312 <div style="margin-left: 60px;"><a href="/wiki/Wikibooks" title="Wikibooks">Wikibooks</a> has a book on the topic of
313 <div style="margin-left:10px;"><i><b><a href="http://en.wikibooks.org/wiki/Haskell" class="extiw" title="wikibooks:Haskell">Haskell</a></b></i></div>
314 </div>
315 </div>
316 <ul>
317 <li><a href="http://www.cs.nott.ac.uk/~gmh/book.html" class="external text" title="http://www.cs.nott.ac.uk/~gmh/book.html" rel="nofollow">Programming in Haskell</a> by Graham Hutton</li>
318 <li><a href="http://darcs.haskell.org/yaht/yaht.pdf" class="external text" title="http://darcs.haskell.org/yaht/yaht.pdf" rel="nofollow">Yet Another Haskell Tutorial</a> - a good Haskell tutorial by Hal Daume III; assumes much less prior knowledge than the official tutorial</li>
319 <li><a href="http://haskell.org/tutorial/" class="external text" title="http://haskell.org/tutorial/" rel="nofollow">A Gentle Introduction to Haskell 98</a> (a more advanced tutorial, also available as <a href="http://www.haskell.org/tutorial/haskell-98-tutorial.pdf" class="external text" title="http://www.haskell.org/tutorial/haskell-98-tutorial.pdf" rel="nofollow">pdf file</a>)</li>
320 <li><a href="http://www.haskell.org/~pairwise/intro/intro.html" class="external text" title="http://www.haskell.org/~pairwise/intro/intro.html" rel="nofollow">Haskell Tutorial for C Programmers</a> by Eric Etheridge</li>
321 <li><a href="http://www.haskell.org/haskellwiki/Category:Tutorials" class="external text" title="http://www.haskell.org/haskellwiki/Category:Tutorials" rel="nofollow">List of Tutorials at Haskell.org</a></li>
322 <li><a href="http://www.haskell.org/haskellwiki/Category:Idioms" class="external text" title="http://www.haskell.org/haskellwiki/Category:Idioms" rel="nofollow">Haskell Idioms</a></li>
323 <li><a href="http://www.edusoft.ro/detalii.php?id=81" class="external text" title="http://www.edusoft.ro/detalii.php?id=81" rel="nofollow">Introducere in Haskell 98 prin exemple - Dan Popa, Editura EduSoft, Bacau</a></li>
324 </ul>
326 <!--
327 Pre-expand include size: 30647/2048000 bytes
328 Post-expand include size: 11745/2048000 bytes
329 Template argument size: 9272/2048000 bytes
330 #ifexist count: 1/500
333 <!-- Saved in parser cache with key enwiki:pcache:idhash:13630-0!1!0!default!!en!2 and timestamp 20080113231613 -->
334 <div class="printfooter">
335 Retrieved from "<a href="http://en.wikipedia.org/wiki/Haskell_%28programming_language%29">http://en.wikipedia.org/wiki/Haskell_%28programming_language%29</a>"</div>
336 <div id="catlinks"><p class='catlinks'><a href="/wiki/Special:Categories" title="Special:Categories">Categories</a>: <span dir='ltr'><a href="/wiki/Category:All_articles_with_unsourced_statements" title="Category:All articles with unsourced statements">All articles with unsourced statements</a></span> | <span dir='ltr'><a href="/wiki/Category:Articles_with_unsourced_statements_since_February_2007" title="Category:Articles with unsourced statements since February 2007">Articles with unsourced statements since February 2007</a></span> | <span dir='ltr'><a href="/wiki/Category:Haskell_programming_language_family" title="Category:Haskell programming language family">Haskell programming language family</a></span> | <span dir='ltr'><a href="/wiki/Category:Functional_languages" title="Category:Functional languages">Functional languages</a></span> | <span dir='ltr'><a href="/wiki/Category:Declarative_programming_languages" title="Category:Declarative programming languages">Declarative programming languages</a></span> | <span dir='ltr'><a href="/wiki/Category:Articles_with_example_Haskell_code" title="Category:Articles with example Haskell code">Articles with example Haskell code</a></span></p></div> <!-- end content -->
337 <div class="visualClear"></div>
338 </div>
339 </div>
340 </div>
341 <div id="column-one">
342 <div id="p-cactions" class="portlet">
343 <h5>Views</h5>
344 <div class="pBody">
345 <ul>
346 <li id="ca-nstab-main" class="selected"><a href="/wiki/Haskell_%28programming_language%29" title="View the content page [c]" accesskey="c">Article</a></li>
347 <li id="ca-talk"><a href="/wiki/Talk:Haskell_%28programming_language%29" title="Discussion about the content page [t]" accesskey="t">Discussion</a></li>
348 <li id="ca-edit"><a href="/w/index.php?title=Haskell_%28programming_language%29&amp;action=edit" title="You can edit this page. Please use the preview button before saving. [e]" accesskey="e">Edit this page</a></li>
349 <li id="ca-history"><a href="/w/index.php?title=Haskell_%28programming_language%29&amp;action=history" title="Past versions of this page [h]" accesskey="h">History</a></li>
350 </ul>
351 </div>
352 </div>
353 <div class="portlet" id="p-personal">
354 <h5>Personal tools</h5>
355 <div class="pBody">
356 <ul>
357 <li id="pt-login"><a href="/w/index.php?title=Special:Userlogin&amp;returnto=Haskell_(programming_language)" title="You are encouraged to log in; however, it is not mandatory. [o]" accesskey="o">Sign in / create account</a></li>
358 </ul>
359 </div>
360 </div>
361 <div class="portlet" id="p-logo">
362 <a style="background-image: url(/images/wiki-en.png);" href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"></a>
363 </div>
364 <script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
365 <div class='portlet' id='p-navigation'>
366 <h5>Navigation</h5>
367 <div class='pBody'>
368 <ul>
369 <li id="n-mainpage"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z">Main Page</a></li>
370 <li id="n-Contents"><a href="/wiki/Portal:Contents" title="Guides to browsing Wikipedia">Contents</a></li>
371 <li id="n-featuredcontent"><a href="/wiki/Portal:Featured_content">Featured content</a></li>
372 <li id="n-currentevents"><a href="/wiki/Portal:Current_events" title="Find background information on current events">Current events</a></li>
373 <li id="n-randompage"><a href="/wiki/Special:Random" title="Load a random article [x]" accesskey="x">Random article</a></li>
374 </ul>
375 </div>
376 </div>
377 <div class='portlet' id='p-interaction'>
378 <h5>interaction</h5>
379 <div class='pBody'>
380 <ul>
381 <li id="n-About-Wikipedia"><a href="/wiki/Wikipedia:About" title="Find out about Wikipedia">About Wikipedia</a></li>
382 <li id="n-portal"><a href="/wiki/Wikipedia:Community_Portal" title="About the project, what you can do, where to find things">Community portal</a></li>
383 <li id="n-recentchanges"><a href="/wiki/Special:Recentchanges" title="The list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li>
384 <li id="n-contact"><a href="/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia">Contact Wikipedia</a></li>
385 <li id="n-sitesupport"><a href="http://wikimediafoundation.org/wiki/Donate" title="Support us">Donate to Wikipedia</a></li>
386 <li id="n-help"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia">Help</a></li>
387 </ul>
388 </div>
389 </div>
390 <div id="p-search" class="portlet">
391 <h5><label for="searchInput">Search</label></h5>
392 <div id="searchBody" class="pBody">
393 <form action="/wiki/Special:Search" id="searchform"><div>
394 <input id="searchInput" name="search" type="text" title="Search Wikipedia [f]" accesskey="f" value="" />
395 <input type='submit' name="go" class="searchButton" id="searchGoButton" value="Go" title="Go to a page with this exact name if one exists" />&nbsp;
396 <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="Search" title="Search the wiki for this text" />
397 </div></form>
398 </div>
399 </div>
400 <div class="portlet" id="p-tb">
401 <h5>Toolbox</h5>
402 <div class="pBody">
403 <ul>
404 <li id="t-whatlinkshere"><a href="/wiki/Special:Whatlinkshere/Haskell_%28programming_language%29" title="List of all English Wikipedia pages that link here [j]" accesskey="j">What links here</a></li>
405 <li id="t-recentchangeslinked"><a href="/wiki/Special:Recentchangeslinked/Haskell_%28programming_language%29" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li>
406 <li id="t-upload"><a href="/wiki/Wikipedia:Upload" title="Upload images or media files [u]" accesskey="u">Upload file</a></li>
407 <li id="t-specialpages"><a href="/wiki/Special:Specialpages" title="List of all special pages [q]" accesskey="q">Special pages</a></li>
408 <li id="t-print"><a href="/w/index.php?title=Haskell_%28programming_language%29&amp;printable=yes" title="Printable version of this page [p]" accesskey="p">Printable version</a></li> <li id="t-permalink"><a href="/w/index.php?title=Haskell_%28programming_language%29&amp;oldid=184140797" title="Permanent link to this version of the page">Permanent link</a></li><li id="t-cite"><a href="/w/index.php?title=Special:Cite&amp;page=Haskell_%28programming_language%29&amp;id=184140797">Cite this page</a></li> </ul>
409 </div>
410 </div>
411 <div id="p-lang" class="portlet">
412 <h5>Languages</h5>
413 <div class="pBody">
414 <ul>
415 <li class="interwiki-bg"><a href="http://bg.wikipedia.org/wiki/Haskell">Български</a></li>
416 <li class="interwiki-cs"><a href="http://cs.wikipedia.org/wiki/Haskell">Česky</a></li>
417 <li class="interwiki-de"><a href="http://de.wikipedia.org/wiki/Haskell_%28Programmiersprache%29">Deutsch</a></li>
418 <li class="interwiki-es"><a href="http://es.wikipedia.org/wiki/Haskell">Español</a></li>
419 <li class="interwiki-eo"><a href="http://eo.wikipedia.org/wiki/Haskell">Esperanto</a></li>
420 <li class="interwiki-fa"><a href="http://fa.wikipedia.org/wiki/%D8%B2%D8%A8%D8%A7%D9%86_%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87%E2%80%8C%D9%86%D9%88%DB%8C%D8%B3%DB%8C_%D9%87%D8%B3%DA%A9%D9%84">فارسی</a></li>
421 <li class="interwiki-fr"><a href="http://fr.wikipedia.org/wiki/Haskell">Français</a></li>
422 <li class="interwiki-ko"><a href="http://ko.wikipedia.org/wiki/%ED%95%98%EC%8A%A4%EC%BC%88">한국어</a></li>
423 <li class="interwiki-hr"><a href="http://hr.wikipedia.org/wiki/Haskell_%28programski_jezik%29">Hrvatski</a></li>
424 <li class="interwiki-it"><a href="http://it.wikipedia.org/wiki/Haskell">Italiano</a></li>
425 <li class="interwiki-he"><a href="http://he.wikipedia.org/wiki/Haskell">עברית</a></li>
426 <li class="interwiki-hu"><a href="http://hu.wikipedia.org/wiki/Haskell">Magyar</a></li>
427 <li class="interwiki-ms"><a href="http://ms.wikipedia.org/wiki/Haskell">Bahasa Melayu</a></li>
428 <li class="interwiki-nl"><a href="http://nl.wikipedia.org/wiki/Haskell">Nederlands</a></li>
429 <li class="interwiki-ja"><a href="http://ja.wikipedia.org/wiki/Haskell">日本語</a></li>
430 <li class="interwiki-pl"><a href="http://pl.wikipedia.org/wiki/Haskell">Polski</a></li>
431 <li class="interwiki-pt"><a href="http://pt.wikipedia.org/wiki/Haskell_%28linguagem_de_programa%C3%A7%C3%A3o%29">Português</a></li>
432 <li class="interwiki-ro"><a href="http://ro.wikipedia.org/wiki/Haskell">Română</a></li>
433 <li class="interwiki-ru"><a href="http://ru.wikipedia.org/wiki/Haskell">Русский</a></li>
434 <li class="interwiki-sk"><a href="http://sk.wikipedia.org/wiki/Haskell_%28programovac%C3%AD_jazyk%29">Slovenčina</a></li>
435 <li class="interwiki-sl"><a href="http://sl.wikipedia.org/wiki/Haskell">Slovenščina</a></li>
436 <li class="interwiki-fi"><a href="http://fi.wikipedia.org/wiki/Haskell">Suomi</a></li>
437 <li class="interwiki-sv"><a href="http://sv.wikipedia.org/wiki/Haskell">Svenska</a></li>
438 <li class="interwiki-tr"><a href="http://tr.wikipedia.org/wiki/Haskell">Türkçe</a></li>
439 <li class="interwiki-uk"><a href="http://uk.wikipedia.org/wiki/Haskell">Українська</a></li>
440 <li class="interwiki-zh"><a href="http://zh.wikipedia.org/wiki/Haskell">中文</a></li>
441 </ul>
442 </div>
443 </div>
444 </div><!-- end of the left (by default at least) column -->
445 <div class="visualClear"></div>
446 <div id="footer">
447 <div id="f-poweredbyico"><a href="http://www.mediawiki.org/"><img src="/skins-1.5/common/images/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" /></a></div>
448 <div id="f-copyrightico"><a href="http://wikimediafoundation.org/"><img src="/images/wikimedia-button.png" border="0" alt="Wikimedia Foundation"/></a></div>
449 <ul id="f-list">
450 <li id="lastmod"> This page was last modified 23:16, 13 January 2008.</li>
451 <li id="copyright">All text is available under the terms of the <a class='internal' href="http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License" title="Wikipedia:Text of the GNU Free Documentation License">GNU Free Documentation License</a>. (See <b><a class='internal' href="http://en.wikipedia.org/wiki/Wikipedia:Copyrights" title="Wikipedia:Copyrights">Copyrights</a></b> for details.) <br /> Wikipedia&reg; is a registered trademark of the <a href="http://www.wikimediafoundation.org">Wikimedia Foundation, Inc</a>., a U.S. registered <a class='internal' href="http://en.wikipedia.org/wiki/501%28c%29#501.28c.29.283.29" title="501(c)(3)">501(c)(3)</a> <a href="http://wikimediafoundation.org/wiki/Deductibility_of_donations">tax-deductible</a> <a class='internal' href="http://en.wikipedia.org/wiki/Non-profit_organization" title="Non-profit organization">nonprofit</a> <a href="http://en.wikipedia.org/wiki/Charitable_organization" title="Charitable organization">charity</a>.<br /></li>
452 <li id="privacy"><a href="http://wikimediafoundation.org/wiki/Privacy_policy" title="wikimedia:Privacy policy">Privacy policy</a></li>
453 <li id="about"><a href="/wiki/Wikipedia:About" title="Wikipedia:About">About Wikipedia</a></li>
454 <li id="disclaimer"><a href="/wiki/Wikipedia:General_disclaimer" title="Wikipedia:General disclaimer">Disclaimers</a></li>
455 </ul>
456 </div>
459 <script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script>
460 </div>
461 <!-- Served by srv112 in 0.066 secs. --></body></html>