Support GHC < 7.6.0 which doesn't have getExecutablePath

This commit is contained in:
Kohei Suzuki 2013-10-05 12:19:30 +09:00
parent 9469058d58
commit b0f20ffb04
2 changed files with 7 additions and 0 deletions

View File

@ -131,6 +131,8 @@ Test-Suite spec
, time
, transformers
, hspec >= 1.7.1
if impl(ghc < 7.6.0)
Build-Depends: executable-path
Source-Repository head
Type: git

View File

@ -1,10 +1,15 @@
{-# LANGUAGE CPP #-}
module InfoSpec where
import Control.Applicative ((<$>))
import Data.List (isPrefixOf)
import Language.Haskell.GhcMod
import Language.Haskell.GhcMod.Cradle
#ifdef VERSION_executable_path
import System.Environment.Executable (getExecutablePath)
#else
import System.Environment (getExecutablePath)
#endif
import System.Exit
import System.FilePath
import System.Process