projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1f28aaa
)
Fix the type of wgencat
author
Ian Lynagh
<igloo@earth.li>
Thu, 29 Mar 2007 16:42:38 +0000
(16:42 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Thu, 29 Mar 2007 16:42:38 +0000
(16:42 +0000)
compat/Compat/Unicode.hs
patch
|
blob
|
history
diff --git
a/compat/Compat/Unicode.hs
b/compat/Compat/Unicode.hs
index
2637fac
..
fe5b0ba
100644
(file)
--- a/
compat/Compat/Unicode.hs
+++ b/
compat/Compat/Unicode.hs
@@
-50,10
+50,10
@@
data GeneralCategory
-- | Retrieves the general Unicode category of the character.
generalCategory :: Char -> GeneralCategory
-- | Retrieves the general Unicode category of the character.
generalCategory :: Char -> GeneralCategory
-generalCategory c = toEnum (wgencat (fromIntegral (ord c)))
+generalCategory c = toEnum $ fromIntegral $ wgencat $ fromIntegral $ ord c
foreign import ccall unsafe "u_gencat"
foreign import ccall unsafe "u_gencat"
- wgencat :: CInt -> Int
+ wgencat :: CInt -> CInt
isPrint c = iswprint (fromIntegral (ord c)) /= 0
isUpper c = iswupper (fromIntegral (ord c)) /= 0
isPrint c = iswprint (fromIntegral (ord c)) /= 0
isUpper c = iswupper (fromIntegral (ord c)) /= 0