`--postfix-projections` do not make use of mixfix syntax
andreasabel opened this issue · comments
Andreas Abel commented
Consider the testcase for #2288:
record Setoid : Set₁ where
field
∣_∣ : Set
{{eq}} : Eq ∣_∣
open Setoid
NatSetoid : Setoid
∣ NatSetoid ∣ = Nat
The error with --no-postfix-projections
is:
No instance of type Eq ∣ NatSetoid ∣ ...
With --postfix-projections
we get:
No instance of type Eq (NatSetoid .∣_∣)
This isn't pretty. Postfix notation should not kick in when we can actually use the mixfix-syntax.
A little doubt: the field ∣_∣ : Set
is actually a hack, exploiting the questionable "feature" of Agda to blindly apply mixfix syntax even when outside the module it was defined in.
So maybe the current broken postfix printing is less wrong than the prefix printing.
Opinions?
Andreas Abel commented
Related: