diff options
author | Roland Senn <rsx@bluewin.ch> | 2018-11-11 11:21:26 +0100 |
---|---|---|
committer | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2018-11-11 11:21:34 +0100 |
commit | 98f8e1c2454b8c99cbb225e4a8a544288eeb082a (patch) | |
tree | b37269847ac7170ddb273b0decd7b2087b6d8f3e /compiler/rename | |
parent | b337906ca04c8ac6b9a5b11dcc0cbb954cb44cab (diff) | |
download | haskell-98f8e1c2454b8c99cbb225e4a8a544288eeb082a.tar.gz |
Respect naming conventions in module RnUnbound.hs in fix for #15611
Summary:
The patch https://phabricator.haskell.org/D5284
didn't respect the local naming conventions in module
compiler/rename/RnUnbound.hs:
- Top level functions names are written in camelCase.
- Local function names in where clauses are written as names_with_underscores.
This patch restores these conventions.
Test Plan: make test TESTS="T15611a T15611b"
Reviewers: DavidEichmann, monoidal, hvr, mpickering, bgamari
Reviewed By: mpickering
Subscribers: rwbarton, carter
GHC Trac Issues: #15611
Differential Revision: https://phabricator.haskell.org/D5308
Diffstat (limited to 'compiler/rename')
-rw-r--r-- | compiler/rename/RnUnbound.hs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler/rename/RnUnbound.hs b/compiler/rename/RnUnbound.hs index 97d3fd7279..bf481c538e 100644 --- a/compiler/rename/RnUnbound.hs +++ b/compiler/rename/RnUnbound.hs @@ -238,7 +238,7 @@ importSuggestions where_look hpt currMod imports rdr_name | not (isQual rdr_name || isUnqual rdr_name) = Outputable.empty | null interesting_imports , Just name <- mod_name - , showNotImportedLine (fromJust mod_name) + , show_not_imported_line name = hsep [ text "No module named" , quotes (ppr name) @@ -341,18 +341,18 @@ importSuggestions where_look hpt currMod imports rdr_name (helpful_imports_hiding, helpful_imports_non_hiding) = partition (imv_is_hiding . snd) helpful_imports - -- See note [showNotImportedLine] - showNotImportedLine :: ModuleName -> Bool -- #15611 - showNotImportedLine modnam + -- See note [When to show/hide the module-not-imported line] + show_not_imported_line :: ModuleName -> Bool -- #15611 + show_not_imported_line modnam | modnam `elem` fmap moduleName (moduleEnvKeys (imp_mods imports)) = False -- 1 - | moduleName currMod == modnam = False -- 2.1 - | isLastLoadedMod modnam hptUniques = False -- 2.2 - | otherwise = True + | moduleName currMod == modnam = False -- 2.1 + | is_last_loaded_mod modnam hpt_uniques = False -- 2.2 + | otherwise = True where - hptUniques = map fst (udfmToList hpt) - isLastLoadedMod _ [] = False - isLastLoadedMod modnam uniqs = last uniqs == getUnique modnam + hpt_uniques = map fst (udfmToList hpt) + is_last_loaded_mod _ [] = False + is_last_loaded_mod modnam uniqs = last uniqs == getUnique modnam extensionSuggestions :: RdrName -> SDoc extensionSuggestions rdrName @@ -366,7 +366,7 @@ perhapsForallMsg = vcat [ text "Perhaps you intended to use ExplicitForAll or similar flag" , text "to enable explicit-forall syntax: forall <tvs>. <type>"] -{- Note [showNotImportedLine] -- #15611 +{- Note [When to show/hide the module-not-imported line] -- #15611 For the error message: Not in scope X.Y Module X does not export Y |