Browse files

Add type synonyms for HdbcSnaplet parameterised with sources

  • Loading branch information...
1 parent 36669e3 commit bc9229ec5f2f5c1168e516a482525a49d9a67f62 @norm2782 committed Nov 10, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/Snap/Snaplet/Hdbc.hs
View
4 src/Snap/Snaplet/Hdbc.hs
@@ -77,6 +77,7 @@ import Control.Exception.Control hiding (Handler)
import Control.Monad.IO.Control
import Control.Monad.State
import Data.Map (Map)
+import Data.Pool
import qualified Database.HDBC as HDBC
import Database.HDBC (IConnection(), SqlValue, SqlError, Statement)
import Database.HDBC.ColTypes
@@ -120,6 +121,9 @@ data HdbcSnaplet c s
=> HdbcSnaplet
{ connSrc :: s c }
+type HdbcIO c = HdbcSnaplet c IO
+type HdbcPool c = HdbcSnaplet c Pool
+
-- | Initialise the snaplet by providing it with a raw HDBC connection. A
-- resource pool is created with some default parameters that should be fine
-- for most common usecases. If a custom resource pool configuration is

0 comments on commit bc9229e

Please sign in to comment.