diff options
author | romes <rodrigo.m.mesquita@gmail.com> | 2022-06-29 15:36:43 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-07-03 14:11:31 -0400 |
commit | c43dbac08b0d56406fe13de1e9b49c944f478b4a (patch) | |
tree | 1a0a40e0095544aa814455e1f0b71fe44cf09c42 /compiler/GHC/Hs | |
parent | f9f8099598fd169fa2f17305fc660e5c473f8836 (diff) | |
download | haskell-c43dbac08b0d56406fe13de1e9b49c944f478b4a.tar.gz |
Refactor ModuleName to L.H.S.Module.Name
ModuleName used to live in GHC.Unit.Module.Name. In this commit, the
definition of ModuleName and its associated functions are moved to
Language.Haskell.Syntax.Module.Name according to the current plan
towards making the AST GHC-independent.
The instances for ModuleName for Outputable, Uniquable and Binary were
moved to the module in which the class is defined because these instances
depend on GHC.
The instance of Eq for ModuleName is slightly changed to no longer
depend on unique explicitly and instead uses FastString's instance of
Eq.
Diffstat (limited to 'compiler/GHC/Hs')
-rw-r--r-- | compiler/GHC/Hs/Doc.hs | 5 | ||||
-rw-r--r-- | compiler/GHC/Hs/ImpExp.hs | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/compiler/GHC/Hs/Doc.hs b/compiler/GHC/Hs/Doc.hs index 91f584c8d9..209f9608eb 100644 --- a/compiler/GHC/Hs/Doc.hs +++ b/compiler/GHC/Hs/Doc.hs @@ -36,7 +36,6 @@ import qualified GHC.Data.EnumSet as EnumSet import GHC.Data.EnumSet (EnumSet) import GHC.Types.Avail import GHC.Types.Name.Set -import GHC.Unit.Module.Name import GHC.Driver.Flags import Control.Applicative (liftA2) @@ -48,13 +47,15 @@ import qualified Data.Map as Map import Data.List.NonEmpty (NonEmpty(..)) import GHC.LanguageExtensions.Type import qualified GHC.Utils.Outputable as O -import Language.Haskell.Syntax.Extension import GHC.Hs.Extension import GHC.Types.Unique.Map import Data.List (sortBy) import GHC.Hs.DocString +import Language.Haskell.Syntax.Extension +import Language.Haskell.Syntax.Module.Name + -- | A docstring with the (probable) identifiers found in it. type HsDoc = WithHsDocIdentifiers HsDocString diff --git a/compiler/GHC/Hs/ImpExp.hs b/compiler/GHC/Hs/ImpExp.hs index 1f13d8a2fe..06500705ba 100644 --- a/compiler/GHC/Hs/ImpExp.hs +++ b/compiler/GHC/Hs/ImpExp.hs @@ -29,8 +29,6 @@ import GHC.Types.FieldLabel ( FieldLabel ) import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Types.SrcLoc -import Language.Haskell.Syntax.Extension -import Language.Haskell.Syntax.ImpExp import GHC.Parser.Annotation import GHC.Hs.Extension import GHC.Types.Name @@ -39,6 +37,10 @@ import GHC.Types.PkgQual import Data.Data import Data.Maybe +import Language.Haskell.Syntax.Extension +import Language.Haskell.Syntax.Module.Name +import Language.Haskell.Syntax.ImpExp + {- ************************************************************************ * * |