WIP: quantity polymorphism #44

Draft
rhi wants to merge 9 commits from qpoly into 🐉
Owner

new syntax

the existing π.(x : A) → … etc syntax only really works when π is a single token. and even then it took me a while to get used to it.

function types

  • (x : A | π) → B
    • parse
    • print
  • (A | π) → B for nondependent. parens needed to disambiguate nested function types
    • parse
    • print
  • todo less annoying short syntax for 0/1/ω
    • come up with
    • parse
    • print

boxes

  • [A | π] for consistency with new function syntax
    • parse
    • print

case/let

  • case‹π› or case.{π}, same for let; same as qty app
    • parse
    • print
  • case0 etc still exist

qty polymorphic definitions:

  • def app‹π, ρ› : type = rhs
    • parse
    • print
  • def app.{pi, rh} for non-unicode version
    • parse
    • print
  • todo is bounded quantification needed? probably :(
  • f‹π, ρ› or f.{pi, rh} for application
    • parse
    • print
## new syntax the existing `π.(x : A) → …` etc syntax only really works when π is a single token. and even then it took me a while to get used to it. ### function types - `(x : A | π) → B` - [ ] parse - [ ] print - `(A | π) → B` for nondependent. parens needed to disambiguate nested function types - [ ] parse - [ ] print - **todo** less annoying short syntax for 0/1/ω - [ ] come up with - [ ] parse - [ ] print ### boxes - `[A | π]` for consistency with new function syntax - [ ] parse - [ ] print ### case/let - `case‹π›` or `case.{π}`, same for `let`; same as qty app - [ ] parse - [ ] print - `case0` etc still exist ### qty polymorphic definitions: - `def app‹π, ρ› : type = rhs` - [ ] parse - [ ] print - `def app.{pi, rh}` for non-unicode version - [ ] parse - [ ] print - **todo** is bounded quantification needed? probably :( - `f‹π, ρ›` or `f.{pi, rh}` for application - [ ] parse - [ ] print
rhi force-pushed qpoly from 46889fefc8 to c5f2b2a2ce 2024-05-23 16:42:47 -04:00 Compare
rhi force-pushed qpoly from c5f2b2a2ce to ef273e819e 2024-05-27 15:28:43 -04:00 Compare
rhi force-pushed qpoly from ef273e819e to 4c008577b4 2024-05-27 15:32:54 -04:00 Compare
This pull request has changes conflicting with the target branch.
  • lib/Quox/OPE.idr
  • lib/Quox/Syntax/Term/Subst.idr
  • lib/Quox/Syntax/Term/Tighten.idr
  • lib/Quox/Whnf/Coercion.idr
  • lib/Quox/Whnf/Main.idr
  • lib/Quox/Whnf/TypeCase.idr
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin qpoly:qpoly
git checkout qpoly

Merge

Merge the changes and update on Forgejo.
git checkout 🐉
git merge --no-ff qpoly
git checkout 🐉
git merge --ff-only qpoly
git checkout qpoly
git rebase 🐉
git checkout 🐉
git merge --no-ff qpoly
git checkout 🐉
git merge --squash qpoly
git checkout 🐉
git merge --ff-only qpoly
git checkout 🐉
git merge qpoly
git push origin 🐉
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: rhi/quox#44
No description provided.