lean4-htt/tests/lean/run/1681.lean
Leonardo de Moura c7e68e57cf fix(frontends/lean/structure_cmd): fixes #1681
@kha I'm not sure if this is the right fix. I just avoided the loop that adds
`mk_expr_placeholder` if the function is not a projection.
I didn't spend time investigating why we need `mk_proj_app`.
I know the library doesn't compile if we don't use it, and just use
```
    return mk_app(copy_tag(ref, mk_constant(S_name + fname)), e);
```
:)
2017-06-19 16:22:38 -07:00

19 lines
326 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

def prod.foo (s : bool × bool) (fst : bool) : bool × bool :=
match s with
(a, b) := (fst, b)
end
variable s : bool × bool
#check prod.foo s
#check prod.foo s tt
#check s.foo
#check s.foo tt
def prod.foo2 {α β} (s : α × β) (fst : α) : α × β :=
match s with
(a, b) := (fst, b)
end
#check s.foo2
#check s.foo2 tt