diff options
author | romes <rodrigo.m.mesquita@gmail.com> | 2022-05-14 12:12:19 +0200 |
---|---|---|
committer | romes <rodrigo.m.mesquita@gmail.com> | 2022-06-21 14:59:21 +0200 |
commit | d78d1fe6909cc955201d6b22b1b6c70ab40de847 (patch) | |
tree | dd32a9927d8145d123d93b4fcd5c55ef76676d76 /compiler/GHC/Unit | |
parent | 9c575f24d41fed616e6f96fcbb4fa9a9687497a6 (diff) | |
download | haskell-d78d1fe6909cc955201d6b22b1b6c70ab40de847.tar.gz |
TTG: Move HsModule to L.H.S
Move the definition of HsModule defined in GHC.Hs to
Language.Haskell.Syntax with an added TTG parameter and corresponding
extension fields.
This is progress towards having the haskell-syntax package, as described
in #21592
Diffstat (limited to 'compiler/GHC/Unit')
-rw-r--r-- | compiler/GHC/Unit/Module/Name.hs | 7 | ||||
-rw-r--r-- | compiler/GHC/Unit/Module/Name.hs-boot | 9 | ||||
-rw-r--r-- | compiler/GHC/Unit/Types.hs-boot | 2 |
3 files changed, 8 insertions, 10 deletions
diff --git a/compiler/GHC/Unit/Module/Name.hs b/compiler/GHC/Unit/Module/Name.hs index cc5e430bd6..9860914502 100644 --- a/compiler/GHC/Unit/Module/Name.hs +++ b/compiler/GHC/Unit/Module/Name.hs @@ -1,7 +1,7 @@ -- | The ModuleName type module GHC.Unit.Module.Name - ( ModuleName + ( module Language.Haskell.Syntax , pprModuleName , moduleNameFS , moduleNameString @@ -13,6 +13,8 @@ module GHC.Unit.Module.Name ) where +import {-# SOURCE #-} Language.Haskell.Syntax (ModuleName(..)) + import GHC.Prelude import GHC.Utils.Outputable @@ -29,9 +31,6 @@ import qualified Text.ParserCombinators.ReadP as Parse import Text.ParserCombinators.ReadP (ReadP) import Data.Char (isAlphaNum) --- | A ModuleName is essentially a simple string, e.g. @Data.List@. -newtype ModuleName = ModuleName FastString deriving Show - instance Uniquable ModuleName where getUnique (ModuleName nm) = getUnique nm diff --git a/compiler/GHC/Unit/Module/Name.hs-boot b/compiler/GHC/Unit/Module/Name.hs-boot index 7a48d807a7..deff51787e 100644 --- a/compiler/GHC/Unit/Module/Name.hs-boot +++ b/compiler/GHC/Unit/Module/Name.hs-boot @@ -1,6 +1,5 @@ -module GHC.Unit.Module.Name where - -import GHC.Prelude () - -data ModuleName +module GHC.Unit.Module.Name ( + module Language.Haskell.Syntax + ) where +import {-# SOURCE #-} Language.Haskell.Syntax (ModuleName(..)) diff --git a/compiler/GHC/Unit/Types.hs-boot b/compiler/GHC/Unit/Types.hs-boot index 0fe5302123..800b07db9a 100644 --- a/compiler/GHC/Unit/Types.hs-boot +++ b/compiler/GHC/Unit/Types.hs-boot @@ -3,7 +3,7 @@ module GHC.Unit.Types where import GHC.Prelude () import {-# SOURCE #-} GHC.Utils.Outputable -import {-# SOURCE #-} GHC.Unit.Module.Name ( ModuleName ) +import {-# SOURCE #-} Language.Haskell.Syntax ( ModuleName ) import Data.Kind (Type) data UnitId |