3 import System
.Environment
8 let (srcDirs
, ghcArgs
) = splitArgs rest
9 let isGood
= srcDirs
== ["."] && "-outputdir" `
elem` ghcArgs
11 then writeFile (tgt
</> "Main.hs") $ "module Main where main = pure ()"
12 else writeFile (tgt
</> "Main.hs") $ "module Main where main = error \"failure\""
16 go r
("--":xs
) = (reverse r
, xs
)
17 go r
(x
:xs
) = go
(x
:r
) xs
18 go r
[] = (reverse r
, [])