Why isn't ($) inlining when I want?

David Feuer david.feuer at gmail.com
Wed Aug 27 16:21:34 UTC 2014


I just ran that (results attached), and as far as I can tell, it
doesn't even *consider* inlining ($) until phase 2.

On Wed, Aug 27, 2014 at 4:03 AM, Simon Peyton Jones
<simonpj at microsoft.com> wrote:
> It's hard to tell since you are using a modified compiler.  Try running with -ddump-occur-anal -dverbose-core2core -ddump-inlinings.  That will show you every inlining, whether failed or successful. You can see the attempt to inline ($) and there is some info with the output that may help to explain why it did or did not work.
>
> Try that
>
> Simon
>
> | -----Original Message-----
> | From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of David
> | Feuer
> | Sent: 27 August 2014 04:50
> | To: ghc-devs; Carter Schonwald
> | Subject: Why isn't ($) inlining when I want?
> |
> | tl;dr  I added a simplifier run with inlining enabled between
> | specialization and floating out. It seems incapable of inlining
> | saturated applications of ($), and I can't figure out why. These are
> | inlined later, when phase 2 runs. Am I running the simplifier wrong or
> | something?
> |
> |
> | I'm working on this simple little fusion pipeline:
> |
> | {-# INLINE takeWhile #-}
> | takeWhile p xs = build builder
> |   where
> |     builder c n = foldr go n xs
> |       where
> |         go x r = if p x then x `c` r else n
> |
> | foo c n x = foldr c n . takeWhile (/= (1::Int)) $ [-9..10]
> |
> | There are some issues with the enumFrom definition that break things.
> | If I use a fusible unfoldr that produces some numbers instead, that
> | issue goes away. Part of that problem (but not all of it) is that the
> | simplifier doesn't run to apply rules between specialization and full
> | laziness, so there's no opportunity for the specialization of
> | enumFromTo to Int to trigger the rewrite to a build form and fusion
> | with foldr before full laziness tears things apart. The other problem
> | is that inlining doesn't happen at all before full laziness, so things
> | defined using foldr and/or build aren't actually exposed as such until
> | afterwards. Therefore I decided to try adding a simplifier run with
> | inlining between specialization and floating out:
> |
> |         runWhen do_specialise CoreDoSpecialising,
> |
> |         runWhen full_laziness $ CoreDoSimplify max_iter
> |                        (base_mode { sm_phase = InitialPhase
> |                                   , sm_names = ["PostGentle"]
> |                                   , sm_rules = rules_on
> |                                   , sm_inline = True
> |                                   , sm_case_case = False }),
> |
> |         runWhen full_laziness $
> |            CoreDoFloatOutwards FloatOutSwitches {
> |                                  floatOutLambdas   = Just 0,
> |                                  floatOutConstants = True,
> |                                  floatOutPartialApplications = False },
> |
> | The weird thing is that for some reason this doesn't inline ($), even
> | though it appears to be saturated. Using the modified thing with (my
> | version of) unfoldr:
> |
> | foo c n x = (foldr c n . takeWhile (/= (1::Int))) $ unfoldr (potato 10)
> | (-9)
> |
> | potato :: Int -> Int -> Maybe (Int, Int)
> | potato n m | m <= n = Just (m, m)
> |            | otherwise = Nothing
> |
> |
> | I get this out of the specializer:
> |
> | foo
> | foo =
> |   \ @ t_a1Za @ c_a1Zb c_a1HT n_a1HU _ ->
> |     $ (. (foldr c_a1HT n_a1HU)
> |          (takeWhile
> |             (let {
> |                ds_s21z
> |                ds_s21z = I# 1 } in
> |              \ ds_d1Zw -> neInt ds_d1Zw ds_s21z)))
> |       (let {
> |          n_s21x
> |          n_s21x = I# 10 } in
> |        unfoldr
> |          (\ m_a1U7 ->
> |             case leInt m_a1U7 n_s21x of _ {
> |               False -> Nothing;
> |               True -> Just (m_a1U7, m_a1U7)
> |             })
> |          ($fNumInt_$cnegate (I# 9)))
> |
> |
> | and then I get this out of my extra simplifier run:
> |
> | foo
> | foo =
> |   \ @ t_a1Za @ c_a1Zb c_a1HT n_a1HU _ ->
> |     $ (\ x_a20f ->
> |          foldr
> |            (\ x_a1HR r_a1HS ->
> |               case case x_a1HR of _ { I# x_a20R ->
> |                    tagToEnum#
> |                      (case x_a20R of _ {
> |                         __DEFAULT -> 1;
> |                         1 -> 0
> |                       })
> |                    }
> |               of _ {
> |                 False -> n_a1HU;
> |                 True -> c_a1HT x_a1HR r_a1HS
> |               })
> |            n_a1HU
> |            x_a20f)
> |       (let {
> |          b'_a1ZS
> |          b'_a1ZS = $fNumInt_$cnegate (I# 9) } in
> |        $ (build)
> |          (\ @ b1_a1ZU c_a1ZV n_a1ZW ->
> |             letrec {
> |               go_a1ZX
> |               go_a1ZX =
> |                 \ b2_a1ZY ->
> |                   case case case b2_a1ZY of _ { I# x_a218 ->
> |                             tagToEnum# (<=# x_a218 10)
> |                             }
> |                        of _ {
> |                          False -> Nothing;
> |                          True -> Just (b2_a1ZY, b2_a1ZY)
> |                        }
> |                   of _ {
> |                     Nothing -> n_a1ZW;
> |                     Just ds_a203 ->
> |                       case ds_a203 of _ { (a1_a207, new_b_a208) ->
> |                       c_a1ZV a1_a207 (go_a1ZX new_b_a208)
> |                       }
> |                   }; } in
> |             go_a1ZX b'_a1ZS))
> |
> |
> | That is, neither the $ in the code nor the $ that was inserted when
> | inlining unfoldr got inlined themselves, even though both appear to be
> | saturated. As a result, foldr/build doesn't fire, and full laziness
> | tears things apart. Later on, in simplifier phase 2, $ gets inlined.
> | What's preventing this from happening in the PostGentle phase I added?
> |
> | David Feuer
> | _______________________________________________
> | ghc-devs mailing list
> | ghc-devs at haskell.org
> | http://www.haskell.org/mailman/listinfo/ghc-devs
-------------- next part --------------
Glasgow Haskell Compiler, Version 7.9.20140818, stage 2 booted by GHC version 7.8.3
Using binary package database: /home/dfeuer/src/ghc/inplace/lib/package.conf.d/package.cache
wired-in package ghc-prim mapped to ghc-prim-0.3.1.0-inplace
wired-in package integer-gmp mapped to integer-gmp-0.5.1.0-inplace
wired-in package base mapped to base-4.7.1.0-inplace
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-2.10.0.0-inplace
wired-in package ghc mapped to ghc-7.9.20140818-inplace
wired-in package dph-seq not found.
wired-in package dph-par not found.
wired-in package ghc-prim mapped to ghc-prim-0.3.1.0-inplace
wired-in package integer-gmp mapped to integer-gmp-0.5.1.0-inplace
wired-in package base mapped to base-4.7.1.0-inplace
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-2.10.0.0-inplace
wired-in package ghc mapped to ghc-7.9.20140818-inplace
wired-in package dph-seq not found.
wired-in package dph-par not found.
*** Chasing dependencies:
Chasing modules from: *testTakeWhile.hs
Stable obj: []
Stable BCO: []
Ready for upsweep
  [NONREC
      ModSummary {
         ms_hs_date = 2014-08-27 03:44:20.75863229 UTC
         ms_mod = main at main:Foo,
         ms_textual_imps = [import Prelude hiding ( takeWhile ),
                            import Data.List ( unfoldr ), import GHC.Exts]
         ms_srcimps = []
      }]
*** Deleting temp files:
compile: input file testTakeWhile.hs
Created temporary directory: /tmp/ghc27658_0
*** Checking old interface for Foo:
[1 of 1] Compiling Foo              ( testTakeWhile.hs, testTakeWhile.o )
*** Parser:
*** Renamer/typechecker:
*** Desugar:

==================== Occurrence analysis ====================
Foo.takeWhile [InlPrag=INLINE (sat-args=2), Occ=OnceL!]
  :: forall a_a1Vj.
     (a_a1Vj -> GHC.Types.Bool) -> [a_a1Vj] -> [a_a1Vj]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=False)
         Tmpl= \ (@ a_a1Vl)
                 (p_a1HL [Occ=OnceL!] :: a_a1Vl -> GHC.Types.Bool)
                 (xs_a1HM [Occ=Once] :: [a_a1Vl]) ->
                 GHC.Base.build
                   @ a_a1Vl
                   (\ (@ b_a1Vd) ->
                      (\ (@ b_a1V3)
                         (c_a1HO [Occ=OnceL!, OS=OneShot] :: a_a1Vl -> b_a1V3 -> b_a1V3)
                         (n_a1HP [OS=OneShot] :: b_a1V3) ->
                         GHC.Base.foldr
                           @ a_a1Vl
                           @ b_a1V3
                           (\ (x_a1HR :: a_a1Vl) (r_a1HS [Occ=Once, OS=OneShot] :: b_a1V3) ->
                              case p_a1HL x_a1HR of _ [Occ=Dead] {
                                GHC.Types.False -> n_a1HP;
                                GHC.Types.True -> c_a1HO x_a1HR r_a1HS
                              })
                           n_a1HP
                           xs_a1HM)
                        @ b_a1Vd)}]
Foo.takeWhile =
  \ (@ a_a1Vl)
    (eta_B2 [Occ=Once] :: a_a1Vl -> GHC.Types.Bool)
    (eta_B1 [Occ=Once] :: [a_a1Vl]) ->
    (\ (@ a_a1Vj) ->
       let {
         cobox_a1Vf [Occ=OnceL!] :: a_a1Vj ~ a_a1Vj
         [LclId, Str=DmdType]
         cobox_a1Vf = GHC.Types.Eq# @ * @ a_a1Vj @ a_a1Vj @~ <a_a1Vj>_N } in
       let {
         takeWhile_a1UB [Occ=Once]
           :: (a_a1Vj -> GHC.Types.Bool) -> [a_a1Vj] -> [a_a1Vj]
         [LclId, Str=DmdType]
         takeWhile_a1UB =
           \ (p_a1HL [Occ=OnceL!] :: a_a1Vj -> GHC.Types.Bool)
             (xs_a1HM [Occ=OnceL] :: [a_a1Vj]) ->
             let {
               builder_a1HN [Occ=Once]
                 :: forall b_a1V1. (a_a1Vj -> b_a1V1 -> b_a1V1) -> b_a1V1 -> b_a1V1
               [LclId, Str=DmdType]
               builder_a1HN =
                 \ (@ b_a1V3) ->
                   (\ (@ b_a1V1) ->
                      let {
                        builder_a1UG [Occ=Once]
                          :: (a_a1Vj -> b_a1V1 -> b_a1V1) -> b_a1V1 -> b_a1V1
                        [LclId, Str=DmdType]
                        builder_a1UG =
                          \ (c_a1HO [Occ=OnceL!] :: a_a1Vj -> b_a1V1 -> b_a1V1)
                            (n_a1HP :: b_a1V1) ->
                            let {
                              go_a1HQ [Occ=Once] :: a_a1Vj -> b_a1V1 -> b_a1V1
                              [LclId, Str=DmdType]
                              go_a1HQ =
                                let {
                                  go_a1UL [Occ=Once] :: a_a1Vj -> b_a1V1 -> b_a1V1
                                  [LclId, Str=DmdType]
                                  go_a1UL =
                                    \ (x_a1HR :: a_a1Vj) (r_a1HS [Occ=Once] :: b_a1V1) ->
                                      case p_a1HL x_a1HR of _ [Occ=Dead] {
                                        GHC.Types.False -> n_a1HP;
                                        GHC.Types.True -> c_a1HO x_a1HR r_a1HS
                                      } } in
                                go_a1UL } in
                            GHC.Base.foldr @ a_a1Vj @ b_a1V1 go_a1HQ n_a1HP xs_a1HM } in
                      builder_a1UG)
                     @ b_a1V3 } in
             GHC.Base.build
               @ a_a1Vj
               (\ (@ b_a1Vd) ->
                  case cobox_a1Vf of _ [Occ=Dead] { GHC.Types.Eq# _ [Occ=Dead] ->
                  builder_a1HN @ b_a1Vd
                  }) } in
       takeWhile_a1UB)
      @ a_a1Vl eta_B2 eta_B1

$dOrd_a1Uw [Occ=OnceL] :: GHC.Classes.Ord GHC.Types.Int
[LclId, Str=DmdType]
$dOrd_a1Uw = GHC.Classes.$fOrdInt

Foo.potato [Occ=OnceL!]
  :: GHC.Types.Int
     -> GHC.Types.Int -> Data.Maybe.Maybe (GHC.Types.Int, GHC.Types.Int)
[LclId, Str=DmdType]
Foo.potato =
  let {
    potato_a1Ui [Occ=Once]
      :: GHC.Types.Int
         -> GHC.Types.Int -> Data.Maybe.Maybe (GHC.Types.Int, GHC.Types.Int)
    [LclId, Str=DmdType]
    potato_a1Ui =
      \ (n_a1U6 [Occ=Once] :: GHC.Types.Int) (m_a1U7 :: GHC.Types.Int) ->
        let {
          fail_d1Zr [Occ=Once!]
            :: GHC.Prim.Void#
               -> Data.Maybe.Maybe (GHC.Types.Int, GHC.Types.Int)
          [LclId, Str=DmdType]
          fail_d1Zr =
            \ _ [Occ=Dead, OS=OneShot] ->
              Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int) } in
        case GHC.Classes.<= @ GHC.Types.Int $dOrd_a1Uw m_a1U7 n_a1U6
        of _ [Occ=Dead] {
          GHC.Types.False -> fail_d1Zr GHC.Prim.void#;
          GHC.Types.True ->
            Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (m_a1U7, m_a1U7)
        } } in
  potato_a1Ui

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX, Str=DmdType]
Foo.foo =
  \ (@ t_a1Za) (@ c_a1Zb) ->
    (\ (@ t_a1Z7) (@ c_a1Z8) ->
       let {
         $dNum_a1X1 [Occ=OnceL] :: GHC.Num.Num GHC.Types.Int
         [LclId, Str=DmdType]
         $dNum_a1X1 = GHC.Num.$fNumInt } in
       let {
         $dEq_a1VO [Occ=OnceL] :: GHC.Classes.Eq GHC.Types.Int
         [LclId, Str=DmdType]
         $dEq_a1VO = GHC.Classes.$fEqInt } in
       let {
         foo_a1Vr [Occ=Once]
           :: (GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
              -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
         [LclId, Str=DmdType]
         foo_a1Vr =
           \ (c_a1HT [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
             (n_a1HU [Occ=Once] :: c_a1Z8)
             _ [Occ=Dead] ->
             GHC.Base.$
               @ [GHC.Types.Int]
               @ c_a1Z8
               (GHC.Base..
                  @ [GHC.Types.Int]
                  @ c_a1Z8
                  @ [GHC.Types.Int]
                  (GHC.Base.foldr @ GHC.Types.Int @ c_a1Z8 c_a1HT n_a1HU)
                  (Foo.takeWhile
                     @ GHC.Types.Int
                     (let {
                        ds_d1Zx [Occ=OnceL] :: GHC.Types.Int
                        [LclId, Str=DmdType]
                        ds_d1Zx = GHC.Types.I# 1 } in
                      \ (ds_d1Zw [Occ=Once] :: GHC.Types.Int) ->
                        GHC.Classes./= @ GHC.Types.Int $dEq_a1VO ds_d1Zw ds_d1Zx)))
               (Data.List.unfoldr
                  @ GHC.Types.Int
                  @ GHC.Types.Int
                  (Foo.potato (GHC.Types.I# 10))
                  (GHC.Num.negate @ GHC.Types.Int $dNum_a1X1 (GHC.Types.I# 9))) } in
       foo_a1Vr)
      @ t_a1Za @ c_a1Zb




==================== Desugar (after optimization) ====================
Result size of Desugar (after optimization)
  = {terms: 72, types: 80, coercions: 0}

Foo.takeWhile [InlPrag=INLINE (sat-args=2), Occ=OnceL!]
  :: forall a_a1Vj.
     (a_a1Vj -> GHC.Types.Bool) -> [a_a1Vj] -> [a_a1Vj]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=False)
         Tmpl= \ (@ a_a1Vl)
                 (p_a1HL [Occ=OnceL!] :: a_a1Vl -> GHC.Types.Bool)
                 (xs_a1HM [Occ=Once] :: [a_a1Vl]) ->
                 GHC.Base.build
                   @ a_a1Vl
                   (\ (@ b_a1Vd) ->
                      (\ (@ b_a1V3)
                         (c_a1HO [Occ=OnceL!, OS=OneShot] :: a_a1Vl -> b_a1V3 -> b_a1V3)
                         (n_a1HP [OS=OneShot] :: b_a1V3) ->
                         GHC.Base.foldr
                           @ a_a1Vl
                           @ b_a1V3
                           (\ (x_a1HR :: a_a1Vl) (r_a1HS [Occ=Once, OS=OneShot] :: b_a1V3) ->
                              case p_a1HL x_a1HR of _ [Occ=Dead] {
                                GHC.Types.False -> n_a1HP;
                                GHC.Types.True -> c_a1HO x_a1HR r_a1HS
                              })
                           n_a1HP
                           xs_a1HM)
                        @ b_a1Vd)}]
Foo.takeWhile =
  \ (@ a_a1Vl)
    (eta_B2 :: a_a1Vl -> GHC.Types.Bool)
    (eta_B1 :: [a_a1Vl]) ->
    (\ (p_a1HL :: a_a1Vl -> GHC.Types.Bool) (xs_a1HM :: [a_a1Vl]) ->
       GHC.Base.build
         @ a_a1Vl
         (\ (@ b_a1Vd) ->
            (\ (@ b_a1V3)
               (c_a1HO :: a_a1Vl -> b_a1V3 -> b_a1V3)
               (n_a1HP :: b_a1V3) ->
               GHC.Base.foldr
                 @ a_a1Vl
                 @ b_a1V3
                 (\ (x_a1HR :: a_a1Vl) (r_a1HS :: b_a1V3) ->
                    case p_a1HL x_a1HR of _ [Occ=Dead] {
                      GHC.Types.False -> n_a1HP;
                      GHC.Types.True -> c_a1HO x_a1HR r_a1HS
                    })
                 n_a1HP
                 xs_a1HM)
              @ b_a1Vd))
      eta_B2 eta_B1

Foo.potato
  :: GHC.Types.Int
     -> GHC.Types.Int -> Data.Maybe.Maybe (GHC.Types.Int, GHC.Types.Int)
[LclId, Str=DmdType]
Foo.potato =
  \ (n_a1U6 :: GHC.Types.Int) (m_a1U7 :: GHC.Types.Int) ->
    case GHC.Classes.<=
           @ GHC.Types.Int GHC.Classes.$fOrdInt m_a1U7 n_a1U6
    of _ [Occ=Dead] {
      GHC.Types.False ->
        (\ _ [Occ=Dead, OS=OneShot] ->
           Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int))
          GHC.Prim.void#;
      GHC.Types.True ->
        Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (m_a1U7, m_a1U7)
    }

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX, Str=DmdType]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.$
      @ [GHC.Types.Int]
      @ c_a1Zb
      (GHC.Base..
         @ [GHC.Types.Int]
         @ c_a1Zb
         @ [GHC.Types.Int]
         (GHC.Base.foldr @ GHC.Types.Int @ c_a1Zb c_a1HT n_a1HU)
         (Foo.takeWhile
            @ GHC.Types.Int
            (let {
               ds_d1Zx :: GHC.Types.Int
               [LclId, Str=DmdType]
               ds_d1Zx = GHC.Types.I# 1 } in
             \ (ds_d1Zw :: GHC.Types.Int) ->
               GHC.Classes./=
                 @ GHC.Types.Int GHC.Classes.$fEqInt ds_d1Zw ds_d1Zx)))
      (Data.List.unfoldr
         @ GHC.Types.Int
         @ GHC.Types.Int
         (Foo.potato (GHC.Types.I# 10))
         (GHC.Num.negate @ GHC.Types.Int GHC.Num.$fNumInt (GHC.Types.I# 9)))



*** Simplifier:

==================== Occurrence analysis ====================
Foo.takeWhile [InlPrag=INLINE (sat-args=2), Occ=OnceL!]
  :: forall a_a1Vj.
     (a_a1Vj -> GHC.Types.Bool) -> [a_a1Vj] -> [a_a1Vj]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=False)
         Tmpl= \ (@ a_a1Vl)
                 (p_a1HL [Occ=OnceL!] :: a_a1Vl -> GHC.Types.Bool)
                 (xs_a1HM [Occ=Once] :: [a_a1Vl]) ->
                 GHC.Base.build
                   @ a_a1Vl
                   (\ (@ b_a1Vd) ->
                      (\ (@ b_a1V3)
                         (c_a1HO [Occ=OnceL!, OS=OneShot] :: a_a1Vl -> b_a1V3 -> b_a1V3)
                         (n_a1HP [OS=OneShot] :: b_a1V3) ->
                         GHC.Base.foldr
                           @ a_a1Vl
                           @ b_a1V3
                           (\ (x_a1HR :: a_a1Vl) (r_a1HS [Occ=Once, OS=OneShot] :: b_a1V3) ->
                              case p_a1HL x_a1HR of _ [Occ=Dead] {
                                GHC.Types.False -> n_a1HP;
                                GHC.Types.True -> c_a1HO x_a1HR r_a1HS
                              })
                           n_a1HP
                           xs_a1HM)
                        @ b_a1Vd)}]
Foo.takeWhile =
  \ (@ a_a1Vl)
    (eta_B2 [Occ=Once] :: a_a1Vl -> GHC.Types.Bool)
    (eta_B1 [Occ=Once] :: [a_a1Vl]) ->
    (\ (p_a1HL [Occ=OnceL!, OS=OneShot] :: a_a1Vl -> GHC.Types.Bool)
       (xs_a1HM [Occ=Once, OS=OneShot] :: [a_a1Vl]) ->
       GHC.Base.build
         @ a_a1Vl
         (\ (@ b_a1Vd) ->
            (\ (@ b_a1V3)
               (c_a1HO [Occ=OnceL!, OS=OneShot] :: a_a1Vl -> b_a1V3 -> b_a1V3)
               (n_a1HP [OS=OneShot] :: b_a1V3) ->
               GHC.Base.foldr
                 @ a_a1Vl
                 @ b_a1V3
                 (\ (x_a1HR :: a_a1Vl) (r_a1HS [Occ=Once, OS=OneShot] :: b_a1V3) ->
                    case p_a1HL x_a1HR of _ [Occ=Dead] {
                      GHC.Types.False -> n_a1HP;
                      GHC.Types.True -> c_a1HO x_a1HR r_a1HS
                    })
                 n_a1HP
                 xs_a1HM)
              @ b_a1Vd))
      eta_B2 eta_B1

Foo.potato [Occ=OnceL!]
  :: GHC.Types.Int
     -> GHC.Types.Int -> Data.Maybe.Maybe (GHC.Types.Int, GHC.Types.Int)
[LclId, Str=DmdType]
Foo.potato =
  \ (n_a1U6 [Occ=Once] :: GHC.Types.Int) (m_a1U7 :: GHC.Types.Int) ->
    case GHC.Classes.<=
           @ GHC.Types.Int GHC.Classes.$fOrdInt m_a1U7 n_a1U6
    of _ [Occ=Dead] {
      GHC.Types.False ->
        (\ _ [Occ=Dead, OS=OneShot] ->
           Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int))
          GHC.Prim.void#;
      GHC.Types.True ->
        Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (m_a1U7, m_a1U7)
    }

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX, Str=DmdType]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT [Occ=Once] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU [Occ=Once] :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.$
      @ [GHC.Types.Int]
      @ c_a1Zb
      (GHC.Base..
         @ [GHC.Types.Int]
         @ c_a1Zb
         @ [GHC.Types.Int]
         (GHC.Base.foldr @ GHC.Types.Int @ c_a1Zb c_a1HT n_a1HU)
         (Foo.takeWhile
            @ GHC.Types.Int
            (let {
               ds_d1Zx [Occ=OnceL] :: GHC.Types.Int
               [LclId, Str=DmdType]
               ds_d1Zx = GHC.Types.I# 1 } in
             \ (ds_d1Zw [Occ=Once] :: GHC.Types.Int) ->
               GHC.Classes./=
                 @ GHC.Types.Int GHC.Classes.$fEqInt ds_d1Zw ds_d1Zx)))
      (Data.List.unfoldr
         @ GHC.Types.Int
         @ GHC.Types.Int
         (Foo.potato (GHC.Types.I# 10))
         (GHC.Num.negate @ GHC.Types.Int GHC.Num.$fNumInt (GHC.Types.I# 9)))



SimplBind takeWhile
Inactive unfolding: build
Inactive unfolding: foldr
Inactive unfolding: build
Inactive unfolding: foldr
SimplBind potato
SimplBind foo
Inactive unfolding: $
Inactive unfolding: .
Inactive unfolding: foldr
Inactive unfolding: takeWhile
Inactive unfolding: ds_d1Zx
Rule fired
    Rule: Class op /=
    Before: GHC.Classes./=
              (TYPE GHC.Types.Int) GHC.Classes.$fEqInt ds_d1Zw ds_d1Zx
    After:  GHC.Classes.neInt
    Cont:   Stop[BoringCtxt] GHC.Types.Bool
Inactive unfolding: neInt
Inactive unfolding: unfoldr
Inactive unfolding: n
Rule fired
    Rule: Class op <=
    Before: GHC.Classes.<=
              (TYPE GHC.Types.Int) GHC.Classes.$fOrdInt m_a1U7 n_a1U6
    After:  GHC.Classes.leInt
    Cont:   Select nodup wild_00
              []
              [(GHC.Types.False,
                [],
                (\ _ [Occ=Dead, OS=OneShot] ->
                   Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int))
                  GHC.Prim.void#),
               (GHC.Types.True,
                [],
                Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (m_a1U7, m_a1U7))]
            Stop[BoringCtxt] Data.Maybe.Maybe (GHC.Types.Int, GHC.Types.Int)
Inactive unfolding: leInt
Rule fired
    Rule: Class op negate
    Before: GHC.Num.negate
              (TYPE GHC.Types.Int) GHC.Num.$fNumInt (GHC.Types.I# 9)
    After:  GHC.Num.$fNumInt_$cnegate
    Cont:   Stop[BoringCtxt] GHC.Types.Int
Inactive unfolding: $fNumInt_$cnegate
Result size of Simplifier iteration=1
  = {terms: 60, types: 64, coercions: 0}

==================== Occurrence analysis ====================
Foo.takeWhile [InlPrag=INLINE (sat-args=2), Occ=OnceL!]
  :: forall a_a1Vj.
     (a_a1Vj -> GHC.Types.Bool) -> [a_a1Vj] -> [a_a1Vj]
[LclId,
 Arity=2,
 Str=DmdType,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=False)
         Tmpl= \ (@ a_a1Vl)
                 (p_a1HL [Occ=OnceL!] :: a_a1Vl -> GHC.Types.Bool)
                 (xs_a1HM [Occ=Once] :: [a_a1Vl]) ->
                 GHC.Base.build
                   @ a_a1Vl
                   (\ (@ b_a1Vd)
                      (c_a1HO [Occ=OnceL!, OS=OneShot] :: a_a1Vl -> b_a1Vd -> b_a1Vd)
                      (n_a1HP [OS=OneShot] :: b_a1Vd) ->
                      GHC.Base.foldr
                        @ a_a1Vl
                        @ b_a1Vd
                        (\ (x_a1HR :: a_a1Vl) (r_a1HS [Occ=Once, OS=OneShot] :: b_a1Vd) ->
                           case p_a1HL x_a1HR of _ [Occ=Dead] {
                             GHC.Types.False -> n_a1HP;
                             GHC.Types.True -> c_a1HO x_a1HR r_a1HS
                           })
                        n_a1HP
                        xs_a1HM)}]
Foo.takeWhile =
  \ (@ a_a1Vl)
    (eta_B2 [Occ=OnceL!] :: a_a1Vl -> GHC.Types.Bool)
    (eta_B1 [Occ=Once] :: [a_a1Vl]) ->
    GHC.Base.build
      @ a_a1Vl
      (\ (@ b_a1Vd)
         (c_a1HO [Occ=OnceL!, OS=OneShot] :: a_a1Vl -> b_a1Vd -> b_a1Vd)
         (n_a1HP [OS=OneShot] :: b_a1Vd) ->
         GHC.Base.foldr
           @ a_a1Vl
           @ b_a1Vd
           (\ (x_a1HR :: a_a1Vl) (r_a1HS [Occ=Once, OS=OneShot] :: b_a1Vd) ->
              case eta_B2 x_a1HR of _ [Occ=Dead] {
                GHC.Types.False -> n_a1HP;
                GHC.Types.True -> c_a1HO x_a1HR r_a1HS
              })
           n_a1HP
           eta_B1)

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [0 0 0] 330 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT [Occ=Once] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU [Occ=Once] :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.$
      @ [GHC.Types.Int]
      @ c_a1Zb
      (GHC.Base..
         @ [GHC.Types.Int]
         @ c_a1Zb
         @ [GHC.Types.Int]
         (GHC.Base.foldr @ GHC.Types.Int @ c_a1Zb c_a1HT n_a1HU)
         (Foo.takeWhile
            @ GHC.Types.Int
            (let {
               ds_d1Zx [Occ=OnceL] :: GHC.Types.Int
               [LclId,
                Str=DmdType,
                Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=0, Value=True,
                        ConLike=True, WorkFree=True, Expandable=True,
                        Guidance=IF_ARGS [] 10 20}]
               ds_d1Zx = GHC.Types.I# 1 } in
             \ (ds_d1Zw [Occ=Once] :: GHC.Types.Int) ->
               GHC.Classes.neInt ds_d1Zw ds_d1Zx)))
      (let {
         n_a1U6 [Occ=OnceL] :: GHC.Types.Int
         [LclId,
          Str=DmdType,
          Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=0, Value=True,
                  ConLike=True, WorkFree=True, Expandable=True,
                  Guidance=IF_ARGS [] 10 20}]
         n_a1U6 = GHC.Types.I# 10 } in
       Data.List.unfoldr
         @ GHC.Types.Int
         @ GHC.Types.Int
         (\ (m_a1U7 :: GHC.Types.Int) ->
            case GHC.Classes.leInt m_a1U7 n_a1U6 of _ [Occ=Dead] {
              GHC.Types.False ->
                Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int);
              GHC.Types.True ->
                Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (m_a1U7, m_a1U7)
            })
         (GHC.Num.$fNumInt_$cnegate (GHC.Types.I# 9)))



SimplBind takeWhile
Inactive unfolding: build
Inactive unfolding: foldr
Inactive unfolding: build
Inactive unfolding: foldr
SimplBind foo
Inactive unfolding: $
Inactive unfolding: .
Inactive unfolding: foldr
Inactive unfolding: takeWhile
Inactive unfolding: neInt
Inactive unfolding: ds_d1Zx
Inactive unfolding: unfoldr
Inactive unfolding: leInt
Inactive unfolding: n
Inactive unfolding: $fNumInt_$cnegate

==================== Simplifier ====================
  Max iterations = 4
  SimplMode {Phase = InitialPhase [Gentle],
             no inline,
             rules,
             eta-expand,
             no case-of-case}
Result size of Simplifier = {terms: 60, types: 64, coercions: 0}

Foo.takeWhile [InlPrag=INLINE (sat-args=2)]
  :: forall a_a1Vj.
     (a_a1Vj -> GHC.Types.Bool) -> [a_a1Vj] -> [a_a1Vj]
[LclId,
 Arity=2,
 Str=DmdType,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=False)
         Tmpl= \ (@ a_a1Vl)
                 (p_a1HL [Occ=OnceL!] :: a_a1Vl -> GHC.Types.Bool)
                 (xs_a1HM [Occ=Once] :: [a_a1Vl]) ->
                 GHC.Base.build
                   @ a_a1Vl
                   (\ (@ b_a1Vd)
                      (c_a1HO [Occ=OnceL!, OS=OneShot] :: a_a1Vl -> b_a1Vd -> b_a1Vd)
                      (n_a1HP [OS=OneShot] :: b_a1Vd) ->
                      GHC.Base.foldr
                        @ a_a1Vl
                        @ b_a1Vd
                        (\ (x_a1HR :: a_a1Vl) (r_a1HS [Occ=Once, OS=OneShot] :: b_a1Vd) ->
                           case p_a1HL x_a1HR of _ [Occ=Dead] {
                             GHC.Types.False -> n_a1HP;
                             GHC.Types.True -> c_a1HO x_a1HR r_a1HS
                           })
                        n_a1HP
                        xs_a1HM)}]
Foo.takeWhile =
  \ (@ a_a1Vl)
    (eta_B2 :: a_a1Vl -> GHC.Types.Bool)
    (eta_B1 :: [a_a1Vl]) ->
    GHC.Base.build
      @ a_a1Vl
      (\ (@ b_a1Vd)
         (c_a1HO [OS=OneShot] :: a_a1Vl -> b_a1Vd -> b_a1Vd)
         (n_a1HP [OS=OneShot] :: b_a1Vd) ->
         GHC.Base.foldr
           @ a_a1Vl
           @ b_a1Vd
           (\ (x_a1HR :: a_a1Vl) (r_a1HS [OS=OneShot] :: b_a1Vd) ->
              case eta_B2 x_a1HR of _ [Occ=Dead] {
                GHC.Types.False -> n_a1HP;
                GHC.Types.True -> c_a1HO x_a1HR r_a1HS
              })
           n_a1HP
           eta_B1)

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [0 0 0] 330 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.$
      @ [GHC.Types.Int]
      @ c_a1Zb
      (GHC.Base..
         @ [GHC.Types.Int]
         @ c_a1Zb
         @ [GHC.Types.Int]
         (GHC.Base.foldr @ GHC.Types.Int @ c_a1Zb c_a1HT n_a1HU)
         (Foo.takeWhile
            @ GHC.Types.Int
            (let {
               ds_d1Zx :: GHC.Types.Int
               [LclId,
                Str=DmdType,
                Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=0, Value=True,
                        ConLike=True, WorkFree=True, Expandable=True,
                        Guidance=IF_ARGS [] 10 20}]
               ds_d1Zx = GHC.Types.I# 1 } in
             \ (ds_d1Zw :: GHC.Types.Int) ->
               GHC.Classes.neInt ds_d1Zw ds_d1Zx)))
      (let {
         n_a1U6 :: GHC.Types.Int
         [LclId,
          Str=DmdType,
          Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=0, Value=True,
                  ConLike=True, WorkFree=True, Expandable=True,
                  Guidance=IF_ARGS [] 10 20}]
         n_a1U6 = GHC.Types.I# 10 } in
       Data.List.unfoldr
         @ GHC.Types.Int
         @ GHC.Types.Int
         (\ (m_a1U7 :: GHC.Types.Int) ->
            case GHC.Classes.leInt m_a1U7 n_a1U6 of _ [Occ=Dead] {
              GHC.Types.False ->
                Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int);
              GHC.Types.True ->
                Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (m_a1U7, m_a1U7)
            })
         (GHC.Num.$fNumInt_$cnegate (GHC.Types.I# 9)))



*** Specialise:

==================== Specialise ====================
Result size of Specialise = {terms: 60, types: 64, coercions: 0}

Foo.takeWhile [InlPrag=INLINE (sat-args=2)]
  :: forall a_a1Vj.
     (a_a1Vj -> GHC.Types.Bool) -> [a_a1Vj] -> [a_a1Vj]
[LclId,
 Arity=2,
 Str=DmdType,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=False)
         Tmpl= \ (@ a_a1Vl)
                 (p_a1HL [Occ=OnceL!] :: a_a1Vl -> GHC.Types.Bool)
                 (xs_a1HM [Occ=Once] :: [a_a1Vl]) ->
                 GHC.Base.build
                   @ a_a1Vl
                   (\ (@ b_a1Vd)
                      (c_a1HO [Occ=OnceL!, OS=OneShot] :: a_a1Vl -> b_a1Vd -> b_a1Vd)
                      (n_a1HP [OS=OneShot] :: b_a1Vd) ->
                      GHC.Base.foldr
                        @ a_a1Vl
                        @ b_a1Vd
                        (\ (x_a1HR :: a_a1Vl) (r_a1HS [Occ=Once, OS=OneShot] :: b_a1Vd) ->
                           case p_a1HL x_a1HR of _ [Occ=Dead] {
                             GHC.Types.False -> n_a1HP;
                             GHC.Types.True -> c_a1HO x_a1HR r_a1HS
                           })
                        n_a1HP
                        xs_a1HM)}]
Foo.takeWhile =
  \ (@ a_a1Vl)
    (eta_B2 :: a_a1Vl -> GHC.Types.Bool)
    (eta_B1 :: [a_a1Vl]) ->
    GHC.Base.build
      @ a_a1Vl
      (\ (@ b_a1Vd)
         (c_a1HO [OS=OneShot] :: a_a1Vl -> b_a1Vd -> b_a1Vd)
         (n_a1HP [OS=OneShot] :: b_a1Vd) ->
         GHC.Base.foldr
           @ a_a1Vl
           @ b_a1Vd
           (\ (x_a1HR :: a_a1Vl) (r_a1HS [OS=OneShot] :: b_a1Vd) ->
              case eta_B2 x_a1HR of _ [Occ=Dead] {
                GHC.Types.False -> n_a1HP;
                GHC.Types.True -> c_a1HO x_a1HR r_a1HS
              })
           n_a1HP
           eta_B1)

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [0 0 0] 330 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.$
      @ [GHC.Types.Int]
      @ c_a1Zb
      (GHC.Base..
         @ [GHC.Types.Int]
         @ c_a1Zb
         @ [GHC.Types.Int]
         (GHC.Base.foldr @ GHC.Types.Int @ c_a1Zb c_a1HT n_a1HU)
         (Foo.takeWhile
            @ GHC.Types.Int
            (let {
               ds_s21z :: GHC.Types.Int
               [LclId, Str=DmdType]
               ds_s21z = GHC.Types.I# 1 } in
             \ (ds_d1Zw :: GHC.Types.Int) ->
               GHC.Classes.neInt ds_d1Zw ds_s21z)))
      (let {
         n_s21x :: GHC.Types.Int
         [LclId, Str=DmdType]
         n_s21x = GHC.Types.I# 10 } in
       Data.List.unfoldr
         @ GHC.Types.Int
         @ GHC.Types.Int
         (\ (m_a1U7 :: GHC.Types.Int) ->
            case GHC.Classes.leInt m_a1U7 n_s21x of _ [Occ=Dead] {
              GHC.Types.False ->
                Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int);
              GHC.Types.True ->
                Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (m_a1U7, m_a1U7)
            })
         (GHC.Num.$fNumInt_$cnegate (GHC.Types.I# 9)))



*** Simplifier:

==================== Occurrence analysis ====================
Foo.takeWhile [InlPrag=INLINE (sat-args=2), Occ=OnceL!]
  :: forall a_a1Vj.
     (a_a1Vj -> GHC.Types.Bool) -> [a_a1Vj] -> [a_a1Vj]
[LclId,
 Arity=2,
 Str=DmdType,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=2, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=False,boring_ok=False)
         Tmpl= \ (@ a_a1Vl)
                 (p_a1HL [Occ=OnceL!] :: a_a1Vl -> GHC.Types.Bool)
                 (xs_a1HM [Occ=Once] :: [a_a1Vl]) ->
                 GHC.Base.build
                   @ a_a1Vl
                   (\ (@ b_a1Vd)
                      (c_a1HO [Occ=OnceL!, OS=OneShot] :: a_a1Vl -> b_a1Vd -> b_a1Vd)
                      (n_a1HP [OS=OneShot] :: b_a1Vd) ->
                      GHC.Base.foldr
                        @ a_a1Vl
                        @ b_a1Vd
                        (\ (x_a1HR :: a_a1Vl) (r_a1HS [Occ=Once, OS=OneShot] :: b_a1Vd) ->
                           case p_a1HL x_a1HR of _ [Occ=Dead] {
                             GHC.Types.False -> n_a1HP;
                             GHC.Types.True -> c_a1HO x_a1HR r_a1HS
                           })
                        n_a1HP
                        xs_a1HM)}]
Foo.takeWhile =
  \ (@ a_a1Vl)
    (eta_B2 [Occ=OnceL!] :: a_a1Vl -> GHC.Types.Bool)
    (eta_B1 [Occ=Once] :: [a_a1Vl]) ->
    GHC.Base.build
      @ a_a1Vl
      (\ (@ b_a1Vd)
         (c_a1HO [Occ=OnceL!, OS=OneShot] :: a_a1Vl -> b_a1Vd -> b_a1Vd)
         (n_a1HP [OS=OneShot] :: b_a1Vd) ->
         GHC.Base.foldr
           @ a_a1Vl
           @ b_a1Vd
           (\ (x_a1HR :: a_a1Vl) (r_a1HS [Occ=Once, OS=OneShot] :: b_a1Vd) ->
              case eta_B2 x_a1HR of _ [Occ=Dead] {
                GHC.Types.False -> n_a1HP;
                GHC.Types.True -> c_a1HO x_a1HR r_a1HS
              })
           n_a1HP
           eta_B1)

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [0 0 0] 330 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT [Occ=Once] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU [Occ=Once] :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.$
      @ [GHC.Types.Int]
      @ c_a1Zb
      (GHC.Base..
         @ [GHC.Types.Int]
         @ c_a1Zb
         @ [GHC.Types.Int]
         (GHC.Base.foldr @ GHC.Types.Int @ c_a1Zb c_a1HT n_a1HU)
         (Foo.takeWhile
            @ GHC.Types.Int
            (let {
               ds_s21z [Occ=OnceL] :: GHC.Types.Int
               [LclId, Str=DmdType]
               ds_s21z = GHC.Types.I# 1 } in
             \ (ds_d1Zw [Occ=Once] :: GHC.Types.Int) ->
               GHC.Classes.neInt ds_d1Zw ds_s21z)))
      (let {
         n_s21x [Occ=OnceL] :: GHC.Types.Int
         [LclId, Str=DmdType]
         n_s21x = GHC.Types.I# 10 } in
       Data.List.unfoldr
         @ GHC.Types.Int
         @ GHC.Types.Int
         (\ (m_a1U7 :: GHC.Types.Int) ->
            case GHC.Classes.leInt m_a1U7 n_s21x of _ [Occ=Dead] {
              GHC.Types.False ->
                Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int);
              GHC.Types.True ->
                Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (m_a1U7, m_a1U7)
            })
         (GHC.Num.$fNumInt_$cnegate (GHC.Types.I# 9)))



SimplBind takeWhile
Inactive unfolding: build
Inactive unfolding: foldr
Inactive unfolding: build
Inactive unfolding: foldr
SimplBind foo
Inactive unfolding: $
Considering inlining: GHC.Base..
    arg infos [ValueArg, ValueArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit True
    is exp: True
    is work-free: True
    guidance ALWAYS_IF(unsat_ok=False,boring_ok=False)
    ANSWER = YES
Inlining done: GHC.Base..
    Inlined fn:  \ (@ b)
                   (@ c)
                   (@ a)
                   (f [Occ=Once!] :: b -> c)
                   (g [Occ=Once!] :: a -> b)
                   (x [Occ=Once] :: a) ->
                   f (g x)
    Cont:   ApplyTo nodup (TYPE [GHC.Types.Int])
            ApplyTo nodup (TYPE c)
            ApplyTo nodup (TYPE [GHC.Types.Int])
            ApplyTo nodup (GHC.Base.foldr @ GHC.Types.Int @ c c n)
            ApplyTo nodup (Foo.takeWhile
                             @ GHC.Types.Int
                             (let {
                                ds_s21z [Occ=OnceL] :: GHC.Types.Int
                                [LclId, Str=DmdType]
                                ds_s21z = GHC.Types.I# 1 } in
                              \ (ds_d1Zw [Occ=Once] :: GHC.Types.Int) ->
                                GHC.Classes.neInt ds_d1Zw ds_s21z))
            Stop[BoringCtxt] [GHC.Types.Int] -> c
Inactive unfolding: foldr
Considering inlining: Foo.takeWhile
    arg infos [ValueArg]
    uf arity 2
    interesting continuation RhsCtxt
    some_benefit True
    is exp: True
    is work-free: True
    guidance ALWAYS_IF(unsat_ok=False,boring_ok=False)
    ANSWER = NO
Considering inlining: GHC.Classes.neInt
    arg infos [TrivArg, ValueArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit True
    is exp: True
    is work-free: True
    guidance ALWAYS_IF(unsat_ok=False,boring_ok=False)
    ANSWER = YES
Inlining done: GHC.Classes.neInt
    Inlined fn:  \ (ds [Occ=Once!] :: GHC.Types.Int)
                   (ds1 [Occ=Once!] :: GHC.Types.Int) ->
                   case ds of _ [Occ=Dead] { GHC.Types.I# x [Occ=Once] ->
                   case ds1 of _ [Occ=Dead] { GHC.Types.I# y [Occ=Once] ->
                   GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim./=# x y)
                   }
                   }
    Cont:   ApplyTo nodup ds_d1Zw
            ApplyTo nodup ds_s21z
            Stop[BoringCtxt] GHC.Types.Bool
Inactive unfolding: ds_s21z
Rule fired
    Rule: /=#
    Before: GHC.Prim./=# x_a20R 1
    After:  case x_a20R of wild_00 {
              __DEFAULT -> 1;
              1 -> 0
            }
    Cont:   StrictArg GHC.Prim.tagToEnum#
            Stop[BoringCtxt] GHC.Types.Bool
Inactive unfolding: foldr
Considering inlining: Foo.takeWhile
    arg infos [ValueArg, TrivArg]
    uf arity 2
    interesting continuation RuleArgCtxt
    some_benefit True
    is exp: True
    is work-free: True
    guidance ALWAYS_IF(unsat_ok=False,boring_ok=False)
    ANSWER = YES
Inlining done: Foo.takeWhile
    Inlined fn:  \ (@ a)
                   (p [Occ=OnceL!] :: a -> GHC.Types.Bool)
                   (xs [Occ=Once] :: [a]) ->
                   GHC.Base.build
                     @ a
                     (\ (@ b)
                        (c [Occ=OnceL!, OS=OneShot] :: a -> b -> b)
                        (n [OS=OneShot] :: b) ->
                        GHC.Base.foldr
                          @ a
                          @ b
                          (\ (x :: a) (r [Occ=Once, OS=OneShot] :: b) ->
                             case p x of _ [Occ=Dead] {
                               GHC.Types.False -> n;
                               GHC.Types.True -> c x r
                             })
                          n
                          xs)
    Cont:   ApplyTo nodup (TYPE GHC.Types.Int)
            ApplyTo nodup a_s21G
            ApplyTo nodup x
            StrictArg GHC.Base.foldr
            Stop[BoringCtxt] c
Inactive unfolding: a_s21G
Inactive unfolding: build
Inactive unfolding: foldr
Inactive unfolding: a_s21G
Rule fired
    Rule: fold/build
    Before: GHC.Base.foldr
              (TYPE GHC.Types.Int)
              (TYPE c_a1Zb)
              c_a1HT
              n_a1HU
              (GHC.Base.build
                 @ GHC.Types.Int
                 (\ (@ b_a1Vd)
                    (c_a1HO [OS=OneShot] :: GHC.Types.Int -> b_a1Vd -> b_a1Vd)
                    (n_a1HP [OS=OneShot] :: b_a1Vd) ->
                    GHC.Base.foldr
                      @ GHC.Types.Int
                      @ b_a1Vd
                      (\ (x_a1HR :: GHC.Types.Int) (r_a1HS [OS=OneShot] :: b_a1Vd) ->
                         case a_s21G x_a1HR of _ [Occ=Dead] {
                           GHC.Types.False -> n_a1HP;
                           GHC.Types.True -> c_a1HO x_a1HR r_a1HS
                         })
                      n_a1HP
                      x_a20f))
    After:  (\ (@ a_a20E)
               (@ b_a20F)
               (k_a20G [Occ=Once] :: a_a20E -> b_a20F -> b_a20F)
               (z_a20H [Occ=Once] :: b_a20F)
               (g_a20I [Occ=Once!]
                  :: forall b1_a20J.
                     (a_a20E -> b1_a20J -> b1_a20J) -> b1_a20J -> b1_a20J) ->
               g_a20I @ b_a20F k_a20G z_a20H)
              @ GHC.Types.Int
              @ c_a1Zb
              c_a1HT
              n_a1HU
              (\ (@ b_a1Vd)
                 (c_a1HO [OS=OneShot] :: GHC.Types.Int -> b_a1Vd -> b_a1Vd)
                 (n_a1HP [OS=OneShot] :: b_a1Vd) ->
                 GHC.Base.foldr
                   @ GHC.Types.Int
                   @ b_a1Vd
                   (\ (x_a1HR :: GHC.Types.Int) (r_a1HS [OS=OneShot] :: b_a1Vd) ->
                      case a_s21G x_a1HR of _ [Occ=Dead] {
                        GHC.Types.False -> n_a1HP;
                        GHC.Types.True -> c_a1HO x_a1HR r_a1HS
                      })
                   n_a1HP
                   x_a20f)
    Cont:   Stop[BoringCtxt] c_a1Zb
Inactive unfolding: foldr
Inactive unfolding: a_s21G
Considering inlining: Data.List.unfoldr
    arg infos [ValueArg, NonTrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit True
    is exp: True
    is work-free: True
    guidance ALWAYS_IF(unsat_ok=False,boring_ok=False)
    ANSWER = YES
Inlining done: Data.List.unfoldr
    Inlined fn:  \ (@ b)
                   (@ a)
                   (f [Occ=OnceL!] :: b -> Data.Maybe.Maybe (a, b))
                   (b' [Occ=OnceL] :: b) ->
                   GHC.Base.$
                     @ (forall b1. (a -> b1 -> b1) -> b1 -> b1)
                     @ [a]
                     (GHC.Base.build @ a)
                     (\ (@ b1)
                        (c [Occ=OnceL!] :: a -> b1 -> b1)
                        (n [Occ=OnceL] :: b1) ->
                        letrec {
                          go [Occ=LoopBreaker] :: b -> b1
                          [LclId, Arity=1, Str=DmdType]
                          go =
                            \ (b2 [Occ=Once] :: b) ->
                              case f b2 of _ [Occ=Dead] {
                                Data.Maybe.Nothing -> n;
                                Data.Maybe.Just ds [Occ=Once!] ->
                                  case ds of _ [Occ=Dead] { (a1 [Occ=Once], new_b [Occ=Once]) ->
                                  c a1 (go new_b)
                                  }
                              }; } in
                        go b')
    Cont:   ApplyTo nodup (TYPE GHC.Types.Int)
            ApplyTo nodup (TYPE GHC.Types.Int)
            ApplyTo nodup (\ (m :: GHC.Types.Int) ->
                             case GHC.Classes.leInt m n of _ [Occ=Dead] {
                               GHC.Types.False ->
                                 Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int);
                               GHC.Types.True ->
                                 Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (m, m)
                             })
            ApplyTo nodup (GHC.Num.$fNumInt_$cnegate (GHC.Types.I# 9))
            Stop[BoringCtxt] [GHC.Types.Int]
Inactive unfolding: $fNumInt_$cnegate
Inactive unfolding: $
Inactive unfolding: build
SimplBind go
Considering inlining: GHC.Classes.leInt
    arg infos [TrivArg, ValueArg]
    uf arity 2
    interesting continuation CaseCtxt
    some_benefit True
    is exp: True
    is work-free: True
    guidance ALWAYS_IF(unsat_ok=False,boring_ok=False)
    ANSWER = YES
Inlining done: GHC.Classes.leInt
    Inlined fn:  \ (ds [Occ=Once!] :: GHC.Types.Int)
                   (ds1 [Occ=Once!] :: GHC.Types.Int) ->
                   case ds of _ [Occ=Dead] { GHC.Types.I# x [Occ=Once] ->
                   case ds1 of _ [Occ=Dead] { GHC.Types.I# y [Occ=Once] ->
                   GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x y)
                   }
                   }
    Cont:   ApplyTo nodup m
            ApplyTo nodup n
            Select nodup wild_Xd
              []
              [(GHC.Types.False,
                [],
                Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int)),
               (GHC.Types.True,
                [],
                Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (m, m))]
            Stop[BoringCtxt] Data.Maybe.Maybe (GHC.Types.Int, GHC.Types.Int)
Inactive unfolding: n
Inactive unfolding: b'
Result size of Simplifier iteration=1
  = {terms: 101, types: 99, coercions: 0}

==================== Occurrence analysis ====================
Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 523 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT [Occ=OnceL!] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.$
      @ [GHC.Types.Int]
      @ c_a1Zb
      (let {
         a_s21G [Occ=OnceL!] :: GHC.Types.Int -> GHC.Types.Bool
         [LclId,
          Str=DmdType,
          Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=0, Value=True,
                  ConLike=True, WorkFree=False, Expandable=True,
                  Guidance=IF_ARGS [] 61 60}]
         a_s21G =
           \ (ds_d1Zw [Occ=Once!] :: GHC.Types.Int) ->
             case ds_d1Zw of _ [Occ=Dead] { GHC.Types.I# x_a20R [Occ=Once!] ->
             GHC.Prim.tagToEnum#
               @ GHC.Types.Bool
               (case x_a20R of _ [Occ=Dead] {
                  __DEFAULT -> 1;
                  1 -> 0
                })
             } } in
       \ (x_a20f [Occ=Once] :: [GHC.Types.Int]) ->
         GHC.Base.foldr
           @ GHC.Types.Int
           @ c_a1Zb
           (\ (x_a1HR :: GHC.Types.Int)
              (r_a1HS [Occ=Once, OS=OneShot] :: c_a1Zb) ->
              case a_s21G x_a1HR of _ [Occ=Dead] {
                GHC.Types.False -> n_a1HU;
                GHC.Types.True -> c_a1HT x_a1HR r_a1HS
              })
           n_a1HU
           x_a20f)
      (let {
         b'_a1ZS [Occ=OnceL] :: GHC.Types.Int
         [LclId,
          Str=DmdType,
          Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=0, Value=False,
                  ConLike=False, WorkFree=False, Expandable=False,
                  Guidance=IF_ARGS [] 30 0}]
         b'_a1ZS = GHC.Num.$fNumInt_$cnegate (GHC.Types.I# 9) } in
       GHC.Base.$
         @ (forall b1_a1ZT.
            (GHC.Types.Int -> b1_a1ZT -> b1_a1ZT) -> b1_a1ZT -> b1_a1ZT)
         @ [GHC.Types.Int]
         (GHC.Base.build @ GHC.Types.Int)
         (\ (@ b1_a1ZU)
            (c_a1ZV [Occ=OnceL!] :: GHC.Types.Int -> b1_a1ZU -> b1_a1ZU)
            (n_a1ZW [Occ=OnceL] :: b1_a1ZU) ->
            letrec {
              go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> b1_a1ZU
              [LclId,
               Arity=1,
               Str=DmdType,
               Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
                       ConLike=True, WorkFree=True, Expandable=True,
                       Guidance=IF_ARGS [20] 132 0}]
              go_a1ZX =
                \ (b2_a1ZY :: GHC.Types.Int) ->
                  case case case b2_a1ZY
                            of _ [Occ=Dead] { GHC.Types.I# x_a218 [Occ=Once] ->
                            GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
                            }
                       of _ [Occ=Dead] {
                         GHC.Types.False ->
                           Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int);
                         GHC.Types.True ->
                           Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (b2_a1ZY, b2_a1ZY)
                       }
                  of _ [Occ=Dead] {
                    Data.Maybe.Nothing -> n_a1ZW;
                    Data.Maybe.Just ds_a203 [Occ=Once!] ->
                      case ds_a203
                      of _ [Occ=Dead] { (a1_a207 [Occ=Once], new_b_a208 [Occ=Once]) ->
                      c_a1ZV a1_a207 (go_a1ZX new_b_a208)
                      }
                  }; } in
            go_a1ZX b'_a1ZS))



SimplBind foo
Inactive unfolding: $
Inactive unfolding: foldr
Inactive unfolding: $fNumInt_$cnegate
Inactive unfolding: $
Inactive unfolding: build
SimplBind go
Inactive unfolding: b'
Result size of Simplifier iteration=2
  = {terms: 69, types: 71, coercions: 0}

==================== Occurrence analysis ====================
Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 443 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT [Occ=OnceL!] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.$
      @ [GHC.Types.Int]
      @ c_a1Zb
      (\ (x_a20f [Occ=Once] :: [GHC.Types.Int]) ->
         GHC.Base.foldr
           @ GHC.Types.Int
           @ c_a1Zb
           (\ (x_a1HR :: GHC.Types.Int)
              (r_a1HS [Occ=Once, OS=OneShot] :: c_a1Zb) ->
              case case x_a1HR
                   of _ [Occ=Dead] { GHC.Types.I# x_a20R [Occ=Once!] ->
                   GHC.Prim.tagToEnum#
                     @ GHC.Types.Bool
                     (case x_a20R of _ [Occ=Dead] {
                        __DEFAULT -> 1;
                        1 -> 0
                      })
                   }
              of _ [Occ=Dead] {
                GHC.Types.False -> n_a1HU;
                GHC.Types.True -> c_a1HT x_a1HR r_a1HS
              })
           n_a1HU
           x_a20f)
      (let {
         b'_a1ZS [Occ=OnceL] :: GHC.Types.Int
         [LclId,
          Str=DmdType,
          Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=0, Value=False,
                  ConLike=False, WorkFree=False, Expandable=False,
                  Guidance=IF_ARGS [] 30 0}]
         b'_a1ZS = GHC.Num.$fNumInt_$cnegate (GHC.Types.I# 9) } in
       GHC.Base.$
         @ (forall b1_a1ZT.
            (GHC.Types.Int -> b1_a1ZT -> b1_a1ZT) -> b1_a1ZT -> b1_a1ZT)
         @ [GHC.Types.Int]
         (GHC.Base.build @ GHC.Types.Int)
         (\ (@ b1_a1ZU)
            (c_a1ZV [Occ=OnceL!] :: GHC.Types.Int -> b1_a1ZU -> b1_a1ZU)
            (n_a1ZW [Occ=OnceL] :: b1_a1ZU) ->
            letrec {
              go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> b1_a1ZU
              [LclId,
               Arity=1,
               Str=DmdType,
               Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
                       ConLike=True, WorkFree=True, Expandable=True,
                       Guidance=IF_ARGS [20] 132 0}]
              go_a1ZX =
                \ (b2_a1ZY :: GHC.Types.Int) ->
                  case case case b2_a1ZY
                            of _ [Occ=Dead] { GHC.Types.I# x_a218 [Occ=Once] ->
                            GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
                            }
                       of _ [Occ=Dead] {
                         GHC.Types.False ->
                           Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int);
                         GHC.Types.True ->
                           Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (b2_a1ZY, b2_a1ZY)
                       }
                  of _ [Occ=Dead] {
                    Data.Maybe.Nothing -> n_a1ZW;
                    Data.Maybe.Just ds_a203 [Occ=Once!] ->
                      case ds_a203
                      of _ [Occ=Dead] { (a1_a207 [Occ=Once], new_b_a208 [Occ=Once]) ->
                      c_a1ZV a1_a207 (go_a1ZX new_b_a208)
                      }
                  }; } in
            go_a1ZX b'_a1ZS))



SimplBind foo
Inactive unfolding: $
Inactive unfolding: foldr
Inactive unfolding: $fNumInt_$cnegate
Inactive unfolding: $
Inactive unfolding: build
SimplBind go
Inactive unfolding: b'

==================== Simplifier ====================
  Max iterations = 4
  SimplMode {Phase = InitialPhase [PostGentle],
             inline,
             rules,
             eta-expand,
             no case-of-case}
Result size of Simplifier = {terms: 69, types: 71, coercions: 0}

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 443 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.$
      @ [GHC.Types.Int]
      @ c_a1Zb
      (\ (x_a20f :: [GHC.Types.Int]) ->
         GHC.Base.foldr
           @ GHC.Types.Int
           @ c_a1Zb
           (\ (x_a1HR :: GHC.Types.Int) (r_a1HS [OS=OneShot] :: c_a1Zb) ->
              case case x_a1HR of _ [Occ=Dead] { GHC.Types.I# x_a20R ->
                   GHC.Prim.tagToEnum#
                     @ GHC.Types.Bool
                     (case x_a20R of _ [Occ=Dead] {
                        __DEFAULT -> 1;
                        1 -> 0
                      })
                   }
              of _ [Occ=Dead] {
                GHC.Types.False -> n_a1HU;
                GHC.Types.True -> c_a1HT x_a1HR r_a1HS
              })
           n_a1HU
           x_a20f)
      (let {
         b'_a1ZS :: GHC.Types.Int
         [LclId,
          Str=DmdType,
          Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=0, Value=False,
                  ConLike=False, WorkFree=False, Expandable=False,
                  Guidance=IF_ARGS [] 30 0}]
         b'_a1ZS = GHC.Num.$fNumInt_$cnegate (GHC.Types.I# 9) } in
       GHC.Base.$
         @ (forall b1_a1ZT.
            (GHC.Types.Int -> b1_a1ZT -> b1_a1ZT) -> b1_a1ZT -> b1_a1ZT)
         @ [GHC.Types.Int]
         (GHC.Base.build @ GHC.Types.Int)
         (\ (@ b1_a1ZU)
            (c_a1ZV :: GHC.Types.Int -> b1_a1ZU -> b1_a1ZU)
            (n_a1ZW :: b1_a1ZU) ->
            letrec {
              go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> b1_a1ZU
              [LclId,
               Arity=1,
               Str=DmdType,
               Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
                       ConLike=True, WorkFree=True, Expandable=True,
                       Guidance=IF_ARGS [20] 132 0}]
              go_a1ZX =
                \ (b2_a1ZY :: GHC.Types.Int) ->
                  case case case b2_a1ZY of _ [Occ=Dead] { GHC.Types.I# x_a218 ->
                            GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
                            }
                       of _ [Occ=Dead] {
                         GHC.Types.False ->
                           Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int);
                         GHC.Types.True ->
                           Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (b2_a1ZY, b2_a1ZY)
                       }
                  of _ [Occ=Dead] {
                    Data.Maybe.Nothing -> n_a1ZW;
                    Data.Maybe.Just ds_a203 ->
                      case ds_a203 of _ [Occ=Dead] { (a1_a207, new_b_a208) ->
                      c_a1ZV a1_a207 (go_a1ZX new_b_a208)
                      }
                  }; } in
            go_a1ZX b'_a1ZS))



*** Float out(FOS {Lam = Just 0, Consts = True, PAPs = False}):

==================== Levels added: ====================
<Foo.foo,<0,0>>
<Foo.foo,<0,0>> =
  \ <t_a1Za,<1,0>>
    <c_a1Zb,<1,0>>
    <c_a1HT,<1,0>>
    <n_a1HU,<1,0>>
    <x_a1HV,<1,0>> ->
    GHC.Base.$
      @ [GHC.Types.Int]
      @ c_a1Zb
      (\ <x_a20f,<2,0>> ->
         GHC.Base.foldr
           @ GHC.Types.Int
           @ c_a1Zb
           (let {
              <lvl_s224,F<1,0>>
              <lvl_s224,F<1,0>> =
                \ <x_a1HR,<2,0>> <r_a1HS,<2,0>> ->
                  case case x_a1HR
                       of <wild_a20P,<2,1>> { GHC.Types.I# <x_a20R,<2,1>> ->
                       GHC.Prim.tagToEnum#
                         @ GHC.Types.Bool
                         (case x_a20R of <wild_Xj,<2,2>> {
                            __DEFAULT -> 1;
                            1 -> 0
                          })
                       }
                  of <wild_Xc,<2,1>> {
                    GHC.Types.False -> n_a1HU;
                    GHC.Types.True -> c_a1HT x_a1HR r_a1HS
                  } } in
            lvl_s224)
           n_a1HU
           x_a20f)
      (let {
         <lvl_s229,F<0,0>>
         <lvl_s229,F<0,0>> =
           let {
             <b'_s227,F<0,0>>
             <b'_s227,F<0,0>> =
               GHC.Num.$fNumInt_$cnegate
                 (let {
                    <lvl_s225,F<0,0>>
                    <lvl_s225,F<0,0>> = GHC.Types.I# 9 } in
                  lvl_s225) } in
           GHC.Base.$
             @ (forall b1_a1ZT.
                (GHC.Types.Int -> b1_a1ZT -> b1_a1ZT) -> b1_a1ZT -> b1_a1ZT)
             @ [GHC.Types.Int]
             (GHC.Base.build @ GHC.Types.Int)
             (let {
                <lvl_s228,F<0,0>>
                <lvl_s228,F<0,0>> =
                  \ <b1_a1ZU,<1,0>> <c_a1ZV,<1,0>> <n_a1ZW,<1,0>> ->
                    letrec {
                      <go_a1ZX,<1,1>>
                      <go_a1ZX,<1,1>> =
                        \ <b2_a1ZY,<2,0>> ->
                          case case case b2_a1ZY
                                    of <wild_a216,<2,1>> { GHC.Types.I# <x_a218,<2,1>> ->
                                    GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
                                    }
                               of <wild_Xd,<2,1>> {
                                 GHC.Types.False ->
                                   Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int);
                                 GHC.Types.True ->
                                   Data.Maybe.Just
                                     @ (GHC.Types.Int, GHC.Types.Int) (b2_a1ZY, b2_a1ZY)
                               }
                          of <wild_a1ZZ,<2,1>> {
                            Data.Maybe.Nothing -> n_a1ZW;
                            Data.Maybe.Just <ds_a203,<2,1>> ->
                              case ds_a203
                              of <wild1_a205,<2,2>> { (<a1_a207,<2,2>>, <new_b_a208,<2,2>>) ->
                              c_a1ZV a1_a207 (go_a1ZX new_b_a208)
                              }
                          }; } in
                    go_a1ZX b'_s227 } in
              lvl_s228) } in
       lvl_s229)



==================== Float out(FOS {Lam = Just 0, Consts = True, PAPs = False}) ====================
Result size of Float out(FOS {Lam = Just 0,
                              Consts = True,
                              PAPs = False})
  = {terms: 77, types: 83, coercions: 0}

lvl_s225 :: GHC.Types.Int
[LclId, Str=DmdType]
lvl_s225 = GHC.Types.I# 9

b'_s227 :: GHC.Types.Int
[LclId, Str=DmdType]
b'_s227 = GHC.Num.$fNumInt_$cnegate lvl_s225

lvl_s228
  :: forall b1_a1ZU.
     (GHC.Types.Int -> b1_a1ZU -> b1_a1ZU) -> b1_a1ZU -> b1_a1ZU
[LclId, Str=DmdType]
lvl_s228 =
  \ (@ b1_a1ZU)
    (c_a1ZV :: GHC.Types.Int -> b1_a1ZU -> b1_a1ZU)
    (n_a1ZW :: b1_a1ZU) ->
    letrec {
      go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> b1_a1ZU
      [LclId, Arity=1, Str=DmdType]
      go_a1ZX =
        \ (b2_a1ZY :: GHC.Types.Int) ->
          case case case b2_a1ZY of _ [Occ=Dead] { GHC.Types.I# x_a218 ->
                    GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
                    }
               of _ [Occ=Dead] {
                 GHC.Types.False ->
                   Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int);
                 GHC.Types.True ->
                   Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (b2_a1ZY, b2_a1ZY)
               }
          of _ [Occ=Dead] {
            Data.Maybe.Nothing -> n_a1ZW;
            Data.Maybe.Just ds_a203 ->
              case ds_a203 of _ [Occ=Dead] { (a1_a207, new_b_a208) ->
              c_a1ZV a1_a207 (go_a1ZX new_b_a208)
              }
          }; } in
    go_a1ZX b'_s227

lvl_s229 :: [GHC.Types.Int]
[LclId, Str=DmdType]
lvl_s229 =
  GHC.Base.$
    @ (forall b1_a1ZT.
       (GHC.Types.Int -> b1_a1ZT -> b1_a1ZT) -> b1_a1ZT -> b1_a1ZT)
    @ [GHC.Types.Int]
    (GHC.Base.build @ GHC.Types.Int)
    lvl_s228

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX, Arity=3, Str=DmdType]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    let {
      lvl_s224 :: GHC.Types.Int -> c_a1Zb -> c_a1Zb
      [LclId, Str=DmdType]
      lvl_s224 =
        \ (x_a1HR :: GHC.Types.Int) (r_a1HS [OS=OneShot] :: c_a1Zb) ->
          case case x_a1HR of _ [Occ=Dead] { GHC.Types.I# x_a20R ->
               GHC.Prim.tagToEnum#
                 @ GHC.Types.Bool
                 (case x_a20R of _ [Occ=Dead] {
                    __DEFAULT -> 1;
                    1 -> 0
                  })
               }
          of _ [Occ=Dead] {
            GHC.Types.False -> n_a1HU;
            GHC.Types.True -> c_a1HT x_a1HR r_a1HS
          } } in
    GHC.Base.$
      @ [GHC.Types.Int]
      @ c_a1Zb
      (\ (x_a20f :: [GHC.Types.Int]) ->
         GHC.Base.foldr @ GHC.Types.Int @ c_a1Zb lvl_s224 n_a1HU x_a20f)
      lvl_s229



*** Float inwards:

==================== Float inwards ====================
Result size of Float inwards = {terms: 77, types: 83, coercions: 0}

lvl_s225 :: GHC.Types.Int
[LclId, Str=DmdType]
lvl_s225 = GHC.Types.I# 9

b'_s227 :: GHC.Types.Int
[LclId, Str=DmdType]
b'_s227 = GHC.Num.$fNumInt_$cnegate lvl_s225

lvl_s228
  :: forall b1_a1ZU.
     (GHC.Types.Int -> b1_a1ZU -> b1_a1ZU) -> b1_a1ZU -> b1_a1ZU
[LclId, Str=DmdType]
lvl_s228 =
  \ (@ b1_a1ZU)
    (c_a1ZV :: GHC.Types.Int -> b1_a1ZU -> b1_a1ZU)
    (n_a1ZW :: b1_a1ZU) ->
    (letrec {
       go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> b1_a1ZU
       [LclId, Arity=1, Str=DmdType]
       go_a1ZX =
         \ (b2_a1ZY :: GHC.Types.Int) ->
           case case case b2_a1ZY of _ [Occ=Dead] { GHC.Types.I# x_a218 ->
                     GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
                     }
                of _ [Occ=Dead] {
                  GHC.Types.False ->
                    Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int);
                  GHC.Types.True ->
                    Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (b2_a1ZY, b2_a1ZY)
                }
           of _ [Occ=Dead] {
             Data.Maybe.Nothing -> n_a1ZW;
             Data.Maybe.Just ds_a203 ->
               case ds_a203 of _ [Occ=Dead] { (a1_a207, new_b_a208) ->
               c_a1ZV a1_a207 (go_a1ZX new_b_a208)
               }
           }; } in
     go_a1ZX)
      b'_s227

lvl_s229 :: [GHC.Types.Int]
[LclId, Str=DmdType]
lvl_s229 =
  GHC.Base.$
    @ (forall b1_a1ZT.
       (GHC.Types.Int -> b1_a1ZT -> b1_a1ZT) -> b1_a1ZT -> b1_a1ZT)
    @ [GHC.Types.Int]
    (GHC.Base.build @ GHC.Types.Int)
    lvl_s228

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX, Arity=3, Str=DmdType]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    let {
      lvl_s224 :: GHC.Types.Int -> c_a1Zb -> c_a1Zb
      [LclId, Str=DmdType]
      lvl_s224 =
        \ (x_a1HR :: GHC.Types.Int) (r_a1HS [OS=OneShot] :: c_a1Zb) ->
          case case x_a1HR of _ [Occ=Dead] { GHC.Types.I# x_a20R ->
               GHC.Prim.tagToEnum#
                 @ GHC.Types.Bool
                 (case x_a20R of _ [Occ=Dead] {
                    __DEFAULT -> 1;
                    1 -> 0
                  })
               }
          of _ [Occ=Dead] {
            GHC.Types.False -> n_a1HU;
            GHC.Types.True -> c_a1HT x_a1HR r_a1HS
          } } in
    GHC.Base.$
      @ [GHC.Types.Int]
      @ c_a1Zb
      (\ (x_a20f :: [GHC.Types.Int]) ->
         GHC.Base.foldr @ GHC.Types.Int @ c_a1Zb lvl_s224 n_a1HU x_a20f)
      lvl_s229



*** Simplifier:

==================== Occurrence analysis ====================
lvl_s225 [Occ=Once] :: GHC.Types.Int
[LclId, Str=DmdType]
lvl_s225 = GHC.Types.I# 9

b'_s227 [Occ=OnceL] :: GHC.Types.Int
[LclId, Str=DmdType]
b'_s227 = GHC.Num.$fNumInt_$cnegate lvl_s225

lvl_s228 [Occ=Once]
  :: forall b1_a1ZU.
     (GHC.Types.Int -> b1_a1ZU -> b1_a1ZU) -> b1_a1ZU -> b1_a1ZU
[LclId, Str=DmdType]
lvl_s228 =
  \ (@ b1_a1ZU)
    (c_a1ZV [Occ=OnceL!] :: GHC.Types.Int -> b1_a1ZU -> b1_a1ZU)
    (n_a1ZW [Occ=OnceL] :: b1_a1ZU) ->
    (letrec {
       go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> b1_a1ZU
       [LclId, Arity=1, Str=DmdType]
       go_a1ZX =
         \ (b2_a1ZY :: GHC.Types.Int) ->
           case case case b2_a1ZY
                     of _ [Occ=Dead] { GHC.Types.I# x_a218 [Occ=Once] ->
                     GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
                     }
                of _ [Occ=Dead] {
                  GHC.Types.False ->
                    Data.Maybe.Nothing @ (GHC.Types.Int, GHC.Types.Int);
                  GHC.Types.True ->
                    Data.Maybe.Just @ (GHC.Types.Int, GHC.Types.Int) (b2_a1ZY, b2_a1ZY)
                }
           of _ [Occ=Dead] {
             Data.Maybe.Nothing -> n_a1ZW;
             Data.Maybe.Just ds_a203 [Occ=Once!] ->
               case ds_a203
               of _ [Occ=Dead] { (a1_a207 [Occ=Once], new_b_a208 [Occ=Once]) ->
               c_a1ZV a1_a207 (go_a1ZX new_b_a208)
               }
           }; } in
     go_a1ZX)
      b'_s227

lvl_s229 [Occ=OnceL] :: [GHC.Types.Int]
[LclId, Str=DmdType]
lvl_s229 =
  GHC.Base.$
    @ (forall b1_a1ZT.
       (GHC.Types.Int -> b1_a1ZT -> b1_a1ZT) -> b1_a1ZT -> b1_a1ZT)
    @ [GHC.Types.Int]
    (GHC.Base.build @ GHC.Types.Int)
    lvl_s228

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX, Arity=3, Str=DmdType]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT [Occ=OnceL!] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    let {
      lvl_s224 [Occ=OnceL] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb
      [LclId, Str=DmdType]
      lvl_s224 =
        \ (x_a1HR :: GHC.Types.Int)
          (r_a1HS [Occ=Once, OS=OneShot] :: c_a1Zb) ->
          case case x_a1HR
               of _ [Occ=Dead] { GHC.Types.I# x_a20R [Occ=Once!] ->
               GHC.Prim.tagToEnum#
                 @ GHC.Types.Bool
                 (case x_a20R of _ [Occ=Dead] {
                    __DEFAULT -> 1;
                    1 -> 0
                  })
               }
          of _ [Occ=Dead] {
            GHC.Types.False -> n_a1HU;
            GHC.Types.True -> c_a1HT x_a1HR r_a1HS
          } } in
    GHC.Base.$
      @ [GHC.Types.Int]
      @ c_a1Zb
      (\ (x_a20f [Occ=Once] :: [GHC.Types.Int]) ->
         GHC.Base.foldr @ GHC.Types.Int @ c_a1Zb lvl_s224 n_a1HU x_a20f)
      lvl_s229



SimplBind lvl_s225
SimplBind b'
Considering inlining: GHC.Num.$fNumInt_$cnegate
    arg infos [ValueArg]
    uf arity 1
    interesting continuation RhsCtxt
    some_benefit True
    is exp: True
    is work-free: True
    guidance ALWAYS_IF(unsat_ok=True,boring_ok=False)
    ANSWER = YES
Inlining done: GHC.Num.$fNumInt_$cnegate
    Inlined fn:  \ (ds [Occ=Once!] :: GHC.Types.Int) ->
                   case ds of _ [Occ=Dead] { GHC.Types.I# x [Occ=Once] ->
                   GHC.Types.I# (GHC.Prim.negateInt# x)
                   }
    Cont:   ApplyTo nodup lvl_s225
            Stop[RhsCtxt] GHC.Types.Int
Rule fired
    Rule: negateInt#
    Before: GHC.Prim.negateInt# 9
    After:  (-9)
    Cont:   StrictArg GHC.Types.I#
            Stop[RhsCtxt] GHC.Types.Int
SimplBind lvl_s228
SimplBind lvl_s229
Considering inlining: GHC.Base.$
    arg infos [ValueArg, ValueArg]
    uf arity 2
    interesting continuation RhsCtxt
    some_benefit True
    is exp: True
    is work-free: True
    guidance ALWAYS_IF(unsat_ok=False,boring_ok=True)
    ANSWER = YES
Inlining done: GHC.Base.$
    Inlined fn:  \ (@ a)
                   (@ (b :: OpenKind))
                   (tpl_B1 [Occ=Once!] :: a -> b)
                   (tpl_B2 [Occ=Once] :: a) ->
                   tpl_B1 tpl_B2
    Cont:   ApplyTo nodup (TYPE forall b1.
                                (GHC.Types.Int -> b1 -> b1) -> b1 -> b1)
            ApplyTo nodup (TYPE [GHC.Types.Int])
            ApplyTo nodup (GHC.Base.build @ GHC.Types.Int)
            ApplyTo nodup lvl_s228
            Stop[RhsCtxt] [GHC.Types.Int]
Inactive unfolding: build
SimplBind go
Considering inlining: b2_a1ZY
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: b2_a1ZY
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: $j_s22f
    arg infos [ValueArg]
    uf arity 1
    interesting continuation BoringCtxt
    some_benefit True
    is exp: True
    is work-free: True
    guidance IF_ARGS [20] 60 0
    discounted size = 10
    ANSWER = YES
Inlining done: $j_s22f
    Inlined fn:  \ (ds [Occ=Once!, OS=OneShot]
                      :: (GHC.Types.Int, GHC.Types.Int)) ->
                   case ds of _ [Occ=Dead] { (a1 [Occ=Once], new_b [Occ=Once]) ->
                   c a1 (go new_b)
                   }
    Cont:   ApplyTo nodup ds
            Stop[BoringCtxt] b1
Considering inlining: ds_a203
    arg infos []
    uf arity 0
    interesting continuation CaseCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 30
    discounted size = -45
    ANSWER = NO
Considering inlining: b2_a1ZY
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: b2_a1ZY
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: b'_s227
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
SimplBind foo
Considering inlining: x_a1HR
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Rule fired
    Rule: tagToEnum#
    Before: GHC.Prim.tagToEnum# (TYPE GHC.Types.Bool) 1
    After:  GHC.Types.True
    Cont:   Select ok wild_Xc
              []
              [(GHC.Types.False, [], n_a1HU),
               (GHC.Types.True, [], c_a1HT x_a1HR r_a1HS)]
            Stop[BoringCtxt] c_a1Zb
Considering inlining: x_a1HR
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Rule fired
    Rule: tagToEnum#
    Before: GHC.Prim.tagToEnum# (TYPE GHC.Types.Bool) 0
    After:  GHC.Types.False
    Cont:   Select ok wild_Xc
              []
              [(GHC.Types.False, [], n_a1HU),
               (GHC.Types.True, [], c_a1HT x_a1HR r_a1HS)]
            Stop[BoringCtxt] c_a1Zb
Considering inlining: GHC.Base.$
    arg infos [ValueArg, TrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit True
    is exp: True
    is work-free: True
    guidance ALWAYS_IF(unsat_ok=False,boring_ok=True)
    ANSWER = YES
Inlining done: GHC.Base.$
    Inlined fn:  \ (@ a)
                   (@ (b :: OpenKind))
                   (tpl_B1 [Occ=Once!] :: a -> b)
                   (tpl_B2 [Occ=Once] :: a) ->
                   tpl_B1 tpl_B2
    Cont:   ApplyTo nodup (TYPE [GHC.Types.Int])
            ApplyTo nodup (TYPE c)
            ApplyTo nodup (\ (x [Occ=Once] :: [GHC.Types.Int]) ->
                             GHC.Base.foldr @ GHC.Types.Int @ c lvl_s224 n x)
            ApplyTo nodup lvl_s229
            Stop[BoringCtxt] c
Inactive unfolding: foldr
Considering inlining: lvl_s224
    arg infos []
    uf arity 2
    interesting continuation RuleArgCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [20 0] 60 0
    discounted size = 50
    ANSWER = NO
Considering inlining: lvl_s229
    arg infos []
    uf arity 0
    interesting continuation RuleArgCtxt
    some_benefit False
    is exp: False
    is work-free: False
    guidance IF_ARGS [] 242 40
    discounted size = 172
    ANSWER = NO
Result size of Simplifier iteration=1
  = {terms: 64, types: 58, coercions: 0}

==================== Occurrence analysis ====================
b'_s227 [Occ=Once] :: GHC.Types.Int
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [] 10 20}]
b'_s227 = GHC.Types.I# (-9)

lvl_s229 [Occ=OnceL] :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 242 40}]
lvl_s229 =
  GHC.Base.build
    @ GHC.Types.Int
    (\ (@ b1_a1ZU)
       (c_a1ZV [Occ=OnceL!, OS=OneShot]
          :: GHC.Types.Int -> b1_a1ZU -> b1_a1ZU)
       (n_a1ZW [Occ=OnceL, OS=OneShot] :: b1_a1ZU) ->
       letrec {
         go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> b1_a1ZU
         [LclId,
          Arity=1,
          Str=DmdType,
          Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
                  ConLike=True, WorkFree=True, Expandable=True,
                  Guidance=IF_ARGS [20] 182 0}]
         go_a1ZX =
           \ (b2_a1ZY [Occ=Once!] :: GHC.Types.Int) ->
             case b2_a1ZY of wild_a216 { GHC.Types.I# x_a218 [Occ=Once] ->
             let {
               b2_a1ZY :: GHC.Types.Int
               [LclId, Str=DmdType]
               b2_a1ZY = wild_a216 } in
             case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
             of _ [Occ=Dead] {
               GHC.Types.False -> n_a1ZW;
               GHC.Types.True -> c_a1ZV b2_a1ZY (go_a1ZX b2_a1ZY)
             }
             }; } in
       go_a1ZX b'_s227)

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 130 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT [Occ=OnceL!] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    let {
      lvl_s224 [Occ=Once] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb
      [LclId,
       Arity=2,
       Str=DmdType,
       Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=2, Value=True,
               ConLike=True, WorkFree=True, Expandable=True,
               Guidance=IF_ARGS [20 0] 60 0}]
      lvl_s224 =
        \ (x_a1HR [Occ=Once!] :: GHC.Types.Int)
          (r_a1HS [Occ=Once, OS=OneShot] :: c_a1Zb) ->
          case x_a1HR of wild_a20P { GHC.Types.I# x_a20R [Occ=Once!] ->
          let {
            x_a1HR [Occ=Once] :: GHC.Types.Int
            [LclId, Str=DmdType]
            x_a1HR = wild_a20P } in
          case x_a20R of _ [Occ=Dead] {
            __DEFAULT -> c_a1HT x_a1HR r_a1HS;
            1 -> n_a1HU
          }
          } } in
    GHC.Base.foldr @ GHC.Types.Int @ c_a1Zb lvl_s224 n_a1HU lvl_s229



SimplBind b'
SimplBind lvl_s229
Inactive unfolding: build
SimplBind go
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation RhsCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = -30
    ANSWER = NO
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
SimplBind foo
Inactive unfolding: foldr
Considering inlining: wild_a20P
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: lvl_s229
    arg infos []
    uf arity 0
    interesting continuation RuleArgCtxt
    some_benefit False
    is exp: False
    is work-free: False
    guidance IF_ARGS [] 152 40
    discounted size = 82
    ANSWER = NO
Result size of Simplifier iteration=2
  = {terms: 47, types: 37, coercions: 0}

==================== Occurrence analysis ====================
lvl_s229 [Occ=OnceL] :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 152 40}]
lvl_s229 =
  GHC.Base.build
    @ GHC.Types.Int
    (\ (@ b1_a1ZU)
       (c_a1ZV [Occ=OnceL!, OS=OneShot]
          :: GHC.Types.Int -> b1_a1ZU -> b1_a1ZU)
       (n_a1ZW [Occ=OnceL, OS=OneShot] :: b1_a1ZU) ->
       letrec {
         go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> b1_a1ZU
         [LclId,
          Arity=1,
          Str=DmdType,
          Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
                  ConLike=True, WorkFree=True, Expandable=True,
                  Guidance=IF_ARGS [20] 82 0}]
         go_a1ZX =
           \ (b2_a1ZY [Occ=Once!] :: GHC.Types.Int) ->
             case b2_a1ZY of wild_a216 { GHC.Types.I# x_a218 [Occ=Once] ->
             case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
             of _ [Occ=Dead] {
               GHC.Types.False -> n_a1ZW;
               GHC.Types.True -> c_a1ZV wild_a216 (go_a1ZX wild_a216)
             }
             }; } in
       go_a1ZX (GHC.Types.I# (-9)))

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 120 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT [Occ=OnceL!] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.foldr
      @ GHC.Types.Int
      @ c_a1Zb
      (\ (x_a1HR [Occ=Once!] :: GHC.Types.Int)
         (r_a1HS [Occ=Once, OS=OneShot] :: c_a1Zb) ->
         case x_a1HR of wild_a20P { GHC.Types.I# x_a20R [Occ=Once!] ->
         case x_a20R of _ [Occ=Dead] {
           __DEFAULT -> c_a1HT wild_a20P r_a1HS;
           1 -> n_a1HU
         }
         })
      n_a1HU
      lvl_s229



SimplBind lvl_s229
Inactive unfolding: build
SimplBind go
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
SimplBind foo
Inactive unfolding: foldr
Considering inlining: wild_a20P
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: lvl_s229
    arg infos []
    uf arity 0
    interesting continuation RuleArgCtxt
    some_benefit False
    is exp: False
    is work-free: False
    guidance IF_ARGS [] 152 40
    discounted size = 82
    ANSWER = NO

==================== Simplifier ====================
  Max iterations = 4
  SimplMode {Phase = 2 [main],
             inline,
             rules,
             eta-expand,
             case-of-case}
Result size of Simplifier = {terms: 47, types: 37, coercions: 0}

lvl_s229 :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 152 40}]
lvl_s229 =
  GHC.Base.build
    @ GHC.Types.Int
    (\ (@ b1_a1ZU)
       (c_a1ZV [OS=OneShot] :: GHC.Types.Int -> b1_a1ZU -> b1_a1ZU)
       (n_a1ZW [OS=OneShot] :: b1_a1ZU) ->
       letrec {
         go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> b1_a1ZU
         [LclId,
          Arity=1,
          Str=DmdType,
          Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
                  ConLike=True, WorkFree=True, Expandable=True,
                  Guidance=IF_ARGS [20] 82 0}]
         go_a1ZX =
           \ (b2_a1ZY :: GHC.Types.Int) ->
             case b2_a1ZY of wild_a216 { GHC.Types.I# x_a218 ->
             case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
             of _ [Occ=Dead] {
               GHC.Types.False -> n_a1ZW;
               GHC.Types.True -> c_a1ZV wild_a216 (go_a1ZX wild_a216)
             }
             }; } in
       go_a1ZX (GHC.Types.I# (-9)))

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 120 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.foldr
      @ GHC.Types.Int
      @ c_a1Zb
      (\ (x_a1HR :: GHC.Types.Int) (r_a1HS [OS=OneShot] :: c_a1Zb) ->
         case x_a1HR of wild_a20P { GHC.Types.I# x_a20R ->
         case x_a20R of _ [Occ=Dead] {
           __DEFAULT -> c_a1HT wild_a20P r_a1HS;
           1 -> n_a1HU
         }
         })
      n_a1HU
      lvl_s229



*** Simplifier:

==================== Occurrence analysis ====================
lvl_s229 [Occ=OnceL] :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 152 40}]
lvl_s229 =
  GHC.Base.build
    @ GHC.Types.Int
    (\ (@ b1_a1ZU)
       (c_a1ZV [Occ=OnceL!, OS=OneShot]
          :: GHC.Types.Int -> b1_a1ZU -> b1_a1ZU)
       (n_a1ZW [Occ=OnceL, OS=OneShot] :: b1_a1ZU) ->
       letrec {
         go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> b1_a1ZU
         [LclId,
          Arity=1,
          Str=DmdType,
          Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
                  ConLike=True, WorkFree=True, Expandable=True,
                  Guidance=IF_ARGS [20] 82 0}]
         go_a1ZX =
           \ (b2_a1ZY [Occ=Once!] :: GHC.Types.Int) ->
             case b2_a1ZY of wild_a216 { GHC.Types.I# x_a218 [Occ=Once] ->
             case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
             of _ [Occ=Dead] {
               GHC.Types.False -> n_a1ZW;
               GHC.Types.True -> c_a1ZV wild_a216 (go_a1ZX wild_a216)
             }
             }; } in
       go_a1ZX (GHC.Types.I# (-9)))

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 120 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT [Occ=OnceL!] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.foldr
      @ GHC.Types.Int
      @ c_a1Zb
      (\ (x_a1HR [Occ=Once!] :: GHC.Types.Int)
         (r_a1HS [Occ=Once, OS=OneShot] :: c_a1Zb) ->
         case x_a1HR of wild_a20P { GHC.Types.I# x_a20R [Occ=Once!] ->
         case x_a20R of _ [Occ=Dead] {
           __DEFAULT -> c_a1HT wild_a20P r_a1HS;
           1 -> n_a1HU
         }
         })
      n_a1HU
      lvl_s229



SimplBind lvl_s229
Considering inlining: GHC.Base.build
    arg infos [ValueArg]
    uf arity 1
    interesting continuation RhsCtxt
    some_benefit True
    is exp: True
    is work-free: True
    guidance ALWAYS_IF(unsat_ok=False,boring_ok=False)
    ANSWER = YES
Inlining done: GHC.Base.build
    Inlined fn:  \ (@ a)
                   (g [Occ=Once!] :: forall b. (a -> b -> b) -> b -> b) ->
                   g @ [a] (GHC.Types.: @ a) (GHC.Types.[] @ a)
    Cont:   ApplyTo nodup (TYPE GHC.Types.Int)
            ApplyTo nodup (\ (@ b1)
                             (c [Occ=OnceL!, OS=OneShot] :: GHC.Types.Int -> b1 -> b1)
                             (n [Occ=OnceL, OS=OneShot] :: b1) ->
                             letrec {
                               go [Occ=LoopBreaker] :: GHC.Types.Int -> b1
                               [LclId,
                                Arity=1,
                                Str=DmdType,
                                Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
                                        ConLike=True, WorkFree=True, Expandable=True,
                                        Guidance=IF_ARGS [20] 82 0}]
                               go =
                                 \ (b2 [Occ=Once!] :: GHC.Types.Int) ->
                                   case b2 of wild { GHC.Types.I# x [Occ=Once] ->
                                   case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x 10)
                                   of _ [Occ=Dead] {
                                     GHC.Types.False -> n;
                                     GHC.Types.True -> c wild (go wild)
                                   }
                                   }; } in
                             go (GHC.Types.I# (-9)))
            Stop[RhsCtxt] [GHC.Types.Int]
SimplBind go
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
SimplBind foo
Inactive unfolding: foldr
Considering inlining: wild_a20P
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: lvl_s229
    arg infos []
    uf arity 0
    interesting continuation RuleArgCtxt
    some_benefit False
    is exp: False
    is work-free: False
    guidance IF_ARGS [] 30 0
    discounted size = 20
    ANSWER = NO
Result size of Simplifier iteration=1
  = {terms: 43, types: 34, coercions: 0}

==================== Occurrence analysis ====================
Rec {
go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> [GHC.Types.Int]
[LclId,
 Arity=1,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [20] 62 40}]
go_a1ZX =
  \ (b2_a1ZY [Occ=Once!] :: GHC.Types.Int) ->
    case b2_a1ZY of wild_a216 { GHC.Types.I# x_a218 [Occ=Once] ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
    of _ [Occ=Dead] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.: @ GHC.Types.Int wild_a216 (go_a1ZX wild_a216)
    }
    }
end Rec }

lvl_s229 [Occ=OnceL] :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 30 0}]
lvl_s229 = go_a1ZX (GHC.Types.I# (-9))

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 120 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT [Occ=OnceL!] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.foldr
      @ GHC.Types.Int
      @ c_a1Zb
      (\ (x_a1HR [Occ=Once!] :: GHC.Types.Int)
         (r_a1HS [Occ=Once, OS=OneShot] :: c_a1Zb) ->
         case x_a1HR of wild_a20P { GHC.Types.I# x_a20R [Occ=Once!] ->
         case x_a20R of _ [Occ=Dead] {
           __DEFAULT -> c_a1HT wild_a20P r_a1HS;
           1 -> n_a1HU
         }
         })
      n_a1HU
      lvl_s229



SimplBind go
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
SimplBind lvl_s229
SimplBind foo
Inactive unfolding: foldr
Considering inlining: wild_a20P
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: lvl_s229
    arg infos []
    uf arity 0
    interesting continuation RuleArgCtxt
    some_benefit False
    is exp: False
    is work-free: False
    guidance IF_ARGS [] 30 0
    discounted size = 20
    ANSWER = NO

==================== Simplifier ====================
  Max iterations = 4
  SimplMode {Phase = 1 [main],
             inline,
             rules,
             eta-expand,
             case-of-case}
Result size of Simplifier = {terms: 43, types: 34, coercions: 0}

Rec {
go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> [GHC.Types.Int]
[LclId,
 Arity=1,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [20] 62 40}]
go_a1ZX =
  \ (b2_a1ZY :: GHC.Types.Int) ->
    case b2_a1ZY of wild_a216 { GHC.Types.I# x_a218 ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
    of _ [Occ=Dead] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.: @ GHC.Types.Int wild_a216 (go_a1ZX wild_a216)
    }
    }
end Rec }

lvl_s229 :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 30 0}]
lvl_s229 = go_a1ZX (GHC.Types.I# (-9))

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 120 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.foldr
      @ GHC.Types.Int
      @ c_a1Zb
      (\ (x_a1HR :: GHC.Types.Int) (r_a1HS [OS=OneShot] :: c_a1Zb) ->
         case x_a1HR of wild_a20P { GHC.Types.I# x_a20R ->
         case x_a20R of _ [Occ=Dead] {
           __DEFAULT -> c_a1HT wild_a20P r_a1HS;
           1 -> n_a1HU
         }
         })
      n_a1HU
      lvl_s229



*** Simplifier:

==================== Occurrence analysis ====================
Rec {
go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> [GHC.Types.Int]
[LclId,
 Arity=1,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [20] 62 40}]
go_a1ZX =
  \ (b2_a1ZY [Occ=Once!] :: GHC.Types.Int) ->
    case b2_a1ZY of wild_a216 { GHC.Types.I# x_a218 [Occ=Once] ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
    of _ [Occ=Dead] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.: @ GHC.Types.Int wild_a216 (go_a1ZX wild_a216)
    }
    }
end Rec }

lvl_s229 [Occ=OnceL] :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 30 0}]
lvl_s229 = go_a1ZX (GHC.Types.I# (-9))

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 120 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT [Occ=OnceL!] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    GHC.Base.foldr
      @ GHC.Types.Int
      @ c_a1Zb
      (\ (x_a1HR [Occ=Once!] :: GHC.Types.Int)
         (r_a1HS [Occ=Once, OS=OneShot] :: c_a1Zb) ->
         case x_a1HR of wild_a20P { GHC.Types.I# x_a20R [Occ=Once!] ->
         case x_a20R of _ [Occ=Dead] {
           __DEFAULT -> c_a1HT wild_a20P r_a1HS;
           1 -> n_a1HU
         }
         })
      n_a1HU
      lvl_s229



SimplBind go
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
SimplBind lvl_s229
SimplBind foo
Considering inlining: GHC.Base.foldr
    arg infos [ValueArg, TrivArg, TrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit True
    is exp: True
    is work-free: True
    guidance ALWAYS_IF(unsat_ok=False,boring_ok=False)
    ANSWER = YES
Inlining done: GHC.Base.foldr
    Inlined fn:  \ (@ a)
                   (@ b)
                   (k [Occ=OnceL!] :: a -> b -> b)
                   (z [Occ=OnceL] :: b)
                   (eta [Occ=Once] :: [a]) ->
                   letrec {
                     go [Occ=LoopBreaker] :: [a] -> b
                     [LclId, Arity=1, Str=DmdType]
                     go =
                       \ (ds [Occ=Once!] :: [a]) ->
                         case ds of _ [Occ=Dead] {
                           [] -> z;
                           : y [Occ=Once] ys [Occ=Once] -> k y (go ys)
                         }; } in
                   go eta
    Cont:   ApplyTo nodup (TYPE GHC.Types.Int)
            ApplyTo nodup (TYPE c)
            ApplyTo nodup (\ (x [Occ=Once!] :: GHC.Types.Int)
                             (r [Occ=Once, OS=OneShot] :: c) ->
                             case x of wild { GHC.Types.I# x [Occ=Once!] ->
                             case x of _ [Occ=Dead] {
                               __DEFAULT -> c wild r;
                               1 -> n
                             }
                             })
            ApplyTo nodup n
            ApplyTo nodup lvl_s229
            Stop[BoringCtxt] c
SimplBind go
Considering inlining: wild_a20P
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: lvl_s229
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: False
    is work-free: False
    guidance IF_ARGS [] 30 0
    discounted size = 20
    ANSWER = NO
Result size of Simplifier iteration=1
  = {terms: 48, types: 40, coercions: 0}

==================== Occurrence analysis ====================
Rec {
go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> [GHC.Types.Int]
[LclId,
 Arity=1,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [20] 62 40}]
go_a1ZX =
  \ (b2_a1ZY [Occ=Once!] :: GHC.Types.Int) ->
    case b2_a1ZY of wild_a216 { GHC.Types.I# x_a218 [Occ=Once] ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
    of _ [Occ=Dead] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.: @ GHC.Types.Int wild_a216 (go_a1ZX wild_a216)
    }
    }
end Rec }

lvl_s229 [Occ=OnceL] :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 30 0}]
lvl_s229 = go_a1ZX (GHC.Types.I# (-9))

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 140 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT [Occ=OnceL!] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU [Occ=OnceL*] :: c_a1Zb)
    _ [Occ=Dead] ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Zb
      [LclId,
       Arity=1,
       Str=DmdType,
       Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
               ConLike=True, WorkFree=True, Expandable=True,
               Guidance=IF_ARGS [30] 100 0}]
      go_a1ZD =
        \ (ds_a1ZE [Occ=Once!] :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead] {
            [] -> n_a1HU;
            : y_a1ZJ [Occ=Once!] ys_a1ZK [Occ=Once] ->
              case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R [Occ=Once!] ->
              case x_a20R of _ [Occ=Dead] {
                __DEFAULT -> c_a1HT wild_a20P (go_a1ZD ys_a1ZK);
                1 -> n_a1HU
              }
              }
          }; } in
    go_a1ZD lvl_s229



