diff options
author | romes <rodrigo.m.mesquita@gmail.com> | 2022-03-16 22:51:14 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-03-18 05:10:58 -0400 |
commit | ac3b2e7deb0e2987ae3f27d62c03716de46ebc79 (patch) | |
tree | 2870ede7f20e7980e867c49c05a570015f334ead /testsuite/tests/perf | |
parent | b056adc8062b4fe015450a21eb70e32dcf7023f5 (diff) | |
download | haskell-ac3b2e7deb0e2987ae3f27d62c03716de46ebc79.tar.gz |
TTG: TH brackets finishing touches
Rewrite the critical notes and fix outdated ones,
use `HsQuote GhcRn` (in `HsBracketTc`) for desugaring regardless of the
bracket being typed or untyped,
remove unused `EpAnn` from `Hs*Bracket GhcRn`,
zonkExpr factor out common brackets code,
ppr_expr factor out common brackets code,
and fix tests,
to finish MR https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4782.
-------------------------
Metric Decrease:
hard_hole_fits
-------------------------
Diffstat (limited to 'testsuite/tests/perf')
-rw-r--r-- | testsuite/tests/perf/compiler/hard_hole_fits.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/perf/compiler/hard_hole_fits.stderr | 72 |
2 files changed, 25 insertions, 52 deletions
diff --git a/testsuite/tests/perf/compiler/hard_hole_fits.hs b/testsuite/tests/perf/compiler/hard_hole_fits.hs index a1cbec4b59..c59fe1b0dd 100644 --- a/testsuite/tests/perf/compiler/hard_hole_fits.hs +++ b/testsuite/tests/perf/compiler/hard_hole_fits.hs @@ -38,9 +38,8 @@ testMe (RecordCon xrc gl hrf) = _ testMe (RecordUpd xru gl gls) = _ testMe (ExprWithTySig xewts gl hwcb) = _ testMe (ArithSeq xas m_se asi) = _ -testMe (HsBracket xb hb) = _ -testMe (HsRnBracketOut xrbo hb prss) = _ -testMe (HsTcBracketOut xtbo hb ptss as) = _ +testMe (HsTypedBracket xb hb) = _ +testMe (HsUntypedBracket xb hb) = _ testMe (HsSpliceE xse hs) = _ testMe (HsProc xp pat gl) = _ testMe (HsStatic xs gl) = _ diff --git a/testsuite/tests/perf/compiler/hard_hole_fits.stderr b/testsuite/tests/perf/compiler/hard_hole_fits.stderr index 78a3584f1c..4b59171506 100644 --- a/testsuite/tests/perf/compiler/hard_hole_fits.stderr +++ b/testsuite/tests/perf/compiler/hard_hole_fits.stderr @@ -539,13 +539,13 @@ hard_hole_fits.hs:40:34: warning: [-Wtyped-holes (in -Wdefault)] (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 (and originally defined in ‘GHC.Enum’)) -hard_hole_fits.hs:41:28: warning: [-Wtyped-holes (in -Wdefault)] +hard_hole_fits.hs:41:33: warning: [-Wtyped-holes (in -Wdefault)] • Found hole: _ :: Int - • In an equation for ‘testMe’: testMe (HsBracket xb hb) = _ + • In an equation for ‘testMe’: testMe (HsTypedBracket xb hb) = _ • Relevant bindings include - hb :: HsBracket GhcPs (bound at hard_hole_fits.hs:41:22) - xb :: Language.Haskell.Syntax.Extension.XBracket GhcPs - (bound at hard_hole_fits.hs:41:19) + hb :: LHsExpr GhcPs (bound at hard_hole_fits.hs:41:27) + xb :: Language.Haskell.Syntax.Extension.XTypedBracket GhcPs + (bound at hard_hole_fits.hs:41:24) testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) Valid hole fits include maxBound :: forall a. Bounded a => a @@ -557,16 +557,13 @@ hard_hole_fits.hs:41:28: warning: [-Wtyped-holes (in -Wdefault)] (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 (and originally defined in ‘GHC.Enum’)) -hard_hole_fits.hs:42:40: warning: [-Wtyped-holes (in -Wdefault)] +hard_hole_fits.hs:42:35: warning: [-Wtyped-holes (in -Wdefault)] • Found hole: _ :: Int - • In an equation for ‘testMe’: - testMe (HsRnBracketOut xrbo hb prss) = _ + • In an equation for ‘testMe’: testMe (HsUntypedBracket xb hb) = _ • Relevant bindings include - prss :: [PendingRnSplice' GhcPs] (bound at hard_hole_fits.hs:42:32) - hb :: HsBracket (HsBracketRn GhcPs) - (bound at hard_hole_fits.hs:42:29) - xrbo :: Language.Haskell.Syntax.Extension.XRnBracketOut GhcPs - (bound at hard_hole_fits.hs:42:24) + hb :: HsQuote GhcPs (bound at hard_hole_fits.hs:42:29) + xb :: Language.Haskell.Syntax.Extension.XUntypedBracket GhcPs + (bound at hard_hole_fits.hs:42:26) testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) Valid hole fits include maxBound :: forall a. Bounded a => a @@ -578,36 +575,13 @@ hard_hole_fits.hs:42:40: warning: [-Wtyped-holes (in -Wdefault)] (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 (and originally defined in ‘GHC.Enum’)) -hard_hole_fits.hs:43:43: warning: [-Wtyped-holes (in -Wdefault)] - • Found hole: _ :: Int - • In an equation for ‘testMe’: - testMe (HsTcBracketOut xtbo hb ptss as) = _ - • Relevant bindings include - as :: [PendingTcSplice' GhcPs] (bound at hard_hole_fits.hs:43:37) - ptss :: HsBracket (HsBracketRn GhcPs) - (bound at hard_hole_fits.hs:43:32) - hb :: Maybe GHC.Tc.Types.Evidence.QuoteWrapper - (bound at hard_hole_fits.hs:43:29) - xtbo :: Language.Haskell.Syntax.Extension.XTcBracketOut GhcPs - (bound at hard_hole_fits.hs:43:24) - testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) - Valid hole fits include - maxBound :: forall a. Bounded a => a - with maxBound @Int - (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 - (and originally defined in ‘GHC.Enum’)) - minBound :: forall a. Bounded a => a - with minBound @Int - (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 - (and originally defined in ‘GHC.Enum’)) - -hard_hole_fits.hs:44:29: warning: [-Wtyped-holes (in -Wdefault)] +hard_hole_fits.hs:43:29: warning: [-Wtyped-holes (in -Wdefault)] • Found hole: _ :: Int • In an equation for ‘testMe’: testMe (HsSpliceE xse hs) = _ • Relevant bindings include - hs :: HsSplice GhcPs (bound at hard_hole_fits.hs:44:23) + hs :: HsSplice GhcPs (bound at hard_hole_fits.hs:43:23) xse :: Language.Haskell.Syntax.Extension.XSpliceE GhcPs - (bound at hard_hole_fits.hs:44:19) + (bound at hard_hole_fits.hs:43:19) testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) Valid hole fits include maxBound :: forall a. Bounded a => a @@ -619,15 +593,15 @@ hard_hole_fits.hs:44:29: warning: [-Wtyped-holes (in -Wdefault)] (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 (and originally defined in ‘GHC.Enum’)) -hard_hole_fits.hs:45:29: warning: [-Wtyped-holes (in -Wdefault)] +hard_hole_fits.hs:44:29: warning: [-Wtyped-holes (in -Wdefault)] • Found hole: _ :: Int • In an equation for ‘testMe’: testMe (HsProc xp pat gl) = _ • Relevant bindings include - gl :: LHsCmdTop GhcPs (bound at hard_hole_fits.hs:45:23) + gl :: LHsCmdTop GhcPs (bound at hard_hole_fits.hs:44:23) pat :: Language.Haskell.Syntax.Pat.LPat GhcPs - (bound at hard_hole_fits.hs:45:19) + (bound at hard_hole_fits.hs:44:19) xp :: Language.Haskell.Syntax.Extension.XProc GhcPs - (bound at hard_hole_fits.hs:45:16) + (bound at hard_hole_fits.hs:44:16) testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) Valid hole fits include maxBound :: forall a. Bounded a => a @@ -639,13 +613,13 @@ hard_hole_fits.hs:45:29: warning: [-Wtyped-holes (in -Wdefault)] (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 (and originally defined in ‘GHC.Enum’)) -hard_hole_fits.hs:46:27: warning: [-Wtyped-holes (in -Wdefault)] +hard_hole_fits.hs:45:27: warning: [-Wtyped-holes (in -Wdefault)] • Found hole: _ :: Int • In an equation for ‘testMe’: testMe (HsStatic xs gl) = _ • Relevant bindings include - gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:46:21) + gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:45:21) xs :: Language.Haskell.Syntax.Extension.XStatic GhcPs - (bound at hard_hole_fits.hs:46:18) + (bound at hard_hole_fits.hs:45:18) testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) Valid hole fits include maxBound :: forall a. Bounded a => a @@ -657,16 +631,16 @@ hard_hole_fits.hs:46:27: warning: [-Wtyped-holes (in -Wdefault)] (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 (and originally defined in ‘GHC.Enum’)) -hard_hole_fits.hs:47:1: warning: [-Woverlapping-patterns (in -Wdefault)] +hard_hole_fits.hs:46:1: warning: [-Woverlapping-patterns (in -Wdefault)] Pattern match is redundant In an equation for ‘testMe’: testMe (XExpr xe) = ... -hard_hole_fits.hs:47:21: warning: [-Wtyped-holes (in -Wdefault)] +hard_hole_fits.hs:46:21: warning: [-Wtyped-holes (in -Wdefault)] • Found hole: _ :: Int • In an equation for ‘testMe’: testMe (XExpr xe) = _ • Relevant bindings include xe :: Language.Haskell.Syntax.Extension.XXExpr GhcPs - (bound at hard_hole_fits.hs:47:15) + (bound at hard_hole_fits.hs:46:15) testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) Valid hole fits include maxBound :: forall a. Bounded a => a |