@@ -17,7 +17,6 @@ where
1717import Control.Monad
1818import Data.List (isPrefixOf)
1919import GHC hiding (GhcPs, IE)
20−import Module (Module (..))
2120import Name (nameStableString)
2221import OccName (OccName (..))
2322import Ormolu.Printer.Combinators
@@ -65,8 +64,15 @@ p_rdrName l@(L spn _) = located l $ \x -> do
6564 (atom occName, False)
6665 Qual mname occName ->
6766 (p_qualName mname occName, False)
68− Orig (Module _ mname) occName ->
69− (p_qualName mname occName, False)
67+ Orig _ occName ->
68+ -- NOTE This is used when GHC generates code that will be fed
69+ -- into the renamer (e.g. from deriving clauses), but where we
70+ -- want to say that something comes from given module which is
71+ -- not specified in the source code, e.g. @Prelude.map@.
72+ --
73+ -- My current understanding is that the provided module name
74+ -- serves no purpose for us and can be safely ignored.
75+ (atom occName, False)
7076 Exact name ->
7177 -- NOTE I'm not sure this "stable string" is stable enough, but
7278 -- it looks like this is the most robust way to tell if we're