diff options
Diffstat (limited to 'compiler/GHC/Parser/PostProcess.hs')
-rw-r--r-- | compiler/GHC/Parser/PostProcess.hs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/compiler/GHC/Parser/PostProcess.hs b/compiler/GHC/Parser/PostProcess.hs index 90c76f09dc..be71b56ae6 100644 --- a/compiler/GHC/Parser/PostProcess.hs +++ b/compiler/GHC/Parser/PostProcess.hs @@ -1383,7 +1383,6 @@ isFunLhs e = go e [] [] [] where (o,c) = mkParensEpAnn (realSrcSpan $ locA l) go (L loc (PatBuilderOpApp l (L loc' op) r (EpAnn loca anns cs))) es ops cps -<<<<<<< HEAD | not (isRdrDataCon op) -- We have found the function! = return (Just (L loc' op, Infix, (mk l:mk r:es), (anns ++ reverse ops ++ cps))) | otherwise -- Infix data con; keep going @@ -1399,35 +1398,6 @@ isFunLhs e = go e [] [] [] go (L _ (PatBuilderAppType pat _ (HsPS _ (L loc hs_ty)))) es ops cps | Just arg <- go_type_arg hs_ty = go pat (L loc (MatchPatBuilderMatchPat arg) : es) ops cps -||||||| parent of cf7104c386 (parser and renamer checkpoint) - | not (isRdrDataCon op) -- We have found the function! - = return (Just (L loc' op, Infix, (l:r:es), (anns ++ reverse ops ++ cps))) - | otherwise -- Infix data con; keep going - = do { mb_l <- go l es ops cps - ; case mb_l of - Just (op', Infix, j : k : es', anns') - -> return (Just (op', Infix, j : op_app : es', anns')) - where - op_app = L loc (PatBuilderOpApp k - (L loc' op) r (EpAnn loca (reverse ops++cps) cs)) - _ -> return Nothing } -======= - | not (isRdrDataCon op) -- We have found the function! - = return (Just (L loc' op, Infix, (mk l:mk r:es), (anns ++ reverse ops ++ cps))) - | otherwise -- Infix data con; keep going - = do { mb_l <- go l es ops cps - ; return (join $ fmap reassociate mb_l) } - where - reassociate (op', Infix, j : L k_loc (MatchPatBuilderVisPat k) : es', anns') - = Just (op', Infix, j : op_app : es', anns') - where - op_app = mk $ L loc (PatBuilderOpApp (L k_loc k) (L loc' op) r - (EpAnn loca (reverse ops ++ cps) cs)) - reassociate _other = Nothing - go (L _ (PatBuilderAppType pat (HsPS _ (L loc hs_ty)))) es ops cps - | Just arg <- go_type_arg hs_ty - = go pat (L loc (MatchPatBuilderMatchPat arg) : es) ops cps ->>>>>>> cf7104c386 (parser and renamer checkpoint) go _ _ _ _ = return Nothing go_type_arg :: HsType GhcPs -> Maybe (MatchPat GhcPs) |