Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit f5aca01

Browse files
authored
Merge pull request #8 from br4ch1st0chr0n3/feature-term-to-graph
Feature term to graph
2 parents cf29332 + 89afe91 commit f5aca01

25 files changed

Lines changed: 915 additions & 263 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ elm-stuff/
22
src/Main.js
33
.DS_Store
44
node_modules/
5-
.vscode
5+
.vscode
6+
/index.html

.vscode/extensions.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

README.md

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# 𝜑-calculus playground
2+
13
<img src="https://www.yegor256.com/images/books/elegant-objects/cactus.svg" height="100px" />
24

35
Try [𝜑-calculus](https://www.eolang.org) online: [click here](https://polystat.github.io/try-phi/).
@@ -28,42 +30,54 @@ Right now we implement it as a term rewriting system with the following features
2830
## How to contribute
2931

3032
This project is powered by [Elm language](https://elm-lang.org).
31-
To develop locally, install Elm, clone this repository:
33+
To develop locally:
3234

33-
```sh
34-
$ git clone git@github.com:polystat/try-phi.git
35-
```
35+
1. [Install](https://guide.elm-lang.org/install/elm.html) Elm
3636

37-
Then go into the cloned repository and build the project:
37+
1. Clone this repository:
38+
```sh
39+
git clone git@github.com:polystat/try-phi.git
40+
```
3841

39-
```sh
40-
$ cd try-phi
41-
$ elm make src/Main.elm --output=src/Main.js
42-
```
42+
1. Then `cd` into the cloned repository
43+
```sh
44+
git clone git@github.com:polystat/try-phi.git
45+
```
46+
1. Run the project
4347

44-
Now run Elm reactor:
4548

46-
```
47-
$ elm reactor
48-
```
49+
## Run
4950

50-
You should see a message like this one:
51+
### Option 1 with auto-reload on `.elm`-file changes:
52+
* Install [elm-live](https://github.com/wking-io/elm-live)
5153

52-
```
53-
Go to http://localhost:8000 to see your project dashboard.
54-
```
54+
* Run (on Windows, use `cmd`)
55+
```sh
56+
elm-live src/Main.elm -- --o=src/Main.js
57+
```
5558

56-
You can then go there to `src > index.html`.
57-
Or just go to http://localhost:8000/src/index.html
59+
* Go to http://localhost:8000/src/index.html
5860

59-
Whenever you modify the code, rebuild the JS file:
61+
### Option 2
62+
1. Run Elm reactor:
63+
```
64+
elm reactor
65+
```
6066

61-
```sh
62-
$ elm make src/Main.elm --output=src/Main.js
63-
```
67+
1. You should see a message like this one:
68+
```
69+
Go to http://localhost:8000 to see your project dashboard.
70+
```
71+
1. Now, go to http://localhost:8000/src/index.html
6472

65-
And reload the page :)
73+
1. Whenever you modify the code:
74+
1. Rebuild the `Main.js` file
75+
```sh
76+
elm make src/Main.elm --output=src/Main.js
77+
```
78+
1. And reload the page :)
6679

67-
If you want to see documentation, install [elm-doc-preview](https://github.com/dmy/elm-doc-preview)
80+
## Documentation
81+
* Install [elm-doc-preview](https://github.com/dmy/elm-doc-preview)
6882

69-
In terminal, type `edp`
83+
* In terminal, type `edp`

elm-application.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"version": "0.1.0",
55
"exposed-modules": [
66
"Main",
7-
"Phi.Minimal.Syntax"
7+
"Minimal.Syntax",
8+
"Full.Syntax"
89
]
910
}

elm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
"elm/browser": "1.0.2",
1010
"elm/core": "1.0.5",
1111
"elm/html": "1.0.0",
12+
"elm/json": "1.1.3",
1213
"elm/parser": "1.1.0",
1314
"elm/url": "1.0.0"
1415
},
1516
"indirect": {
16-
"elm/json": "1.1.3",
1717
"elm/time": "1.0.0",
1818
"elm/virtual-dom": "1.0.2"
1919
}

images/.DS_Store

-6 KB
Binary file not shown.

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

src/Phi/Eval.elm renamed to src/Full/Eval.elm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
module Phi.Eval exposing (..)
1+
module Full.Eval exposing (..)
22

3-
import Phi.Syntax exposing (..)
3+
import Full.Syntax exposing (..)
44
import Dict exposing (Dict)
55
import Set exposing (Set)
66

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
module Phi.Examples exposing (..)
1+
module Full.Examples exposing (..)
22

3-
import Phi.Syntax exposing (..)
4-
import Phi.Int exposing (mkInt)
3+
import Full.Syntax exposing (..)
4+
import Full.Int exposing (mkInt)
55
import Dict exposing (Dict)
66

77
type alias Example =

0 commit comments

Comments
 (0)