[Xcb-commit] xhsb XCBExt.hs,1.4,1.5
Jamey Sharp
xcb-commit at lists.freedesktop.org
Tue Jan 10 15:28:12 PST 2006
Update of /cvs/xcb/xhsb
In directory gabe:/tmp/cvs-serv23579
Modified Files:
XCBExt.hs
Log Message:
Rename readGenericM to readStorable, and readBoolM to readBool.
Index: XCBExt.hs
===================================================================
RCS file: /cvs/xcb/xhsb/XCBExt.hs,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- XCBExt.hs 10 Jan 2006 23:17:22 -0000 1.4
+++ XCBExt.hs 10 Jan 2006 23:28:10 -0000 1.5
@@ -26,12 +26,12 @@
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 @@
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)
More information about the xcb-commit
mailing list