cql-io 0.14.2 → 0.14.3
raw patch · 5 files changed
+20/−6 lines, 5 files
Files
- CHANGELOG.txt +4/−0
- cql-io.cabal +2/−3
- src/Database/CQL/IO/Client.hs +2/−2
- src/Database/CQL/IO/Connection.hs +4/−0
- src/Database/CQL/IO/Types.hs +8/−1
CHANGELOG.txt view
@@ -1,3 +1,7 @@+0.14.3+------+- Bugfixes+ 0.14.2 ------ - Export `PrepareStrategy` from `Database.CQL.IO`
cql-io.cabal view
@@ -1,8 +1,8 @@ name: cql-io-version: 0.14.2+version: 0.14.3 synopsis: Cassandra CQL client. stability: experimental-license: OtherLicense+license: MPL-2.0 license-file: LICENSE.txt author: Toralf Wittner maintainer: Toralf Wittner <tw@dtex.org>@@ -48,7 +48,6 @@ default-language: Haskell2010 hs-source-dirs: src ghc-options: -Wall -O2 -fwarn-tabs- ghc-prof-options: -prof -auto-all exposed-modules: Database.CQL.IO
src/Database/CQL/IO/Client.hs view
@@ -147,7 +147,7 @@ #if MIN_VERSION_monad_control(1,0,0) instance MonadBaseControl IO Client where type StM Client a = StM (ReaderT ClientState IO) a- liftBaseWith f = Client . liftBaseWith $ \run -> f (run . client)+ liftBaseWith f = Client $ liftBaseWith $ \run -> f (run . client) restoreM = Client . restoreM #else instance MonadBaseControl IO Client where@@ -155,7 +155,7 @@ { unClientStM :: StM (ReaderT ClientState IO) a } liftBaseWith f =- Client . liftBaseWith $ \run -> f (fmap ClientStM . run . client)+ Client $ liftBaseWith $ \run -> f (fmap ClientStM . run . client) restoreM = Client . restoreM . unClientStM #endif
src/Database/CQL/IO/Connection.hs view
@@ -3,6 +3,7 @@ -- file, You can obtain one at http://mozilla.org/MPL/2.0/. {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-}@@ -158,6 +159,9 @@ familyOf (SockAddrInet _ _) = AF_INET familyOf (SockAddrInet6 _ _ _ _) = AF_INET6 familyOf (SockAddrUnix _) = AF_UNIX+#if MIN_VERSION_network(2,6,1)+ familyOf (SockAddrCan _ ) = AF_CAN+#endif ping :: MonadIO m => InetAddr -> m Bool ping a = liftIO $ bracket (mkSock a) S.close $ \s ->
src/Database/CQL/IO/Types.hs view
@@ -2,9 +2,10 @@ -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. +{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE GADTs #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} @@ -37,6 +38,9 @@ let i = fromIntegral p :: Int in shows (fromHostAddress6 a) . showString ":" . shows i $ "" show (InetAddr (SockAddrUnix unix)) = unix+#if MIN_VERSION_network(2,6,1)+ show (InetAddr (SockAddrCan int32)) = show int32+#endif instance ToBytes InetAddr where bytes (InetAddr (SockAddrInet p a)) =@@ -46,6 +50,9 @@ let i = fromIntegral p :: Int in show (fromHostAddress6 a) +++ val ":" +++ i bytes (InetAddr (SockAddrUnix unix)) = bytes unix+#if MIN_VERSION_network(2,6,1)+ bytes (InetAddr (SockAddrCan int32)) = bytes int32+#endif ip2inet :: PortNumber -> IP -> InetAddr ip2inet p (IPv4 a) = InetAddr $ SockAddrInet p (toHostAddress a)