SimplBind go
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
SimplBind lvl_s229
SimplBind foo
SimplBind go
Considering inlining: wild_a20P
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: lvl_s229
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: False
    is work-free: False
    guidance IF_ARGS [] 30 0
    discounted size = 20
    ANSWER = NO

==================== Simplifier ====================
  Max iterations = 4
  SimplMode {Phase = 0 [main],
             inline,
             rules,
             eta-expand,
             case-of-case}
Result size of Simplifier = {terms: 48, types: 40, coercions: 0}

Rec {
go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> [GHC.Types.Int]
[LclId,
 Arity=1,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [20] 62 40}]
go_a1ZX =
  \ (b2_a1ZY :: GHC.Types.Int) ->
    case b2_a1ZY of wild_a216 { GHC.Types.I# x_a218 ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
    of _ [Occ=Dead] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.: @ GHC.Types.Int wild_a216 (go_a1ZX wild_a216)
    }
    }
end Rec }

lvl_s229 :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 30 0}]
lvl_s229 = go_a1ZX (GHC.Types.I# (-9))

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 140 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Zb
      [LclId,
       Arity=1,
       Str=DmdType,
       Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
               ConLike=True, WorkFree=True, Expandable=True,
               Guidance=IF_ARGS [30] 100 0}]
      go_a1ZD =
        \ (ds_a1ZE :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead] {
            [] -> n_a1HU;
            : y_a1ZJ ys_a1ZK ->
              case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R ->
              case x_a20R of _ [Occ=Dead] {
                __DEFAULT -> c_a1HT wild_a20P (go_a1ZD ys_a1ZK);
                1 -> n_a1HU
              }
              }
          }; } in
    go_a1ZD lvl_s229



