aboutsummaryrefslogtreecommitdiff
path: root/library/impargs.ml
diff options
context:
space:
mode:
authorHugo Herbelin2016-06-29 11:28:55 +0200
committerHugo Herbelin2016-06-29 12:46:54 +0200
commit4965fa03bd9cbc37dd6888c7d13c3fba83b2652c (patch)
treec45fa4c7a4563b4a2531cfa9832369d3f365858d /library/impargs.ml
parent5c91ebc9b995355a5a1f9713be8b9fc74d3ba242 (diff)
Exporting section_segment_of_reference.
Diffstat (limited to 'library/impargs.ml')
-rw-r--r--library/impargs.ml10
1 files changed, 2 insertions, 8 deletions
diff --git a/library/impargs.ml b/library/impargs.ml
index 4e344a9543..feb3bf0187 100644
--- a/library/impargs.ml
+++ b/library/impargs.ml
@@ -526,12 +526,6 @@ let impls_of_context ctx =
in
List.rev_map map (List.filter is_set ctx)
-let section_segment_of_reference = function
- | ConstRef con -> pi1 (section_segment_of_constant con)
- | IndRef (kn,_) | ConstructRef ((kn,_),_) ->
- pi1 (section_segment_of_mutual_inductive kn)
- | _ -> []
-
let adjust_side_condition p = function
| LessArgsThan n -> LessArgsThan (n+p)
| DefaultImpArgs -> DefaultImpArgs
@@ -545,7 +539,7 @@ let discharge_implicits (_,(req,l)) =
| ImplLocal -> None
| ImplInteractive (ref,flags,exp) ->
(try
- let vars = section_segment_of_reference ref in
+ let vars = variable_section_segment_of_reference ref in
let ref' = if isVarRef ref then ref else pop_global_reference ref in
let extra_impls = impls_of_context vars in
let l' = [ref', List.map (add_section_impls vars extra_impls) (snd (List.hd l))] in
@@ -563,7 +557,7 @@ let discharge_implicits (_,(req,l)) =
| ImplMutualInductive (kn,flags) ->
(try
let l' = List.map (fun (gr, l) ->
- let vars = section_segment_of_reference gr in
+ let vars = variable_section_segment_of_reference gr in
let extra_impls = impls_of_context vars in
((if isVarRef gr then gr else pop_global_reference gr),
List.map (add_section_impls vars extra_impls) l)) l