diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2019-05-03 11:45:33 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-06-19 22:14:26 -0400 |
commit | 9d58554f7b19c52896796e8c3b6de20c154a67b2 (patch) | |
tree | 787d5894282155513385af5cc506a040e6cfbb89 /compiler/basicTypes | |
parent | 8584430e1d5f45fec33c783fc3bd6b781fad68de (diff) | |
download | haskell-9d58554f7b19c52896796e8c3b6de20c154a67b2.tar.gz |
Properly trim IdInfos of DFunIds and PatSyns in TidyPgm
Not doing this right caused #16608. We now properly trim IdInfos of
DFunIds and PatSyns.
Some further refactoring done by SPJ.
Two regression tests T16608_1 and T16608_2 added.
Fixes #16608
Diffstat (limited to 'compiler/basicTypes')
-rw-r--r-- | compiler/basicTypes/PatSyn.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/basicTypes/PatSyn.hs b/compiler/basicTypes/PatSyn.hs index fe296bf054..008a0771fa 100644 --- a/compiler/basicTypes/PatSyn.hs +++ b/compiler/basicTypes/PatSyn.hs @@ -19,7 +19,7 @@ module PatSyn ( patSynInstArgTys, patSynInstResTy, patSynFieldLabels, patSynFieldType, - tidyPatSynIds, pprPatSynType + updatePatSynIds, pprPatSynType ) where #include "HsVersions.h" @@ -417,8 +417,8 @@ patSynMatcher = psMatcher patSynBuilder :: PatSyn -> Maybe (Id, Bool) patSynBuilder = psBuilder -tidyPatSynIds :: (Id -> Id) -> PatSyn -> PatSyn -tidyPatSynIds tidy_fn ps@(MkPatSyn { psMatcher = matcher, psBuilder = builder }) +updatePatSynIds :: (Id -> Id) -> PatSyn -> PatSyn +updatePatSynIds tidy_fn ps@(MkPatSyn { psMatcher = matcher, psBuilder = builder }) = ps { psMatcher = tidy_pr matcher, psBuilder = fmap tidy_pr builder } where tidy_pr (id, dummy) = (tidy_fn id, dummy) |