diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-01-12 19:30:55 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-22 15:02:45 -0500 |
commit | 957b53760e50d072accc17c77948f18a10a4bb53 (patch) | |
tree | 5099bcc355fc9a5047e5dac697511259f688e155 /compiler/GHC/Core/Opt/CprAnal.hs | |
parent | 887eb6ec23eed243604f71c025d280c0b854f4c4 (diff) | |
download | haskell-957b53760e50d072accc17c77948f18a10a4bb53.tar.gz |
Core: introduce Alt/AnnAlt/IfaceAlt datatypes
Alt, AnnAlt and IfaceAlt were using triples. This patch makes them use
dedicated types so that we can try to make some fields strict (for
example) in the future.
Diffstat (limited to 'compiler/GHC/Core/Opt/CprAnal.hs')
-rw-r--r-- | compiler/GHC/Core/Opt/CprAnal.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Core/Opt/CprAnal.hs b/compiler/GHC/Core/Opt/CprAnal.hs index 41ccd26c7b..d1a5de100d 100644 --- a/compiler/GHC/Core/Opt/CprAnal.hs +++ b/compiler/GHC/Core/Opt/CprAnal.hs @@ -209,14 +209,14 @@ cprAnalAlt -> Id -- ^ case binder -> Alt Var -- ^ current alternative -> (CprType, Alt Var) -cprAnalAlt env scrut case_bndr (con@(DataAlt dc),bndrs,rhs) +cprAnalAlt env scrut case_bndr (Alt con@(DataAlt dc) bndrs rhs) -- See 'extendEnvForDataAlt' and Note [CPR in a DataAlt case alternative] - = (rhs_ty, (con, bndrs, rhs')) + = (rhs_ty, Alt con bndrs rhs') where env_alt = extendEnvForDataAlt env scrut case_bndr dc bndrs (rhs_ty, rhs') = cprAnal env_alt rhs -cprAnalAlt env _ _ (con,bndrs,rhs) - = (rhs_ty, (con, bndrs, rhs')) +cprAnalAlt env _ _ (Alt con bndrs rhs) + = (rhs_ty, Alt con bndrs rhs') where (rhs_ty, rhs') = cprAnal env rhs |