*** Called arity analysis:

==================== Called arity analysis ====================
Result size of Called arity analysis
  = {terms: 48, types: 40, coercions: 0}

Rec {
go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> [GHC.Types.Int]
[LclId,
 Arity=1,
 CallArity=1,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [20] 62 40}]
go_a1ZX =
  \ (b2_a1ZY :: GHC.Types.Int) ->
    case b2_a1ZY of wild_a216 { GHC.Types.I# x_a218 ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
    of _ [Occ=Dead] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.: @ GHC.Types.Int wild_a216 (go_a1ZX wild_a216)
    }
    }
end Rec }

lvl_s229 :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 30 0}]
lvl_s229 = go_a1ZX (GHC.Types.I# (-9))

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 140 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Zb
      [LclId,
       Arity=1,
       CallArity=1,
       Str=DmdType,
       Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
               ConLike=True, WorkFree=True, Expandable=True,
               Guidance=IF_ARGS [30] 100 0}]
      go_a1ZD =
        \ (ds_a1ZE :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead] {
            [] -> n_a1HU;
            : y_a1ZJ ys_a1ZK ->
              case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R ->
              case x_a20R of _ [Occ=Dead] {
                __DEFAULT -> c_a1HT wild_a20P (go_a1ZD ys_a1ZK);
                1 -> n_a1HU
              }
              }
          }; } in
    go_a1ZD lvl_s229



