summaryrefslogtreecommitdiff
path: root/testsuite/tests/roles
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/roles
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/roles')
-rw-r--r--testsuite/tests/roles/should_compile/Roles13.stderr6
-rw-r--r--testsuite/tests/roles/should_compile/T8958.stderr75
2 files changed, 29 insertions, 52 deletions
diff --git a/testsuite/tests/roles/should_compile/Roles13.stderr b/testsuite/tests/roles/should_compile/Roles13.stderr
index 29b7b2de26..e6017f9e7b 100644
--- a/testsuite/tests/roles/should_compile/Roles13.stderr
+++ b/testsuite/tests/roles/should_compile/Roles13.stderr
@@ -46,7 +46,7 @@ $krep :: GHC.Types.KindRep
[GblId, 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: 2, types: 0, coercions: 0, joins: 0/0}
$krep1 :: GHC.Types.KindRep
@@ -80,7 +80,7 @@ $krep2 :: GHC.Types.KindRep
[GblId, Unf=OtherCon []]
$krep2
= GHC.Types.KindRepTyConApp
- Roles13.$tcAge (GHC.Types.[] @ GHC.Types.KindRep)
+ Roles13.$tcAge (GHC.Types.[] @GHC.Types.KindRep)
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep3 :: GHC.Types.KindRep
@@ -136,7 +136,7 @@ $krep4 :: [GHC.Types.KindRep]
[GblId, Caf=NoCafRefs, Unf=OtherCon []]
$krep4
= GHC.Types.:
- @ GHC.Types.KindRep $krep1 (GHC.Types.[] @ GHC.Types.KindRep)
+ @GHC.Types.KindRep $krep1 (GHC.Types.[] @GHC.Types.KindRep)
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep5 :: GHC.Types.KindRep
diff --git a/testsuite/tests/roles/should_compile/T8958.stderr b/testsuite/tests/roles/should_compile/T8958.stderr
index b975c66d9c..f498b9b009 100644
--- a/testsuite/tests/roles/should_compile/T8958.stderr
+++ b/testsuite/tests/roles/should_compile/T8958.stderr
@@ -16,58 +16,34 @@ CLASS INSTANCES
-- Defined at T8958.hs:10:10
instance [incoherent] Nominal a -- Defined at T8958.hs:7:10
Dependent modules: []
-Dependent packages: [base-4.13.0.0, ghc-prim-0.6.1,
+Dependent packages: [base-4.14.0.0, ghc-prim-0.6.1,
integer-gmp-1.0.2.0]
==================== Typechecker ====================
T8958.$tcMap
= GHC.Types.TyCon
- 16542473435673943392##
- 5374201132143305512##
- T8958.$trModule
- (GHC.Types.TrNameS "Map"#)
- 0
- GHC.Types.krep$*->*->*
+ 16542473435673943392## 5374201132143305512## T8958.$trModule
+ (GHC.Types.TrNameS "Map"#) 0 GHC.Types.krep$*->*->*
T8958.$tc'MkMap
= GHC.Types.TyCon
- 2942839876828444488##
- 3989137838066763457##
- T8958.$trModule
- (GHC.Types.TrNameS "'MkMap"#)
- 2
- $krep
+ 2942839876828444488## 3989137838066763457## T8958.$trModule
+ (GHC.Types.TrNameS "'MkMap"#) 2 $krep
T8958.$tcRepresentational
= GHC.Types.TyCon
- 12809567151893673426##
- 12159693688248149156##
- T8958.$trModule
- (GHC.Types.TrNameS "Representational"#)
- 0
- $krep
+ 12809567151893673426## 12159693688248149156## T8958.$trModule
+ (GHC.Types.TrNameS "Representational"#) 0 $krep
T8958.$tc'C:Representational
= GHC.Types.TyCon
- 2358772282532242424##
- 5444038897914446879##
- T8958.$trModule
- (GHC.Types.TrNameS "'C:Representational"#)
- 1
- $krep
+ 2358772282532242424## 5444038897914446879## T8958.$trModule
+ (GHC.Types.TrNameS "'C:Representational"#) 1 $krep
T8958.$tcNominal
= GHC.Types.TyCon
- 12224997609886144634##
- 9866011944332051160##
- T8958.$trModule
- (GHC.Types.TrNameS "Nominal"#)
- 0
- $krep
+ 12224997609886144634## 9866011944332051160## T8958.$trModule
+ (GHC.Types.TrNameS "Nominal"#) 0 $krep
T8958.$tc'C:Nominal
= GHC.Types.TyCon
- 10562260635335201742##
- 1215478186250709459##
- T8958.$trModule
- (GHC.Types.TrNameS "'C:Nominal"#)
- 1
- $krep
+ 10562260635335201742## 1215478186250709459## T8958.$trModule
+ (GHC.Types.TrNameS "'C:Nominal"#) 1 $krep
$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepVar 0
$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepVar 1
$krep [InlPrag=NOUSERINLINE[~]] = GHC.Types.KindRepFun $krep $krep
@@ -76,28 +52,28 @@ $krep [InlPrag=NOUSERINLINE[~]]
$krep [InlPrag=NOUSERINLINE[~]]
= GHC.Types.KindRepTyConApp
GHC.Tuple.$tc(,)
- ((:) @ GHC.Types.KindRep
- $krep ((:) @ GHC.Types.KindRep $krep [] @ GHC.Types.KindRep))
+ ((:) @GHC.Types.KindRep
+ $krep ((:) @GHC.Types.KindRep $krep [] @GHC.Types.KindRep))
$krep [InlPrag=NOUSERINLINE[~]]
= GHC.Types.KindRepTyConApp
T8958.$tcMap
- ((:) @ GHC.Types.KindRep
- $krep ((:) @ GHC.Types.KindRep $krep [] @ GHC.Types.KindRep))
+ ((:) @GHC.Types.KindRep
+ $krep ((:) @GHC.Types.KindRep $krep [] @GHC.Types.KindRep))
$krep [InlPrag=NOUSERINLINE[~]]
= GHC.Types.KindRepTyConApp
GHC.Types.$tc[]
- ((:) @ GHC.Types.KindRep $krep [] @ GHC.Types.KindRep)
+ ((:) @GHC.Types.KindRep $krep [] @GHC.Types.KindRep)
$krep [InlPrag=NOUSERINLINE[~]]
= GHC.Types.KindRepTyConApp
- GHC.Types.$tcConstraint [] @ GHC.Types.KindRep
+ GHC.Types.$tcConstraint [] @GHC.Types.KindRep
$krep [InlPrag=NOUSERINLINE[~]]
= GHC.Types.KindRepTyConApp
T8958.$tcRepresentational
- ((:) @ GHC.Types.KindRep $krep [] @ GHC.Types.KindRep)
+ ((:) @GHC.Types.KindRep $krep [] @GHC.Types.KindRep)
$krep [InlPrag=NOUSERINLINE[~]]
= GHC.Types.KindRepTyConApp
T8958.$tcNominal
- ((:) @ GHC.Types.KindRep $krep [] @ GHC.Types.KindRep)
+ ((:) @GHC.Types.KindRep $krep [] @GHC.Types.KindRep)
T8958.$trModule
= GHC.Types.Module
(GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "T8958"#)
@@ -107,15 +83,16 @@ AbsBinds [a] []
Exported types: T8958.$fRepresentationala [InlPrag=NOUSERINLINE CONLIKE]
:: forall a. Representational a
[LclIdX[DFunId],
- Unf=DFun: \ (@ a) -> T8958.C:Representational TYPE: a]
- Binds: $dRepresentational = T8958.C:Representational @ a
+ Unf=DFun: \ (@a) -> T8958.C:Representational TYPE: a]
+ Binds: $dRepresentational = T8958.C:Representational @a
Evidence: [EvBinds{}]}
AbsBinds [a] []
{Exports: [T8958.$fNominala <= $dNominal
wrap: <>]
Exported types: T8958.$fNominala [InlPrag=NOUSERINLINE CONLIKE]
:: forall a. Nominal a
- [LclIdX[DFunId], Unf=DFun: \ (@ a) -> T8958.C:Nominal TYPE: a]
- Binds: $dNominal = T8958.C:Nominal @ a
+ [LclIdX[DFunId], Unf=DFun: \ (@a) -> T8958.C:Nominal TYPE: a]
+ Binds: $dNominal = T8958.C:Nominal @a
Evidence: [EvBinds{}]}
+