packages feed

ghc-mod 3.1.2 → 3.1.3

raw patch · 3 files changed

+18/−4 lines, 3 filesdep +executable-path

Dependencies added: executable-path

Files

Language/Haskell/GhcMod/GHCApi.hs view
@@ -116,13 +116,13 @@  -- FIXME removing Options modifyFlags :: DynFlags -> [IncludeDir] -> [Package] -> Bool -> Build -> DynFlags-modifyFlags d0 idirs pepPkgs splice build+modifyFlags d0 idirs depPkgs splice build   | splice    = setSplice d4   | otherwise = d4   where     d1 = d0 { importPaths = idirs }     d2 = setFastOrNot d1 Fast-    d3 = Gap.addDevPkgs d2 pepPkgs+    d3 = Gap.addDevPkgs d2 depPkgs     d4 | build == CabalPkg = Gap.setCabalPkg d3        | otherwise         = d3 
ghc-mod.cabal view
@@ -1,5 +1,5 @@ Name:                   ghc-mod-Version:                3.1.2+Version:                3.1.3 Author:                 Kazu Yamamoto <kazu@iij.ad.jp> Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp> License:                BSD3@@ -131,6 +131,8 @@                       , time                       , transformers                       , hspec >= 1.7.1+  if impl(ghc < 7.6.0)+    Build-Depends: executable-path  Source-Repository head   Type:                 git
test/InfoSpec.hs view
@@ -1,9 +1,17 @@+{-# LANGUAGE CPP #-} module InfoSpec where +import Control.Applicative ((<$>)) import Data.List (isPrefixOf) import Language.Haskell.GhcMod import Language.Haskell.GhcMod.Cradle+#if __GLASGOW_HASKELL__ < 706+import System.Environment.Executable (getExecutablePath)+#else+import System.Environment (getExecutablePath)+#endif import System.Exit+import System.FilePath import System.Process import Test.Hspec @@ -50,5 +58,9 @@                 res `shouldSatisfy` ("bar :: [Char]" `isPrefixOf`)          it "doesn't fail on unicode output" $ do-            code <- rawSystem "dist/build/ghc-mod/ghc-mod" ["info", "test/data/Unicode.hs", "Unicode", "unicode"]+            dir <- getDistDir+            code <- rawSystem (dir </> "build/ghc-mod/ghc-mod") ["info", "test/data/Unicode.hs", "Unicode", "unicode"]             code `shouldSatisfy` (== ExitSuccess)++getDistDir :: IO FilePath+getDistDir = takeDirectory . takeDirectory . takeDirectory <$> getExecutablePath