1
1
mirror of https://github.com/kanaka/mal.git synced 2024-07-14 17:10:30 +03:00

PureScript: fix README, Dockerfile and Makefile

This commit is contained in:
mrsekut 2021-12-12 13:31:50 +09:00 committed by Joel Martin
parent 8387b34389
commit d00e383dd4
4 changed files with 29 additions and 8 deletions

View File

@ -1 +0,0 @@
15273

View File

@ -42,7 +42,7 @@ process guide](process/guide.md) there is also a [mal/make-a-lisp
FAQ](docs/FAQ.md) where I attempt to answer some common questions.
**3. Mal is implemented in 86 languages (92 different implementations and 114 runtime modes)**
**3. Mal is implemented in 87 languages (93 different implementations and 115 runtime modes)**
| Language | Creator |
| -------- | ------- |
@ -110,6 +110,7 @@ FAQ](docs/FAQ.md) where I attempt to answer some common questions.
| [PostScript](#postscript-level-23) | [Joel Martin](https://github.com/kanaka) |
| [PowerShell](#powershell) | [Joel Martin](https://github.com/kanaka) |
| [Prolog](#prolog-logical-language) | [Nicolas Boulenguez](https://github.com/asarhaddon) |
| [PureScript](#purescript) | [mrsekut](https://github.com/mrsekut) |
| [Python](#python-2x-and-3x) (2.X & 3.X) | [Joel Martin](https://github.com/kanaka) |
| [Python #2](#python2-3x) (3.X) | [Gavin Lewis](https://github.com/epylar) |
| [RPython](#rpython) | [Joel Martin](https://github.com/kanaka) |
@ -938,6 +939,15 @@ cd impls/prolog
swipl stepX_YYY
```
### PureScript
The PureScript implementation requires the spago compiler version 0.20.2.
```
cd impls/purs
make
node ./stepX_YYY.js
```
### Python (2.X and 3.X)
```

View File

@ -30,8 +30,9 @@ RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
# Install nodejs
RUN apt-get -y install nodejs
# Install purescript
RUN apt-get install -y libtinfo5
# Install purescript and deps
RUN apt-get install -y git libtinfo5
RUN npm install -g --unsafe-perm purescript spago
ENV NPM_CONFIG_CACHE /mal/.npm
ENV NPM_CONFIG_CACHE /mal/.npm
ENV HOME /mal

View File

@ -1,5 +1,9 @@
src/step%:
spago bundle-app --main ${${@F}} --to $(@F:%.purs=%.js)
step%.js: src/step%.purs $(OTHER_SRCS) node_modules/readline-sync
spago bundle-app --main $($(<:src/%=%)) --to $@
node_modules/readline-sync:
npm install
#####################
@ -14,4 +18,11 @@ step6_file.purs = Mal.Step6
step7_quote.purs = Mal.Step7
step8_macros.purs = Mal.Step8
step9_try.purs = Mal.Step9
stepA_mal.purs = Mal.StepA
stepA_mal.purs = Mal.StepA
OTHER_SRCS = src/Readline.js src/Readline.purs src/Types.purs src/Reader.purs \
src/Printer.purs src/Env.purs src/Core.purs
clean:
rm -rf step*.js output/*