Closed andreasabel closed 6 years ago
Small test case:
{-# OPTIONS --postfix-projections #-}
open import Agda.Builtin.Equality
postulate
A : Set
record R : Set where
field
a : A
same : a ≡ a
test : A
test = same
-- Prints: .a ≡ .a !=< A of type Set
-- Note the extra dots!
It works for prefix projections because the name of the record variable inside the declaration is "" (the empty string). Thus, the internal term a @0
is printed as a
followed by the empty string which is what we expect. This hack breaks when we print projection postfix: empty string followed by .a
.
There is a workaround: use prefix projections if projecting from a variable with empty name.
[Workaround onto hack, ever increasing the technological debt.]