diff options
author | tv <tv@krebsco.de> | 2023-02-07 02:30:41 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2023-02-07 02:30:41 +0100 |
commit | f28825e471e206bcb7e6dc8e4874c2b771f7d24c (patch) | |
tree | c77f0bc9dd178c74f883f0c89d0ebd67366d381b /lib/Foreign | |
parent | 3bd9c00812d91ade512e71a9f8e0f5b8917c3fa7 (diff) |
move Graphics.* & co. to lib
Diffstat (limited to 'lib/Foreign')
-rw-r--r-- | lib/Foreign/C/String/Extra.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Foreign/C/String/Extra.hs b/lib/Foreign/C/String/Extra.hs new file mode 100644 index 0000000..a7b6dfe --- /dev/null +++ b/lib/Foreign/C/String/Extra.hs @@ -0,0 +1,10 @@ +module Foreign.C.String.Extra where + +import Data.Word (Word8) +import Foreign.C.String (castCCharToChar) +import Foreign.C.Types (CChar) +import qualified Data.Char as Char + + +castCCharToWord8 :: CChar -> Word8 +castCCharToWord8 = fromIntegral . Char.ord . castCCharToChar |