Docs GODI Archive
Projects Blog Link DB

Search GODI:


More options
File lib/ocaml/pkg-lib/lua-ml/luabaselib.cmi_pretty GODI Package godi-lua-ml
Library lua-ml
 
   luabaselib.cmi_pretty    luabaselib.mli    Sources  
module Add :
  functor (MakeParser : Luaparser.MAKER) ->
    functor (I : Luainterp.S) ->
      sig
        module Value :
          sig
            type 'a userdata' = 'a I.Value.userdata'
            type srcloc = I.Value.srcloc
            type initstate = I.Value.initstate
            type value =
              I.Value.value =
                Nil
              | Number of float
              | String of string
              | Function of srcloc * func
              | Userdata of userdata
              | Table of table
            and func = value list -> value list
            and table = (value, value) Luahash.t
            and userdata = value userdata'
            and state =
              I.Value.state = {
              globals : table;
              fallbacks : (string, value) Hashtbl.t;
              mutable callstack : activation list;
              mutable currentloc : Srcmap.location option;
              startup : initstate;
            }
            and activation = srcloc * Srcmap.location option
            val caml_func : func -> value
            val lua_func : file:string -> linedefined:int -> func -> value
            val srcloc : file:string -> linedefined:int -> srcloc
            val eq : value -> value -> bool
            val to_string : value -> string
            val activation_strings : state -> activation -> string list
            type objname =
              I.Value.objname =
                Fallback of string
              | Global of string
              | Element of string * value
            val objname : state -> value -> objname option
            val state : unit -> state
            val at_init : state -> string list -> unit
            val initcode : state -> (string -> unit) -> unit
            module Table :
              sig
                val create : int -> table
                val find : table -> key:value -> value
                val bind : table -> key:value -> data:value -> unit
                val of_list : (string * value) list -> table
              end
            exception Projection of value * string
            val projection : value -> string -> 'a
            type ('a, 'b, 'c) ep =
              ('a, 'b, 'c) Luavalue.synonym_for_ep = {
              embed : 'a -> 'b;
              project : 'b -> 'a;
              is : 'c -> bool;
            }
            type 'a map = ('a, value, value) ep
            type 'a mapf = 'a I.Value.mapf
            val float : float map
            val int : int map
            val bool : bool map
            val string : string map
            val userdata : userdata map
            val unit : unit map
            val option : 'a map -> 'a option map
            val default : 'a -> 'a map -> 'a map
            val list : 'a map -> 'a list map
            val optlist : 'a map -> 'a list map
            val value : value map
            val table : table map
            val record : 'a map -> (string * 'a) list map
            val enum : string -> (string * 'a) list -> 'a map
            val ( --> ) : 'a map -> 'b map -> ('a -> 'b) map
            val ( **-> ) : 'a map -> 'b mapf -> ('a -> 'b) mapf
            val result : 'a map -> 'a mapf
            val resultvs : value list mapf
            val resultpair : 'a map -> 'b map -> ('a * 'b) mapf
            val dots_arrow : 'a map -> 'b map -> ('a list -> 'b) mapf
            val results : ('a -> value list) -> (value list -> 'a) -> 'a mapf
            val func : 'a mapf -> 'a map
            val closure : 'a mapf -> 'a map
            val efunc : 'a mapf -> 'a -> value
            type alt = I.Value.alt
            val alt : 'a mapf -> 'a -> alt
            val choose : alt list -> value
            val ( <|> ) : 'a map -> 'a map -> 'a map
            val ( <@ ) : 'a map -> ('a -> 'b) -> 'b map
          end
        module Ast :
          sig
            module Value :
              sig
                type 'a userdata' = 'a Value.userdata'
                type srcloc = Value.srcloc
                type initstate = Value.initstate
                type value =
                  Value.value =
                    Nil
                  | Number of float
                  | String of string
                  | Function of srcloc * func
                  | Userdata of userdata
                  | Table of table
                and func = value list -> value list
                and table = (value, value) Luahash.t
                and userdata = value userdata'
                and state =
                  Value.state = {
                  globals : table;
                  fallbacks : (string, value) Hashtbl.t;
                  mutable callstack : activation list;
                  mutable currentloc : Srcmap.location option;
                  startup : initstate;
                }
                and activation = srcloc * Srcmap.location option
                val caml_func : func -> value
                val lua_func :
                  file:string -> linedefined:int -> func -> value
                val srcloc : file:string -> linedefined:int -> srcloc
                val eq : value -> value -> bool
                val to_string : value -> string
                val activation_strings : state -> activation -> string list
                type objname =
                  Value.objname =
                    Fallback of string
                  | Global of string
                  | Element of string * value
                val objname : state -> value -> objname option
                val state : unit -> state
                val at_init : state -> string list -> unit
                val initcode : state -> (string -> unit) -> unit
                module Table :
                  sig
                    val create : int -> table
                    val find : table -> key:value -> value
                    val bind : table -> key:value -> data:value -> unit
                    val of_list : (string * value) list -> table
                  end
                exception Projection of value * string
                val projection : value -> string -> 'a
                type ('a, 'b, 'c) ep =
                  ('a, 'b, 'c) Luavalue.synonym_for_ep = {
                  embed : 'a -> 'b;
                  project : 'b -> 'a;
                  is : 'c -> bool;
                }
                type 'a map = ('a, value, value) ep
                type 'a mapf = 'a Value.mapf
                val float : float map
                val int : int map
                val bool : bool map
                val string : string map
                val userdata : userdata map
                val unit : unit map
                val option : 'a map -> 'a option map
                val default : 'a -> 'a map -> 'a map
                val list : 'a map -> 'a list map
                val optlist : 'a map -> 'a list map
                val value : value map
                val table : table map
                val record : 'a map -> (string * 'a) list map
                val enum : string -> (string * 'a) list -> 'a map
                val ( --> ) : 'a map -> 'b map -> ('a -> 'b) map
                val ( **-> ) : 'a map -> 'b mapf -> ('a -> 'b) mapf
                val result : 'a map -> 'a mapf
                val resultvs : value list mapf
                val resultpair : 'a map -> 'b map -> ('a * 'b) mapf
                val dots_arrow : 'a map -> 'b map -> ('a list -> 'b) mapf
                val results :
                  ('a -> value list) -> (value list -> 'a) -> 'a mapf
                val func : 'a mapf -> 'a map
                val closure : 'a mapf -> 'a map
                val efunc : 'a mapf -> 'a -> value
                type alt = Value.alt
                val alt : 'a mapf -> 'a -> alt
                val choose : alt list -> value
                val ( <|> ) : 'a map -> 'a map -> 'a map
                val ( <@ ) : 'a map -> ('a -> 'b) -> 'b map
              end
            type value = Value.value
            type name = string
            type location = int
            type stmt =
              Luabaselib.Add(MakeParser)(I).Ast.stmt =
                Stmt' of location * stmt
              | Assign of lval list * exp list
              | WhileDo of exp * block
              | RepeatUntil of block * exp
              | If of exp * block * (exp * block) list * block option
              | Return of exp list
              | Callstmt of call
              | Local of name list * exp list
            and block = stmt list
            and lval =
              Luabaselib.Add(MakeParser)(I).Ast.lval =
                Lvar of name
              | Lindex of exp * exp
            and exp =
              Luabaselib.Add(MakeParser)(I).Ast.exp =
                Var of name
              | Lit of value
              | Binop of exp * op * exp
              | Unop of op * exp
              | Index of exp * exp
              | Table of exp list * (name * exp) list
              | Call of call
            and call =
              Luabaselib.Add(MakeParser)(I).Ast.call =
                Funcall of exp * exp list
              | Methcall of exp * name * exp list
            and op =
              Luabaselib.Add(MakeParser)(I).Ast.op =
                And
              | Or
              | Lt
              | Le
              | Gt
              | Ge
              | Eq
              | Ne
              | Concat
              | Plus
              | Minus
              | Times
              | Div
              | Not
              | Pow
            type chunk =
              Luabaselib.Add(MakeParser)(I).Ast.chunk =
                Debug of bool
              | Statement of stmt
              | Fundef of location * lval * name list * varargs * block
              | Methdef of location * exp * name * name list * varargs *
                  block
            and varargs = bool
          end
        type state = Value.state
        type value = Value.value
        exception Error of string
        type compiled = unit -> value list
        val compile :
          srcdbg:Srcmap.map * bool -> Ast.chunk list -> state -> compiled
        type startup_code = (string -> unit) -> unit
        val pre_mk : unit -> state * startup_code
        val error : string -> 'a
        val getglobal : state -> value -> value
        val fallback : string -> state -> value list -> value list
        val with_stack : Value.srcloc -> state -> ('a -> 'b) -> 'a -> 'b
        val setfallback : state -> string -> value -> value
        val register_globals : (string * value) list -> state -> unit
        val register_module :
          string -> (string * value) list -> state -> unit
        module