Haskell (programming language)

aesthetics  →
being  →
complexity  →
database  →
enterprise  →
ethics  →
fiction  →
history  →
internet  →
knowledge  →
language  →
licensing  →
linux  →
logic  →
method  →
news  →
perception  →
philosophy  →
policy  →
purpose  →
religion  →
science  →
sociology  →
software  →
truth  →
unix  →
wiki  →
essay  →
feed  →
help  →
system  →
wiki  →
critical  →
discussion  →
forked  →
imported  →
original  →
Haskell (programming language)
[ temporary import ]
please note:
- the content below is remote from Wikipedia
- it has been imported raw for GetWiki

Lennart Augustsson, Dave Barton, Brian Boutel, Warren Burton, Joseph Fasel, Kevin Hammond, Ralf Hinze, Paul Hudak, John Hughes (computer scientist)>John Hughes, Thomas Johnsson, Mark Jones, Simon Peyton Jones, John Launchbury, Erik Meijer (computer scientist)>Erik Meijer, John Peterson, Alastair Reid, Colin Runciman, Philip Wadler| developer =DATE=24 NOVEMBER 2009 MAILINGLIST=HASKELL FIRST=SIMON, DATE=28 APRIL 2013 MAILINGLIST=HASKELL-PRIME FIRST=HERBERT, | latest test date =static typing>static, strong typing, type inference>inferredGlasgow Haskell Compiler>GHC, Hugs, NHC, JHC, Yhc, UHCHelium (Haskell)>Helium, GoferClean (programming language)>Clean,{{harvnb2003FP (programming language)>FP, Gofer (programming language), Hope (programming language)>Hope and Hope+, Id (programming language), ISWIM, Kent Recursive Calculator>KRC, Lisp (programming language), Miranda (programming language)>Miranda, ML (programming language) and Standard ML, Orwell (programming language)>Orwell, SASL (programming language), Scheme (programming language)>Scheme, SISALAgda (programming language)>Agda,HTTP://WWW.CSE.CHALMERS.SE/~ULFN/PAPERS/AFP08/TUTORIAL.PDF>TITLE=DEPENDENTLY TYPED PROGRAMMING IN AGDAFIRST=ULFPUBLISHER=CHALMERS UNIVERSITYLOCATION=GOTHENBURG, Bluespec, Inc.,{{sfn>HudakPeyton Jones2007C++11/Concepts (C++)>Concepts,DESIGN OF CONCEPT LIBRARIES FOR C++ >FIRST1=BJARNE AUTHORLINK1=BJARNE STROUSTRUP LAST2=SUTTON YEAR=2011 ARCHIVEURL=HTTPS://WEB.ARCHIVE.ORG/WEB/20120210041742/HTTP://WWW2.RESEARCH.ATT.COM/~BS/SLE2011-CONCEPTS.PDF C Sharp (programming language)>C#/Language Integrated Query,{{sfn>HudakPeyton Jones2007LAST=MEIJERDATE=1 OCTOBER 2009CHANNEL 9 (DISCUSSION FORUM)>CHANNEL 9ACCESSDATE=9 FEBRUARY 2012, HTTP://WWW.INFOQ.COM/INTERVIEWS/LINQ-ERIK-MEIJER>TITLE=ERIK MEIJER ON LINQFIRST=SADEKWORK=INFOQACCESSDATE=9 FEBRUARY 2012SAN FRANCISCO>SF 2008, CAL,{{Citation neededCayenne (programming language)>Cayenne,{{sfnHughesWadlerpp=12-45–46}} Clean (programming language),{{sfn>HudakPeyton Jones2007Clojure,HTTPS://WWW.AMAZON.COM/GP/RICHPUB/LISTMANIA/FULLVIEW/R3LG3ZBZS4GCTH DEAD-URL=YES TITLE=CLOJURE BOOKSHELF FIRST=RICH PUBLISHER=AMAZON.COM CoffeeScript,HTTP://WWW.JAVAWORLD.COM/JAVAWORLD/JW-10-2011/111018-COFFEESCRIPT-VS-DART.HTMLLAST=HELLERDATE=18 OCTOBER 2011PUBLISHER=INFOWORLDCurry (programming language)>Curry,{{sfnHughesWadlerpp=12-45–46}} Elm (programming language), Epigram (programming language)>Epigram,{{Citation neededEscher (programming language)>Escher,HTTP://WWW.CS.BRIS.AC.UK/PUBLICATIONS/PAPERS/1000073.PDF>TITLE=DECLARATIVE PROGRAMMING IN ESCHERF Sharp (programming language)>F#,SYME>FIRST1=DONLAST2=GRANICZLAST3=CISTERNINOTITLE=EXPERT F#PUBLISHER=APRESSQUOTE=F# ALSO DRAWS FROM HASKELL PARTICULARLY WITH REGARD TO TWO ADVANCED LANGUAGE FEATURES CALLED SEQUENCE EXPRESSIONS AND WORKFLOWS., Frege (programming language),WECHSUNGTITLE=THE FREGE PROGRAMMING LANGUAGEACCESSDATE=26 FEBRUARY 2014, Hack (programming language),HTTPS://WWW.WIRED.COM/2014/03/FACEBOOK-HACK/DATE=20 MARCH 2014Idris (programming language)>Idris,IDRIS, A DEPENDENTLY TYPED LANGUAGE>URL=HTTP://WWW.IDRIS-LANG.ORG/Isabelle theorem prover>Isabelle,{{sfnHughesWadlerpp=12-45–46}} Java (programming language)/Generics in Java>Generics,{{sfnHughesWadlerpp=12-45–46}} LiveScript,HTTP://LIVESCRIPT.NET/#INSPIRATION>TITLE=LIVESCRIPT INSPIRATIONMercury (programming language)>Mercury,{{sfnHughesWadlerpp=12-45–46}} Ωmega,{{Citation neededPerl 6,HTTP://WWW.PERLFOUNDATION.ORG/PERL6/INDEX.CGI?GLOSSARY_OF_TERMS_AND_JARGONWORK=PERL FOUNDATION PERL 6 WIKITHE PERL FOUNDATION>ACCESSDATE=9 FEBRUARY 2012ARCHIVE-DATE=21 JANUARY 2012DF=DMY-ALL, PureScript,HTTPS://LEANPUB.COM/PURESCRIPT/READ>TITLE=PURESCRIPT BY EXAMPLEFIRST=PHILPUBLISHER=LEANPUBPython (programming language)>Python,{{sfnHughesWadlerpp=12-45–46}}HTTPS://DOCS.PYTHON.ORG/HOWTO/FUNCTIONAL.HTML>TITLE=FUNCTIONAL PROGRAMMING HOWTOFIRST=A. M.PUBLISHER=PYTHON SOFTWARE FOUNDATIONRust (programming language)>Rust,HTTPS://DOC.RUST-LANG.ORG/REFERENCE/INFLUENCES.HTML>ACCESSDATE=2016-02-03Scala (programming language)>Scala,{{sfnHughesWadlerpp=12-45–46}}HTTP://BLOG.FOGUS.ME/2010/08/06/MARTINODERSKY-TAKE5-TOLIST/>TITLE=MARTINODERSKY TAKE(5) TOLISTFIRST=MICHAELWORK=SEND MORE PARAMEDICSSwift (programming language)>Swift,HTTP://NONDOT.ORG/SABRE/>TITLE=CHRIS LATTNER'S HOMEPAGEFIRST=CHRISACCESSDATE=2014-06-03QUOTE=THE SWIFT LANGUAGE IS THE PRODUCT OF TIRELESS EFFORT FROM A TEAM OF LANGUAGE EXPERTS, DOCUMENTATION GURUS, COMPILER OPTIMIZATION NINJAS, AND AN INCREDIBLY IMPORTANT INTERNAL DOGFOODING GROUP WHO PROVIDED FEEDBACK TO HELP REFINE AND BATTLE-TEST IDEAS. OF COURSE, IT ALSO GREATLY BENEFITED FROM THE EXPERIENCES HARD-WON BY MANY OTHER LANGUAGES IN THE FIELD, DRAWING IDEAS FROM OBJECTIVE-C, RUST, HASKELL, RUBY, PYTHON, C#, CLU, AND FAR TOO MANY OTHERS TO LIST., Timber (programming language),HTTP://WWW.TIMBER-LANG.ORG/INDEX_HISTCRED.HTMLACCESSDATE=2015-10-07, Visual Basic .NET{{sfn>HudakPeyton Jones2007LAST=MEIJERURL=HTTP://CITESEERX.IST.PSU.EDU/VIEWDOC/DOWNLOAD?DOI=, OOPSLA 2007, | operating system = Cross-platform| license =weblink}}| file ext = .hs, .lhs}}Haskell {{IPAc-en|ˈ|h|æ|s|k|É™l}}MAILING LIST,weblink anybody can tell me the pronunciation of "haskell"?, 28 January 2008, 12 March 2011, Haskell-cafe, Chevalier, Tim, is a purely functional, general-purpose programming language with lazy evaluation, static typing, and type inference.Type inference originally using Hindley-Milner type inference{{sfn|Peyton Jones|2003}} Type classes, which enable type-safe operator overloading, originated in Haskell."Type classes, first proposed during the design of the Haskell programming language, ..." â€”John Garrett Morris (2013), "Type Classes and Instance Chains: A Relational Approach" Its main implementation is the Glasgow Haskell Compiler. It is named after logician Haskell Curry.{{sfn|Hudak|Hughes|Peyton Jones|Wadler|2007}}Haskell is based on the semantics, but not the syntax, of the Miranda programming language, which served to focus the efforts of the initial Haskell working group.Edward Kmett, Edward Kmett - Type Classes vs. the World Haskell is used widely in academiaWEB,weblink Haskell in education, 15 February 2016, WEB,weblink Haskell in research, 15 February 2016, and industry.WEB,weblink Haskell in industry, 15 February 2016, The latest standard of Haskell is Haskell 2010. {{As of|2016|05}}, a group is working on the next version, Haskell 2020weblink


Following the release of Miranda by Research Software Ltd. in 1985, interest in lazy functional languages grew. By 1987, more than a dozen non-strict, purely functional programming languages existed. Miranda was the most widely used, but it was proprietary software. At the conference on Functional Programming Languages and Computer Architecture (FPCA '87) in Portland, Oregon, there was a strong consensus that a committee be formed to define an open standard for such languages. The committee's purpose was to consolidate existing functional languages into a common one to serve as a basis for future research in functional-language design.{{sfn|Peyton Jones|2003|loc=Preface}}

Haskell 1.0 to 1.4

The first version of Haskell ("Haskell 1.0") was defined in 1990.{{sfn|Hudak|Hughes|Peyton Jones|Wadler|2007}} The committee's efforts resulted in a series of language definitions (1.0, 1.1, 1.2, 1.3, 1.4).

Haskell 98

In late 1997, the series culminated in Haskell 98, intended to specify a stable, minimal, portable version of the language and an accompanying standard library for teaching, and as a base for future extensions. The committee expressly welcomed creating extensions and variants of Haskell 98 via adding and incorporating experimental features.{{sfn|Peyton Jones|2003|loc=Preface}}In February 1999, the Haskell 98 language standard was originally published as The Haskell 98 Report.{{sfn|Peyton Jones|2003|loc=Preface}} In January 2003, a revised version was published as Haskell 98 Language and Libraries: The Revised Report.{{sfn|Peyton Jones|2003}} The language continues to evolve rapidly, with the Glasgow Haskell Compiler (GHC) implementation representing the current de facto standard.WEB, Haskell Wiki: Implementations,weblink 18 December 2012,

Haskell 2010

In early 2006, the process of defining a successor to the Haskell 98 standard, informally named Haskell Prime, began.WEB,weblink Welcome to Haskell', The Haskell' Wiki, This was intended to be an ongoing incremental process to revise the language definition, producing a new revision up to once per year. The first revision, named Haskell 2010, was announced in November 2009 and published in July 2010.Haskell 2010 is an incremental update to the language, mostly incorporating several well-used and uncontroversial features previously enabled via compiler-specific flags.
  • Hierarchical module names. Module names are allowed to consist of dot-separated sequences of capitalised identifiers, rather than only one such identifier. This lets modules be named in a hierarchical manner (e.g., Data.List instead of List), although technically modules are still in a single monolithic namespace. This extension was specified in an addendum to Haskell 98 and was in practice universally used.
  • The foreign function interface (FFI) allows bindings to other programming languages. Only bindings to C are specified in the Report, but the design allows for other language bindings. To support this, data type declarations were permitted to contain no constructors, enabling robust nonce types for foreign data that could not be constructed in Haskell. This extension was also previously specified in an Addendum to the Haskell 98 Report and widely used.
  • So-called n+k patterns (definitions of the form fact (n+1) = (n+1) fact n) were no longer allowed. This syntactic sugar had misleading semantics, in which the code looked like it used the (+) operator, but in fact desugared to code using (-) and (>=).
  • The rules of type inference were relaxed to allow more programs to type check.
  • Some syntax issues (changes in the formal grammar) were fixed: pattern guards were added, allowing pattern matching within guards; resolution of operator fixity was specified in a simpler way that reflected actual practice; an edge case in the interaction of the language's lexical syntax of operators and comments was addressed; and the interaction of do-notation and if-then-else was tweaked to eliminate unexpected syntax errors.
  • The LANGUAGE pragma was specified. By 2010 dozens of extensions to the language were in wide use, and GHC (among other compilers) provided the LANGUAGE pragma to specify individual extensions with a list of identifiers. Haskell 2010 compilers are required to support the Haskell2010 extension, and are encouraged to support several others which correspond to extensions added in Haskell 2010.


{{See also|Glasgow Haskell Compiler#Extensions to Haskell}}Haskell features lazy evaluation, lambda expressions, pattern matching, list comprehension, type classes and type polymorphism. It is a purely functional language, which means that functions generally have no side effects. A distinct construct exists to represent side effects, orthogonal to the type of functions. A pure function can return a side effect that is subsequently executed, modeling the impure functions of other languages.Haskell has a strong, static type system based on Hindley–Milner type inference. Its principal innovation in this area is type classes, originally conceived as a principled way to add overloading to the language,JOURNAL, Wadler, P., S., Blott, 1989, How to make ad-hoc polymorphism less ad hoc, Proceedings of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Association for Computing Machinery, ACM, 60–76, 10.1145/75277.75283, 0-89791-294-2, but since finding many more uses.JOURNAL, Hallgren, T., January 2001, Fun with Functional Dependencies, or Types as Values in Static Computations in Haskell, Proceedings of the Joint CS/CE Winter Meeting, Varberg, Sweden,weblink The construct that represents side effects is an example of a monad. Monads are a general framework that can model different kinds of computation, including error handling, nondeterminism, parsing and software transactional memory. Monads are defined as ordinary datatypes, but Haskell provides some syntactic sugar for their use.Haskell has an open, published specification,{{sfn|Peyton Jones|2003}} and multiple implementations exist. Its main implementation, the Glasgow Haskell Compiler (GHC), is both an interpreter and native-code compiler that runs on most platforms. GHC is noted for its rich type system incorporating recent innovations such as generalized algebraic data types and type families. The Computer Language Benchmarks Game also highlights its high-performance implementation of concurrency and parallelism.Computer Language Benchmarks GameAn active, growing community exists around the language, and more than 5,400 third-party open-source libraries and tools are available in the online package repository Hackage.WEB,weblinkweblink" title="">weblink 2013-05-03, HackageDB statistics,, 2013-06-26,

Code examples

{{See also|Haskell features#Examples}}A "Hello world" program in Haskell (only the last line is strictly necessary):module Main (main) where -- not needed in interpreter, is the default in a module filemain :: IO () -- the compiler can infer this type definitionmain = putStrLn "Hello, World!"The factorial function in Haskell, defined in a few different ways:-- Type annotation (optional, same for each implementation)factorial :: (Integral a) => a -> a-- Using recursion (with the "ifthenelse" expression)factorial n = if n < 2
then 1
else n * factorial (n - 1)
-- Using recursion (with pattern matching)factorial 0 = 1factorial n = n * factorial (n - 1)-- Using recursion (with guards)factorial n
| n < 2 = 1
| otherwise = n * factorial (n - 1)
-- Using a list and the "product" functionfactorial n = product [1..n]-- Using fold (implements "product")factorial n = foldl (*) 1 [1..n]-- Point-free stylefactorial = foldr (*) 1 . enumFromTo 1Because the Integer type has arbitrary-precision, this code will compute values such as factorial 100000 (a 456,574-digit number), with no loss of precision.An implementation of an algorithm similar to quick sort over lists, where the first element is taken as the pivot:-- Type annotation (optional, same for each implementation)quickSort :: Ord a => [a] -> [a]-- Using list comprehensionsquickSort [] = [] -- The empty list is already sortedquickSort (x:xs) = quickSort [a | a {{inconsistent citations}}}}
  • JOURNAL, Paul, Hudak, Paul Hudak, John, Hughes, John Hughes (computer scientist), Simon, Peyton Jones, Simon Peyton Jones, Philip, Wadler, Philip Wadler, A History of Haskell: Being Lazy with Class,weblink 10.1145/1238844.1238856, 2007, Proceedings of the third ACM SIGPLAN conference on History of programming languages (HOPL III), 12-1–55, 978-1-59593-766-7, harv,
  • JOURNAL, Hamilton, Naomi, 19 September 2008, The A-Z of Programming Languages: Haskell, Computerworld,weblink

External links

  • {{Official website}}
{{Authority control}}{{use dmy dates|date=March 2012}}{{Programming languages}}

- content above as imported from Wikipedia
- "Haskell (programming language)" does not exist on GetWiki (yet)
- time: 10:18pm EST - Thu, Jan 17 2019
[ this remote article is provided by Wikipedia ]
LATEST EDITS [ see all ]
M.R.M. Parrott