Commit graph

9 commits

Author SHA1 Message Date
Kyle Miller
655ec964f5
feat: flatten parent projections when pretty printing structure instance notation (#3749)
Given
```lean
structure A where
  x : Nat

structure B extends A where
  y : Nat
```
rather than pretty printing `{ x := 1, y := 2 : B }` as `{ toA := { x :=
1 }, y := 2 }`, it now pretty prints as `{ x := 1, y := 2 }`.

The option `pp.structureInstances.flatten` controls whether to flatten
structure instances like this.
2024-03-23 09:20:52 +00:00
Kyle Miller
a706c3b89a
feat: delaboration collapses parent projections (#3326)
When projection functions are delaborated, intermediate parent
projections are no longer printed. For example, rather than pretty
printing as `o.toB.toA.x` with these `toB` and `toA` parent projections,
it pretty prints as `o.x`.

This feature is being upstreamed from mathlib.
2024-02-14 23:44:48 +00:00
Sebastian Ullrich
eaafd36918 feat: use signature pretty printer in #check id/#check @id 2022-12-21 21:59:05 +01:00
Leonardo de Moura
07043e73b0 chore: fix tests 2022-02-14 12:06:03 -08:00
Gabriel Ebner
50abc3e295 fix: correctly pretty-print @Eq 2022-01-12 09:41:41 +01:00
Leonardo de Moura
c93982d10c chore: disable pp.analyze for now
see #651
2021-09-07 07:51:43 -07:00
Leonardo de Moura
0f184a8c93 fix: binder annotation for class diamond coercions 2021-08-10 06:59:28 -07:00
Leonardo de Moura
bccad8edb1 feat: add coercion to parent structure whose fields having been copied 2021-08-09 19:01:08 -07:00
Leonardo de Moura
97664de3ee fix: diamonds with dependent fields 2021-08-09 19:01:08 -07:00