Column and line position in a Lean source file.
Instances for pos
- pos.has_sizeof_inst
- pos.has_to_format
- pos.has_reflect
- pos.inhabited
- pos.has_lt
@[protected, instance]
- default : binder_info
- implicit : binder_info
- strict_implicit : binder_info
- inst_implicit : binder_info
- aux_decl : binder_info
Auxiliary annotation for binders (Lambda and Pi).
This information is only used for elaboration.
The difference between {}
and ⦃⦄
is how implicit arguments are treated that are not followed by explicit arguments.
{}
arguments are applied eagerly, while ⦃⦄
arguments are left partially applied:
def foo {x : ℕ} : ℕ := x
def bar ⦃x : ℕ⦄ : ℕ := x
#check foo -- foo : ℕ
#check bar -- bar : Π ⦃x : ℕ⦄, ℕ
Instances for binder_info
- binder_info.has_sizeof_inst
- binder_info.has_repr
- binder_info.has_reflect
- binder_info.inhabited
@[protected, instance]
Equations
- binder_info.has_repr = {repr := λ (bi : binder_info), binder_info.has_repr._match_1 bi}
- binder_info.has_repr._match_1 binder_info.aux_decl = "aux_decl"
- binder_info.has_repr._match_1 binder_info.inst_implicit = "inst_implicit"
- binder_info.has_repr._match_1 binder_info.strict_implicit = "strict_implicit"
- binder_info.has_repr._match_1 binder_info.implicit = "implicit"
- binder_info.has_repr._match_1 binder_info.default = "default"