ghc-mod 1.10.12 → 1.10.13
raw patch · 6 files changed
+20/−8 lines, 6 files
Files
- CabalDev.hs +10/−4
- GHCMod.hs +3/−0
- Types.hs +2/−0
- elisp/ghc-info.el +3/−2
- elisp/ghc.el +1/−1
- ghc-mod.cabal +1/−1
CabalDev.hs view
@@ -17,16 +17,22 @@ modifyOptions :: Options -> IO Options modifyOptions opts = found ||> notFound where- found = addPath opts <$> findCabalDev+ found = addPath opts <$> findCabalDev (sandbox opts) notFound = return opts -findCabalDev :: IO String-findCabalDev = getCurrentDirectory >>= searchIt . splitPath+findCabalDev :: Maybe String -> IO FilePath+findCabalDev (Just path) = do+ exist <- doesDirectoryExist path+ if exist then+ findConf path+ else+ findCabalDev Nothing+findCabalDev Nothing = getCurrentDirectory >>= searchIt . splitPath addPath :: Options -> String -> Options addPath orig_opts path = do let orig_ghcopt = ghcOpts orig_opts- orig_opts { ghcOpts = orig_ghcopt ++ ["-package-conf", path] }+ orig_opts { ghcOpts = orig_ghcopt ++ ["-package-conf", path, "-no-user-package-conf"] } searchIt :: [FilePath] -> IO FilePath searchIt [] = throwIO $ userError "Not found"
GHCMod.hs view
@@ -57,6 +57,9 @@ , Option "o" ["operators"] (NoArg (\opts -> opts { operators = True })) "print operators, too"+ , Option "s" ["sandbox"]+ (ReqArg (\s opts -> opts { sandbox = Just s }) "path")+ "specify cabal-dev sandbox (default 'cabal-dev`)" ] parseArgs :: [OptDescr (Options -> Options)] -> [String] -> (Options, [String])
Types.hs view
@@ -10,6 +10,7 @@ , ghcOpts :: [String] , operators :: Bool , expandSplice :: Bool+ , sandbox :: Maybe String } defaultOptions :: Options@@ -19,6 +20,7 @@ , ghcOpts = [] , operators = False , expandSplice = False+ , sandbox = Nothing } ----------------------------------------------------------------
elisp/ghc-info.el view
@@ -54,7 +54,7 @@ (ghc-type-clear-overlay) (setq after-change-functions (cons 'ghc-type-clear-overlay after-change-functions))- (set (make-local-variable 'post-command-hook) 'ghc-type-post-command-hook))+ (add-hook 'post-command-hook 'ghc-type-post-command-hook)) (defun ghc-type-clear-overlay (&optional beg end len) (when (overlayp ghc-type-overlay)@@ -63,7 +63,8 @@ (move-overlay ghc-type-overlay 0 0))) (defun ghc-type-post-command-hook ()- (when (and (overlayp ghc-type-overlay)+ (when (and (eq major-mode 'haskell-mode)+ (overlayp ghc-type-overlay) (/= (ghc-type-get-point) (point))) (ghc-type-clear-overlay)))
elisp/ghc.el view
@@ -16,7 +16,7 @@ ;;; Code: -(defconst ghc-version "1.10.11")+(defconst ghc-version "1.10.13") ;; (eval-when-compile ;; (require 'haskell-mode))
ghc-mod.cabal view
@@ -1,5 +1,5 @@ Name: ghc-mod-Version: 1.10.12+Version: 1.10.13 Author: Kazu Yamamoto <kazu@iij.ad.jp> Maintainer: Kazu Yamamoto <kazu@iij.ad.jp> License: BSD3