packages feed

bolt 0.3.0.1 → 0.3.1.0

raw patch · 3 files changed

+18/−17 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Database.Bolt.Protocol.Ver1.Transaction: Tran :: ReaderT t IO a -> Tran t a
+ Database.Bolt.Protocol.Ver1.Transaction: [unTran] :: Tran t a -> ReaderT t IO a
+ Database.Bolt.Protocol.Ver1.Transaction: newtype Tran t a

Files

bolt.cabal view
@@ -1,5 +1,5 @@ name:                bolt
-version:             0.3.0.1
+version:             0.3.1.0
 synopsis:            Bolt driver for Neo4j
 description:
     A Bolt driver to access Neo4j databases using
src/Database/Bolt/Protocol/Ver1/Transaction.hs view
@@ -4,6 +4,7 @@ 
 module Database.Bolt.Protocol.Ver1.Transaction
  ( Transaction
+ , Tran(..)
  , runTransaction
  , cypher
  ) where
@@ -16,7 +17,7 @@ import           Database.Bolt.Protocol.Ver1.Types
 import           Database.Bolt.Transport
 
-newtype Tran t a = Tran { unTransaction :: ReaderT t IO a }
+newtype Tran t a = Tran { unTran :: ReaderT t IO a }
     deriving (Functor, Applicative, Monad, MonadIO)
 
 type Transaction a = forall t. Transport t => Tran t a
@@ -24,7 +25,7 @@ runTransaction :: Transport t => t -> Transaction a -> IO a
 runTransaction conn t = do
     _ <- exec conn "BEGIN" HM.empty
-    r <- try $ runReaderT (unTransaction t) conn
+    r <- try $ runReaderT (unTran t) conn
     case r of
         Left (SomeException ex) -> do
             reset conn
src/Database/Bolt/Types.hs view
@@ -1,14 +1,14 @@-module Database.Bolt.Types-    ( Object-    , object-    ) where--import           Data.Hashable-import qualified Data.HashMap.Strict as HM-import           Data.PackStream-import           Data.Text           (Text)--type Object = HM.HashMap Text PackStream--object :: (Eq k, Hashable k) => [(k, v)] -> HM.HashMap k v-object = HM.fromList+module Database.Bolt.Types
+    ( Object
+    , object
+    ) where
+
+import           Data.Hashable
+import qualified Data.HashMap.Strict as HM
+import           Data.PackStream
+import           Data.Text           (Text)
+
+type Object = HM.HashMap Text PackStream
+
+object :: (Eq k, Hashable k) => [(k, v)] -> HM.HashMap k v
+object = HM.fromList