git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #2021 from purescript/2017-supress-single-hiding-warning
1776455Gary Burgess
src/Language/PureScript/Ide/Imports.hs+2−2
@@ -76,8 +76,8 @@ compImport (Import n i q) (Import n' i' q')
76 | compImportType i i' /= EQ = compImportType i i'
76 | compImportType i i' /= EQ = compImportType i i'
77 -- This means that for a stable sort, the first implicit import will stay
77 -- This means that for a stable sort, the first implicit import will stay
78 -- the first implicit import
78 -- the first implicit import
79− | P.isImplicit i && isNothing q = LT
79+ | not (P.isExplicit i) && isNothing q = LT
80− | P.isImplicit i && isNothing q' = GT
80+ | not (P.isExplicit i) && isNothing q' = GT
81 | otherwise = compare n n'
81 | otherwise = compare n n'
82
82
83-- | Reads a file and returns the (lines before the imports, the imports, the
83-- | Reads a file and returns the (lines before the imports, the imports, the
src/Language/PureScript/Linter/Imports.hs+1−1
@@ -195,7 +195,7 @@ lintImportDecl env mni qualifierName names declType allowImplicit =
195 Just q ->
195 Just q ->
196 let usedModuleNames = mapMaybe extractQualName names
196 let usedModuleNames = mapMaybe extractQualName names
197 in unless (q `elem` usedModuleNames) unused
197 in unless (q `elem` usedModuleNames) unused
198− Hiding _ -> checkImplicit HidingImport
198+ Hiding _ -> unless allowImplicit (checkImplicit HidingImport)
199 Explicit [] -> unused
199 Explicit [] -> unused
200 Explicit declrefs -> checkExplicit declrefs
200 Explicit declrefs -> checkExplicit declrefs
201
201