*** Simplifier:

==================== Occurrence analysis ====================
Rec {
go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> [GHC.Types.Int]
[LclId,
 Arity=1,
 CallArity=1,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [20] 62 40}]
go_a1ZX =
  \ (b2_a1ZY [Occ=Once!] :: GHC.Types.Int) ->
    case b2_a1ZY of wild_a216 { GHC.Types.I# x_a218 [Occ=Once] ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
    of _ [Occ=Dead] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.: @ GHC.Types.Int wild_a216 (go_a1ZX wild_a216)
    }
    }
end Rec }

lvl_s229 [Occ=OnceL] :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 30 0}]
lvl_s229 = go_a1ZX (GHC.Types.I# (-9))

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 140 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT [Occ=OnceL!] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU [Occ=OnceL*] :: c_a1Zb)
    _ [Occ=Dead] ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Zb
      [LclId,
       Arity=1,
       CallArity=1,
       Str=DmdType,
       Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
               ConLike=True, WorkFree=True, Expandable=True,
               Guidance=IF_ARGS [30] 100 0}]
      go_a1ZD =
        \ (ds_a1ZE [Occ=Once!] :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead] {
            [] -> n_a1HU;
            : y_a1ZJ [Occ=Once!] ys_a1ZK [Occ=Once] ->
              case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R [Occ=Once!] ->
              case x_a20R of _ [Occ=Dead] {
                __DEFAULT -> c_a1HT wild_a20P (go_a1ZD ys_a1ZK);
                1 -> n_a1HU
              }
              }
          }; } in
    go_a1ZD lvl_s229



