1 /* Copyright (C) 1995,1996,1997, 2000, 2001, 2006 Free Software Foundation, Inc.
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 /* type predicates and equality predicates */
21 #include "libguile/gh.h"
23 #if SCM_ENABLE_DEPRECATED
25 /* type predicates: tell you if an SCM object has a given type */
27 gh_boolean_p (SCM val
)
29 return (scm_is_true (scm_boolean_p (val
)));
34 return (scm_is_true (scm_symbol_p (val
)));
39 return (scm_is_true (scm_char_p (val
)));
44 return (scm_is_true (scm_vector_p (val
)));
49 return (scm_is_true (scm_pair_p (val
)));
54 return (scm_is_true (scm_number_p (val
)));
59 return (scm_is_true (scm_string_p (val
)));
62 gh_procedure_p (SCM val
)
64 return (scm_is_true (scm_procedure_p (val
)));
69 return (scm_is_true (scm_list_p (val
)));
72 gh_inexact_p (SCM val
)
74 return (scm_is_true (scm_inexact_p (val
)));
79 return (scm_is_true (scm_exact_p (val
)));
82 /* the three types of equality */
84 gh_eq_p (SCM x
, SCM y
)
86 return (scm_is_true (scm_eq_p (x
, y
)));
89 gh_eqv_p (SCM x
, SCM y
)
91 return (scm_is_true (scm_eqv_p (x
, y
)));
94 gh_equal_p (SCM x
, SCM y
)
96 return (scm_is_true (scm_equal_p (x
, y
)));
99 /* equivalent to (string=? ...), but returns 0 or 1 rather than Scheme
102 gh_string_equal_p(SCM s1
, SCM s2
)
104 return (scm_is_true (scm_string_equal_p(s1
, s2
)));
107 /* equivalent to (null? ...), but returns 0 or 1 rather than Scheme
112 return (scm_is_true(scm_null_p(l
)));
115 #endif /* SCM_ENABLE_DEPRECATED */