Skip to content

Commit

Permalink
Agda version 2.7.0 (#1238)
Browse files Browse the repository at this point in the history
I think it's about time we consider updating the library to Agda 2.7.0.
It's very unfortunate that the newest version is still not hosted with
homebrew, but considering it's been over 5 months now and [nothing's
happening](Homebrew/homebrew-core#193315), we
should consider moving away from depending on it.

---------

Co-authored-by: VojtechStep <[email protected]>
  • Loading branch information
fredrik-bakke and VojtechStep authored Jan 19, 2025
1 parent 13af1cf commit 77decd8
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 26 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ jobs:
strategy:
matrix:
os: [macOS-13, ubuntu-latest]
agda: ['2.6.4']
agda: ['2.7.0']
steps:
- name: Checkout our repository
uses: actions/checkout@v3
with:
path: master
- name: Setup Agda
uses: wenkokke/setup-agda@v2.1.0
uses: wenkokke/setup-agda@v2.5.0
with:
agda-version: ${{ matrix.agda }}

Expand All @@ -57,6 +57,7 @@ jobs:
- name: Typecheck library
run: |
cd master
agda --version
make check
- name: Save Agda build cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
agda: ['2.6.4']
agda: ['2.7.0']
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand All @@ -39,7 +39,7 @@ jobs:
fetch-depth: 0

- name: Setup Agda
uses: wenkokke/setup-agda@v2.1.0
uses: wenkokke/setup-agda@v2.5.0
with:
agda-version: ${{ matrix.agda }}

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/profiling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
agda: ['2.6.4']
agda: ['2.7.0']

steps:
- name: Checkout our repository
Expand All @@ -24,13 +24,14 @@ jobs:
path: repo

- name: Setup Agda
uses: wenkokke/setup-agda@v2.1.0
uses: wenkokke/setup-agda@v2.5.0
with:
agda-version: ${{ matrix.agda }}

- name: Typecheck library with profiling
run: |
cd repo
agda --version
mkdir -p temp
make check-profile 2> temp/memory-results.txt | tee temp/benchmark-results.txt
Expand Down
2 changes: 1 addition & 1 deletion HOME.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ working and learning mathematicians. Our library is designed to work towards
this goal, and we welcome contributions to the library within any topic in
mathematics.

The agda-unimath library is compatible with Agda 2.6.4 and can be compiled by
The agda-unimath library is compatible with Agda 2.7.0 and can be compiled by
running `make check` from the root directory of the repository. Learn more about
using the library locally in our [installation guide](HOWTO-INSTALL.md).

Expand Down
6 changes: 3 additions & 3 deletions HOWTO-INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### Quick setup

To work or experiment with the agda-unimath library on your machine, you will
need to have `agda` version 2.6.4 installed, and a suitable editor such as
need to have `agda` version 2.7.0 installed, and a suitable editor such as
[Emacs](https://www.gnu.org/software/emacs/) or
[Visual Studio Code](https://code.visualstudio.com/). The following instructions
will help you on your way right away:
Expand Down Expand Up @@ -122,15 +122,15 @@ working branches when necessary.

## Installing Agda {#installing-agda}

The agda-unimath library is built and verified with Agda 2.6.4, and we provide
The agda-unimath library is built and verified with Agda 2.7.0, and we provide
two methods for installation: with or without the package manager
[Nix](https://nixos.org/). Nix streamlines the installation of Agda and its
dependencies, providing a consistent and reproducible environment for the
library across different systems.

### Without Nix

To install Agda 2.6.4 without Nix, follow the
To install Agda 2.7.0 without Nix, follow the
[installation guide](https://agda.readthedocs.io/en/latest/getting-started/installation.html)
provided on the Agda documentation page.

Expand Down
2 changes: 1 addition & 1 deletion agda-unimath.agda-lib
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: agda-unimath
include: src
flags: --without-K --exact-split --no-import-sorts --auto-inline -WnoWithoutKFlagPrimEraseEquality
flags: --without-K --exact-split --no-import-sorts --auto-inline --no-require-unique-meta-solutions -WnoWithoutKFlagPrimEraseEquality
27 changes: 22 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
description = "agda-unimath";

inputs = {
# Unstable is needed for Agda 2.6.4, latest stable 23.05 only has 2.6.3
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
# Stable 24.11 has Agda 2.7.0.1
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
# We aim to support Python 3.8 as long as Ubuntu 20.24 has LTS,
# since it ships with that version. Python 3.8 itself is already
# EOL, so it was dropped from nixpkgs 24.05
nixpkgs-python.url = "github:NixOS/nixpkgs/nixos-23.11";
# Nixpkgs with tested versions of mdbook crates;
# may be removed once we backport new mdbook assets to our
# modified versions
Expand All @@ -15,13 +19,14 @@
};
};

outputs = { self, nixpkgs, nixpkgs-mdbook, flake-utils, mdbook-catppuccin }:
outputs = { self, nixpkgs, nixpkgs-mdbook, nixpkgs-python, flake-utils, mdbook-catppuccin }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = nixpkgs.legacyPackages."${system}";
pkgs-mdbook = nixpkgs-mdbook.legacyPackages."${system}";
python = pkgs.python38.withPackages (p: with p; [
pkgs-python = nixpkgs-python.legacyPackages."${system}";
python = pkgs-python.python38.withPackages (p: with p; [
# Keep in sync with scripts/requirements.txt
# pre-commit <- not installed as a Python package but as a binary below
pybtex
Expand Down
21 changes: 16 additions & 5 deletions src/reflection/definitions.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,24 @@ The `Definition-Agda` type represents a definition in Agda.

```agda
data Definition-Agda : UU lzero where
function-Definition-Agda : list Clause-Agda Definition-Agda
data-type-Definition-Agda : list Name-Agda Definition-Agda

function-Definition-Agda :
list Clause-Agda Definition-Agda

data-type-Definition-Agda :
list Name-Agda Definition-Agda

record-type-Definition-Agda :
Name-Agda list (Argument-Agda Name-Agda) Definition-Agda
data-constructor-Definition-Agda : Name-Agda Definition-Agda
postulate-Definition-Agda : Definition-Agda
primitive-function-Definition-Agda : Definition-Agda

data-constructor-Definition-Agda :
Name-Agda Quantity-Argument-Agda Definition-Agda

postulate-Definition-Agda :
Definition-Agda

primitive-function-Definition-Agda :
Definition-Agda
```

## Bindings
Expand Down
4 changes: 3 additions & 1 deletion src/reflection/type-checking-monad.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ postulate
declare-data :
Name-Agda Term-Agda type-Type-Checker unit
define-data :
Name-Agda list (Name-Agda × Term-Agda) type-Type-Checker unit
Name-Agda
list (Name-Agda × Quantity-Argument-Agda × Term-Agda)
type-Type-Checker unit
```

## Bindings
Expand Down

0 comments on commit 77decd8

Please sign in to comment.