summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2006-01-10 23:28:10 +0000
committerJamey Sharp <jamey@minilop.net>2006-01-10 23:28:10 +0000
commit9d0f5600ed7a04e45092f8732236b6ea8adf6df3 (patch)
tree4d9f5f9c32c8ece38a37dbfff0e7056ffe032b21
parent3b7addfe9affc89012c21693fb548ff02b674536 (diff)
Rename readGenericM to readStorable, and readBoolM to readBool.
-rw-r--r--xhsb/XCBExt.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/xhsb/XCBExt.hs b/xhsb/XCBExt.hs
index b61f4d7..6067797 100644
--- a/xhsb/XCBExt.hs
+++ b/xhsb/XCBExt.hs
@@ -26,12 +26,12 @@ readSize size = do
retTypeM :: Monad m => m a -> a
retTypeM _ = undefined
-readGenericM :: Storable a => ReplyReader a
-readGenericM = action
+readStorable :: Storable a => ReplyReader a
+readStorable = action
where action = readSize (sizeOf $ retTypeM action)
-readBoolM :: ReplyReader Bool
-readBoolM = do
+readBool :: ReplyReader Bool
+readBool = do
v <- readSize 1
return $ (v :: Word8) /= 0
@@ -41,10 +41,10 @@ readReply = ret
ret = evalStateT (fromConstrM reader c) 0
reader :: Typeable a => ReplyReader a
reader = fail "no reader for this type"
- `extR` (readBoolM)
- `extR` (readGenericM :: ReplyReader Word8)
- `extR` (readGenericM :: ReplyReader Word16)
- `extR` (readGenericM :: ReplyReader Word32)
+ `extR` (readBool)
+ `extR` (readStorable :: ReplyReader Word8)
+ `extR` (readStorable :: ReplyReader Word16)
+ `extR` (readStorable :: ReplyReader Word32)
c = indexConstr (dataTypeOf $ retTypeM ret) 1
foreign import ccall "X11/XCB/xcbext.h XCBWaitForReply" _waitForReply :: Ptr XCBConnection -> Word32 -> Ptr (Ptr XCBGenericError) -> IO (Ptr Word32)