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/Driver/Pipeline | |
| 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/Driver/Pipeline')
| -rw-r--r-- | compiler/GHC/Driver/Pipeline/Execute.hs | 3 | ||||
| -rw-r--r-- | compiler/GHC/Driver/Pipeline/Phases.hs | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/compiler/GHC/Driver/Pipeline/Execute.hs b/compiler/GHC/Driver/Pipeline/Execute.hs index ff62a9a6db..7390735f28 100644 --- a/compiler/GHC/Driver/Pipeline/Execute.hs +++ b/compiler/GHC/Driver/Pipeline/Execute.hs @@ -22,7 +22,6 @@ import GHC.Driver.Pipeline.Phases import GHC.Driver.Env hiding (Hsc) import GHC.Unit.Module.Location import GHC.Driver.Phases -import GHC.Unit.Module.Name ( ModuleName ) import GHC.Unit.Types import GHC.Types.SourceFile import GHC.Unit.Module.Status @@ -83,6 +82,8 @@ import GHC.Driver.Env.KnotVars import GHC.Driver.Config.Finder import GHC.Rename.Names +import Language.Haskell.Syntax.Module.Name + newtype HookedUse a = HookedUse { runHookedUse :: (Hooks, PhaseHook) -> IO a } deriving (Functor, Applicative, Monad, MonadIO, MonadThrow, MonadCatch) via (ReaderT (Hooks, PhaseHook) IO) diff --git a/compiler/GHC/Driver/Pipeline/Phases.hs b/compiler/GHC/Driver/Pipeline/Phases.hs index 431c9e0b1d..aa11801b45 100644 --- a/compiler/GHC/Driver/Pipeline/Phases.hs +++ b/compiler/GHC/Driver/Pipeline/Phases.hs @@ -16,11 +16,12 @@ import GHC.Types.Error import GHC.Driver.Errors.Types import GHC.Fingerprint.Type import GHC.Unit.Module.Location ( ModLocation ) -import GHC.Unit.Module.Name ( ModuleName ) import GHC.Unit.Module.ModIface import GHC.Linker.Types import GHC.Driver.Phases +import Language.Haskell.Syntax.Module.Name ( ModuleName ) + -- Typed Pipeline Phases -- MP: TODO: We need to refine the arguments to each of these phases so recompilation -- can be smarter. For example, rather than passing a whole HscEnv, just pass the options |
