Skip to content

Provide a way to escape the current context in reflection - #6568

Closed
ncfavier wants to merge 1 commit into
masterfrom
ncfavier/escape-context
Closed

ncfavier wants to merge 1 commit into
masterfrom
ncfavier/escape-context

Conversation

@ncfavier

Copy link
Copy Markdown
Contributor

Forked from #6009 (comment)

@jespercockx says:

Perhaps it would make sense to instead expose escapeContext as a new primitive?

Taken at face value, this isn't enough: escapeContext $ inContext ctx m would still revert to the original context. We'd need to also replace inContext with addContext and expose inOriginalContext separately, or something.

Same as `inContext`, but uses the top context instead of the context we
started the TC computation in. Useful for creating metas living in a
stronger context.

Does not play well with `declareDef`/`defineFun` (runs into impossible errors).
@ncfavier

Copy link
Copy Markdown
Contributor Author

Why close? I would still like to have this, and am awaiting feedback on the best way to do it.

@UlfNorell

Copy link
Copy Markdown
Member

I closed it because there hasn't been any activity for a long time, and it sounded from your comments like adding inTopContext was the wrong thing to do. If you want to push forward with this I think you need to be a bit more explicit about what feedback you are waiting for. Feel free to restart the discussion (here or in #6009) and reopen this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants