diff options
author | Shayne Fletcher <shayne@shaynefletcher.org> | 2021-05-15 21:15:41 +1000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-05-19 23:40:12 -0400 |
commit | d48b7e5c2fae5db1973a767be45aba82b2aa727c (patch) | |
tree | b0af0b799854da5e4b9efbe29a24e02d4db71641 /compiler/GHC/ThToHs.hs | |
parent | df4a0a53691cd833f54eb443401243dd9c964196 (diff) | |
download | haskell-d48b7e5c2fae5db1973a767be45aba82b2aa727c.tar.gz |
Changes to HsRecField'
Diffstat (limited to 'compiler/GHC/ThToHs.hs')
-rw-r--r-- | compiler/GHC/ThToHs.hs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/GHC/ThToHs.hs b/compiler/GHC/ThToHs.hs index 02b93c5803..f8efa8f28d 100644 --- a/compiler/GHC/ThToHs.hs +++ b/compiler/GHC/ThToHs.hs @@ -1082,13 +1082,13 @@ which we don't want. -} cvtFld :: (RdrName -> t) -> (TH.Name, TH.Exp) - -> CvtM (LHsRecField' GhcPs t (LHsExpr GhcPs)) + -> CvtM (LHsFieldBind GhcPs (Located t) (LHsExpr GhcPs)) cvtFld f (v,e) = do { v' <- vNameL v; e' <- cvtl e - ; return (noLocA $ HsRecField { hsRecFieldAnn = noAnn - , hsRecFieldLbl = reLoc $ fmap f v' - , hsRecFieldArg = e' - , hsRecPun = False}) } + ; return (noLocA $ HsFieldBind { hfbAnn = noAnn + , hfbLHS = reLoc $ fmap f v' + , hfbRHS = e' + , hfbPun = False}) } cvtDD :: Range -> CvtM (ArithSeqInfo GhcPs) cvtDD (FromR x) = do { x' <- cvtl x; return $ From x' } @@ -1361,11 +1361,11 @@ cvtPatFld :: (TH.Name, TH.Pat) -> CvtM (LHsRecField GhcPs (LPat GhcPs)) cvtPatFld (s,p) = do { L ls s' <- vNameN s ; p' <- cvtPat p - ; return (noLocA $ HsRecField { hsRecFieldAnn = noAnn - , hsRecFieldLbl - = L (locA ls) $ mkFieldOcc (L ls s') - , hsRecFieldArg = p' - , hsRecPun = False}) } + ; return (noLocA $ HsFieldBind { hfbAnn = noAnn + , hfbLHS + = L (locA ls) $ mkFieldOcc (L ls s') + , hfbRHS = p' + , hfbPun = False}) } {- | @cvtOpAppP x op y@ converts @op@ and @y@ and produces the operator application @x `op` y@. The produced tree of infix patterns will be left-biased, provided @x@ is. |