language
stringlengths
0
24
filename
stringlengths
9
214
code
stringlengths
99
9.93M
OCaml
hhvm/hphp/hack/src/annotated_ast/aast.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 Aast_defs let is_erased = function | Erased -> true | SoftReified | Reified -> false let is_reif...
OCaml
hhvm/hphp/hack/src/annotated_ast/aast_defs.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. * *) (* Ensure that doc comments are always on a separate line by * requiring a lot of padding for inline doc comments. ...
OCaml
hhvm/hphp/hack/src/annotated_ast/aast_defs_visitors_ancestors.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 SM = Ast_defs.ShapeMap module LM = Local_id.Map class virtual ['self] iter = object (_ : 'self) inheri...
OCaml
hhvm/hphp/hack/src/annotated_ast/aast_utils.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. * *) let rec can_be_captured = let open Aast_defs in function | Darray _ | Varray _ | Shape _ | ValCollection _ | K...
OCaml Interface
hhvm/hphp/hack/src/annotated_ast/aast_utils.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. * *) (** Conservatively determines if an expression can be captured. This is useful for deciding when to paranthesise an expr...
hhvm/hphp/hack/src/annotated_ast/dune
(library (name annotated_ast) (modules aast aast_defs aast_defs_visitors_ancestors) (wrapped false) (libraries ast namespace_env) (preprocess (pps visitors.ppx ppx_transform ppx_deriving.std ppx_hash))) (library (name namespace_env) (wrapped false) (modules namespace_env) (libraries collections core_kernel ...
OCaml
hhvm/hphp/hack/src/annotated_ast/namespace_env.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 type env = { ns_ns_uses: string SMap.t; [@opaque] ns_class_uses: string SMap.t; [@opaque] ns_...
OCaml Interface
hhvm/hphp/hack/src/annotated_ast/namespace_env.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 env = { ns_ns_uses: string SMap.t; ns_class_uses: string SMap.t; ns_fun_uses: string SMap.t; ns_const_uses: strin...
Rust
hhvm/hphp/hack/src/arena_collections/alist.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. //! Associative array types. //! //! At the moment, we are using the bumpalo allocator for arena allocation. //! Because the stdlib type...
TOML
hhvm/hphp/hack/src/arena_collections/Cargo.toml
# @generated by autocargo [package] name = "arena_collections" version = "0.0.0" edition = "2021" [lib] path = "lib.rs" [dependencies] arena_deserializer = { version = "0.0.0", path = "../utils/arena_deserializer" } arena_trait = { version = "0.0.0", path = "../arena_trait" } bumpalo = { version = "3.11.1", features...
Rust
hhvm/hphp/hack/src/arena_collections/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 alist; mod multiset; pub mod map; pub mod set; #[macro_use] pub mod vec; #[macro_use] pub mod list; pub use alist::AssocList; pub ...
Rust
hhvm/hphp/hack/src/arena_collections/list.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::Debug; use std::marker::PhantomData; use arena_deserializer::ArenaSeed; use arena_deserializer::DeserializeInArena; use a...
Rust
hhvm/hphp/hack/src/arena_collections/map.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::cmp::Ordering; use std::fmt::Debug; use std::hash::Hash; use std::hash::Hasher; use arena_deserializer::impl_deserialize_in_ar...
Rust
hhvm/hphp/hack/src/arena_collections/multiset.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. //! Array-backed set types. //! //! At the moment, we are using the bumpalo allocator for arena allocation. //! Because the stdlib types...
Rust
hhvm/hphp/hack/src/arena_collections/set.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 arena_trait::Arena; use arena_trait::TrivialDrop; use ocamlrep::FromOcamlRepIn; use ocamlrep::ToOcamlRep; use serde::Deserialize; us...
Rust
hhvm/hphp/hack/src/arena_collections/test_alist.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 crate::AssocList; #[test] fn get_with_duplicate_keys() { let entries = [(1, "a"), (1, "b")]; let alist = AssocList::new(&en...
Rust
hhvm/hphp/hack/src/arena_collections/test_alist_mut.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 bumpalo::Bump; use crate::AssocList; use crate::AssocListMut; use crate::SortedAssocList; // Doctests ////////////////////////////...
Rust
hhvm/hphp/hack/src/arena_collections/test_list.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 bumpalo::Bump; use crate::list::List; macro_rules! sl { () => { List::Nil::<i32> }; ($($xs:expr $(,)?)+) => { stack_list![...
Rust
hhvm/hphp/hack/src/arena_collections/test_multiset.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 bumpalo::Bump; use crate::MultiSet; use crate::MultiSetMut; use crate::SortedSet; // Doctests ////////////////////////////////////...
Rust
hhvm/hphp/hack/src/arena_collections/test_sorted_alist.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 bumpalo::Bump; use crate::AssocListMut; use crate::SortedAssocList; fn new<'a, K: Copy + Ord, V: Copy>( b: &'a Bump, entri...
Rust
hhvm/hphp/hack/src/arena_collections/vec.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::ops::Deref; use std::slice; use bumpalo::collections::vec::IntoIter; use bumpalo::collections::Vec as BVec; use bumpalo::Bump; ...
TOML
hhvm/hphp/hack/src/arena_trait/Cargo.toml
# @generated by autocargo [package] name = "arena_trait" version = "0.0.0" edition = "2021" [lib] path = "lib.rs" [dependencies] bumpalo = { version = "3.11.1", features = ["collections"] }
Rust
hhvm/hphp/hack/src/arena_trait/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. #![deny(clippy::mut_from_ref)] use bumpalo::Bump; pub trait Arena { #[allow(clippy::mut_from_ref)] fn alloc<T: TrivialDrop>(&se...
Rust
hhvm/hphp/hack/src/asdl_to_rust/asdl/asdl.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. // The files generated by lrgen rely on this now-discouraged elision feature #![allow(elided_lifetimes_in_paths)] pub mod lexer; pub m...
Rust
hhvm/hphp/hack/src/asdl_to_rust/asdl/lexer.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. include!(concat!(env!("ASDL_GEN_OUT_DIR"), "/", "asdl_l.rs")); pub use asdl_l::*;
Rust
hhvm/hphp/hack/src/asdl_to_rust/asdl/parser.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. include!(concat!(env!("ASDL_GEN_OUT_DIR"), "/", "asdl_y.rs")); pub use asdl_y::*;
Rust
hhvm/hphp/hack/src/asdl_to_rust/asdl_to_rust/asdl_to_rust.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. // e.g. cd ~/fbsource && buck2 run fbcode//hphp/hack/src/asdl_to_rust:asdl_to_rust -- --rustfmt-path $(which rustfmt) fbcode/hphp/hack...
hhvm/hphp/hack/src/asdl_to_rust/grammar/asdl.l
%% module "MODULE" attributes "ATTRIBUTES" version "VERSION" [a-zA-Z_][a-zA-Z_0-9]* "IDENTIFIER" , "COMMA" \* "STAR" \? "QUESTION_MARK" = "EQUAL" \| "PIPE" \( "LPAREN" \) "RPAREN" \{ "LBRACE" \} "RBRACE" "(?:\\\\|\\"|[^"\n])*" "STRING_LITERAL" --[^\n]*$ ; [ \t\n\r]+ ;
hhvm/hphp/hack/src/asdl_to_rust/grammar/asdl.y
%start Module %avoid_insert "IDENTIFIER" %avoid_insert "STRING_LITERAL" %% Module -> Result<ast::Module, ()>: 'MODULE' Identifier Version_opt 'LBRACE' Definitions 'RBRACE' { let id = $2?; let version = $3?; let definitions = $5?; Ok(ast::Module{id, version, definitions}) } ; Identifier ->...
TOML
hhvm/hphp/hack/src/asdl_to_rust/lrgen/Cargo.toml
# @generated by autocargo [package] name = "lrgen" version = "0.0.0" edition = "2021" [[bin]] name = "lrgen" path = "lrgen.rs" [dependencies] cfgrammar = { version = "0.12", features = ["serde"] } clap = { version = "3.2.25", features = ["derive", "env", "regex", "unicode", "wrap_help"] } lrlex = "0.12"
Rust
hhvm/hphp/hack/src/asdl_to_rust/lrgen/lrgen.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. /// A `lex`/`yacc` like parser generator tool built around /// [softdevteam/grmtools](https://github.com/softdevteam/grmtools). #[deri...
hhvm/hphp/hack/src/asdl_to_rust/python/v3.10.0.asdl
-- ASDL's 4 builtin types are: -- identifier, int, string, constant module Python { mod = Module(stmt* body, type_ignore* type_ignores) | Interactive(stmt* body) | Expression(expr body) | FunctionType(expr* argtypes, expr returns) stmt = FunctionDef(identifier name, arguments args, ...
OCaml
hhvm/hphp/hack/src/ast/ast_defs.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 could open Hh_prelude here, but then we get errors about using ==, which some visitor below uses. *) open B...
hhvm/hphp/hack/src/ast/dune
(library (name ast) (wrapped false) (modules ast_defs) (libraries file_info namespace_env naming_special_names visitors_runtime) (preprocess (pps visitors.ppx ppx_hash ppx_transform ppx_deriving.std)))
OCaml
hhvm/hphp/hack/src/batch/batch_global_state.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 batch_state = { saved_root: Path.t; saved_hhi: Path.t; saved_tmp: Path.t; trace: bool; paths_to_ignore: Str.reg...
OCaml Interface
hhvm/hphp/hack/src/batch/batch_global_state.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 batch_state val save : trace:bool -> batch_state val worker_id_str : worker_id:int -> string val restore : batch_state...
OCaml
hhvm/hphp/hack/src/batch/batch_init.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 Hh_prelude (* This should stay at toplevel in order to be executed before [Daemon.check_entry_point]. *) let entry = W...
OCaml Interface
hhvm/hphp/hack/src/batch/batch_init.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. * *) open Hh_prelude val init : root:Path.t -> shmem_config:SharedMem.config -> popt:ParserOptions.t -> tcopt:TypecheckerOp...
hhvm/hphp/hack/src/batch/dune
(library (name batch_global_state) (wrapped false) (modules batch_global_state) (libraries collections errors hhi ignore relative_path sys_utils typing_deps)) (library (name batch_init) (modules batch_init) (wrapped false) (libraries batch_global_state decl file_provider global_config h...
OCaml
hhvm/hphp/hack/src/client/clientArgs.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 ClientCommand open ClientEnv (** Arg specs shared across more than 1 arg parser. *) module Com...
OCaml
hhvm/hphp/hack/src/client/clientAutocomplete.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 let go results output_json = if output_json then let results = List.map results ~f:Auto...
OCaml
hhvm/hphp/hack/src/client/clientCheck.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 ClientEnv open Utils open ClientRename open Ocaml_overrides module Rpc = ServerCommandTypes mod...
OCaml Interface
hhvm/hphp/hack/src/client/clientCheck.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. * *) (** This function never returns; it always calls [Exit.exit] *) val main : ClientEnv.client_check_env -> ServerLocalConf...
OCaml
hhvm/hphp/hack/src/client/clientCheckStatus.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 ServerCommandTypes let print_error_raw e = Printf.printf "%s" (Raw_error_formatter.to_string e...
OCaml
hhvm/hphp/hack/src/client/clientCommand.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 command = | CCheck of ClientEnv.client_check_env | CStart of ClientStart.env | CStop of ClientStop.env ...
OCaml
hhvm/hphp/hack/src/client/clientConnect.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 let log ?tracker ?connection_log_id s = let id = match tracker with | Some tracker -> Som...
OCaml Interface
hhvm/hphp/hack/src/client/clientConnect.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. * *) (** Used solely as an argument to [connect] *) type env = { root: Path.t; from: string; local_config: ServerLocalConfig....
OCaml
hhvm/hphp/hack/src/client/clientDownloadSavedState.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 Hh_prelude type saved_state_type = Naming_and_dep_table type env = { root: Path.t; from: string; saved_state_type...
OCaml Interface
hhvm/hphp/hack/src/client/clientDownloadSavedState.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 saved_state_type = Naming_and_dep_table type env = { root: Path.t; from: string; saved_state_type: saved_state_typ...
OCaml
hhvm/hphp/hack/src/client/clientEnv.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 rename_mode = | Function | Class | Method | Unspecified type client_mode = | MODE_XHP_AUTOCOMPLETE_S...
OCaml
hhvm/hphp/hack/src/client/clientFormat.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 Hh_json let to_json result = let (error, result, internal_error) = match result with ...
OCaml
hhvm/hphp/hack/src/client/clientFullFidelityParse.ml
(* * Copyright (c) 2016, 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 let go result = print_endline result
OCaml
hhvm/hphp/hack/src/client/clientGetDefinition.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 let print_json res = Nuclide_rpc_message_printer.( identify_symbol_response_to_json res |> pr...
OCaml
hhvm/hphp/hack/src/client/clientHighlightRefs.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 let print_json res = Nuclide_rpc_message_printer.( highlight_references_response_to_json res ...
OCaml
hhvm/hphp/hack/src/client/clientLint.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 let go (results : ServerLintTypes.result) output_json error_format = if output_json then Serv...
OCaml
hhvm/hphp/hack/src/client/clientLogCommand.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 full type ClientCommand.command refers to environment types in * other client modules like ClientStart.env, ...
OCaml
hhvm/hphp/hack/src/client/clientLsp.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 Lsp open Lsp_fmt open Hh_json_helpers (* All hack-specific code relating to LSP goes in here. ...
OCaml Interface
hhvm/hphp/hack/src/client/clientLsp.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 command-line arguments for "hh_client lsp" *) type args = { from: string; (** The source where the client was ...
OCaml
hhvm/hphp/hack/src/client/clientMethodJumps.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 MethodJumps = ServerCommandTypes.Method_jumps let pos_to_json pos = let (line, start, end_...
OCaml
hhvm/hphp/hack/src/client/clientOutline.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 let print_json res = Nuclide_rpc_message_printer.(outline_response_to_json res |> print_json) le...
OCaml
hhvm/hphp/hack/src/client/clientRename.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 ClientEnv let get_pos = ServerRenameTypes.get_pos let compare_result = ServerRenameTypes.comp...
OCaml Interface
hhvm/hphp/hack/src/client/clientRename.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. * *) val apply_patches : ServerRenameTypes.patch list -> unit val patches_to_json_string : ServerRenameTypes.patch list -> string ...
OCaml
hhvm/hphp/hack/src/client/clientRestart.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 let main (env : ClientStart.env) : Exit_status.t Lwt.t = HackEventLogger.set_from env.ClientStart...
OCaml
hhvm/hphp/hack/src/client/clientResultPrinter.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 Hh_prelude open Hh_json module type Result_printer = sig type t val go : (t, string) result -> bool -> un...
OCaml
hhvm/hphp/hack/src/client/clientSavedStateProjectMetadata.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. * *) exception GetProjectMetadataError of string let main (env : ClientEnv.client_check_env) (config : ServerLocalConfig.t) : ...
OCaml
hhvm/hphp/hack/src/client/clientSearch.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 SUtils = SearchUtils let print_results (results : SearchUtils.result) : unit = List.iter r...
OCaml
hhvm/hphp/hack/src/client/clientSpinner.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. * *) open Hh_prelude let ascii_chars = [| "-"; "\\"; "|"; "/" |] (** Some terminals display the emoji using only one column, ev...
OCaml Interface
hhvm/hphp/hack/src/client/clientSpinner.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. * *) (** The caller should invoke [start_heartbeat_telemetry ()] once, as close as possible to process start. From this point unt...
OCaml
hhvm/hphp/hack/src/client/clientStart.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 (** What is the path to the hh_server binary? 1. If HH_SERVER_PATH environment variable is defined,...
OCaml Interface
hhvm/hphp/hack/src/client/clientStart.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 env = { root: Path.t; from: string; no_load: bool; watchman_debug_logging: bool; log_inference_constr...
OCaml
hhvm/hphp/hack/src/client/clientStop.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 MC = MonitorConnection exception FailedToKill type env = { root: Path.t; from: string; ...
OCaml Interface
hhvm/hphp/hack/src/client/clientStop.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 env = { root: Path.t; from: string; } val kill_server : Path.t -> string -> unit val main : env -> Exit_s...
OCaml
hhvm/hphp/hack/src/client/clientSymbolInfo.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 let go (conn : ClientConnect.conn) ~(desc : string) (files : string) (expand_path :...
OCaml
hhvm/hphp/hack/src/client/clientTastHoles.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 Hh_prelude (* Convert result type to tuple since it's not available to Nuclide_rpc_message_printer *) let tast_holes_r...
OCaml Interface
hhvm/hphp/hack/src/client/clientTastHoles.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. * *) val go : TastHolesService.result -> print_file:bool -> bool -> unit
OCaml
hhvm/hphp/hack/src/client/clientTraceAi.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 Hh_json let print_json res = print_endline (Hh_json.json_to_string (JSON_String res)) let go ...
OCaml
hhvm/hphp/hack/src/client/clientTypeAtPos.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 let go result output_json = if output_json then let response = match result with ...
OCaml
hhvm/hphp/hack/src/client/clientTypeErrorAtPos.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 Hh_prelude let print_json result = Nuclide_rpc_message_printer.( print_json @@ infer_type_error_response_to_jso...
OCaml Interface
hhvm/hphp/hack/src/client/clientTypeErrorAtPos.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. * *) val go : InferErrorAtPosService.t option -> bool -> unit
hhvm/hphp/hack/src/client/dune
(library (name client) (wrapped false) (modules (:standard \ clientLogCommand clientGetDefinition clientHighlightRefs)) (libraries connection_tracker client_get_definition client_highlight_refs client_ide_service clowder_paste flytrap formatting_stubs hh_server_monitor logging lwt ...
OCaml
hhvm/hphp/hack/src/client/ide_service/clientIdeDaemon.ml
(* * 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. * *) open Hh_prelude (** These are messages on ClientIdeDaemon's internal message-queue *) type message = | ClientRequ...
OCaml Interface
hhvm/hphp/hack/src/client/ide_service/clientIdeDaemon.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 daemon_entry_point : (ClientIdeMessage.daemon_args, unit, unit) Daemon.entry
OCaml
hhvm/hphp/hack/src/client/ide_service/clientIdeIncremental.ml
(* * 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. * *) open Hh_prelude let log s = Hh_logger.log ("[ide-incremental] " ^^ s) let log_debug s = Hh_logger.debug ("[ide-inc...
OCaml Interface
hhvm/hphp/hack/src/client/ide_service/clientIdeIncremental.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 changed_file_results = { naming_table: Naming_table.t; sienv: SearchUtils.si_env; old_file_info: FileInfo...
OCaml
hhvm/hphp/hack/src/client/ide_service/clientIdeInit.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. * *) open Hh_prelude type init_result = { naming_table: Naming_table.t; sienv: SearchUtils.si_env; changed_files: Saved_st...
OCaml Interface
hhvm/hphp/hack/src/client/ide_service/clientIdeInit.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. * *) (** Success case for [init]. *) type init_result = { naming_table: Naming_table.t; (** An open connection to sqlite ...
OCaml
hhvm/hphp/hack/src/client/ide_service/clientIdeMessage.ml
(* * 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. * *) open Hh_prelude module Initialize_from_saved_state = struct type t = { root: Path.t; naming_table_load_in...
OCaml
hhvm/hphp/hack/src/client/ide_service/clientIdeService.ml
(* * 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. * *) open Hh_prelude module Status = struct type t = | Initializing | Processing_files of ClientIdeMessage.Pro...
OCaml Interface
hhvm/hphp/hack/src/client/ide_service/clientIdeService.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. * *) (** Provides IDE services in the client, without an instance of hh_server running. Basic approach: we load the nami...
OCaml
hhvm/hphp/hack/src/client/ide_service/clientIdeUtils.ml
(* * 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. * *) open Hh_prelude type error = { category: string; data: Hh_json.json; } let make_error_internal ~(category ...
OCaml Interface
hhvm/hphp/hack/src/client/ide_service/clientIdeUtils.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. * *) (** for when we encountered an internal bugs and we want to write to the logfile, and optionally also record telemet...
hhvm/hphp/hack/src/client/ide_service/dune
(library (name client_ide_service) (wrapped false) (modules clientIdeDaemon clientIdeIncremental clientIdeInit clientIdeService) (libraries client_ide_message client_ide_utils folly_stubs lwt lsp package_config package_info rust_batch_index_ffi server server_autocomplete_services server_env ...
Rust
hhvm/hphp/hack/src/client/ide_service/rust_batch_index_ffi.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::io; use std::path::Path; use std::path::PathBuf; use anyhow::Result; use bumpalo::Bump; use ocamlrep_ocamlpool::ocaml_ffi; u...
TOML
hhvm/hphp/hack/src/client/ide_service/cargo/rust_batch_index_ffi/Cargo.toml
# @generated by autocargo [package] name = "rust_batch_index_ffi" version = "0.0.0" edition = "2021" [lib] path = "../../rust_batch_index_ffi.rs" test = false doctest = false crate-type = ["lib", "staticlib"] [dependencies] anyhow = "1.0.71" bumpalo = { version = "3.11.1", features = ["collections"] } direct_decl_pa...
hhvm/hphp/hack/src/client/rage/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/common/common.ml
module List = struct include Core.List let unzip4 xyzws = let rec aux ((xs, ys, zs, ws) as acc) = function | (x, y, z, w) :: rest -> aux (x :: xs, y :: ys, z :: zs, w :: ws) rest | _ -> acc in aux ([], [], [], []) (List.rev xyzws) let rec fold_left_env env l ~init ~f = match l with ...
OCaml
hhvm/hphp/hack/src/count_imprecise_types/count_imprecise_types.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. * *) open Hh_prelude module JSON = Hh_json type result = { mixed_count: int; nonnull_count: int; dynamic_count: int; } le...
OCaml Interface
hhvm/hphp/hack/src/count_imprecise_types/count_imprecise_types.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. * *) type result (** Counts the number of mixed, dynamic, and types occurring in functions and methods. *) val count : Provi...
hhvm/hphp/hack/src/count_imprecise_types/dune
(library (name count_imprecise_types) (wrapped false) (modules count_imprecise_types) (libraries tast_env typing_defs utils_core))
OCaml
hhvm/hphp/hack/src/custom_error/custom_error.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. * *) type versioned_patt_error = Error_v1 of Patt_error.t [@@deriving eq, show] type versioned_error_message = Message_v1 of Err...