summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2020-10-13 02:39:12 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-10-19 18:16:20 -0400
commitb5b3e34ec39fc89a0bcd0b60cf9a4962c89ba72f (patch)
tree82f4f5360a5450d5e86fb9e0204af7b4712ae26b /ghc
parentd858a3aebee5adc447556b668b65b6e46370d8c0 (diff)
downloadhaskell-b5b3e34ec39fc89a0bcd0b60cf9a4962c89ba72f.tar.gz
Implement -Woperator-whitespace (#18834)
This patch implements two related warnings: -Woperator-whitespace-ext-conflict warns on uses of infix operators that would be parsed differently were a particular GHC extension enabled -Woperator-whitespace warns on prefix, suffix, and tight infix uses of infix operators Updates submodules: haddock, containers.
Diffstat (limited to 'ghc')
-rw-r--r--ghc/GHCi/UI/Tags.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/ghc/GHCi/UI/Tags.hs b/ghc/GHCi/UI/Tags.hs
index bc86f39766..53c33ccbfe 100644
--- a/ghc/GHCi/UI/Tags.hs
+++ b/ghc/GHCi/UI/Tags.hs
@@ -95,7 +95,7 @@ listModuleTags m = do
dflags <- getDynFlags
mb_print_unqual <- GHC.mkPrintUnqualifiedForModule mInfo
let unqual = fromMaybe GHC.alwaysQualify mb_print_unqual
- let names = fromMaybe [] $GHC.modInfoTopLevelScope mInfo
+ let names = fromMaybe [] $ GHC.modInfoTopLevelScope mInfo
let localNames = filter ((m==) . nameModule) names
mbTyThings <- mapM GHC.lookupName localNames
return $! [ tagInfo dflags unqual exported kind name realLoc
@@ -153,11 +153,11 @@ collateAndWriteTags CTagsWithLineNumbers file tagInfos = do
-- ctags style with the Ex expression being a regex searching the line, Vim et al
collateAndWriteTags CTagsWithRegExes file tagInfos = do -- ctags style, Vim et al
tagInfoGroups <- makeTagGroupsWithSrcInfo tagInfos
- let tags = unlines $ sort $ map showCTag $concat tagInfoGroups
+ let tags = unlines $ sort $ map showCTag $ concat tagInfoGroups
tryIO (writeTagsSafely file tags)
collateAndWriteTags ETags file tagInfos = do -- etags style, Emacs/XEmacs
- tagInfoGroups <- makeTagGroupsWithSrcInfo $filter tagExported tagInfos
+ tagInfoGroups <- makeTagGroupsWithSrcInfo $ filter tagExported tagInfos
let tagGroups = map processGroup tagInfoGroups
tryIO (writeTagsSafely file $ concat tagGroups)
@@ -176,7 +176,7 @@ makeTagGroupsWithSrcInfo tagInfos = do
where
addTagSrcInfo [] = throwGhcException (CmdLineError "empty tag file group??")
addTagSrcInfo group@(tagInfo:_) = do
- file <- readFile $tagFile tagInfo
+ file <- readFile $ tagFile tagInfo
let sortedGroup = sortBy (comparing tagLine) group
return $ perFile sortedGroup 1 0 $ lines file
@@ -197,7 +197,7 @@ showCTag ti =
where
tagCmd =
case tagSrcInfo ti of
- Nothing -> show $tagLine ti
+ Nothing -> show $ tagLine ti
Just (srcLine,_) -> "/^"++ foldr escapeSlashes [] srcLine ++"$/"
where