diff --git a/Gap.hs b/Gap.hs
--- a/Gap.hs
+++ b/Gap.hs
@@ -95,7 +95,11 @@
 ----------------------------------------------------------------
 
 fOptions :: [String]
-#if __GLASGOW_HASKELL__ == 702
+#if __GLASGOW_HASKELL__ >= 704
+fOptions = [option | (option,_,_) <- fFlags]
+        ++ [option | (option,_,_) <- fWarningFlags]
+        ++ [option | (option,_,_) <- fLangFlags]
+#elif __GLASGOW_HASKELL__ == 702
 fOptions = [option | (option,_,_,_) <- fFlags]
 #else
 fOptions = [option | (option,_,_) <- fFlags]
diff --git a/elisp/ghc-info.el b/elisp/ghc-info.el
--- a/elisp/ghc-info.el
+++ b/elisp/ghc-info.el
@@ -167,7 +167,7 @@
 (defun ghc-find-module-name ()
   (save-excursion
     (goto-char (point-min))
-    (if (re-search-forward "^module[ ]+\\([^ ]+\\)" nil t)
+    (if (re-search-forward "^module[ ]+\\([^ \n]+\\)" nil t)
 	(match-string-no-properties 1))))
 
 (provide 'ghc-info)
diff --git a/elisp/ghc.el b/elisp/ghc.el
--- a/elisp/ghc.el
+++ b/elisp/ghc.el
@@ -16,7 +16,7 @@
 
 ;;; Code:
 
-(defconst ghc-version "1.10.16")
+(defconst ghc-version "1.10.17")
 
 ;; (eval-when-compile
 ;;  (require 'haskell-mode))
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:                1.10.16
+Version:                1.10.17
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
 Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
 License:                BSD3
