WIP: quantity polymorphism #44

Draft
rhi wants to merge 8 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 added 8 commits 2024-05-06 15:07:15 -04:00
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b qpoly 🐉
git pull origin qpoly

Step 2:

Merge the changes and update on Forgejo.
git checkout 🐉
git merge --no-ff qpoly
git push origin 🐉
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
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.