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

observe vs _observe #251

Open
wkolowski opened this issue Feb 7, 2023 · 0 comments
Open

observe vs _observe #251

wkolowski opened this issue Feb 7, 2023 · 0 comments

Comments

@wkolowski
Copy link

wkolowski commented Feb 7, 2023

Could anybody provide a concrete example of what goes wrong if this remark is ignored and _observe is used instead of observe?

To quote:

(** Note that when [_observe] appears unapplied in an expression,
    it is implicitly wrapped in a function. However, there is no
    way to distinguish whether such wrapping took place, so relying
    on this behavior can lead to confusion.
    We recommend to always use a primitive projection applied,
    and wrap it in a function explicitly like the above to pass
    around as a first-order function. *)

@palmskog already asked this on Zulip, but the example given there has to do with reduction, which I think is not that bad. Besides reduction behaviour, what other issues might arise? Extensionality problems, like having to prove _observe = fun x => _observe x? Problems with term matching in Ltac? Problems with typeclass resolution?

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

1 participant