Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleanup and format

  • Loading branch information...
commit 36669e32fe5417e06829f7b02f52430c860afefa 1 parent eb695dd
@norm2782 authored
Showing with 6 additions and 3 deletions.
  1. +6 −2 src/Snap/Snaplet/Hdbc.hs
  2. +0 −1  src/Snap/Snaplet/Hdbc/Types.hs
View
8 src/Snap/Snaplet/Hdbc.hs
@@ -104,7 +104,8 @@ type Row = Map String SqlValue
-- > instance HasHdbc (Handler b App) Connection where
-- > getPool = with dbLens $ gets hdbcPool
--
-class (IConnection c, ConnSrc s, MonadControlIO m) => HasHdbc m c s | m -> c s where
+class (IConnection c, ConnSrc s, MonadControlIO m)
+ => HasHdbc m c s | m -> c s where
getConnSrc :: m (s c)
-- | This is (hopefully) a temporary instance, which will disppear once the
@@ -125,7 +126,10 @@ data HdbcSnaplet c s
-- desired, use the `hdbcInit'` initialiser instead. When the snaplet is
-- unloaded, the 'disconnect' function is called to close any remaining
-- connections.
-hdbcInit :: (ConnSrc s, IConnection c) => s c -> SnapletInit b (HdbcSnaplet c s)
+hdbcInit
+ :: (ConnSrc s, IConnection c)
+ => s c
+ -> SnapletInit b (HdbcSnaplet c s)
hdbcInit src = makeSnaplet "hdbc" "HDBC abstraction" Nothing $
return $ HdbcSnaplet src
View
1  src/Snap/Snaplet/Hdbc/Types.hs
@@ -1,6 +1,5 @@
module Snap.Snaplet.Hdbc.Types where
-import Prelude hiding (catch)
import Control.Monad.IO.Control
import Control.Monad.State
import Database.HDBC (IConnection())
Please sign in to comment.
Something went wrong with that request. Please try again.