Support GHC < 7.6.0 which doesn't have getExecutablePath
This commit is contained in:
parent
9469058d58
commit
b0f20ffb04
@ -131,6 +131,8 @@ Test-Suite spec
|
|||||||
, time
|
, time
|
||||||
, transformers
|
, transformers
|
||||||
, hspec >= 1.7.1
|
, hspec >= 1.7.1
|
||||||
|
if impl(ghc < 7.6.0)
|
||||||
|
Build-Depends: executable-path
|
||||||
|
|
||||||
Source-Repository head
|
Source-Repository head
|
||||||
Type: git
|
Type: git
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
|
{-# LANGUAGE CPP #-}
|
||||||
module InfoSpec where
|
module InfoSpec where
|
||||||
|
|
||||||
import Control.Applicative ((<$>))
|
import Control.Applicative ((<$>))
|
||||||
import Data.List (isPrefixOf)
|
import Data.List (isPrefixOf)
|
||||||
import Language.Haskell.GhcMod
|
import Language.Haskell.GhcMod
|
||||||
import Language.Haskell.GhcMod.Cradle
|
import Language.Haskell.GhcMod.Cradle
|
||||||
|
#ifdef VERSION_executable_path
|
||||||
|
import System.Environment.Executable (getExecutablePath)
|
||||||
|
#else
|
||||||
import System.Environment (getExecutablePath)
|
import System.Environment (getExecutablePath)
|
||||||
|
#endif
|
||||||
import System.Exit
|
import System.Exit
|
||||||
import System.FilePath
|
import System.FilePath
|
||||||
import System.Process
|
import System.Process
|
||||||
|
Loading…
Reference in New Issue
Block a user