summaryrefslogtreecommitdiff
path: root/compiler/types
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2019-05-03 11:45:33 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-06-19 22:14:26 -0400
commit9d58554f7b19c52896796e8c3b6de20c154a67b2 (patch)
tree787d5894282155513385af5cc506a040e6cfbb89 /compiler/types
parent8584430e1d5f45fec33c783fc3bd6b781fad68de (diff)
downloadhaskell-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.hs6
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]