plfa / plfa.github.io

An introduction to programming language theory in Agda
https://plfa.github.io
Creative Commons Attribution 4.0 International
1.36k stars 307 forks source link

Port PLFA to work with agda-2.7 and stdlib-2.1 #1024

Closed JacquesCarette closed 4 weeks ago

JacquesCarette commented 1 month ago

Summary of routine changes:

Must-be-done changes that may need a bit more text:

Stylistic changes to fit the 2.1 style better:

JacquesCarette commented 1 month ago

Predictably, the build failed. My skills at CI may not be up to changing the scripts to fix that. Help?

wadler commented 1 month ago

Thanks very much for doing this, Jacques!

I will ask Wen to look at fixing the CI. She is submitting her PhD dissertation just now, so it may take a while.

Following are suggested changes to your pull request. Can you modify to include these?

Induction, line 31, should be: (Importing step-≡-I defines _≡⟨⟩_ and importing step-≡-⟩ defines _≡⟨_⟩_.)

Lists, lines 68-69, should be: This is almost equivalent, save that with parameterised types the result can be Set, whereas for technical reasons indexed types require the result type to be Set₁.

JacquesCarette commented 1 month ago

Will do a little later today.

wadler commented 1 month ago

Thanks! I've written to Wen to ask when she can update the CI. When does your term begin? (Edinburgh begins week 3 of September.)

wadler commented 1 month ago

Oops, I see Induction, line 24, also needs to change: Old: cong, sym, and _≡⟨_⟩_, which are explained below: New: cong, sym, _≡⟨⟩_ and _≡⟨_⟩_, which are explained below:

wadler commented 1 month ago

Also, a couple of background questions:

Was your intention to change ⊥-elim to contradiction everywhere it appears? I think I spotted some places where ⊥-elim was left unchanged.

Where can I read up on the change that leads to most imports ending .Base?

wenkokke commented 1 month ago

@JacquesCarette did you update the git submodule for the standard library? There's a bunch of Agda errors on CI that make me believe it's still using the older version.

JacquesCarette commented 1 month ago

When does your term begin?

Next Tuesday, September 3rd.

Was your intention to change ⊥-elim to contradiction everywhere it appears?

Probably not everywhere: it makes sense in part 1 to define it as it is. But, in practice, contradiction tends to make it clearer to the reader what is going on. I can certainly be more systematic if that is desired.

Where can I read up on the change that leads to most imports ending .Base?

There is, as of yet, no single place. There is a lot of conversation in stdlib issues and PRs related to that.

The design of the library (since 2.0) is to put the most basic definitions for X in Data.X.Base, the properties of X in Data.X.Properties and then have a "batteries included" module Data.X. So Data.X tends to be a convenient import when just getting work done, and then one tends to clean up afterwards for more precision and faster loading speed.

JacquesCarette commented 1 month ago

@wenkokke I neither updated the git submodule for the standard library nor the version of Agda in this PR. Obviously, I did do that in my working environment, but not through a git submodule for stdlib but rather through Agda's own library management features.

My git & CI powers are currently insufficient to be confident in making those changes correctly.

wenkokke commented 1 month ago

Also, a couple of background questions:

Where can I read up on the change that leads to most imports ending .Base?

Presumably, the changelog for agda stdlib.

This is likely a continuation of the trend towards more lightweight modules, so it's not essential, but probably shaves some time off the checking.

wenkokke commented 1 month ago

@wenkokke I neither updated the git submodule for the standard library nor the version of Agda in this PR. Obviously, I did do that in my working environment, but not through a git submodule for stdlib but rather through Agda's own library management features.

My git & CI powers are currently insufficient to be confident in making those changes correctly.

I'll add an entry to CONTRIBUTING.md while I do it.

wenkokke commented 4 weeks ago

Closing this in favour of #1028.

(@JacquesCarette you disallowed maintainers pushing to your branch, so I've made my own copy of your branch.)

JacquesCarette commented 4 weeks ago

That was a mistake - I wanted the exact opposite, i.e. allow maintainers to push! I could fix it... I would want the 'credit' of doing official, accepted PRs on here.

JacquesCarette commented 4 weeks ago

I've now allowed edits. Sorry about that.