diff --git a/apiary-persistent.cabal b/apiary-persistent.cabal
--- a/apiary-persistent.cabal
+++ b/apiary-persistent.cabal
@@ -1,5 +1,5 @@
 name:                apiary-persistent
-version:             1.5.0
+version:             1.5.1
 synopsis:            persistent support for apiary web framework.
 description:
   example: <https://github.com/philopon/apiary/blob/master/examples/persistent.hs>
@@ -19,7 +19,7 @@
 library
   exposed-modules:     Web.Apiary.Database.Persist
   build-depends:       base               >=4.7   && <5.0
-                     , persistent         >=2.1   && <2.3
+                     , persistent         >=2.3   && <2.8
 
                      , apiary             >=2.1   && <3.0
                      , apiary-logger      >=1.5   && <1.6
diff --git a/src/Web/Apiary/Database/Persist.hs b/src/Web/Apiary/Database/Persist.hs
--- a/src/Web/Apiary/Database/Persist.hs
+++ b/src/Web/Apiary/Database/Persist.hs
@@ -1,5 +1,4 @@
 {-# LANGUAGE UndecidableInstances #-}
-{-# LANGUAGE OverlappingInstances #-}
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE TypeOperators #-}
@@ -127,7 +126,7 @@
     -> proxy k
     -> Sql.SqlPersistT (ActionT exts '[] actM) a
     -> (a -> Maybe b) -- ^ result check function. Nothing: fail filter, Just a: success filter and add parameter.
-    -> Filter exts actM m prms (k Dict.:= b ': prms)
+    -> Filter exts actM m prms (k 'Dict.:= b ': prms)
 sql doc k q p = focus (maybe id DocPrecondition doc) Nothing $ R.raw "sql" $ \d t ->
     fmap p (runSql $ hoistReaderT (applyDict Dict.emptyDict) q) >>= \case
         Nothing -> mzero
