summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2020-01-06 15:26:21 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-01-08 06:17:47 -0500
commit923a127205dd60147453f4420614efd1be29f070 (patch)
tree08756ee0f8baef622d5ca3cb2f021a3c51cd43ef /testsuite/tests/simplCore
parentd589410f6bf394c8aca53f18848bbe4dfca92f23 (diff)
downloadhaskell-923a127205dd60147453f4420614efd1be29f070.tar.gz
Print Core type applications with no whitespace after @ (#17643)
This brings the pretty-printer for Core in line with how visible type applications are normally printed: namely, with no whitespace after the `@` character (i.e., `f @a` instead of `f @ a`). While I'm in town, I also give the same treatment to type abstractions (i.e., `\(@a)` instead of `\(@ a)`) and coercion applications (i.e., `f @~x` instead of `f @~ x`). Fixes #17643.
Diffstat (limited to 'testsuite/tests/simplCore')
-rw-r--r--testsuite/tests/simplCore/should_compile/T13143.stderr8
-rw-r--r--testsuite/tests/simplCore/should_compile/T13156.stdout2
-rw-r--r--testsuite/tests/simplCore/should_compile/T14978.stdout2
-rw-r--r--testsuite/tests/simplCore/should_compile/T15631.stdout10
-rw-r--r--testsuite/tests/simplCore/should_compile/T17409.stdout4
-rw-r--r--testsuite/tests/simplCore/should_compile/T4398.stderr4
-rw-r--r--testsuite/tests/simplCore/should_compile/T6056.stderr8
-rw-r--r--testsuite/tests/simplCore/should_compile/T7360.stderr12
-rw-r--r--testsuite/tests/simplCore/should_compile/T7785.stderr4
-rw-r--r--testsuite/tests/simplCore/should_compile/T8274.stdout10
-rw-r--r--testsuite/tests/simplCore/should_compile/T8331.stderr6
-rw-r--r--testsuite/tests/simplCore/should_compile/T8848a.stderr2
-rw-r--r--testsuite/tests/simplCore/should_compile/T9400.stderr26
-rw-r--r--testsuite/tests/simplCore/should_compile/T9509.stdout4
-rw-r--r--testsuite/tests/simplCore/should_compile/par01.stderr14
-rw-r--r--testsuite/tests/simplCore/should_compile/simpl016.stderr6
-rw-r--r--testsuite/tests/simplCore/should_compile/spec-inline.stderr10
17 files changed, 66 insertions, 66 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T13143.stderr b/testsuite/tests/simplCore/should_compile/T13143.stderr
index ddc8b1169b..eb9622b16b 100644
--- a/testsuite/tests/simplCore/should_compile/T13143.stderr
+++ b/testsuite/tests/simplCore/should_compile/T13143.stderr
@@ -8,7 +8,7 @@ Rec {
T13143.$wf [InlPrag=NOINLINE, Occ=LoopBreaker]
:: forall a. GHC.Prim.Void# -> a
[GblId, Arity=1, Caf=NoCafRefs, Str=<B,A>b, Unf=OtherCon []]
-T13143.$wf = \ (@ a) _ [Occ=Dead] -> T13143.$wf @ a GHC.Prim.void#
+T13143.$wf = \ (@a) _ [Occ=Dead] -> T13143.$wf @a GHC.Prim.void#
end Rec }
-- RHS size: {terms: 4, types: 4, coercions: 0, joins: 0/0}
@@ -20,8 +20,8 @@ f [InlPrag=NOUSERINLINE[0]] :: forall a. Int -> a
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)
- Tmpl= \ (@ a) _ [Occ=Dead] -> T13143.$wf @ a GHC.Prim.void#}]
-f = \ (@ a) _ [Occ=Dead] -> T13143.$wf @ a GHC.Prim.void#
+ Tmpl= \ (@a) _ [Occ=Dead] -> T13143.$wf @a GHC.Prim.void#}]
+f = \ (@a) _ [Occ=Dead] -> T13143.$wf @a GHC.Prim.void#
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
T13143.$trModule4 :: GHC.Prim.Addr#
@@ -70,7 +70,7 @@ T13143.$trModule
-- RHS size: {terms: 2, types: 1, coercions: 0, joins: 0/0}
lvl :: Int
[GblId, Str=b]
-lvl = T13143.$wf @ Int GHC.Prim.void#
+lvl = T13143.$wf @Int GHC.Prim.void#
Rec {
-- RHS size: {terms: 28, types: 7, coercions: 0, joins: 0/0}
diff --git a/testsuite/tests/simplCore/should_compile/T13156.stdout b/testsuite/tests/simplCore/should_compile/T13156.stdout
index 265d07b62b..a5594b95a5 100644
--- a/testsuite/tests/simplCore/should_compile/T13156.stdout
+++ b/testsuite/tests/simplCore/should_compile/T13156.stdout
@@ -1 +1 @@
- case r @ GHC.Types.Any of { __DEFAULT -> r @ a }
+ case r @GHC.Types.Any of { __DEFAULT -> r @a }
diff --git a/testsuite/tests/simplCore/should_compile/T14978.stdout b/testsuite/tests/simplCore/should_compile/T14978.stdout
index 1b12ead299..8faf80b1cb 100644
--- a/testsuite/tests/simplCore/should_compile/T14978.stdout
+++ b/testsuite/tests/simplCore/should_compile/T14978.stdout
@@ -1,2 +1,2 @@
foo :: Goof Int
-foo = T14978.Goof @ Int @~ <Co:1>
+foo = T14978.Goof @Int @~<Co:1>
diff --git a/testsuite/tests/simplCore/should_compile/T15631.stdout b/testsuite/tests/simplCore/should_compile/T15631.stdout
index 5a096f25f5..b1ada8b039 100644
--- a/testsuite/tests/simplCore/should_compile/T15631.stdout
+++ b/testsuite/tests/simplCore/should_compile/T15631.stdout
@@ -1,7 +1,7 @@
case GHC.List.$wlenAcc
- case GHC.List.$wlenAcc @ a w 0# of ww2 { __DEFAULT ->
- case GHC.List.reverse1 @ a w (GHC.Types.[] @ a) of {
- [] -> case Foo.f1 @ a of { GHC.Types.I# v1 -> GHC.Prim.+# ww2 v1 };
+ case GHC.List.$wlenAcc @a w 0# of ww2 { __DEFAULT ->
+ case GHC.List.reverse1 @a w (GHC.Types.[] @a) of {
+ [] -> case Foo.f1 @a of { GHC.Types.I# v1 -> GHC.Prim.+# ww2 v1 };
case GHC.List.$wlenAcc
- case Foo.$wf @ a w of ww [Occ=Once] { __DEFAULT ->
- case Foo.$wf @ a w of ww { __DEFAULT -> GHC.Types.I# ww }
+ case Foo.$wf @a w of ww [Occ=Once] { __DEFAULT ->
+ case Foo.$wf @a w of ww { __DEFAULT -> GHC.Types.I# ww }
diff --git a/testsuite/tests/simplCore/should_compile/T17409.stdout b/testsuite/tests/simplCore/should_compile/T17409.stdout
index 50edd27281..0c6620849c 100644
--- a/testsuite/tests/simplCore/should_compile/T17409.stdout
+++ b/testsuite/tests/simplCore/should_compile/T17409.stdout
@@ -1,2 +1,2 @@
- f = \ (x :: Bool) -> not (id @ Bool x); } in
-f = \ (x :: Bool) -> not (id @ Bool x)
+ f = \ (x :: Bool) -> not (id @Bool x); } in
+f = \ (x :: Bool) -> not (id @Bool x)
diff --git a/testsuite/tests/simplCore/should_compile/T4398.stderr b/testsuite/tests/simplCore/should_compile/T4398.stderr
index c9b89ca6b4..5ea3dd18fb 100644
--- a/testsuite/tests/simplCore/should_compile/T4398.stderr
+++ b/testsuite/tests/simplCore/should_compile/T4398.stderr
@@ -2,5 +2,5 @@
T4398.hs:6:11: warning:
Forall'd constraint ‘Ord a’ is not bound in RULE lhs
Orig bndrs: [a, $dOrd, x, y]
- Orig lhs: f @ a ((\ ($dOrd :: Ord a) -> x) $dOrd) y
- optimised lhs: f @ a x y
+ Orig lhs: f @a ((\ ($dOrd :: Ord a) -> x) $dOrd) y
+ optimised lhs: f @a x y
diff --git a/testsuite/tests/simplCore/should_compile/T6056.stderr b/testsuite/tests/simplCore/should_compile/T6056.stderr
index e1c8aab26c..7706318b4d 100644
--- a/testsuite/tests/simplCore/should_compile/T6056.stderr
+++ b/testsuite/tests/simplCore/should_compile/T6056.stderr
@@ -1,5 +1,5 @@
-Rule fired: SPEC/T6056 $wsmallerAndRest @ Int (T6056)
-Rule fired: SPEC/T6056 $wsmallerAndRest @ Int (T6056)
+Rule fired: SPEC/T6056 $wsmallerAndRest @Int (T6056)
+Rule fired: SPEC/T6056 $wsmallerAndRest @Int (T6056)
Rule fired: Class op < (BUILTIN)
-Rule fired: SPEC/T6056 $wsmallerAndRest @ Int (T6056)
-Rule fired: SPEC/T6056 $wsmallerAndRest @ Int (T6056)
+Rule fired: SPEC/T6056 $wsmallerAndRest @Int (T6056)
+Rule fired: SPEC/T6056 $wsmallerAndRest @Int (T6056)
diff --git a/testsuite/tests/simplCore/should_compile/T7360.stderr b/testsuite/tests/simplCore/should_compile/T7360.stderr
index 9c6dd2a01f..c68b9d6bf3 100644
--- a/testsuite/tests/simplCore/should_compile/T7360.stderr
+++ b/testsuite/tests/simplCore/should_compile/T7360.stderr
@@ -47,22 +47,22 @@ fun2 :: forall a. [a] -> ((), Int)
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)
- Tmpl= \ (@ a) (x [Occ=Once!] :: [a]) ->
+ Tmpl= \ (@a) (x [Occ=Once!] :: [a]) ->
(T7360.fun5,
case x of wild [Occ=Once] {
[] -> T7360.fun4;
: _ [Occ=Dead] _ [Occ=Dead] ->
- case GHC.List.$wlenAcc @ a wild 0# of ww2 [Occ=Once] { __DEFAULT ->
+ case GHC.List.$wlenAcc @a wild 0# of ww2 [Occ=Once] { __DEFAULT ->
GHC.Types.I# ww2
}
})}]
fun2
- = \ (@ a) (x :: [a]) ->
+ = \ (@a) (x :: [a]) ->
(T7360.fun5,
case x of wild {
[] -> T7360.fun4;
: ds ds1 ->
- case GHC.List.$wlenAcc @ a wild 0# of ww2 { __DEFAULT ->
+ case GHC.List.$wlenAcc @a wild 0# of ww2 { __DEFAULT ->
GHC.Types.I# ww2
}
})
@@ -116,7 +116,7 @@ $krep :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []]
$krep
= GHC.Types.KindRepTyConApp
- GHC.Types.$tcInt (GHC.Types.[] @ GHC.Types.KindRep)
+ GHC.Types.$tcInt (GHC.Types.[] @GHC.Types.KindRep)
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
T7360.$tcFoo2 :: GHC.Prim.Addr#
@@ -156,7 +156,7 @@ T7360.$tc'Foo4 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []]
T7360.$tc'Foo4
= GHC.Types.KindRepTyConApp
- T7360.$tcFoo (GHC.Types.[] @ GHC.Types.KindRep)
+ T7360.$tcFoo (GHC.Types.[] @GHC.Types.KindRep)
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
T7360.$tc'Foo6 :: GHC.Prim.Addr#
diff --git a/testsuite/tests/simplCore/should_compile/T7785.stderr b/testsuite/tests/simplCore/should_compile/T7785.stderr
index 3fd78bd67f..f0187fe958 100644
--- a/testsuite/tests/simplCore/should_compile/T7785.stderr
+++ b/testsuite/tests/simplCore/should_compile/T7785.stderr
@@ -1,8 +1,8 @@
==================== Tidy Core rules ====================
-"SPEC shared @ []"
+"SPEC shared @[]"
forall ($dMyFunctor :: MyFunctor []) (irred :: Domain [] Int).
- shared @ [] $dMyFunctor irred
+ shared @[] $dMyFunctor irred
= bar_$sshared
diff --git a/testsuite/tests/simplCore/should_compile/T8274.stdout b/testsuite/tests/simplCore/should_compile/T8274.stdout
index 12ab2439dc..45d84cd8e0 100644
--- a/testsuite/tests/simplCore/should_compile/T8274.stdout
+++ b/testsuite/tests/simplCore/should_compile/T8274.stdout
@@ -4,11 +4,11 @@ T8274.$trModule4 :: Addr#
T8274.$trModule4 = "main"#
T8274.$trModule2 :: Addr#
T8274.$trModule2 = "T8274"#
-$krep = GHC.Types.KindRepTyConApp GHC.Types.$tcWord# (GHC.Types.[] @ GHC.Types.KindRep)
-$krep1 = GHC.Types.KindRepTyConApp GHC.Types.$tcChar# (GHC.Types.[] @ GHC.Types.KindRep)
-$krep2 = GHC.Types.KindRepTyConApp GHC.Types.$tcDouble# (GHC.Types.[] @ GHC.Types.KindRep)
-$krep3 = GHC.Types.KindRepTyConApp GHC.Types.$tcFloat# (GHC.Types.[] @ GHC.Types.KindRep)
-$krep4 = GHC.Types.KindRepTyConApp GHC.Types.$tcInt# (GHC.Types.[] @ GHC.Types.KindRep)
+$krep = GHC.Types.KindRepTyConApp GHC.Types.$tcWord# (GHC.Types.[] @GHC.Types.KindRep)
+$krep1 = GHC.Types.KindRepTyConApp GHC.Types.$tcChar# (GHC.Types.[] @GHC.Types.KindRep)
+$krep2 = GHC.Types.KindRepTyConApp GHC.Types.$tcDouble# (GHC.Types.[] @GHC.Types.KindRep)
+$krep3 = GHC.Types.KindRepTyConApp GHC.Types.$tcFloat# (GHC.Types.[] @GHC.Types.KindRep)
+$krep4 = GHC.Types.KindRepTyConApp GHC.Types.$tcInt# (GHC.Types.[] @GHC.Types.KindRep)
T8274.$tcP2 :: Addr#
T8274.$tcP2 = "P"#
T8274.$tcP = GHC.Types.TyCon 7483823267324216774## 12197132127820124256## T8274.$trModule T8274.$tcP1 0# GHC.Types.krep$*
diff --git a/testsuite/tests/simplCore/should_compile/T8331.stderr b/testsuite/tests/simplCore/should_compile/T8331.stderr
index 322323be6c..030b175298 100644
--- a/testsuite/tests/simplCore/should_compile/T8331.stderr
+++ b/testsuite/tests/simplCore/should_compile/T8331.stderr
@@ -1,9 +1,9 @@
==================== Tidy Core rules ====================
"SPEC useAbstractMonad"
- forall (@ s)
+ forall (@s)
($dMonadAbstractIOST :: MonadAbstractIOST (ReaderT Int (ST s))).
- useAbstractMonad @ (ReaderT Int (ST s)) $dMonadAbstractIOST
- = useAbstractMonad_$suseAbstractMonad @ s
+ useAbstractMonad @(ReaderT Int (ST s)) $dMonadAbstractIOST
+ = useAbstractMonad_$suseAbstractMonad @s
diff --git a/testsuite/tests/simplCore/should_compile/T8848a.stderr b/testsuite/tests/simplCore/should_compile/T8848a.stderr
index f6f8b4f247..82d9815221 100644
--- a/testsuite/tests/simplCore/should_compile/T8848a.stderr
+++ b/testsuite/tests/simplCore/should_compile/T8848a.stderr
@@ -1,6 +1,6 @@
==================== Tidy Core rules ====================
"SPEC f"
- forall (@ b) ($dOrd :: Ord [Int]). f @ [Int] @ b $dOrd = f_$sf @ b
+ forall (@b) ($dOrd :: Ord [Int]). f @[Int] @b $dOrd = f_$sf @b
diff --git a/testsuite/tests/simplCore/should_compile/T9400.stderr b/testsuite/tests/simplCore/should_compile/T9400.stderr
index 521b862d57..ad14ae8e09 100644
--- a/testsuite/tests/simplCore/should_compile/T9400.stderr
+++ b/testsuite/tests/simplCore/should_compile/T9400.stderr
@@ -41,31 +41,31 @@ main :: IO ()
[GblId]
main
= >>
- @ IO
+ @IO
GHC.Base.$fMonadIO
- @ ()
- @ ()
+ @()
+ @()
(putStrLn (unpackCString# "c"#))
(>>
- @ IO
+ @IO
GHC.Base.$fMonadIO
- @ ()
- @ ()
+ @()
+ @()
(putStrLn (unpackCString# "x"#))
(>>
- @ IO
+ @IO
GHC.Base.$fMonadIO
- @ ()
- @ ()
+ @()
+ @()
(putStrLn (unpackCString# "z"#))
(>>
- @ IO
+ @IO
GHC.Base.$fMonadIO
- @ ()
- @ ()
+ @()
+ @()
(putStrLn (unpackCString# "efg"#))
(Control.Exception.Base.patError
- @ 'LiftedRep @ (IO ()) "T9400.hs:(17,5)-(18,29)|case"#))))
+ @'LiftedRep @(IO ()) "T9400.hs:(17,5)-(18,29)|case"#))))
diff --git a/testsuite/tests/simplCore/should_compile/T9509.stdout b/testsuite/tests/simplCore/should_compile/T9509.stdout
index c774c06096..5f272e47e1 100644
--- a/testsuite/tests/simplCore/should_compile/T9509.stdout
+++ b/testsuite/tests/simplCore/should_compile/T9509.stdout
@@ -1,2 +1,2 @@
- Rule: SPEC/T9509 foo @ Int
- Rule: SPEC/T9509 foo @ Int
+ Rule: SPEC/T9509 foo @Int
+ Rule: SPEC/T9509 foo @Int
diff --git a/testsuite/tests/simplCore/should_compile/par01.stderr b/testsuite/tests/simplCore/should_compile/par01.stderr
index bbcb9ef4fd..f85d96426f 100644
--- a/testsuite/tests/simplCore/should_compile/par01.stderr
+++ b/testsuite/tests/simplCore/should_compile/par01.stderr
@@ -7,11 +7,11 @@ Rec {
-- RHS size: {terms: 7, types: 3, coercions: 0, joins: 0/0}
Par01.depth [Occ=LoopBreaker] :: GHC.Types.Int -> GHC.Types.Int
[GblId, Arity=1, Caf=NoCafRefs, Str=<L,U>, Unf=OtherCon []]
-Par01.depth =
- \ (d :: GHC.Types.Int) ->
- case GHC.Prim.par# @ GHC.Types.Int d of { __DEFAULT ->
- Par01.depth d
- }
+Par01.depth
+ = \ (d :: GHC.Types.Int) ->
+ case GHC.Prim.par# @GHC.Types.Int d of { __DEFAULT ->
+ Par01.depth d
+ }
end Rec }
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
@@ -37,8 +37,8 @@ Par01.$trModule1 = GHC.Types.TrNameS Par01.$trModule2
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Par01.$trModule :: GHC.Types.Module
[GblId, Caf=NoCafRefs, Str=m, Unf=OtherCon []]
-Par01.$trModule =
- GHC.Types.Module Par01.$trModule3 Par01.$trModule1
+Par01.$trModule
+ = GHC.Types.Module Par01.$trModule3 Par01.$trModule1
diff --git a/testsuite/tests/simplCore/should_compile/simpl016.stderr b/testsuite/tests/simplCore/should_compile/simpl016.stderr
index 41480526d1..ff3a38a6a8 100644
--- a/testsuite/tests/simplCore/should_compile/simpl016.stderr
+++ b/testsuite/tests/simplCore/should_compile/simpl016.stderr
@@ -1,10 +1,10 @@
-simpl016.hs:7:1: Warning:
+simpl016.hs:7:1: warning:
Forall'd constraint ‘Num b’ is not bound in RULE lhs
Orig bndrs: [b, $dNum]
Orig lhs: let {
$dEq :: Eq Int
[LclId]
$dEq = GHC.Classes.$fEqInt } in
- delta' @ Int @ b $dEq
- optimised lhs: delta' @ Int @ b $dEq
+ delta' @Int @b $dEq
+ optimised lhs: delta' @Int @b $dEq
diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
index 07b04c215e..8c615305d5 100644
--- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr
+++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr
@@ -56,7 +56,7 @@ lvl = "spec-inline.hs:(19,5)-(29,25)|function go"#
Roman.foo3 :: Int
[GblId, Str=b]
Roman.foo3
- = Control.Exception.Base.patError @ 'GHC.Types.LiftedRep @ Int lvl
+ = Control.Exception.Base.patError @'GHC.Types.LiftedRep @Int lvl
Rec {
-- RHS size: {terms: 40, types: 5, coercions: 0, joins: 0/0}
@@ -149,7 +149,7 @@ Roman.foo1 :: Maybe Int
Str=m2,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
-Roman.foo1 = GHC.Maybe.Just @ Int Roman.foo2
+Roman.foo1 = GHC.Maybe.Just @Int Roman.foo2
-- RHS size: {terms: 11, types: 4, coercions: 0, joins: 0/0}
foo :: Int -> Int
@@ -162,7 +162,7 @@ foo :: Int -> Int
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (n [Occ=Once!] :: Int) ->
case n of n1 [Occ=Once] { GHC.Types.I# _ [Occ=Dead] ->
- Roman.foo_go (GHC.Maybe.Just @ Int n1) Roman.foo1
+ Roman.foo_go (GHC.Maybe.Just @Int n1) Roman.foo1
}}]
foo
= \ (n :: Int) ->
@@ -174,8 +174,8 @@ foo
------ Local rules for imported ids --------
"SC:$wgo0" [2]
forall (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#).
- Roman.$wgo (GHC.Maybe.Just @ Int (GHC.Types.I# sc1))
- (GHC.Maybe.Just @ Int (GHC.Types.I# sc))
+ Roman.$wgo (GHC.Maybe.Just @Int (GHC.Types.I# sc1))
+ (GHC.Maybe.Just @Int (GHC.Types.I# sc))
= Roman.foo_$s$wgo sc sc1