summaryrefslogtreecommitdiff
path: root/compiler/main/GHC.hs
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2020-01-06 14:02:47 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-01-07 13:14:57 -0500
commitb69a3460d11cba49e861f708100801c8e25efa3e (patch)
treea075a807851b803a62d602dab40b62472d2be297 /compiler/main/GHC.hs
parent1ca9adbc88903afe49de0d063ccd35daf43f7d9e (diff)
downloadhaskell-b69a3460d11cba49e861f708100801c8e25efa3e.tar.gz
Monomorphize HsModule to GhcPs (#17642)
Analyzing the call sites for `HsModule` reveals that it is only ever used with parsed code (i.e., `GhcPs`). This simplifies `HsModule` by concretizing its `pass` parameter to always be `GhcPs`. Fixes #17642.
Diffstat (limited to 'compiler/main/GHC.hs')
-rw-r--r--compiler/main/GHC.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs
index 4030e87eff..38645e9b23 100644
--- a/compiler/main/GHC.hs
+++ b/compiler/main/GHC.hs
@@ -857,7 +857,7 @@ instance TypecheckedMod DesugaredModule where
instance DesugaredMod DesugaredModule where
coreModule m = dm_core_module m
-type ParsedSource = Located (HsModule GhcPs)
+type ParsedSource = Located HsModule
type RenamedSource = (HsGroup GhcRn, [LImportDecl GhcRn], Maybe [(LIE GhcRn, Avails)],
Maybe LHsDocString)
type TypecheckedSource = LHsBinds GhcTc
@@ -1547,7 +1547,7 @@ lookupName name =
parser :: String -- ^ Haskell module source text (full Unicode is supported)
-> DynFlags -- ^ the flags
-> FilePath -- ^ the filename (for source locations)
- -> (WarningMessages, Either ErrorMessages (Located (HsModule GhcPs)))
+ -> (WarningMessages, Either ErrorMessages (Located HsModule))
parser str dflags filename =
let