From 20c829038cf678dffdcc16a1f331f12a012f61f4 Mon Sep 17 00:00:00 2001 From: Neil Mitchell Date: Wed, 11 Sep 2019 22:45:03 +0100 Subject: [PATCH] Avoid 3 space indents --- src/Development/IDE/Core/Preprocessor.hs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Development/IDE/Core/Preprocessor.hs b/src/Development/IDE/Core/Preprocessor.hs index 707a56ac..abb6cdaf 100644 --- a/src/Development/IDE/Core/Preprocessor.hs +++ b/src/Development/IDE/Core/Preprocessor.hs @@ -33,21 +33,21 @@ import Data.Maybe -- e.g. unlit/cpp. Return the resulting buffer and the DynFlags it implies. preprocessor :: GhcMonad m => FilePath -> Maybe StringBuffer -> ExceptT [FileDiagnostic] m (StringBuffer, DynFlags) preprocessor filename mbContents = do - -- Perform unlit - (isOnDisk, contents) <- if isLiterate filename then do + -- Perform unlit + (isOnDisk, contents) <- if isLiterate filename then do dflags <- getDynFlags newcontent <- liftIO $ runLhs dflags filename mbContents return (False, newcontent) - else do - contents <- liftIO $ maybe (hGetStringBuffer filename) return mbContents - let isOnDisk = isNothing mbContents - return (isOnDisk, contents) + else do + contents <- liftIO $ maybe (hGetStringBuffer filename) return mbContents + let isOnDisk = isNothing mbContents + return (isOnDisk, contents) - -- Perform cpp - dflags <- ExceptT $ parsePragmasIntoDynFlags filename contents - if not $ xopt LangExt.Cpp dflags then + -- Perform cpp + dflags <- ExceptT $ parsePragmasIntoDynFlags filename contents + if not $ xopt LangExt.Cpp dflags then return (contents, dflags) - else do + else do contents <- liftIO $ runCpp dflags filename $ if isOnDisk then Nothing else Just contents dflags <- ExceptT $ parsePragmasIntoDynFlags filename contents return (contents, dflags)