Skip to content

Commit c858f07

Browse files
authored
Merge pull request #79 from ssoelvsten/fork/dev/compiler-cleanup
compiler/ cleanup
2 parents ae3b361 + 27dbccc commit c858f07

37 files changed

+487
-563
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/run_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ jobs:
108108
echo "Runtime built successfully, troupe.mjs found"
109109
- name: compile lib
110110
run: make lib
111-
- name: compile service
112-
run: make service
111+
- name: compile trp-rt
112+
run: make trp-rt
113113
- name: run basic test
114114
run: ./local.sh tests/rt/pos/core/fib10.trp
115115
- name: run ci network test

.gitignore

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,61 @@
1-
dist
2-
dist-*
3-
cabal-dev
4-
*.o
5-
*.hi
6-
*.chi
7-
*.chs.h
8-
*.DS_Store
9-
*.dyn_o
10-
*.dyn_hi
11-
.hpc
12-
.hsenv
1+
TAGS
2+
3+
##################################################
4+
# NPM
5+
node_modules
6+
7+
##################################################
8+
# Haskell
9+
10+
## Cabal Sandbox
1311
.cabal-sandbox/
1412
cabal.sandbox.config
13+
cabal.project.local
14+
15+
## Program Coverage
16+
.hpc
1517
*.prof
1618
*.aux
1719
*.hp
1820
*.eventlog
19-
.stack-work/
20-
cabal.project.local
21-
.HTF/
22-
TAGS
23-
*.vscode
24-
/out
21+
22+
## Test Framework
23+
.HTF
24+
25+
## Virtual Environment
26+
.hsenv
27+
28+
## Build files
2529
*.o
2630
*.hi
31+
*.chi
32+
*.chs.h
33+
*.dyn_o
34+
*.dyn_hi
35+
36+
##################################################
37+
# Binaries from `compiler`
2738
bin/*
28-
node_modules
29-
yarn.lock
30-
yarn-error.log
39+
40+
##################################################
41+
# Troupe Compiler (`troupec`) output
42+
out/*
43+
44+
##################################################
45+
# Editors
46+
47+
## Visual Studio Code
48+
*.vscode
49+
50+
## Vi
3151
*.swp
32-
bin/troupe
33-
bin/understudy
34-
trp-rt/out/
52+
53+
## Emacs
3554
*.#*
55+
*~
56+
57+
##################################################
58+
# Operating Systems
59+
60+
## MacOS
61+
*.DS_Store

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.PHONY: rt compiler lib p2p-tools
1+
.PHONY: rt trp-rt compiler lib p2p-tools
22

33
# TODO: Rename to 'build/*' ?
4-
all: npm rt compiler p2p-tools lib service
4+
all: npm compiler rt trp-rt p2p-tools lib
55

66
npm:
77
npm install
@@ -20,16 +20,16 @@ p2p-tools:
2020
lib:
2121
cd lib; $(MAKE) build
2222

23-
service:
24-
mkdir -p ./trp-rt/out
25-
$(COMPILER) ./trp-rt/service.trp -l
23+
trp-rt:
24+
cd trp-rt/; $(MAKE) build
2625

27-
# TODO: Rename to 'clean/*' ?
28-
clean: clean/compiler clean/rt clean/lib
26+
clean: clean/compiler clean/rt clean/trp-rt clean/p2p-tools clean/lib
2927
clean/compiler:
3028
cd compiler; $(MAKE) clean
3129
clean/rt:
3230
cd rt; $(MAKE) clean
31+
clean/trp-rt:
32+
cd trp-rt; $(MAKE) clean
3333
clean/p2p-tools:
3434
cd p2p-tools; $(MAKE) clean
3535
clean/lib:

compiler/.gitignore

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1+
##################################################
2+
# Stack artifacts
13
.stack-work/
4+
stack.yaml.lock
5+
6+
##################################################
7+
# Cabal artifacts
28
Troupe-compiler.cabal
9+
dist
10+
dist-*
11+
cabal-dev
12+
13+
##################################################
14+
# Local compilation output
315
ir2raw-out
4-
stack.yaml.lock
5-
*~
6-
out

compiler/ChangeLog.md

Whitespace-only changes.

compiler/LICENSE

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

compiler/Makefile

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,35 @@
11
.PHONY: test
22

3-
all:
4-
stack -v build $(STACK_OPTS)
3+
all: build install
4+
5+
build: VERBOSITY_FLAG =
6+
build:
7+
stack $(VERBOSITY_FLAG) build $(STACK_OPTS)
8+
build/verbose:
9+
$(MAKE) $(MAKE_FLAGS) build VERBOSITY_FLAG="-v"
10+
11+
install: VERBOSITY_FLAG =
12+
install:
13+
$(MAKE) $(MAKE_FLAGS) build
514
mkdir -p ./../bin
6-
stack -v install $(STACK_OPTS) --local-bin-path ./../bin/
15+
stack $(VERBOSITY_FLAG) install $(STACK_OPTS) --local-bin-path ./../bin/
16+
install/verbose:
17+
$(MAKE) $(MAKE_FLAGS) install VERBOSITY_FLAG="-v"
718

819
clean:
920
rm *.cabal
1021
stack clean --full
1122
rm -rf ../bin
1223
# If problems still persist after this, remove all GHC compilers in ~/.stack/programs/**/
1324

14-
ghci-irtester:
15-
stack ghci --main-is Troupe-compiler:exe:irtester --no-load
16-
17-
ghci-troupec:
18-
stack ghci --main-is Troupe-compiler:exe:troupec --no-load
19-
2025
test:
2126
stack test $(STACK_OPTS)
2227

2328
parser-info:
2429
stack exec happy -- -i src/Parser.y
30+
31+
ghci/irtester:
32+
stack ghci --main-is Troupe-compiler:exe:irtester --no-load
33+
34+
ghci/troupec:
35+
stack ghci --main-is Troupe-compiler:exe:troupec --no-load

compiler/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)