Skip to content

Commit

Permalink
run stylish-haskell
Browse files Browse the repository at this point in the history
  • Loading branch information
curranosaurus committed Dec 30, 2024
1 parent e8c00d5 commit 755b9d2
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 18 deletions.
1 change: 0 additions & 1 deletion persistent-mysql/Database/Persist/MySQL.hs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ import Data.List (find, groupBy, intercalate, sort)
import qualified Data.List.NonEmpty as NEL
import qualified Data.Map as Map
import Data.Maybe (fromMaybe, listToMaybe, mapMaybe)
import qualified Data.Map as Map
import Data.Monoid ((<>))
import qualified Data.Monoid as Monoid
import Data.Pool (Pool)
Expand Down
2 changes: 1 addition & 1 deletion persistent-mysql/test/main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ import qualified MigrationOnlyTest
import qualified MigrationTest
import qualified MpsCustomPrefixTest
import qualified MpsNoPrefixTest
import qualified PersistUniqueTest
import qualified PersistentTest
import qualified PersistUniqueTest
import qualified SchemaTest
import qualified TypeLitFieldDefsTest
-- FIXME: Not used... should it be?
Expand Down
2 changes: 1 addition & 1 deletion persistent-postgresql/test/main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ import qualified MigrationReferenceSpec
import qualified MigrationTest
import qualified MpsCustomPrefixTest
import qualified MpsNoPrefixTest
import qualified PersistUniqueTest
import qualified PersistentTest
import qualified PersistUniqueTest
import qualified PgIntervalTest
import qualified PrimaryTest
import qualified RawSqlTest
Expand Down
8 changes: 4 additions & 4 deletions persistent-qq/test/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@

import Control.Monad (when)
import Control.Monad.Logger (LoggingT, runLoggingT)
import Control.Monad.Trans.Resource
import Control.Monad.Reader
import Control.Monad.Trans.Resource
import qualified Data.ByteString.Char8 as B
import Data.List.NonEmpty (NonEmpty(..))
import Data.List (sort)
import Data.List.NonEmpty (NonEmpty(..))
import Data.Text (Text)
import System.Log.FastLogger (fromLogStr)
import Test.Hspec
import Test.HUnit ((@?=))

import qualified CodeGenTest
import Database.Persist.Class.PersistEntity
import Database.Persist.Sql
import Database.Persist.Sql.Raw.QQ
import Database.Persist.Sqlite
import PersistTestPetType
import PersistentTestModels
import qualified CodeGenTest
import PersistTestPetType

main :: IO ()
main = hspec spec
Expand Down
38 changes: 29 additions & 9 deletions persistent-sqlite/test/SqliteInit.hs
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,42 @@ module SqliteInit (
) where

import Init
( TestFn(..), truncateTimeOfDay, truncateUTCTime
, truncateToMicro, arbText, liftA2, GenerateKey(..)
, (@/=), (@==), (==@), MonadFail
, assertNotEqual, assertNotEmpty, assertEmpty, asIO
, isTravis, RunDb
)
( GenerateKey(..)
, MonadFail
, RunDb
, TestFn(..)
, arbText
, asIO
, assertEmpty
, assertNotEmpty
, assertNotEqual
, isTravis
, liftA2
, truncateTimeOfDay
, truncateToMicro
, truncateUTCTime
, (==@)
, (@/=)
, (@==)
)

-- re-exports
import Control.Exception (SomeException)
import Control.Monad (void, replicateM, liftM, when, forM_)
import Control.Monad (forM_, liftM, replicateM, void, when)
import Control.Monad.Trans.Reader
import Database.Persist.TH (mkPersist, mkMigrate, share, sqlSettings, persistLowerCase, persistUpperCase, MkPersistSettings(..))
import Database.Persist.TH
( MkPersistSettings(..)
, mkMigrate
, mkPersist
, persistLowerCase
, persistUpperCase
, share
, sqlSettings
)
import Test.Hspec

-- testing
import Test.HUnit ((@?=),(@=?), Assertion, assertFailure, assertBool)
import Test.HUnit (Assertion, assertBool, assertFailure, (@=?), (@?=))

import Control.Monad (unless, (>=>))
import Control.Monad.IO.Unlift (MonadUnliftIO)
Expand Down
2 changes: 1 addition & 1 deletion persistent-sqlite/test/main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import qualified MigrationColumnLengthTest
import qualified MigrationOnlyTest
import qualified MpsCustomPrefixTest
import qualified MpsNoPrefixTest
import qualified PersistUniqueTest
import qualified PersistentTest
import qualified PersistUniqueTest
import qualified PrimaryTest
import qualified RawSqlTest
import qualified ReadWriteTest
Expand Down
2 changes: 1 addition & 1 deletion persistent/Database/Persist/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ liftAndFixKeys mps emEntities entityMap unboundEnt =
where
fixForeignRefTableDBName =
getEntityDBName (unboundEntityDef parentDef)
fixForeignRefSchemaDBName =
fixForeignRefSchemaDBName =
getEntitySchema (unboundEntityDef parentDef)
foreignFieldNames =
case unboundForeignFields of
Expand Down

0 comments on commit 755b9d2

Please sign in to comment.