language
stringlengths
0
24
filename
stringlengths
9
214
code
stringlengths
99
9.93M
OCaml
hhvm/hphp/hack/src/hh_oxidize/rust_type.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 open Utils type lifetime = string let lifetime x = x type t = | Var of string | Ref of (lifetime * t) | Type...
OCaml Interface
hhvm/hphp/hack/src/hh_oxidize/rust_type.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 lifetime val lifetime : string -> lifetime type t val rust_ref : lifetime -> t -> t val rust_type : string -> lifetim...
OCaml
hhvm/hphp/hack/src/hh_oxidize/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. * *) open Core let curr_module_name_ref = ref None let curr_module_name () = Option.value_exn !curr_module_name_ref let with_mod...
OCaml Interface
hhvm/hphp/hack/src/hh_oxidize/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. * *) (** The name of the module currently being converted. *) val curr_module_name : unit -> string (** Run the given function in ...
OCaml
hhvm/hphp/hack/src/hh_oxidize/stringify.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 open Reordered_argument_collections open Oxidized_module let stringify m = let { extern_uses; glob_uses; aliases;...
OCaml
hhvm/hphp/hack/src/hh_oxidize/utils.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 open Reordered_argument_collections module Unix = Caml_unix (** HACK: Raised when we encounter a construct in a typ...
OCaml
hhvm/hphp/hack/src/hh_quickfix_lint/hh_quickfix_lint.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 patch = { path: string; start_offset: int; line: int; column: int; wid...
OCaml Interface
hhvm/hphp/hack/src/hh_quickfix_lint/hh_quickfix_lint.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 interface file is for a module containing an executable with no public facing API. It is used for documentation a...
hhvm/hphp/hack/src/hips/dune
(library (name hips) (wrapped false) (flags (:standard -linkall)) (modules hips_solver hips_types) (libraries core_kernel ast) (preprocess (pps visitors.ppx ppx_deriving.std)) )
OCaml
hhvm/hphp/hack/src/hips/hips_solver.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 open Hips_types module Inter (I : Intra) = struct open Hips_types type inter_constraint = I.inter_cons...
OCaml Interface
hhvm/hphp/hack/src/hips/hips_solver.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. * *) open Hips_types (** Generates an inter-procedural constraint solver from domain-specific intra-procedural data. *) modu...
OCaml
hhvm/hphp/hack/src/hips/hips_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. * *) module A = Ast_defs type const_entity = A.id [@@deriving ord, show] type constant_identifier_entity = { ident_pos: A.pos...
OCaml Interface
hhvm/hphp/hack/src/hips/hips_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. * *) module A = Ast_defs type const_entity = A.id [@@deriving ord, show] type constant_identifier_entity = { ident_pos: A.pos...
hhvm/hphp/hack/src/hips2/dune
(library (name hips2) (wrapped true) ; only hips2.mli is visible (flags (:standard -linkall)) (libraries core_kernel utils_core sys_utils) (preprocess (pps visitors.ppx ppx_deriving.std ppx_hash ppx_sexp_conv)))
OCaml
hhvm/hphp/hack/src/hips2/hips2.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 Store = Hips2_store include Hips2_intf let hashset_size = 0 let hashtbl_size = 0 module Make (Intra...
OCaml Interface
hhvm/hphp/hack/src/hips2/hips2.mli
include module type of Hips2_intf module Make (Intra : Intra) : T with type intra_constraint_ = Intra.constraint_ and type custom_inter_constraint_ = Intra.custom_inter_constraint_
OCaml
hhvm/hphp/hack/src/hips2/hips2_intf.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 type Intra = sig type constraint_ [@@deriving eq, hash, show] type custom_inter_constraint_ [@@d...
OCaml
hhvm/hphp/hack/src/hips2/hips2_store.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 marshal_flags = [] let suffix = ".hips2" let persist ~db_dir ~worker_id t = Sys_utils.mkdir_p db_dir...
OCaml Interface
hhvm/hphp/hack/src/hips2/hips2_store.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. * *) open Hh_prelude val persist : db_dir:string -> worker_id:int -> 'a -> unit val un_persist : db_dir:string -> 'a Sequence.t
hhvm/hphp/hack/src/ide_rpc/dune
(library (name ide_rpc_api_types) (wrapped false) (modules ide_api_types) (preprocess (pps ppx_deriving.std)) (libraries core_kernel file_content pos)) (library (name nuclide_rpc_message_printer) (wrapped false) (modules nuclide_rpc_message_printer) (preprocess (pps ppx_deriving.std)) (libraries ide_rpc_...
OCaml
hhvm/hphp/hack/src/ide_rpc/ide_api_types.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 (* 1-based position is used here *) type position = { line: int; column: int; } [@@deriving sho...
OCaml
hhvm/hphp/hack/src/ide_rpc/nuclide_rpc_message_printer.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 open Hh_json let opt_field ~v_opt ~label ~f = Option.value_map v_opt ~f:(fun x -> [(label, f x)]) ...
hhvm/hphp/hack/src/ifc/dune
(include_subdirs unqualified) (library (name ifc) (wrapped false) (flags (:standard -linkall)) (modules ifc_main) (libraries core_kernel decl_provider full_fidelity global_options heap_global_storage hhi ifc_lib naming_global naming_special_names nast provider_context aast_names_utils ...
OCaml
hhvm/hphp/hack/src/ifc/ifc.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 Common open Ifc_types module Decl = Ifc_decl module Env = Ifc_env module Logic = Ifc_logic modu...
OCaml Interface
hhvm/hphp/hack/src/ifc/ifc.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 should_print : user_mode:Ifc_types.mode -> phase:Ifc_types.mode -> bool val check : Ifc_types.options -> Tast.def list ->...
OCaml
hhvm/hphp/hack/src/ifc/ifc_decl.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 open Common open Ifc_types module Env = Ifc_env module Logic = Ifc_logic module Mapper = Ifc_mapper module Lat...
OCaml
hhvm/hphp/hack/src/ifc/ifc_env.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 open Ifc_types module Utils = Ifc_utils module K = Typing_cont_key (* See ifc_env.mli for the docmentation *)...
OCaml Interface
hhvm/hphp/hack/src/ifc/ifc_env.mli
open Ifc_types (* - Read-only environments (renv) - *) (* Creates a read-only environment sufficient to call functions from ifc_lift.ml *) val new_renv : Ifc_scope.t -> decl_env -> Tast.saved_env -> Provider_context.t -> proto_renv (* Prepares a read-only environment to type-check a function *) val prep_renv : ...
OCaml
hhvm/hphp/hack/src/ifc/ifc_lift.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 Ifc_types module Decl = Ifc_decl module Env = Ifc_env module T = Typing_defs module TClass = De...
OCaml
hhvm/hphp/hack/src/ifc/ifc_logic.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 open Ifc_utils open Ifc_types module IMap = Int.Map module Mapper = Ifc_mapper (* A note on the lattice. Poli...
OCaml
hhvm/hphp/hack/src/ifc/ifc_main.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 Ifc_types let do_ opts files_info ctx = (if Ifc.should_print ~user_mode:opts.opt_mode ~phase...
OCaml
hhvm/hphp/hack/src/ifc/ifc_mapper.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 Ifc_types (* Shallow mappers *) let rec ptype fty fpol = function | Tnull pol -> Tnull (fpo...
OCaml
hhvm/hphp/hack/src/ifc/ifc_options.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 open Ifc_types module Lattice = Ifc_security_lattice exception Invalid_ifc_mode of string let parse_mode_exn...
OCaml
hhvm/hphp/hack/src/ifc/ifc_pretty.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 open Format open Ifc_types module Env = Ifc_env module Logic = Ifc_logic module Utils = Ifc_utils module T = T...
OCaml
hhvm/hphp/hack/src/ifc/ifc_scope.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 t = int let pp fmt n = Format.fprintf fmt "<scope%d>" n let compare = Int.compare let equal = Int.equ...
OCaml Interface
hhvm/hphp/hack/src/ifc/ifc_scope.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 pp : Format.formatter -> t -> unit val equal : t -> t -> bool val compare : t -> t -> int val alloc : unit -> t
OCaml
hhvm/hphp/hack/src/ifc/ifc_security_lattice.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 Ifc_types (* This file contains code related to the security lattice we use to * check our co...
OCaml
hhvm/hphp/hack/src/ifc/ifc_solver.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 Ifc_types module Logic = Ifc_logic module Mapper = Ifc_mapper module Utils = Ifc_utils module L...
OCaml
hhvm/hphp/hack/src/ifc/ifc_types.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. * *) module KMap = Typing_continuations.Map module LMap = Local_id.Map module Scope = Ifc_scope module Type = Typing_defs type ifc...
OCaml
hhvm/hphp/hack/src/ifc/ifc_utils.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 module A = Aast let identity x = x let rec funpow n ~f ~init = if n <= 0 then init else funpow (...
OCaml Interface
hhvm/hphp/hack/src/injection/injector_config.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. * *) (* This file provides only the interface, so injector configuration * can be retreived without depending on the *ac...
hhvm/hphp/hack/src/libancillary/dune
(library (name libancillary) (wrapped false) (foreign_stubs (language c) (names libancillary-stubs) (flags (:standard -I%{env:CMAKE_SOURCE_DIR=xxx}))) (libraries libancillary_c))
C
hhvm/hphp/hack/src/libancillary/libancillary-stubs.c
/** * 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. * */ #define CAML_NAME_SPACE #include <caml/mlvalues.h> #include <caml/memory.h> #include <caml/alloc.h> #include <caml/...
OCaml
hhvm/hphp/hack/src/libancillary/libancillary.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 int_to_fd (i : int) : Unix.file_descr = Obj.magic i exception Receiving_Fd_Exception of string external ancil_...
OCaml Interface
hhvm/hphp/hack/src/libancillary/libancillary.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. * *) exception Receiving_Fd_Exception of string (** Returns 0 for success, -1 on failure. *) val ancil_send_fd : Unix....
hhvm/hphp/hack/src/lints/dune
(library (name lints_core) (wrapped false) (modules lints_core) (preprocess (pps ppx_deriving.std)) (libraries typing_ast user_error pos)) (library (name linting_main) (wrapped false) (preprocess (pps ppx_deriving.std)) (modules linting_main) (libraries provider_context linting linting_visitors o...
OCaml
hhvm/hphp/hack/src/lints/linter_ast.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 Aast open Hh_prelude let go (ast : Nast.program) = List.iter ast ~f:(function | Stmt (_, Expr (_, p, I...
OCaml
hhvm/hphp/hack/src/lints/linter_async_lambda.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. * *) (** This lint advises users to use `async params ==> await ...` instead of `params ==> ...` when `...` i...
OCaml
hhvm/hphp/hack/src/lints/linter_await_in_loop.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 Linting_visitors open Aast class await_visitor = object (this) inherit [unit] Nast.Visitor_DEPRECATED.vi...
OCaml
hhvm/hphp/hack/src/lints/linter_branches_return_same_value.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 Aast open Hh_prelude (** Lint on functions/methods that always return the same value. This is usually a copy-past...
OCaml
hhvm/hphp/hack/src/lints/linter_cast_non_primitive.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 T = Typing_defs module A = Aast_defs module TUtils = Typing_utils module Env = Tast_env let is_always_castable env t...
OCaml Interface
hhvm/hphp/hack/src/lints/linter_cast_non_primitive.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 linter catches dangerous uses of `(int)`, `(string)`, `(bool)`, and `(float)` casts. These are safe to perform ...
OCaml
hhvm/hphp/hack/src/lints/linter_class_overrides_trait.ml
(* * Copyright (c) 2020, 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 linter warns if a class overrides all instance/static methods and properties of a trait the class uses *)...
OCaml
hhvm/hphp/hack/src/lints/linter_clone.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 Linting_visitors module VisitorFunctor (Parent : BodyVisitorModule) : BodyVisitorModule = struct class visit...
OCaml
hhvm/hphp/hack/src/lints/linter_comparing_booleans.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 as_lvar_and_literal ((_, _, lhs) : Tast.expr) ((_, _, rhs) : Tast.expr) : (string * bool) option = match (lhs, rhs)...
OCaml
hhvm/hphp/hack/src/lints/linter_disjoint_types.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 Common open Aast open Typing_defs module Cls = Decl_provider.Class module Env = Tast_env module SN = Naming_spe...
OCaml
hhvm/hphp/hack/src/lints/linter_duplicate_properties.ml
(* * Copyright (c) 2020, 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 Aast open Typing_defs module Cls = Decl_provider.Class (* efficient check for List.length l > ...
OCaml
hhvm/hphp/hack/src/lints/linter_equality_check.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 Aast open Tast open Ast_defs open Typing_defs module Cls = Decl_provider.Class module Env = Tas...
OCaml
hhvm/hphp/hack/src/lints/linter_expr_tree_types.ml
(* * Copyright (c) 2021, 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 Aast let handler = object inherit Tast_visitor.handler_base (* Require that methods...
OCaml
hhvm/hphp/hack/src/lints/linter_foreach_shadow.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 Linting_visitors open Aast (** Lint on loop or catch variables that shadow local variables. function fo...
OCaml
hhvm/hphp/hack/src/lints/linter_internal_class.ml
(* * Copyright (c) 2023, Meta, 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 Aast module Env = Tast_env module Cls = Decl_provider.Class module SN = Naming_special_names let c...
OCaml
hhvm/hphp/hack/src/lints/linter_invariant_violation.ml
open Linting_visitors open Nast module Nast = Aast type conditionKind = | CKString | CKLiteral of bool | CKUnaryNot of bool | CKUnknown (* checks if condition consists only of literal values and unary not operator *) class condition_visitor = object inherit [conditionKind] Visitor_DEPRECATED.visitor as ...
OCaml
hhvm/hphp/hack/src/lints/linter_is_checks.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 Aast module Env = Tast_env module TUtils = Typing_utils module T = Typing_defs let nothing_ty ...
OCaml
hhvm/hphp/hack/src/lints/linter_loose_unsafe_cast.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 module T = Typing_defs let handler = object inherit Tast_visitor.handler_base method! at_expr env ...
OCaml
hhvm/hphp/hack/src/lints/linter_missing_override_attribute.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 Aast open Typing_defs module Cls = Decl_provider.Class module SN = Naming_special_names let ha...
OCaml
hhvm/hphp/hack/src/lints/linter_nullsafe_not_needed.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. * *) [@@@warning "-33"] open Hh_prelude [@@@warning "+33"] open Aast module Utils = Tast_utils let handler = object...
OCaml
hhvm/hphp/hack/src/lints/linter_of_enums.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 Linting_visitors open Aast let enum_file_visitor = object inherit [unit] abstract_file_visitor val ...
OCaml
hhvm/hphp/hack/src/lints/linter_pointless_booleans.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 which_boolean_literal ((_ty, _pos, expr_) : Tast.expr) = match expr_ with | Aast.True -> Some Aast.True | Aast.Fals...
OCaml
hhvm/hphp/hack/src/lints/linter_redundant_cast.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 T = Typing_defs module A = Aast_defs let handler = object inherit Tast_visitor.handler_base method! at_ex...
OCaml
hhvm/hphp/hack/src/lints/linter_redundant_generics.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 Aast open Typing_defs module Cls = Decl_provider.Class module SN = Naming_special_names let ft...
OCaml
hhvm/hphp/hack/src/lints/linter_sketchy_null_check.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 Ast_defs open Aast open Typing_defs module Env = Tast_env let get_lvar_name = function | Lva...
OCaml
hhvm/hphp/hack/src/lints/linter_switch_check.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 open Aast module Env = Tast_env module Reason = Typing_reason module MakeType = Typing_make_type module SN = N...
OCaml
hhvm/hphp/hack/src/lints/linter_truthiness_test.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 Ast_defs open Aast open Typing_defs module Env = Tast_env module SN = Naming_special_names modu...
OCaml
hhvm/hphp/hack/src/lints/linter_unconditional_recursion.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 Aast open Hh_prelude type method_prop = { method_name: string; class_name: string; pos: Pos.t; } type fun_prop =...
OCaml
hhvm/hphp/hack/src/lints/linter_xhp_attr_value.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 open Aast module Cls = Decl_provider.Class (** If [attr_name] is an enum attribute on [cls], return the lis...
OCaml
hhvm/hphp/hack/src/lints/linting_main.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 Linting_visitors let untyped_linters = [ Linter_clone.go; Linter_foreach_shadow.go; Linter_invariant_viola...
OCaml Interface
hhvm/hphp/hack/src/lints/linting_main.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 lint : Provider_context.t -> Relative_path.t -> string -> unit
OCaml
hhvm/hphp/hack/src/lints/linting_visitors.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 Hashtbl = Stdlib.Hashtbl open Aast open Nast (**********************************************...
OCaml Interface
hhvm/hphp/hack/src/lints/linting_visitors.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 lint_env = { ctx: Provider_context.t; (* The file we are currently in *) cfile: Relative_path.t; (* The...
OCaml
hhvm/hphp/hack/src/lints/lints_codes.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. * *) module Codes = struct (* 5501 - 5541 reserved for FB. *) let deprecated = 5542 (* 5543 - 5548 reserved. *) let incl...
OCaml
hhvm/hphp/hack/src/lints/lints_core.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 (** These severity levels are based on those provided by Arcanist. "Advice" * means notify the user of the li...
OCaml Interface
hhvm/hphp/hack/src/lints/lints_core.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 severity = | Lint_error | Lint_warning | Lint_advice type 'pos t = { code: int; severity: severity; pos: 'po...
OCaml
hhvm/hphp/hack/src/lints/lints_errors.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 module Codes = Lints_codes.Codes open Lints_core module Lints = Lints_core let quickfix ~can_be_captured ~ori...
hhvm/hphp/hack/src/monitor/dune
(library (name server_monitor) (wrapped false) (libraries collections connection_tracker core_kernel exec_command libancillary logging marshal_tools hh_server_monitor messages monitor_rpc process process_types relative_path server_args server_command_types server_files socket sys_...
OCaml
hhvm/hphp/hack/src/monitor/informant.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 type report = | Move_along (** Nothing to see here. *) | Restart_server (** Kill the ser...
OCaml Interface
hhvm/hphp/hack/src/monitor/informant.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 informant collects information to tell the monitor when to intelligently kill and restart the server daemon. ...
OCaml
hhvm/hphp/hack/src/monitor/monitorConnection.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 MonitorUtils let log s ~tracker = Hh_logger.log ("[%s] " ^^ s) (Connection_tracker.log_id tr...
OCaml Interface
hhvm/hphp/hack/src/monitor/monitorConnection.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. * *) val server_exists : string -> bool val connect_once : tracker:Connection_tracker.t -> timeout:int -> terminat...
OCaml
hhvm/hphp/hack/src/monitor/monitorMain.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 server monitor is the parent process for a server. It * listens to a socket for client connections and pa...
OCaml Interface
hhvm/hphp/hack/src/monitor/monitorMain.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 t (** Start a monitor without running the check loop. Useful for testing. *) val start_monitor : current_ver...
OCaml
hhvm/hphp/hack/src/monitor/monitorStart.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. * *) (** * Hack for HipHop: type checker's server monitor code. * * This runs hh server in 1 of 3 ways: 1) Runs hh ...
OCaml Interface
hhvm/hphp/hack/src/monitor/monitorStart.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. * *) val start : unit -> unit
OCaml
hhvm/hphp/hack/src/monitor/monitorUtils.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 monitor_config = { socket_file: string; (** The socket file on which the monitor is li...
OCaml
hhvm/hphp/hack/src/monitor/prehandoff.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 exit_status = { status: Unix.process_status; was_oom: bool; } type msg = (* Last of the prehandoff messa...
OCaml
hhvm/hphp/hack/src/monitor/serverController.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. * *) (** Responsible for starting up a Hack server process. *) type pipe_type = | Default | Priority | Force_dorm...
OCaml Interface
hhvm/hphp/hack/src/monitor/serverController.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 pipe_type = | Default | Priority | Force_dormant_start_only val pipe_type_to_string : pipe_type -> string type se...
OCaml
hhvm/hphp/hack/src/monitor/serverProcess.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 process_data = { pid: int; (** Process ID. *) server_specific_files: ServerCommandTypes.server_specific_fi...
TOML
hhvm/hphp/hack/src/naming/Cargo.toml
# @generated by autocargo [package] name = "naming_special_names_rust" version = "0.0.0" edition = "2021" [lib] path = "naming_special_names.rs" [dependencies] hash = { version = "0.0.0", path = "../utils/hash" } lazy_static = "1.4" serde = { version = "1.0.176", features = ["derive", "rc"] } write_bytes = { version...
hhvm/hphp/hack/src/naming/dune
(library (name naming_special_names) (modules naming_special_names) (libraries collections core_kernel utils_core) (preprocess (pps ppx_deriving.std))) (library (name naming_error) (wrapped false) (modules naming_error name_context) (libraries ast pos pos_or_decl error_codes user_error)) (lib...
Rust
hhvm/hphp/hack/src/naming/elaborate_namespaces_visitor.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. #![feature(box_patterns)] use std::sync::Arc; use core_utils_rust as core_utils; use hash::HashSet; use namespaces_rust as namespaces;...