diff --git a/apiary-authenticate.cabal b/apiary-authenticate.cabal
--- a/apiary-authenticate.cabal
+++ b/apiary-authenticate.cabal
@@ -1,5 +1,5 @@
 name:                apiary-authenticate
-version:             0.11.0
+version:             0.12.0
 synopsis:            authenticate support for apiary web framework.
 description:
   example: <https://github.com/philopon/apiary/blob/master/examples/auth.hs>
@@ -21,7 +21,7 @@
                        Web.Apiary.Authenticate.Explicit
   other-modules:       Web.Apiary.Authenticate.Internal
   build-depends:       base                 >=4.6   && <4.8
-                     , apiary               >=0.9   && <0.12
+                     , apiary               >=0.12  && <0.13
                      , apiary-clientsession >=0.9   && <0.12
                      , authenticate         >=1.3   && <1.4
                      , http-client          >=0.3   && <0.4
diff --git a/src/Web/Apiary/Authenticate/Internal.hs b/src/Web/Apiary/Authenticate/Internal.hs
--- a/src/Web/Apiary/Authenticate/Internal.hs
+++ b/src/Web/Apiary/Authenticate/Internal.hs
@@ -4,6 +4,7 @@
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE DeriveFunctor #-}
 {-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE CPP #-}
 
 module Web.Apiary.Authenticate.Internal where
 
@@ -16,7 +17,9 @@
 import Data.Maybe
 import Data.List
 import Data.Default.Class
+#if __GLASGOW_HASKELL__ < 707
 import Data.Proxy -- for ghc-7.6
+#endif
 import qualified Data.ByteString.Char8 as S
 import qualified Data.ByteString.Lazy as L
 import qualified Data.Text as T
@@ -75,7 +78,7 @@
 authHandler :: (Functor n, MonadIO n) => Auth -> ApiaryT c n m ()
 authHandler Auth{..} = retH >> mapM_ (uncurry go) (providers config)
   where
-    pfxPath p = function (\_ r -> if p `isPrefixOf` Wai.pathInfo r then Just SNil else Nothing)
+    pfxPath p = function id (\_ r -> if p `isPrefixOf` Wai.pathInfo r then Just SNil else Nothing)
 
     retH = pfxPath (authPrefix config ++ authReturnToPath config) . stdMethod GET . action $
         returnAction authSession manager (authSessionName config) (authSuccessPage config)
