Commits

Calascibetta Romain  committed fc6d15d

OLOL maxi bug in inference of type

  • Participants
  • Parent commits 4d75ddc

Comments (0)

Files changed (2)

   | `Returned
   ]
 
-type 'a expr =
+type ('a, 'b) expr =
   | Call of (bool * calling_convention option *
     [`Zeroext | `Signext | `Inreg ] option * 'a LLVM_types.t *
-    'a expr * ('a expr list))
+    ('a, 'b) expr * (('a, 'b) expr list))
   | Variable_global of string
   | Variable_local of string
-  | Assign of (string * 'a expr)
-  | GetElementPtr of (bool * 'a LLVM_types.t * 'a expr *
-    'a LLVM_types.value list)
+  | Assign of (string * ('a, 'b) expr)
+  | GetElementPtr of (bool * 'a LLVM_types.t * ('a, 'b) expr *
+    'b LLVM_types.value list)
 
-type 'a instr =
+type ('a, 'b) instr =
   | Ret of 'a LLVM_types.value
-  | Expr of 'a expr
+  | Expr of ('a, 'b) expr
 
-type ('a, 'b, 'c) context_module =
+type ('a, 'b, 'c, 'd) context_module =
   | Global of
     (string * thread_local option *
     address * link_type option * bool *
     ('a LLVM_types.t * string * 'b LLVM_types.t array *
     [`External | `Dllimport | `Extern_weak ] option)
   | Definition of
-    (('a LLVM_types.t * string * 'b LLVM_types.t array) * 'c instr list)
+    (('a LLVM_types.t * string * 'b LLVM_types.t array) * ('c, 'd) instr list)
 
 let string_of_link_type = function
   | `Private                -> "private"

File src/LLVM.mli

   | `Returned
   ]
 
-type 'a expr =
+type ('a, 'b) expr =
   | Call of (bool * calling_convention option *
     [`Zeroext | `Signext | `Inreg ] option * 'a LLVM_types.t *
-    'a expr * ('a expr list))
+    ('a, 'b) expr * (('a, 'b) expr list))
   | Variable_global of string
   | Variable_local of string
-  | Assign of (string * 'a expr)
-  | GetElementPtr of (bool * 'a LLVM_types.t * 'a expr *
-    'a LLVM_types.value list)
+  | Assign of (string * ('a, 'b) expr)
+  | GetElementPtr of (bool * 'a LLVM_types.t * ('a, 'b) expr *
+    'b LLVM_types.value list)
 
-type 'a instr =
+type ('a, 'b) instr =
   | Ret of 'a LLVM_types.value
-  | Expr of 'a expr
+  | Expr of ('a, 'b) expr
 
-type ('a, 'b, 'c) context_module =
+type ('a, 'b, 'c, 'd) context_module =
   | Global of
     (string * thread_local option *
     address * link_type option * bool *
     ('a LLVM_types.t * string * 'b LLVM_types.t array *
     [`External | `Dllimport | `Extern_weak ] option)
   | Definition of
-    (('a LLVM_types.t * string * 'b LLVM_types.t array) * 'c instr list)
+    (('a LLVM_types.t * string * 'b LLVM_types.t array) * ('c, 'd) instr list)
 
 (*
  *  Global:
   ?tail: bool ->
   ?cconv: calling_convention option ->
   ?ret_attr: [< `Zeroext | `Signext | `Inreg ] option ->
-  'a LLVM_types.t -> 'a expr -> 'a expr list -> 'a expr
+  'a LLVM_types.t -> ('a, 'b) expr -> ('a, 'b) expr list -> ('a, 'b) expr
 
 val getelementptr:
   ?inbounds: bool ->
-  'a LLVM_types.t -> 'a expr -> 'a LLVM_types.value list -> 'a expr
+  'a LLVM_types.t -> ('a, 'b) expr -> ('b LLVM_types.value) list ->
+  ('a, 'b) expr
 
 val new_global:
   ?thread_local:thread_local option ->
   ?constant: bool ->
   ?section: string option ->
   ?alignment: int option ->
-  string -> 'a LLVM_types.either -> ('a, 'b, 'c) context_module
+  string -> 'a LLVM_types.either -> ('a, 'b, 'c, 'd) context_module
 
 val new_declaration:
   ?link_type: [< `External | `Dllimport | `Extern_weak ] option ->
-  'a LLVM_types.t -> string -> 'b LLVM_types.t array -> ('a, 'b, 'c) context_module
+  'a LLVM_types.t -> string -> 'b LLVM_types.t array -> ('a, 'b, 'c, 'd) context_module
 
 val new_definition:
-  'a LLVM_types.t -> string -> 'b LLVM_types.t array -> 'c instr list -> ('a, 'b, 'c) context_module
+  'a LLVM_types.t -> string -> 'b LLVM_types.t array -> ('c, 'd) instr list ->
+  ('a, 'b, 'c, 'd) context_module
 
-val print_context_module: ('a, 'b, 'c)  context_module -> unit
+val print_context_module: ('a, 'b, 'c, 'd)  context_module -> unit