2002-03-27 08:20:32 -08:00
|
|
|
(***********************************************************************)
|
|
|
|
(* OCamldoc *)
|
|
|
|
(* *)
|
|
|
|
(* Maxence Guesdon, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
|
|
|
(* Copyright 2001 Institut National de Recherche en Informatique et *)
|
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
(* under the terms of the Q Public License version 1.0. *)
|
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
2003-11-24 02:44:07 -08:00
|
|
|
(* $Id$ *)
|
2002-03-27 08:20:32 -08:00
|
|
|
|
2005-08-13 13:59:37 -07:00
|
|
|
type ref_kind =
|
2002-03-27 08:20:32 -08:00
|
|
|
RK_module
|
|
|
|
| RK_module_type
|
|
|
|
| RK_class
|
|
|
|
| RK_class_type
|
|
|
|
| RK_value
|
|
|
|
| RK_type
|
|
|
|
| RK_exception
|
|
|
|
| RK_attribute
|
|
|
|
| RK_method
|
2002-08-08 06:24:05 -07:00
|
|
|
| RK_section of text
|
2002-03-27 08:20:32 -08:00
|
|
|
|
2005-08-13 13:59:37 -07:00
|
|
|
and text_element =
|
2002-04-26 06:07:59 -07:00
|
|
|
| Raw of string
|
|
|
|
| Code of string
|
|
|
|
| CodePre of string
|
|
|
|
| Verbatim of string
|
|
|
|
| Bold of text
|
|
|
|
| Italic of text
|
|
|
|
| Emphasize of text
|
|
|
|
| Center of text
|
|
|
|
| Left of text
|
|
|
|
| Right of text
|
|
|
|
| List of text list
|
|
|
|
| Enum of text list
|
|
|
|
| Newline
|
|
|
|
| Block of text
|
2002-03-27 08:20:32 -08:00
|
|
|
| Title of int * string option * text
|
2002-04-26 06:07:59 -07:00
|
|
|
| Latex of string
|
|
|
|
| Link of string * text
|
2002-03-27 08:20:32 -08:00
|
|
|
| Ref of string * ref_kind option
|
2002-04-26 06:07:59 -07:00
|
|
|
| Superscript of text
|
|
|
|
| Subscript of text
|
2004-05-23 03:41:51 -07:00
|
|
|
| Module_list of string list
|
|
|
|
| Index_list
|
2002-03-27 08:20:32 -08:00
|
|
|
|
|
|
|
and text = text_element list
|
|
|
|
|
2005-08-13 13:59:37 -07:00
|
|
|
type see_ref =
|
2002-03-27 08:20:32 -08:00
|
|
|
See_url of string
|
|
|
|
| See_file of string
|
|
|
|
| See_doc of string
|
|
|
|
|
|
|
|
type see = see_ref * text
|
|
|
|
|
|
|
|
type param = (string * text)
|
|
|
|
|
|
|
|
type raised_exception = (string * text)
|
|
|
|
|
|
|
|
type info = {
|
2002-04-26 06:07:59 -07:00
|
|
|
i_desc : text option;
|
|
|
|
i_authors : string list;
|
|
|
|
i_version : string option;
|
|
|
|
i_sees : see list;
|
|
|
|
i_since : string option;
|
|
|
|
i_deprecated : text option;
|
2005-08-13 13:59:37 -07:00
|
|
|
i_params : param list;
|
2002-04-26 06:07:59 -07:00
|
|
|
i_raised_exceptions : raised_exception list;
|
|
|
|
i_return_value : text option ;
|
|
|
|
i_custom : (string * text) list ;
|
2005-08-13 13:59:37 -07:00
|
|
|
}
|
2002-03-27 08:20:32 -08:00
|
|
|
|
|
|
|
let dummy_info = {
|
|
|
|
i_desc = None ;
|
|
|
|
i_authors = [] ;
|
|
|
|
i_version = None ;
|
|
|
|
i_sees = [] ;
|
|
|
|
i_since = None ;
|
|
|
|
i_deprecated = None ;
|
|
|
|
i_params = [] ;
|
|
|
|
i_raised_exceptions = [] ;
|
|
|
|
i_return_value = None ;
|
|
|
|
i_custom = [] ;
|
2005-08-13 13:59:37 -07:00
|
|
|
}
|
2002-03-27 08:20:32 -08:00
|
|
|
|
|
|
|
type location = {
|
2002-04-26 06:07:59 -07:00
|
|
|
loc_impl : (string * int) option ;
|
|
|
|
loc_inter : (string * int) option ;
|
2005-08-13 13:59:37 -07:00
|
|
|
}
|
2002-03-27 08:20:32 -08:00
|
|
|
|
|
|
|
let dummy_loc = { loc_impl = None ; loc_inter = None }
|
|
|
|
|
|
|
|
type merge_option =
|
2002-04-26 06:07:59 -07:00
|
|
|
| Merge_description
|
|
|
|
| Merge_author
|
|
|
|
| Merge_version
|
|
|
|
| Merge_see
|
|
|
|
| Merge_since
|
|
|
|
| Merge_deprecated
|
|
|
|
| Merge_param
|
|
|
|
| Merge_raised_exception
|
|
|
|
| Merge_return_value
|
|
|
|
| Merge_custom
|
2005-08-13 13:59:37 -07:00
|
|
|
|
2002-03-27 08:20:32 -08:00
|
|
|
let all_merge_options = [
|
|
|
|
Merge_description ;
|
|
|
|
Merge_author ;
|
|
|
|
Merge_version ;
|
|
|
|
Merge_see ;
|
|
|
|
Merge_since ;
|
|
|
|
Merge_deprecated ;
|
|
|
|
Merge_param ;
|
|
|
|
Merge_raised_exception ;
|
|
|
|
Merge_return_value ;
|
|
|
|
Merge_custom ;
|
2005-08-13 13:59:37 -07:00
|
|
|
]
|
2002-03-27 08:20:32 -08:00
|
|
|
|
2002-04-09 05:31:57 -07:00
|
|
|
type magic = string
|
|
|
|
|
|
|
|
let magic = Odoc_messages.magic
|
|
|
|
|
|
|
|
type 'a dump = Dump of magic * 'a
|
|
|
|
|
|
|
|
let make_dump a = Dump (magic, a)
|
|
|
|
|
|
|
|
let open_dump = function
|
|
|
|
Dump (m, a) ->
|
|
|
|
if m = magic then a
|
|
|
|
else raise (Failure Odoc_messages.bad_magic_number)
|