SimplBind go
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
SimplBind lvl_s229
SimplBind foo
SimplBind go
Considering inlining: wild_a20P
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: lvl_s229
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: False
    is work-free: False
    guidance IF_ARGS [] 30 0
    discounted size = 20
    ANSWER = NO

==================== Simplifier ====================
  Max iterations = 4
  SimplMode {Phase = 0 [post-call-arity],
             inline,
             rules,
             eta-expand,
             case-of-case}
Result size of Simplifier = {terms: 48, types: 40, coercions: 0}

Rec {
go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> [GHC.Types.Int]
[LclId,
 Arity=1,
 CallArity=1,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [20] 62 40}]
go_a1ZX =
  \ (b2_a1ZY :: GHC.Types.Int) ->
    case b2_a1ZY of wild_a216 { GHC.Types.I# x_a218 ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
    of _ [Occ=Dead] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.: @ GHC.Types.Int wild_a216 (go_a1ZX wild_a216)
    }
    }
end Rec }

lvl_s229 :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 30 0}]
lvl_s229 = go_a1ZX (GHC.Types.I# (-9))

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 140 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead] ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Zb
      [LclId,
       Arity=1,
       CallArity=1,
       Str=DmdType,
       Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
               ConLike=True, WorkFree=True, Expandable=True,
               Guidance=IF_ARGS [30] 100 0}]
      go_a1ZD =
        \ (ds_a1ZE :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead] {
            [] -> n_a1HU;
            : y_a1ZJ ys_a1ZK ->
              case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R ->
              case x_a20R of _ [Occ=Dead] {
                __DEFAULT -> c_a1HT wild_a20P (go_a1ZD ys_a1ZK);
                1 -> n_a1HU
              }
              }
          }; } in
    go_a1ZD lvl_s229



