diff options
Diffstat (limited to 'testsuite/tests')
13 files changed, 57 insertions, 24 deletions
diff --git a/testsuite/tests/numeric/should_compile/T7116.stdout b/testsuite/tests/numeric/should_compile/T7116.stdout index fc0159a1ec..a1adeb180a 100644 --- a/testsuite/tests/numeric/should_compile/T7116.stdout +++ b/testsuite/tests/numeric/should_compile/T7116.stdout @@ -52,7 +52,7 @@ dr :: Double -> Double [GblId, Arity=1, Caf=NoCafRefs, - Str=<S(S),1*U(U)>m, + Str=<S,1*U(U)>m, Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) @@ -69,7 +69,7 @@ dl [InlPrag=NOUSERINLINE[2]] :: Double -> Double [GblId, Arity=1, Caf=NoCafRefs, - Str=<S(S),1*U(U)>m, + Str=<S,1*U(U)>m, Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) @@ -82,7 +82,7 @@ fr :: Float -> Float [GblId, Arity=1, Caf=NoCafRefs, - Str=<S(S),1*U(U)>m, + Str=<S,1*U(U)>m, Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) @@ -101,7 +101,7 @@ fl [InlPrag=NOUSERINLINE[2]] :: Float -> Float [GblId, Arity=1, Caf=NoCafRefs, - Str=<S(S),1*U(U)>m, + Str=<S,1*U(U)>m, Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) diff --git a/testsuite/tests/simplCore/should_compile/T13143.stderr b/testsuite/tests/simplCore/should_compile/T13143.stderr index d8b0c1b468..ddc8b1169b 100644 --- a/testsuite/tests/simplCore/should_compile/T13143.stderr +++ b/testsuite/tests/simplCore/should_compile/T13143.stderr @@ -76,7 +76,7 @@ Rec { -- RHS size: {terms: 28, types: 7, coercions: 0, joins: 0/0} T13143.$wg [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: Bool -> Bool -> GHC.Prim.Int# -> GHC.Prim.Int# -[GblId, Arity=3, Str=<S,1*U><S,1*U><S,U>, Unf=OtherCon []] +[GblId, Arity=3, Str=<S,1*U><S,1*U><L,U>, Unf=OtherCon []] T13143.$wg = \ (w :: Bool) (w1 :: Bool) (ww :: GHC.Prim.Int#) -> case w of { @@ -97,7 +97,7 @@ end Rec } g [InlPrag=NOUSERINLINE[2]] :: Bool -> Bool -> Int -> Int [GblId, Arity=3, - Str=<S,1*U><S,1*U><S(S),1*U(U)>m, + Str=<S,1*U><S,1*U><S,1*U(U)>m, Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=3,unsat_ok=True,boring_ok=False) diff --git a/testsuite/tests/simplCore/should_compile/T13543.stderr b/testsuite/tests/simplCore/should_compile/T13543.stderr index 69f6808bc4..219f4f4fa5 100644 --- a/testsuite/tests/simplCore/should_compile/T13543.stderr +++ b/testsuite/tests/simplCore/should_compile/T13543.stderr @@ -1,11 +1,14 @@ + ==================== Strictness signatures ==================== Foo.$trModule: m -Foo.f: <S(S),1*U(1*U)><S(S),1*U(U)><S(S),1*U(U)>m -Foo.g: <S(S(S)S(S)),1*U(1*U(U),1*U(U))>m +Foo.f: <S(S),1*U(1*U)><S,1*U(U)><S,1*U(U)>m +Foo.g: <S(SS),1*U(1*U(U),1*U(U))>m ==================== Strictness signatures ==================== Foo.$trModule: m -Foo.f: <S(S),1*U(1*U)><S(S),1*U(U)><S(S),1*U(U)>m -Foo.g: <S(S(S)S(S)),1*U(1*U(U),1*U(U))>m
\ No newline at end of file +Foo.f: <S(S),1*U(1*U)><S,1*U(U)><S,1*U(U)>m +Foo.g: <S(SS),1*U(1*U(U),1*U(U))>m + + diff --git a/testsuite/tests/simplCore/should_compile/T3772.stdout b/testsuite/tests/simplCore/should_compile/T3772.stdout index 37d5a3c742..b19e5d047e 100644 --- a/testsuite/tests/simplCore/should_compile/T3772.stdout +++ b/testsuite/tests/simplCore/should_compile/T3772.stdout @@ -61,7 +61,7 @@ end Rec } -- RHS size: {terms: 10, types: 2, coercions: 0, joins: 0/0} T3772.$wfoo [InlPrag=NOINLINE] :: GHC.Prim.Int# -> () -[GblId, Arity=1, Caf=NoCafRefs, Str=<S,U>, Unf=OtherCon []] +[GblId, Arity=1, Caf=NoCafRefs, Str=<L,U>, Unf=OtherCon []] T3772.$wfoo = \ (ww :: GHC.Prim.Int#) -> case GHC.Prim.<# 0# ww of { @@ -74,7 +74,7 @@ foo [InlPrag=NOUSERINLINE[0]] :: Int -> () [GblId, Arity=1, Caf=NoCafRefs, - Str=<S(S),1*U(U)>, + Str=<S,1*U(U)>, Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) diff --git a/testsuite/tests/simplCore/should_compile/T4930.stderr b/testsuite/tests/simplCore/should_compile/T4930.stderr index 7556ecc9af..07c2cee01b 100644 --- a/testsuite/tests/simplCore/should_compile/T4930.stderr +++ b/testsuite/tests/simplCore/should_compile/T4930.stderr @@ -51,7 +51,7 @@ Rec { -- RHS size: {terms: 17, types: 3, coercions: 0, joins: 0/0} T4930.$wfoo [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int# -[GblId, Arity=1, Caf=NoCafRefs, Str=<S,U>, Unf=OtherCon []] +[GblId, Arity=1, Caf=NoCafRefs, Str=<L,U>, Unf=OtherCon []] T4930.$wfoo = \ (ww :: GHC.Prim.Int#) -> case GHC.Prim.<# ww 5# of { @@ -65,7 +65,7 @@ foo [InlPrag=NOUSERINLINE[2]] :: Int -> Int [GblId, Arity=1, Caf=NoCafRefs, - Str=<S(S),1*U(U)>m, + Str=<S,1*U(U)>m, Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr index 78ba2b4c2d..d978cc5719 100644 --- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr +++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr @@ -62,7 +62,7 @@ Rec { -- RHS size: {terms: 40, types: 5, coercions: 0, joins: 0/0} Roman.foo_$s$wgo [Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int# -[GblId, Arity=2, Caf=NoCafRefs, Str=<L,U><S,U>, Unf=OtherCon []] +[GblId, Arity=2, Caf=NoCafRefs, Str=<L,A><L,U>, Unf=OtherCon []] Roman.foo_$s$wgo = \ (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#) -> case GHC.Prim.<=# sc1 0# of { @@ -156,7 +156,7 @@ foo :: Int -> Int [GblId, Arity=1, Caf=NoCafRefs, - Str=<S(S),1*U(U)>m, + Str=<S,1*U(U)>m, Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) diff --git a/testsuite/tests/stranal/should_compile/Makefile b/testsuite/tests/stranal/should_compile/Makefile index 16d1f2f84a..7ad39442bb 100644 --- a/testsuite/tests/stranal/should_compile/Makefile +++ b/testsuite/tests/stranal/should_compile/Makefile @@ -5,3 +5,8 @@ include $(TOP)/mk/test.mk T13031: echo hello '$(TEST_HC)' $(TEST_HC_OPTS) -c -fforce-recomp T13031.hs -ddump-simpl | grep 'Arity=' + +# Trying to make sure the workers for g1 and g2 +# take only one Int# argument +T16029: + '$(TEST_HC)' $(TEST_HC_OPTS) -c -O -fforce-recomp T16029.hs -dsuppress-uniques -ddump-simpl | grep '::.*Int' diff --git a/testsuite/tests/stranal/should_compile/T16029.hs b/testsuite/tests/stranal/should_compile/T16029.hs new file mode 100644 index 0000000000..b63414f59f --- /dev/null +++ b/testsuite/tests/stranal/should_compile/T16029.hs @@ -0,0 +1,12 @@ +module T16029 where + +data S = MkS Int Int + +g1 :: S -> Int -> Int +g1 (MkS x y) 0 = 0 +g1 (MkS x y) n = g1 (MkS y x) (n-1) + +data T = MkT !Int !Int +g2 :: T -> Int -> Int +g2 (MkT x y) 0 = 0 +g2 (MkT x y) n = g2 (MkT y x) (n-1) diff --git a/testsuite/tests/stranal/should_compile/T16029.stdout b/testsuite/tests/stranal/should_compile/T16029.stdout new file mode 100644 index 0000000000..c06ac7c8b3 --- /dev/null +++ b/testsuite/tests/stranal/should_compile/T16029.stdout @@ -0,0 +1,11 @@ +T16029.$WMkT [InlPrag=INLINE[2]] :: Int -> Int -> T + Tmpl= \ (dt [Occ=Once!] :: Int) (dt [Occ=Once!] :: Int) -> + = \ (dt [Occ=Once!] :: Int) (dt [Occ=Once!] :: Int) -> + :: GHC.Prim.Int# -> GHC.Prim.Int# + = \ (ww :: GHC.Prim.Int#) -> +g2 [InlPrag=NOUSERINLINE[2]] :: T -> Int -> Int + Tmpl= \ (w [Occ=Once!] :: T) (w1 [Occ=Once!] :: Int) -> + = \ (w :: T) (w1 :: Int) -> +g1 [InlPrag=NOUSERINLINE[2]] :: S -> Int -> Int + Tmpl= \ (w [Occ=Once!] :: S) (w1 [Occ=Once!] :: Int) -> + = \ (w :: S) (w1 :: Int) -> diff --git a/testsuite/tests/stranal/should_compile/all.T b/testsuite/tests/stranal/should_compile/all.T index a2aa1d51a9..38c15f2b30 100644 --- a/testsuite/tests/stranal/should_compile/all.T +++ b/testsuite/tests/stranal/should_compile/all.T @@ -47,3 +47,5 @@ test('T13077a', normal, compile, ['']) # The idea is to check that both $wmutVar and $warray # don't mention MutVar# and Array# anymore. test('T15627', [ grep_errmsg(r'(wmutVar|warray).*Int#') ], compile, ['-dppr-cols=200 -ddump-simpl']) + +test('T16029', normal, run_command, ['$MAKE -s --no-print-directory T16029']) diff --git a/testsuite/tests/stranal/sigs/HyperStrUse.stderr b/testsuite/tests/stranal/sigs/HyperStrUse.stderr index 21077d243f..84d81f3a8b 100644 --- a/testsuite/tests/stranal/sigs/HyperStrUse.stderr +++ b/testsuite/tests/stranal/sigs/HyperStrUse.stderr @@ -1,12 +1,12 @@ ==================== Strictness signatures ==================== HyperStrUse.$trModule: m -HyperStrUse.f: <S(S(S)L),1*U(1*U(U),A)><S,1*U>m +HyperStrUse.f: <S(SL),1*U(1*U(U),A)><S,1*U>m ==================== Strictness signatures ==================== HyperStrUse.$trModule: m -HyperStrUse.f: <S(S(S)L),1*U(1*U(U),A)><S,1*U>m +HyperStrUse.f: <S(SL),1*U(1*U(U),A)><S,1*U>m diff --git a/testsuite/tests/stranal/sigs/T12370.stderr b/testsuite/tests/stranal/sigs/T12370.stderr index f8cb839436..d1acdf0b50 100644 --- a/testsuite/tests/stranal/sigs/T12370.stderr +++ b/testsuite/tests/stranal/sigs/T12370.stderr @@ -1,14 +1,14 @@ ==================== Strictness signatures ==================== T12370.$trModule: m -T12370.bar: <S(S),1*U(U)><S(S),1*U(U)>m -T12370.foo: <S(S(S)S(S)),1*U(1*U(U),1*U(U))>m +T12370.bar: <S,1*U(U)><S,1*U(U)>m +T12370.foo: <S(SS),1*U(1*U(U),1*U(U))>m ==================== Strictness signatures ==================== T12370.$trModule: m -T12370.bar: <S(S),1*U(U)><S(S),1*U(U)>m -T12370.foo: <S(S(S)S(S)),1*U(1*U(U),1*U(U))>m +T12370.bar: <S,1*U(U)><S,1*U(U)>m +T12370.foo: <S(SS),1*U(1*U(U),1*U(U))>m diff --git a/testsuite/tests/stranal/sigs/T8598.stderr b/testsuite/tests/stranal/sigs/T8598.stderr index c084e15a99..9bf10d94f4 100644 --- a/testsuite/tests/stranal/sigs/T8598.stderr +++ b/testsuite/tests/stranal/sigs/T8598.stderr @@ -1,12 +1,12 @@ ==================== Strictness signatures ==================== T8598.$trModule: m -T8598.fun: <S(S),1*U(U)>m +T8598.fun: <S,1*U(U)>m ==================== Strictness signatures ==================== T8598.$trModule: m -T8598.fun: <S(S),1*U(U)>m +T8598.fun: <S,1*U(U)>m |