Haskell (programming language) facts for kids
![]() |
|
Paradigm | functional, lazy/non-strict, modular |
---|---|
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 |
First appeared | 1990 |
Stable release |
Haskell 2010 / July 2010
|
Preview release |
Announced as Haskell 2014
|
Typing discipline | static, strong, inferred |
OS | Cross-platform |
Filename extensions | .hs , .lhs |
Major implementations | |
GHC, Hugs, NHC, JHC, Yhc, UHC | |
Dialects | |
Helium, Gofer |
Haskell is a special kind of programming language. It's known as a functional language. This means it works by using functions, much like in math.
The language is named after Haskell Brooks Curry. He was a smart U.S. mathematician. He made important contributions to the field of logic. Haskell uses ideas from something called lambda calculus. Its logo is the Greek letter lambda. The main tools to use Haskell are the Glasgow Haskell Compiler (GHC) and Hugs. Hugs helps you run Haskell code right away.
Contents
Coding Examples in Haskell
Here are some simple examples of code written in Haskell. They show how the language works.
Hello World Program
A "Hello World" program is often the first program you learn. It simply makes the computer display the words "Hello, World!".
module Main where
main :: IO
main = putStrLn "Hello, World!"
This code tells the computer to print "Hello, World!" on the screen.
Infinite Fibonacci List
The Fibonacci numbers are a famous sequence. Each number is the sum of the two before it. It starts with 0, 1, 1, 2, 3, 5, 8, and so on.
Haskell can create an infinite list of these numbers. This is a cool feature of functional languages.
fib n = fibs !! n
where fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
This code defines a way to get any Fibonacci number. It does this by creating the whole sequence.
How Haskell Influenced Other Languages
Haskell didn't just appear out of nowhere. It was built using ideas from many older programming languages.
Languages That Inspired Haskell
Some of the languages that helped shape Haskell include:
Languages Influenced by Haskell
Haskell itself has also had a big impact. It has influenced the design of many newer programming languages. This shows how important Haskell's ideas are in computer science.
Some languages that took ideas from Haskell are:
- Agda
- Bluespec
- C++11/Concepts
- C#/LINQ
- Cayenne
- Clean
- Clojure
- CoffeeScript
- Curry
- F#
- Isabelle
- Java/Generics
- Mercury
- Perl 6
- Python
- Scala
- Visual Basic 9.0
See also
- In Spanish: Haskell para niños