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.
10 module Env
= Typing_env
14 (* Non-side-effecting test for subtypes.
15 result = true implies ty1 <: ty2
16 result = false implies NOT ty1 <: ty2 OR we don't know
18 val is_sub_type
: env
-> locl_ty
-> locl_ty
-> bool
20 val non_null
: env
-> Pos.t
-> locl_ty
-> env
* locl_ty
22 (* Force solve all remaining unsolved type variables *)
23 val solve_all_unsolved_tyvars
: env
-> Errors.typing_error_callback
-> env
25 val expand_type_and_solve
:
28 description_of_expected
:string ->
31 Errors.typing_error_callback
->
34 val expand_type_and_solve_eq
:
35 env
-> locl_ty
-> Errors.typing_error_callback
-> env
* locl_ty
37 val expand_type_and_narrow
:
40 description_of_expected
:string ->
41 (env
-> locl_ty
-> env
* locl_ty
option) ->
44 Errors.typing_error_callback
->
47 val solve_to_equal_bound_or_wrt_variance
:
48 env
-> Reason.t
-> int -> Errors.typing_error_callback
-> env
50 val close_tyvars_and_solve
: env
-> Errors.typing_error_callback
-> env
52 val solve_all_unsolved_tyvars_gi
:
53 env
-> (Ident.t
-> Errors.typing_error_callback
) -> env
55 val bind
: env
-> Ident.t
-> locl_ty
-> env
57 val try_bind_to_equal_bound
: env
-> Ident.t
-> env