Module File


module File: sig .. end

File related utilities and configuration elements




File management auxiliaries.


type file_name = string 
type dir_name = string 
type file_extension = string 
type module_name = string 
Various names for specialized versions of string.
val careful_open_out : file_name -> Pervasives.out_channel
An alias for open_out that performs correctly on stdout.
val careful_close_out : Pervasives.out_channel -> unit
An alias for close_out that performs correctly on stdout.
exception Unknown_file_extension of string
val change_extension : file_extension ->
file_extension -> file_name -> file_name
Computes the name of a file when its extension is modified.
val change_mlm_extension : file_extension -> file_name -> file_name
val create_lexbuf_from_file : file_name -> Lexing.lexbuf

Search path management.


val get_search_path : unit -> dir_name list
val add_dir_to_search_path : dir_name -> unit
val search_mli_file_for_module : module_name -> file_name
val search_ml_file_for_module : module_name -> file_name
val module_of_mli_file : file_name -> module_name

Parsing files.


val parse_ml_file : file_name -> Parsetree.structure_item list
val parse_mli_file : file_name -> Parsetree.signature_item list