Haskell (programming language)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Haskell
Logo of Haskell
Paradigm(s) functional, lazy/non-strict, modular
Appeared in 1990; 24 years ago (1990)
Designed by Simon Peyton Jones, Lennart Augustsson, Dave Barton, Brian Boutel, Warren Burton, Joseph Fasel, Kevin Hammond, Ralf Hinze, Paul Hudak, John Hughes, Thomas Johnsson, Mark Jones, John Launchbury, Erik Meijer, John Peterson, Alastair Reid, Colin Runciman, Philip Wadler
Stable release Haskell 2010[1] / July 2010; 3 years ago (2010-07)
Preview release Announced as Haskell 2014[2]
Typing discipline static, strong, inferred
Major implementations GHC, Hugs, NHC, JHC, Yhc, UHC
Dialects Helium, Gofer
OS Cross-platform
Usual filename extensions .hs, .lhs
Website haskell.org

Haskell /ˈhæskəl/[3] is a purely functional programming language. It is named after Haskell Brooks Curry, a U.S. mathematician who contributed a lot to logic. Haskell is based on lambda calculus and uses the Greek letter lambda as its logo. The main implementations are the Glasgow Haskell Compiler (GHC), and Hugs, a Haskell interpreter.

Examples[change | edit source]

The following is an example Hello World program in Haskell:

module Main where
 
main :: IO ()
main = putStrLn "Hello, World!"

One way to create an infinite list of Fibonacci numbers is this:[4]

fib n = fibs !! n
        where fibs = 0 : 1 : zipWith (+) fibs (tail fibs)

Influence[change | edit source]

Haskel was influenced by many earlier programming languages. These were Clean, FP, Gofer, Hope and Hope+, Id, ISWIM, KRC, Lisp, Miranda, ML and Standard ML, Orwell, SASL, SISAL, and Scheme.[5]

Haskell itself has influenced many later programming languages, such as Agda,[6] Bluespec,[7] C++11/Concepts,[8] C#/LINQ,[9][10][11][12] Cayenne,[9] Clean,[9] Clojure,[13] CoffeeScript,[14] Curry,[9] F#,[15] Isabelle,[9] Java/Generics,[9] Mercury,[9] Perl 6,[16] Python,[9][17] Scala,[9][18] Visual Basic 9.0.[9][10]

References[change | edit source]

  1. Marlow, Simon (24 November 2009). "Announcing Haskell 2010". Haskell mailing list. http://www.haskell.org/pipermail/haskell/2009-November/021750.html. Retrieved 12 March 2011.
  2. Lynagh, Ian (1 May 2013). "Haskell 2014". Haskell-prime mailing list. http://www.haskell.org/pipermail/haskell-prime/2013-May/003825.html. Retrieved 9 October 2013.
  3. Chevalier, Tim (28 January 2008). "anybody can tell me the pronuncation of "haskell"?". Haskell-cafe mailing list. http://www.haskell.org/pipermail/haskell-cafe/2008-January/038756.html. Retrieved 12 March 2011.
  4. "The Fibonacci sequence". HaskellWiki. 2 August 2012. http://www.haskell.org/haskellwiki/index.php?title=The_Fibonacci_sequence&oldid=47800. Retrieved 27 March 2013.
  5. Peyton Jones, Simon, ed. (2003). Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press. p. xi. ISBN 0521826144. http://haskell.org/onlinereport/.
  6. Norell, Ulf (2008). "Dependently Typed Programming in Agda". Gothenburg: Chalmers University. http://www.cse.chalmers.se/~ulfn/papers/afp08/tutorial.pdf. Retrieved 9 February 2012.
  7. Hudak and others 2007, p. 12-38,43.
  8. Stroustrup, Bjarne; Sutton, Andrew (2011). Design of Concept Libraries for C++. http://www2.research.att.com/~bs/sle2011-concepts.pdf.
  9. 9.0 9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9 Hudak and others 2007, pp. 12-45–46.
  10. 10.0 10.1 Meijer, Erik. "Confessions of a Used Programming Language Salesman: Getting the Masses Hooked on Haskell". OOPSLA 2007. http://research.microsoft.com/en-us/um/people/emeijer/papers/es012-meijer.pdf.
  11. Meijer, Erik (1 October 2009). "C9 Lectures: Dr. Erik Meijer – Functional Programming Fundamentals, Chapter 1 of 13". Channel 9. Microsoft. http://channel9.msdn.com/shows/Going+Deep/Lecture-Series-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-1/. Retrieved 9 February 2012.
  12. Drobi, Sadek (4 March 2009). "Erik Meijer on LINQ". InfoQ (QCon SF 2008: C4Media Inc.). http://www.infoq.com/interviews/LINQ-Erik-Meijer. Retrieved 9 February 2012.
  13. Hickey, Rich. "Clojure Bookshelf". Listmania!. Amazon.com. http://www.amazon.com/gp/richpub/listmania/fullview/R3LG3ZBZS4GCTH. Retrieved 9 February 2012.
  14. Heller, Martin (18 October 2011). "Turn up your nose at Dart and smell the CoffeeScript". JavaWorld (InfoWorld). http://www.javaworld.com/javaworld/jw-10-2011/111018-coffeescript-vs-dart.html. Retrieved 9 February 2012.
  15. Syme, Don; Granicz, Adam; Cisternino, Antonio (2007). Expert F#. Apress. p. 2. "F# also draws from Haskell particularly with regard to two advanced language features called sequence expressions and workflows."
  16. "Glossary of Terms and Jargon". Perl Foundation Perl 6 Wiki. The Perl Foundation. 28 February. http://www.perlfoundation.org/perl6/index.cgi?glossary_of_terms_and_jargon. Retrieved 9 February 2012.
  17. Kuchling, A. M.. "Functional Programming HOWTO". Python v2.7.2 documentation. Python Software Foundation. http://docs.python.org/howto/functional.html. Retrieved 9 February 2012.
  18. Fogus, Michael (6 August 2010). "MartinOdersky take(5) toList". Send More Paramedics. http://blog.fogus.me/2010/08/06/martinodersky-take5-tolist/. Retrieved 9 February 2012.