package codept-lib

  1. Overview
  2. Docs

Read m2l ast and module names from files

type format =
  1. | Src
    (*

    standard source file

    *)
  2. | M2l
    (*

    M2l serialized file

    *)
  3. | Parsetree
    (*

    parsetree ast file

    *)
  4. | Cmi
    (*

    binary file: e.g. cmi

    *)

Format type

type kind = {
  1. format : format;
  2. kind : M2l.kind;
}

Extend M2l.kind to include the format of read file

type ocaml_parsing_error =
  1. | Syntax of Syntaxerr.error
  2. | Lexer of Lexer.error

error type

type error =
  1. | Ocaml of ocaml_parsing_error
  2. | Serialized of Schematic.Ext.error
val name : string -> Unitname.t

name filename gives the module name corresponding to filename

val file : kind -> string -> (M2l.t, error) result
OCaml

Innovation. Community. Security.