packages feed

ghc-mod 4.1.2 → 4.1.3

raw patch · 4 files changed

+19/−6 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Language/Haskell/GhcMod/GHCApi.hs view
@@ -8,6 +8,7 @@   , getDynamicFlags   , getSystemLibDir   , withDynFlags+  , withCmdFlags   , setNoWaringFlags   , setAllWaringFlags   ) where@@ -173,6 +174,15 @@     setup = do         dflag <- G.getSessionDynFlags         void $ G.setSessionDynFlags (setFlag dflag)+        return dflag+    teardown = void . G.setSessionDynFlags++withCmdFlags :: [GHCOption] -> Ghc a -> Ghc a+withCmdFlags flags body = G.gbracket setup teardown (\_ -> body)+  where+    setup = do+        dflag <- G.getSessionDynFlags >>= addCmdOpts flags+        void $ G.setSessionDynFlags dflag         return dflag     teardown = void . G.setSessionDynFlags 
Language/Haskell/GhcMod/Logger.hs view
@@ -9,6 +9,7 @@ import Control.Applicative ((<$>)) import CoreMonad (liftIO) import Data.IORef (IORef, newIORef, readIORef, writeIORef, modifyIORef)+import Data.List (isPrefixOf) import Data.Maybe (fromMaybe) import ErrUtils (ErrMsg, errMsgShortDoc, errMsgExtraInfo) import Exception (ghandle)@@ -16,9 +17,9 @@ import qualified GHC as G import HscTypes (SourceError, srcErrorMessages) import Language.Haskell.GhcMod.Doc (showPage, getStyle)-import Language.Haskell.GhcMod.GHCApi (withDynFlags)+import Language.Haskell.GhcMod.GHCApi (withDynFlags, withCmdFlags) import qualified Language.Haskell.GhcMod.Gap as Gap-import Language.Haskell.GhcMod.Types (Options, convert)+import Language.Haskell.GhcMod.Types (Options(..), convert) import Outputable (PprStyle, SDoc) import System.FilePath (normalise) @@ -51,10 +52,12 @@ withLogger opt setDF body = ghandle (sourceError opt) $ do     logref <- liftIO $ newLogRef     withDynFlags (setLogger logref . setDF) $ do-        body-        liftIO $ Right <$> readAndClearLogRef opt logref+        withCmdFlags wflags $ do+            body+            liftIO $ Right <$> readAndClearLogRef opt logref   where     setLogger logref df = Gap.setLogAction df $ appendLogRef df logref+    wflags = filter ("-fno-warn" `isPrefixOf`) $ ghcOpts opt  ---------------------------------------------------------------- 
elisp/ghc-doc.el view
@@ -31,7 +31,7 @@  (defun ghc-resolve-document-path (mod)   (with-temp-buffer-    (ghc-call-process "ghc-mod" nil t nil "doc" mod)+    (ghc-call-process ghc-module-command nil t nil "doc" mod)     (goto-char (point-min))     (when (looking-at "^\\([^ ]+\\)-\\([0-9]*\\(\\.[0-9]+\\)*\\) \\(.*\\)$")       (ghc-make-pkg-ver-path
ghc-mod.cabal view
@@ -1,5 +1,5 @@ Name:                   ghc-mod-Version:                4.1.2+Version:                4.1.3 Author:                 Kazu Yamamoto <kazu@iij.ad.jp> Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp> License:                BSD3