~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to typing/includeclass.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-04-21 21:35:08 UTC
  • mfrom: (1.1.11 upstream) (12.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110421213508-kg34453aqmb0moha
* Fixes related to -output-obj with g++ (in debian/patches):
  - add Declare-primitive-name-table-as-const-char
  - add Avoid-multiple-declarations-in-generated-.c-files-in
  - fix Embed-bytecode-in-C-object-when-using-custom: the closing
    brace for extern "C" { ... } was missing in some cases

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
(*                                                                     *)
11
11
(***********************************************************************)
12
12
 
13
 
(* $Id: includeclass.ml 9236 2009-04-19 08:42:43Z xleroy $ *)
 
13
(* $Id: includeclass.ml 10541 2010-06-08 08:43:38Z garrigue $ *)
14
14
 
15
15
(* Inclusion checks for the class language *)
16
16
 
36
36
open Format
37
37
open Ctype
38
38
 
 
39
(*
 
40
let rec hide_params = function
 
41
    Tcty_fun ("*", _, cty) -> hide_params cty
 
42
  | cty -> cty
 
43
*)
 
44
 
39
45
let include_err ppf =
40
46
  function
41
47
  | CM_Virtual_class ->
42
48
      fprintf ppf "A class cannot be changed from virtual to concrete"
43
49
  | CM_Parameter_arity_mismatch (ls, lp) ->
44
50
      fprintf ppf
45
 
        "The classes do not have the same number of type parameters"     
 
51
        "The classes do not have the same number of type parameters"
46
52
  | CM_Type_parameter_mismatch trace ->
47
53
      fprintf ppf "@[%a@]"
48
54
      (Printtyp.unification_error false trace
102
108
      let print_errs ppf errs =
103
109
         List.iter (fun err -> fprintf ppf "@ %a" include_err err) errs in
104
110
      fprintf ppf "@[<v>%a%a@]" include_err err print_errs errs
105
 
 
106
 
 
107