diff options
Diffstat (limited to 'compiler/GHC/Stg/CSE.hs')
-rw-r--r-- | compiler/GHC/Stg/CSE.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/GHC/Stg/CSE.hs b/compiler/GHC/Stg/CSE.hs index 5a2b9b16fa..61a7824188 100644 --- a/compiler/GHC/Stg/CSE.hs +++ b/compiler/GHC/Stg/CSE.hs @@ -130,6 +130,8 @@ instance TrieMap StgArgMap where foldTM k m = foldTM k (sam_var m) . foldTM k (sam_lit m) mapTM f (SAM {sam_var = varm, sam_lit = litm}) = SAM { sam_var = mapTM f varm, sam_lit = mapTM f litm } + filterTM f (SAM {sam_var = varm, sam_lit = litm}) = + SAM { sam_var = filterTM f varm, sam_lit = filterTM f litm } newtype ConAppMap a = CAM { un_cam :: DNameEnv (ListMap StgArgMap a) } @@ -141,6 +143,7 @@ instance TrieMap ConAppMap where m { un_cam = un_cam m |> xtDNamed dataCon |>> alterTM args f } foldTM k = un_cam >.> foldTM (foldTM k) mapTM f = un_cam >.> mapTM (mapTM f) >.> CAM + filterTM f = un_cam >.> mapTM (filterTM f) >.> CAM ----------------- -- The CSE Env -- |