diff --git a/elisp/hhp.el b/elisp/hhp.el
--- a/elisp/hhp.el
+++ b/elisp/hhp.el
@@ -28,7 +28,7 @@
 	       (< emacs-minor-version minor)))
       (error "hhp requires at least Emacs %d.%d" major minor)))
 
-(defconst hhp-version "0.0.0")
+(defconst hhp-version "0.0.2")
 
 ;; (eval-when-compile
 ;;  (require 'haskell-mode))
diff --git a/hhp.cabal b/hhp.cabal
--- a/hhp.cabal
+++ b/hhp.cabal
@@ -1,5 +1,5 @@
 Name:                   hhp
-Version:                0.0.1
+Version:                0.0.2
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
 Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
 License:                BSD3
diff --git a/lib/Hhp/CabalApi.hs b/lib/Hhp/CabalApi.hs
--- a/lib/Hhp/CabalApi.hs
+++ b/lib/Hhp/CabalApi.hs
@@ -186,7 +186,9 @@
 cabalDependPackages bis = uniqueAndSort pkgs
   where
     pkgs = map getDependencyPackageName $ concatMap P.targetBuildDepends bis
-#if MIN_VERSION_Cabal(2,0,0)
+#if MIN_VERSION_Cabal(3,0,0)
+    getDependencyPackageName (Dependency pkg _ _) = unPackageName pkg
+#elif MIN_VERSION_Cabal(2,0,0)
     getDependencyPackageName (Dependency pkg _) = unPackageName pkg
 #else
     getDependencyPackageName (Dependency (PackageName nm) _) = nm
diff --git a/lib/Hhp/Gap.hs b/lib/Hhp/Gap.hs
--- a/lib/Hhp/Gap.hs
+++ b/lib/Hhp/Gap.hs
@@ -16,7 +16,10 @@
   ) where
 
 import DynFlags (DynFlags)
-import GHC(LHsBind, LHsExpr, LPat, Type)
+import GHC (LHsBind, LHsExpr, LPat, Type)
+#if __GLASGOW_HASKELL__ >= 808
+import GHC (Located)
+#endif
 import HsExpr (MatchGroup)
 import Outputable (PrintUnqualified, PprStyle, Depth(AllTheWay), mkUserStyle)
 
@@ -99,7 +102,16 @@
 
 ----------------------------------------------------------------
 
-#if __GLASGOW_HASKELL__ >= 806
+#if __GLASGOW_HASKELL__ >= 808
+type LExpression = LHsExpr GhcTc
+type LBinding    = LHsBind GhcTc
+type LPattern    = Located (LPat GhcTc)
+
+inTypes :: MatchGroup GhcTc LExpression -> [Type]
+inTypes = mg_arg_tys . mg_ext
+outType :: MatchGroup GhcTc LExpression -> Type
+outType = mg_res_ty . mg_ext
+#elif __GLASGOW_HASKELL__ >= 806
 type LExpression = LHsExpr GhcTc
 type LBinding    = LHsBind GhcTc
 type LPattern    = LPat    GhcTc
diff --git a/lib/Hhp/Logger.hs b/lib/Hhp/Logger.hs
--- a/lib/Hhp/Logger.hs
+++ b/lib/Hhp/Logger.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE BangPatterns #-}
+{-# LANGUAGE CPP #-}
 
 module Hhp.Logger (
     withLogger
@@ -12,7 +13,10 @@
 import ErrUtils
 import Exception (ghandle)
 import FastString (unpackFS)
-import GHC (Ghc, DynFlags(..), SrcSpan(..), Severity(SevError))
+import GHC (Ghc, DynFlags(..), SrcSpan(..))
+#if __GLASGOW_HASKELL__ < 808
+import GHC (Severity(SevError))
+#endif
 import qualified GHC as G
 import HscTypes (SourceError, srcErrorMessages)
 import Outputable (PprStyle, SDoc)
