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 /testsuite/tests/plugins/simple-plugin | |
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 'testsuite/tests/plugins/simple-plugin')
-rw-r--r-- | testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs b/testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs index 0d7e44b4b6..89464451ee 100644 --- a/testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs +++ b/testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs @@ -31,8 +31,8 @@ parsedPlugin [name, "parse"] _ pm = return $ pm { hpm_module = removeParsedBinding name (hpm_module pm) } parsedPlugin _ _ pm = return pm -removeParsedBinding :: String -> Located (HsModule GhcPs) - -> Located (HsModule GhcPs) +removeParsedBinding :: String -> Located HsModule + -> Located HsModule removeParsedBinding name (L l m) = (L l (m { hsmodDecls = filter (notNamedAs name) (hsmodDecls m) } )) where notNamedAs name (L _ (ValD _ (FunBind { fun_id = L _ fid }))) |