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
46
47
48
49
50
51
52
53
54
|
# iClean
Interactive Clean
This module allows you to evaluate [Clean][] expressions interactively, similar
to GHCi or the Python shell.
Copyright © 2015–present Camil Staps.
This project is licensed under the MIT license.
For more details, see the [LICENSE](/LICENSE) file.
## Example session
```
$ ./iclean
λ. [1,2,3,4]
[Int] :: [1,2,3,4]
λ. map toString [1..10]
[{#Char}] :: ["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 to import local files as well you can bindmount your local
directory by adding `-v "$PWD":/opt/clean/lib/Local`.
If you want history, add `-v ~/.iclean_history:/home/.iclean_history` and
`touch ~/.iclean_history` on the host.
You can add imports by creating a template in `~/.iclean_template`, then adding
it to the container with `-v ~/.iclean_template:/home/.iclean_template`.
If you care about hard disk wear, add `--tmpfs /tmp:exec,size=1024k` to have
iClean build on a ramdisk.
Make all this a handy bash function:
```
iclean(){
docker run --rm -it --tmpfs /tmp:exec,size=1024k -v "$PWD":/opt/clean/lib/Local -v ~/.iclean_history:/home/.iclean_history -v ~/.iclean_template:/home/.iclean_template 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.
[Clean]:http://clean.cs.ru.nl/Clean
|