GHC version check.
This commit is contained in:
parent
df847d9e96
commit
f1aeaa8d81
6
Check.hs
6
Check.hs
@ -1,3 +1,5 @@
|
|||||||
|
{-# LANGUAGE CPP #-}
|
||||||
|
|
||||||
module Check (checkSyntax) where
|
module Check (checkSyntax) where
|
||||||
|
|
||||||
import Control.Applicative
|
import Control.Applicative
|
||||||
@ -15,7 +17,11 @@ import System.Process
|
|||||||
checkSyntax :: Options -> String -> IO String
|
checkSyntax :: Options -> String -> IO String
|
||||||
checkSyntax opt file = do
|
checkSyntax opt file = do
|
||||||
makeDirectory (outDir opt)
|
makeDirectory (outDir opt)
|
||||||
|
#if __GLASGOW_HASKELL__ == 612
|
||||||
(_,_,herr,_) <- runInteractiveProcess (ghc opt) ["--make","-Wall","-fno-warn-unused-do-bind",file,"-outputdir","dist/flymake","-o","dist/flymake/a.out","-i..","-i../..","-i../../..","-i../../../..","-i../../../../.."] Nothing Nothing
|
(_,_,herr,_) <- runInteractiveProcess (ghc opt) ["--make","-Wall","-fno-warn-unused-do-bind",file,"-outputdir","dist/flymake","-o","dist/flymake/a.out","-i..","-i../..","-i../../..","-i../../../..","-i../../../../.."] Nothing Nothing
|
||||||
|
#else
|
||||||
|
(_,_,herr,_) <- runInteractiveProcess (ghc opt) ["--make","-Wall",file,"-outputdir","dist/flymake","-o","dist/flymake/a.out","-i..","-i../..","-i../../..","-i../../../..","-i../../../../.."] Nothing Nothing
|
||||||
|
#endif
|
||||||
hSetBinaryMode herr False
|
hSetBinaryMode herr False
|
||||||
refine <$> hGetContents herr
|
refine <$> hGetContents herr
|
||||||
where
|
where
|
||||||
|
@ -24,8 +24,11 @@ Data-Files: Makefile ghc.el ghc-func.el ghc-doc.el ghc-comp.el
|
|||||||
Executable ghc-mod
|
Executable ghc-mod
|
||||||
Main-Is: GHCMod.hs
|
Main-Is: GHCMod.hs
|
||||||
Other-Modules: List Browse Check Param Lang
|
Other-Modules: List Browse Check Param Lang
|
||||||
GHC-Options: -Wall -fno-warn-unused-do-bind
|
if impl(ghc >= 6.12)
|
||||||
Build-Depends: base >= 4.0 && < 10,
|
GHC-Options: -Wall -O2 -fno-warn-unused-do-bind
|
||||||
|
else
|
||||||
|
GHC-Options: -Wall -O2
|
||||||
|
Build-Depends: base >= 4.0 && < 5,
|
||||||
parsec >= 3, process, haskell-src-exts,
|
parsec >= 3, process, haskell-src-exts,
|
||||||
directory, filepath
|
directory, filepath
|
||||||
Source-Repository head
|
Source-Repository head
|
||||||
|
Loading…
Reference in New Issue
Block a user