summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2022-07-25 17:05:44 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2022-07-25 17:06:39 +0100
commit90681f7ab9c11b990b6fc49223c757699eeae4ec (patch)
tree6557ec253f75e48ae4d6483d9e4026a344488065
parente4bf95920a9bbcb5b6ac3715282c69f612137156 (diff)
downloadhaskell-wip/T21848.tar.gz
Regression test for #21848wip/T21848
-rw-r--r--compiler/GHC/Iface/Tidy.hs2
-rw-r--r--testsuite/tests/simplCore/should_compile/T21848.hs25
-rw-r--r--testsuite/tests/simplCore/should_compile/T21848.stderr442
-rw-r--r--testsuite/tests/simplCore/should_compile/all.T1
4 files changed, 469 insertions, 1 deletions
diff --git a/compiler/GHC/Iface/Tidy.hs b/compiler/GHC/Iface/Tidy.hs
index 84477bc793..f395c0daa8 100644
--- a/compiler/GHC/Iface/Tidy.hs
+++ b/compiler/GHC/Iface/Tidy.hs
@@ -1021,7 +1021,7 @@ findExternalRules opts binds imp_id_rules unfold_env
= ([], emptyVarSet, imp_user_rule_fvs, imp_rules)
trim_binds (bind:binds)
- | any needed bndrs -- Keep binding
+ | any needed bndrs -- Keep this binding
= ( bind : binds', bndr_set', needed_fvs', local_rules ++ rules )
| otherwise -- Discard binding altogether
= stuff
diff --git a/testsuite/tests/simplCore/should_compile/T21848.hs b/testsuite/tests/simplCore/should_compile/T21848.hs
new file mode 100644
index 0000000000..9360bb7b55
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T21848.hs
@@ -0,0 +1,25 @@
+module T21848( wombat, main) where
+
+wombat :: Show b => Int -> b -> String
+wombat a b | a>0 = wombat (a-1) b
+ | otherwise = show a ++ wombat a b
+
+class C a where
+ meth :: Show b => a -> b -> String
+ dummy :: a -> () -- Force a datatype dictionary representation
+
+instance C Int where
+ meth = wombat
+ dummy _ = ()
+
+class C a => D a where
+ op :: a -> a
+
+instance D Int where
+ op x = x
+
+f :: (D a, Show b) => a -> b -> String
+{-# INLINABLE[0] f #-}
+f a b = meth a b ++ "!" ++ meth a b
+
+main = putStrLn (f (42::Int) (True::Bool))
diff --git a/testsuite/tests/simplCore/should_compile/T21848.stderr b/testsuite/tests/simplCore/should_compile/T21848.stderr
new file mode 100644
index 0000000000..2afb4fdb17
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/T21848.stderr
@@ -0,0 +1,442 @@
+
+==================== Specialise ====================
+Result size of Specialise
+ = {terms: 262, types: 169, coercions: 3, joins: 0/2}
+
+-- RHS size: {terms: 2, types: 1, coercions: 0, joins: 0/0}
+$cdummy_a14o :: Int -> ()
+[LclId,
+ Arity=1,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True,
+ Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)}]
+$cdummy_a14o = \ _ [Occ=Dead] -> GHC.Tuple.()
+
+-- RHS size: {terms: 2, types: 1, coercions: 0, joins: 0/0}
+$cop_a146 :: Int -> Int
+[LclId,
+ Arity=1,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True,
+ Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)}]
+$cop_a146 = \ (x_aB5 :: Int) -> x_aB5
+
+Rec {
+-- RHS size: {terms: 36, types: 18, coercions: 0, joins: 0/0}
+$swombat_s1fp :: Int -> Bool -> String
+[LclId, Arity=2]
+$swombat_s1fp
+ = \ (a_aB9 :: Int) (b_aBa :: Bool) ->
+ case GHC.Classes.gtInt a_aB9 (GHC.Types.I# 0#) of {
+ False ->
+ GHC.Base.augment
+ @Char
+ (\ (@b_a15V)
+ (c_a15W [OS=OneShot] :: Char -> b_a15V -> b_a15V)
+ (n_a15X [OS=OneShot] :: b_a15V) ->
+ GHC.Base.foldr
+ @Char
+ @b_a15V
+ c_a15W
+ n_a15X
+ (case a_aB9 of { GHC.Types.I# n_a162 ->
+ GHC.Show.itos n_a162 (GHC.Types.[] @Char)
+ }))
+ (wombat @Bool GHC.Show.$fShowBool a_aB9 b_aBa);
+ True ->
+ wombat
+ @Bool
+ GHC.Show.$fShowBool
+ (case a_aB9 of { GHC.Types.I# x_a17e ->
+ GHC.Types.I# (GHC.Prim.-# x_a17e 1#)
+ })
+ b_aBa
+ }
+
+-- RHS size: {terms: 38, types: 21, coercions: 0, joins: 0/0}
+wombat [Occ=LoopBreaker] :: forall b. Show b => Int -> b -> String
+[LclIdX,
+ Arity=3,
+ Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [0 40 0] 261 40},
+ RULES: "SPEC wombat @Bool"
+ forall ($dShow_s1fo :: Show Bool).
+ wombat @Bool $dShow_s1fo
+ = $swombat_s1fp]
+wombat
+ = \ (@b_a13z)
+ ($dShow_a13A :: Show b_a13z)
+ (a_aB9 :: Int)
+ (b_aBa :: b_a13z) ->
+ case GHC.Classes.gtInt a_aB9 (GHC.Types.I# 0#) of {
+ False ->
+ GHC.Base.augment
+ @Char
+ (\ (@b_a15V)
+ (c_a15W [OS=OneShot] :: Char -> b_a15V -> b_a15V)
+ (n_a15X [OS=OneShot] :: b_a15V) ->
+ GHC.Base.foldr
+ @Char
+ @b_a15V
+ c_a15W
+ n_a15X
+ (case a_aB9 of { GHC.Types.I# n_a162 ->
+ GHC.Show.itos n_a162 (GHC.Types.[] @Char)
+ }))
+ (wombat @b_a13z $dShow_a13A a_aB9 b_aBa);
+ True ->
+ wombat
+ @b_a13z
+ $dShow_a13A
+ (case a_aB9 of { GHC.Types.I# x_a17e ->
+ GHC.Types.I# (GHC.Prim.-# x_a17e 1#)
+ })
+ b_aBa
+ }
+end Rec }
+
+-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
+T21848.$fCInt [InlPrag=CONLIKE] :: C Int
+[LclIdX[DFunId],
+ Unf=DFun: \ -> T21848.C:C TYPE: Int wombat $cdummy_a14o]
+T21848.$fCInt = T21848.C:C @Int wombat $cdummy_a14o
+
+-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
+T21848.$fDInt [InlPrag=CONLIKE] :: D Int
+[LclIdX[DFunId],
+ Unf=DFun: \ -> T21848.C:D TYPE: Int T21848.$fCInt $cop_a146]
+T21848.$fDInt = T21848.C:D @Int T21848.$fCInt $cop_a146
+
+-- RHS size: {terms: 27, types: 21, coercions: 0, joins: 0/1}
+$sf_s1fn [InlPrag=[0]] :: Int -> Bool -> [Char]
+[LclId, Arity=2]
+$sf_s1fn
+ = \ (eta_B0 :: Int) (eta_B1 :: Bool) ->
+ let {
+ $dC_s1fm :: C Int
+ [LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False, ConLike=True,
+ WorkFree=True, Expandable=True,
+ Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)}]
+ $dC_s1fm = T21848.$fCInt } in
+ GHC.Base.augment
+ @Char
+ (\ (@b_a15V)
+ (c_a15W [OS=OneShot] :: Char -> b_a15V -> b_a15V)
+ (n_a15X [OS=OneShot] :: b_a15V) ->
+ GHC.Base.foldr
+ @Char
+ @b_a15V
+ c_a15W
+ n_a15X
+ (wombat @Bool GHC.Show.$fShowBool eta_B0 eta_B1))
+ (GHC.Base.augment
+ @Char
+ (\ (@b_a15V)
+ (c_a15W [OS=OneShot] :: Char -> b_a15V -> b_a15V)
+ (n_a15X [OS=OneShot] :: b_a15V) ->
+ GHC.CString.unpackFoldrCString# @b_a15V "!"# c_a15W n_a15X)
+ (wombat @Bool GHC.Show.$fShowBool eta_B0 eta_B1))
+
+-- RHS size: {terms: 34, types: 30, coercions: 0, joins: 0/1}
+f [InlPrag=INLINABLE[0]]
+ :: forall a b. (D a, Show b) => a -> b -> String
+[LclId,
+ Arity=4,
+ Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [30 0 0 0] 210 0
+ Tmpl= \ (@a_a12O)
+ (@b_a12P)
+ ($dD_a12Q [Occ=OnceL1] :: D a_a12O)
+ ($dShow_a12R :: Show b_a12P)
+ (eta_B0 :: a_a12O)
+ (eta_B1 :: b_a12P) ->
+ let {
+ $dC_a14v :: C a_a12O
+ [LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False, ConLike=False,
+ WorkFree=False, Expandable=True, Guidance=IF_ARGS [] 20 0}]
+ $dC_a14v = T21848.$p1D @a_a12O $dD_a12Q } in
+ ++
+ @Char
+ (meth @a_a12O $dC_a14v @b_a12P $dShow_a12R eta_B0 eta_B1)
+ (GHC.CString.unpackAppendCString#
+ "!"# (meth @a_a12O $dC_a14v @b_a12P $dShow_a12R eta_B0 eta_B1))},
+ RULES: "SPEC f @Int @Bool" [0]
+ forall ($dD_s1fj :: D Int) ($dShow_s1fk :: Show Bool).
+ f @Int @Bool $dD_s1fj $dShow_s1fk
+ = $sf_s1fn]
+f = \ (@a_a12O)
+ (@b_a12P)
+ ($dD_a12Q :: D a_a12O)
+ ($dShow_a12R :: Show b_a12P)
+ (eta_B0 :: a_a12O)
+ (eta_B1 :: b_a12P) ->
+ let {
+ $dC_s1fi :: C a_a12O
+ [LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False, ConLike=False,
+ WorkFree=False, Expandable=True, Guidance=IF_ARGS [] 20 0}]
+ $dC_s1fi = T21848.$p1D @a_a12O $dD_a12Q } in
+ GHC.Base.augment
+ @Char
+ (\ (@b_a15V)
+ (c_a15W [OS=OneShot] :: Char -> b_a15V -> b_a15V)
+ (n_a15X [OS=OneShot] :: b_a15V) ->
+ GHC.Base.foldr
+ @Char
+ @b_a15V
+ c_a15W
+ n_a15X
+ (meth @a_a12O $dC_s1fi @b_a12P $dShow_a12R eta_B0 eta_B1))
+ (GHC.Base.augment
+ @Char
+ (\ (@b_a15V)
+ (c_a15W [OS=OneShot] :: Char -> b_a15V -> b_a15V)
+ (n_a15X [OS=OneShot] :: b_a15V) ->
+ GHC.CString.unpackFoldrCString# @b_a15V "!"# c_a15W n_a15X)
+ (meth @a_a12O $dC_s1fi @b_a12P $dShow_a12R eta_B0 eta_B1))
+
+-- RHS size: {terms: 6, types: 2, coercions: 0, joins: 0/0}
+main_s1f2 :: String
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False, ConLike=False,
+ WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 60 0}]
+main_s1f2
+ = f @Int
+ @Bool
+ T21848.$fDInt
+ GHC.Show.$fShowBool
+ (GHC.Types.I# 42#)
+ GHC.Types.True
+
+-- RHS size: {terms: 4, types: 0, coercions: 0, joins: 0/0}
+main_s1f3
+ :: GHC.Prim.State# GHC.Prim.RealWorld
+ -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
+[LclId,
+ Arity=1,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 60}]
+main_s1f3
+ = GHC.IO.Handle.Text.hPutStr2
+ GHC.IO.Handle.FD.stdout main_s1f2 GHC.Types.True
+
+-- RHS size: {terms: 1, types: 0, coercions: 3, joins: 0/0}
+main :: IO ()
+[LclIdX,
+ Arity=1,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True,
+ Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)}]
+main
+ = main_s1f3
+ `cast` (Sym (GHC.Types.N:IO[0] <()>_R)
+ :: (GHC.Prim.State# GHC.Prim.RealWorld
+ -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #))
+ ~R# IO ())
+
+-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
+$trModule_s1f4 :: GHC.Prim.Addr#
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
+$trModule_s1f4 = "main"#
+
+-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
+$trModule_s1f5 :: GHC.Types.TrName
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$trModule_s1f5 = GHC.Types.TrNameS $trModule_s1f4
+
+-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
+$trModule_s1f6 :: GHC.Prim.Addr#
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
+$trModule_s1f6 = "T21848"#
+
+-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
+$trModule_s1f7 :: GHC.Types.TrName
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$trModule_s1f7 = GHC.Types.TrNameS $trModule_s1f6
+
+-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
+T21848.$trModule :: GHC.Types.Module
+[LclIdX,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+T21848.$trModule = GHC.Types.Module $trModule_s1f5 $trModule_s1f7
+
+-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
+$krep_a14Q [InlPrag=[~]] :: GHC.Types.KindRep
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$krep_a14Q
+ = GHC.Types.KindRepTyConApp
+ GHC.Types.$tcConstraint (GHC.Types.[] @GHC.Types.KindRep)
+
+-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
+$krep_a14P [InlPrag=[~]] :: GHC.Types.KindRep
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$krep_a14P = GHC.Types.KindRepFun GHC.Types.krep$* $krep_a14Q
+
+-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
+$krep_s1f8 :: Int
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$krep_s1f8 = GHC.Types.I# 0#
+
+-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
+$krep_a14T [InlPrag=[~]] :: GHC.Types.KindRep
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False, ConLike=True,
+ WorkFree=False, Expandable=True, Guidance=IF_ARGS [] 20 0}]
+$krep_a14T = GHC.Types.$WKindRepVar $krep_s1f8
+
+-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
+$krep_a14V [InlPrag=[~]] :: GHC.Types.KindRep
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$krep_a14V = GHC.Types.KindRepFun $krep_a14T $krep_a14T
+
+-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
+$tcC_s1f9 :: GHC.Prim.Addr#
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
+$tcC_s1f9 = "C"#
+
+-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
+$tcC_s1fa :: GHC.Types.TrName
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$tcC_s1fa = GHC.Types.TrNameS $tcC_s1f9
+
+-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
+T21848.$tcC :: GHC.Types.TyCon
+[LclIdX,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+T21848.$tcC
+ = GHC.Types.TyCon
+ 14679919086118427567##64
+ 12559744112860329810##64
+ T21848.$trModule
+ $tcC_s1fa
+ 0#
+ $krep_a14P
+
+-- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
+$krep_s1fb :: [GHC.Types.KindRep]
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$krep_s1fb
+ = GHC.Types.:
+ @GHC.Types.KindRep $krep_a14T (GHC.Types.[] @GHC.Types.KindRep)
+
+-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
+$krep_a14S [InlPrag=[~]] :: GHC.Types.KindRep
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$krep_a14S = GHC.Types.KindRepTyConApp T21848.$tcC $krep_s1fb
+
+-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
+$tcD_s1fc :: GHC.Prim.Addr#
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
+$tcD_s1fc = "D"#
+
+-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
+$tcD_s1fd :: GHC.Types.TrName
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$tcD_s1fd = GHC.Types.TrNameS $tcD_s1fc
+
+-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
+T21848.$tcD :: GHC.Types.TyCon
+[LclIdX,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+T21848.$tcD
+ = GHC.Types.TyCon
+ 2028775029841869083##64
+ 18183109077030380353##64
+ T21848.$trModule
+ $tcD_s1fd
+ 0#
+ $krep_a14P
+
+-- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
+$krep_s1fe :: [GHC.Types.KindRep]
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$krep_s1fe
+ = GHC.Types.:
+ @GHC.Types.KindRep $krep_a14T (GHC.Types.[] @GHC.Types.KindRep)
+
+-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
+$krep_a14W [InlPrag=[~]] :: GHC.Types.KindRep
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$krep_a14W = GHC.Types.KindRepTyConApp T21848.$tcD $krep_s1fe
+
+-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
+$krep_a14U [InlPrag=[~]] :: GHC.Types.KindRep
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$krep_a14U = GHC.Types.KindRepFun $krep_a14V $krep_a14W
+
+-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
+$krep_a14R [InlPrag=[~]] :: GHC.Types.KindRep
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$krep_a14R = GHC.Types.KindRepFun $krep_a14S $krep_a14U
+
+-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
+$tc'C:D_s1ff :: GHC.Prim.Addr#
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
+$tc'C:D_s1ff = "'C:D"#
+
+-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
+$tc'C:D_s1fg :: GHC.Types.TrName
+[LclId,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+$tc'C:D_s1fg = GHC.Types.TrNameS $tc'C:D_s1ff
+
+-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
+T21848.$tc'C:D :: GHC.Types.TyCon
+[LclIdX,
+ Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
+ WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
+T21848.$tc'C:D
+ = GHC.Types.TyCon
+ 4845813539547459579##64
+ 7908713917114703782##64
+ T21848.$trModule
+ $tc'C:D_s1fg
+ 1#
+ $krep_a14R
+
+
+
diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T
index ff55f67806..1450a43932 100644
--- a/testsuite/tests/simplCore/should_compile/all.T
+++ b/testsuite/tests/simplCore/should_compile/all.T
@@ -419,3 +419,4 @@ test('T21391a', normal, compile, ['-O -dcore-lint'])
test('T21392', [ grep_errmsg(r'sat.* :: \[\(.*Unique, .*Int\)\]'), expect_broken(21392) ], compile, ['-O -ddump-prep -dno-typeable-binds -dsuppress-uniques'])
test('T21689', [extra_files(['T21689a.hs'])], multimod_compile, ['T21689', '-v0 -O'])
test('T21801', normal, compile, ['-O -dcore-lint'])
+test('T21848', [grep_errmsg(r'SPEC wombat') ], compile, ['-O -ddump-spec'])