Home > haskell, programming language, python > Getting started with the Haskell programming language

Getting started with the Haskell programming language

Some quotes from Wikipedia:

Haskell is a standardized, general-purpose purely functional programming language…
The language continues to evolve rapidly, with the Glasgow Haskell Compiler (GHC) implementation representing the current de facto standard.
It is a purely functional language, which means that in general, functions in Haskell do not have side effects.
There is an active community around the language, and more than 2600 third-party open-source libraries and tools are available in the online package repository Hackage.

Installation

sudo apt-get install haskell-platform

Hello, World! (compiled)

Create the file hello.hs:

main = putStrLn "Hello, World!"

Compile it:

ghc hello.hs -o hello

Run it with ./hello.

Hello, World! (interpreted)

#!/usr/bin/runghc

main = putStrLn "Hello, World!"

Then “chmod u+x hello.hs” and “./hello.hs“.

Tutorials

There are tons of tutorials on the Web.

Links

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: