X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compat%2FCompat%2FUnicode.hs;h=fe5b0ba5e83529d51761b376ed352b12b1daa5ee;hb=13a0376dd3e79f7baacf84943baf79cb4cb188b1;hp=2637fac8182957aff12337cea4fe82eb708fdd7c;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/compat/Compat/Unicode.hs b/compat/Compat/Unicode.hs index 2637fac..fe5b0ba 100644 --- 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 -generalCategory c = toEnum (wgencat (fromIntegral (ord c))) +generalCategory c = toEnum $ fromIntegral $ wgencat $ fromIntegral $ ord c 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