intero 0.1.37 → 0.1.38
raw patch · 6 files changed
+46/−30 lines, 6 files
Files
- CHANGELOG +3/−0
- README.md +3/−1
- elisp/intero.el +23/−14
- intero.cabal +1/−1
- src/InteractiveUI.hs +1/−1
- src/test/Main.hs +15/−13
CHANGELOG view
@@ -1,3 +1,6 @@+0.1.38:+ * Fix bug of getting encoding for networked queries+ 0.1.37: * Fix completion listing deferred names
README.md view
@@ -1,8 +1,10 @@-# intero [](https://travis-ci.org/chrisdone/intero) [](https://melpa.org/#/intero) [](https://stable.melpa.org/#/intero) [](https://ci.appveyor.com/project/chrisdone/intero)+# intero [](https://travis-ci.org/chrisdone/intero)  Complete interactive development program for Haskell ## Intero for Emacs++[](https://melpa.org/#/intero) [](https://stable.melpa.org/#/intero) Please see [the homepage for Intero for Emacs](http://chrisdone.github.io/intero).
elisp/intero.el view
@@ -72,9 +72,9 @@ (defcustom intero-package-version (cl-case system-type ;; Until <https://github.com/haskell/network/issues/313> is fixed:- (windows-nt "0.1.36")- (cygwin "0.1.36")- (t "0.1.36"))+ (windows-nt "0.1.38")+ (cygwin "0.1.38")+ (t "0.1.38")) "Package version to auto-install. This version does not necessarily have to be the latest version@@ -236,15 +236,23 @@ `intero-whitelist' and `intero-blacklist'. If both the whitelist and blacklist match, then the whitelist entry wins, and `intero-mode' is enabled."- (when (and (derived-mode-p 'haskell-mode)- (let* ((file (or (buffer-file-name) default-directory))- (blacklisted (intero-directories-contain-file- file intero-blacklist))- (whitelisted (intero-directories-contain-file- file intero-whitelist)))- (or whitelisted (not blacklisted))))+ (when (intero-mode-should-start-p) (intero-mode 1))) +(defun intero-mode-should-start-p ()+ "Predicate whether intero should start given user config.+The buffer's filename (or working directory) is checked against+`intero-whitelist' and `intero-blacklist'. If both the whitelist+and blacklist match, then the whitelist entry wins, and+`intero-mode' is enabled."+ (and (derived-mode-p 'haskell-mode)+ (let* ((file (or (buffer-file-name) default-directory))+ (blacklisted (intero-directories-contain-file+ file intero-blacklist))+ (whitelisted (intero-directories-contain-file+ file intero-whitelist)))+ (or whitelisted (not blacklisted)))))+ ;;;###autoload (define-globalized-minor-mode intero-global-mode intero-mode intero-mode-maybe@@ -3170,10 +3178,11 @@ ;; Add a note if we found a suggestion to make (when note (setf (flycheck-error-message msg)- (concat text- "\n\n"- (propertize "(Hit `C-c C-r' in the Haskell buffer to apply suggestions)"- 'face 'font-lock-warning-face)))))))+ (concat text "\n\n"+ (propertize+ (substitute-command-keys+ "(Hit `\\[intero-apply-suggestions]' in the Haskell buffer to apply suggestions)")+ 'face 'font-lock-warning-face))))))) (setq intero-lighter (if (null intero-suggestions) " Intero"
intero.cabal view
@@ -1,7 +1,7 @@ name: intero version:- 0.1.37+ 0.1.38 synopsis: Complete interactive development program for Haskell license:
src/InteractiveUI.hs view
@@ -694,7 +694,7 @@ (let loop = do (h, _, _) <- Network.accept sock hSetBuffering h NoBuffering- mencoding <- hGetEncoding stdin+ mencoding <- hGetEncoding stdout hSetEncoding h (fromMaybe utf8 mencoding) _ <- forkIO
src/test/Main.hs view
@@ -6,7 +6,7 @@ import Control.Exception import Control.Monad.IO.Class-import Control.Monad (forM_)+import Control.Monad (when, forM_) import Data.Char import System.IO import System.IO.Temp@@ -411,18 +411,20 @@ (["\"sort\"", "\"sortBy\""]))) describe "Completion in module context"- (do issue- ":complete-at for defered scope names"- "https://github.com/chrisdone/intero/issues/531"- (atFile- ":complete-at"- "X.hs"- -- All these type annotations are required for GHC 8.6.3- -- to accept the input without error.- "{-# OPTIONS -fdefer-type-errors #-}\nmodule X where\ng a = fiiila (filu :: Char) a (fi :: Int)\n where fiiila _ _ _ = 123"- (2, 14, 2, 17, "fi")- lines- ["fiiila", "filter"])+ (do when+ ghc8_2+ (issue+ ":complete-at for defered scope names"+ "https://github.com/chrisdone/intero/issues/531"+ (atFile+ ":complete-at"+ "X.hs"+ -- All these type annotations are required for GHC 8.6.3+ -- to accept the input without error.+ "{-# OPTIONS -fdefer-type-errors #-}\nmodule X where\ng a = fiiila (filu :: Char) a (fi :: Int)\n where fiiila _ _ _ = 123"+ (2, 14, 2, 17, "fi")+ lines+ ["fiiila", "filter"])) it ":complete-at for put*" (atFile