Skip to content

Commit 6df8498

Browse files
committed
[build] Add support for building a lessons coq-pkg package
Note: this is not working due to version mismatches.
1 parent aacdbdb commit 6df8498

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
node_modules
88
*.html
99
coqdoc.css
10+
coq-pkgs

Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all clean serve
1+
.PHONY: all clean serve docker-setup
22

33
COQDOC_AUTO=coqdoc.css
44

@@ -11,13 +11,21 @@ all: $(FILES_HTML)
1111
./jscoqdoc $<
1212

1313
%.glob: %.v
14-
coqc $<
14+
npx jscoq sdk coqc -R . MyCourse $<
1515

1616
clean:
1717
rm -f *.vo *.vok .*.aux *.glob *.vos $(FILES_HTML) $(COQDOC_AUTO)
1818

1919
node_modules: package.json package-lock.json
2020
npm i
2121

22-
serve: node_modules
22+
serve: node_modules coq-pkgs/my_course.coq-pkg
2323
./node_modules/.bin/http-server .
24+
25+
coq-pkgs/my_course.coq-pkg: $(FILES_HTML) docker-setup
26+
npx jscoq build . --top MyCourse --package $@
27+
cp -a coq-pkgs/* node_modules/wacoq-bin/bin/coq/
28+
29+
docker-setup:
30+
docker pull jscoq/jscoq:v8.16-sdk
31+
docker tag jscoq/jscoq:v8.16-sdk jscoq:sdk

jscoq-agent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var jscoq_opts = {
3131
// editor: { mode: { 'company-coq': true }, className: 'jscoq code-tight' },
3232
editor: { className: 'jscoq code-tight' },
3333
init_pkgs: ['init'],
34-
all_pkgs: { '+': ['coq', 'mathcomp'] },
34+
all_pkgs: { '+': ['coq', 'mathcomp', 'my_course'] },
3535
init_import: ['utf8'],
3636
implicit_libs: true
3737
};

lesson_2.v

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Set Implicit Arguments.
55
Unset Strict Implicit.
66
Unset Printing Implicit Defensive.
77

8+
From MyCourse Require Import lesson_1.
9+
810
Definition sorry {T} : T. Admitted.
911
(** ** Reflection and proving with computation
1012

0 commit comments

Comments
 (0)