GHC version check.
This commit is contained in:
6
Check.hs
6
Check.hs
@@ -1,3 +1,5 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Check (checkSyntax) where
|
||||
|
||||
import Control.Applicative
|
||||
@@ -15,7 +17,11 @@ import System.Process
|
||||
checkSyntax :: Options -> String -> IO String
|
||||
checkSyntax opt file = do
|
||||
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
|
||||
#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
|
||||
refine <$> hGetContents herr
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user