This PR modifies the pretty printing of pi types. Now `∀` will be preferred over `→` for propositions if the domain is not a proposition. For example, `∀ (n : Nat), True` pretty prints as `∀ (n : Nat), True` rather than as `Nat → True`. There is also now an option `pp.foralls` (default true) that when false disables using `∀` at all, for pedagogical purposes. This PR also adjusts instance implicit binder pretty printing — nondependent pi types won't show the instance binder name. Closes #1834. The linked RFC also suggests using `_` for binder names in case of non-dependance. We're tabling that idea. Potentially it is useful for hygienic names; this could improve how `Nat → True` pretty prints as `∀ (a : Nat), True`, with this `a` that's chosen by implication notation elaboration. Relatedly, this PR exposes even further the issue where binder names are reused in a confusing way. Consider: `Nat → Nat → (a : Nat) → a = a` pretty prints as `∀ (a a a : Nat), a = a`.
54 lines
3.7 KiB
Text
54 lines
3.7 KiB
Text
Vec.zip : {α : Type u_1} → {n : Nat} → {β : Type u_2} → Vec α ◾ → Vec β ◾ → Vec (α × β) ◾
|
||
mkConstTuple : {α : Type u_1} → α → Nat → ◾
|
||
Fin.add : {n : Nat} → Fin ◾ → Fin ◾ → Fin ◾
|
||
Vec.cons : {α : Type u} → {n : Nat} → α → Vec α ◾ → Vec α ◾
|
||
Eq.rec : {α : Sort u_1} → {a : α} → {motive : α → ◾ → Sort u} → motive ◾ ◾ → {a : α} → ◾ → motive ◾ ◾
|
||
GetElem.getElem : {coll : Type u} →
|
||
{idx : Type v} →
|
||
{elem : Type w} → {valid : coll → idx → Prop} → [self : GetElem coll idx elem ◾] → coll → idx → ◾ → elem
|
||
Term.constFold : {ctx : List Ty} → {ty : Ty} → _root_.Term ◾ ◾ → _root_.Term ◾ ◾
|
||
Term.denote : {ctx : List Ty} → {ty : Ty} → _root_.Term ◾ ◾ → HList ◾ ◾ → ◾
|
||
HList.get : {α : Type u_1} → {β : α → Type u_2} → {is : List α} → {i : α} → HList β ◾ → Member ◾ ◾ → β ◾
|
||
Member.head : {α : Type u_1} → {a : α} → {as : List α} → Member ◾ ◾
|
||
Ty.denote : Ty → Type
|
||
MonadControl.liftWith : {m : Type u → Type v} →
|
||
{n : Type u → Type w} → [self : MonadControl m n] → {α : Type u} → (({β : Type u} → n β → m ◾) → m α) → n α
|
||
MonadControl.restoreM : {m : Type u → Type v} → {n : Type u → Type w} → [self : MonadControl m n] → {α : Type u} → m ◾ → n α
|
||
Decidable.casesOn : {p : Prop} → {motive : Decidable ◾ → Sort u} → Decidable ◾ → (◾ → motive ◾) → (◾ → motive ◾) → motive ◾
|
||
Lean.getConstInfo : {m : Type → Type} → [Monad m] → [MonadEnv m] → [MonadError m] → Name → m ConstantInfo
|
||
Lean.Meta.instMonadMetaM : Monad fun α =>
|
||
Context → ST.Ref PUnit State → Core.Context → ST.Ref PUnit Core.State → PUnit → EStateM.Result Exception PUnit α
|
||
Lean.Meta.inferType : Expr →
|
||
Context → ST.Ref PUnit State → Core.Context → ST.Ref PUnit Core.State → PUnit → EStateM.Result Exception PUnit Expr
|
||
Lean.Elab.Term.elabTerm : Syntax →
|
||
Option Expr →
|
||
Bool →
|
||
Bool →
|
||
Elab.Term.Context →
|
||
ST.Ref PUnit Elab.Term.State →
|
||
Context →
|
||
ST.Ref PUnit State → Core.Context → ST.Ref PUnit Core.State → PUnit → EStateM.Result Exception PUnit Expr
|
||
Nat.add : Nat → Nat → Nat
|
||
Magma.mul : Magma → ◾ → ◾ → ◾
|
||
weird1 : Bool → ◾
|
||
lamAny₁ : Bool → Monad ◾
|
||
lamAny₂ : Bool → Monad ◾
|
||
Term.constFold : List Ty → Ty → _root_.Term lcErased lcErased → _root_.Term lcErased lcErased
|
||
Term.denote : lcErased
|
||
HList.get : lcErased → lcErased → List lcAny → lcAny → HList lcAny lcErased lcErased → Member lcAny lcErased lcErased → lcAny
|
||
Member.head : lcErased → lcAny → List lcAny → Member lcAny lcErased lcErased
|
||
Ty.denote : lcErased
|
||
MonadControl.liftWith : lcErased → lcErased → MonadControl lcErased lcErased → lcErased → ((lcErased → lcAny → lcAny) → lcAny) → lcAny
|
||
MonadControl.restoreM : lcErased → lcErased → MonadControl lcErased lcErased → lcErased → lcAny → lcAny
|
||
Decidable.casesOn : lcErased → lcErased → Bool → (lcErased → lcAny) → (lcErased → lcAny) → lcAny
|
||
Lean.getConstInfo : lcErased → Monad lcErased → MonadEnv lcErased → MonadError lcErased → Name → lcAny
|
||
Lean.Meta.instMonadMetaM : Monad lcErased
|
||
Lean.Meta.inferType : Expr → Context → lcErased → Core.Context → lcErased → PUnit → EStateM.Result Exception PUnit Expr
|
||
Lean.Elab.Term.elabTerm : Syntax →
|
||
Option Expr →
|
||
Bool →
|
||
Bool →
|
||
Elab.Term.Context →
|
||
lcErased → Context → lcErased → Core.Context → lcErased → PUnit → EStateM.Result Exception PUnit Expr
|
||
Nat.add : Nat → Nat → Nat
|
||
Fin.add : Nat → Nat → Nat → Nat
|