summaryrefslogtreecommitdiff
path: root/libraries/base/include
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2014-10-11 12:35:28 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2014-10-11 12:35:31 +0200
commit1942fd6a8414d5664f3c9f6d1e6e39ca5265ef21 (patch)
treef73fc001fe036dd4e53210d8d7b3ac1ab85642a8 /libraries/base/include
parent034b2035d6099c8a253bb1fbd1864001a27b44d6 (diff)
downloadhaskell-1942fd6a8414d5664f3c9f6d1e6e39ca5265ef21.tar.gz
Refactor to avoid need for `Unicode.hs-boot`
This avoids the import-cycle caused by the import of `Foreign.C.Types` by using `Int` instead of `CInt` for the Unicode classification functions. This refactoring also allows to remove a couple of `fromIntegral`s. Reviewed By: rwbarton, ekmett Differential Revision: https://phabricator.haskell.org/D328
Diffstat (limited to 'libraries/base/include')
-rw-r--r--libraries/base/include/WCsubst.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/libraries/base/include/WCsubst.h b/libraries/base/include/WCsubst.h
index f2436dd38a..4ad373ace8 100644
--- a/libraries/base/include/WCsubst.h
+++ b/libraries/base/include/WCsubst.h
@@ -3,22 +3,23 @@
#define WCSUBST_INCL
#include <stdlib.h>
+#include "HsFFI.h"
-int u_iswupper(int wc);
-int u_iswdigit(int wc);
-int u_iswalpha(int wc);
-int u_iswcntrl(int wc);
-int u_iswspace(int wc);
-int u_iswprint(int wc);
-int u_iswlower(int wc);
+HsInt u_iswupper(HsInt wc);
+HsInt u_iswdigit(HsInt wc);
+HsInt u_iswalpha(HsInt wc);
+HsInt u_iswcntrl(HsInt wc);
+HsInt u_iswspace(HsInt wc);
+HsInt u_iswprint(HsInt wc);
+HsInt u_iswlower(HsInt wc);
-int u_iswalnum(int wc);
+HsInt u_iswalnum(HsInt wc);
-int u_towlower(int wc);
-int u_towupper(int wc);
-int u_towtitle(int wc);
+HsInt u_towlower(HsInt wc);
+HsInt u_towupper(HsInt wc);
+HsInt u_towtitle(HsInt wc);
-int u_gencat(int wc);
+HsInt u_gencat(HsInt wc);
#endif