summaryrefslogtreecommitdiff
path: root/testsuite/tests/deSugar
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/deSugar
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/deSugar')
-rw-r--r--testsuite/tests/deSugar/should_compile/T13208.stdout2
-rw-r--r--testsuite/tests/deSugar/should_compile/T16615.stderr8
-rw-r--r--testsuite/tests/deSugar/should_compile/T2431.stderr10
3 files changed, 10 insertions, 10 deletions
diff --git a/testsuite/tests/deSugar/should_compile/T13208.stdout b/testsuite/tests/deSugar/should_compile/T13208.stdout
index d2e0c1fd05..da04a43c6b 100644
--- a/testsuite/tests/deSugar/should_compile/T13208.stdout
+++ b/testsuite/tests/deSugar/should_compile/T13208.stdout
@@ -1,6 +1,6 @@
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)}]
-f = \ (@ p) _ [Occ=Dead] -> GHC.Types.True
+f = \ (@p) _ [Occ=Dead] -> GHC.Types.True
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 80 30}]
diff --git a/testsuite/tests/deSugar/should_compile/T16615.stderr b/testsuite/tests/deSugar/should_compile/T16615.stderr
index 41b754c37e..9c2ccb5235 100644
--- a/testsuite/tests/deSugar/should_compile/T16615.stderr
+++ b/testsuite/tests/deSugar/should_compile/T16615.stderr
@@ -19,8 +19,8 @@ g :: Int -> Bool
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [0] 120 10}]
g = \ (i :: Int) ->
- case == @ Int GHC.Classes.$fEqInt i (GHC.Types.I# 0#) of {
- False -> f (pred @ Int GHC.Enum.$fEnumInt i);
+ case == @Int GHC.Classes.$fEqInt i (GHC.Types.I# 0#) of {
+ False -> f (pred @Int GHC.Enum.$fEnumInt i);
True -> GHC.Types.False
}
@@ -30,8 +30,8 @@ f [Occ=LoopBreaker] :: Int -> Bool
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [0] 120 10}]
f = \ (i :: Int) ->
- case == @ Int GHC.Classes.$fEqInt i (GHC.Types.I# 0#) of {
- False -> g (pred @ Int GHC.Enum.$fEnumInt i);
+ case == @Int GHC.Classes.$fEqInt i (GHC.Types.I# 0#) of {
+ False -> g (pred @Int GHC.Enum.$fEnumInt i);
True -> GHC.Types.True
}
end Rec }
diff --git a/testsuite/tests/deSugar/should_compile/T2431.stderr b/testsuite/tests/deSugar/should_compile/T2431.stderr
index 92d99a8d14..6073e67108 100644
--- a/testsuite/tests/deSugar/should_compile/T2431.stderr
+++ b/testsuite/tests/deSugar/should_compile/T2431.stderr
@@ -11,14 +11,14 @@ T2431.$WRefl [InlPrag=INLINE[0]] :: forall a. a :~: a
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)
- Tmpl= \ (@ a) -> T2431.Refl @ a @ a @~ (<a>_N :: a GHC.Prim.~# a)}]
+ Tmpl= \ (@a) -> T2431.Refl @a @a @~(<a>_N :: a GHC.Prim.~# a)}]
T2431.$WRefl
- = \ (@ a) -> T2431.Refl @ a @ a @~ (<a>_N :: a GHC.Prim.~# a)
+ = \ (@a) -> T2431.Refl @a @a @~(<a>_N :: a GHC.Prim.~# a)
-- RHS size: {terms: 4, types: 8, coercions: 0, joins: 0/0}
absurd :: forall a. (Int :~: Bool) -> a
[GblId, Arity=1, Caf=NoCafRefs, Str=<L,U>b, Unf=OtherCon []]
-absurd = \ (@ a) (x :: Int :~: Bool) -> case x of { }
+absurd = \ (@a) (x :: Int :~: Bool) -> case x of { }
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule1 :: GHC.Prim.Addr#
@@ -77,12 +77,12 @@ $krep1 :: [GHC.Types.KindRep]
[GblId, Caf=NoCafRefs, Unf=OtherCon []]
$krep1
= GHC.Types.:
- @ GHC.Types.KindRep $krep (GHC.Types.[] @ GHC.Types.KindRep)
+ @GHC.Types.KindRep $krep (GHC.Types.[] @GHC.Types.KindRep)
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep2 :: [GHC.Types.KindRep]
[GblId, Caf=NoCafRefs, Unf=OtherCon []]
-$krep2 = GHC.Types.: @ GHC.Types.KindRep $krep $krep1
+$krep2 = GHC.Types.: @GHC.Types.KindRep $krep $krep1
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep3 :: GHC.Types.KindRep