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

Commit 9eb9879

Browse files
committed
Merge remote-tracking branch 'try-phi-origin/main' into main
2 parents 8324090 + 28e8182 commit 9eb9879

115 files changed

Lines changed: 29307 additions & 49 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/back.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Deploy back end
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: akhileshns/heroku-deploy@v3.12.12 # This is the action
14+
with:
15+
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
16+
heroku_app_name: "try-phi-back" #Must be unique in Heroku
17+
heroku_email: "${{secrets.HEROKU_EMAIL}}"
18+
appdir: "back" # <- This will point to the api folder in your project

.github/workflows/front.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy front end
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
defaults:
11+
run:
12+
working-directory: front
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Set up Node toolchain
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: "16.x"
22+
23+
- name: Cache PureScript dependencies
24+
uses: actions/cache@v2
25+
with:
26+
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
27+
path: |
28+
.spago
29+
output
30+
31+
- name: Cache NPM dependencies
32+
uses: actions/cache@v2
33+
env:
34+
cache-name: cache-node-modules
35+
with:
36+
path: ~/.npm
37+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
38+
restore-keys: |
39+
${{ runner.os }}-build-${{ env.cache-name }}-
40+
${{ runner.os }}-build-
41+
${{ runner.os }}-
42+
43+
- name: Install NPM dependencies
44+
run: npm install
45+
46+
- name: Build the project
47+
run: npm run build:gh-pages
48+
49+
- name: GitHub Pages action
50+
uses: peaceiris/actions-gh-pages@v3.7.3
51+
with:
52+
github_token: ${{ secrets.GITHUB_TOKEN }}
53+
# example with a default working dir and a publish dir
54+
# https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
55+
publish_dir: ./front/docs
56+
force_orphan: true

.github/workflows/main.yml

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

.gitignore

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
elm-stuff/
2-
src/Main.js
3-
.DS_Store
4-
node_modules/
5-
.vscode
6-
/index.html
1+
.psc*

.vscode/tasks.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
{
3+
// Automatically created by phoityne-vscode extension.
4+
5+
"version": "2.0.0",
6+
"presentation": {
7+
"reveal": "always",
8+
"panel": "new"
9+
},
10+
"tasks": [
11+
{
12+
// F7
13+
"group": {
14+
"kind": "build",
15+
"isDefault": true
16+
},
17+
"label": "haskell build",
18+
"type": "shell",
19+
//"command": "cabal configure && cabal build"
20+
"command": "stack build"
21+
},
22+
{
23+
// F6
24+
"group": "build",
25+
"type": "shell",
26+
"label": "haskell clean & build",
27+
//"command": "cabal clean && cabal configure && cabal build"
28+
"command": "stack clean && stack build"
29+
//"command": "stack clean ; stack build" // for powershell
30+
},
31+
{
32+
// F8
33+
"group": {
34+
"kind": "test",
35+
"isDefault": true
36+
},
37+
"type": "shell",
38+
"label": "haskell test",
39+
//"command": "cabal test"
40+
"command": "stack test"
41+
},
42+
{
43+
// F6
44+
"isBackground": true,
45+
"type": "shell",
46+
"label": "haskell watch",
47+
"command": "stack build --test --no-run-tests --file-watch"
48+
}
49+
]
50+
}

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Try-phi
2+
3+
This is an experimental interpreter for a variant of 𝜑-calculus.
4+
Right now we implement it as a term rewriting system.
5+
6+
It is combined with [EO](https://github.com/objectionary/eo) editor. EO is based on 𝜑-calculus.
7+
8+
## Usage
9+
10+
- The online playground is available [here](https://br4ch1st0chr0n3.github.io/try-phi/?editor=phi&snippet=%5B%0A%20%20a%20-%3E%203%2C%0A%20%20b%20-%3E%20%5E0.a%0A%5D.b)
11+
12+
## Components
13+
14+
- [Front end](./front/)
15+
- [Back end](./back/)
16+
17+
## Development
18+
19+
- Install dependencies
20+
21+
- [Back end](./back/README.md#dependencies)
22+
- [Front end](./back/README.md#dependencies)
23+
24+
- Build the server and front end
25+
26+
```sh
27+
sh build.sh
28+
```
29+
30+
- Run the server and front end in separate terminals to see separate logs:
31+
32+
```sh
33+
sh run_server.sh
34+
sh run_front.sh
35+
```
36+
37+
## References
38+
39+
- [Add](https://git-scm.com/book/en/v2/Git-Tools-Submodules) a submodule
40+
- Clone [nested submodules](https://stackoverflow.com/a/6562038)
41+
- Convert a submodule to a folder while preserving its history: [src](https://medium.com/walkme-engineering/how-to-merge-a-git-submodule-into-its-main-repository-d83a215a319c)
42+
- Get info about forks: [gitpop3](https://andremiras.github.io/gitpop3/)
43+
- "[Automating](https://brandonchinn178.github.io/blog/2022/05/19/automating-fourmolu-releases-with-github-actions.html) Fourmolu releases" - use Python for CI
44+
- Build a subdirectory: [buildpack](https://elements.heroku.com/buildpacks/timanovsky/subdir-heroku-buildpack)
45+
- Deploy to Heroku: GH [action](https://github.com/marketplace/actions/deploy-to-heroku?version=v3.12.12)

back/.ghci

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
:set -isrc
2+
:load app/Main.hs

back/.ghcid

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-W
2+
-r=:main

back/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.stack-work

back/.gitmodules

Whitespace-only changes.

0 commit comments

Comments
 (0)