avoid build warnings
authorJoey Hess <joeyh@joeyh.name>
Tue, 26 Dec 2023 23:39:01 +0000 (19:39 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 26 Dec 2023 23:39:01 +0000 (19:39 -0400)
Database/RawFilePath.hs

index 1b17729f955d1c4b2b9934930ddc5ad55a73f55c..ba82b9f90d6fceaabc57ec6e1b1ecf56f514f759 100644 (file)
@@ -35,6 +35,7 @@
 
 module Database.RawFilePath where
 
+#if MIN_VERSION_persistent_sqlite(2,13,3)
 import Database.Persist.Sqlite
 import qualified Database.Sqlite as Sqlite
 import qualified System.FilePath.ByteString as P
@@ -45,11 +46,6 @@ import Control.Monad.Logger (NoLoggingT, runNoLoggingT)
 import Control.Monad.Trans.Reader (ReaderT)
 import UnliftIO.Resource (ResourceT, runResourceT)
 
-{- The functions below are copied from persistent-sqlite, but modified to
- - take a RawFilePath and ignore the sqlConnectionStr from the
- - SqliteConnectionInfo. This avoids encoding problems using Text
- - in some situations. -}
-#if MIN_VERSION_persistent_sqlite(2,13,3)
 openWith'
        :: P.RawFilePath 
        -> (SqlBackend -> Sqlite.Connection -> r)