@@ -20,6 +20,7 @@ import System.IO.Extra
2020import System.IO.Unsafe
2121import System.Process.Extra
2222import System.Time.Extra
23+ import Ghclibgen (allowNewerProjectLines , mkAllowNewerFlags )
2324
2425main :: IO ()
2526main = do
@@ -36,18 +37,6 @@ main = do
3637 version <- buildDists ghcFlavor noGhcCheckout noBuilds versionSuffix allowNewerFlags allowNewerSpecs
3738 putStrLn version
3839
39- mkAllowNewerFlags :: [String ] -> String
40- mkAllowNewerFlags xs =
41- let render = unwords . map (\ s -> " --allow-newer=" ++ s)
42- def = " "
43- in case xs of
44- [] -> if null def then " " else " " ++ def
45- _ -> " " ++ render xs
46-
47- allowNewerProjectLines :: [String ] -> [String ]
48- allowNewerProjectLines [] = []
49- allowNewerProjectLines xs = [" allow-newer: " ++ intercalate " , " xs]
50-
5140data Options = Options
5241 { ghcFlavor :: GhcFlavor ,
5342 noGhcCheckout :: Bool ,
@@ -412,7 +401,7 @@ buildDists ghcFlavor noGhcCheckout noBuilds versionSuffix allowNewerFlags allowN
412401 system_ $ " cabal build exe:ghc-lib-gen" ++ allowNewerFlags
413402 system_ $ " cabal run exe:ghc-lib-gen" ++ allowNewerFlags
414403 ++ " -- ghc ../patches --ghc-lib-parser "
415- ++ ghcFlavorArg ++ " " ++ cppOpts ghcFlavor ++ allowNewerFlags
404+ ++ ghcFlavorArg ++ " " ++ cppOpts ghcFlavor ++ allowNewerFlags
416405
417406 patchVersion version " ghc/ghc-lib-parser.cabal"
418407 mkTarball pkg_ghclib_parser
@@ -478,11 +467,11 @@ buildDists ghcFlavor noGhcCheckout noBuilds versionSuffix allowNewerFlags allowN
478467
479468 system_ $ " cd examples/ghc-lib-test-mini-hlint && cabal test " ++
480469 " --project-dir ../.. --test-show-details direct " ++
481- ( " --test-options \" --color always --test-command ../../ghc-lib-test-mini-hlint " ++ ghcFlavorArg ++ " \" " )
470+ " --test-options \" --color always --test-command ../../ghc-lib-test-mini-hlint " ++ ghcFlavorArg ++ " \" "
482471
483472 system_ $ " cd examples/ghc-lib-test-mini-compile && cabal test " ++
484473 " --project-dir ../.. --test-show-details direct " ++
485- ( " --test-options \" --color always --test-command ../../ghc-lib-test-mini-compile " ++ ghcFlavorArg ++ " \" " )
474+ " --test-options \" --color always --test-command ../../ghc-lib-test-mini-compile " ++ ghcFlavorArg ++ " \" "
486475
487476 system_ " cabal -v0 exec -- ghc -ignore-dot-ghci -package=ghc-lib-parser -e \" print 1\" "
488477 system_ " cabal -v0 exec -- ghc -ignore-dot-ghci -package=ghc-lib -e \" print 1\" "
0 commit comments