aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-06-02 09:01:59 +0200
committerBjörn Gustavsson <[email protected]>2010-06-06 10:51:35 +0200
commitc1a21833db8b146700e61dfd56a599f21ba6fd11 (patch)
tree2526fa9cf9f3dc72dac6b264b81a223b45ab05f6
parent5e354ca66996ee03d615dc36c284e94ccf176e89 (diff)
downloadotp-c1a21833db8b146700e61dfd56a599f21ba6fd11.tar.gz
otp-c1a21833db8b146700e61dfd56a599f21ba6fd11.tar.bz2
otp-c1a21833db8b146700e61dfd56a599f21ba6fd11.zip
erl_types: Export is_erl_type/1
It is useful for testing.
-rw-r--r--lib/hipe/cerl/erl_types.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index 758914ff9e..c1d80740a1 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -206,7 +206,8 @@
%% t_assign_variables_to_subtype/2,
type_is_defined/3,
subst_all_vars_to_any/1,
- lift_list_to_pos_empty/1
+ lift_list_to_pos_empty/1,
+ is_erl_type/1
]).
%%-define(DO_ERL_TYPES_TEST, true).
@@ -3776,6 +3777,8 @@ any_none_or_unit([?unit|_]) -> true;
any_none_or_unit([_|Left]) -> any_none_or_unit(Left);
any_none_or_unit([]) -> false.
+-spec is_erl_type(any()) -> boolean().
+
is_erl_type(?any) -> true;
is_erl_type(?none) -> true;
is_erl_type(?unit) -> true;