[Git][ghc/ghc][wip/T24359] update tests
sheaf (@sheaf)
gitlab at gitlab.haskell.org
Tue Dec 3 13:43:22 UTC 2024
sheaf pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC
Commits:
fea2cd58 by sheaf at 2024-12-03T14:43:14+01:00
update tests
- - - - -
7 changed files:
- testsuite/tests/diagnostic-codes/codes.stdout
- testsuite/tests/parser/should_compile/OpaqueParseWarn1.stderr
- + testsuite/tests/simplCore/should_compile/T25389.stderr
- testsuite/tests/simplCore/should_compile/T8537.stderr
- testsuite/tests/simplCore/should_fail/T25117b.stderr
- + testsuite/tests/th/T13123.stderr
- testsuite/tests/typecheck/should_compile/T10504.stderr
Changes:
=====================================
testsuite/tests/diagnostic-codes/codes.stdout
=====================================
@@ -9,10 +9,10 @@
- add test cases to exercise any newly uncovered diagnostic codes,
- accept the expected output of the 'codes' test by passing the '-a' flag to Hadrian.
-[GHC-93315] is untested (constructor = DsUselessSpecialiseForClassMethodSelector)
[GHC-58181] is untested (constructor = DsOrphanRule)
[GHC-69441] is untested (constructor = DsRuleLhsTooComplicated)
[GHC-19551] is untested (constructor = DsAggregatedViewExpressions)
+[GHC-93315] is untested (constructor = UselessSpecialiseForClassMethodSelector)
[GHC-09848] is untested (constructor = PsErrCmmParser)
[GHC-95644] is untested (constructor = PsErrBangPatWithoutSpace)
[GHC-45106] is untested (constructor = PsErrInvalidInfixHole)
@@ -61,6 +61,7 @@
[GHC-01570] is untested (constructor = TcRnExpectedValueId)
[GHC-96665] is untested (constructor = TcRnMultipleInlinePragmas)
[GHC-88293] is untested (constructor = TcRnUnexpectedPragmas)
+[GHC-35827] is untested (constructor = TcRnNonOverloadedSpecialisePragma)
[GHC-85337] is untested (constructor = TcRnSpecialiseNotVisible)
[GHC-91382] is untested (constructor = TcRnIllegalKindSignature)
[GHC-72520] is untested (constructor = TcRnIgnoreSpecialisePragmaOnDefMethod)
@@ -119,3 +120,5 @@
[GHC-75721] is untested (constructor = CannotRepresentType)
[GHC-17599] is untested (constructor = AddTopDeclsUnexpectedDeclarationSplice)
[GHC-86934] is untested (constructor = ClassPE)
+
+
=====================================
testsuite/tests/parser/should_compile/OpaqueParseWarn1.stderr
=====================================
@@ -1,3 +1,3 @@
-OpaqueParseWarn1.hs:6:1: warning: [GHC-38524]
+OpaqueParseWarn1.hs:6:1: warning: [GHC-38524] [-Wuseless-specialisations (in -Wdefault)]
Ignoring useless SPECIALISE pragma for NOINLINE function: ‘f’
=====================================
testsuite/tests/simplCore/should_compile/T25389.stderr
=====================================
@@ -0,0 +1,97 @@
+
+==================== Tidy Core ====================
+Result size of Tidy Core
+ = {terms: 34, types: 46, coercions: 2, joins: 0/0}
+
+-- RHS size: {terms: 3, types: 2, coercions: 1, joins: 0/0}
+T25389.$WEx1 [InlPrag=INLINE[final] CONLIKE]
+ :: Int %1 -> Example True
+[GblId[DataConWrapper],
+ Arity=1,
+ Str=<L>,
+ Unf=Unf{Src=StableSystem, TopLvl=True,
+ Value=True, ConLike=True, WorkFree=True, Expandable=True,
+ Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
+ Tmpl= \ (conrep [Occ=Once1] :: Int) ->
+ T25389.Ex1 @True @~(<True>_N :: True GHC.Prim.~# True) conrep}]
+T25389.$WEx1
+ = \ (conrep [Occ=Once1] :: Int) ->
+ T25389.Ex1 @True @~(<True>_N :: True GHC.Prim.~# True) conrep
+
+-- RHS size: {terms: 1, types: 1, coercions: 1, joins: 0/0}
+T25389.$WEx2 [InlPrag=INLINE[final] CONLIKE] :: Example False
+[GblId[DataConWrapper],
+ Unf=Unf{Src=StableSystem, TopLvl=True,
+ Value=True, ConLike=True, WorkFree=True, Expandable=True,
+ Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=False)
+ Tmpl= T25389.Ex2 @False @~(<False>_N :: False GHC.Prim.~# False)}]
+T25389.$WEx2
+ = T25389.Ex2 @False @~(<False>_N :: False GHC.Prim.~# False)
+
+-- RHS size: {terms: 8, types: 3, coercions: 0, joins: 0/0}
+expensive :: Int -> Int
+[GblId,
+ Arity=1,
+ Str=<1!P(L)>,
+ Cpr=1,
+ Unf=Unf{Src=StableSystem, TopLvl=True,
+ Value=True, ConLike=True, WorkFree=True, Expandable=True,
+ Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
+ Tmpl= \ (v [Occ=Once1!] :: Int) ->
+ case v of { GHC.Types.I# x [Occ=Once1] ->
+ GHC.Types.I# (GHC.Prim.*# x 2#)
+ }}]
+expensive
+ = \ (v :: Int) ->
+ case v of { GHC.Types.I# x -> GHC.Types.I# (GHC.Prim.*# x 2#) }
+
+-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
+T25389.op1 :: Int
+[GblId,
+ Unf=Unf{Src=<vanilla>, TopLvl=True,
+ Value=True, ConLike=True, WorkFree=True, Expandable=True,
+ Guidance=IF_ARGS [] 10 10}]
+T25389.op1 = GHC.Types.I# 0#
+
+-- RHS size: {terms: 5, types: 9, coercions: 0, joins: 0/0}
+T25389.op_$sop [InlPrag=INLINE (sat-args=1)]
+ :: Example False -> Int
+[GblId,
+ Arity=1,
+ Str=<1L>,
+ Cpr=1,
+ Unf=Unf{Src=StableSystem, TopLvl=True,
+ Value=True, ConLike=True, WorkFree=True, Expandable=True,
+ Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)
+ Tmpl= \ (e [Occ=Once1!] :: Example False) ->
+ case e of { Ex2 _ [Occ=Dead] -> T25389.op1 }}]
+T25389.op_$sop
+ = \ (e :: Example False) ->
+ case e of { Ex2 co [Dmd=B] -> T25389.op1 }
+
+-- RHS size: {terms: 9, types: 16, coercions: 0, joins: 0/0}
+op :: forall (b :: Bool). Example b -> Int
+[GblId,
+ Arity=1,
+ Str=<1L>,
+ Cpr=1,
+ Unf=Unf{Src=StableSystem, TopLvl=True,
+ Value=True, ConLike=True, WorkFree=True, Expandable=True,
+ Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
+ Tmpl= \ (@(b :: Bool)) (e [Occ=Once1!] :: Example b) ->
+ case e of {
+ Ex1 _ [Occ=Dead] i [Occ=Once1] -> expensive i;
+ Ex2 _ [Occ=Dead] -> T25389.op1
+ }}]
+op
+ = \ (@(b :: Bool)) (e :: Example b) ->
+ case e of {
+ Ex1 co [Dmd=B] i -> expensive i;
+ Ex2 co [Dmd=B] -> T25389.op1
+ }
+
+
+------ Local rules for imported ids --------
+"USPEC op @'False" forall. op @False = T25389.op_$sop
+
+
=====================================
testsuite/tests/simplCore/should_compile/T8537.stderr
=====================================
@@ -1,4 +1,3 @@
-
-T8537.hs:20:5: warning: [GHC-66582]
- Ignoring useless SPECIALISE pragma for: ‘fmap’
+T8537.hs:20:5: warning: [GHC-66582] [-Wuseless-specialisations (in -Wdefault)]
+ Seemingly useless SPECIALISE pragma for: ‘fmap’
=====================================
testsuite/tests/simplCore/should_fail/T25117b.stderr
=====================================
@@ -1,2 +1,5 @@
-T25117b.hs:7:1: error: [GHC-62037]
- SPECIALIZE expression doesn't support multiple specialize type ascriptions
+T25117b.hs:7:27: error: [GHC-62037]
+ SPECIALISE expression doesn't support multiple type ascriptions
+ Suggested fix:
+ Split the SPECIALISE pragma into multiple pragmas, one for each type signature
+
=====================================
testsuite/tests/th/T13123.stderr
=====================================
@@ -0,0 +1,3 @@
+T13123.hs:15:2: warning: [GHC-66582] [-Wuseless-specialisations (in -Wdefault)]
+ Seemingly useless SPECIALISE pragma for: ‘id2’
+
=====================================
testsuite/tests/typecheck/should_compile/T10504.stderr
=====================================
@@ -1,3 +1,3 @@
+T10504.hs:5:1: warning: [GHC-66582] [-Wuseless-specialisations (in -Wdefault)]
+ Seemingly useless SPECIALISE pragma for: ‘myfun’
-T10504.hs:5:1: warning: [GHC-66582]
- Ignoring useless SPECIALISE pragma for: ‘myfun’
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fea2cd586aa0cdd81c8fefcc46f0e55646e2086e
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fea2cd586aa0cdd81c8fefcc46f0e55646e2086e
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241203/54c3feaa/attachment-0001.html>
More information about the ghc-commits
mailing list