Permalink
Browse files

Clean up hlint warnings

  • Loading branch information...
1 parent a40ac11 commit 26b8e44fd01a3d6013165d02c2cc6a234a4e7077 @nurpax committed Sep 28, 2012
View
5 Database/SQLite/Simple.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
@@ -131,7 +130,7 @@ withBind templ stmt qp action = do
--
-- Throws 'FormatError' if the query could not be formatted correctly.
execute :: (ToRow q) => Connection -> Query -> q -> IO ()
-execute (Connection c) template@(Query t) qs = do
+execute (Connection c) template@(Query t) qs =
bracket (Base.prepare c t) Base.finalize go
where
go stmt = withBind template stmt (toRow qs) (void $ Base.step stmt)
@@ -150,7 +149,7 @@ execute (Connection c) template@(Query t) qs = do
-- * 'ResultError': result conversion failed.
query :: (ToRow q, FromRow r)
=> Connection -> Query -> q -> IO [r]
-query (Connection conn) templ@(Query t) qs = do
+query (Connection conn) templ@(Query t) qs =
bracket (Base.prepare conn t) Base.finalize go
where
go stmt = withBind templ stmt (toRow qs) (stepStmt stmt >>= finishQuery)
View
2 Database/SQLite/Simple/FromField.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE CPP, DeriveDataTypeable, DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
-{-# LANGUAGE PatternGuards, ScopedTypeVariables #-}
+{-# LANGUAGE ScopedTypeVariables #-}
------------------------------------------------------------------------------
-- |
View
2 Database/SQLite/Simple/FromRow.hs
@@ -68,7 +68,7 @@ fieldWith fieldP = RP $ do
column <- lift get
lift (put (column + 1))
let ncols = length rowresult
- if (column >= ncols)
+ if column >= ncols
then do
let vals = map (\c -> (gettypename (rowresult !! c)
, ellipsis (rowresult !! c)))
View
2 Database/SQLite/Simple/Internal.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE RecordWildCards, DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
------------------------------------------------------------------------------
-- |
-- Module: Database.SQLite.Simple.Internal

0 comments on commit 26b8e44

Please sign in to comment.