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/types | |
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/types')
-rw-r--r-- | compiler/types/InstEnv.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/types/InstEnv.hs b/compiler/types/InstEnv.hs index debced8dba..13a0b30555 100644 --- a/compiler/types/InstEnv.hs +++ b/compiler/types/InstEnv.hs @@ -14,7 +14,7 @@ module InstEnv ( OverlapFlag(..), OverlapMode(..), setOverlapModeMaybe, ClsInst(..), DFunInstType, pprInstance, pprInstanceHdr, pprInstances, instanceHead, instanceSig, mkLocalInstance, mkImportedInstance, - instanceDFunId, tidyClsInstDFun, instanceRoughTcs, + instanceDFunId, updateClsInstDFun, instanceRoughTcs, fuzzyClsInstCmp, orphNamesOfClsInst, InstEnvs(..), VisibleOrphanModules, InstEnv, @@ -199,8 +199,8 @@ being equal to instanceDFunId :: ClsInst -> DFunId instanceDFunId = is_dfun -tidyClsInstDFun :: (DFunId -> DFunId) -> ClsInst -> ClsInst -tidyClsInstDFun tidy_dfun ispec +updateClsInstDFun :: (DFunId -> DFunId) -> ClsInst -> ClsInst +updateClsInstDFun tidy_dfun ispec = ispec { is_dfun = tidy_dfun (is_dfun ispec) } instanceRoughTcs :: ClsInst -> [Maybe Name] |