Skip to content

Instantly share code, notes, and snippets.

@bgamari
Created June 27, 2015 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bgamari/c96e13404f00202f2902 to your computer and use it in GitHub Desktop.
Save bgamari/c96e13404f00202f2902 to your computer and use it in GitHub Desktop.
Considering inlining: $fFunctorIdentity2
arg infos [ValueArg, ValueArg]
interesting continuation BoringCtxt
some_benefit True
is exp: True
is work-free: True
guidance ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)
ANSWER = YES
Inlining done: Data.Functor.Identity.$fFunctorIdentity2
Inlined fn: \ (@ a4) (@ b) (tpl [Occ=Once] :: a4 -> b) -> tpl
Cont: ApplyToTy (Bug.Rec
'["event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int])
ApplyToTy (Bug.Rec
'["id" Bug.:-> Bug.Expr GHC.Types.Int,
"id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int])
ApplyToVal simpl ((\ (ds_X2dK
:: Bug.Rec
'["event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]) ->
case ds_X2dK of _ [Occ=Dead] { Bug.:& @ r @ rs dt_X2eB r rs ->
case rs `cast` ...
of _ [Occ=Dead] { Bug.:& @ r @ rs dt_X2eQ r rs ->
case eta_B1 of _ [Occ=Dead] { Bug.:& @ r @ rs dt_d2bF x xs ->
case xs `cast` ...
of _ [Occ=Dead] { Bug.:& @ r @ rs dt_X2fh x xs ->
case xs `cast` ...
of _ [Occ=Dead] { Bug.:& @ r @ rs dt_X2fs x xs ->
case xs `cast` ...
of _ [Occ=Dead] { Bug.:& @ r @ rs dt_d2bT x xs ->
case r `cast` ... of nt_s2fs { Bug.Expr ipv ipv ->
let {
dt_X1PT :: Bug.Rec '["field1" Bug.:-> Bug.Expr GHC.Types.Int]
[LclId,
Str=DmdType,
Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 30}]
dt_X1PT =
Bug.:&
@ '["field1" Bug.:-> Bug.Expr GHC.Types.Int]
@ ("field1" Bug.:-> Bug.Expr GHC.Types.Int)
@ '[]
@~ <'["field1" Bug.:-> Bug.Expr GHC.Types.Int]>_N
(nt_s2fs `cast` ...)
(xs `cast` ...) } in
let {
dt_X1U4
:: Bug.Rec
'["event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]
[LclId,
Str=DmdType,
Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 30}]
dt_X1U4 =
Bug.:&
@ '["event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]
@ ("event_type" Bug.:-> Bug.Expr GHC.Types.Int)
@ '["field1" Bug.:-> Bug.Expr GHC.Types.Int]
@~ <'["event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]>_N
(x `cast` ...)
dt_X1PT } in
let {
dt_X1U6
:: Bug.Rec
'["id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]
[LclId,
Str=DmdType,
Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 30}]
dt_X1U6 =
Bug.:&
@ '["id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]
@ ("id" Bug.:-> Bug.Expr GHC.Types.Int)
@ '["event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]
@~ <'["id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]>_N
(x `cast` ...)
dt_X1U4 } in
case r `cast` ... of nt_s2fg { Bug.Expr ipv ipv ->
let {
dt_X1Uc
:: Bug.Rec
'["event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]
[LclId,
Str=DmdType,
Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 30}]
dt_X1Uc =
Bug.:&
@ '["event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]
@ ("event_type" Bug.:-> Bug.Expr GHC.Types.Int)
@ '["field1" Bug.:-> Bug.Expr GHC.Types.Int]
@~ <'["event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]>_N
(nt_s2fg `cast` ...)
dt_X1PT } in
let {
dt_X1Ue
:: Bug.Rec
'["id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]
[LclId,
Str=DmdType,
Unf=Unf{Src=<vanilla>, TopLvl=False, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=IF_ARGS [] 10 30}]
dt_X1Ue =
Bug.:&
@ '["id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]
@ ("id" Bug.:-> Bug.Expr GHC.Types.Int)
@ '["event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]
@~ <'["id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]>_N
(x `cast` ...)
dt_X1Uc } in
Bug.:&
@ '["id" Bug.:-> Bug.Expr GHC.Types.Int,
"id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]
@ ("id" Bug.:-> Bug.Expr GHC.Types.Int)
@ '["id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]
@~ <'["id" Bug.:-> Bug.Expr GHC.Types.Int,
"id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int]>_N
(x `cast` ...)
dt_X1Ue
}
}
}
}
}
}
}
})
`cast` ...)
ApplyToVal simpl (rs `cast` ...)
CastIt Nth:1
(Nth:1
(((forall a4 b.
<a4 -> b>_R
-> Sym (Data.Functor.Identity.NTCo:Identity[0] <a4>_R)
-> Sym (Data.Functor.Identity.NTCo:Identity[0] <b>_R))@Bug.Rec
'["event_type"
Bug.:-> Bug.Expr
GHC.Types.Int,
"field1"
Bug.:-> Bug.Expr
GHC.Types.Int])@Bug.Rec
'["id"
Bug.:-> Bug.Expr
GHC.Types.Int,
"id"
Bug.:-> Bug.Expr
GHC.Types.Int,
"event_type"
Bug.:-> Bug.Expr
GHC.Types.Int,
"field1"
Bug.:-> Bug.Expr
GHC.Types.Int]))
Stop[BoringCtxt] Data.Functor.Identity.Identity
(Bug.Rec
'["id" Bug.:-> Bug.Expr GHC.Types.Int,
"id" Bug.:-> Bug.Expr GHC.Types.Int,
"event_type" Bug.:-> Bug.Expr GHC.Types.Int,
"field1" Bug.:-> Bug.Expr GHC.Types.Int])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment