SUPPORT THE WORK

GetWiki

Haskell (programming language)

ARTICLE SUBJECTS
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  →
ARTICLE TYPES
essay  →
feed  →
help  →
system  →
wiki  →
ARTICLE ORIGINS
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








factoids
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, 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,
Scheme, SISAL| influenced = Agda,WEB,weblink Dependently Typed Programming in Agda, Norell, Ulf, 2008, Chalmers University, 9 February 2012, Gothenburg, Bluespec,{{sfn|Hudak|Hughes|Peyton Jones|Wadler|2007|p=12-38,43}} C++11/Concepts,JOURNAL, Design of Concept Libraries for C++, Bjarne, Stroustrup, Bjarne Stroustrup, Andrew, Sutton,weblink 2011, yes,weblink" title="web.archive.org/web/20120210041742weblink">weblink 10 February 2012, C#/LINQ,{{sfn|Hudak|Hughes|Peyton Jones|Wadler|2007|pp=12-45–46}}WEB,weblink C9 Lectures: Dr. Erik Meijer â€“ Functional Programming Fundamentals, Chapter 1 of 13, Meijer, Erik, 1 October 2009, Channel 9 (discussion forum), Channel 9, Microsoft, 9 February 2012, NEWS,weblink Erik Meijer on LINQ, Drobi, Sadek, 4 March 2009, InfoQ, C4Media Inc., 9 February 2012, QCon San Francisco, SF 2008, CAL,{{Citation needed|date=February 2012}} Cayenne,{{sfn|Hudak|Hughes|Peyton Jones|Wadler|2007|pp=12-45–46}} Clean,{{sfn|Hudak|Hughes|Peyton Jones|Wadler|2007|pp=12-45–46}} Clojure,WEB,weblink Clojure Bookshelf, Hickey, Rich, Listmania!, Amazon.com, 9 February 2012, CoffeeScript,NEWS,weblink Turn up your nose at Dart and smell the CoffeeScript, Heller, Martin, 18 October 2011, JavaWorld, InfoWorld, 9 February 2012, Curry,{{sfn|Hudak|Hughes|Peyton Jones|Wadler|2007|pp=12-45–46}} Elm, Epigram,{{Citation needed|date=February 2012}} Escher,WEB,weblink Declarative programming in Escher, 2015-10-07, F#,BOOK, Syme, Don, Don Syme, Granicz, Adam, Cisternino, Antonio, Expert F#, 2007, Apress, 2, F# also draws from Haskell particularly with regard to two advanced language features called sequence expressions and workflows., Frege,WEB, Wechsung, Ingo, The Frege Programming Language,weblink 26 February 2014, Hack,WEB,weblink Facebook Introduces 'Hack,' the Programming Language of the Future, 20 March 2014, WIRED, Idris,WEB, Idris, a dependently typed language,weblink 2014-10-26, Isabelle,{{sfn|Hudak|Hughes|Peyton Jones|Wadler|2007|pp=12-45–46}} Java/Generics,{{sfn|Hudak|Hughes|Peyton Jones|Wadler|2007|pp=12-45–46}} LiveScript,WEB,weblink LiveScript Inspiration, 2014-02-04, Mercury,{{sfn|Hudak|Hughes|Peyton Jones|Wadler|2007|pp=12-45–46}} Ωmega,{{Citation needed|date=February 2012}} Perl 6,WEB,weblink Glossary of Terms and Jargon, Perl Foundation Perl 6 Wiki, The Perl Foundation, 9 February 2012, PureScript,WEB,weblink PureScript by Example, Freeman, Phil, 2016, Leanpub, 23 April 2017, Python,{{sfn|Hudak|Hughes|Peyton Jones|Wadler|2007|pp=12-45–46}}WEB,weblink Functional Programming HOWTO, Kuchling, A. M., Python v2.7.2 documentation, Python Software Foundation, 9 February 2012, Rust,WEB,weblink 2016-02-03, The Rust Reference: Appendix: Influences, Scala,{{sfn|Hudak|Hughes|Peyton Jones|Wadler|2007|pp=12-45–46}}WEB,weblink MartinOdersky take(5) toList, Fogus, Michael, 6 August 2010, Send More Paramedics, 9 February 2012, Swift,WEB,weblink Chris Lattner's Homepage, Lattner, Chris, 2014-06-03, 2014-06-03, Chris Lattner, 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,WEB,weblink Timber/History, 2015-10-07, Visual Basic 9.0{{sfn|Hudak|Hughes|Peyton Jones|Wadler|2007|pp=12-45–46}}JOURNAL, Erik Meijer (computer scientist), Erik, Meijer, Confessions of a Used Programming Language Salesman: Getting the Masses Hooked on Haskell,weblink 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 standardized, general-purpose compiled purely functional programming language, with non-strict semantics and strong static typing.{{sfn|Peyton Jones|2003}} It is named after logician Haskell Curry.{{sfn|Hudak|Hughes|Peyton Jones|Wadler|2007}} The latest standard of Haskell is Haskell 2010. {{As of|2016|05}}, a group is working on the next version, Haskell 2020weblink features a type system with type inferenceType inference originally using Hindley-Milner type inference and lazy evaluation.This allows finer control over the expression evaluation strategy Type classes first appeared in the Haskell programming language."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.Haskell is based on the semantics, but not the syntax, of the language Miranda, 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,

History

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 encouraged to support several others that correspond to extensions added in Haskell 2010.

Features

{{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="web.archive.org/web/20130503114836weblink">weblink 2013-05-03, HackageDB statistics, Hackage.haskell.org, 2013-06-26,

Code examples

{{See also|Haskell features#Examples}}A "Hello world" program in Haskell:'Hello world' is meant as the introductory prototype of a read-eval-print loop. The IO tool putStrLn prints a string, which is the only essential line of this example. The second line of this example is a type definition, which is unnecessary for Haskell, because the compiler infers the type; instead, the second line serves to communicate the programmer's intention to the reader. The first line of the example isn't needed, either, because the start symbol main in this simple example makes the module Main a nicety, which instead would have been a necessity in a multi-module example. Rather, the first two lines are provided for consistency with larger examples.module Main wheremain :: IO ()main = putStrLn "Hello, World!"The factorial function in Haskell, defined in a few different ways (the type annotation is optional):-- 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 1An efficient implementation of the Fibonacci numbers as an infinite list:-- Type annotation (optional, same for each implementation)fib :: Int -> Integer-- With self-referencing datafib n = fibs !! n
where fibs = 0 : scanl (+) 1 fibs
-- 0,1,1,2,3,5,...
-- Same, coded directlyfib n = fibs !! n
where fibs = 0 : 1 : next fibs
next (a : t@(b:_)) = (a+b) : next t
-- Similar idea, using zipWithfib n = fibs !! n
where fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
-- Using a generator functionfib n = fibs (0,1) !! n
where fibs (a,b) = a : fibs (b,a+b)
The Int type refers to a machine-sized integer (used as a list subscript with the !! operator), while Integer is an arbitrary-precision integer. For example, using Integer, the factorial code above easily computes factorial 100000 as a number of 456,574 digits, 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}}}}
History
  • 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}}
  • Haskell Wiki
  • Planet Haskell an aggregator of Haskell related blogs and other Haskell-related news sites
  • Hackage – central package archive
  • Hoogle – API search engine


Tutorials


Miscellaneous
{{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: 2:14pm EDT - Sat, Aug 18 2018
[ this remote article is provided by Wikipedia ]
LATEST EDITS [ see all ]
GETWIKI 09 MAY 2016
GETWIKI 18 OCT 2015
M.R.M. Parrott
Biographies
GETWIKI 20 AUG 2014
GETWIKI 19 AUG 2014
GETWIKI 18 AUG 2014
Wikinfo
Culture
CONNECT