Skip to content

Commit

Permalink
Bump snap reqs
Browse files Browse the repository at this point in the history
  • Loading branch information
norm2782 committed Dec 9, 2011
1 parent b9a11c4 commit e5cffc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions snaplet-hdbc.cabal
@@ -1,5 +1,5 @@
name: snaplet-hdbc
version: 0.6.4
version: 0.7
synopsis: HDBC snaplet for Snap Framework
description: This snaplet consists of two parts: an HDBC abstraction snaplet
and an HDBC authentication backend for Snap's authentication
Expand Down Expand Up @@ -39,7 +39,7 @@ Library
mtl > 2.0 && < 2.1,
monad-control >= 0.2 && < 0.3,
resource-pool >= 0.2 && < 0.3,
snap >= 0.6 && < 0.7,
snap >= 0.6 && < 0.8,
text >= 0.11 && < 0.12,
time >= 1.1 && < 1.5,
unordered-containers >= 0.1.4 && < 0.2
Expand Down
7 changes: 4 additions & 3 deletions src/Snap/Snaplet/Hdbc.hs
Expand Up @@ -153,6 +153,7 @@ query sql bind = do
-- | Similar to 'query', but instead of returning a list of 'Row's, it returns
-- an 'Integer' indicating the numbers of affected rows. This is typically used
-- for @INSERT@, @UPDATE@ and @DELETE@ queries.
-- TODO: Revert to the implementation below once withTransaction' works as expected.
query' :: HasHdbc m c s => String -> [SqlValue] -> m Integer
query' sql bind = withTransaction $ \conn -> do
stmt <- HDBC.prepare conn sql
Expand Down Expand Up @@ -184,9 +185,9 @@ withTransaction' action = do
r <- action `onException` doRollback
commit
return r
where doRollback = catch rollback doRollbackHandler
doRollbackHandler :: MonadControlIO m => SomeException -> m ()
doRollbackHandler _ = return ()
where doRollback = rollback `catch` doRollbackHandler
doRollbackHandler :: MonadControlIO m => SomeException -> m ()
doRollbackHandler _ = return ()

-- | The functions provided below are wrappers around the original HDBC
-- functions. Please refer to the HDBC documentation to see what they do and
Expand Down

0 comments on commit e5cffc0

Please sign in to comment.