diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2020-01-06 14:02:47 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-01-07 13:14:57 -0500 |
commit | b69a3460d11cba49e861f708100801c8e25efa3e (patch) | |
tree | a075a807851b803a62d602dab40b62472d2be297 /compiler/parser | |
parent | 1ca9adbc88903afe49de0d063ccd35daf43f7d9e (diff) | |
download | haskell-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/parser')
-rw-r--r-- | compiler/parser/Parser.y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y index c96cd92f5a..e824c385c4 100644 --- a/compiler/parser/Parser.y +++ b/compiler/parser/Parser.y @@ -759,7 +759,7 @@ unitdecl :: { LHsUnitDecl PackageName } -- either, and DEPRECATED is only expected to be used by people who really -- know what they are doing. :-) -signature :: { Located (HsModule GhcPs) } +signature :: { Located HsModule } : maybedocheader 'signature' modid maybemodwarning maybeexports 'where' body {% fileSrcSpan >>= \ loc -> ams (L loc (HsModule (Just $3) $5 (fst $ snd $7) @@ -767,7 +767,7 @@ signature :: { Located (HsModule GhcPs) } ) ([mj AnnSignature $2, mj AnnWhere $6] ++ fst $7) } -module :: { Located (HsModule GhcPs) } +module :: { Located HsModule } : maybedocheader 'module' modid maybemodwarning maybeexports 'where' body {% fileSrcSpan >>= \ loc -> ams (L loc (HsModule (Just $3) $5 (fst $ snd $7) @@ -824,7 +824,7 @@ top1 :: { ([LImportDecl GhcPs], [LHsDecl GhcPs]) } ----------------------------------------------------------------------------- -- Module declaration & imports only -header :: { Located (HsModule GhcPs) } +header :: { Located HsModule } : maybedocheader 'module' modid maybemodwarning maybeexports 'where' header_body {% fileSrcSpan >>= \ loc -> ams (L loc (HsModule (Just $3) $5 $7 [] $4 $1 |