Skip to content

Commit f95b617

Browse files
jhrcekmichaelpj
authored andcommitted
More stylish
1 parent bd29bc5 commit f95b617

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

ghcide/src/Development/IDE/Core/Compile.hs

+10-9
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ import Development.IDE.Core.Preprocessor
7474
import Development.IDE.Core.RuleTypes
7575
import Development.IDE.Core.Shake
7676
import Development.IDE.Core.Tracing (withTrace)
77-
import Development.IDE.GHC.Compat hiding (loadInterface,
78-
parseHeader, parseModule,
79-
tcRnModule, writeHieFile, assert)
77+
import Development.IDE.GHC.Compat hiding (assert,
78+
loadInterface, parseHeader,
79+
parseModule, tcRnModule,
80+
writeHieFile)
8081
import qualified Development.IDE.GHC.Compat as Compat
8182
import qualified Development.IDE.GHC.Compat as GHC
8283
import qualified Development.IDE.GHC.Compat.Util as Util
@@ -1078,7 +1079,7 @@ getModSummaryFromImports env fp _modTime mContents = do
10781079
forM_ (ms_srcimps ++ ms_textual_imps) $ \(mb_p, m) -> do
10791080
put $ Util.uniq $ moduleNameFS $ unLoc m
10801081
case mb_p of
1081-
G.NoPkgQual -> pure ()
1082+
G.NoPkgQual -> pure ()
10821083
G.ThisPkg uid -> put $ getKey $ getUnique uid
10831084
G.OtherPkg uid -> put $ getKey $ getUnique uid
10841085
return $! Util.fingerprintFingerprints $
@@ -1323,7 +1324,7 @@ loadInterface session ms linkableNeeded RecompilationInfo{..} = do
13231324
_read_dflags = hsc_dflags sessionWithMsDynFlags
13241325
read_result <- liftIO $ readIface _read_dflags _ncu mod iface_file
13251326
case read_result of
1326-
Util.Failed{} -> return Nothing
1327+
Util.Failed{} -> return Nothing
13271328
-- important to call `shareUsages` here before checkOldIface
13281329
-- consults `mi_usages`
13291330
Util.Succeeded iface -> return $ Just (shareUsages iface)
@@ -1416,9 +1417,9 @@ recompBecause =
14161417
data SourceModified = SourceModified | SourceUnmodified deriving (Eq, Ord, Show)
14171418

14181419
showReason :: RecompileRequired -> String
1419-
showReason UpToDate = "UpToDate"
1420-
showReason (NeedsRecompile MustCompile) = "MustCompile"
1421-
showReason (NeedsRecompile s) = printWithoutUniques s
1420+
showReason UpToDate = "UpToDate"
1421+
showReason (NeedsRecompile MustCompile) = "MustCompile"
1422+
showReason (NeedsRecompile s) = printWithoutUniques s
14221423

14231424
mkDetailsFromIface :: HscEnv -> ModIface -> IO ModDetails
14241425
mkDetailsFromIface session iface = do
@@ -1506,7 +1507,7 @@ lookupName hsc_env name = exceptionHandle $ do
15061507
res <- initIfaceLoad hsc_env $ importDecl name
15071508
case res of
15081509
Util.Succeeded x -> return (Just x)
1509-
_ -> return Nothing
1510+
_ -> return Nothing
15101511
where
15111512
exceptionHandle x = x `catch` \(_ :: IOEnvFailure) -> pure Nothing
15121513

ghcide/src/Development/IDE/LSP/Outline.hs

+8-7
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ import Development.IDE.Core.Shake
1919
import Development.IDE.GHC.Compat
2020
import Development.IDE.GHC.Error (rangeToRealSrcSpan,
2121
realSrcSpanToRange)
22-
import Development.IDE.Types.Location
2322
import Development.IDE.GHC.Util (printOutputable)
23+
import Development.IDE.Types.Location
2424
import Ide.Types
25-
import Language.LSP.Protocol.Types (DocumentSymbol (..),
25+
import Language.LSP.Protocol.Message
26+
import Language.LSP.Protocol.Types (DocumentSymbol (..),
2627
DocumentSymbolParams (DocumentSymbolParams, _textDocument),
2728
SymbolKind (..),
2829
TextDocumentIdentifier (TextDocumentIdentifier),
29-
type (|?) (InL, InR), uriToFilePath)
30-
import Language.LSP.Protocol.Message
30+
type (|?) (InL, InR),
31+
uriToFilePath)
3132

3233
-- See Note [Guidelines For Using CPP In GHCIDE Import Statements]
3334

@@ -115,7 +116,7 @@ documentSymbolForDecl (L (locA -> (RealSrcSpan l _)) (TyClD _ DataDecl { tcdLNam
115116
, L (locA -> RealSrcSpan l' _) n <- cs
116117
, let l'' = case con of
117118
L (locA -> RealSrcSpan l''' _) _ -> l'''
118-
_ -> l'
119+
_ -> l'
119120
]
120121
}
121122
where
@@ -246,7 +247,7 @@ hsConDeclsBinders cons
246247
get_flds_h98 :: HsConDeclH98Details GhcPs
247248
-> [LFieldOcc GhcPs]
248249
get_flds_h98 (RecCon flds) = get_flds (reLoc flds)
249-
get_flds_h98 _ = []
250+
get_flds_h98 _ = []
250251

251252
get_flds_gadt :: HsConDeclGADTDetails GhcPs
252253
-> [LFieldOcc GhcPs]
@@ -255,7 +256,7 @@ hsConDeclsBinders cons
255256
#else
256257
get_flds_gadt (RecConGADT flds _) = get_flds (reLoc flds)
257258
#endif
258-
get_flds_gadt _ = []
259+
get_flds_gadt _ = []
259260

260261
get_flds :: Located [LConDeclField GhcPs]
261262
-> [LFieldOcc GhcPs]

0 commit comments

Comments
 (0)