| 460 |
<:str_item< Librarian.run cu >> |
<:str_item< Librarian.run cu >> |
| 461 |
] @ |
] @ |
| 462 |
(if g = [] then [] else [ <:str_item< value rec $list:g$ >> ]) @ |
(if g = [] then [] else [ <:str_item< value rec $list:g$ >> ]) @ |
| 463 |
[ <:str_item< value $list:items$ >> ] |
(if items = [] then [] else [ <:str_item< value $list:items$ >> ]) |
| 464 |
|
|
| 465 |
|
|
| 466 |
|
|
| 469 |
(fun cu ty_env c_env -> |
(fun cu ty_env c_env -> |
| 470 |
try |
try |
| 471 |
let name = String.capitalize cu in |
let name = String.capitalize cu in |
| 472 |
let (prolog, values) = Mltypes.read_cmi name in |
let (prolog, values) = |
| 473 |
|
try Mltypes.read_cmi name |
| 474 |
|
with Not_found -> |
| 475 |
|
Printf.eprintf "Warning: no caml interface\n"; |
| 476 |
|
("",[]) in |
| 477 |
let code = stub cu ty_env c_env values in |
let code = stub cu ty_env c_env values in |
| 478 |
Some (Obj.magic (prolog,code)), |
Some (Obj.magic (prolog,code)), |
| 479 |
get_registered_types () |
get_registered_types () |
| 480 |
with |
with Mltypes.Error s -> raise (Location.Generic s) |
|
| Mltypes.Error s -> raise (Location.Generic s) |
|
|
| Not_found -> Printf.eprintf "Warning: no caml interface\n"; None, [||] |
|
| 481 |
); |
); |
| 482 |
|
|
| 483 |
Externals.register_external := |
Externals.register_external := |