aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2017-12-01 15:50:01 +0200
committerDaniel Gröber <dxld@darkboxed.org>2018-01-18 14:10:26 +0100
commit50cee19b18b30d916033867ebdbfe79894d22581 (patch)
treedd411aab74d706c5738087841e1a4ad304a0af62 /tests
parent6f421af602bf1e2c080e41461004e0101381cacb (diff)
Revert indentation
Diffstat (limited to 'tests')
-rw-r--r--tests/GhcSession.hs60
1 files changed, 30 insertions, 30 deletions
diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs
index 772869b..8ed76be 100644
--- a/tests/GhcSession.hs
+++ b/tests/GhcSession.hs
@@ -101,50 +101,50 @@ compileModule ep opts = do
E.handle (\(ec :: ExitCode) -> print ec >> return False) $ do
#if __GLASGOW_HASKELL__ <= 704
- defaultErrorHandler defaultLogAction $ do
+ defaultErrorHandler defaultLogAction $ do
#else
- defaultErrorHandler defaultFatalMessager defaultFlushOut $ do
+ defaultErrorHandler defaultFatalMessager defaultFlushOut $ do
#endif
- runGhc (Just libdir) $ do
+ runGhc (Just libdir) $ do
- dflags0 <- getSessionDynFlags
- let dflags1 = dflags0 {
- ghcMode = CompManager
- , ghcLink = LinkInMemory
- , hscTarget = HscInterpreted
- , optLevel = 0
- }
+ dflags0 <- getSessionDynFlags
+ let dflags1 = dflags0 {
+ ghcMode = CompManager
+ , ghcLink = LinkInMemory
+ , hscTarget = HscInterpreted
+ , optLevel = 0
+ }
- (dflags2, _, _) <- parseDynamicFlags dflags1 (map noLoc opts)
- _ <- setSessionDynFlags dflags2
+ (dflags2, _, _) <- parseDynamicFlags dflags1 (map noLoc opts)
+ _ <- setSessionDynFlags dflags2
- ts <- mapM (\t -> guessTarget t Nothing) $
- case ep of
- ChLibEntrypoint ms ms' -> map unChModuleName $ ms ++ ms'
- ChExeEntrypoint m ms -> [m] ++ map unChModuleName ms
- ChSetupEntrypoint -> ["Setup.hs"]
- let ts' = map (\t -> t { targetAllowObjCode = False }) ts
+ ts <- mapM (\t -> guessTarget t Nothing) $
+ case ep of
+ ChLibEntrypoint ms ms' -> map unChModuleName $ ms ++ ms'
+ ChExeEntrypoint m ms -> [m] ++ map unChModuleName ms
+ ChSetupEntrypoint -> ["Setup.hs"]
+ let ts' = map (\t -> t { targetAllowObjCode = False }) ts
- setTargets ts'
- _ <- load LoadAllTargets
+ setTargets ts'
+ _ <- load LoadAllTargets
#if __GLASGOW_HASKELL__ >= 706
- setContext $ case ep of
- ChLibEntrypoint ms ms' ->
- map (IIModule . mkModuleName . unChModuleName) $ ms ++ ms'
- ChExeEntrypoint _ ms ->
- map (IIModule . mkModuleName . unChModuleName) $ ChModuleName "Main" : ms
- ChSetupEntrypoint ->
- map (IIModule . mkModuleName) ["Main"]
+ setContext $ case ep of
+ ChLibEntrypoint ms ms' ->
+ map (IIModule . mkModuleName . unChModuleName) $ ms ++ ms'
+ ChExeEntrypoint _ ms ->
+ map (IIModule . mkModuleName . unChModuleName) $ ChModuleName "Main" : ms
+ ChSetupEntrypoint ->
+ map (IIModule . mkModuleName) ["Main"]
#endif
#if __GLASGOW_HASKELL__ <= 706
- GhcMonad.liftIO $ print ExitSuccess
+ GhcMonad.liftIO $ print ExitSuccess
#else
- liftIO $ print ExitSuccess
+ liftIO $ print ExitSuccess
#endif
- return True
+ return True
unChModuleName :: ChModuleName -> String
unChModuleName (ChModuleName mn) = mn