-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
76 changed files
with
885 additions
and
1,096 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
version: 2.1 | ||
|
||
jobs: | ||
build: | ||
parameters: | ||
coq: | ||
type: string | ||
docker: | ||
- image: <<parameters.coq>> | ||
resource_class: medium | ||
environment: | ||
OPAMJOBS: 2 | ||
OPAMVERBOSE: 1 | ||
OPAMYES: true | ||
TERM: xterm | ||
steps: | ||
- checkout | ||
- run: | ||
name: Pull submodules | ||
command: git submodule update --init --recursive | ||
- run: | ||
name: Configure environment | ||
command: echo . ~/.profile >> $BASH_ENV | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
opam repo -a --set-default add coq-extra-dev https://coq.inria.fr/opam/extra-dev | ||
opam update | ||
opam install --deps-only . | ||
- run: | ||
name: List installed packages | ||
command: opam list | ||
- run: | ||
name: Build, test, and install package | ||
command: opam install -t . | ||
- run: | ||
name: Generate Coqdoc | ||
command: | | ||
make -j`nproc` html | ||
tar cfz coqdoc.tgz html | ||
- store_artifacts: | ||
path: coqdoc.tgz | ||
- run: | ||
name: Test dependants | ||
command: | | ||
PINS=$(opam list -s --pinned --columns=package | xargs | tr ' ' ,) | ||
PACKAGES=`opam list -s --depends-on coq-ext-lib --coinstallable-with $PINS` | ||
if [ -n "$PACKAGES" ] | ||
then opam install -t $PACKAGES | ||
fi | ||
- run: | ||
name: Uninstall package | ||
command: opam uninstall . | ||
|
||
workflows: | ||
version: 2 | ||
test: | ||
jobs: | ||
- build: | ||
name: "Coq 8.8" | ||
coq: "coqorg/coq:8.8" | ||
- build: | ||
name: "Coq 8.9" | ||
coq: "coqorg/coq:8.9" | ||
- build: | ||
name: "Coq 8.10" | ||
coq: "coqorg/coq:8.10" | ||
- build: | ||
name: "Coq 8.11" | ||
coq: "coqorg/coq:8.11" | ||
- build: | ||
name: "Coq 8.12" | ||
coq: "coqorg/coq:8.12" | ||
- build: | ||
name: "Coq 8.13" | ||
coq: "coqorg/coq:8.13" | ||
- build: | ||
name: "Coq dev" | ||
coq: "coqorg/coq:dev" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "coqdocjs"] | ||
path = coqdocjs | ||
url = https://github.com/coq-community/coqdocjs.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,37 @@ | ||
all: theories examples | ||
|
||
theories: Makefile.coq | ||
$(MAKE) -f Makefile.coq | ||
-include coqdocjs/Makefile.doc | ||
COQMAKEFILE?=Makefile.coq | ||
|
||
Makefile.coq: | ||
$(COQBIN)coq_makefile -f _CoqProject -o Makefile.coq | ||
theories: $(COQMAKEFILE) | ||
$(MAKE) -f $(COQMAKEFILE) | ||
|
||
install: Makefile.coq | ||
$(MAKE) -f Makefile.coq install | ||
$(COQMAKEFILE): | ||
$(COQBIN)coq_makefile -f _CoqProject -o $(COQMAKEFILE) | ||
|
||
install: $(COQMAKEFILE) | ||
$(MAKE) -f $(COQMAKEFILE) install | ||
|
||
examples: theories | ||
$(MAKE) -C examples | ||
|
||
clean: | ||
$(MAKE) -f Makefile.coq clean | ||
if [ -e $(COQMAKEFILE) ] ; then $(MAKE) -f $(COQMAKEFILE) cleanall ; fi | ||
$(MAKE) -C examples clean | ||
@ rm Makefile.coq | ||
@rm -f $(COQMAKEFILE) $(COQMAKEFILE).conf | ||
|
||
uninstall: | ||
$(MAKE) -f Makefile.coq uninstall | ||
|
||
$(MAKE) -f $(COQMAKEFILE) uninstall | ||
|
||
dist: | ||
@ git archive --prefix coq-ext-lib/ HEAD -o $(PROJECT_NAME).tgz | ||
|
||
.PHONY: all clean dist theories examples | ||
.PHONY: all clean dist theories examples html | ||
|
||
TEMPLATES ?= ../templates | ||
|
||
index.html: index.md | ||
pandoc -s $^ -o $@ | ||
|
||
index.md: meta.yml | ||
$(TEMPLATES)/generate.sh $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
opam-version: "2.0" | ||
maintainer: "[email protected]" | ||
homepage: "https://github.com/coq-community/coq-ext-lib" | ||
dev-repo: "git+https://github.com/coq-community/coq-ext-lib.git" | ||
bug-reports: "https://github.com/coq-community/coq-ext-lib/issues" | ||
authors: ["Gregory Malecha"] | ||
license: "BSD" | ||
build: [ | ||
[make "-j%{jobs}%" "theories"] | ||
] | ||
run-test: [ | ||
[make "-j%{jobs}%" "examples"] | ||
] | ||
install: [ | ||
[make "install"] | ||
] | ||
depends: [ | ||
"ocaml" | ||
"coq" {>= "8.8"} | ||
] | ||
synopsis: "A library of Coq definitions, theorems, and tactics" | ||
description: """ | ||
A collection of theories and plugins that may be useful in other Coq developments.""" | ||
tags: [ | ||
"logpath:ExtLib" | ||
] | ||
url { | ||
src: "git+https://github.com/coq-community/coq-ext-lib" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
coq: Makefile.coq | ||
$(MAKE) -f Makefile.coq | ||
|
||
clean: Makefile.coq | ||
$(MAKE) -f Makefile.coq clean | ||
rm Makefile.coq | ||
clean: | ||
if [ -e Makefile.coq ] ; then $(MAKE) -f Makefile.coq cleanall ; fi | ||
rm -f Makefile.coq Makefile.coq.conf | ||
|
||
Makefile.coq: Makefile _CoqProject | ||
$(COQBIN)coq_makefile -f _CoqProject -o Makefile.coq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Require Import ExtLib.Structures.Monad. | ||
Generalizable All Variables. | ||
|
||
Module NotationExample. | ||
|
||
Import MonadNotation. | ||
Open Scope monad_scope. | ||
|
||
Fixpoint repeatM `{Monad M} (n : nat) `(x : A) (p : A -> M A) : M unit := | ||
match n with | ||
| O => ret tt | ||
| S n => y <- p x;; | ||
repeatM n y p | ||
end. | ||
|
||
End NotationExample. | ||
|
||
Module LetNotationExample. | ||
|
||
Import MonadLetNotation. | ||
Open Scope monad_scope. | ||
|
||
Fixpoint repeatM `{Monad M} (n : nat) `(x : A) (p : A -> M A) : M unit := | ||
match n with | ||
| O => ret tt | ||
| S n => let* y := p x in | ||
repeatM n y p | ||
end. | ||
|
||
End LetNotationExample. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ MonadReasoning.v | |
Printing.v | ||
UsingSets.v | ||
WithDemo.v | ||
Notations.v |
Oops, something went wrong.