mirror of
https://github.com/google/ormolu.git
synced 2025-01-06 06:33:37 +03:00
Fix rendering of type equalities
Please see the comment in the diff.
This commit is contained in:
parent
057977d60c
commit
8c27549532
@ -0,0 +1,2 @@
|
||||
foo :: (a ~ b) => a -> b -> Int
|
||||
foo = undefined
|
@ -0,0 +1,2 @@
|
||||
foo :: (a ~ b) => a -> b -> Int
|
||||
foo = undefined
|
@ -17,7 +17,6 @@ where
|
||||
import Control.Monad
|
||||
import Data.List (isPrefixOf)
|
||||
import GHC hiding (GhcPs, IE)
|
||||
import Module (Module (..))
|
||||
import Name (nameStableString)
|
||||
import OccName (OccName (..))
|
||||
import Ormolu.Printer.Combinators
|
||||
@ -65,8 +64,15 @@ p_rdrName l@(L spn _) = located l $ \x -> do
|
||||
(atom occName, False)
|
||||
Qual mname occName ->
|
||||
(p_qualName mname occName, False)
|
||||
Orig (Module _ mname) occName ->
|
||||
(p_qualName mname occName, False)
|
||||
Orig _ occName ->
|
||||
-- NOTE This is used when GHC generates code that will be fed
|
||||
-- into the renamer (e.g. from deriving clauses), but where we
|
||||
-- want to say that something comes from given module which is
|
||||
-- not specified in the source code, e.g. @Prelude.map@.
|
||||
--
|
||||
-- My current understanding is that the provided module name
|
||||
-- serves no purpose for us and can be safely ignored.
|
||||
(atom occName, False)
|
||||
Exact name ->
|
||||
-- NOTE I'm not sure this "stable string" is stable enough, but
|
||||
-- it looks like this is the most robust way to tell if we're
|
||||
|
Loading…
Reference in New Issue
Block a user