So I couldn't help noticing, while trying to figure out the merge conflicts, that @shhyou 's original proofs made extensive use of the ... ≈[ ... ] ... syntax, whereas the proofs in this PR reinstate the explicit unfolding of that syntax into cast ... ... ≡ ... form.
Is that a Good Idea, or a Bad One?
Otherwise put: is it a style-guide/library-design precept that we don't use syntax explicitly in library modules?
Originally posted by @jamesmckinna in #2431 (comment)
I'm conscious that many/several aspects of syntax declarations (eg we can't really deprecate them, only decline to export them publicly) make their use perhaps more 'controversial'/less straightforward in stdlib library modules than elsewhere:
- avoiding using them is 'more robust', but harder to read (otherwise we wouldn't introduce them?!)
- using them is 'more abstract', so avoiding using them exposes implementation details, which may or may not be a good thing, eg
∃-syntax : ∀ {A : Set a} → (A → Set b) → Set (a ⊔ b)
∃-syntax = ∃
syntax ∃-syntax (λ x → B) = ∃[ x ] B
means that I don't need to see the LHS implementation of what is otherwise, less or more 'opaquely`, some sort of binding syntax,
but I don't really need to care what that might be... while others seem actively to avoid using them...
- more/less 'ink': I follow Wadler in favouring less; truly Less is More here ;-)
- prefix/infix, the eternal debate...
- ...
Accordingly:
So I couldn't help noticing, while trying to figure out the merge conflicts, that @shhyou 's original proofs made extensive use of the
... ≈[ ... ] ...syntax, whereas the proofs in this PR reinstate the explicit unfolding of that syntax intocast ... ... ≡ ...form.Is that a Good Idea, or a Bad One?
Otherwise put: is it a
style-guide/library-designprecept that we don't usesyntaxexplicitly in library modules?Originally posted by @jamesmckinna in #2431 (comment)
I'm conscious that many/several aspects of
syntaxdeclarations (eg we can't really deprecate them, only decline to export them publicly) make their use perhaps more 'controversial'/less straightforward instdliblibrary modules than elsewhere:but I don't really need to care what that might be... while others seem actively to avoid using them...
Accordingly: