language stringlengths 0 24 | filename stringlengths 9 214 | code stringlengths 99 9.93M |
|---|---|---|
OCaml Interface | hhvm/hphp/hack/src/utils/symbolDefinition.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type kind =
| Function
| Class
| Method
| Property
| ClassConst
| GlobalConst
| Enum
| Interface
|... |
OCaml | hhvm/hphp/hack/src/utils/symbolOccurrence.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type override_info = {
class_name: string;
method_name: string;
is_static: bool;
}
[@@deriving ord, eq, show]
... |
OCaml Interface | hhvm/hphp/hack/src/utils/symbolOccurrence.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* This `.mli` file was generated automatically. It may include extra
definitions that should not actually be exp... |
OCaml | hhvm/hphp/hack/src/utils/tempfile.ml | exception Out_of_retries
let rec mkdtemp ~(dir : Path.t) ~(skip_mocking : bool) ~(retries : int) : Path.t
=
if retries < 0 then
raise Out_of_retries
else
let name = Random_id.short_string () in
let tmp_dir = Path.concat dir name in
try
let () = Sys_utils.mkdir_p (Path.to_string tmp_dir) ~... |
OCaml Interface | hhvm/hphp/hack/src/utils/tempfile.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* This `.mli` file was generated automatically. It may include extra
definitions that should not actually be exp... |
OCaml | hhvm/hphp/hack/src/utils/tempfile_lwt.ml | exception Out_of_retries
let rec mkdtemp ~skip_mocking ~retries =
if retries < 0 then
raise Out_of_retries
else
let tmp_dir = Sys_utils.temp_dir_name in
let tmp_dir = Path.make tmp_dir in
let name = Random_id.short_string () in
let tmp_dir = Path.concat tmp_dir name in
try
let () = Sy... |
OCaml Interface | hhvm/hphp/hack/src/utils/tempfile_lwt.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* This `.mli` file was generated automatically. It may include extra
definitions that should not actually be exp... |
OCaml | hhvm/hphp/hack/src/utils/trie.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
(* Utility functions *)
let make_pair (a : 'a) (b : 'b) : 'a * 'b = (a, b)
let common_prefix (s1 ... |
OCaml Interface | hhvm/hphp/hack/src/utils/trie.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* This `.mli` file was generated automatically. It may include extra
definitions that should not actually be exp... |
Rust | hhvm/hphp/hack/src/utils/unwrap_ocaml.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
extern "C" {
fn caml_failwith(msg: *const libc::c_char);
}
/// This trait is to provide .unwrap_ocaml() on a Result<T,E>.
/// Its... |
OCaml | hhvm/hphp/hack/src/utils/visitors_runtime.ml | (*
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(** We didn't have access to the VisitorsRuntime module from OPAM when we
* originally added visitors, so we redefi... |
OCaml | hhvm/hphp/hack/src/utils/wwwroot.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* Keep in sync with //hphp/hack/src/facebook/utils/repo_root.rs *)
(**
* Checks if x is a www directory by lookin... |
OCaml Interface | hhvm/hphp/hack/src/utils/wwwroot.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val is_www_directory : ?config:string -> Path.t -> bool
val assert_www_directory : ?config:string -> Path.t -> unit... |
TOML | hhvm/hphp/hack/src/utils/arena_deserializer/Cargo.toml | # @generated by autocargo
[package]
name = "arena_deserializer"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] }
bumpalo = { version = "3.11.1", features = ["collections"] }
ocamlrep_caml_builtins = { version = "0.1.0", git =... |
Rust | hhvm/hphp/hack/src/utils/arena_deserializer/deserializer.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::any;
use std::fmt;
use std::marker::PhantomData;
use std::mem;
use bumpalo::Bump;
use serde::de::DeserializeSeed;
use serde::d... |
Rust | hhvm/hphp/hack/src/utils/arena_deserializer/impls.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::fmt;
use std::marker::PhantomData;
use bumpalo::collections::Vec as ArenaVec;
use bumpalo::Bump;
use ocamlrep_caml_builtins::I... |
Rust | hhvm/hphp/hack/src/utils/arena_deserializer/lib.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
mod deserializer;
mod impls;
mod seed;
pub use bumpalo;
pub use serde;
use serde::de::DeserializeSeed;
use serde::de::Deserializer;
pu... |
Rust | hhvm/hphp/hack/src/utils/arena_deserializer/seed.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::marker::PhantomData;
use serde::de::DeserializeSeed;
use serde::de::Deserializer;
use crate::deserializer::obtain_arena;
use ... |
hhvm/hphp/hack/src/utils/artifact_store/dune | (* -*- tuareg -*- *)
let library_entry name suffix =
Printf.sprintf
"(library
(name %s)
(wrapped false)
(modules)
(libraries %s_%s))" name name suffix
let fb_entry name =
library_entry name "fb"
let stubs_entry name =
library_entry name "stubs"
let entry is_fb name =
if is_fb then
fb_entry name
... | |
OCaml | hhvm/hphp/hack/src/utils/bser/bser.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
exception ParseException of int
exception ParseStateException of int
exception CallbackNotImplementedException
ty... |
OCaml | hhvm/hphp/hack/src/utils/bser/bser_main_test.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
let usage = "Usage: bser_test [filename] [--to_json|--to_bser|--roundtrip]\n"
type mode =
| To_bser
| To_json
... |
hhvm/hphp/hack/src/utils/bser/dune | (library
(name bser)
(modules bser)
(wrapped false)
(libraries hh_json sys_utils))
(executable
(name bser_main_test)
(modules bser_main_test)
(modes exe byte_complete)
(link_flags
(:standard
(:include ../../dune_config/ld-opts.sexp)))
(libraries bser default_injector_config)) | |
OCaml | hhvm/hphp/hack/src/utils/buffered_line_reader/buffered_line_reader.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* Our Unix systems only allow reading 64KB chunks at a time.
* Trying to read more than 64KB results in only 64KB ... |
OCaml Interface | hhvm/hphp/hack/src/utils/buffered_line_reader/buffered_line_reader.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
include
Buffered_line_reader_sig.S
with type 'a result = 'a
and type fd = Unix.file_descr
module Functor... |
OCaml | hhvm/hphp/hack/src/utils/buffered_line_reader/buffered_line_reader_lwt.ml | (*
* Copyright (c) 2018, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module Regular_reader :
Buffered_line_reader_sig.READER
with type 'a result = 'a Lwt.t
and type fd = Lwt_... |
OCaml Interface | hhvm/hphp/hack/src/utils/buffered_line_reader/buffered_line_reader_lwt.mli | (*
* Copyright (c) 2018, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
include
Buffered_line_reader_sig.S
with type 'a result = 'a Lwt.t
and type fd = Lwt_unix.file_descr |
OCaml | hhvm/hphp/hack/src/utils/buffered_line_reader/buffered_line_reader_sig.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(**
* This module is needed because Unix.select doesn't play well with
* input_line on Ocaml channels.. i.e., when... |
OCaml Interface | hhvm/hphp/hack/src/utils/buffered_line_reader/buffered_line_reader_sig.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* This `.mli` file was generated automatically. It may include extra
definitions that should not actually be exp... |
hhvm/hphp/hack/src/utils/buffered_line_reader/dune | (library
(name buffered_line_reader)
(wrapped false)
(modules buffered_line_reader buffered_line_reader_sig)
(libraries utils_core))
(library
(name buffered_line_reader_lwt)
(wrapped false)
(modules buffered_line_reader_lwt)
(libraries buffered_line_reader lwt lwt.unix)) | |
OCaml | hhvm/hphp/hack/src/utils/build_mode/dev/build_mode.ml | (**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "flow" directory of this source tree.
*
*)
let dev = true |
OCaml | hhvm/hphp/hack/src/utils/build_mode/prod/build_mode.ml | (**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "flow" directory of this source tree.
*
*)
let dev = false |
Rust | hhvm/hphp/hack/src/utils/caml_startup/caml_startup.rs | // Copyright (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::ffi::CString;
use std::os::raw::c_char;
extern "C" {
fn caml_startup(argv: *const *const c_char);
}
/// Initialize the ... |
TOML | hhvm/hphp/hack/src/utils/caml_startup/Cargo.toml | # @generated by autocargo
[package]
name = "caml_startup"
version = "0.0.0"
edition = "2021"
[lib]
path = "caml_startup.rs" |
TOML | hhvm/hphp/hack/src/utils/cargo/hh24_test/Cargo.toml | # @generated by autocargo
[package]
name = "hh24_test"
version = "0.0.0"
edition = "2021"
[lib]
path = "../../hh24_test.rs"
[dependencies]
anyhow = "1.0.71"
bumpalo = { version = "3.11.1", features = ["collections"] }
direct_decl_parser = { version = "0.0.0", path = "../../../parser/api/cargo/direct_decl_parser" }
h... |
TOML | hhvm/hphp/hack/src/utils/cargo/si_addendum/Cargo.toml | # @generated by autocargo
[package]
name = "si_addendum"
version = "0.0.0"
edition = "2021"
[lib]
path = "../../si_addendum.rs"
test = false
doctest = false
[dependencies]
core_utils_rust = { version = "0.0.0", path = "../../core" }
oxidized = { version = "0.0.0", path = "../../../oxidized" }
oxidized_by_ref = { ver... |
OCaml | hhvm/hphp/hack/src/utils/cgroup/cGroup.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Core
module Unix = Caml_unix
module Sys = Stdlib.Sys
open Result.Monad_infix
let spf = Printf.sprintf
(* Little helper ... |
OCaml Interface | hhvm/hphp/hack/src/utils/cgroup/cGroup.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
type stats = {
memory_current: int;
(** cgroup/memory.current - the total physical memory for the cgroup *)
memory_swap_c... |
OCaml | hhvm/hphp/hack/src/utils/cgroup/cgroupProfiler.ml | open Hh_prelude
(** `cgroup_watcher_start filename subtract_kb_for_array` will reset cgroup_watcher counters, and have it
start monitoring the two filenames (e.g. "/sys/fs/.../memory.current" and ".../memory.swap.current")
and adds them together. See [cgroup_watcher_get] for the meaning of [subtract_kb_for_array]. *)
... |
OCaml Interface | hhvm/hphp/hack/src/utils/cgroup/cgroupProfiler.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* The CgroupProfiler module is to help us keep track of how cgroup
memory usage evolves during the various steps of work d... |
C | hhvm/hphp/hack/src/utils/cgroup/cgroupWatcher.c | // (c) Meta Platforms, Inc. and affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
#define CAML_NAME_SPACE
#include <caml/mlvalues.h>
#include <caml/memory.h>
#include <caml/alloc.h>
#include <stdio.h>
#include <string.h>
#inc... |
hhvm/hphp/hack/src/utils/cgroup/dune | (library
(name cgroupprofiler)
(wrapped false)
(modules CgroupProfiler)
(libraries cgroup core_kernel heap_shared_mem logging utils_core)
(foreign_stubs
(language c)
(names cgroupWatcher))
(preprocess
(pps lwt_ppx)))
(library
(name cgroup)
(wrapped false)
(modules CGroup)
(libraries core_kernel cor... | |
hhvm/hphp/hack/src/utils/ci_util/dune | (* -*- tuareg -*- *)
let library_entry name suffix =
Printf.sprintf
"(library
(name %s)
(wrapped false)
(modules)
(libraries %s_%s))" name name suffix
let fb_entry name =
library_entry name "fb"
let stubs_entry name =
library_entry name "stubs"
let entry is_fb name =
if is_fb then
fb_entry name
... | |
hhvm/hphp/hack/src/utils/clowder_paste/dune | (* -*- tuareg -*- *)
let library_entry name suffix =
Printf.sprintf
"(library
(name %s)
(wrapped false)
(modules)
(libraries %s_%s))" name name suffix
let fb_entry name =
library_entry name "fb"
let stubs_entry name =
library_entry name "stubs"
let entry is_fb name =
if is_fb then
fb_entry name
... | |
OCaml | hhvm/hphp/hack/src/utils/collections/cSet.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
include Set.Make (Char) |
hhvm/hphp/hack/src/utils/collections/dune | (library
(name collections)
(wrapped false)
(libraries common core_kernel yojson)
(preprocess (pps ppx_hash))) | |
OCaml | hhvm/hphp/hack/src/utils/collections/hashSet.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Core
type 'a t = ('a, unit) Hashtbl.t
let create () = Hashtbl.Poly.create ()
let clear = Hashtbl.clear
let ... |
OCaml Interface | hhvm/hphp/hack/src/utils/collections/hashSet.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* HashSet is just a HashTable where the keys are actually the values, and we
* ignore the actual values inside the... |
OCaml | hhvm/hphp/hack/src/utils/collections/i64Map.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
include WrappedMap.Make (Int64Key)
let pp : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t -> unit =
... |
OCaml | hhvm/hphp/hack/src/utils/collections/i64Set.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
include Set.Make (Int64) |
OCaml | hhvm/hphp/hack/src/utils/collections/iMap.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
include WrappedMap.Make (IntKey)
let pp : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t -> unit =
(... |
OCaml | hhvm/hphp/hack/src/utils/collections/immQueue.ml | (*
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type 'a t = {
incoming: 'a list;
outgoing: 'a list;
length: int;
}
exception Empty
let empty = { incoming = ... |
OCaml Interface | hhvm/hphp/hack/src/utils/collections/immQueue.mli | (*
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(*
* Immutable queue implementation. Modeled loosely after the mutable stdlib
* Queue. push, pop, etc. are amortiz... |
OCaml | hhvm/hphp/hack/src/utils/collections/int64Key.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type t = int64
let compare = Int64.compare |
OCaml | hhvm/hphp/hack/src/utils/collections/intKey.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type t = int
let compare = Int.compare |
OCaml | hhvm/hphp/hack/src/utils/collections/iSet.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
include Set.Make (IntKey)
let pp fmt iset =
Format.fprintf fmt "@[<2>{";
let elements = elements iset in
(mat... |
OCaml | hhvm/hphp/hack/src/utils/collections/lazy_string_table.ml | (*
* Copyright (c) 2018, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Core
open Option.Monad_infix
(** This is made of sequence [seq] and a hash table [tbl].
Initially, the has... |
OCaml Interface | hhvm/hphp/hack/src/utils/collections/lazy_string_table.mli | (*
* Copyright (c) 2018, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Core
(** [Lazy_string_table.t] provides a memoization cache for any
[(string * 'a) Sequence.t] where:
... |
OCaml | hhvm/hphp/hack/src/utils/collections/lowerStringKey.ml | (*
* Copyright (c) 2018, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type t = string
let compare (x : t) (y : t) =
String.compare (String.lowercase_ascii x) (String.lowercase_ascii y... |
OCaml | hhvm/hphp/hack/src/utils/collections/lSMap.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
include WrappedMap.Make (LowerStringKey)
let pp : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t -> u... |
OCaml | hhvm/hphp/hack/src/utils/collections/priorityQueue.ml | (*
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module Make (Ord : Set.OrderedType) = struct
type elt = Ord.t
type t = {
mutable __queue: elt option array;... |
OCaml | hhvm/hphp/hack/src/utils/collections/reordered_argument_collections.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module type Map_S = Reordered_argument_collections_sig.Map_S
module Reordered_argument_map (S : WrappedMap.S) :
M... |
OCaml Interface | hhvm/hphp/hack/src/utils/collections/reordered_argument_collections.mli | (*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module type Map_S = Reordered_argument_collections_sig.Map_S
module Reordered_argument_map (S : WrappedMap.S) :
Map_S wit... |
OCaml | hhvm/hphp/hack/src/utils/collections/reordered_argument_collections_sig.ml | (*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module type Map_S = sig
include WrappedMap.S
val add : 'a t -> key:key -> data:'a -> 'a t
val filter : 'a t -> f:(ke... |
OCaml | hhvm/hphp/hack/src/utils/collections/sMap.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Core
include WrappedMap.Make (StringKey)
let pp : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t... |
OCaml | hhvm/hphp/hack/src/utils/collections/sSet.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
include Set.Make (StringKey)
let pp_limit ?(max_elts = None) fmt sset =
Format.fprintf fmt "@[<2>{";
let elemen... |
OCaml | hhvm/hphp/hack/src/utils/collections/stringKey.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type t = string
let compare (x : t) (y : t) = String.compare x y
let to_string x = x |
OCaml | hhvm/hphp/hack/src/utils/collections/wrappedMap.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Core
module type S = WrappedMap_sig.S
module Make (Ord : Caml.Map.OrderedType) : S with type key = Ord.t = st... |
OCaml Interface | hhvm/hphp/hack/src/utils/collections/wrappedMap.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module type S = WrappedMap_sig.S
module Make (Ord : Map.OrderedType) : S with type key = Ord.t |
OCaml | hhvm/hphp/hack/src/utils/collections/wrappedMap_sig.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Core
module type S = sig
include Caml.Map.S
val add : ?combine:('a -> 'a -> 'a) -> key -> 'a -> 'a t -> '... |
OCaml | hhvm/hphp/hack/src/utils/config_file/config_file.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
include Config_file_version
type t = Config_file_common.t
let file_path_relative_to_repo_root =
Config_file_comm... |
OCaml Interface | hhvm/hphp/hack/src/utils/config_file/config_file.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type t = Config_file_common.t
type version_components = Config_file_version.version_components = {
major: int;
minor: int... |
OCaml | hhvm/hphp/hack/src/utils/config_file/config_file_common.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
open Option.Monad_infix
type t = Config_file_ffi_externs.config
let file_path_relative_to_repo_roo... |
OCaml Interface | hhvm/hphp/hack/src/utils/config_file/config_file_common.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type t
val file_path_relative_to_repo_root : string
val pkgs_config_path_relative_to_repo_root : string
val get_packages_ab... |
OCaml | hhvm/hphp/hack/src/utils/config_file/config_file_ffi_externs.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type config
external empty : unit -> config = "hh_config_file_empty"
external is_empty : config -> bool = "hh_config_file_is... |
OCaml | hhvm/hphp/hack/src/utils/config_file/config_file_lwt.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Core
include Config_file_version
type t = Config_file_common.t
let file_path_relative_to_repo_root =
Config... |
OCaml Interface | hhvm/hphp/hack/src/utils/config_file/config_file_lwt.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type t = Config_file_common.t
type version_components = Config_file_version.version_components = {
major: int;
minor: int... |
OCaml | hhvm/hphp/hack/src/utils/config_file/config_file_version.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type version_components = {
major: int;
minor: int;
build: int;
}
type version =
| Opaque_version of string option
... |
OCaml Interface | hhvm/hphp/hack/src/utils/config_file/config_file_version.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type version_components = {
major: int;
minor: int;
build: int;
}
type version =
| Opaque_version of string option
... |
hhvm/hphp/hack/src/utils/config_file/dune | (library
(name utils_config_file_common)
(wrapped false)
(modules config_file_common config_file_version)
(libraries
config_file_ffi_externs
core_kernel
relative_path
sys_utils
utils_core
utils_hash)
(preprocess
(pps lwt_ppx)))
(library
(name utils_config_file)
(wrapped false)
(modules config_fil... | |
TOML | hhvm/hphp/hack/src/utils/config_file/rust/Cargo.toml | # @generated by autocargo
[package]
name = "config_file"
version = "0.0.0"
edition = "2021"
[lib]
path = "config_file.rs"
[dependencies]
bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] }
lazy_static = "1.4"
regex = "1.9.2"
serde_json = { version = "1.0.100", features = ["float_roundtrip", "unbound... |
Rust | hhvm/hphp/hack/src/utils/config_file/rust/config_file.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::collections::BTreeMap;
use std::path::Path;
use bstr::ByteSlice;
use sha1::Digest;
use sha1::Sha1;
#[derive(Debug, Clone, Def... |
Rust | hhvm/hphp/hack/src/utils/config_file/rust/ffi.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use config_file::ConfigFile;
use ocamlrep_custom::Custom;
struct Config(ConfigFile);
impl ocamlrep_custom::CamlSerialize for Config {
... |
TOML | hhvm/hphp/hack/src/utils/config_file/rust/ffi/Cargo.toml | # @generated by autocargo
[package]
name = "config_file_ffi"
version = "0.0.0"
edition = "2021"
[lib]
path = "../ffi.rs"
test = false
doctest = false
crate-type = ["lib", "staticlib"]
[dependencies]
config_file = { version = "0.0.0", path = ".." }
ocamlrep_custom = { version = "0.1.0", git = "https://github.com/face... |
OCaml | hhvm/hphp/hack/src/utils/core/build_id.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
external get_build_revision : unit -> string = "hh_get_build_revision"
external get_build_commit_t... |
OCaml Interface | hhvm/hphp/hack/src/utils/core/build_id.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val build_revision : string
val build_commit_time : int
val build_commit_time_string : string
val build_mode : st... |
TOML | hhvm/hphp/hack/src/utils/core/Cargo.toml | # @generated by autocargo
[package]
name = "core_utils_rust"
version = "0.0.0"
edition = "2021"
[lib]
path = "utils.rs"
[dev-dependencies]
pretty_assertions = { version = "1.2", features = ["alloc"], default-features = false } |
hhvm/hphp/hack/src/utils/core/dune | (copy_files ../../../scripts/get_build_id_gen.c)
(library
(name utils_core)
(wrapped false)
(foreign_stubs
(language c)
(names get_build_id get_build_id_gen)
(flags
(:standard
(:include config/build-timestamp-opt))))
(libraries base core_kernel.caml_unix string hh_json str unix measure_ffi)
(preproce... | |
OCaml | hhvm/hphp/hack/src/utils/core/exception.ml | (*
* Copyright (c) 2018-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
type t = {
exn: exn;
backtrace: Printexc.raw_backtrace;
}
(* In ocaml, backtraces (the path that the exception bubbled up after bein... |
OCaml Interface | hhvm/hphp/hack/src/utils/core/exception.mli | (*
* Copyright (c) 2018-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
type t [@@deriving show]
val wrap : exn -> t
val wrap_unraised : ?frames:int -> exn -> t
val unwrap : t -> exn
val reraise : t -> 'a
... |
OCaml | hhvm/hphp/hack/src/utils/core/exit_status.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type t =
| No_error
| Checkpoint_error
| Input_error
| Kill_error
| No_server_running_should_retry
| Ser... |
OCaml Interface | hhvm/hphp/hack/src/utils/core/exit_status.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type t =
| No_error
| Checkpoint_error
| Input_error
| Kill_error
| No_server_running_should_retry
| Ser... |
C | hhvm/hphp/hack/src/utils/core/get_build_id.c | /**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*/
#define CAML_NAME_SPACE
#include <caml/memory.h>
#include <caml/alloc.h>
#include <assert.h>
#include <stdint.h>
#i... |
OCaml | hhvm/hphp/hack/src/utils/core/hh_logger.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
(* We might want to log to both stderr and a file. Shelling out to tee isn't cross-platform.
* We ... |
OCaml Interface | hhvm/hphp/hack/src/utils/core/hh_logger.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(** enables logging to a file (in addition to stderr which is always enabled) *)
val set_log : string -> unit
val s... |
OCaml | hhvm/hphp/hack/src/utils/core/hh_prelude.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
include Core
(** The equality function in Pervasives is backed by compiler magic (called
compare_val), which operates on ... |
OCaml | hhvm/hphp/hack/src/utils/core/local_id.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
module S = struct
type t = int * string [@@deriving ord, hash, eq]
let compare = compare
end
... |
OCaml Interface | hhvm/hphp/hack/src/utils/core/local_id.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
(** Used to represent local variables in the named AST. *)
module S : sig
type t [@@deriving eq]... |
OCaml | hhvm/hphp/hack/src/utils/core/measure.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(**
* The Measure module is primarily useful for debugging. It's particularly
* useful for gathering stats about s... |
OCaml Interface | hhvm/hphp/hack/src/utils/core/measure.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
type record
type record_data
val create : unit -> record
val push_global : unit -> unit
val pop_global : unit ->... |
OCaml | hhvm/hphp/hack/src/utils/core/prim_defs.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
**
*
* "Primitive" definitions; fighting the dependency web, this module is a leaf
* on the dependency tree. It may o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.