packages feed

users-postgresql-simple 0.1.0.0 → 0.1.0.1

raw patch · 2 files changed

+19/−3 lines, 2 filesdep ~mtl

Dependency ranges changed: mtl

Files

src/Web/Users/Postgresql.hs view
@@ -2,12 +2,17 @@ {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE CPP #-} module Web.Users.Postgresql () where  import Web.Users.Types  import Control.Monad+#if MIN_VERSION_mtl(2,2,0) import Control.Monad.Except+#else+import Control.Monad.Error+#endif import Data.Aeson import Data.Int import Data.Maybe@@ -65,6 +70,17 @@     do r <- check        unless r a +#if MIN_VERSION_mtl(2,2,0)+type ErrorT = ExceptT+runErrorT :: ErrorT e m a -> m (Either e a)+runErrorT = runExceptT+#else+-- a hack... :-(+instance Error UpdateUserError where+    noMsg = error "Calling fail not supported"+    strMsg = error "Calling fail not supported"+#endif+ instance UserStorageBackend Connection where     type UserId Connection = Int64     initUserBackend conn =@@ -138,7 +154,7 @@              Nothing ->                  return $ Left UserDoesntExit              Just origUser ->-                 runExceptT $+                 runErrorT $                  do let newUser = updateFun origUser                     when (u_name newUser /= u_name origUser) $                          do [(Only counter)] <-
users-postgresql-simple.cabal view
@@ -1,5 +1,5 @@ name:                users-postgresql-simple-version:             0.1.0.0+version:             0.1.0.1 synopsis:            A PostgreSQL backend for the users package description:         This library is a backend driver using <http://hackage.haskell.org/package/postgresql-simple postgresql-simple> for                      <http://hackage.haskell.org/package/users the "users" library>.@@ -37,7 +37,7 @@                        postgresql-simple >=0.4,                        aeson >=0.8,                        text >=1.2,-                       mtl >=2.2,+                       mtl >=2.1,                        uuid >=1.3,                        bytestring >=0.10,                        time >=1.4