diff options
| author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2013-05-03 13:38:30 +0000 |
|---|---|---|
| committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2013-05-03 13:38:30 +0000 |
| commit | 67e18e5c4dde3b82005d8610a01383ba1561d561 (patch) | |
| tree | 46d90b620565b406be9d99722606bea834e41ca6 /ocamldoc | |
| parent | b8470199cce43fa054341155a2393e20a4c3c0f9 (diff) | |
| download | ocaml-67e18e5c4dde3b82005d8610a01383ba1561d561.tar.gz | |
Fix PR#5985 for constrained parameters too.
Required more variance information, so variance is now an abstract type.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13645 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc')
| -rw-r--r-- | ocamldoc/odoc_ast.ml | 11 | ||||
| -rw-r--r-- | ocamldoc/odoc_sig.ml | 7 |
2 files changed, 8 insertions, 10 deletions
diff --git a/ocamldoc/odoc_ast.ml b/ocamldoc/odoc_ast.ml index 4a0f3c4ac9..7d282f6d7c 100644 --- a/ocamldoc/odoc_ast.ml +++ b/ocamldoc/odoc_ast.ml @@ -1195,12 +1195,11 @@ module Analyser = ty_info = com_opt ; ty_parameters = List.map2 - (fun p (co,cn,_,_) -> - (Odoc_env.subst_type new_env p, - co, cn) - ) - tt_type_decl.Types.type_params - tt_type_decl.Types.type_variance ; + (fun p v -> + let (co, cn) = Types.Variance.get_upper v in + (Odoc_env.subst_type new_env p, co, cn)) + tt_type_decl.Types.type_params + tt_type_decl.Types.type_variance ; ty_kind = kind ; ty_private = tt_type_decl.Types.type_private; ty_manifest = diff --git a/ocamldoc/odoc_sig.ml b/ocamldoc/odoc_sig.ml index 47b1a465dd..24beb02889 100644 --- a/ocamldoc/odoc_sig.ml +++ b/ocamldoc/odoc_sig.ml @@ -638,10 +638,9 @@ module Analyser = ty_name = Name.concat current_module_name name.txt ; ty_info = assoc_com ; ty_parameters = - List.map2 (fun p (co,cn,_,_) -> - (Odoc_env.subst_type new_env p, - co, cn) - ) + List.map2 (fun p v -> + let (co, cn) = Types.Variance.get_upper v in + (Odoc_env.subst_type new_env p,co, cn)) sig_type_decl.Types.type_params sig_type_decl.Types.type_variance; ty_kind = type_kind; |
