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

Implement ITrees manually #56

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Implement ITrees manually #56

wants to merge 1 commit into from

Conversation

Kiiyya
Copy link
Contributor

@Kiiyya Kiiyya commented Dec 4, 2024

Ideally we'd want to do the following:

codata ITree (E : Type -> Type) (A : Type) : Type 1
| ret : A -> ITree E A
| tau : ITree E A -> ITree E A
| vis {Ans : Type} : E Ans -> (Ans -> ITree E A) -> ITree E A

But due to some limitations we can't do that (yet), concretely because of the {Ans : Type} -> ... Pi binder. Hence this current implementation, which works around this issue by using a (Ans : Type) \x ... binder instead. This still leads to more issues:

  • The qpf macro is not able to handle sigma types, see issue Make qpf macro support sigma types #50 .
  • A lot of instances don't seem to get inferred properly. I have added a bunch of #synth and instance ... := inferInstance to help debug this.
  • We want to have A : Type, but because all live type params have to live in the same universe, we must choose A : Type 1 and use ULifts. Unfortunately this is user-visible, since Shape and Base are user-visible when doing e.g. Cofix.corec or Cofix.dest

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.

1 participant