Pretty print capabilities in generic subtyping errors
[hiphop-php.git] / hphp / hack / src / typing / typing_xhp.mli
blobf0affd21c236f6d234f9594aa456ca1ad0101fd3
1 (*
2 * Copyright (c) 2017, Facebook, Inc.
3 * All rights reserved.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
8 *)
10 open Typing_env_types
12 (**
13 * This is used in computing all possible attributes for XHP spreads.
15 * Given a type `cty` that should represent an XHP instance, gather all the
16 * XHP attributes and their localized types to verify compatibility with the
17 * XHP onto which we are spreading.
19 val get_spread_attributes :
20 env ->
21 Pos.t ->
22 Decl_provider.class_decl ->
23 Typing_defs.locl_ty ->
24 env * (Aast.pstring * (Pos.t * Typing_defs.locl_ty)) list
26 (**
27 * Verify that an XHP body expression is legal.
29 val is_xhp_child : env -> Pos.t -> Typing_defs.locl_ty -> bool