While trying to port some of the IPM tactics from Ltac to Mtac2 (formerly MetaCoq) I ran into the issue that
_ ;; _ was used at a different level in both Iris and Mtac2, making it impossible to combine both projects. The current levels are as follows:
|Iris's heap_lang||100||not present|
As you can see, the levels are all different!
_ ;; _and
_ <- _; _should be at the same level.
_ ;; _is not present in stdpp, but it should be there:
Notation "x ;; z" := (x ≫= λ _, z).
- If we currently add this notation, using the same level as
_ <- _; _, namely 65, it will currently Iris.
This MR changes the level of
_ <- _; _ in std++ into 100, which is consistent with Iris. When we accept this MR, a one line fix for Iris is needed.
The main consequence of this MR is how these notations will interact with equality. Consider:
m1 = m2 ;; m3
Should that be parsed as:
(m1 = m2) ;; m3(now)
m1 = (m2 ;; m3)(before)
I'd say that when the notation is used for an imperative programming language, like Iris's
heap_lang, it should definitely be (1). However, in the case of monadic code, (1) makes very little sense (at least for equality, but maybe it makes sense for other relations), as it will never type check.
Note that many other relations like setoid equality and inequality of numbers are also at level 70.