diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2017-07-10 23:33:42 +0200 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2017-07-11 14:50:47 +0200 |
commit | e1d4ad82b1557a8cf808e0374ece9c39ed349ea2 (patch) | |
tree | 6539da95794f0029d90e60460c1aaca9b8ddafeb /kernel/univ.ml | |
parent | 012f5fb722a9d5dcef82c800aa54ed50c0a58957 (diff) |
Cleaning up the implementation of module subtyping in the kernel.
We export a function in UGraph to check that a polymorphic instance is
a subtype of another, instead of rolling up our own in module code.
We also add a few tests for module subtyping in presence of polymorphic
constants.
Diffstat (limited to 'kernel/univ.ml')
-rw-r--r-- | kernel/univ.ml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/univ.ml b/kernel/univ.ml index cb19761b3..6614d6027 100644 --- a/kernel/univ.ml +++ b/kernel/univ.ml @@ -1060,6 +1060,9 @@ module AUContext = struct include UContext + let repr (inst, cst) = + (Array.mapi (fun i l -> Level.var i) inst, cst) + let instantiate inst (u, cst) = assert (Array.length u = Array.length inst); subst_instance_constraints inst cst |