diff options
author | Zubin Duggal <zubin.duggal@gmail.com> | 2021-09-28 15:30:13 +0530 |
---|---|---|
committer | Zubin <zubin.duggal@gmail.com> | 2021-11-20 17:39:25 +0000 |
commit | bc7e9f038112496c45aeb81d1504e57acb3722c7 (patch) | |
tree | f69c0cf46a8c34f8ac00f77d59187afbf5d8444d /compiler/GHC/ThToHs.hs | |
parent | b2933ea95273f11b05f7ff796a9646a2e912d7fc (diff) | |
download | haskell-bc7e9f038112496c45aeb81d1504e57acb3722c7.tar.gz |
Use 'NonEmpty' for the fields in an 'HsProjection' (#20389)
T12545 is very inconsistently affected by this change for some reason.
There is a decrease in allocations on most configurations, but
an increase on validate-x86_64-linux-deb9-unreg-hadrian. Accepting it
as it seems unrelated to this patch.
Metric Decrease:
T12545
Metric Increase:
T12545
Diffstat (limited to 'compiler/GHC/ThToHs.hs')
-rw-r--r-- | compiler/GHC/ThToHs.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/ThToHs.hs b/compiler/GHC/ThToHs.hs index a0c7b7e222..891eb0af0e 100644 --- a/compiler/GHC/ThToHs.hs +++ b/compiler/GHC/ThToHs.hs @@ -1050,7 +1050,7 @@ cvtl e = wrapLA (cvt e) cvt (ImplicitParamVarE n) = do { n' <- ipName n; return $ HsIPVar noComments n' } cvt (GetFieldE exp f) = do { e' <- cvtl exp ; return $ HsGetField noComments e' (L noSrcSpanA (DotFieldOcc noAnn (L noSrcSpanA (fsLit f)))) } - cvt (ProjectionE xs) = return $ HsProjection noAnn $ map (L noSrcSpanA . DotFieldOcc noAnn . L noSrcSpanA . fsLit) xs + cvt (ProjectionE xs) = return $ HsProjection noAnn $ fmap (L noSrcSpanA . DotFieldOcc noAnn . L noSrcSpanA . fsLit) xs {- | #16895 Ensure an infix expression's operator is a variable/constructor. Consider this example: |