pax_global_header 0000666 0000000 0000000 00000000064 14601560135 0014513 g ustar 00root root 0000000 0000000 52 comment=8656694e2bb1f6afee7b8a3b1948cb88ca7a4c70
coq-elpi-2.1.0/ 0000775 0000000 0000000 00000000000 14601560135 0013224 5 ustar 00root root 0000000 0000000 coq-elpi-2.1.0/.gitattributes 0000664 0000000 0000000 00000000040 14601560135 0016111 0 ustar 00root root 0000000 0000000 *.elpi linguist-language=prolog
coq-elpi-2.1.0/.github/ 0000775 0000000 0000000 00000000000 14601560135 0014564 5 ustar 00root root 0000000 0000000 coq-elpi-2.1.0/.github/workflows/ 0000775 0000000 0000000 00000000000 14601560135 0016621 5 ustar 00root root 0000000 0000000 coq-elpi-2.1.0/.github/workflows/doc.yml 0000664 0000000 0000000 00000002560 14601560135 0020114 0 ustar 00root root 0000000 0000000 # This is a basic workflow to help you get started with Actions
name: DOC
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build doc
runs-on: ubuntu-latest
steps:
- name: workaround bug
run: sudo apt-get update
- name: checkout
uses: actions/checkout@v2
- name: setup ocaml
uses: avsm/setup-ocaml@v1
with:
ocaml-version: 4.10.1
- name: install deps
run: |
export OPAMYES=true
opam repo add coq https://coq.inria.fr/opam/released
opam repo add coq-dev https://coq.inria.fr/opam/core-dev
opam repo add extra-dev https://coq.inria.fr/opam/extra-dev
opam update
opam install coq-serapi .
sudo apt-get update
sudo apt-get install python3-pip -y
pip3 install git+https://github.com/cpitclaudel/alectryon.git@c8ab1ec
- name: build doc
run: opam exec -- make doc COQ_ELPI_ALREADY_INSTALLED=1
- name: Save artifact
uses: actions/upload-artifact@v2
with:
path: doc
- name: deploy
uses: JamesIves/github-pages-deploy-action@4.1.4
if: ${{ github.ref == 'refs/heads/master' }}
with:
branch: gh-pages
folder: doc
coq-elpi-2.1.0/.github/workflows/main.yml 0000664 0000000 0000000 00000006410 14601560135 0020271 0 ustar 00root root 0000000 0000000 # This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
tags: [ "v*.*.*" ]
pull_request:
branches: [ master ]
workflow_dispatch:
inputs:
suite:
description: "Coq OPAM suite"
required: true
default: "released"
type: choice
options:
- released
- extra-dev
env:
OPAM_SUITE: ${{ inputs.suite }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
coq_version:
- '8.19'
ocaml_version:
- '4.14-flambda'
steps:
- uses: actions/checkout@v2
- uses: coq-community/docker-coq-action@v1
with:
opam_file: './coq-elpi.opam'
coq_version: ${{ matrix.coq_version }}
ocaml_version: ${{ matrix.ocaml_version }}
export: 'OPAMWITHTEST'
install: |
startGroup "Install dependencies"
opam pin add -n -y -k path $PACKAGE $WORKDIR
opam update -y
opam install -y -j 2 $PACKAGE --deps-only
endGroup
env:
OPAMWITHTEST: 'true'
play:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: avsm/setup-ocaml@v2
with:
ocaml-compiler: 5.1.x
- run: |
opam install ./coq-elpi.opam
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
#needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4
- name: Create archive
run: |
VERSION="${GITHUB_REF_NAME_SLUG#v}"
git archive -o coq-elpi-$VERSION.tar.gz --prefix=coq-elpi-$VERSION/ $GITHUB_SHA .
- name: Release
uses: softprops/action-gh-release@v1
with:
files: coq-elpi-*.tar.gz
fail_on_unmatched_files: true
prerelease: true
generate_release_notes: true
name: Coq-Elpi ${{ github.ref }} for Coq XXX
- name: Use OCaml 4.14.x
uses: avsm/setup-ocaml@v2
with:
ocaml-compiler: 4.14.x
opam-local-packages: |
!coq-elpi.opam
- name: Write PAT
env:
OPAM_PUBLISH_TOKEN: ${{ secrets.OPAM_PUBLISH_TOKEN }}
run: |
mkdir -p ~/.opam/plugins/opam-publish
printf "$OPAM_PUBLISH_TOKEN" > ~/.opam/plugins/opam-publish/coqelpibot.token
- name: Setup SSH
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.BOT_SSH_KEY }}
- name: Install opam-publish # 2.0.3 because more recent versions do not respect OPAMYES
run: opam install -y -j 2 opam-publish=2.0.3
- name: Publish
run: |
eval $(opam env)
git config --global user.name coqelpibot
git config --global user.email coqelpibot@inria.fr
TAG=`git tag --sort=-v:refname|head -1`
opam-publish --tag=$TAG --packages-directory=${OPAM_SUITE:-released}/packages --repo=coq/opam --no-browser -v ${TAG##v} https://github.com/LPCIC/coq-elpi/releases/download/$TAG/coq-elpi-${TAG##v}.tar.gz
coq-elpi-2.1.0/.github/workflows/nix-action-coq-8.19.yml 0000664 0000000 0000000 00000143300 14601560135 0022573 0 ustar 00root root 0000000 0000000 jobs:
coq:
needs: []
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target coq
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"coq\" \\\n --dry-run 2>&1 > /dev/null)\n\
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
coq-elpi:
needs:
- coq
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target coq-elpi
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"coq-elpi\" \\\n --dry-run 2>&1 > /dev/null)\n\
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq-elpi"
hierarchy-builder:
needs:
- coq
- coq-elpi
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target hierarchy-builder
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"hierarchy-builder\" \\\n --dry-run\
\ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\
\ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq-elpi'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq-elpi"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "hierarchy-builder"
mathcomp:
needs:
- coq
- mathcomp-ssreflect
- mathcomp-fingroup
- mathcomp-algebra
- mathcomp-solvable
- mathcomp-field
- mathcomp-character
- hierarchy-builder
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target mathcomp
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"mathcomp\" \\\n --dry-run 2>&1 > /dev/null)\n\
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-ssreflect"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-fingroup'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-fingroup"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-algebra'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-algebra"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-solvable'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-solvable"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-field'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-field"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-character'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-character"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: hierarchy-builder'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "hierarchy-builder"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp"
mathcomp-algebra:
needs:
- coq
- mathcomp-ssreflect
- mathcomp-fingroup
- hierarchy-builder
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target mathcomp-algebra
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"mathcomp-algebra\" \\\n --dry-run 2>&1\
\ > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"\
built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-ssreflect"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-fingroup'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-fingroup"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: hierarchy-builder'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "hierarchy-builder"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-algebra"
mathcomp-analysis:
needs:
- coq
- mathcomp-classical
- mathcomp-field
- mathcomp-bigenough
- hierarchy-builder
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target mathcomp-analysis
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"mathcomp-analysis\" \\\n --dry-run\
\ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\
\ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-classical'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-classical"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-field'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-field"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-bigenough'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-bigenough"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: hierarchy-builder'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "hierarchy-builder"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-analysis"
mathcomp-bigenough:
needs:
- coq
- mathcomp-ssreflect
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target mathcomp-bigenough
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"mathcomp-bigenough\" \\\n --dry-run\
\ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\
\ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-ssreflect"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-bigenough"
mathcomp-character:
needs:
- coq
- mathcomp-ssreflect
- mathcomp-fingroup
- mathcomp-algebra
- mathcomp-solvable
- mathcomp-field
- hierarchy-builder
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target mathcomp-character
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"mathcomp-character\" \\\n --dry-run\
\ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\
\ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-ssreflect"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-fingroup'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-fingroup"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-algebra'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-algebra"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-solvable'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-solvable"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-field'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-field"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: hierarchy-builder'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "hierarchy-builder"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-character"
mathcomp-classical:
needs:
- coq
- mathcomp-algebra
- mathcomp-finmap
- hierarchy-builder
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target mathcomp-classical
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"mathcomp-classical\" \\\n --dry-run\
\ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\
\ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-algebra'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-algebra"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-finmap'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-finmap"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: hierarchy-builder'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "hierarchy-builder"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-classical"
mathcomp-field:
needs:
- coq
- mathcomp-ssreflect
- mathcomp-fingroup
- mathcomp-algebra
- mathcomp-solvable
- hierarchy-builder
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target mathcomp-field
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"mathcomp-field\" \\\n --dry-run 2>&1\
\ > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"\
built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-ssreflect"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-fingroup'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-fingroup"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-algebra'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-algebra"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-solvable'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-solvable"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: hierarchy-builder'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "hierarchy-builder"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-field"
mathcomp-fingroup:
needs:
- coq
- mathcomp-ssreflect
- hierarchy-builder
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target mathcomp-fingroup
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"mathcomp-fingroup\" \\\n --dry-run\
\ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\
\ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-ssreflect"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: hierarchy-builder'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "hierarchy-builder"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-fingroup"
mathcomp-finmap:
needs:
- coq
- mathcomp-ssreflect
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target mathcomp-finmap
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"mathcomp-finmap\" \\\n --dry-run 2>&1\
\ > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"\
built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-ssreflect"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-finmap"
mathcomp-solvable:
needs:
- coq
- mathcomp-ssreflect
- mathcomp-fingroup
- mathcomp-algebra
- hierarchy-builder
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target mathcomp-solvable
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"mathcomp-solvable\" \\\n --dry-run\
\ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\
\ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-ssreflect"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-fingroup'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-fingroup"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-algebra'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-algebra"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: hierarchy-builder'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "hierarchy-builder"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-solvable"
mathcomp-ssreflect:
needs:
- coq
- hierarchy-builder
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target mathcomp-ssreflect
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"mathcomp-ssreflect\" \\\n --dry-run\
\ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\
\ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: hierarchy-builder'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "hierarchy-builder"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-ssreflect"
odd-order:
needs:
- coq
- mathcomp-character
- mathcomp-ssreflect
- mathcomp-fingroup
- mathcomp-algebra
- mathcomp-solvable
- mathcomp-field
- mathcomp
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-elpi
uses: cachix/cachix-action@v12
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: coq-elpi
- id: stepCheck
name: Checking presence of CI target odd-order
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-8.19\" --argstr job \"odd-order\" \\\n --dry-run 2>&1 > /dev/null)\n\
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-character'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-character"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-ssreflect"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-fingroup'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-fingroup"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-algebra'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-algebra"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-solvable'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-solvable"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-field'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp-field"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "mathcomp"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-8.19"
--argstr job "odd-order"
name: Nix CI for bundle coq-8.19
'on':
pull_request:
paths:
- .github/workflows/nix-action-coq-8.19.yml
pull_request_target:
paths-ignore:
- .github/workflows/nix-action-coq-8.19.yml
types:
- opened
- synchronize
- reopened
push:
branches:
- master
coq-elpi-2.1.0/.gitignore 0000664 0000000 0000000 00000001030 14601560135 0015206 0 ustar 00root root 0000000 0000000 *.o
*.cmx
*.cmo
*.cmi
*.a
*.cmxa
*.cmxs
*.cma
*.cmt
*.cmti
*.annot
.*~
.*.swp
*.vo
*.vos
*.vok
*.d
*.glob
.*.aux
*.html
*.txt
*.crashcoqide
\#*\#
etc/__pycache__/
/.deps.elpi
src/coq_elpi_config.ml
src/coq_elpi_vernacular_syntax.ml
src/coq_elpi_arg_syntax.ml
src/coq_elpi_builtins_HOAS.ml
doc/
Makefile.coq
Makefile.coq.conf
.merlin
Makefile.*.coq
Makefile.*.coq.conf
tests/test_glob/*.css
META
*.cache
apps/coercion/src/coq_elpi_coercion_hook.ml
.filestoinstall
apps/tc/src/coq_elpi_tc_hook.ml
apps/cs/src/coq_elpi_cs_hook.ml
coq-elpi-2.1.0/.nix/ 0000775 0000000 0000000 00000000000 14601560135 0014100 5 ustar 00root root 0000000 0000000 coq-elpi-2.1.0/.nix/ coq-overlays/ 0000775 0000000 0000000 00000000000 14601560135 0016724 5 ustar 00root root 0000000 0000000 coq-elpi-2.1.0/.nix/ coq-overlays/mathcomp-classical / 0000775 0000000 0000000 00000000000 14601560135 0022570 5 ustar 00root root 0000000 0000000 coq-elpi-2.1.0/.nix/ coq-overlays/mathcomp-classical /default.nix 0000664 0000000 0000000 00000000137 14601560135 0024735 0 ustar 00root root 0000000 0000000 { mathcomp-analysis, version ? null }:
mathcomp-analysis.classical.override {inherit version;}
coq-elpi-2.1.0/.nix/config.nix 0000664 0000000 0000000 00000001661 14601560135 0016071 0 ustar 00root root 0000000 0000000 {
format = "1.0.0";
attribute = "coq-elpi";
default-bundle = "coq-8.19";
bundles = {
"coq-8.19".coqPackages = {
coq.override.version = "8.19+rc1";
hierarchy-builder.override.version = "master";
hierarchy-builder-shim.job = false;
mathcomp.override.version = "master";
mathcomp.job = true;
odd-order.override.version = "master";
odd-order.job = true;
mathcomp-analysis.override.version = "master";
mathcomp-analysis.job = true;
mathcomp-finmap.override.version = "master";
mathcomp-finmap.job = true;
mathcomp-classical.override.version = "master";
mathcomp-classical.job = true;
mathcomp-single-planB-src.job = false;
mathcomp-single-planB.job = false;
mathcomp-single.job = false;
};
};
cachix.coq = {};
cachix.math-comp = {};
cachix.coq-community = {};
cachix.coq-elpi.authToken = "CACHIX_AUTH_TOKEN";
}
coq-elpi-2.1.0/.nix/coq-nix-toolbox.nix 0000664 0000000 0000000 00000000053 14601560135 0017660 0 ustar 00root root 0000000 0000000 "dd771a5001cd955514f2462cad7cdd90377530e3"
coq-elpi-2.1.0/.nix/coq-overlays/ 0000775 0000000 0000000 00000000000 14601560135 0016524 5 ustar 00root root 0000000 0000000 coq-elpi-2.1.0/.nix/coq-overlays/coq-elpi/ 0000775 0000000 0000000 00000000000 14601560135 0020235 5 ustar 00root root 0000000 0000000 coq-elpi-2.1.0/.nix/coq-overlays/coq-elpi/default.nix 0000664 0000000 0000000 00000007563 14601560135 0022414 0 ustar 00root root 0000000 0000000 { lib, mkCoqDerivation, which, coq, version ? null }:
with builtins; with lib; let
elpi = coq.ocamlPackages.elpi.override (lib.switch coq.coq-version [
{ case = "8.11"; out = { version = "1.11.4"; };}
{ case = "8.12"; out = { version = "1.12.0"; };}
{ case = "8.13"; out = { version = "1.13.7"; };}
{ case = "8.14"; out = { version = "1.13.7"; };}
{ case = "8.15"; out = { version = "1.15.0"; };}
{ case = "8.16"; out = { version = "1.17.0"; };}
{ case = "8.17"; out = { version = "1.17.0"; };}
{ case = "8.18"; out = { version = "v1.18.1"; };}
{ case = "8.19"; out = { version = "v1.18.2"; };}
] {} );
in mkCoqDerivation {
pname = "elpi";
repo = "coq-elpi";
owner = "LPCIC";
inherit version;
defaultVersion = lib.switch coq.coq-version [
{ case = "8.18"; out = "1.19.0"; }
{ case = "8.17"; out = "1.18.0"; }
{ case = "8.16"; out = "1.15.6"; }
{ case = "8.15"; out = "1.14.0"; }
{ case = "8.14"; out = "1.11.2"; }
{ case = "8.13"; out = "1.11.1"; }
{ case = "8.12"; out = "1.8.3_8.12"; }
{ case = "8.11"; out = "1.6.3_8.11"; }
] null;
release."1.19.0".sha256 = "sha256-kGoo61nJxeG/BqV+iQaV3iinwPStND+7+fYMxFkiKrQ=";
release."1.18.0".sha256 = "sha256-2fCOlhqi4YkiL5n8SYHuc3pLH+DArf9zuMH7IhpBc2Y=";
release."1.17.0".sha256 = "sha256-J8GatRKFU0ekNCG3V5dBI+FXypeHcLgC5QJYGYzFiEM=";
release."1.15.6".sha256 = "sha256-qc0q01tW8NVm83801HHOBHe/7H1/F2WGDbKO6nCXfno=";
release."1.15.1".sha256 = "sha256-NT2RlcIsFB9AvBhMxil4ZZIgx+KusMqDflj2HgQxsZg=";
release."1.14.0".sha256 = "sha256:1v2p5dlpviwzky2i14cj7gcgf8cr0j54bdm9fl5iz1ckx60j6nvp";
release."1.13.0".sha256 = "1j7s7dlnjbw222gnbrsjgmjck1yrx7h6hwm8zikcyxi0zys17w7n";
release."1.12.1".sha256 = "sha256-4mO6/co7NcIQSGIQJyoO8lNWXr6dqz+bIYPO/G0cPkY=";
release."1.11.2".sha256 = "0qk5cfh15y2zrja7267629dybd3irvxk1raz7z8qfir25a81ckd4";
release."1.11.1".sha256 = "10j076vc2hdcbm15m6s7b6xdzibgfcbzlkgjnlkr2vv9k13qf8kc";
release."1.10.1".sha256 = "1zsyx26dvj7pznfd2msl2w7zbw51q1nsdw0bdvdha6dga7ijf7xk";
release."1.9.7".sha256 = "0rvn12h9dpk9s4pxy32p8j0a1h7ib7kg98iv1cbrdg25y5vs85n1";
release."1.9.5".sha256 = "0gjdwmb6bvb5gh0a6ra48bz5fb3pr5kpxijb7a8mfydvar5i9qr6";
release."1.9.4".sha256 = "0nii7238mya74f9g6147qmpg6gv6ic9b54x5v85nb6q60d9jh0jq";
release."1.9.3".sha256 = "198irm800fx3n8n56vx1c6f626cizp1d7jfkrc6ba4iqhb62ma0z";
release."1.9.2".sha256 = "1rr2fr8vjkc0is7vh1461aidz2iwkigdkp6bqss4hhv0c3ijnn07";
release."1.8.3_8.12".sha256 = "15z2l4zy0qpw0ws7bvsmpmyv543aqghrfnl48nlwzn9q0v89p557";
release."1.8.3_8.12".version = "1.8.3";
release."1.8.2_8.12".sha256 = "1n6jwcdazvjgj8vsv2r9zgwpw5yqr5a1ndc2pwhmhqfl04b5dk4y";
release."1.8.2_8.12".version = "1.8.2";
release."1.8.1".sha256 = "1fbbdccdmr8g4wwpihzp4r2xacynjznf817lhijw6kqfav75zd0r";
release."1.8.0".sha256 = "13ywjg94zkbki22hx7s4gfm9rr87r4ghsgan23xyl3l9z8q0idd1";
release."1.7.0".sha256 = "1ws5cqr0xawv69prgygbl3q6dgglbaw0vc397h9flh90kxaqgyh8";
release."1.6.3_8.11".sha256 = "1j340cr2bv95clzzkkfmsjkklham1mj84cmiyprzwv20q89zr1hp";
release."1.6.3_8.11".version = "1.6.3";
release."1.6.2_8.11".sha256 = "06xrx0ljilwp63ik2sxxr7h617dgbch042xfcnfpy5x96br147rn";
release."1.6.2_8.11".version = "1.6.2";
release."1.6.1_8.11".sha256 = "0yyyh35i1nb3pg4hw7cak15kj4y6y9l84nwar9k1ifdsagh5zq53";
release."1.6.1_8.11".version = "1.6.1";
release."1.6.0_8.11".sha256 = "0ahxjnzmd7kl3gl38kyjqzkfgllncr2ybnw8bvgrc6iddgga7bpq";
release."1.6.0_8.11".version = "1.6.0";
release."1.6.0".sha256 = "0kf99i43mlf750fr7fric764mm495a53mg5kahnbp6zcjcxxrm0b";
releaseRev = v: "v${v}";
buildFlags = [ "OCAMLWARN=" ];
mlPlugin = true;
propagatedBuildInputs = [ coq.ocamlPackages.findlib elpi ];
meta = {
description = "Coq plugin embedding ELPI.";
maintainers = [ maintainers.cohencyril ];
license = licenses.lgpl21Plus;
};
}
coq-elpi-2.1.0/.nix/coq-overlays/hierarchy-builder/ 0000775 0000000 0000000 00000000000 14601560135 0022126 5 ustar 00root root 0000000 0000000 coq-elpi-2.1.0/.nix/coq-overlays/hierarchy-builder/default.nix 0000664 0000000 0000000 00000002357 14601560135 0024301 0 ustar 00root root 0000000 0000000 { lib, mkCoqDerivation, which, coq, coq-elpi,
version ? null, shim ? false }:
with lib; mkCoqDerivation {
pname = "hierarchy-builder" + optionalString shim "-shim";
owner = "math-comp";
inherit version;
defaultVersion = with versions; switch coq.coq-version [
{ case = range "8.13" "8.14"; out = "1.2.0"; }
{ case = range "8.12" "8.13"; out = "1.1.0"; }
{ case = isEq "8.11"; out = "0.10.0"; }
] null;
release."1.2.0".sha256 = "0sk01rvvk652d86aibc8rik2m8iz7jn6mw9hh6xkbxlsvh50719d";
release."1.1.0".sha256 = "sha256-spno5ty4kU4WWiOfzoqbXF8lWlNSlySWcRReR3zE/4Q=";
release."1.0.0".sha256 = "0yykygs0z6fby6vkiaiv3azy1i9yx4rqg8xdlgkwnf2284hffzpp";
release."0.10.0".sha256 = "1a3vry9nzavrlrdlq3cys3f8kpq3bz447q8c4c7lh2qal61wb32h";
releaseRev = v: "v${v}";
nativeBuildInputs = [ which ];
propagatedBuildInputs = [ coq-elpi ];
mlPlugin = true;
buildPhase = "make build" + optionalString shim " -C shim";
installFlags = [ "DESTDIR=$(out)" "COQMF_COQLIB=lib/coq/${coq.coq-version}" ]
++ optional shim "-C shim";
meta = {
description = "High level commands to declare a hierarchy based on packed classes";
maintainers = with maintainers; [ cohencyril siraben ];
license = licenses.mit;
};
}
coq-elpi-2.1.0/.nix/ocaml-overlays/ 0000775 0000000 0000000 00000000000 14601560135 0017035 5 ustar 00root root 0000000 0000000 coq-elpi-2.1.0/.nix/ocaml-overlays/elpi/ 0000775 0000000 0000000 00000000000 14601560135 0017766 5 ustar 00root root 0000000 0000000 coq-elpi-2.1.0/.nix/ocaml-overlays/elpi/default.nix 0000664 0000000 0000000 00000004613 14601560135 0022136 0 ustar 00root root 0000000 0000000 { lib
, buildDunePackage, camlp5
, ocaml
, menhir, menhirLib
, atdgen
, stdlib-shims
, re, perl, ncurses
, ppxlib, ppx_deriving
, coqPackages
, version ? if lib.versionAtLeast ocaml.version "4.08" then "1.17.0"
else if lib.versionAtLeast ocaml.version "4.07" then "1.15.2" else "1.14.1"
}:
let p5 = camlp5; in
let camlp5 = p5.override { legacy = true; }; in
let fetched = coqPackages.metaFetch ({
release."1.17.0".sha256 = "sha256-DTxE8CvYl0et20pxueydI+WzraI6UPHMNvxyp2gU/+w=";
release."1.16.5".sha256 = "sha256-tKX5/cVPoBeHiUe+qn7c5FIRYCwY0AAukN7vSd/Nz9A=";
release."1.15.2".sha256 = "sha256-XgopNP83POFbMNyl2D+gY1rmqGg03o++Ngv3zJfCn2s=";
release."1.15.0".sha256 = "sha256:1ngdc41sgyzyz3i3lkzjhnj66gza5h912virkh077dyv17ysb6ar";
release."1.14.1".sha256 = "sha256-BZPVL8ymjrE9kVGyf6bpc+GA2spS5JBpkUtZi04nPis=";
release."1.13.7".sha256 = "10fnwz30bsvj7ii1vg4l1li5pd7n0qqmwj18snkdr5j9gk0apc1r";
release."1.13.5".sha256 = "02a6r23mximrdvs6kgv6rp0r2dgk7zynbs99nn7lphw2c4189kka";
release."1.13.1".sha256 = "12a9nbdvg9gybpw63lx3nw5wnxfznpraprb0wj3l68v1w43xq044";
release."1.13.0".sha256 = "0dmzy058m1mkndv90byjaik6lzzfk3aaac7v84mpmkv6my23bygr";
release."1.12.0".sha256 = "1agisdnaq9wrw3r73xz14yrq3wx742i6j8i5icjagqk0ypmly2is";
release."1.11.4".sha256 = "1m0jk9swcs3jcrw5yyw5343v8mgax238cjb03s8gc4wipw1fn9f5";
releaseRev = v: "v${v}";
location = { domain = "github.com"; owner = "LPCIC"; repo = "elpi"; };
}) version;
in
buildDunePackage rec {
pname = "elpi";
inherit (fetched) version src;
patches = lib.optional (version == "1.16.5")
./atd_2_10.patch;
minimalOCamlVersion = "4.04";
duneVersion = "3";
# atdgen is both a library and executable
nativeBuildInputs = [ perl ]
++ [ (if lib.versionAtLeast version "1.15" || version == "dev" then menhir else camlp5) ]
++ lib.optional (lib.versionAtLeast version "1.16" || version == "dev") atdgen;
buildInputs = [ ncurses ]
++ lib.optional (lib.versionAtLeast version "1.16" || version == "dev") atdgen;
propagatedBuildInputs = [ re stdlib-shims ]
++ [ menhirLib ]
++ [ ppxlib ppx_deriving ]
;
meta = with lib; {
description = "Embeddable λProlog Interpreter";
license = licenses.lgpl21Plus;
maintainers = [ maintainers.vbgl ];
homepage = "https://github.com/LPCIC/elpi";
};
postPatch = ''
substituteInPlace elpi_REPL.ml --replace "tput cols" "${ncurses}/bin/tput cols"
'';
}
coq-elpi-2.1.0/.ocamlformat 0000664 0000000 0000000 00000000005 14601560135 0015524 0 ustar 00root root 0000000 0000000 m=120 coq-elpi-2.1.0/.vscode/ 0000775 0000000 0000000 00000000000 14601560135 0014565 5 ustar 00root root 0000000 0000000 coq-elpi-2.1.0/.vscode/settings.json 0000664 0000000 0000000 00000001727 14601560135 0017327 0 ustar 00root root 0000000 0000000 {
"files.exclude": {
"**/*.o": true,
"**/*.cmx": true,
"**/*.cmo": true,
"**/*.cmi": true,
"**/*.a": true,
"**/*.cmxa": true,
"**/*.cmxs": true,
"**/*.cma": true,
"**/*.cmt": true,
"**/*.cmti": true,
"**/*.annot": true,
"**/.*~": true,
"**/.*.swp": true,
"**/*.vo": true,
"**/*.vos": true,
"**/*.vok": true,
"**/*.d": true,
"**/*.glob": true,
"**/.*.aux": true,
"**/*.html": true,
"**/*.crashcoqide": true,
"**/\\#*\\#": true,
".deps.elpi": true,
"src/coq_elpi_config.ml": true,
"src/coq_elpi_vernacular_syntax.ml": true,
"**/Makefile.coq": true,
"**/Makefile.coq.conf": true,
"**/.merlin": true
},
"restructuredtext.confPath": "${workspaceFolder}/alectryon/recipes/sphinx",
"ocaml.server.args": [
"--fallback-read-dot-merlin"
],
} coq-elpi-2.1.0/Changelog.md 0000664 0000000 0000000 00000132147 14601560135 0015445 0 ustar 00root root 0000000 0000000 # Changelog
## [2.1.0] - 29/03/2024
### Commands
- New `Elpi Accumulate dbname File filename` allows to accumulate a file int a db
- Change `Elpi Db` now only creates (and initialises) a database for the specified phase
### API
- New `coq.parse-attributes` support for the `attlabel` specification,
see `coq-lib-common.elpi` for its documentation.
- New `coq.goal->pp`
- Replace `coq.replay-all-missing-synterp-actions` by (nestable) groups of actions
- New `coq.begin-synterp-group` and `coq.end-synterp-group` primitives
- New `coq.replay-synterp-action-group` primitive (replaces `coq.replay-all-missing-synterp-actions` in conjunction with a group)
- New `coq.replay-next-synterp-actions` to replay all synterp actions until the next beginning/end of a synterp group
- New `coq.primitive.projection-unfolded` to fold/unfold a primitive projection.
Note that unfolded primitive projections are still compact terms, but they
are displayed as `match` expressions and some Ltac code can see that.
## [2.0.2] - 01/02/2024
Requires Elpi 1.18.2 and Coq 8.19.
### API
- Fix `coq.elaborate-*` does not erase the type annotation of `Let`s (regression
introduced in 2.0.1). This fix may introduce differences in generated names
- Fix `coq.elaborate-*` are not affected anymore by printing options
### Commands
- Fix install the right initial parsing state (the one before any synterp action
is re-played)
### HOAS
- Fix evar instantiation loss when crossing the elpi/ltac border
- Fix encoding of "definitional classes" (`Class` with no record)
- Fix order of implicit arguments of `Record`
### Misc
- Change requiring `elpi` does not load primitive integers nor primitive floats
### Apps
- TC: avoid declaring options twice (could make vscoq2 fail)
- CS: `cs` now takes a context, a term that is the projection of some structure applied to the parameters of the structure, a term to put a structure on and the solution to return
## [2.0.1] - 29/12/2023
Requires Elpi 1.18.1 and Coq 8.19.
This minor release adds compatibility with Coq 8.19.
## [2.0.0] - 23/12/2023
Requires Elpi 1.18.1 and Coq 8.18.
This major release accommodates for the separation of parsing from execution
of Coq 8.18 enabling Coq-Elpi programs to be run efficiently (and correctly)
under VSCoq 2.0.
### Documentation
- New section about parsing/execution separation in the [Writing commands in Elpi](https://lpcic.github.io/coq-elpi/tutorial_coq_elpi_command.html) tutorial
### Commands
- New `Elpi *` commands understand the `#[phase]` attribute, see the doc in
the [README](README.md#vernacular-commands) file, and the section
about the [separation of parsing from execution](README.md#separation-of-parsing-from-execution-of-vernacular-commands)
- New `Elpi Export` understands an `As` clause to rename or alias a program when exported
### API
- Change `coq.elpi.add-predicate` now locality can be changed
- Experimental `coq.toposort` returns a valid topological ordering of the nodes
of a graph
- Change `coq.TC.db-for`, now instances are returned sorted wrt their priority
- New `tc-priority`, contains the priority of an instance and if the priority
has been given by the user or computed by `coq`
- Change `tc-instance`, now the type is `gref -> tc-priority -> tc-instance` i.e. the priority is not an integer anymore
- New `coq.ltac.fresh-id` to generate fresh names in the proof context
- New `@no-tc!` attribute supported by `coq.ltac.call-ltac1`
- New `coq.TC.get-inst-prio` returns the `tc-priority` of an instance
- New `synterp-action` datatype
- New `coq.replay-all-missing-synterp-actions`
- New `coq.replay-synterp-action`
- New `coq.next-synterp-action`
- New `coq.synterp-actions` (parsing phase only)
### Apps
- New `tc` app providing an implementation of a type class solver written in elpi.
This app is experimental
## [1.19.3] - 12/10/2023
Requires Elpi 1.16.5 and Coq 8.18.
### Misc
- Fix `Elpi Export` broken when used from VsCoq2
### APIs
- New `ltac1-tactic` opaque data type
- New `tac` argument constructor
- Change `coq.ltac.call-ltac1` now accepts either a string (tactic name) or
a tactic expression (of type `ltac1-tactic`)
- New `ltac_tactic:(...)` syntax to pass tactic expressions to Elpi tactics
- New `coq.extra-dep` predicate
## [1.19.1] - 30/08/2023
Requires Elpi 1.16.5 and Coq 8.18.
### Misc
- Automate release process
## [1.19.0] - 04/08/2023
Requires Elpi 1.16.5 and Coq 8.18.
### APPS
- New `coercion` app providing `coercion` predicate
to program coercions (thanks @proux01).
This app is experimental.
### API
- Removed option `@nonuniform!` as it disappears from Coq 8.18.
(c.f. https://github.com/coq/coq/pull/17716 )
## [1.18.0] - 27/07/2023
Requires Elpi 1.16.5 and Coq 8.17.
### Doc
- Mention the trace browser for VSCode in the Elpi tutorial.
### API
- New `coq.elpi.accumulate-clauses` takes a list of clauses which share the
same DB and accumulation site
- New `coq.elpi.add-predicate` to declare the signature of a new predicate into
a Db
- New `coq.elpi.predicate` to build a term of type `prop` out of a predicate
name and arguments
- Change `coq.env.global` now relates a term with a gref, instead of working one
way only
- Change `coq.elpi.accumulate*` generalise clauses over global universe level,
and error if algebraic levels are present. It used to warn if levels were
present.
- New `coq.elaborate*skeleton` support the `@no-tc!` option to disable type
class resolution
- New `@global!` option for `coq.elpi.accumulate*`
- New `coq.env.current-section-path`
- New `coq.TC.db-tc` giving all type classes
- New `coq.reduction.eta-contract`
### HOAS
- Fix evar declarations were (rarely) generated at the wrong depth, possibly
resulting in variable captures in types containing binders
- Fix `assert false` in evar instantiation readback (eta contraction code was
incomplete)
- Fix resiliency in case a goal is closed by side effect (was raising fatal
errors such as "Not a goal" or "Not a variable after goal")
- Change assigning a hole linked to an evar *always* triggers type checking.
This is necessary even if the term being assigned is well typed since one
may still need to declare some universe constraints.
- Change propagate type constraints in `Prop` inward (Coq 8.17 only). Eg.
`Check (T -> _) : Prop` fails in 8.17 since `_` is assumed to be in `Type`.
We propagate the constraint ourselves across `->`, `/\`, `\/` and `~`.
- Quotations `{{ ... }}` are now parsed by Coq ensuring the end of input is
reached. Spurious text results in a parse error. For example `{{ f ) }}`
is no more accepted, as well as `{{ _.x }}`
### Vernacular
- New `Elpi Print` also print the program in `.txt` format
### Runtime
- Change compilation cache able to prevent most of lengthy compilations in
Hierarchy-Builder for MathComp 2.0. In some cases Coq-Elpi is more picky
about the order of accumulated files, in particular a file containing
the spilling of a predicate `{p}` needs to be accumulated after the
type or mode of `p` is declared
### APPS
- `derive Inductive i {A}` now sets `A` implicit status globally
- `lock Definition f {A}` now sets `A` implicit status globally
## [1.17.1] - 09/03/2023
Requires Elpi 1.16.5 and Coq 8.17.
### API:
- New `coq.int->uint63` and `coq.float->float64`
- Fix bug introduced in 1.17.0 affecting `coq.ltac.call-ltac1`
## [1.17.0] - 13/02/2023
Requires Elpi 1.16.5 and Coq 8.17.
### API
- New `coq.modpath->library`
- New `coq.modtypath->library`
- Fix `coq.env.*` APIs generating inductives, definitions and modules now
emit metadata in the `.glob` files so that `coqdoc` can generate hyperlinks
### APPS
- Add `NES.{List,Print}`.
- Support relative paths in `NES.{Open,List,Print}`
(path `_.P` references top-level namespace `P`, paths without a
leading `_.` are relative to the current namespace)
## [1.16.0] - 10/11/2022
Requires Elpi 1.16.5 and Coq 8.16.
The main change is the `derive` app which must now be loaded
by importing `derive.std` (just loading `derive` won't work).
See the [new derive documentation](apps/derive).
### API
- Change `coq.env.module` and `coq.env.module-type` do not fail if the
module (type) contains a mutual inductive. The resulting `gref` is going
to me unusable with most APIs, though.
- Change `coq.env.module` returns a ADT describing the module contents
- Change `coq.gref->path` and `coq.gref->id` do work on `gref` which point
to mutual inductives.
- New `coq.env.term-dependencies` computing all the `grefs` occurring in a term.
- New `coq.redflag` and `coq.redflags` types for `@redflags!` option understood
by `coq.reduction.lazy.*` `and coq.reduction.cbv.norm`
- New `coq.env.fresh-global-id`
### APPS
- Change `derive` usage.
One should now import `From elpi.apps Require Import derive.std`
- Change derivations `eq` and `eqOK` move to `derive.legacy`
- New derivations `eqb` and `eqbOK` subsuming the previous ones
## [1.15.6] - 27-08-2022
Requires Elpi 1.16.5 and Coq 8.16.
- Fix parse error location display for quotation code
- Fix HOAS of inductives with non-uniform parameters
## [1.15.5] - 30-07-2022
Requires Elpi 1.16.5 and Coq 8.16.
- Fix parse error location display for inline code
- Fix HOAS of evars: pruning was not propagated to the type of the evar
## [1.15.4] - 26-07-2022
Requires Elpi 1.16.5 and Coq 8.16.
- Fix lexical analysis inside quotations error location display
- Fix drop of universe constraints attached to automatically generates
universe levels (eg when `sort (typ X)` is passed to Coq)
- Fix nix CI
## [1.15.3] - 20-07-2022
Requires Elpi 1.16.5 and Coq 8.16.
- Fix parse error location display
## [1.15.2] - 19-07-2022
Requires Elpi 1.16.5 and Coq 8.16.
- API:
- Fix `coq.env.indt-decl` correctly handles universes in parameters of
universe polymorphic inductive
- Fix `coq.typecheck-indt-decl` ignores non uniform parameters to compute
the universe level of the inductive
- Fix `coq.elaborate-indt-decl-skeleton` ignores non uniform parameters to
compute the universe level of the inductive
## [1.15.1] - 16-07-2022
Requires Elpi 1.16.5 and Coq 8.16.
- API:
- Fix `coq.elaborate*skeleton` does refresh universes
- New `@keepunivs!` attribute to force skeleton APIs to not
refresh universes. This is useful to keep a link between
a universe declaration and the declaration itself but still
elaborate it
- Fix Coq-Elpi is reentrant when commands call tactics
## [1.15.0] - 13-07-2022
Requires Elpi 1.16.5 and Coq 8.16.
The main changes are:
- experimental support for universe polymorphism. One can read and write
universe polymorphic terms and manipulate their constraint declarations.
Terms now have a new `pglobal` term constructor, akin to `global` but for
global references to universe polymorphic terms, also carrying a universe
instance. The attribute `@uinstance!` can be used to pass or retrieve
a universe instance to/from APIs to access the Coq environment, as in
`@uinstance! I => coq.env.typeof GR Ty_at_I`.
The meaning of `@uinstance! I =>` depends if `I` is an unset variable or a
concrete universe instance. In the former case the API generate a fresh
universe instance (for `GR`) and assign it to `I`; in the latter case it uses
the provided universe instance.
See [coq-builtin](coq-builtin.elpi) for the full documentation
- command arguments are elaborated by Coq (unless told otherwise). As a
consequence arguments can use the full Coq syntax, including deep pattern
matching and tactics in terms. Raw arguments are (and will remain) available,
but don't support that yet
### APPS
- New experimental support for polymorphic definitions in `locker`
- New example of `clearbody` tactic taking a list of names in `eltac`
- Change `derive` sets, *globally*, `Uniform Inductive Parameters`. See
https://coq.inria.fr/refman/language/core/inductive.html#coq:flag.Uniform-Inductive-Parameters
for reference. The immediate effect is that inductive types uniform parameters
don't have to be repeated in the types of the constructors (they can't vary
anyway). Non-uniform parameters and indexes have to be passed, as usual.
If the flag is unset by the user `Coq-Elpi` will raise a warning since
inference of non-uniform parameters is not implemented
### HOAS
- Change arguments to commands are elaborated by Coq by default
- New attribute `#[arguments(raw)]` to get arguments in raw format (as in
version 1.14 or below)
- Change raw inductive declaration using `|` to mark non-uniform
parameters is expected to not pass uniform parameters to the inductive
type (the same behavior applies to elaborated arguments, making the two
consistent)
- Change `coercion` attribute for record fields now takes values `off`,
`regular` or `reversible`
- New `pglobal` term constructor carrying a `gref` and a `univ-instance` for
universe polymorphic terms
- New `upoly-indt-decl` argument type for polymorphic inductive types
declarations
- New `upoly-const-decl` argument type for polymorphic definitions
- New `upoly-decl` data type for universe parameters declarations, i.e.
the `@{u1 u2 | u1 < u2}` Coq syntax one can use for inductives or definitions
- New `upoly-decl-cumul` data type for universe parameters declarations, i.e.
the `@{u1 u2 | u1 < u2}` Coq syntax one can use for cumulative inductives
- Rename `univ` -> `sort` i.e. `(sort S)` is a `term` and `S` can be `prop` or
`(type U)` where `U` is a `univ`
- New `univ-instance` opaque type to represent how a polymorphic constant is
instantiated, i.e. `(pglobal GR I)` where `GR` is a `gref` and `I` a
`univ-instance`
- New `univ.variable` opaque type for `univ` which are not algebraic. This data
type is used in `upoly-decl` and `upoly-decl-cumul`
### API
- New `coq.env.indc->indt`
- New `coq.env.dependencies` to compute the dependencies of a `gref`
- New `coq.env.transitive-dependencies`
- New `@nonuniform!` and `@reversible!` for `coq.coercion.declare`
- New `@uinstance!` attribute supported by many `coq.env.*` APIs that can be
used to read/write the universe instance of polymorphic constants. E.g.
`@uinstance! UI => coq.env.typeof GR Ty` can instantiate `Ty` to `UI` if
provided or set `UI` to a fresh instance if not
- New `@udecl!` attribute to declare polymorphic constants or inductives,
like the `@{u1 u2 | u1 < u2}` Coq syntax
- New `@udecl-cumul!` attribute to declare polymorphic inductives,
like the `@{+u1 u2 | u1 < u2}` Coq syntax
- New `@univpoly!` shorter version of `@udecl!`,
like the `#[universes(polymorphic)]` Coq syntax (without giving any other
`@{u1 u2 | u1 < u2}` directive)
- New `@univpoly-cumul!` shorter version of `@udecl-cumul!`, like
the `#[universes(polymorphic,cumulative)]` Coq syntax
- New `coq.env.global` API to craft a `term` from a `gref`. When used with
spilling `{coq.env.global GR}` gives either `(global GR)` or `(pglobal GR I)`
depending on `GR` being universe polymorphic or not. It understands the
`@unistance!` attribute for both reading or setting `I`
- New `coq.env.univpoly?` to tell if a `gref` is universe polymorphic and how
many parameters it has
- Change `coq.univ.leq` -> `coq.sort.leq`
- Change `coq.univ.eq` -> `coq.sort.eq`
- Change `coq.univ.sup` -> `coq.sort.sup`
- New `coq.sort.pts-triple` computes the resulting `sort` of a product
- New `coq.univ.constraints` gives all the universe constraints in a first class
form
- Change `coq.univ.new` does not take a list anymore
- New `coq.univ` to find a global universe
- New `coq.univ.global?` tests if a universe is global
- New `coq.univ.variable` links a `univ` to a `univ.variable` (imposing an
equality constraint if needed)
- New `coq.univ.variable.constraints` finds all constraints talking about a
variable
- New `coq.univ.variable.of-term` finds all variables occurring in a term
- New `coq.univ-instance` links a `univ-instance` to a list of of
`univ.variable`
- New `coq.univ-instance.unify-eq` unifies two `univ-instance`
(for the same `gref`)
- New `coq.univ-instance.unify-leq` unifies two `univ-instance`
(for the same `gref`)
- New `coq.univ.set` OCaml's set for `univ`
- New `coq.univ.map` OCaml's map for `univ`
- New `coq.univ.variable.set` OCaml's set for `univ.variable`
- New `coq.univ.variable.map` OCaml's map for `univ.variable`
### Vernacular
- New `Accumulate File
At the time of writing Proof General does not handle quotations correctly, see ProofGeneral/PG#437.
In particular `Elpi Accumulate lp:{{ .... }}.` is used in tutorials to mix Coq and Elpi code
without escaping. Coq-Elpi also accepts `Elpi Accumulate " .... ".` but strings part of the
Elpi code needs to be escaped. Finally, for non-tutorial material, one can always put
the code in an external file declared with `From some.load.path Extra Dependency "filename" as f.`
and use `Elpi Accumulate File f.`.
CoqIDE does handle quotations. The installation process puts
[coq-elpi.lang](etc/coq-elpi.lang)
in a place where CoqIDE can find it. Then you can select `coq-elpi`
from the menu `Edit -> Preferences -> Colors`.
For Vim users, [Coqtail](https://github.com/whonore/Coqtail) provides syntax
highlighting and handles quotations.
To install the development version one can type
```
opam pin add coq-elpi https://github.com/LPCIC/coq-elpi.git
```
One can also clone this repository and type `make`, but check you have
all the dependencies installed first (see [coq-elpi.opam](coq-elpi.opam)).
We recommend to look at the [CI setup](.github/workflows) for
ocaml versions being tested. Also, we recommend to install `dot-merlin-reader`
and `ocaml-lsp-server` (version 1.15).
# Coq-Elpi
[Coq](https://github.com/coq/coq) plugin embedding [Elpi](https://github.com/LPCIC/elpi).
## What is Elpi
[Elpi](https://github.com/LPCIC/elpi) provides an easy-to-embed implementation
of a dialect of λProlog, a programming language well suited to manipulate
abstract syntax trees containing binders and unification variables.
## What is Coq-Elpi
Coq-Elpi provides a Coq plugin that lets one define new commands and tactics in
Elpi. For that purpose it provides an embedding of Coq's terms into λProlog
using the Higher-Order Abstract Syntax approach
([HOAS](https://en.wikipedia.org/wiki/Higher-order_abstract_syntax)). It also
exports to Elpi a comprehensive set of Coq's primitives, so that one can
print a message, access the environment of theorems and data types, define a
new constant, declare implicit arguments, type classes instances, and so on.
For convenience it also provides quotations and anti-quotations for Coq's
syntax, so that one can write `{{ nat -> lp:X }}` in the middle of a λProlog
program instead of the equivalent AST.
## What is the purpose of all that
In the short term, provide an extension language for Coq well suited to
manipulate terms containing binders. One can already use Elpi to implement
commands and tactics.
As ongoing research we are
looking forward to express algorithms like higher order unification and type
inference, and to provide an alternative elaborator for Coq.
## Installation
The simplest way is to use [OPAM](http://opam.ocaml.org/) and type
```
opam repo add coq-released https://coq.inria.fr/opam/released
opam install coq-elpi
```
### Editor Setup
The recommended user interface is [VSCoq](https://github.com/coq-community/vscoq/).
We provide an [extension for vscode](https://github.com/LPCIC/coq-elpi-lang) in the
market place, just look for Coq Elpi. The extension provides syntax hilighting
for both languages even when they are nested via quotations and antiquotations.
Other editors (click to expand)
Development version (click to expand)
(click to expand)
- `Elpi Command ` creates a Db (a program that is accumulated into
other programs). `
` is the initial contents of the Db, including the
type declaration of its constituting predicates.
It understands the `#[phase]` attribute, see [synterp-vs-interp](README.md#separation-of-parsing-from-execution-of-vernacular-commands).
- `Elpi Program
` lower level primitive letting one crate a
command/tactic with a custom preamble `
`.
- `From some.load.path Extra Dependency
|File
` is verbatim Elpi code, either `lp:{{ ... }}` or `" ... "` (in the
latter case, strings delimiters need to be escaped following Coq rules, e.g.
`lp:{{ coq.say "hello!" }}` becomes `" coq.say ""hello!"" "`).
- `
` runs `` in the current program (or in
`` if specified).
- `Elpi Query [] ` runs
`` in the current (synterp) program (or in
`` if specified) and `` in the current program (or ``).
- `elpi query [] *` runs the `` predicate
(that must have the same signature of the default predicate `solve`).
### `map` Map a container over its parameters. ```coq Elpi derive.map list. Check list_map : forall A B, (A -> B) -> list A -> list B. ``` ### `lens` See also [theories/derive/lens.v](theories/derive/lens.v) for the `Lens` definition and the support constants `view`, `set` and `over`. ```coq Record pa_record A := { f3 : peano; f4 : A; }. Elpi derive.lens pa_record. Check _f3 : forall A, Lens (pa_record A) (pa_record A) peano peano. ``` ### `lens_laws` See also [theories/derive/lens_laws.v](theories/derive/lens_laws.v) for the statements of the 4 laws (set_set, view_set, set_view, exchange). ```coq Elpi derive.lens_laws pa_record. Check _f3_view_set : forall A (r : pa_record A) x, view _f3 (set _f3 x r) = x. ``` ### `param1` Unary parametricity translation. ```coq Elpi derive.param1 nat. Print is_nat. (* Inductive is_nat : nat -> Type := | is_O : is_nat 0 | is_S : forall n : nat, is_nat n -> is_nat (S n) *) ``` ### `param1_functor` ```coq Elpi derive.param1.functor is_list. Check is_list_functor : forall A PA QA, (forall x, PA x -> QA x) -> forall l, is_list A PA l -> list A QA l. ``` ### `param1_trivial` ```coq Elpi derive.param1.trivial is_nat. Check is_nat_trivial : forall x : nat, { p : is_nat x & forall q, p = q }. Check is_nat_inhab : forall x : nat, is_nat x. ``` ### `induction` Induction principle for `T` based on `is_T` ```coq Elpi derive.induction list. Check list_induction : forall (A : Type) (PA : A -> Type) P, P (nil A) -> (forall x : A, PA x -> forall xs, P xs -> P (cons A x xs)) -> forall l, is_list A PA l -> P l. ``` ### `tag` The "name" of the constructor ```coq Elpi derive.tag peano. Check peano_tag : peano -> positive. ``` ### `fields` The types of the fields and the fields of each constructor ```coq Elpi derive.fields peano. Check peano_fields_t : positive -> Type. Check peano_fields : forall (n:peano), peano_fields_t (peano_tag n). Check peano_construct : forall (p: positive), peano_fields_t p -> Datatypes.option peano. Check peano_constructP : forall (n:peano), peano_construct (peano_tag n) (peano_fields n) = Datatypes.Some n. ``` ### `eqb` Equality test ```coq Elpi derive.eqb peano. Check peano_eqb : peano -> peano -> bool. ``` ### `eqbcorrect` Two directions of the soundness proof ```coq Elpi derive.eqbcorrect peano. Check peano_eqb_correct : forall n m, peano_eqb n m = true -> n = m. Check peano_eqb_refl : forall n, peano_eqb n n = true. ``` ### `eqbOK` The soundness proof ```coq Elpi derive.eqbOK peano. Check peano_eqb_OK : forall n m, reflect (n = m) (peano_eqb n m). ``` ### `param1_congr` Used by `param1_trivial`, not interesting. ```coq Elpi derive.param1.congr is_nat. Check is_Succ congr : forall x (px qx : is_nat x), px = qx -> is_Succ x px = is_Succ x qx. ```
See [Deriving proved equality tests in Coq-elpi: Stronger Induction Principles for
Containers](http://drops.dagstuhl.de/opus/volltexte/2019/11084/) for a
description of most of these components.
### `isK`
Given an inductive type it generates for each constructor a function that
tests if a term is a specific constructor.
Example:
```coq
Elpi derive.isK list.
Print list_is_nil. (*
list_is_nil =
fun (A : Type) (i : list A) =>
match i with
| nil => true
| _ => false
end
*)
```
### `projK`
Given an inductive type it generates for each constructor `K` and argument
`i` of this constructor a function extracting that argument (provided enough
default values).
```coq
Elpi derive.projK Vector.t.
Check projcons1. (*
projcons1
: forall (A : Type) (H : nat),
A -> forall n : nat, Vector.t A n ->
Vector.t A H -> A
```
The intended use is to perform injection, i.e. one aleady has a term of the
shape `K args` and can just use these args to provide the default values.
If the projected argument's type depends on the value of other arguments, then it
is boxed using `existT`.
```coq
Check projcons3. (*
projcons3
: forall (A : Type) (H : nat),
A -> forall n : nat, Vector.t A n ->
Vector.t A H -> {i1 : nat & Vector.t A i1}
*)
```
### injection
`injection H EqAB PL` given an equation `H` of type `EqAB` returns a list
of equations `PL`. `EqAB` is expected to be of the form `K .. = K ..` for
a constructor `K`.
coverage: does not do the smart thing when the obtained equations are like `{ i : nat & Vector.t A i } = ...` in which case, given that `nat` is `eqType` one could obtain systematically the two equalities.
Note: this is not a real derivation, since it generates no constant, but it a piece of
code used by derivations.
### discriminate
`discriminate H EqAB G PG` given an equation `H` of type `EqAB` and
a goal `G` it provides a proof `PG`. It asserts that `EqAB` is of
the form `K1 .. = K2 ..` when `K1` is a constructor different from `K2`.
Note: this is not a real derivation, since it generates no constant, but it a piece of
code used by derivations.
### `bcongr`
We call a boolean congruence lemma an instance of the `reflect` predicate
on a proposition `K x1..xn = K y1..yn` and a boolean expression `b1 && .. bn`.
```coq
Elpi derive.bcongr list.
Check nil_congr : forall A, reflect (@nil A = @nil A) true.
Check cons_congr :
forall A,
forall (x y : A) b1, reflect (x = y) b1 ->
forall (xs ys : list A) b2, reflect (xs = ys) b2 ->
reflect (cons x xs = cons y ys) (b1 && b2).
```
### `eq`
Generates a boolean comparison function.
```coq
Elpi derive.eq list.
Check list_eq. (*
list_eq
: forall A : Type,
(A -> A -> bool) -> list A -> list A -> bool
*)
```
### `eqK`
Generates, for each constructor, the correctness lemma for the comparison
function.
```coq
Elpi derive.eqK list.
Check eq_axiom_nil : forall A fa, axiom (list A) (list_eq A fa) (@nil A).
Check eq_axiom_cons : forall A fa,
forall x, axiom A fa x ->
forall xs, axiom (list A) (list_eq A fa) xs ->
axiom (list A) (list_eq A fa) (cons x xs).
```
### `eqcorrect`
Correctness of equality test using reified type information.
```coq
Elpi derive.eqcorrect list.
Check list_eq_correct :
forall A f l, is_list A (eq_axiom A f) l -> eq_axiom (list A) (list_eq A f) l.
```
### `eqOK`
Correctness of equality test.
```coq
Elpi derive.eqOK list.
Check list_eq_OK :
forall A f, (forall a, axiom A f a) -> (forall l, eq_axiom (list A) (list_eq A f) l).
```
## Coverage
This is the list of inductive types we use for testing, and the table with the result of each derivation (:sunny: = OK, :bug: = does not work but might, :cloud: = looks like this can't possible work)
```coq
Inductive empty := .
Inductive unit := tt.
Inductive peano := Zero | Succ (n : peano).
Inductive option A := None | Some (_ : A).
Inductive pair A B := Comma (a : A) (b : B).
Inductive seq A := Nil | Cons (x : A) (xs : seq A).
Inductive rose (A : Type) := Leaf | Node (sib : seq (rose A)).
Inductive nest A := NilN | ConsN (x : A) (xs : nest (pair A A)).
Fail Inductive bush A := BNil | BCons (x : A) (xs : bush (bush A)).
Inductive w A := via (f : A -> w A).
Inductive vect A : peano -> Type := VNil : vect A Zero | VCons (x : A) n (xs : vect A n) : vect A (Succ n).
Inductive dyn := box (T : Type) (t : T).
Inductive zeta Sender (Receiver := Sender) := Envelope (a : Sender) (ReplyTo := a) (c : Receiver).
Inductive beta (A : (fun x : Type => x) Type) := Redex (a : (fun x : Type => x) A).
Inductive iota := Why n (a : match n in peano return Type with Zero => peano | Succ _ => unit end).
Inductive large := K1 (_ : unit) | K2 (_ : unit) (_ : unit) | ...
Inductive prim_int := PI (i : Int63.int).
Inductive prim_float := PF (f : PrimFloat.float).
Record fo_record := { f1 : peano; f2 : unit; }.
Record pa_record A := { f3 : peano; f4 : A; }.
Record pr_record A := { pf3 : peano; pf4 : A; }. (* with primitive projections *)
Record dep_record := { f5 : peano; f6 : vect unit f5; }.
Variant enum := E1 | E2 | E3.
```
test | eq | param1 | map | induction | isK | projK | bcongr | eqK | eqcorrect | eqOK | lens_laws
-----------|---------|---------|---------|-----------|---------|---------|---------|---------|-----------|---------|----------
empty | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :cloud:
unit | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :cloud:
peano | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :cloud:
option | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :cloud:
pair | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :cloud:
seq | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :cloud:
rose | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :cloud:
nest | :cloud: | :sunny: | :cloud: | :sunny: | :sunny: | :sunny: | :sunny: | :bug: | :bug: | :bug: | :cloud:
w | :cloud: | :sunny: | :bug: | :sunny: | :sunny: | :sunny: | :sunny: | :bug: | :bug: | :bug: | :cloud:
vect | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :bug: | :bug: | :bug: | :bug: | :cloud:
dyn | :cloud: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :bug: | :bug: | :bug: | :bug: | :cloud:
zeta | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :cloud:
beta | :sunny: | :sunny: | :bug: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :bug: | :sunny: | :cloud:
iota | :cloud: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :cloud: | :bug: | :cloud: | :cloud: | :cloud:
large | :sunny: | :sunny: | :bug: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :cloud:
prim_int | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :cloud:
prim_float | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :cloud: | :cloud: | :cloud:
fo_record | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny:
pa_record | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny:
pr_record | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny:
dep_record | :bug: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :bug: | :bug: | :bug: | :bug: | :cloud:
enum | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :sunny: | :cloud:
test | functor | inhab | congr | trivial |
----------|---------|---------|-----------|---------|
is_empty | :sunny: | :sunny: | :sunny: | :sunny: |
is_unit | :sunny: | :sunny: | :sunny: | :sunny: |
is_peano | :sunny: | :sunny: | :sunny: | :sunny: |
is_option | :sunny: | :sunny: | :sunny: | :sunny: |
is_pair | :sunny: | :sunny: | :sunny: | :sunny: |
is_seq | :sunny: | :sunny: | :sunny: | :sunny: |
is_rose | :sunny: | :sunny: | :sunny: | :sunny: |
is_nest | :bug: | :bug: | :cloud: | :cloud: |
is_w | :bug: | :sunny: | :sunny: | :bug: |
is_vect | :sunny: | :bug: | :cloud: | :bug: |
is_dyn | :sunny: | :cloud: | :cloud: | :bug: |
is_zeta | :sunny: | :sunny: | :sunny: | :sunny: |
is_beta | :sunny: | :sunny: | :sunny: | :sunny: |
is_iota | :sunny: | :bug: | :cloud: | :bug: |
is_large | :sunny: | :sunny: | :bug: | :bug: |
is_prim_int | :sunny: | :sunny: | :sunny: | :sunny: |
is_is_prim_float| :sunny: | :sunny: | :sunny: | :sunny: |
is_fo_record | :sunny: | :sunny: | :sunny: | :sunny: |
is_pa_record | :sunny: | :sunny: | :sunny: | :sunny: |
is_pr_record | :sunny: | :sunny: | :sunny: | :sunny: |
is_dep_record| :sunny: | :bug: | :sunny: | :bug: |
is_enum | :sunny: | :sunny: | :sunny: | :sunny: |
### `invert` ```coq Inductive is_list A PA : list A -> Type := | nilR : is_list (@nil A) | consR : forall a : A, PA a -> forall xs : list A, is_list xs -> is_list (cons a xs). Elpi derive.invert is_list. Print is_list_inv. (* Inductive is_list_inv (A : Type) (PA : A -> Type) (idx0 : list A) : Type := | nilR_inv : idx0 = nil -> is_list_inv A PA idx0 | consR_inv : forall a : A, PA a -> forall xs : list A, is_list_inv A PA xs -> idx0 = (cons a xs) -> is_list_inv A PA idx0. *) ``` ## `idx2inv` ```coq Elpi derive.idx2inv is_list. Check is_list_to_is_list_inv : forall A PA l, is_list A PA l -> is_list_inv A PA l. ```