Commit 923a1272 authored by Ryan Scott's avatar Ryan Scott Committed by Marge Bot

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.
parent d589410f
Pipeline #14461 failed with stages
in 527 minutes and 32 seconds
......@@ -1290,8 +1290,8 @@ pprIfaceExpr _ (IfaceLcl v) = ppr v
pprIfaceExpr _ (IfaceExt v) = ppr v
pprIfaceExpr _ (IfaceLit l) = ppr l
pprIfaceExpr _ (IfaceFCall cc ty) = braces (ppr cc <+> ppr ty)
pprIfaceExpr _ (IfaceType ty) = char '@' <+> pprParendIfaceType ty
pprIfaceExpr _ (IfaceCo co) = text "@~" <+> pprParendIfaceCoercion co
pprIfaceExpr _ (IfaceType ty) = char '@' <> pprParendIfaceType ty
pprIfaceExpr _ (IfaceCo co) = text "@~" <> pprParendIfaceCoercion co
pprIfaceExpr add_par app@(IfaceApp _ _) = add_par (pprIfaceApp app [])
pprIfaceExpr _ (IfaceTuple c as) = tupleParens c (pprWithCommas ppr as)
......
......@@ -714,8 +714,8 @@ isIfaceTauType _ = True
instance Outputable IfaceBndr where
ppr (IfaceIdBndr bndr) = pprIfaceIdBndr bndr
ppr (IfaceTvBndr bndr) = char '@' <+> pprIfaceTvBndr bndr (SuppressBndrSig False)
(UseBndrParens False)
ppr (IfaceTvBndr bndr) = char '@' <> pprIfaceTvBndr bndr (SuppressBndrSig False)
(UseBndrParens False)
pprIfaceBndrs :: [IfaceBndr] -> SDoc
pprIfaceBndrs bs = sep (map ppr bs)
......
......@@ -280,7 +280,7 @@ instance Outputable RdrName where
instance OutputableBndr RdrName where
pprBndr _ n
| isTvOcc (rdrNameOcc n) = char '@' <+> ppr n
| isTvOcc (rdrNameOcc n) = char '@' <> ppr n
| otherwise = ppr n
pprInfixOcc rdr = pprInfixVar (isSymOcc (rdrNameOcc rdr)) (ppr rdr)
......
......@@ -319,8 +319,8 @@ pprArg (Type ty)
= sdocWithDynFlags $ \dflags ->
if gopt Opt_SuppressTypeApplications dflags
then empty
else text "@" <+> pprParendType ty
pprArg (Coercion co) = text "@~" <+> pprOptCo co
else text "@" <> pprParendType ty
pprArg (Coercion co) = text "@~" <> pprOptCo co
pprArg expr = pprParendExpr expr
{-
......@@ -381,7 +381,7 @@ pprCoreBinder bind_site bndr
pprUntypedBinder :: Var -> SDoc
pprUntypedBinder binder
| isTyVar binder = text "@" <+> ppr binder -- NB: don't print kind
| isTyVar binder = text "@" <> ppr binder -- NB: don't print kind
| otherwise = pprIdBndr binder
pprTypedLamBinder :: BindingSite -> Bool -> Var -> SDoc
......@@ -431,7 +431,7 @@ pprTypedLetBinder binder
pprKindedTyVarBndr :: TyVar -> SDoc
-- Print a type variable binder with its kind (but not if *)
pprKindedTyVarBndr tyvar
= text "@" <+> pprTyVar tyvar
= text "@" <> pprTyVar tyvar
-- pprIdBndr does *not* print the type
-- When printing any Id binder in debug mode, we print its inline pragma and one-shot-ness
......
......@@ -2158,7 +2158,7 @@ pprCallInfo fn (CI { ci_key = key })
= ppr fn <+> ppr key
ppr_call_key_ty :: SpecArg -> Maybe SDoc
ppr_call_key_ty (SpecType ty) = Just $ char '@' <+> pprParendType ty
ppr_call_key_ty (SpecType ty) = Just $ char '@' <> pprParendType ty
ppr_call_key_ty UnspecType = Just $ char '_'
ppr_call_key_ty (SpecDict _) = Nothing
ppr_call_key_ty UnspecArg = Nothing
......
......@@ -924,7 +924,7 @@ pprHsWrapper wrap pp_thing_inside
help it (WpCast co) = add_parens $ sep [it False, nest 2 (text "|>"
<+> pprParendCo co)]
help it (WpEvApp id) = no_parens $ sep [it True, nest 2 (ppr id)]
help it (WpTyApp ty) = no_parens $ sep [it True, text "@" <+> pprParendType ty]
help it (WpTyApp ty) = no_parens $ sep [it True, text "@" <> pprParendType ty]
help it (WpEvLam id) = add_parens $ sep [ text "\\" <> pprLamBndr id <> dot, it False]
help it (WpTyLam tv) = add_parens $ sep [text "/\\" <> pprLamBndr tv <> dot, it False]
help it (WpLet binds) = add_parens $ sep [text "let" <+> braces (ppr binds), it False]
......
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}]
......@@ -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 }
......
......@@ -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
......
......@@ -5,19 +5,19 @@ Result size of Tidy Core
-- RHS size: {terms: 1, types: 2, coercions: 0, joins: 0/0}
T17339.$fClsA1B1 :: Cls A1 B1
T17339.$fClsA1B1 = T17339.C:Cls @ A1 @ B1
T17339.$fClsA1B1 = T17339.C:Cls @A1 @B1
-- RHS size: {terms: 1, types: 2, coercions: 0, joins: 0/0}
T17339.$fClsA2B1 :: Cls A2 B1
T17339.$fClsA2B1 = T17339.C:Cls @ A2 @ B1
T17339.$fClsA2B1 = T17339.C:Cls @A2 @B1
-- RHS size: {terms: 1, types: 2, coercions: 0, joins: 0/0}
T17339.$fClsA1B2 :: Cls A1 B2
T17339.$fClsA1B2 = T17339.C:Cls @ A1 @ B2
T17339.$fClsA1B2 = T17339.C:Cls @A1 @B2
-- RHS size: {terms: 1, types: 2, coercions: 0, joins: 0/0}
T17339.$fClsA2B2 :: Cls A2 B2
T17339.$fClsA2B2 = T17339.C:Cls @ A2 @ B2
T17339.$fClsA2B2 = T17339.C:Cls @A2 @B2
......@@ -10,20 +10,15 @@ letrec {
letrec {
x :: [GHC.Types.Int]
[LclId]
x = GHC.Enum.enumFrom
@ GHC.Types.Int $dEnum (GHC.Types.I# 1#); } in
x = GHC.Enum.enumFrom @GHC.Types.Int $dEnum (GHC.Types.I# 1#); } in
x; } in
GHC.Base.returnIO
@ [()]
@[()]
(GHC.Types.:
@ ()
@()
(GHC.Prim.unsafeCoerce#
@ 'GHC.Types.LiftedRep
@ 'GHC.Types.LiftedRep
@ [GHC.Types.Int]
@ ()
x)
(GHC.Types.[] @ ()))
@'GHC.Types.LiftedRep @'GHC.Types.LiftedRep @[GHC.Types.Int] @() x)
(GHC.Types.[] @()))
......@@ -38,19 +33,14 @@ letrec {
letrec {
x :: [GHC.Types.Int]
[LclId]
x = GHC.Enum.enumFrom
@ GHC.Types.Int $dEnum (GHC.Types.I# 1#); } in
x = GHC.Enum.enumFrom @GHC.Types.Int $dEnum (GHC.Types.I# 1#); } in
x; } in
GHC.Base.returnIO
@ [()]
@[()]
(GHC.Types.:
@ ()
@()
(GHC.Prim.unsafeCoerce#
@ 'GHC.Types.LiftedRep
@ 'GHC.Types.LiftedRep
@ [GHC.Types.Int]
@ ()
x)
(GHC.Types.[] @ ()))
@'GHC.Types.LiftedRep @'GHC.Types.LiftedRep @[GHC.Types.Int] @() x)
(GHC.Types.[] @()))
......@@ -71,10 +71,10 @@ minusOne
= case M.minusOne1 of {
NatS# ds1 ->
case ds1 of {
__DEFAULT -> GHC.Natural.underflowError @ Natural;
__DEFAULT -> GHC.Natural.underflowError @Natural;
0## -> GHC.Natural.zero
};
NatJ# ipv -> GHC.Natural.underflowError @ Natural
NatJ# ipv -> GHC.Natural.underflowError @Natural
}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
......
......@@ -68,15 +68,15 @@ Rule fired: Class op >>= (BUILTIN)
Rule fired: Class op >>= (BUILTIN)
Rule fired: Class op $p1Monad (BUILTIN)
Rule fired: Class op $p1Applicative (BUILTIN)
Rule fired: SPEC/Main $fApplicativeStateT @ Identity _ (Main)
Rule fired: SPEC/Main $fMonadStateT_$c>>= @ Identity _ (Main)
Rule fired: SPEC/Main $fMonadStateT_$c>> @ Identity _ (Main)
Rule fired: SPEC/Main $fApplicativeStateT @Identity _ (Main)
Rule fired: SPEC/Main $fMonadStateT_$c>>= @Identity _ (Main)
Rule fired: SPEC/Main $fMonadStateT_$c>> @Identity _ (Main)
Rule fired: Class op return (BUILTIN)
Rule fired: Class op $p1Monad (BUILTIN)
Rule fired: Class op $p1Applicative (BUILTIN)
Rule fired: SPEC/Main $fApplicativeStateT @ Identity _ (Main)
Rule fired: SPEC/Main $fMonadStateT_$c>>= @ Identity _ (Main)
Rule fired: SPEC/Main $fMonadStateT_$c>> @ Identity _ (Main)
Rule fired: SPEC/Main $fApplicativeStateT @Identity _ (Main)
Rule fired: SPEC/Main $fMonadStateT_$c>>= @Identity _ (Main)
Rule fired: SPEC/Main $fMonadStateT_$c>> @Identity _ (Main)
Rule fired: Class op return (BUILTIN)
Rule fired: Class op >>= (BUILTIN)
Rule fired: Class op >>= (BUILTIN)
......@@ -84,10 +84,10 @@ Rule fired: Class op >>= (BUILTIN)
Rule fired: Class op >>= (BUILTIN)
Rule fired: Class op $p1Monad (BUILTIN)
Rule fired: Class op $p1Applicative (BUILTIN)
Rule fired: SPEC/Main $fApplicativeStateT @ Identity _ (Main)
Rule fired: SPEC/Main $fApplicativeStateT @Identity _ (Main)
Rule fired: Class op $p1Monad (BUILTIN)
Rule fired: Class op $p1Applicative (BUILTIN)
Rule fired: SPEC/Main $fApplicativeStateT @ Identity _ (Main)
Rule fired: SPEC/Main $fApplicativeStateT @Identity _ (Main)
Rule fired: Class op $p1Monad (BUILTIN)
Rule fired: Class op $p1Applicative (BUILTIN)
Rule fired: Class op fmap (BUILTIN)
......@@ -105,19 +105,17 @@ Rule fired: Class op fmap (BUILTIN)
Rule fired: Class op >>= (BUILTIN)
Rule fired: Class op >>= (BUILTIN)
Rule fired: Class op fmap (BUILTIN)
Rule fired: SPEC/Main $fFunctorStateT @ Identity _ (Main)
Rule fired:
SPEC/Main $fApplicativeStateT_$cpure @ Identity _ (Main)
Rule fired: SPEC/Main $fApplicativeStateT_$c<*> @ Identity _ (Main)
Rule fired: SPEC/Main $fFunctorStateT @Identity _ (Main)
Rule fired: SPEC/Main $fApplicativeStateT_$cpure @Identity _ (Main)
Rule fired: SPEC/Main $fApplicativeStateT_$c<*> @Identity _ (Main)
Rule fired: Class op fmap (BUILTIN)
Rule fired: SPEC/Main $fApplicativeStateT_$c*> @ Identity _ (Main)
Rule fired: SPEC/Main $fApplicativeStateT_$c*> @Identity _ (Main)
Rule fired: Class op fmap (BUILTIN)
Rule fired: SPEC/Main $fFunctorStateT @ Identity _ (Main)
Rule fired:
SPEC/Main $fApplicativeStateT_$cpure @ Identity _ (Main)
Rule fired: SPEC/Main $fApplicativeStateT_$c<*> @ Identity _ (Main)
Rule fired: SPEC/Main $fApplicativeStateT_$c*> @ Identity _ (Main)
Rule fired: SPEC/Main $fMonadStateT @ Identity _ (Main)
Rule fired: SPEC/Main $fFunctorStateT @Identity _ (Main)
Rule fired: SPEC/Main $fApplicativeStateT_$cpure @Identity _ (Main)
Rule fired: SPEC/Main $fApplicativeStateT_$c<*> @Identity _ (Main)
Rule fired: SPEC/Main $fApplicativeStateT_$c*> @Identity _ (Main)
Rule fired: SPEC/Main $fMonadStateT @Identity _ (Main)
Rule fired: Class op $p1Monad (BUILTIN)
Rule fired: Class op <*> (BUILTIN)
Rule fired: Class op $p1Monad (BUILTIN)
......@@ -131,8 +129,8 @@ Rule fired: Class op $p1Applicative (BUILTIN)
Rule fired: Class op fmap (BUILTIN)
Rule fired: Class op >>= (BUILTIN)
Rule fired: Class op fmap (BUILTIN)
Rule fired: SPEC go @ (StateT (Sum Int) Identity) (Main)
Rule fired: SPEC go @(StateT (Sum Int) Identity) (Main)
Rule fired: Class op $p1Monad (BUILTIN)
Rule fired: Class op pure (BUILTIN)
Rule fired: SPEC/Main $fMonadStateT @ Identity _ (Main)
Rule fired: SPEC go @ (StateT (Sum Int) Identity) (Main)
Rule fired: SPEC/Main $fMonadStateT @Identity _ (Main)
Rule fired: SPEC go @(StateT (Sum Int) Identity) (Main)
......@@ -4,7 +4,7 @@ Rule fired: unpack (GHC.Base)
Rule fired: fold/build (GHC.Base)
Rule fired: Class op >> (BUILTIN)
Rule fired: Class op >> (BUILTIN)
Rule fired: SPEC/T4007 sequence__c @ IO _ _ (T4007)
Rule fired: SPEC/T4007 sequence__c @IO _ _ (T4007)
Rule fired: <# (BUILTIN)
Rule fired: tagToEnum# (BUILTIN)
Rule fired: unpack-list (GHC.Base)
......@@ -2,12 +2,12 @@
ExplicitForAllRules1.hs:49:11: warning:
Forall'd type variable ‘k’ is not bound in RULE lhs
Orig bndrs: [k, a, b, x]
Orig lhs: id' @ a x
optimised lhs: id' @ a x
Orig lhs: id' @a x
optimised lhs: id' @a x
Forall'd type variable ‘b’ is not bound in RULE lhs
Orig bndrs: [k, a, b, x]
Orig lhs: id' @ a x
optimised lhs: id' @ a x
Orig lhs: id' @a x
optimised lhs: id' @a x
ExplicitForAllRules1.hs:49:31: warning: [-Wunused-foralls (in -Wextra)]
Unused quantified type variable ‘b’
......
......@@ -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
......
......@@ -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{}]}
......@@ -2,5 +2,5 @@ instance [orphan] GHC.Exts.IsList [GHC.Types.Bool] = $fIsListBool
instance GHC.Exts.IsList [X] = $fIsListX
family instance GHC.Exts.Item [X] = D:R:ItemX
family instance [orphan] GHC.Exts.Item [GHC.Types.Bool]
"myrule1" [orphan] forall @ a.
"myrule2" GHC.Base.id @ (X -> X) f = f
"myrule1" [orphan] forall @a.
"myrule2" GHC.Base.id @(X -> X) f = f
......@@ -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}
......
case r @ GHC.Types.Any of { __DEFAULT -> r @ a }
case r @GHC.Types.Any of { __DEFAULT -> r @a }
foo :: Goof Int
foo = T14978.Goof @ Int @~ <Co:1>
foo = T14978.Goof @Int @~<Co:1>
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 }
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)
......@@ -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
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)
......@@ -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#
......
==================== Tidy Core rules ====================
"SPEC shared @ []"
"SPEC shared @[]"
forall ($dMyFunctor :: MyFunctor []) (irred :: Domain [] Int).
shared @ [] $dMyFunctor irred
shared @[] $dMyFunctor irred
= bar_$sshared
......@@ -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$*
......
==================== 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
==================== 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
......@@ -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"#))))