aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 3654c21aff0090809318f25e55240749e6973e19 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# iClean
Interactive Clean

This module allows you to evaluate [Clean][] expressions interactively, similar
to GHCi or the Python shell. Functionality is very limited. In particular there
is **no memory**, so you're restricted to one-liners.

Copyright © 2016 Camil Staps. This project is licensed under the MIT
license. For more details, see the LICENSE file.

## Example session

```
$ ./iclean
λ. [1,2,3,4]
[1,2,3,4]
λ. map toString [1..10]
["1","2","3","4","5","6","7","8","9","10"]
λ. [Ctrl-D]
$
```

## Usage
Use `docker pull camilstaps/iclean` to pull the latest iClean version.

Run iClean with `docker run --rm -it camilstaps/iclean`. If you want history,
add `-v ~/.iclean_history:/home/.iclean_history` and `touch ~/.iclean_history`
on the host. Make it an alias:

```
alias iclean="docker run --rm -it -v ~/.iclean_history:/home/.iclean_history camilstaps/iclean"
```

## Without Docker
Use `make iclean` to build.

Use either `./iclean` or `make run`. You can of course add the executable
`iclean` to your path.

## Todo

* Implement memory (e.g. to first declare a function / constant and then use it)
* Allow extra imports

[Clean]:http://clean.cs.ru.nl/Clean