summaryrefslogtreecommitdiff
path: root/testsuite/tests/eyeball/inline4.hs
blob: 2648c9e0391eabfa2d2189820ead1053d3a4ef9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
module CmmTx where

data TxRes a = TxRes Bool a

instance Monad TxRes where
    return = TxRes False

{-  Here you can get a simplifier loop thus:
NOTE: Simplifier still going after 4 iterations; bailing out.  Size = 52
NOTE: Simplifier still going after 4 iterations; bailing out.  Size = 52
NOTE: Simplifier still going after 4 iterations; bailing out.  Size = 52
NOTE: Simplifier still going after 4 iterations; bailing out.  Size = 52

Reason: 'a' is inline (not pre/post unconditionally; just ordinary inlining)
Then, since ($dm>>) has arity 3, the rhs of (>>) is a PAP, so the arg is
floated out, past the big lambdas.

See Note [Unsaturated functions] in SimplUtils 

------------------------------------------------------------
a_s9f{v} [lid] =
  base:GHC.Base.:DMonad{v r5} [gid]
    @ main:CmmTx.TxRes{tc rd}
    >>={v a6E} [lid]
    >>{v a6H} [lid]
    return{v a6J} [lid]
    fail{v a6M} [lid]
>>{v a6H} [lid] [ALWAYS LoopBreaker Nothing] :: forall a{tv a6F} [tv]
                                                       b{tv a6G} [tv].
                                                main:CmmTx.TxRes{tc rd} a{tv a6F} [tv]
                                                -> main:CmmTx.TxRes{tc rd} b{tv a6G} [tv]
                                                -> main:CmmTx.TxRes{tc rd} b{tv a6G} [tv]
[Arity 2
 Str: DmdType LL]
>>{v a6H} [lid] =
  \ (@ a{tv a78} [sk] :: ghc-prim:GHC.Prim.*{(w) tc 34d})
    (@ b{tv a79} [sk] :: ghc-prim:GHC.Prim.*{(w) tc 34d}) ->
    base:GHC.Base.$dm>>{v r5f} [gid]
      @ main:CmmTx.TxRes{tc rd} a_s9f{v} [lid] @ a{tv a78} [sk] @ b{tv a79} [sk]
 -}