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

Unrestricted Recursion (tmFix) in TemplateMonad #377

Open
fakusb opened this issue Feb 13, 2020 · 4 comments
Open

Unrestricted Recursion (tmFix) in TemplateMonad #377

fakusb opened this issue Feb 13, 2020 · 4 comments

Comments

@fakusb
Copy link
Contributor

fakusb commented Feb 13, 2020

Have there been thought on integrating an monadic operation to the TemplateMonad to allow unguarded recursion?

I have seen a few monadic programs defined in the monad requiring fuel to allow non-structural recursion. It seems to me that it should be possible to have a fixpoint operator tmFix : forall X, (X -> X) -> X -> TM X that removes the need for fuel. Or is there a theoretical/practical argument against having this?

@gmalecha
Copy link
Contributor

This was also suggested in #133

@gmalecha
Copy link
Contributor

An alternative is to make the definition coinductive, which would also work and might make it possible to prove termination after the fact using existing Coq mechanisms.

@mattam82
Copy link
Member

We could add this, but one can already rely on unchecked fixpoints in Coq, no?

@JasonGross
Copy link
Contributor

Implemented for the non-extractable monad in #790.

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

No branches or pull requests

4 participants