Debian Codegraph @

test-suite/output/Coercions.v

raw
1 (* Submitted by Randy Pollack *)
2
3 Record pred (S : Set) : Type := {sp_pred :> S -> Prop}.
4 Record rel (S : Set) : Type := {sr_rel :> S -> S -> Prop}.
5
6 Section testSection.
7 Variables (S : Set) (P : pred S) (R : rel S) (x : S).
8 Check (P x).
9 Check (R x x).
10 End testSection.
11
12 (* Check the removal of coercions with target Funclass *)
13
14 Record foo : Type := {D :> nat -> nat}.
15 Check (fun (x : foo) (n : nat) => x n).