summaryrefslogtreecommitdiff
path: root/testsuite/tests/perf/compiler/hard_hole_fits.stderr
diff options
context:
space:
mode:
authorromes <rodrigo.m.mesquita@gmail.com>2022-03-19 17:42:46 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-06-01 07:44:44 -0400
commit7975202ba9010c581918413808ee06fbab9ac85f (patch)
treeffebdbd9d9fcef2300b1a6d3950bb5dd3f8435c4 /testsuite/tests/perf/compiler/hard_hole_fits.stderr
parent392ce3fca5d33688add52309a05914efa163e6f6 (diff)
downloadhaskell-7975202ba9010c581918413808ee06fbab9ac85f.tar.gz
TTG: Rework and improve splices
This commit redefines the structure of Splices in the AST. We get rid of `HsSplice` which used to represent typed and untyped splices, quasi quotes, and the result of splicing either an expression, a type or a pattern. Instead we have `HsUntypedSplice` which models an untyped splice or a quasi quoter, which works in practice just like untyped splices. The `HsExpr` constructor `HsSpliceE` which used to be constructed with an `HsSplice` is split into `HsTypedSplice` and `HsUntypedSplice`. The former is directly constructed with an `HsExpr` and the latter now takes an `HsUntypedSplice`. Both `HsType` and `Pat` constructors `HsSpliceTy` and `SplicePat` now take an `HsUntypedSplice` instead of a `HsSplice` (remember only /untyped splices/ can be spliced as types or patterns). The result of splicing an expression, type, or pattern is now comfortably stored in the extension fields `XSpliceTy`, `XSplicePat`, `XUntypedSplice` as, respectively, `HsUntypedSpliceResult (HsType GhcRn)`, `HsUntypedSpliceResult (Pat GhcRn)`, and `HsUntypedSpliceResult (HsExpr GhcRn)` Overall the TTG extension points are now better used to make invalid states unrepresentable and model the progression between stages better. See Note [Lifecycle of an untyped splice, and PendingRnSplice] and Note [Lifecycle of an typed splice, and PendingTcSplice] for more details. Updates haddock submodule Fixes #21263 ------------------------- Metric Decrease: hard_hole_fits -------------------------
Diffstat (limited to 'testsuite/tests/perf/compiler/hard_hole_fits.stderr')
-rw-r--r--testsuite/tests/perf/compiler/hard_hole_fits.stderr50
1 files changed, 34 insertions, 16 deletions
diff --git a/testsuite/tests/perf/compiler/hard_hole_fits.stderr b/testsuite/tests/perf/compiler/hard_hole_fits.stderr
index 55c267076d..4caef50d4c 100644
--- a/testsuite/tests/perf/compiler/hard_hole_fits.stderr
+++ b/testsuite/tests/perf/compiler/hard_hole_fits.stderr
@@ -135,7 +135,7 @@ hard_hole_fits.hs:20:24: warning: [-Wtyped-holes (in -Wdefault)]
hard_hole_fits.hs:21:40: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: Int
• In an equation for ‘testMe’:
- testMe (HsLamCase xlc lc_variant mg) = _
+ testMe (HsLamCase xlc lc_variant mg) = _
• Relevant bindings include
mg :: MatchGroup GhcPs (LHsExpr GhcPs)
(bound at hard_hole_fits.hs:21:34)
@@ -577,13 +577,13 @@ hard_hole_fits.hs:42:35: 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:29: warning: [-Wtyped-holes (in -Wdefault)]
+hard_hole_fits.hs:43:32: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: Int
- • In an equation for ‘testMe’: testMe (HsSpliceE xse hs) = _
+ • In an equation for ‘testMe’: testMe (HsTypedSplice xs hs) = _
• Relevant bindings include
- hs :: HsSplice GhcPs (bound at hard_hole_fits.hs:43:23)
- xse :: Language.Haskell.Syntax.Extension.XSpliceE GhcPs
- (bound at hard_hole_fits.hs:43:19)
+ hs :: LHsExpr GhcPs (bound at hard_hole_fits.hs:43:26)
+ xs :: Language.Haskell.Syntax.Extension.XTypedSplice GhcPs
+ (bound at hard_hole_fits.hs:43:23)
testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1)
Valid hole fits include
maxBound :: forall a. Bounded a => a
@@ -595,15 +595,33 @@ hard_hole_fits.hs:43: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:44:29: warning: [-Wtyped-holes (in -Wdefault)]
+hard_hole_fits.hs:44:34: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: Int
+ • In an equation for ‘testMe’: testMe (HsUntypedSplice xs hs) = _
+ • Relevant bindings include
+ hs :: HsUntypedSplice GhcPs (bound at hard_hole_fits.hs:44:28)
+ xs :: Language.Haskell.Syntax.Extension.XUntypedSplice GhcPs
+ (bound at hard_hole_fits.hs:44:25)
+ 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:45: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:44:23)
+ gl :: LHsCmdTop GhcPs (bound at hard_hole_fits.hs:45:23)
pat :: Language.Haskell.Syntax.Pat.LPat GhcPs
- (bound at hard_hole_fits.hs:44:19)
+ (bound at hard_hole_fits.hs:45:19)
xp :: Language.Haskell.Syntax.Extension.XProc GhcPs
- (bound at hard_hole_fits.hs:44:16)
+ (bound at hard_hole_fits.hs:45:16)
testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1)
Valid hole fits include
maxBound :: forall a. Bounded a => a
@@ -615,13 +633,13 @@ 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:27: warning: [-Wtyped-holes (in -Wdefault)]
+hard_hole_fits.hs:46: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:45:21)
+ gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:46:21)
xs :: Language.Haskell.Syntax.Extension.XStatic GhcPs
- (bound at hard_hole_fits.hs:45:18)
+ (bound at hard_hole_fits.hs:46:18)
testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1)
Valid hole fits include
maxBound :: forall a. Bounded a => a
@@ -633,16 +651,16 @@ hard_hole_fits.hs:45: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:46:1: warning: [-Woverlapping-patterns (in -Wdefault)]
+hard_hole_fits.hs:47:1: warning: [-Woverlapping-patterns (in -Wdefault)]
Pattern match is redundant
In an equation for ‘testMe’: testMe (XExpr xe) = ...
-hard_hole_fits.hs:46:21: warning: [-Wtyped-holes (in -Wdefault)]
+hard_hole_fits.hs:47: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:46:15)
+ (bound at hard_hole_fits.hs:47:15)
testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1)
Valid hole fits include
maxBound :: forall a. Bounded a => a