From 7ff2cd12f8de07fc8bb29540cc0481da9b08e578 Mon Sep 17 00:00:00 2001 From: Sam Zhou Date: Thu, 21 Mar 2024 10:29:48 -0700 Subject: [PATCH] [flow][EZ] Add func_params.mli Summary: Changelog: [internal] Reviewed By: panagosg7 Differential Revision: D55165685 fbshipit-source-id: d8ed83ae7031b995e020f47f94ac0ee093c36782 --- src/typing/class_sig.ml | 4 ++-- src/typing/class_sig.mli | 4 ++-- src/typing/func_params.mli | 12 ++++++++++++ src/typing/func_sig.ml | 4 ++-- src/typing/func_sig.mli | 4 ++-- src/typing/func_sig_intf.ml | 3 ++- src/typing/statement_sig.ml | 2 +- 7 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 src/typing/func_params.mli diff --git a/src/typing/class_sig.ml b/src/typing/class_sig.ml index 737bc414439..f295f04246b 100644 --- a/src/typing/class_sig.ml +++ b/src/typing/class_sig.ml @@ -13,8 +13,8 @@ include Class_sig_intf module Make (ConsGen : Type_annotation_sig.ConsGen) (CT : Func_class_sig_types.Config.S) - (C : Func_params.Config with module Types := CT) - (P : Func_params.S with module Config_types := CT and module Config := C) + (C : Func_params_intf.Config with module Types := CT) + (P : Func_params_intf.S with module Config_types := CT and module Config := C) (F : Func_sig_intf.S with module Config_types := CT and module Config := C and module Param := P) (T : Func_class_sig_types.Class.S with module Config := CT diff --git a/src/typing/class_sig.mli b/src/typing/class_sig.mli index fa0b10e8af5..4accb9c3a65 100644 --- a/src/typing/class_sig.mli +++ b/src/typing/class_sig.mli @@ -10,8 +10,8 @@ include module type of Class_sig_intf module Make (_ : Type_annotation_sig.ConsGen) (CT : Func_class_sig_types.Config.S) - (C : Func_params.Config with module Types := CT) - (P : Func_params.S with module Config_types := CT and module Config := C) + (C : Func_params_intf.Config with module Types := CT) + (P : Func_params_intf.S with module Config_types := CT and module Config := C) (F : Func_sig_intf.S with module Config_types := CT and module Config := C and module Param := P) (T : Func_class_sig_types.Class.S with module Config := CT diff --git a/src/typing/func_params.mli b/src/typing/func_params.mli new file mode 100644 index 00000000000..f8269b5aadc --- /dev/null +++ b/src/typing/func_params.mli @@ -0,0 +1,12 @@ +(* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +module Make + (CT : Func_class_sig_types.Config.S) + (C : Func_params_intf.Config with module Types := CT) + (T : Func_class_sig_types.Param.S with module Config := CT) : + Func_params_intf.S with module Config_types := CT and module Config := C and module Types = T diff --git a/src/typing/func_sig.ml b/src/typing/func_sig.ml index 6cf056a4e29..a624bdd92e5 100644 --- a/src/typing/func_sig.ml +++ b/src/typing/func_sig.ml @@ -193,8 +193,8 @@ class func_scope_visitor module Make (Statement : Statement_sig.S) (CT : Func_class_sig_types.Config.S) - (C : Func_params.Config with module Types := CT) - (F : Func_params.S with module Config_types := CT and module Config := C) + (C : Func_params_intf.Config with module Types := CT) + (F : Func_params_intf.S with module Config_types := CT and module Config := C) (T : Func_class_sig_types.Func.S with module Config := CT and module Param := F.Types) : S with module Config_types := CT and module Config := C and module Param := F and module Types = T = struct diff --git a/src/typing/func_sig.mli b/src/typing/func_sig.mli index 2af43bc38ff..9ecfe9f1872 100644 --- a/src/typing/func_sig.mli +++ b/src/typing/func_sig.mli @@ -10,8 +10,8 @@ include module type of Func_sig_intf module Make (_ : Statement_sig.S) (CT : Func_class_sig_types.Config.S) - (C : Func_params.Config with module Types := CT) - (F : Func_params.S with module Config_types := CT and module Config := C) + (C : Func_params_intf.Config with module Types := CT) + (F : Func_params_intf.S with module Config_types := CT and module Config := C) (T : Func_class_sig_types.Func.S with module Config := CT and module Param := F.Types) : S with module Config_types := CT and module Config := C and module Param := F and module Types = T diff --git a/src/typing/func_sig_intf.ml b/src/typing/func_sig_intf.ml index ebdaa8775d0..90c242628a0 100644 --- a/src/typing/func_sig_intf.ml +++ b/src/typing/func_sig_intf.ml @@ -10,7 +10,8 @@ module type S = sig module Config : Func_params_intf.Config with module Types := Config_types - module Param : Func_params.S with module Config_types := Config_types and module Config := Config + module Param : + Func_params_intf.S with module Config_types := Config_types and module Config := Config module Types : Func_class_sig_types.Func.S with module Config := Config_types and module Param := Param.Types diff --git a/src/typing/statement_sig.ml b/src/typing/statement_sig.ml index e098a0e8697..16e870c7b98 100644 --- a/src/typing/statement_sig.ml +++ b/src/typing/statement_sig.ml @@ -14,7 +14,7 @@ module type S = sig module Func_stmt_config : Func_stmt_config_sig.S with module Types := Func_stmt_config_types.Types module Func_stmt_params : - Func_params.S + Func_params_intf.S with module Config_types := Func_stmt_config_types.Types and module Config := Func_stmt_config and module Types = Func_stmt_params_types