2 * Copyright (c) 2015, Facebook, Inc.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
11 module TySet
= Typing_set
14 (* Local environment includes types of locals and bounds on type parameters. *)
16 per_cont_env
: Typing_per_cont_env.t
;
17 local_mutability
: Typing_mutability_env.mutability_env
;
18 local_reactive
: reactivity
;
19 (* Local variables that were assigned in a `using` clause *)
20 local_using_vars
: Local_id.Set.t
;
25 eager_solve_fail
: bool;
26 appears_covariantly
: bool;
27 appears_contravariantly
: bool;
28 lower_bounds
: TySet.t
;
29 upper_bounds
: TySet.t
;
30 type_constants
: (Aast.sid
* locl ty
) SMap.t
;
32 type tvenv
= tyvar_info
IMap.t
35 (* position of the function/method being checked *)
37 tenv
: locl ty
IMap.t
;
39 fresh_typarams
: SSet.t
;
42 decl_env
: Decl_env.env
;
46 inside_constructor
: bool;
47 inside_ppl_class
: bool;
48 (* A set of constraints that are global to a given method *)
49 global_tpenv
: Type_parameter_env.t
;
50 subtype_prop
: Typing_logic.subtype_prop
;
51 log_levels
: int SMap.t
;
53 tyvars_stack
: (Pos.t
* Ident.t list
) list
;
54 allow_wildcards
: bool;
55 big_envs
: (Pos.t
* env
) list
ref ;
59 tcopt
: TypecheckerOptions.t
;
60 return
: Typing_env_return_info.t
;
61 (* For each function parameter, its type and calling convention. *)
62 params
: (locl ty
* param_mode
) Local_id.Map.t
;
63 (* condition types associated with parameters.
64 For every mayberx parameter that has condition type we create
65 fresh type parameter (see: make_local_param_ty) and store mapping
66 fresh type name -> condition type in env so it can be retrieved later *)
67 condition_types
: decl ty
SMap.t
;
70 (* Identifier of the enclosing class *)
72 (* Type of the enclosing class, instantiated at its generic parameters *)
75 fun_kind
: Ast_defs.fun_kind
;
76 val_kind
: Typing_defs.val_kind
;
77 fun_mutable
: param_mutability
option;
79 file
: Relative_path.t
;
82 (* A type-checker for an anonymous function
85 * - types of the parameters under which the body should be checked
86 * - the arity of the function
87 * - the expected return type of the body (optional)
89 and anon_log
= locl ty list
* locl ty list
92 is_coroutine
: Aast.is_coroutine
;
93 counter
: anon_log
ref;
101 env
* Tast.expr
* locl ty
;