How to install Egison

1. Install Haskell Platform

To install Egison, you need to install Haskell Platform. This is because Egison is implemented in Haskell and distributed as a Hackage package.

You can download an installer from here.

2. Install Egison via Hackage

After you installed Haskell Platform, perform the following commands in Command Prompt.

% cabal update
% cabal install egison egison-tutorial
Installing executable(s) in /home/xxx/.cabal/bin
Registering egison-X.X.X...

How to start Egison

Now, you can run Egison interpreter with the egison command. Type Control-D to terminate the interpreter.

% egison
Egison Version X.X.X (C) 2011-2014 Satoshi Egi
Welcome to Egison Interpreter!
> ^D
Leaving Egison Interpreter.

You can run the egison-tutorial command, too. Type Control-D to terminate the tutorial.
This is a tutorial command for beginner. Please try it first!

% egison-tutorial
Egison Tutorial for Version X.X.X (C) 2013-2014 Satoshi Egi
Welcome to Egison Tutorial!
List of sections in the tutorial
1: Calculate numbers
2: Basics of functional programming
3: Define your own functions
4: Basic of pattern-matching
5: Pattern-matching against infinite collections
6: Writing scripts in Egison
Choose a section to learn.
(1-6): 5
We can write a pattern-matching against infinite lists even if that has infinite results.
Note that Egison really enumerate all pairs of two natural numbers in the following example.

  (take 10 (match-all nats (set integer) [> [m n]]))

What to do next...

Online Tutorial! View Demonstrations Back to Home