Haskell

Reporter: Nolzen M.

Torres

The language is named after logician Haskell Brooks Curry. .Introduction Haskell is a functional computer programming language which is quite different from most other programming languages. whose work in mathematical logic serves as a foundation for functional languages.

What is Haskell? Haskell is a modern. Haskell has an expressive syntax. and a rich variety of built-in data types. non-strict. purelyfunctional programming language. standard. . including arbitrary-precision integers and rationals. It has an innovative type system which supports a systematic form of overloading and a module system. floating-point and boolean types. from numerical through to symbolic. It is specifically designed to handle a wide range of applications. as well as the more conventional integer. To this end.

Another feature of Haskell is that it is lazy (technically speaking. Programs are shorter which make it easier to look at a function.Characteristics Pure. It's impossible to unconsciously convert a Double to an Int. Laziness. it's "non-strict"). . There are no side effects. or follow a null pointer. Concise. Strongly typed.

There's no worrying about dangling pointers. Thus Haskell programs can be more modular. not book-keeping of the memory. Which makes it easier to verify that the function does what the algorithm states Memory managed. Often used modular functions can thus be proven correct by induction. Modular. The programmer can worry about implementing the algorithm. .Characteristics High level. Haskell offers stronger developed modules. Haskell programs most often reads out almost exactly like the algorithm description. the Garbage Collector takes care of all that.

haskell.haskell.org/ghc/download Hugs http://www.Compilers and interpreters   Glasgow Haskell Compiler (GHC) http://www.org/hugs/    nhc98 York Haskell Compiler (YHC) Helium .

Compilers and interpreters      Utrecht Haskell Compiler (UHC) Jhc LHC Yale Haskell Disciple .

applications ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ Audio. ‡ Extended Haskell Games Genetic programming Graphical User Interface (GUI) Libraries Linguistics and natural language processing Mathematics and physics Network Operating systems and systems programming (also emulators) Program development Robotics Theorem provers Tools for interfacing with other languages Web. music and sound ‡ Bioinformatics Concurrency and parallelism ‡ Cryptography and hashing ‡ Data Structures and IO Libraries ‡ Database interfaces ‡ Editors written in Haskell and editors for Haskell. XML . HTML.

The Netherlands ABN AMRO is an international bank headquartered in Amsterdam. AT&T Haskell is being used in the Network Security division to automate processing of internet abuse complaints. Haskell is used in building parts of the product. Circos Brand Karma Singapore Brand Karma provides services to brand owners to measure online sentiments towards their brands. specifically for back-end job scheduling and brand matching. Bank of America Merril Lynch Haskell is being used for backend data transformation and loading. Haskell has allowed us to easily meet very tight deadlines with reliable results. . For its investment banking activities it needs to measure the counterparty risk on portfolios of financial derivatives.Haskell in Industry ABN AMRO Amsterdam.

a meeting was held during which participants formed a strong consensus that a committee should be formed to define an open standard for such languages. .HISTORY By 1987. Miranda was the most widely used. Of these. purely functional programming languages existed. but was not in the public domain. In September of 1987 At the conference on Functional Programming Languages and Computer Architecture (FPCA '87) in Portland. Oregon. more than a dozen non-strict.

The Haskell version 1.VERSIONS Haskell 1. .0 Report was published . Haskell 1. The Haskell version 1.0 1 April 1990.1 August 1991. The Haskell version 1.1 Report was published.2 March 1992. Haskell 1.2 Report was published.

‡ Algebraic data types were extended in several ways.3 May 1996. .3: ‡A Library Report was added. ‡ Monadic I/O made its first appearance. Technical changes in Haskell 1. including ´doµ syntax. The Haskell version 1. and the I/O semantics in the Appendix was dropped. reflecting the fact that programs can hardly be portable unless they can rely on standard libraries.VERSIONS Haskell 1. ‡ Type classes were generalised to higher kinds known as ´constructor classesµ.3 Report was published.

. Haskell 98 February 1999 The Haskell 98 Report: Language and Libraries was published. the process of defining a successor to the Haskell 98 standard. named Haskell 2010. was begun. The first revision. informally named Haskell ("Haskell Prime"). This is an ongoing incremental process to revise the language definition. The Haskell version 1. producing a new revision once per year. was announced in November 2009.4 report was published. Haskell Prime In early 2006.VERSIONS Haskell 1.4 April 1997.

Pattern matching List comprehensions Type polymorphism Software transactional memory Hindley²Milner type inference Nondeterminism Parsing Generalized Algebraic Data Types Features .

Rapidly changing priorities make it important to minimize the code impact of changes. It provides functions to easily create. train. Aetion has developed three main projects in Haskell. .Contributions to AI Aetion a defense contractor whose applications use artificial intelligence. HFANN a Haskell binding to the Fast Artificial Neural Network (FANN). It includes several common kernel functions. Haskell's concise code was perhaps most important for rewriting: it made it practicable to throw away old code occasionally. DSELs allowed the AI to be specified very declaratively. test and use Artificial Neural Networks. SVM a library which implements least squares support vector regression. all successful. which suits Haskell well. It has a support vector machine written in Haskell.

.using lists factorial n = product [1.n] -.using fold factorial n = foldl (*) 1 [1.using only prefix notation and n+k-patterns (no longer allowed in Haskell 2010) factorial 0 = 1 factorial (n+1) = (*) (n+1) (factorial n) ..1) -.n] -.Sample programs factorial function in Haskell: -.using recursion factorial 0 = 1 factorial n = n * factorial (n .using recursion but written without pattern matching factorial n = if n > 0 then n * factorial (n-1) else 1 -.type factorial :: Integer -> Integer -.

" ++ name ++ "!\n") Or you can do it in one line: main = putStrLn "What's your name?" >> getLine >>= \ name -> putStr ("Hello.Sample programs Hello World Program: putStrLn ³Hello. World!´ The following program reads a name from the command line and outputs a greeting message: main = do putStrLn "What's your name?" name <. " ++ name ++ "!\n") .getLine putStr ("Hello.

THANK YOU!! .

if a function f has type Int -> Int you can be sure that f will not read or write any mutable variables. nor will it perform any input/output. EXAMPLE .

Sign up to vote on this title
UsefulNot useful