branch: elpa/haskell-mode
commit e9c356739310332afe59b10ffa2e6c3e76f124e3
Merge: be2639592f 3112f5f4a5
Author: Steve Purcell <st...@sanityinc.com>
Commit: GitHub <nore...@github.com>

    Merge pull request #1876 from haskell/bytecomp-fixes
    
    Bytecomp fixes
---
 haskell-commands.el    |  9 ++++-----
 haskell-customize.el   |  2 +-
 haskell-indentation.el |  3 +--
 haskell.el             | 22 ++++++++++------------
 w3m-haddock.el         |  2 +-
 5 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/haskell-commands.el b/haskell-commands.el
index c9ae488b4f..dd6fb99c22 100644
--- a/haskell-commands.el
+++ b/haskell-commands.el
@@ -710,9 +710,9 @@ function `xref-find-definitions' after new table was 
generated."
                   (haskell-mode-message-line "Tags generated."))))))
 
 (defun haskell-process-add-cabal-autogen ()
-  "Add cabal's autogen dir to the GHCi search path.
+  "Add the cabal autogen dir to the GHCi search path.
 Add <cabal-project-dir>/dist/build/autogen/ to GHCi seatch path.
-This allows modules such as 'Path_...', generated by cabal, to be
+This allows modules such as \"Path_...\", generated by cabal, to be
 loaded by GHCi."
   (unless (eq 'cabal-repl (haskell-process-type))
     (let*
@@ -769,9 +769,8 @@ inferior GHCi process."
       (haskell-session-set-target session target)
       (when (not (string= old-target target))
         (haskell-mode-toggle-interactive-prompt-state)
-        (unwind-protect
-            (when (y-or-n-p "Target changed, restart haskell process? ")
-              (haskell-process-start session)))
+        (when (y-or-n-p "Target changed, restart haskell process? ")
+          (haskell-process-start session))
         (haskell-mode-toggle-interactive-prompt-state t)))))
 
 ;;;###autoload
diff --git a/haskell-customize.el b/haskell-customize.el
index dccddc7a6e..3ed41affe7 100644
--- a/haskell-customize.el
+++ b/haskell-customize.el
@@ -394,7 +394,7 @@ hindent, structured-haskell-mode, tool-de-jour, etc.
 
 You can set this per-project with a .dir-locals.el file"
   :group 'haskell
-  :type '(repeat 'string))
+  :type '(repeat string))
 
 (defcustom haskell-stylish-on-save nil
   "Whether to run stylish-haskell on the buffer before saving.
diff --git a/haskell-indentation.el b/haskell-indentation.el
index 4c2525121c..1576741b7e 100644
--- a/haskell-indentation.el
+++ b/haskell-indentation.el
@@ -1135,8 +1135,7 @@ layout starts."
           (haskell-indentation-add-indentation
            (+ left-indent haskell-indentation-starter-offset))
           (throw 'parse-end nil))
-        (setq phrase1 (cddr phrase)))
-       ((string= (cadr phrase) "in"))))))
+        (setq phrase1 (cddr phrase)))))))
 
 (defun haskell-indentation-add-indentation (indent)
   "" ; FIXME
diff --git a/haskell.el b/haskell.el
index eae8d2b9f8..33e7ac7b47 100644
--- a/haskell.el
+++ b/haskell.el
@@ -167,11 +167,10 @@
   (interactive)
   (when (eq major-mode 'haskell-interactive-mode)
     (haskell-mode-toggle-interactive-prompt-state)
-    (unwind-protect
-        (when (and (boundp 'haskell-session)
-                   haskell-session
-                   (y-or-n-p "Kill the whole session? "))
-          (haskell-session-kill t)))
+    (when (and (boundp 'haskell-session)
+               haskell-session
+               (y-or-n-p "Kill the whole session? "))
+      (haskell-session-kill t))
     (haskell-mode-toggle-interactive-prompt-state t)))
 
 (defun haskell-session-make (name)
@@ -223,13 +222,12 @@ If `haskell-process-load-or-reload-prompt' is nil, accept 
`default'."
     (when (not (string= name ""))
       (let ((session (haskell-session-lookup name)))
         (haskell-mode-toggle-interactive-prompt-state)
-        (unwind-protect
-            (if session
-                (when
-                    (y-or-n-p
-                     (format "Session %s already exists. Use it?" name))
-                  session)
-              (haskell-session-make name)))
+        (if session
+            (when
+                (y-or-n-p
+                 (format "Session %s already exists. Use it?" name))
+              session)
+          (haskell-session-make name))
         (haskell-mode-toggle-interactive-prompt-state t)))))
 
 ;;;###autoload
diff --git a/w3m-haddock.el b/w3m-haddock.el
index 0f6a9e1190..59b118bf96 100644
--- a/w3m-haddock.el
+++ b/w3m-haddock.el
@@ -54,7 +54,7 @@ You can rebind this if you're using hsenv by adding it to your
 
 "
   :group 'haskell
-  :type 'list)
+  :type '(list string))
 
 (defvar w3m-haddock-entry-regex "^\\(\\(data\\|type\\) \\|[a-z].* :: \\)"
   "Regex to match entry headings.")

Reply via email to