*** Demand analysis:

==================== Demand analysis ====================
Result size of Demand analysis
  = {terms: 48, types: 40, coercions: 0}

Rec {
go_a1ZX [Occ=LoopBreaker] :: GHC.Types.Int -> [GHC.Types.Int]
[LclId,
 Arity=1,
 CallArity=1,
 Str=DmdType <S,1*U(U)>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [20] 62 40}]
go_a1ZX =
  \ (b2_a1ZY [Dmd=<S,1*U(U)>] :: GHC.Types.Int) ->
    case b2_a1ZY of wild_a216 [Dmd=<L,U(U)>] { GHC.Types.I# x_a218 ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
    of _ [Occ=Dead, Dmd=<L,A>] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.: @ GHC.Types.Int wild_a216 (go_a1ZX wild_a216)
    }
    }
end Rec }

lvl_s229 :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 30 0}]
lvl_s229 = go_a1ZX (GHC.Types.I# (-9))

Foo.foo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0 0] 140 0}]
Foo.foo =
  \ (@ t_a1Za)
    (@ c_a1Zb)
    (c_a1HT [Dmd=<L,C(C1(U))>] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
    (n_a1HU :: c_a1Zb)
    _ [Occ=Dead, Dmd=<L,A>] ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Zb
      [LclId,
       Arity=1,
       CallArity=1,
       Str=DmdType <S,1*U>,
       Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
               ConLike=True, WorkFree=True, Expandable=True,
               Guidance=IF_ARGS [30] 100 0}]
      go_a1ZD =
        \ (ds_a1ZE [Dmd=<S,1*U>] :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead, Dmd=<L,A>] {
            [] -> n_a1HU;
            : y_a1ZJ [Dmd=<S(S),1*U(U)>] ys_a1ZK [Dmd=<L,1*U>] ->
              case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R [Dmd=<S,1*U>] ->
              case x_a20R of _ [Occ=Dead, Dmd=<L,A>] {
                __DEFAULT -> c_a1HT wild_a20P (go_a1ZD ys_a1ZK);
                1 -> n_a1HU
              }
              }
          }; } in
    go_a1ZD lvl_s229



*** Worker Wrapper binds:

==================== Worker Wrapper binds ====================
Result size of Worker Wrapper binds
  = {terms: 79, types: 74, coercions: 0}

Rec {
$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId, Arity=1, Str=DmdType <L,U>]
$wgo_s23r =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    let {
      w_s23m [Dmd=<S,1*U(U)>] :: GHC.Types.Int
      [LclId, Str=DmdType]
      w_s23m = GHC.Types.I# ww_s23p } in
    (\ (b2_a1ZY [Dmd=<S,1*U(U)>] :: GHC.Types.Int) ->
       case b2_a1ZY of wild_a216 [Dmd=<L,U(U)>] { GHC.Types.I# x_a218 ->
       case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
       of _ [Occ=Dead, Dmd=<L,A>] {
         GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
         GHC.Types.True ->
           GHC.Types.: @ GHC.Types.Int wild_a216 (go_a1ZX wild_a216)
       }
       })
      w_s23m

go_a1ZX [InlPrag=INLINE[0]] :: GHC.Types.Int -> [GHC.Types.Int]
[LclId,
 Arity=1,
 CallArity=1,
 Str=DmdType <S,1*U(U)>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False)
         Tmpl= \ (w_s23m [Occ=Once!, Dmd=<S,1*U(U)>] :: GHC.Types.Int) ->
                 case w_s23m of _ [Occ=Dead] { GHC.Types.I# ww_s23p [Occ=Once] ->
                 $wgo_s23r ww_s23p
                 }}]
go_a1ZX =
  \ (w_s23m [Dmd=<S,1*U(U)>] :: GHC.Types.Int) ->
    case w_s23m of ww_s23o { GHC.Types.I# ww_s23p ->
    $wgo_s23r ww_s23p
    }
end Rec }

lvl_s229 :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 30 0}]
lvl_s229 = go_a1ZX (GHC.Types.I# (-9))

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId, Arity=2, Str=DmdType <L,C(C1(U))><L,U>]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t [Dmd=<L,C(C1(U))>] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8) ->
    let {
      w_s23v [Dmd=<L,A>] :: t_a1Z7
      [LclId, Str=DmdType]
      w_s23v =
        Control.Exception.Base.absentError @ t_a1Z7 "w_s23v t"# } in
    (\ (@ t_a1Za)
       (@ c_a1Zb)
       (c_a1HT [Dmd=<L,C(C1(U))>] :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
       (n_a1HU :: c_a1Zb)
       _ [Occ=Dead, Dmd=<L,A>] ->
       letrec {
         go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Zb
         [LclId,
          Arity=1,
          CallArity=1,
          Str=DmdType <S,1*U>,
          Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
                  ConLike=True, WorkFree=True, Expandable=True,
                  Guidance=IF_ARGS [30] 100 0}]
         go_a1ZD =
           \ (ds_a1ZE [Dmd=<S,1*U>] :: [GHC.Types.Int]) ->
             case ds_a1ZE of _ [Occ=Dead, Dmd=<L,A>] {
               [] -> n_a1HU;
               : y_a1ZJ [Dmd=<S(S),1*U(U)>] ys_a1ZK [Dmd=<L,1*U>] ->
                 case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R [Dmd=<S,1*U>] ->
                 case x_a20R of _ [Occ=Dead, Dmd=<L,A>] {
                   __DEFAULT -> c_a1HT wild_a20P (go_a1ZD ys_a1ZK);
                   1 -> n_a1HU
                 }
                 }
             }; } in
       go_a1ZD lvl_s229)
      @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u w_s23v

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once, Dmd=<L,C(C1(U))>]
                    :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t [Dmd=<L,C(C1(U))>] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8)
    (w_s23v [Dmd=<L,A>] :: t_a1Z7) ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



*** Simplifier:

==================== Occurrence analysis ====================
Rec {
go_a1ZX [InlPrag=INLINE[0]] :: GHC.Types.Int -> [GHC.Types.Int]
[LclId,
 Arity=1,
 CallArity=1,
 Str=DmdType <S,1*U(U)>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False)
         Tmpl= \ (w_s23m [Occ=Once!, Dmd=<S,1*U(U)>] :: GHC.Types.Int) ->
                 case w_s23m of _ [Occ=Dead] { GHC.Types.I# ww_s23p [Occ=Once] ->
                 $wgo_s23r ww_s23p
                 }}]
go_a1ZX =
  \ (w_s23m [Occ=Once!, Dmd=<S,1*U(U)>] :: GHC.Types.Int) ->
    case w_s23m of _ [Occ=Dead] { GHC.Types.I# ww_s23p [Occ=Once] ->
    $wgo_s23r ww_s23p
    }

$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId, Arity=1, Str=DmdType <L,U>]
$wgo_s23r =
  \ (ww_s23p [Occ=Once] :: GHC.Prim.Int#) ->
    let {
      w_s23m [Occ=Once, Dmd=<S,1*U(U)>] :: GHC.Types.Int
      [LclId, Str=DmdType]
      w_s23m = GHC.Types.I# ww_s23p } in
    (\ (b2_a1ZY [Occ=Once!, Dmd=<S,1*U(U)>, OS=OneShot]
          :: GHC.Types.Int) ->
       case b2_a1ZY
       of wild_a216 [Dmd=<L,U(U)>] { GHC.Types.I# x_a218 [Occ=Once] ->
       case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x_a218 10)
       of _ [Occ=Dead, Dmd=<L,A>] {
         GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
         GHC.Types.True ->
           GHC.Types.: @ GHC.Types.Int wild_a216 (go_a1ZX wild_a216)
       }
       })
      w_s23m
end Rec }

