Testsuite: tabs -> spaces [skip ci]
[ghc.git] / testsuite / tests / ghc-api / T10942.hs
1 module Main where
2
3 import DynFlags
4 import GHC
5
6 import Control.Monad.IO.Class (liftIO)
7 import System.Environment
8 import HeaderInfo
9 import Outputable
10 import StringBuffer
11
12 main :: IO ()
13 main = do
14 [libdir] <- getArgs
15 runGhc (Just libdir) $ do
16 dflags <- getSessionDynFlags
17 let dflags' = dflags `gopt_set` Opt_KeepRawTokenStream
18 `gopt_set` Opt_Haddock
19 filename = "T10942_A.hs"
20 setSessionDynFlags dflags'
21 stringBuffer <- liftIO $ hGetStringBuffer filename
22 liftIO $ print (map unLoc (getOptions dflags' stringBuffer filename))