ghcide/test/preprocessor/Main.hs
Neil Mitchell 70cb92cc01 #279, support preprocessors (#282)
* Support preprocessors

* Add a preprocessor for testing

* Add a preprocessor test
2019-12-19 12:06:03 +01:00

11 lines
205 B
Haskell

module Main(main) where
import System.Environment
main :: IO ()
main = do
_:input:output:_ <- getArgs
let f = map (\x -> if x == 'x' then 'y' else x)
writeFile output . f =<< readFile input