lvl_s229 [Occ=OnceL] :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 30 0}]
lvl_s229 = go_a1ZX (GHC.Types.I# (-9))

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId, Arity=2, Str=DmdType <L,C(C1(U))><L,U>]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t [Occ=Once, Dmd=<L,C(C1(U))>]
       :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u [Occ=Once] :: c_a1Z8) ->
    let {
      w_s23v [Occ=Once, Dmd=<L,A>] :: t_a1Z7
      [LclId, Str=DmdType]
      w_s23v =
        Control.Exception.Base.absentError @ t_a1Z7 "w_s23v t"# } in
    (\ (@ t_a1Za)
       (@ c_a1Zb)
       (c_a1HT [Occ=OnceL!, Dmd=<L,C(C1(U))>, OS=OneShot]
          :: GHC.Types.Int -> c_a1Zb -> c_a1Zb)
       (n_a1HU [Occ=OnceL*, OS=OneShot] :: c_a1Zb)
       _ [Occ=Dead, Dmd=<L,A>, OS=OneShot] ->
       letrec {
         go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Zb
         [LclId,
          Arity=1,
          CallArity=1,
          Str=DmdType <S,1*U>,
          Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
                  ConLike=True, WorkFree=True, Expandable=True,
                  Guidance=IF_ARGS [30] 100 0}]
         go_a1ZD =
           \ (ds_a1ZE [Occ=Once!, Dmd=<S,1*U>] :: [GHC.Types.Int]) ->
             case ds_a1ZE of _ [Occ=Dead, Dmd=<L,A>] {
               [] -> n_a1HU;
               : y_a1ZJ [Occ=Once!, Dmd=<S(S),1*U(U)>]
                 ys_a1ZK [Occ=Once, Dmd=<L,1*U>] ->
                 case y_a1ZJ
                 of wild_a20P { GHC.Types.I# x_a20R [Occ=Once!, Dmd=<S,1*U>] ->
                 case x_a20R of _ [Occ=Dead, Dmd=<L,A>] {
                   __DEFAULT -> c_a1HT wild_a20P (go_a1ZD ys_a1ZK);
                   1 -> n_a1HU
                 }
                 }
             }; } in
       go_a1ZD lvl_s229)
      @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u w_s23v

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once, Dmd=<L,C(C1(U))>]
                    :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t [Occ=Once, Dmd=<L,C(C1(U))>]
       :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u [Occ=Once] :: c_a1Z8)
    _ [Occ=Dead, Dmd=<L,A>] ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



SimplBind go
SimplBind $wgo
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: go_a1ZX
    arg infos [ValueArg]
    uf arity 1
    interesting continuation BoringCtxt
    some_benefit True
    is exp: True
    is work-free: True
    guidance ALWAYS_IF(unsat_ok=True,boring_ok=False)
    ANSWER = YES
Inlining done: go
    Inlined fn:  \ (w_s23m [Occ=Once!] :: GHC.Types.Int) ->
                   case w_s23m of _ [Occ=Dead] { GHC.Types.I# ww_s23p [Occ=Once] ->
                   $wgo ww_s23p
                   }
    Cont:   ApplyTo nodup wild
            Stop[BoringCtxt] [GHC.Types.Int]
Considering inlining: wild_a216
    arg infos []
    uf arity 0
    interesting continuation CaseCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = -30
    ANSWER = NO
SimplBind lvl_s229
Considering inlining: go_a1ZX
    arg infos [ValueArg]
    uf arity 1
    interesting continuation RhsCtxt
    some_benefit True
    is exp: True
    is work-free: True
    guidance ALWAYS_IF(unsat_ok=True,boring_ok=False)
    ANSWER = YES
Inlining done: go
    Inlined fn:  \ (w_s23m [Occ=Once!] :: GHC.Types.Int) ->
                   case w_s23m of _ [Occ=Dead] { GHC.Types.I# ww_s23p [Occ=Once] ->
                   $wgo ww_s23p
                   }
    Cont:   ApplyTo nodup (GHC.Types.I# (-9))
            Stop[RhsCtxt] [GHC.Types.Int]
SimplBind $wfoo
SimplBind go
Considering inlining: wild_a20P
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: lvl_s229
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: False
    is work-free: False
    guidance IF_ARGS [] 20 0
    discounted size = 10
    ANSWER = NO
SimplBind foo
Considering inlining: $wfoo_s23w
    arg infos [TrivArg, TrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [60 0] 140 0
    discounted size = 110
    ANSWER = NO
Considering inlining: $wfoo_s23w
    arg infos [TrivArg, TrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [60 0] 140 0
    discounted size = 110
    ANSWER = NO
Result size of Simplifier iteration=1
  = {terms: 62, types: 60, coercions: 0}

==================== Occurrence analysis ====================
Rec {
$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId,
 Arity=1,
 Str=DmdType <L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [0] 72 40}]
$wgo_s23r =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    let {
      wild_a216 [Occ=Once] :: GHC.Types.Int
      [LclId,
       Str=DmdType,
       Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=0, Value=True,
               ConLike=True, WorkFree=True, Expandable=True,
               Guidance=IF_ARGS [] 10 20}]
      wild_a216 = GHC.Types.I# ww_s23p } in
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of _ [Occ=Dead, Dmd=<L,A>] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.: @ GHC.Types.Int wild_a216 ($wgo_s23r ww_s23p)
    }
end Rec }

lvl_s229 [Occ=OnceL] :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 20 0}]
lvl_s229 = $wgo_s23r (-9)

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId,
 Arity=2,
 Str=DmdType <L,C(C1(U))><L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0] 140 0}]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t [Occ=OnceL!] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u [Occ=OnceL*] :: c_a1Z8) ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
      [LclId,
       Arity=1,
       CallArity=1,
       Str=DmdType <S,1*U>,
       Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
               ConLike=True, WorkFree=True, Expandable=True,
               Guidance=IF_ARGS [30] 100 0}]
      go_a1ZD =
        \ (ds_a1ZE [Occ=Once!] :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead, Dmd=<L,A>] {
            [] -> w_s23u;
            : y_a1ZJ [Occ=Once!, Dmd=<S(S),1*U(U)>]
              ys_a1ZK [Occ=Once, Dmd=<L,1*U>] ->
              case y_a1ZJ
              of wild_a20P { GHC.Types.I# x_a20R [Occ=Once!, Dmd=<S,1*U>] ->
              case x_a20R of _ [Occ=Dead, Dmd=<L,A>] {
                __DEFAULT -> w_s23t wild_a20P (go_a1ZD ys_a1ZK);
                1 -> w_s23u
              }
              }
          }; } in
    go_a1ZD lvl_s229

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u [Occ=Once] :: c_a1Z8)
    _ [Occ=Dead, Dmd=<L,A>] ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



SimplBind $wgo
SimplBind lvl_s229
SimplBind $wfoo
SimplBind go
Considering inlining: wild_a20P
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: lvl_s229
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: False
    is work-free: False
    guidance IF_ARGS [] 20 0
    discounted size = 10
    ANSWER = NO
SimplBind foo
Considering inlining: $wfoo_s23w
    arg infos [TrivArg, TrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [60 0] 140 0
    discounted size = 110
    ANSWER = NO
Considering inlining: $wfoo_s23w
    arg infos [TrivArg, TrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [60 0] 140 0
    discounted size = 110
    ANSWER = NO
Result size of Simplifier iteration=2
  = {terms: 53, types: 53, coercions: 0}

==================== Occurrence analysis ====================
Rec {
$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId,
 Arity=1,
 Str=DmdType <L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [0] 62 40}]
$wgo_s23r =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of _ [Occ=Dead, Dmd=<L,A>] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.:
          @ GHC.Types.Int (GHC.Types.I# ww_s23p) ($wgo_s23r ww_s23p)
    }
end Rec }

lvl_s229 [Occ=OnceL] :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 20 0}]
lvl_s229 = $wgo_s23r (-9)

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId,
 Arity=2,
 Str=DmdType <L,C(C1(U))><L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0] 140 0}]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t [Occ=OnceL!] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u [Occ=OnceL*] :: c_a1Z8) ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
      [LclId,
       Arity=1,
       CallArity=1,
       Str=DmdType <S,1*U>,
       Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
               ConLike=True, WorkFree=True, Expandable=True,
               Guidance=IF_ARGS [30] 100 0}]
      go_a1ZD =
        \ (ds_a1ZE [Occ=Once!] :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead, Dmd=<L,A>] {
            [] -> w_s23u;
            : y_a1ZJ [Occ=Once!, Dmd=<S(S),1*U(U)>]
              ys_a1ZK [Occ=Once, Dmd=<L,1*U>] ->
              case y_a1ZJ
              of wild_a20P { GHC.Types.I# x_a20R [Occ=Once!, Dmd=<S,1*U>] ->
              case x_a20R of _ [Occ=Dead, Dmd=<L,A>] {
                __DEFAULT -> w_s23t wild_a20P (go_a1ZD ys_a1ZK);
                1 -> w_s23u
              }
              }
          }; } in
    go_a1ZD lvl_s229

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u [Occ=Once] :: c_a1Z8)
    _ [Occ=Dead, Dmd=<L,A>] ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



SimplBind $wgo
SimplBind lvl_s229
SimplBind $wfoo
SimplBind go
Considering inlining: wild_a20P
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: lvl_s229
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: False
    is work-free: False
    guidance IF_ARGS [] 20 0
    discounted size = 10
    ANSWER = NO
SimplBind foo
Considering inlining: $wfoo_s23w
    arg infos [TrivArg, TrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [60 0] 140 0
    discounted size = 110
    ANSWER = NO
Considering inlining: $wfoo_s23w
    arg infos [TrivArg, TrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [60 0] 140 0
    discounted size = 110
    ANSWER = NO

==================== Simplifier ====================
  Max iterations = 4
  SimplMode {Phase = 0 [post-worker-wrapper],
             inline,
             rules,
             eta-expand,
             case-of-case}
Result size of Simplifier = {terms: 53, types: 53, coercions: 0}

Rec {
$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId,
 Arity=1,
 Str=DmdType <L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [0] 62 40}]
$wgo_s23r =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of _ [Occ=Dead, Dmd=<L,A>] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.:
          @ GHC.Types.Int (GHC.Types.I# ww_s23p) ($wgo_s23r ww_s23p)
    }
end Rec }

lvl_s229 :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 20 0}]
lvl_s229 = $wgo_s23r (-9)

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId,
 Arity=2,
 Str=DmdType <L,C(C1(U))><L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0] 140 0}]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8) ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
      [LclId,
       Arity=1,
       CallArity=1,
       Str=DmdType <S,1*U>,
       Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
               ConLike=True, WorkFree=True, Expandable=True,
               Guidance=IF_ARGS [30] 100 0}]
      go_a1ZD =
        \ (ds_a1ZE :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead, Dmd=<L,A>] {
            [] -> w_s23u;
            : y_a1ZJ [Dmd=<S(S),1*U(U)>] ys_a1ZK [Dmd=<L,1*U>] ->
              case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R [Dmd=<S,1*U>] ->
              case x_a20R of _ [Occ=Dead, Dmd=<L,A>] {
                __DEFAULT -> w_s23t wild_a20P (go_a1ZD ys_a1ZK);
                1 -> w_s23u
              }
              }
          }; } in
    go_a1ZD lvl_s229

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8)
    _ [Occ=Dead, Dmd=<L,A>] ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



*** Float out(FOS {Lam = Just 0, Consts = True, PAPs = True}):

==================== Levels added: ====================
<$wgo_s23r,<0,0>>
<$wgo_s23r,<0,0>> =
  \ <ww_s23p,<1,0>> ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of <wild_Xd,<1,1>> {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.:
          @ GHC.Types.Int (GHC.Types.I# ww_s23p) ($wgo_s23r ww_s23p)
    };
<lvl_s229,<0,0>>
<lvl_s229,<0,0>> = $wgo_s23r (-9)
<$wfoo_s23w,<0,0>>
<$wfoo_s23w,<0,0>> =
  \ <t_a1Z7,<1,0>> <c_a1Z8,<1,0>> <w_s23t,<1,0>> <w_s23u,<1,0>> ->
    letrec {
      <go_a1ZD,<1,1>>
      <go_a1ZD,<1,1>> =
        \ <ds_a1ZE,<2,0>> ->
          case ds_a1ZE of <wild_a1ZF,<2,1>> {
            [] -> w_s23u;
            : <y_a1ZJ,<2,1>> <ys_a1ZK,<2,1>> ->
              case y_a1ZJ of <wild_a20P,<2,2>> { GHC.Types.I# <x_a20R,<2,2>> ->
              case x_a20R of <wild_Xj,<2,3>> {
                __DEFAULT -> w_s23t y_a1ZJ (go_a1ZD ys_a1ZK);
                1 -> w_s23u
              }
              }
          }; } in
    go_a1ZD lvl_s229
<Foo.foo,<0,0>>
<Foo.foo,<0,0>> =
  \ <t_a1Z7,<1,0>>
    <c_a1Z8,<1,0>>
    <w_s23t,<1,0>>
    <w_s23u,<1,0>>
    <w_s23v,<1,0>> ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



==================== Float out(FOS {Lam = Just 0, Consts = True, PAPs = True}) ====================
Result size of Float out(FOS {Lam = Just 0,
                              Consts = True,
                              PAPs = True})
  = {terms: 53, types: 53, coercions: 0}

Rec {
$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId, Arity=1, Str=DmdType <L,U>]
$wgo_s23r =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of _ [Occ=Dead, Dmd=<L,A>] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.:
          @ GHC.Types.Int (GHC.Types.I# ww_s23p) ($wgo_s23r ww_s23p)
    }
end Rec }

lvl_s229 :: [GHC.Types.Int]
[LclId, Str=DmdType]
lvl_s229 = $wgo_s23r (-9)

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId, Arity=2, Str=DmdType <L,C(C1(U))><L,U>]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8) ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
      [LclId, Arity=1, CallArity=1, Str=DmdType <S,1*U>]
      go_a1ZD =
        \ (ds_a1ZE :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead, Dmd=<L,A>] {
            [] -> w_s23u;
            : y_a1ZJ [Dmd=<S(S),1*U(U)>] ys_a1ZK [Dmd=<L,1*U>] ->
              case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R [Dmd=<S,1*U>] ->
              case x_a20R of _ [Occ=Dead, Dmd=<L,A>] {
                __DEFAULT -> w_s23t y_a1ZJ (go_a1ZD ys_a1ZK);
                1 -> w_s23u
              }
              }
          }; } in
    go_a1ZD lvl_s229

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8)
    _ [Occ=Dead, Dmd=<L,A>] ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



*** Common sub-expression:

==================== Common sub-expression ====================
Result size of Common sub-expression
  = {terms: 53, types: 53, coercions: 0}

Rec {
$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId, Arity=1, Str=DmdType <L,U>]
$wgo_s23r =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of wild_Xd [Dmd=<L,A>] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.:
          @ GHC.Types.Int (GHC.Types.I# ww_s23p) ($wgo_s23r ww_s23p)
    }
end Rec }

lvl_s229 :: [GHC.Types.Int]
[LclId, Str=DmdType]
lvl_s229 = $wgo_s23r (-9)

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId, Arity=2, Str=DmdType <L,C(C1(U))><L,U>]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8) ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
      [LclId, Arity=1, CallArity=1, Str=DmdType <S,1*U>]
      go_a1ZD =
        \ (ds_a1ZE :: [GHC.Types.Int]) ->
          case ds_a1ZE of wild_a1ZF [Dmd=<L,A>] {
            [] -> w_s23u;
            : y_a1ZJ [Dmd=<S(S),1*U(U)>] ys_a1ZK [Dmd=<L,1*U>] ->
              case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R [Dmd=<S,1*U>] ->
              case x_a20R of wild_Xj [Dmd=<L,A>] {
                __DEFAULT -> w_s23t y_a1ZJ (go_a1ZD ys_a1ZK);
                1 -> w_s23u
              }
              }
          }; } in
    go_a1ZD lvl_s229

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8)
    _ [Occ=Dead, Dmd=<L,A>] ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



*** Float inwards:

==================== Float inwards ====================
Result size of Float inwards = {terms: 53, types: 53, coercions: 0}

Rec {
$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId, Arity=1, Str=DmdType <L,U>]
$wgo_s23r =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of wild_Xd [Dmd=<L,A>] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.:
          @ GHC.Types.Int (GHC.Types.I# ww_s23p) ($wgo_s23r ww_s23p)
    }
end Rec }

lvl_s229 :: [GHC.Types.Int]
[LclId, Str=DmdType]
lvl_s229 = $wgo_s23r (-9)

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId, Arity=2, Str=DmdType <L,C(C1(U))><L,U>]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8) ->
    (letrec {
       go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
       [LclId, Arity=1, CallArity=1, Str=DmdType <S,1*U>]
       go_a1ZD =
         \ (ds_a1ZE :: [GHC.Types.Int]) ->
           case ds_a1ZE of wild_a1ZF [Dmd=<L,A>] {
             [] -> w_s23u;
             : y_a1ZJ [Dmd=<S(S),1*U(U)>] ys_a1ZK [Dmd=<L,1*U>] ->
               case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R [Dmd=<S,1*U>] ->
               case x_a20R of wild_Xj [Dmd=<L,A>] {
                 __DEFAULT -> w_s23t y_a1ZJ (go_a1ZD ys_a1ZK);
                 1 -> w_s23u
               }
               }
           }; } in
     go_a1ZD)
      lvl_s229

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8)
    _ [Occ=Dead, Dmd=<L,A>] ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



*** Liberate case:

==================== Liberate case ====================
Result size of Liberate case = {terms: 53, types: 53, coercions: 0}

Rec {
$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId, Arity=1, Str=DmdType <L,U>]
$wgo_s23r =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of wild_Xd [Dmd=<L,A>] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.:
          @ GHC.Types.Int (GHC.Types.I# ww_s23p) ($wgo_s23r ww_s23p)
    }
end Rec }

lvl_s229 :: [GHC.Types.Int]
[LclId, Str=DmdType]
lvl_s229 = $wgo_s23r (-9)

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId, Arity=2, Str=DmdType <L,C(C1(U))><L,U>]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8) ->
    (letrec {
       go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
       [LclId, Arity=1, CallArity=1, Str=DmdType <S,1*U>]
       go_a1ZD =
         \ (ds_a1ZE :: [GHC.Types.Int]) ->
           case ds_a1ZE of wild_a1ZF [Dmd=<L,A>] {
             [] -> w_s23u;
             : y_a1ZJ [Dmd=<S(S),1*U(U)>] ys_a1ZK [Dmd=<L,1*U>] ->
               case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R [Dmd=<S,1*U>] ->
               case x_a20R of wild_Xj [Dmd=<L,A>] {
                 __DEFAULT -> w_s23t y_a1ZJ (go_a1ZD ys_a1ZK);
                 1 -> w_s23u
               }
               }
           }; } in
     go_a1ZD)
      lvl_s229

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8)
    _ [Occ=Dead, Dmd=<L,A>] ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



