diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-16 v5.7.0.0
+	* Bump cabal-helper to 0.7.3.0 to support Cabal-1.24.1.0
+	* Bump haskell-src-exts, optparse-applicative, pipes and extra
+	  to be compatible with stackage.
+
 2016-07-29 v5.6.0.0
 	* Bump cabal-helper to 0.7, adds support for Cabal-1.24
 	* Merge #737, `map-file` caching issues
diff --git a/Language/Haskell/GhcMod/FillSig.hs b/Language/Haskell/GhcMod/FillSig.hs
--- a/Language/Haskell/GhcMod/FillSig.hs
+++ b/Language/Haskell/GhcMod/FillSig.hs
@@ -27,7 +27,11 @@
 import qualified Class as Ty
 import qualified Var as Ty
 import qualified HsPat as Ty
+#if MIN_VERSION_haskell_src_exts(1,18,0)
+import qualified Language.Haskell.Exts as HE
+#else
 import qualified Language.Haskell.Exts.Annotated as HE
+#endif
 import Djinn.GHC
 
 import qualified Language.Haskell.GhcMod.Gap as Gap
@@ -191,7 +195,11 @@
                  HE.TypeSig (HE.SrcSpanInfo s _) names ty ->
                      return $ HESignature s names ty
 
+#if MIN_VERSION_haskell_src_exts(1,18,0)
+                 HE.TypeFamDecl (HE.SrcSpanInfo s _) declHead _ _ ->
+#else
                  HE.TypeFamDecl (HE.SrcSpanInfo s _) declHead _ ->
+#endif
                    let (name, tys) = dHeadTyVars declHead in
                    return $ HEFamSignature s Open name (map cleanTyVarBind tys)
 
diff --git a/Language/Haskell/GhcMod/SrcUtils.hs b/Language/Haskell/GhcMod/SrcUtils.hs
--- a/Language/Haskell/GhcMod/SrcUtils.hs
+++ b/Language/Haskell/GhcMod/SrcUtils.hs
@@ -16,7 +16,11 @@
 import qualified Type as G
 import GHC.SYB.Utils
 import GhcMonad
+#if MIN_VERSION_haskell_src_exts(1,18,0)
+import qualified Language.Haskell.Exts as HE
+#else
 import qualified Language.Haskell.Exts.Annotated as HE
+#endif
 import Language.Haskell.GhcMod.Doc
 import Language.Haskell.GhcMod.Gap
 import qualified Language.Haskell.GhcMod.Gap as Gap
@@ -175,7 +179,11 @@
 typeSigInRangeHE :: Int -> Int -> HE.Decl HE.SrcSpanInfo -> Bool
 typeSigInRangeHE lineNo colNo (HE.TypeSig (HE.SrcSpanInfo s _) _ _) =
   HE.srcSpanStart s <= (lineNo, colNo) && HE.srcSpanEnd s >= (lineNo, colNo)
+#if MIN_VERSION_haskell_src_exts(1,18,0)
+typeSigInRangeHE lineNo colNo (HE.TypeFamDecl (HE.SrcSpanInfo s _) _ _ _) =
+#else
 typeSigInRangeHE lineNo colNo (HE.TypeFamDecl (HE.SrcSpanInfo s _) _ _) =
+#endif
   HE.srcSpanStart s <= (lineNo, colNo) && HE.srcSpanEnd s >= (lineNo, colNo)
 typeSigInRangeHE lineNo colNo (HE.DataFamDecl (HE.SrcSpanInfo s _) _ _ _) =
   HE.srcSpanStart s <= (lineNo, colNo) && HE.srcSpanEnd s >= (lineNo, colNo)
diff --git a/cabal.project b/cabal.project
new file mode 100644
--- /dev/null
+++ b/cabal.project
@@ -0,0 +1,3 @@
+-- do not build sub-packages when using features from
+-- http://blog.ezyang.com/2016/05/announcing-cabal-new-build-nix-style-local-builds/
+packages: .
diff --git a/elisp/ghc.el b/elisp/ghc.el
--- a/elisp/ghc.el
+++ b/elisp/ghc.el
@@ -28,7 +28,7 @@
 	       (< emacs-minor-version minor)))
       (error "ghc-mod requires at least Emacs %d.%d" major minor)))
 
