From 1a945d27c8d9efcfb001c27288b35507a9faefed Mon Sep 17 00:00:00 2001 From: Matt Parsons Date: Wed, 13 Sep 2017 17:23:46 -0600 Subject: [PATCH] no basebackend pls --- src/Database/Esqueleto/Internal/Sql.hs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Database/Esqueleto/Internal/Sql.hs b/src/Database/Esqueleto/Internal/Sql.hs index 4d272b5..1322c38 100644 --- a/src/Database/Esqueleto/Internal/Sql.hs +++ b/src/Database/Esqueleto/Internal/Sql.hs @@ -781,9 +781,12 @@ veryUnsafeCoerceSqlExprValueList EEmptyList = throw (UnexpectedCaseErr EmptySqlE ---------------------------------------------------------------------- -type SqlReadT' m a - = forall backend - . (BackendCompatible SqlBackend backend, SqlBackendCanRead backend) +type SqlReadT' m a = forall backend. + ( BackendCompatible SqlBackend backend + , IsPersistBackend backend + , PersistQueryRead backend + , PersistStoreRead backend, PersistUniqueRead backend + ) => R.ReaderT backend m a -- | (Internal) Execute an @esqueleto@ @SELECT@ 'SqlQuery' inside @@ -799,7 +802,7 @@ rawSelectSource mode query = do conn <- projectBackend <$> R.ask let _ = conn :: SqlBackend - res <- run conn + res <- R.withReaderT (const conn) (run conn) return $ (C.$= massage) `fmap` res where