From 5aba5d3218330f8ce127aa7767efcbb6f63a2db1 Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Wed, 20 Nov 2019 15:44:49 +0300 Subject: Remove HasSrcSpan (#17494) Metric Decrease: haddock.compiler --- compiler/deSugar/DsBinds.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'compiler/deSugar/DsBinds.hs') diff --git a/compiler/deSugar/DsBinds.hs b/compiler/deSugar/DsBinds.hs index 20a3b23e96..dbfc6f52fd 100644 --- a/compiler/deSugar/DsBinds.hs +++ b/compiler/deSugar/DsBinds.hs @@ -101,7 +101,7 @@ dsTopLHsBinds binds unlifted_binds = filterBag (isUnliftedHsBind . unLoc) binds bang_binds = filterBag (isBangedHsBind . unLoc) binds - top_level_err desc (dL->L loc bind) + top_level_err desc (L loc bind) = putSrcSpanDs loc $ errDs (hang (text "Top-level" <+> text desc <+> text "aren't allowed:") 2 (ppr bind)) @@ -118,8 +118,8 @@ dsLHsBinds binds ------------------------ dsLHsBind :: LHsBind GhcTc -> DsM ([Id], [(Id,CoreExpr)]) -dsLHsBind (dL->L loc bind) = do dflags <- getDynFlags - putSrcSpanDs loc $ dsHsBind dflags bind +dsLHsBind (L loc bind) = do dflags <- getDynFlags + putSrcSpanDs loc $ dsHsBind dflags bind -- | Desugar a single binding (or group of recursive binds). dsHsBind :: DynFlags @@ -143,7 +143,7 @@ dsHsBind dflags (VarBind { var_id = var else [] ; return (force_var, [core_bind]) } -dsHsBind dflags b@(FunBind { fun_id = (dL->L _ fun) +dsHsBind dflags b@(FunBind { fun_id = L _ fun , fun_matches = matches , fun_co_fn = co_fn , fun_tick = tick }) @@ -657,7 +657,7 @@ dsSpec :: Maybe CoreExpr -- Just rhs => RULE is for a local binding -- rhs is in the Id's unfolding -> Located TcSpecPrag -> DsM (Maybe (OrdList (Id,CoreExpr), CoreRule)) -dsSpec mb_poly_rhs (dL->L loc (SpecPrag poly_id spec_co spec_inl)) +dsSpec mb_poly_rhs (L loc (SpecPrag poly_id spec_co spec_inl)) | isJust (isClassOpId_maybe poly_id) = putSrcSpanDs loc $ do { warnDs NoReason (text "Ignoring useless SPECIALISE pragma for class method selector" -- cgit v1.2.1