-(defconst ghc-version "5.6.0.0")
+(defconst ghc-version "5.7.0.0")
 
 (defgroup ghc-mod '() "ghc-mod customization")
 
diff --git a/ghc-mod.cabal b/ghc-mod.cabal
--- a/ghc-mod.cabal
+++ b/ghc-mod.cabal
@@ -1,5 +1,5 @@
 Name:                   ghc-mod
-Version:                5.6.0.0
+Version:                5.7.0.0
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>,
                         Daniel Gröber <dxld@darkboxed.org>,
                         Alejandro Serrano <trupill@gmail.com>,
@@ -27,10 +27,16 @@
 Category:               GHC, Development
 Cabal-Version:          >= 1.14
 Build-Type:             Custom
+Tested-With:           GHC == 7.6.3
+                       GHC == 7.8.4
+                     , GHC == 7.10.3
+                     , GHC == 8.0.1
+                     , GHC == 8.0.2
 Data-Files:             elisp/Makefile
                         elisp/*.el
 Data-Files:             LICENSE COPYING.BSD3 COPYING.AGPL3
 Extra-Source-Files:     ChangeLog
+                        cabal.project
                         SetupCompat.hs
                         NotCPP/*.hs
                         NotCPP/COPYING
@@ -174,38 +180,39 @@
                       , bytestring        < 0.11
                       , binary            < 0.9 && >= 0.5.1.0
                       , containers        < 0.6
-                      , cabal-helper      < 0.8 && >= 0.7.1.0
+                      , cabal-helper      < 0.8 && >= 0.7.3.0
                       , deepseq           < 1.5
-                      , directory         < 1.3
+                      , directory         < 1.4
                       , filepath          < 1.5
                       , ghc               < 8.2 && >= 7.6
-                      , ghc-paths         < 0.2
-                      , ghc-syb-utils     < 0.3
+                      , ghc-paths         < 0.2  && >= 0.1.0.9
+                      , ghc-syb-utils     < 0.3  && >= 0.2.3
                       , hlint             < 1.10 && >= 1.9.27
                       , monad-journal     < 0.8 && >= 0.4
                       , old-time          < 1.2
                       , pretty            < 1.2
                       , process           < 1.5
-                      , syb               < 0.7
-                      , temporary         < 1.3
+                      , syb               < 0.7  && >= 0.5.1
+                      , temporary         < 1.3  && >= 1.2.0.3
+                      , transformers      < 0.6
                       , time              < 1.7
                       , transformers      < 0.6
-                      , transformers-base < 0.5
-                      , mtl               < 2.3 && >= 2.0
-                      , monad-control     < 1.1 && >= 1
-                      , split             < 0.3
-                      , haskell-src-exts  < 1.18
-                      , text              < 1.3
-                      , djinn-ghc         < 0.1 && >= 0.0.2.2
+                      , transformers-base < 0.5  && >= 0.4.4
+                      , mtl               < 2.3  && >= 2.0
+                      , monad-control     < 1.1  && >= 1
+                      , split             < 0.3  && >= 0.2.2
+                      , haskell-src-exts  < 1.19 && >= 1.16.0.1
+                      , text              < 1.3  && >= 1.2.1.3
+                      , djinn-ghc         < 0.1  && >= 0.0.2.2
                       , fclabels          == 2.0.*
-                      , extra             == 1.4.*
-                      , pipes             == 4.1.*
+                      , extra             < 1.6 && >= 1.4.0
+                      , pipes             < 4.4 && >= 4.1.0
                       , safe              < 0.4 && >= 0.3.9
-                      , optparse-applicative >=0.11.0 && <0.13.0
+                      , optparse-applicative >=0.11.0 && <0.14.0
                       , template-haskell
                       , syb
   if impl(ghc < 7.8)
-    Build-Depends:      convertible
+    Build-Depends:      convertible       < 1.2  && >= 1.1.0.0
   if impl(ghc >= 8.0)
     Build-Depends:      ghc-boot
 
@@ -221,16 +228,17 @@
   Default-Extensions:   ConstraintKinds, FlexibleContexts
   HS-Source-Dirs:       src
   Build-Depends:        base      < 5 && >= 4.0
-                      , directory < 1.3
+                      , directory < 1.4
                       , filepath  < 1.5
                       , pretty    < 1.2
                       , process   < 1.5
-                      , split     < 0.3
+                      , split     < 0.3  && >= 0.2.2
                       , mtl       < 2.3 && >= 2.0
-                      , ghc       < 8.1
-                      , monad-control ==1.0.*
+                      , ghc       < 8.2 && >= 7.6
+                      , monad-control < 1.1  && >= 1
                       , fclabels  ==2.0.*
-                      , optparse-applicative >=0.11.0 && <0.13.0
+                      , optparse-applicative >=0.11.0 && <0.14.0
+                      , semigroups < 0.19 && >= 0.10.0
                       , ghc-mod
 
 Executable ghc-modi
@@ -246,7 +254,7 @@
   Build-Depends:        base      < 5 && >= 4.0
                       , binary    < 0.9 && >= 0.5.1.0
                       , deepseq   < 1.5
-                      , directory < 1.3
+                      , directory < 1.4
                       , filepath  < 1.5
                       , process   < 1.5
                       , old-time  < 1.2
@@ -261,7 +269,7 @@
   Default-Extensions:   ConstraintKinds, FlexibleContexts
   Main-Is:              doctests.hs
   Build-Depends:        base
-                      , doctest >= 0.9.3
+                      , doctest           < 0.12 && >= 0.9.3
 
 Test-Suite spec
   Default-Language:     Haskell2010
@@ -291,7 +299,7 @@
                         FileMappingSpec
                         ShellParseSpec
 
-  Build-Depends:        hspec >= 2.0.0
+  Build-Depends:        hspec             < 2.4 && >= 2.0.0
   X-Build-Depends-Like: CLibName
 
 Source-Repository head
diff --git a/src/GHCMod/Options/Commands.hs b/src/GHCMod/Options/Commands.hs
--- a/src/GHCMod/Options/Commands.hs
+++ b/src/GHCMod/Options/Commands.hs
@@ -13,11 +13,14 @@
 --
 -- You should have received a copy of the GNU Affero General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
-{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE CPP, OverloadedStrings #-}
 {-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
 
 module GHCMod.Options.Commands where
 
+#if MIN_VERSION_optparse_applicative(0,13,0)
+import Data.Semigroup
+#endif
 import Options.Applicative
 import Options.Applicative.Types
 import Options.Applicative.Builder.Internal
@@ -289,8 +292,13 @@
 hsubparser' m = mkParser d g rdr
   where
     Mod _ d g = m `mappend` metavar ""
+#if MIN_VERSION_optparse_applicative(0,13,0)
+    (ms,cmds, subs) = mkCommand m
+    rdr = CmdReader ms cmds (fmap add_helper . subs)
+#else
     (cmds, subs) = mkCommand m
     rdr = CmdReader cmds (fmap add_helper . subs)
+#endif
     add_helper pinfo = pinfo
       { infoParser = infoParser pinfo <**> helper }
 
