Debian Codegraph @

test-suite/output/inference.v

raw
1 (* Check that types are not uselessly unfolded *)
2
3 (* Check here that P returns something of type "option L" and not
4 "option (list nat)" *)
5
6 Definition L := list nat.
7
8 Definition P (e:option L) :=
9 match e with
10 | None => None
11 | Some cl => Some cl
12 end.
13
14 Print P.
15
16 (* Check that the heuristic to solve constraints is not artificially
17 dependent on the presence of a let-in, and in particular that the
18 second [_] below is not inferred to be n, as if obtained by
19 first-order unification with [T n] of the conclusion [T _] of the
20 type of the first [_]. *)
21
22 (* Note: exact numbers of evars are not important... *)
23
24 Inductive T (n:nat) := A : T n.
25 Check fun n (y:=A n:T n) => _ _ : T n.
26 Check fun n => _ _ : T n.