*** Simplifier:

==================== Occurrence analysis ====================
Rec {
$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId, Arity=1, Str=DmdType <L,U>]
$wgo_s23r =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of _ [Occ=Dead, Dmd=<L,A>] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.:
          @ GHC.Types.Int (GHC.Types.I# ww_s23p) ($wgo_s23r ww_s23p)
    }
end Rec }

lvl_s229 [Occ=OnceL] :: [GHC.Types.Int]
[LclId, Str=DmdType]
lvl_s229 = $wgo_s23r (-9)

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId, Arity=2, Str=DmdType <L,C(C1(U))><L,U>]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t [Occ=OnceL!] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u [Occ=OnceL*] :: c_a1Z8) ->
    (letrec {
       go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
       [LclId, Arity=1, CallArity=1, Str=DmdType <S,1*U>]
       go_a1ZD =
         \ (ds_a1ZE [Occ=Once!] :: [GHC.Types.Int]) ->
           case ds_a1ZE of _ [Occ=Dead, Dmd=<L,A>] {
             [] -> w_s23u;
             : y_a1ZJ [Occ=Once!, Dmd=<S(S),1*U(U)>]
               ys_a1ZK [Occ=Once, Dmd=<L,1*U>] ->
               case y_a1ZJ
               of wild_a20P { GHC.Types.I# x_a20R [Occ=Once!, Dmd=<S,1*U>] ->
               let {
                 y_a1ZJ [Occ=Once] :: GHC.Types.Int
                 [LclId, Str=DmdType]
                 y_a1ZJ = wild_a20P } in
               case x_a20R of _ [Occ=Dead, Dmd=<L,A>] {
                 __DEFAULT -> w_s23t y_a1ZJ (go_a1ZD ys_a1ZK);
                 1 -> w_s23u
               }
               }
           }; } in
     go_a1ZD)
      lvl_s229

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u [Occ=Once] :: c_a1Z8)
    _ [Occ=Dead, Dmd=<L,A>] ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



SimplBind $wgo
SimplBind lvl_s229
SimplBind $wfoo
SimplBind go
Considering inlining: wild_a20P
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: lvl_s229
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: False
    is work-free: False
    guidance IF_ARGS [] 20 0
    discounted size = 10
    ANSWER = NO
SimplBind foo
Considering inlining: $wfoo_s23w
    arg infos [TrivArg, TrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [60 0] 140 0
    discounted size = 110
    ANSWER = NO
Considering inlining: $wfoo_s23w
    arg infos [TrivArg, TrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [60 0] 140 0
    discounted size = 110
    ANSWER = NO
Result size of Simplifier iteration=1
  = {terms: 53, types: 53, coercions: 0}

==================== Occurrence analysis ====================
Rec {
$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId,
 Arity=1,
 Str=DmdType <L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [0] 62 40}]
$wgo_s23r =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of _ [Occ=Dead, Dmd=<L,A>] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.:
          @ GHC.Types.Int (GHC.Types.I# ww_s23p) ($wgo_s23r ww_s23p)
    }
end Rec }

lvl_s229 [Occ=OnceL] :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 20 0}]
lvl_s229 = $wgo_s23r (-9)

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId,
 Arity=2,
 Str=DmdType <L,C(C1(U))><L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0] 140 0}]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t [Occ=OnceL!] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u [Occ=OnceL*] :: c_a1Z8) ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
      [LclId,
       Arity=1,
       CallArity=1,
       Str=DmdType <S,1*U>,
       Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
               ConLike=True, WorkFree=True, Expandable=True,
               Guidance=IF_ARGS [30] 100 0}]
      go_a1ZD =
        \ (ds_a1ZE [Occ=Once!] :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead, Dmd=<L,A>] {
            [] -> w_s23u;
            : y_a1ZJ [Occ=Once!, Dmd=<S(S),1*U(U)>]
              ys_a1ZK [Occ=Once, Dmd=<L,1*U>] ->
              case y_a1ZJ
              of wild_a20P { GHC.Types.I# x_a20R [Occ=Once!, Dmd=<S,1*U>] ->
              case x_a20R of _ [Occ=Dead, Dmd=<L,A>] {
                __DEFAULT -> w_s23t wild_a20P (go_a1ZD ys_a1ZK);
                1 -> w_s23u
              }
              }
          }; } in
    go_a1ZD lvl_s229

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u [Occ=Once] :: c_a1Z8)
    _ [Occ=Dead, Dmd=<L,A>] ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



SimplBind $wgo
SimplBind lvl_s229
SimplBind $wfoo
SimplBind go
Considering inlining: wild_a20P
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: lvl_s229
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: False
    is work-free: False
    guidance IF_ARGS [] 20 0
    discounted size = 10
    ANSWER = NO
SimplBind foo
Considering inlining: $wfoo_s23w
    arg infos [TrivArg, TrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [60 0] 140 0
    discounted size = 110
    ANSWER = NO
Considering inlining: $wfoo_s23w
    arg infos [TrivArg, TrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [60 0] 140 0
    discounted size = 110
    ANSWER = NO

==================== Simplifier ====================
  Max iterations = 4
  SimplMode {Phase = 0 [post-liberate-case],
             inline,
             rules,
             eta-expand,
             case-of-case}
Result size of Simplifier = {terms: 53, types: 53, coercions: 0}

Rec {
$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId,
 Arity=1,
 Str=DmdType <L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [0] 62 40}]
$wgo_s23r =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of _ [Occ=Dead, Dmd=<L,A>] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.:
          @ GHC.Types.Int (GHC.Types.I# ww_s23p) ($wgo_s23r ww_s23p)
    }
end Rec }

lvl_s229 :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 20 0}]
lvl_s229 = $wgo_s23r (-9)

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId,
 Arity=2,
 Str=DmdType <L,C(C1(U))><L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0] 140 0}]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8) ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
      [LclId,
       Arity=1,
       CallArity=1,
       Str=DmdType <S,1*U>,
       Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
               ConLike=True, WorkFree=True, Expandable=True,
               Guidance=IF_ARGS [30] 100 0}]
      go_a1ZD =
        \ (ds_a1ZE :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead, Dmd=<L,A>] {
            [] -> w_s23u;
            : y_a1ZJ [Dmd=<S(S),1*U(U)>] ys_a1ZK [Dmd=<L,1*U>] ->
              case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R [Dmd=<S,1*U>] ->
              case x_a20R of _ [Occ=Dead, Dmd=<L,A>] {
                __DEFAULT -> w_s23t wild_a20P (go_a1ZD ys_a1ZK);
                1 -> w_s23u
              }
              }
          }; } in
    go_a1ZD lvl_s229

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8)
    _ [Occ=Dead, Dmd=<L,A>] ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



*** SpecConstr:

==================== SpecConstr ====================
Result size of SpecConstr = {terms: 53, types: 53, coercions: 0}

Rec {
$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId, Arity=1, Str=DmdType <L,U>]
$wgo_s23r =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of _ [Occ=Dead, Dmd=<L,A>] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.:
          @ GHC.Types.Int (GHC.Types.I# ww_s23p) ($wgo_s23r ww_s23p)
    }
end Rec }

lvl_s229 :: [GHC.Types.Int]
[LclId, Str=DmdType]
lvl_s229 = $wgo_s23r (-9)

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId, Arity=2, Str=DmdType <L,C(C1(U))><L,U>]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8) ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
      [LclId, Arity=1, CallArity=1, Str=DmdType <S,1*U>]
      go_a1ZD =
        \ (ds_a1ZE :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead, Dmd=<L,A>] {
            [] -> w_s23u;
            : y_a1ZJ [Dmd=<S(S),1*U(U)>] ys_a1ZK [Dmd=<L,1*U>] ->
              case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R [Dmd=<S,1*U>] ->
              case x_a20R of _ [Occ=Dead, Dmd=<L,A>] {
                __DEFAULT -> w_s23t wild_a20P (go_a1ZD ys_a1ZK);
                1 -> w_s23u
              }
              }
          }; } in
    go_a1ZD lvl_s229

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8)
    _ [Occ=Dead, Dmd=<L,A>] ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



*** Simplifier:

==================== Occurrence analysis ====================
Rec {
$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId, Arity=1, Str=DmdType <L,U>]
$wgo_s23r =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of _ [Occ=Dead, Dmd=<L,A>] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.:
          @ GHC.Types.Int (GHC.Types.I# ww_s23p) ($wgo_s23r ww_s23p)
    }
end Rec }

lvl_s229 [Occ=OnceL] :: [GHC.Types.Int]
[LclId, Str=DmdType]
lvl_s229 = $wgo_s23r (-9)

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId, Arity=2, Str=DmdType <L,C(C1(U))><L,U>]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t [Occ=OnceL!] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u [Occ=OnceL*] :: c_a1Z8) ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
      [LclId, Arity=1, CallArity=1, Str=DmdType <S,1*U>]
      go_a1ZD =
        \ (ds_a1ZE [Occ=Once!] :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead, Dmd=<L,A>] {
            [] -> w_s23u;
            : y_a1ZJ [Occ=Once!, Dmd=<S(S),1*U(U)>]
              ys_a1ZK [Occ=Once, Dmd=<L,1*U>] ->
              case y_a1ZJ
              of wild_a20P { GHC.Types.I# x_a20R [Occ=Once!, Dmd=<S,1*U>] ->
              case x_a20R of _ [Occ=Dead, Dmd=<L,A>] {
                __DEFAULT -> w_s23t wild_a20P (go_a1ZD ys_a1ZK);
                1 -> w_s23u
              }
              }
          }; } in
    go_a1ZD lvl_s229

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u [Occ=Once] :: c_a1Z8)
    _ [Occ=Dead, Dmd=<L,A>] ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



SimplBind $wgo
SimplBind lvl_s229
SimplBind $wfoo
SimplBind go
Considering inlining: wild_a20P
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [] 10 20
    discounted size = 0
    ANSWER = NO
Considering inlining: lvl_s229
    arg infos []
    uf arity 0
    interesting continuation BoringCtxt
    some_benefit False
    is exp: False
    is work-free: False
    guidance IF_ARGS [] 20 0
    discounted size = 10
    ANSWER = NO
SimplBind foo
Considering inlining: $wfoo_s23w
    arg infos [TrivArg, TrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [60 0] 140 0
    discounted size = 110
    ANSWER = NO
Considering inlining: $wfoo_s23w
    arg infos [TrivArg, TrivArg]
    uf arity 2
    interesting continuation BoringCtxt
    some_benefit False
    is exp: True
    is work-free: True
    guidance IF_ARGS [60 0] 140 0
    discounted size = 110
    ANSWER = NO

==================== Simplifier ====================
  Max iterations = 4
  SimplMode {Phase = 0 [final],
             inline,
             rules,
             eta-expand,
             case-of-case}
Result size of Simplifier = {terms: 53, types: 53, coercions: 0}

Rec {
$wgo_s23r [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[LclId,
 Arity=1,
 Str=DmdType <L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=1, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [0] 62 40}]
$wgo_s23r =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of _ [Occ=Dead, Dmd=<L,A>] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.:
          @ GHC.Types.Int (GHC.Types.I# ww_s23p) ($wgo_s23r ww_s23p)
    }
end Rec }

lvl_s229 :: [GHC.Types.Int]
[LclId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 20 0}]
lvl_s229 = $wgo_s23r (-9)

$wfoo_s23w
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[LclId,
 Arity=2,
 Str=DmdType <L,C(C1(U))><L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0] 140 0}]
$wfoo_s23w =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8) ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
      [LclId,
       Arity=1,
       CallArity=1,
       Str=DmdType <S,1*U>,
       Unf=Unf{Src=<vanilla>, TopLvl=False, Arity=1, Value=True,
               ConLike=True, WorkFree=True, Expandable=True,
               Guidance=IF_ARGS [30] 100 0}]
      go_a1ZD =
        \ (ds_a1ZE :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead, Dmd=<L,A>] {
            [] -> w_s23u;
            : y_a1ZJ [Dmd=<S(S),1*U(U)>] ys_a1ZK [Dmd=<L,1*U>] ->
              case y_a1ZJ of wild_a20P { GHC.Types.I# x_a20R [Dmd=<S,1*U>] ->
              case x_a20R of _ [Occ=Dead, Dmd=<L,A>] {
                __DEFAULT -> w_s23t wild_a20P (go_a1ZD ys_a1ZK);
                1 -> w_s23u
              }
              }
          }; } in
    go_a1ZD lvl_s229

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[LclIdX,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead, Dmd=<L,A>] ->
                 $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w_s23u :: c_a1Z8)
    _ [Occ=Dead, Dmd=<L,A>] ->
    $wfoo_s23w @ t_a1Z7 @ c_a1Z8 w_s23t w_s23u



*** Tidy Core:

==================== Tidy Core ====================
Result size of Tidy Core = {terms: 53, types: 53, coercions: 0}

Rec {
Foo.$wgo [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <L,U>]
Foo.$wgo =
  \ (ww_s23p :: GHC.Prim.Int#) ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# ww_s23p 10)
    of _ [Occ=Dead] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        GHC.Types.:
          @ GHC.Types.Int (GHC.Types.I# ww_s23p) (Foo.$wgo ww_s23p)
    }
end Rec }

Foo.foo1 :: [GHC.Types.Int]
[GblId,
 Str=DmdType,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=False,
         ConLike=False, WorkFree=False, Expandable=False,
         Guidance=IF_ARGS [] 20 0}]
Foo.foo1 = Foo.$wgo (-9)

Foo.$wfoo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[GblId,
 Arity=2,
 Str=DmdType <L,C(C1(U))><L,U>,
 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=IF_ARGS [60 0] 140 0}]
Foo.$wfoo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w1_s23u :: c_a1Z8) ->
    letrec {
      go_a1ZD [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
      [LclId, Arity=1, Str=DmdType <S,1*U>]
      go_a1ZD =
        \ (ds_a1ZE :: [GHC.Types.Int]) ->
          case ds_a1ZE of _ [Occ=Dead] {
            [] -> w1_s23u;
            : y_a1ZJ ys_a1ZK ->
              case y_a1ZJ of wild1_a20P { GHC.Types.I# x_a20R ->
              case x_a20R of _ [Occ=Dead] {
                __DEFAULT -> w_s23t wild1_a20P (go_a1ZD ys_a1ZK);
                1 -> w1_s23u
              }
              }
          }; } in
    go_a1ZD Foo.foo1

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[GblId,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=Unf{Src=InlineStable, TopLvl=True, Arity=3, Value=True,
         ConLike=True, WorkFree=True, Expandable=True,
         Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True)
         Tmpl= \ (@ t_a1Z7)
                 (@ c_a1Z8)
                 (w_s23t [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
                 (w1_s23u [Occ=Once] :: c_a1Z8)
                 _ [Occ=Dead] ->
                 Foo.$wfoo @ t_a1Z7 @ c_a1Z8 w_s23t w1_s23u}]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s23t :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w1_s23u :: c_a1Z8)
    _ [Occ=Dead] ->
    Foo.$wfoo @ t_a1Z7 @ c_a1Z8 w_s23t w1_s23u



*** CorePrep:

==================== CorePrep ====================
Result size of CorePrep = {terms: 62, types: 58, coercions: 0}

Rec {
Foo.$wgo [Occ=LoopBreaker] :: GHC.Prim.Int# -> [GHC.Types.Int]
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <L,U>, Unf=OtherCon []]
Foo.$wgo =
  \ (ww_s24e :: GHC.Prim.Int#) ->
    case GHC.Prim.<=# ww_s24e 10 of sat_s24f { __DEFAULT ->
    case GHC.Prim.tagToEnum# @ GHC.Types.Bool sat_s24f
    of _ [Occ=Dead] {
      GHC.Types.False -> GHC.Types.[] @ GHC.Types.Int;
      GHC.Types.True ->
        let {
          sat_s24i [Occ=Once] :: [GHC.Types.Int]
          [LclId, Str=DmdType]
          sat_s24i = Foo.$wgo ww_s24e } in
        let {
          sat_s24h [Occ=Once] :: GHC.Types.Int
          [LclId, Str=DmdType]
          sat_s24h = GHC.Types.I# ww_s24e } in
        GHC.Types.: @ GHC.Types.Int sat_s24h sat_s24i
    }
    }
end Rec }

Foo.foo1 :: [GHC.Types.Int]
[GblId, Str=DmdType]
Foo.foo1 = Foo.$wgo (-9)

Foo.$wfoo
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> c_a1Z8
[GblId, Arity=2, Str=DmdType <L,C(C1(U))><L,U>, Unf=OtherCon []]
Foo.$wfoo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s24j [Occ=OnceL!] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w1_s24k [Occ=OnceL*] :: c_a1Z8) ->
    letrec {
      go_s24l [Occ=LoopBreaker] :: [GHC.Types.Int] -> c_a1Z8
      [LclId, Arity=1, Str=DmdType <S,1*U>, Unf=OtherCon []]
      go_s24l =
        \ (ds_s24m [Occ=Once!] :: [GHC.Types.Int]) ->
          case ds_s24m of _ [Occ=Dead] {
            [] -> w1_s24k;
            : y_s24o [Occ=Once!] ys_s24p [Occ=Once] ->
              case y_s24o of wild1_s24q { GHC.Types.I# x_s24r [Occ=Once!] ->
              case x_s24r of _ [Occ=Dead] {
                __DEFAULT ->
                  let {
                    sat_s24t [Occ=Once] :: c_a1Z8
                    [LclId, Str=DmdType]
                    sat_s24t = go_s24l ys_s24p } in
                  w_s24j wild1_s24q sat_s24t;
                1 -> w1_s24k
              }
              }
          }; } in
    go_s24l Foo.foo1

Foo.foo [InlPrag=INLINE[0]]
  :: forall t_a1Z7 c_a1Z8.
     (GHC.Types.Int -> c_a1Z8 -> c_a1Z8) -> c_a1Z8 -> t_a1Z7 -> c_a1Z8
[GblId,
 Arity=3,
 Str=DmdType <L,C(C1(U))><L,U><L,A>,
 Unf=OtherCon []]
Foo.foo =
  \ (@ t_a1Z7)
    (@ c_a1Z8)
    (w_s24u [Occ=Once] :: GHC.Types.Int -> c_a1Z8 -> c_a1Z8)
    (w1_s24v [Occ=Once] :: c_a1Z8)
    _ [Occ=Dead] ->
    Foo.$wfoo @ t_a1Z7 @ c_a1Z8 w_s24u w1_s24v



*** Stg2Stg:
*** CodeGen:
*** Assembler:
Upsweep completely successful.
*** Deleting temp files:
Warning: deleting non-existent /tmp/ghc27658_0/ghc27658_3.c
Warning: deleting non-existent /tmp/ghc27658_0/ghc27658_1.s
*** Deleting temp files:
*** Deleting temp dirs:


More information about the ghc-devs mailing list