language stringlengths 0 24 | filename stringlengths 9 214 | code stringlengths 99 9.93M |
|---|---|---|
Rust | hhvm/hphp/hack/src/naming/elab_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 oxidized::ast;
use oxidized::naming_phase_error::NamingPhaseError;
use oxidized::nast;
use oxidized::typechecker_options::Typechec... |
OCaml | hhvm/hphp/hack/src/naming/name_context.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 t =
| FunctionNamespace
| ConstantNamespace
| ModuleNamespace
| PackageNamespace
| TypeNamespace (** Classes, i... |
OCaml | hhvm/hphp/hack/src/naming/naming.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 "naming" a program.
*
* The naming phase consists in several things
* 1- get all the global names
* 2... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming.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 "naming" a program.
* Transform all the local names into a unique identifier
*)
val program : Provider... |
OCaml | hhvm/hphp/hack/src/naming/naming_ast_print.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.
*
*)
let pp_unit fmt () = Format.pp_print_string fmt "()"
let print_nast_internal pp_ex nast =
let pp_unit fmt () = Format.pp_pr... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_ast_print.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 print_nast : Nast.program -> unit
val print_nast_without_position : Nast.program -> unit |
OCaml | hhvm/hphp/hack/src/naming/naming_attributes.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 Aast
let mem x xs =
List.exists xs ~f:(fun { ua_name; _ } -> String.equal x (snd ua_name))
... |
Rust | hhvm/hphp/hack/src/naming/naming_attributes.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 oxidized::ast::*;
pub fn mem(x: &str, xs: &[UserAttribute]) -> bool {
xs.iter().any(|ua| ua.name.1 == x)
} |
OCaml | hhvm/hphp/hack/src/naming/naming_attributes_params.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 SN = Naming_special_names
(* TODO: generalize the arity check / argument check here to handle attribut... |
OCaml | hhvm/hphp/hack/src/naming/naming_captures.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 vars = {
bound: Pos.t Local_id.Map.t;
free: Pos.t Local_id.Map.t;
}
let empty = { bound = Local_id.... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_captures.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 populate_fun_def : Nast.fun_def -> Nast.fun_def
val populate_class_ : Nast.class_ -> Nast.class_
val elab_typedef : (uni... |
OCaml | hhvm/hphp/hack/src/naming/naming_elaborate_namespaces_endo.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.
*
*)
(**
* AAST visitor that elaborates the names in bodies
* call_some_function($args);
* ->
* \CurrentNamespace\Curre... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elaborate_namespaces_endo.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.
*
*)
val elaborate_program : (unit, unit) Aast.program -> Nast.program
val elaborate_fun_def : (unit, unit) Aast.fun_def -> Nast... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_as_expr.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 Err = Naming_phase_error
let elab_value = function
| (annot, pos, Aast.Id _) ->
let err = Err.n... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_as_expr.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.
*
*)
val pass :
(Naming_phase_error.t -> unit) -> Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_block.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 rec concat_blocks stmts =
match stmts with
| [] -> []
| (_, Aast.Block b) :: rest -> concat_block... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_block.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.
*
*)
val pass : Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_call.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 SN = Naming_special_names
module Env = struct
let in_class t Aast.{ c_name; c_kind; c_final; _ } =
... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_call.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.
*
*)
val top_down_pass : Naming_phase_env.t Naming_phase_pass.t
val bottom_up_pass :
(Naming_phase_error.t -> unit) -> Naming_... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_class_id.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 Err = Naming_phase_error
module SN = Naming_special_names
module Env = struct
let set_in_class t ~i... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_class_id.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.
*
*)
val pass :
(Naming_phase_error.t -> unit) -> Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_class_members.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.
*
*)
(*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in th... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_class_members.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.
*
*)
val pass :
(Naming_phase_error.t -> unit) -> Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_collection.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 Err = Naming_phase_error
module SN = Naming_special_names
let afield_value cname afield =
match afi... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_collection.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.
*
*)
val pass :
(Naming_phase_error.t -> unit) -> Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_const_expr.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 Err = Naming_phase_error
module SN = Naming_special_names
module Env = struct
let in_mode
Nam... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_const_expr.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.
*
*)
val top_down_pass :
(Naming_phase_error.t -> unit) -> Naming_phase_env.t Naming_phase_pass.t
val bottom_up_pass :
(Nami... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_defs.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
(* TODO[mjt] - this will only remove top-level definititions so,
for instance, we can't guarantee that `... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_defs.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.
*
*)
val pass : Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_dynamic_class_name.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 Err = Naming_phase_error
module SN = Naming_special_names
let is_dynamic = function
| Aast.(
... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_dynamic_class_name.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.
*
*)
val pass :
(Naming_phase_error.t -> unit) -> Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_enum_class.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 SN = Naming_special_names
module Err = Naming_phase_error
module Env = struct
let is_systemlib Nami... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_enum_class.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.
*
*)
val pass :
(Naming_phase_error.t -> unit) -> Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_everything_sdt.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 SN = Naming_special_names
module Env = struct
let in_is_as
Naming_phase_env.
{ elab_e... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_everything_sdt.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 elaboration pass will:
- pessimise return types; and
- add `SupportDyn` attributes to classes; and
- add up... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_func_body.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.
*
*)
(*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in th... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_func_body.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.
*
*)
(* Removes all statements from the `func_body` of `method_`s and `fun_`s. This
pass is intended for use with .hhi files *... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_haccess_hint.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 Err = Naming_phase_error
module SN = Naming_special_names
module Env = struct
let in_class t Aast.{... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_haccess_hint.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.
*
*)
(* Validates the hint at the root of a type access replacing it with `Herr` and
raising an error if it is invalid *)
val ... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_happly_hint.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 Common
module Err = Naming_phase_error
module SN = Naming_special_names
module Env = struct
let tpara... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_happly_hint.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.
*
*)
(* Elaborates `Happly` hints received from the lowerer to their canonical representation *)
val pass :
(Naming_phase_error... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_hkt.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 Err = Naming_phase_error
module Env = struct
let hkt_enabled Naming_phase_env.{ hkt_enabled; _ } = ... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_hkt.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 combined elaboration and validation pass will remove the type arguments
to `Habstr(_,_)` and raise an error
... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_import.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 on_expr expr ~ctx =
match expr with
| (_, _, Aast.Import _) -> (ctx, Error (Naming_phase_error.invalid_expr expr))
... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_import.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.
*
*)
val pass : Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_invariant.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 Err = Naming_phase_error
module SN = Naming_special_names
let on_stmt on_error stmt ~ctx =
let res ... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_invariant.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.
*
*)
(* invariant is subject to a source-code transform in the HHVM
* runtime: the arguments to invariant are lazily evaluated o... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_lvar.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 SN = Naming_special_names
let on_expr_ expr_ ~ctx =
let expr_ =
match expr_ with
| Aast.Lvar (pos, local_id... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_lvar.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.
*
*)
(* Elaborates `$$`, `$this` and `$_` to `Dollardollar`, `This` and
`Lplaceholder` *)
val pass : Naming_phase_env.t Naming... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_retonly_hint.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 Env = struct
let allow_retonly
Naming_phase_env.
{ elab_retonly_hint = Elab_retonly_h... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_retonly_hint.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.
*
*)
val pass :
(Naming_phase_error.t -> unit) -> Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_shape_field_name.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 SN = Naming_special_names
module Env = struct
let in_class t Aast.{ c_name; c_kind; c_final; _ } =
... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_shape_field_name.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.
*
*)
(* We permit class constants to be used as shape field names. Here we replace
uses of `self` with the class to which they... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_soft.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 Env = struct
let soft_as_like Naming_phase_env.{ soft_as_like; _ } = soft_as_like
end
let on_hint hint ~ctx =
ma... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_soft.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 elaboration pass will replace Hsoft(_)` hints, with either
- the inner hint to which the constructor is applied; ... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_this_hint.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 SN = Naming_special_names
module Env = struct
let forbid_this
Naming_phase_env.{ elab_this_h... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_this_hint.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 combined elaboration and validation pass will:
- Canonicalise `Happly(...)` hints coming from the lowerer
- Can... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_tuple.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 Err = Naming_phase_error
let on_expr on_error expr ~ctx =
match expr with
| (_, pos, Aast.Tuple [... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_tuple.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 combined elaboration and validation pass will replace empty tuples with
the `invalid_expr_` and raise an error
*)
... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_user_attributes.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
let on_user_attributes on_error us ~ctx =
(* Complain on duplicates, e.g. <<Foo, Bar, Foo>>. *)
... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_user_attributes.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 combined elaboration and validation pass will deduplicate user attributes
and raise errors for each duplicate
*)
... |
OCaml | hhvm/hphp/hack/src/naming/naming_elab_wildcard_hint.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 Env = struct
let incr_tp_depth t =
let elab_wildcard_hint = t.Naming_phase_env.elab_wildcard_hi... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_elab_wildcard_hint.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.
*
*)
val pass :
(Naming_phase_error.t -> unit) -> Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_error.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 Error_code = Error_codes.Naming
type visibility =
| Vprivate
| Vpublic
| Vinternal
| Vprotected... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_error.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.
*
*)
module Error_code : sig
type t
end
type visibility =
| Vprivate
| Vpublic
| Vinternal
| Vprotected
type return_onl... |
OCaml | hhvm/hphp/hack/src/naming/naming_global.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 "naming" a program.
*
* The naming phase consists in several things
* 1- get all the global names
* 2... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_global.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.
*
*)
(** GEnv is solely a set of thin wrappers around Naming_provider. *)
module GEnv : sig
val get_fun_full_pos :
... |
OCaml | hhvm/hphp/hack/src/naming/naming_guard_invalid.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 on_expr_ expr_ ~ctx =
match expr_ with
| Aast.Invalid _ -> (ctx, Error expr_)
| _ -> (ctx, Ok expr_)
let pass =
... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_guard_invalid.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.
*
*)
val pass : Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_heap.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 blocked_entry = Blocked
(** Gets an entry from shared memory, or falls back to SQLite if necessary. If ... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_heap.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.
*
*)
(** Naming_heap is an internal implementation detail of Naming_provider
used for the shared-mem backend. Its job is to (1) sto... |
OCaml | hhvm/hphp/hack/src/naming/naming_phase_env.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 Elab_happly_hint = struct
type t = { tparams: SSet.t }
let empty = { tparams = SSet.empty }
end
module Elab_fun... |
OCaml | hhvm/hphp/hack/src/naming/naming_phase_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.
*
*)
open Hh_prelude
exception UnexpectedExpr of Pos.t
type experimental_feature =
| Like_type of Pos.t
| Supportdyn of Pos.... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_phase_error.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 t
type agg
exception UnexpectedExpr of Pos.t
val naming : Naming_error.t -> t
val parsing : Parsing_error.t -> t
v... |
OCaml | hhvm/hphp/hack/src/naming/naming_phase_pass.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 Common
type 'ctx t =
| Top_down of 'ctx Aast_defs.Pass.t
| Bottom_up of 'ctx Aast_defs.Pass.t
let combine ts =
l... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_phase_pass.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 Aast
type 'ctx t
val top_down : 'ctx Aast_defs.Pass.t -> 'ctx t
val bottom_up : 'ctx Aast_defs.Pass.t -> 'ctx t
val... |
OCaml | hhvm/hphp/hack/src/naming/naming_special_names.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 consisting of the special names known to the typechecker *)
module Classes = struct
l... |
Rust | hhvm/hphp/hack/src/naming/naming_special_names.rs | /*
* 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 consisting of the special names known to the typechecker */
pub mod classes {
pub const PARENT: &str... |
Rust | hhvm/hphp/hack/src/naming/naming_special_names_ffi_cbindgen.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.
/// This definition exists for ffi_cbindgen C++ header generation. Any
/// attempt to call this function will result in an intentional
/... |
OCaml | hhvm/hphp/hack/src/naming/naming_sqlite.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 Sqlite_utils
type db_path = Db_path of string [@@deriving eq, show]
type insertion_error = {
canon_ha... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_sqlite.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 db_path = Db_path of string [@@deriving show]
type insertion_error = {
canon_hash: Int64.t;
hash: Int64.t;
name_ki... |
OCaml | hhvm/hphp/hack/src/naming/naming_table.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's talk about naming tables! |
+----------... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_table.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 module holds all the operations that can be performed on forward and
* reverse naming tables. Forward n... |
OCaml | hhvm/hphp/hack/src/naming/naming_typed_locals.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 Map = Local_id.Map
module Set = Local_id.Set
type typed_local_env = {
locals: Pos.t Map.... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_typed_locals.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.
*
*)
val elab_fun_def : (unit, unit) Aast.fun_def -> (unit, unit) Aast.fun_def
val elab_class : (unit, unit) Aast.class_ -> (uni... |
OCaml | hhvm/hphp/hack/src/naming/naming_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.
*
*)
type kind_of_type =
| TClass
| TTypedef
[@@deriving show, eq]
type name_kind =
| Type_kind of kind_of_type
| Fun_kind... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_types.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.
*
*)
(** In the naming table, global constants and global functions can be
syntactically disambiguated at their use-site, and there... |
OCaml | hhvm/hphp/hack/src/naming/naming_validate_cast_expr.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 SN = Naming_special_names
let on_expr_ on_error expr_ ~ctx =
let err_opt =
match expr_ with
... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_validate_cast_expr.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.
*
*)
(* Ensures that the hint inside a `Cast` expression is valid *)
val pass :
(Naming_phase_error.t -> unit) -> Naming_phase_... |
OCaml | hhvm/hphp/hack/src/naming/naming_validate_class_req.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 on_class_ on_error (Aast.{ c_reqs; c_kind; _ } as c) ~ctx =
let (c_req_extends, c_req_implements, c_re... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_validate_class_req.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.
*
*)
val pass :
(Naming_phase_error.t -> unit) -> Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_validate_consistent_construct.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 SN = Naming_special_names
module Env = struct
let consistent_ctor_level Naming_phase_env.{ consiste... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_validate_consistent_construct.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.
*
*)
val pass :
(Naming_phase_error.t -> unit) -> Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_validate_dynamic_hint.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 on_expr_ on_error expr_ ~ctx =
let err_opt =
match expr_ with
| Aast.(Is (_, (pos, Hdynamic)))... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_validate_dynamic_hint.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.
*
*)
(* Ensures that the hint inside an `Is` expression isn't just `dynamic` *)
val pass :
(Naming_phase_error.t -> unit) -> Na... |
OCaml | hhvm/hphp/hack/src/naming/naming_validate_fun_params.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 Err = Naming_phase_error
module SN = Naming_special_names
let validate_fun_params params =
snd
@@... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_validate_fun_params.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.
*
*)
val pass :
(Naming_phase_error.t -> unit) -> Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_validate_like_hint.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 Env = struct
let like_type_hints_enabled Naming_phase_env.{ like_type_hints_enabled; _ } =
like... |
OCaml Interface | hhvm/hphp/hack/src/naming/naming_validate_like_hint.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.
*
*)
val pass :
(Naming_phase_error.t -> unit) -> Naming_phase_env.t Naming_phase_pass.t |
OCaml | hhvm/hphp/hack/src/naming/naming_validate_module.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 Err = Naming_phase_error
module Env = struct
let allow_module_def Naming_phase_env.{ allow_module_d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.