Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚧 🦆 Inductive Types #295

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

🚧 🦆 Inductive Types #295

wants to merge 5 commits into from

Conversation

TOTBWF
Copy link
Collaborator

@TOTBWF TOTBWF commented Jan 18, 2022

No description provided.

@favonia
Copy link
Collaborator

favonia commented Jan 19, 2022

Can we replace all [FIXME] Basis.Basis.enact_rigid_... with explicit exception raising?

@TOTBWF
Copy link
Collaborator Author

TOTBWF commented Jan 19, 2022

The plan is to go back through once the rest of the work is done and actually implement those, so FIXME makes for an easy grep.

@TOTBWF
Copy link
Collaborator Author

TOTBWF commented Jan 28, 2022

So bundling up all of the individual motives is proving tricky! My initial plan was to use the classic

  infixl 2 _▶_
  data Con : Set where
    : Con
    _▶_ : Con  Ty  Con

  data Var : Con  Ty  Set where
    vz :  {Γ A}  Var (Γ ▶ A) A
    vs :  {Γ A B}  Var Γ A  Var (Γ ▶ B) A

and then have the bundle of motives be of the form

  Methods :  {Γ}  Motive Γ  Set
  Methods {Γ} P =  {A} (x : Var Γ A)  Method P (var x)

However, elaborating to this is an absolute nightmare, as the indexing in Var makes for a pretty gnarly elimination form.
Therefore, it seems like a better idea to bundle these up using a sig instead, but that brings it's own host of issues. In particular, we need a way of taking some ctx and constructing a sig type. However, this ties quite nicely into the first class telescope stuff that's been on our collective minds, so it seems like we could get 2 birds with a single stone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants