
==================== Tidy Core ====================
lvl_rJA :: [GHC.Types.Char]
[GlobalId]
[]
lvl_rJA = GHC.Base.unpackCString# "Negative range size"

TypeIndexedProduct.$wa :: forall l_at5 ls_at8.
                          l_at5
                          -> GHC.Types.Int
                          -> GHC.Prim.Int#
                          -> GHC.Prim.Int#
                          -> GHC.Prim.Array# GHC.Prim.Any
                          -> GHC.Arr.Array GHC.Types.Int GHC.Prim.Any
[GlobalId]
[Arity 5
 Str: DmdType LS(L)LLL]
TypeIndexedProduct.$wa =
  \ (@ l_at5)
    (@ ls_at8)
    (w_sGW :: l_at5)
    (ww_sGZ :: GHC.Types.Int)
    (ww1_sH2 :: GHC.Prim.Int#)
    (ww2_sH4 :: GHC.Prim.Int#)
    (ww3_sH5 :: GHC.Prim.Array# GHC.Prim.Any) ->
    GHC.ST.runSTRep
      @ (GHC.Arr.Array GHC.Types.Int GHC.Prim.Any)
      (\ (@ s_ayr) (s1#_ayx :: GHC.Prim.State# s_ayr) ->
         case ww_sGZ of wild1_aBz { GHC.Types.I# m_aBB ->
         let {
           n_aBF [ALWAYS Just L] :: GHC.Prim.Int#
           [Str: DmdType]
           n_aBF = GHC.Prim.+# ww1_sH2 1 } in
         let {
           $w$j_sI1 :: GHC.Prim.Int#
                       -> (# GHC.Prim.State# s_ayr,
                             GHC.Arr.Array GHC.Types.Int GHC.Prim.Any #)
           [Arity 1
            Str: DmdType L]
           $w$j_sI1 =
             \ (w1_sGS :: GHC.Prim.Int#) ->
               case GHC.Prim.<# w1_sGS 0 of wild11_aBo {
                 GHC.Bool.False ->
                   case GHC.Prim.newArray#
                          @ GHC.Prim.Any
                          @ s_ayr
                          w1_sGS
                          (GHC.Arr.arrEleBottom @ GHC.Prim.Any)
                          s1#_ayx
                   of wild2_ayE { (# s2#_ayK, marr#_ayL #) ->
                   letrec {
                     $sfillFromList_sJ1 :: GHC.Prim.State# s_ayr
                                           -> [GHC.Prim.Any]
                                           -> GHC.Prim.Any
                                           -> GHC.Prim.Int#
                                           -> GHC.Prim.State# s_ayr
                     [Arity 4]
                     $sfillFromList_sJ1 =
                       \ (sc_sIQ :: GHC.Prim.State# s_ayr)
                         (sc1_sIR :: [GHC.Prim.Any])
                         (sc2_sIS :: GHC.Prim.Any)
                         (sc3_sIT :: GHC.Prim.Int#) ->
                         case GHC.Prim.==# sc3_sIT w1_sGS of wild3_ayN {
                           GHC.Bool.False ->
                             case GHC.Prim.writeArray#
                                    @ s_ayr @ GHC.Prim.Any marr#_ayL sc3_sIT sc2_sIS sc_sIQ
                             of s4#_ayX { __DEFAULT ->
                             fillFromList_sHV (GHC.Prim.+# sc3_sIT 1) sc1_sIR s4#_ayX
                             };
                           GHC.Bool.True -> sc_sIQ
                         };
                     fillFromList_sHV :: GHC.Prim.Int#
                                         -> [GHC.Prim.Any]
                                         -> GHC.Prim.State# s_ayr
                                         -> GHC.Prim.State# s_ayr
                     [Arity 3
                      Str: DmdType LLL]
                     fillFromList_sHV =
                       \ (i#_ayH :: GHC.Prim.Int#)
                         (xs_ayI :: [GHC.Prim.Any])
                         (s3#_ayJ :: GHC.Prim.State# s_ayr) ->
                         case GHC.Prim.==# i#_ayH w1_sGS of wild3_ayN {
                           GHC.Bool.False ->
                             case xs_ayI of wild4_ayQ {
                               [] -> s3#_ayJ;
                               : y_ayU ys_ayV ->
                                 case GHC.Prim.writeArray#
                                        @ s_ayr @ GHC.Prim.Any marr#_ayL i#_ayH y_ayU s3#_ayJ
                                 of s4#_ayX { __DEFAULT ->
                                 fillFromList_sHV (GHC.Prim.+# i#_ayH 1) ys_ayV s4#_ayX
                                 }
                             };
                           GHC.Bool.True -> s3#_ayJ
                         }; } in
                   case $sfillFromList_sJ1
                          s2#_ayK
                          (let {
                             y_aDt [ALWAYS Just L] :: GHC.Prim.Int#
                             [Str: DmdType]
                             y_aDt = GHC.Prim.-# ww2_sH4 1 } in
                           case GHC.Prim.># 0 y_aDt of wild_aDu {
                             GHC.Bool.False ->
                               letrec {
                                 go_sHX :: GHC.Prim.Int# -> [GHC.Prim.Any]
                                 [Arity 1
                                  Str: DmdType L]
                                 go_sHX =
                                   \ (x_aDx :: GHC.Prim.Int#) ->
                                     GHC.Types.:
                                       @ GHC.Prim.Any
                                       (case GHC.Prim.indexArray# @ GHC.Prim.Any ww3_sH5 x_aDx
                                        of wild21_aCS { (# e_aCU #) ->
                                        e_aCU
                                        })
                                       (case GHC.Prim.==# x_aDx y_aDt of wild12_aDz {
                                          GHC.Bool.False -> go_sHX (GHC.Prim.+# x_aDx 1);
                                          GHC.Bool.True -> GHC.Types.[] @ GHC.Prim.Any
                                        }); } in
                               go_sHX 0;
                             GHC.Bool.True -> GHC.Types.[] @ GHC.Prim.Any
                           })
                          (w_sGW
                           `cast` (CoUnsafe l_at5 GHC.Prim.Any :: l_at5 ~ GHC.Prim.Any))
                          0
                   of s3#_az0 { __DEFAULT ->
                   case GHC.Prim.unsafeFreezeArray#
                          @ s_ayr @ GHC.Prim.Any marr#_ayL s3#_az0
                   of wild_aDR { (# s2#1_aDT, arr#_aDU #) ->
                   (# s2#1_aDT,
                      GHC.Arr.Array
                        @ GHC.Types.Int
                        @ GHC.Prim.Any
                        wild1_aBz
                        (GHC.Types.I# n_aBF)
                        w1_sGS
                        arr#_aDU #)
                   }
                   }
                   };
                 GHC.Bool.True ->
                   (GHC.Err.error @ GHC.Types.Int lvl_rJA)
                   `cast` (CoUnsafe
                             GHC.Types.Int
                             (# GHC.Prim.State# s_ayr,
                                GHC.Arr.Array GHC.Types.Int GHC.Prim.Any #)
                           :: GHC.Types.Int
                                ~
                              (# GHC.Prim.State# s_ayr,
                                 GHC.Arr.Array GHC.Types.Int GHC.Prim.Any #))
               } } in
         case GHC.Prim.<=# m_aBB n_aBF of wild3_aBH {
           GHC.Bool.False -> $w$j_sI1 0;
           GHC.Bool.True -> $w$j_sI1 (GHC.Prim.+# (GHC.Prim.-# n_aBF m_aBB) 1)
         }
         })

TypeIndexedProduct.a :: forall l_at5 ls_at8.
                        l_at5
                        -> TypeIndexedProduct.TIP ls_at8
                        -> GHC.Arr.Array GHC.Types.Int GHC.Prim.Any
[GlobalId]
[Arity 2
 Worker TypeIndexedProduct.$wa
 Str: DmdType LU(S(L)U(L)LL)]
TypeIndexedProduct.a =
  __inline_me (\ (@ l_at5)
                 (@ ls_at8)
                 (w_sGW :: l_at5)
                 (w1_sGX :: TypeIndexedProduct.TIP ls_at8) ->
                 case w1_sGX
                      `cast` ((TypeIndexedProduct.:CoTIP) ls_at8
                              :: TypeIndexedProduct.TIP ls_at8
                                   ~
                                 GHC.Arr.Array GHC.Types.Int GHC.Prim.Any)
                 of w2_XHi { GHC.Arr.Array ww_sGZ ww1_sH0 ww2_sH4 ww3_sH5 ->
                 case ww1_sH0 of ww4_XHv { GHC.Types.I# ww5_sH2 ->
                 TypeIndexedProduct.$wa
                   @ l_at5 @ ls_at8 w_sGW ww_sGZ ww5_sH2 ww2_sH4 ww3_sH5
                 }
                 })

TypeIndexedProduct.lvl1 :: GHC.Types.Int
[GlobalId]
[NoCafRefs]
TypeIndexedProduct.lvl1 = GHC.Types.I# 0

TypeIndexedProduct.lvl2 :: GHC.Types.Int
[GlobalId]
[NoCafRefs]
TypeIndexedProduct.lvl2 = GHC.Types.I# (-1)

TypeIndexedProduct.lvl3 :: forall s_aEo.
                           GHC.Prim.State# s_aEo
                           -> (# GHC.Prim.State# s_aEo,
                                 GHC.Arr.Array GHC.Types.Int GHC.Prim.Any #)
[GlobalId]
[Arity 1]
TypeIndexedProduct.lvl3 =
  \ (@ s_aEo) (s1#_aEt :: GHC.Prim.State# s_aEo) ->
    case GHC.Prim.newArray#
           @ GHC.Prim.Any
           @ s_aEo
           0
           (GHC.Arr.arrEleBottom @ GHC.Prim.Any)
           s1#_aEt
    of wild2_aEu { (# s2#_aEz, marr#_aEA #) ->
    case GHC.Prim.unsafeFreezeArray#
           @ s_aEo @ GHC.Prim.Any marr#_aEA s2#_aEz
    of wild_aDR { (# s2#1_aDT, arr#_aDU #) ->
    (# s2#1_aDT,
       GHC.Arr.Array
         @ GHC.Types.Int
         @ GHC.Prim.Any
         TypeIndexedProduct.lvl1
         TypeIndexedProduct.lvl2
         0
         arr#_aDU #)
    }
    }

TypeIndexedProduct.a1 :: GHC.Arr.Array GHC.Types.Int GHC.Prim.Any
[GlobalId]
[Str: DmdType]
TypeIndexedProduct.a1 =
  GHC.ST.runSTRep
    @ (GHC.Arr.Array GHC.Types.Int GHC.Prim.Any)
    TypeIndexedProduct.lvl3

lvl4_rJC :: [GHC.Types.Char]
[GlobalId]
[]
lvl4_rJC = GHC.Base.unpackCString# "TypeIndexedProduct.proxyTail"

TypeIndexedProduct.a2 :: forall ls_akC l'_akD.
                         TypeIndexedProduct.Proxy (l'_akD, ls_akC)
                         -> TypeIndexedProduct.Proxy ls_akC
[GlobalId]
[Str: DmdType b]
TypeIndexedProduct.a2 =
  \ (@ ls_akC) (@ l'_akD) ->
    GHC.Err.error
      @ (TypeIndexedProduct.Proxy (l'_akD, ls_akC)
         -> TypeIndexedProduct.Proxy ls_akC)
      lvl4_rJC

TypeIndexedProduct.a3 :: forall l_akK ls_akL.
                         TypeIndexedProduct.Proxy l_akK
                         -> TypeIndexedProduct.Proxy (l_akK, ls_akL)
                         -> GHC.Types.Int
[GlobalId]
[Arity 2
 NoCafRefs
 Str: DmdType AAm]
TypeIndexedProduct.a3 =
  \ (@ l_akK)
    (@ ls_akL)
    (ds_XuS :: TypeIndexedProduct.Proxy l_akK)
    (ds1_XuU :: TypeIndexedProduct.Proxy (l_akK, ls_akL)) ->
    TypeIndexedProduct.lvl1

TypeIndexedProduct.a4 :: forall l_age ls_agf.
                         (TypeIndexedProduct.Member l_age ls_agf) =>
                         TypeIndexedProduct.Member l_age ls_agf
[GlobalId]
[Arity 1
 NoCafRefs
 Str: DmdType S]
TypeIndexedProduct.a4 =
  \ (@ l_age)
    (@ ls_agf)
    (tpl_B1 :: TypeIndexedProduct.Member l_age ls_agf) ->
    tpl_B1

TypeIndexedProduct.<: :: forall l_at5 ls_at8.
                         l_at5
                         -> TypeIndexedProduct.TIP ls_at8
                         -> TypeIndexedProduct.TIP (l_at5, ls_at8)
[GlobalId]
[Arity 2
 Str: DmdType LU(S(L)U(L)LL)]
TypeIndexedProduct.<: =
  TypeIndexedProduct.a
  `cast` (forall l_at5 ls_at8.
          l_at5
          -> TypeIndexedProduct.TIP ls_at8
          -> sym ((TypeIndexedProduct.:CoTIP) (l_at5, ls_at8))
          :: forall l_at5 ls_at8.
             l_at5
             -> TypeIndexedProduct.TIP ls_at8
             -> GHC.Arr.Array GHC.Types.Int GHC.Prim.Any
               ~
             forall l_at5 ls_at8.
             l_at5
             -> TypeIndexedProduct.TIP ls_at8
             -> TypeIndexedProduct.TIP (l_at5, ls_at8))

TypeIndexedProduct.empty :: TypeIndexedProduct.TIP ()
[GlobalId]
[Str: DmdType]
TypeIndexedProduct.empty =
  TypeIndexedProduct.a1
  `cast` (sym ((TypeIndexedProduct.:CoTIP) ())
          :: GHC.Arr.Array GHC.Types.Int GHC.Prim.Any
               ~
             TypeIndexedProduct.TIP ())

TypeIndexedProduct.index :: forall l_age ls_agf.
                            (TypeIndexedProduct.Member l_age ls_agf) =>
                            TypeIndexedProduct.Proxy l_age
                            -> TypeIndexedProduct.Proxy ls_agf
                            -> GHC.Types.Int
[ClassOp]
[Arity 1
 NoCafRefs
 Str: DmdType S]
TypeIndexedProduct.index =
  TypeIndexedProduct.a4
  `cast` (forall l_age ls_agf.
          (TypeIndexedProduct.Member l_age ls_agf) =>
          l_age TypeIndexedProduct.:Co:TMember ls_agf
          :: forall l_age ls_agf.
             (TypeIndexedProduct.Member l_age ls_agf) =>
             l_age TypeIndexedProduct.:TMember ls_agf
               ~
             forall l_age ls_agf.
             (TypeIndexedProduct.Member l_age ls_agf) =>
             TypeIndexedProduct.Proxy l_age
             -> TypeIndexedProduct.Proxy ls_agf
             -> GHC.Types.Int)

TypeIndexedProduct.proxy :: forall l_ags.
                            TypeIndexedProduct.Proxy l_ags
[GlobalId]
[Str: DmdType b]
TypeIndexedProduct.proxy =
  __inline_me (\ (@ l_atm) ->
                 GHC.Err.error
                   @ (TypeIndexedProduct.Proxy l_atm)
                   (GHC.Base.unpackCString# "TypeIndexedProduct.proxy"))

TypeIndexedProduct.get :: forall l_agm ls_agn.
                          (TypeIndexedProduct.Member l_agm ls_agn) =>
                          TypeIndexedProduct.TIP ls_agn -> l_agm
[GlobalId]
[Arity 1
 Str: DmdType L]
TypeIndexedProduct.get =
  __inline_me (\ (@ l_atp)
                 (@ ls_atq)
                 ($dMember_atJ :: TypeIndexedProduct.Member l_atp ls_atq) ->
                 let {
                   i_szY [ALWAYS Just L] :: GHC.Types.Int
                   [Str: DmdType {atJ->S}]
                   i_szY =
                     TypeIndexedProduct.index
                       @ l_atp
                       @ ls_atq
                       $dMember_atJ
                       (TypeIndexedProduct.proxy @ l_atp)
                       (TypeIndexedProduct.proxy @ ls_atq) } in
                 \ (ds_duh :: TypeIndexedProduct.TIP ls_atq) ->
                   GHC.Base.$
                     @ GHC.Prim.Any
                     @ l_atp
                     (Unsafe.Coerce.unsafeCoerce @ GHC.Prim.Any @ l_atp)
                     (GHC.Arr.!
                        @ GHC.Types.Int
                        @ GHC.Prim.Any
                        GHC.Arr.$f14
                        (ds_duh
                         `cast` ((TypeIndexedProduct.:CoTIP) ls_atq
                                 :: TypeIndexedProduct.TIP ls_atq
                                      ~
                                    GHC.Arr.Array GHC.Types.Int GHC.Prim.Any))
                        i_szY))

TypeIndexedProduct.$f2 :: forall l_akK ls_akL.
                          TypeIndexedProduct.Member l_akK (l_akK, ls_akL)
[GlobalId]
[Arity 2
 NoCafRefs
 Str: DmdType AAm]
TypeIndexedProduct.$f2 =
  TypeIndexedProduct.a3
  `cast` (forall l_akK ls_akL.
          sym (l_akK TypeIndexedProduct.:Co:TMember (l_akK, ls_akL))
          :: forall l_akK ls_akL.
             TypeIndexedProduct.Proxy l_akK
             -> TypeIndexedProduct.Proxy (l_akK, ls_akL)
             -> GHC.Types.Int
               ~
             forall l_akK ls_akL.
             l_akK TypeIndexedProduct.:TMember (l_akK, ls_akL))

TypeIndexedProduct.index1 :: forall l_akB ls_akC l'_akD.
                             (TypeIndexedProduct.Member l_akB ls_akC) =>
                             TypeIndexedProduct.Proxy l_akB
                             -> TypeIndexedProduct.Proxy (l'_akD, ls_akC)
                             -> GHC.Types.Int
[GlobalId]
[Arity 3
 Str: DmdType C(C(U(L)))LAm]
TypeIndexedProduct.index1 =
  \ (@ l_akB)
    (@ ls_akC)
    (@ l'_akD)
    ($dMember_atP :: TypeIndexedProduct.Member l_akB ls_akC)
    (l_akG :: TypeIndexedProduct.Proxy l_akB)
    (ls_akI :: TypeIndexedProduct.Proxy (l'_akD, ls_akC)) ->
    case ($dMember_atP
          `cast` (l_akB TypeIndexedProduct.:Co:TMember ls_akC
                  :: l_akB TypeIndexedProduct.:TMember ls_akC
                       ~
                     TypeIndexedProduct.Proxy l_akB
                     -> TypeIndexedProduct.Proxy ls_akC
                     -> GHC.Types.Int))
           l_akG
           ((TypeIndexedProduct.a2 @ ls_akC @ l'_akD)
            `cast` (CoUnsafe
                      (TypeIndexedProduct.Proxy (l'_akD, ls_akC)
                       -> TypeIndexedProduct.Proxy ls_akC)
                      (TypeIndexedProduct.Proxy ls_akC)
                    :: TypeIndexedProduct.Proxy (l'_akD, ls_akC)
                       -> TypeIndexedProduct.Proxy ls_akC
                         ~
                       TypeIndexedProduct.Proxy ls_akC))
    of wild1_aAN { GHC.Types.I# y_aAP ->
    GHC.Types.I# (GHC.Prim.+# 1 y_aAP)
    }

TypeIndexedProduct.$f1 :: forall l_akB ls_akC l'_akD.
                          (TypeIndexedProduct.Member l_akB ls_akC) =>
                          TypeIndexedProduct.Member l_akB (l'_akD, ls_akC)
[GlobalId]
[Arity 3
 Str: DmdType C(C(U(L)))LAm]
TypeIndexedProduct.$f1 =
  __inline_me (TypeIndexedProduct.index1
               `cast` (forall l_akB ls_akC l'_akD.
                       (TypeIndexedProduct.Member l_akB ls_akC) =>
                       sym (l_akB TypeIndexedProduct.:Co:TMember (l'_akD, ls_akC))
                       :: forall l_akB ls_akC l'_akD.
                          (TypeIndexedProduct.Member l_akB ls_akC) =>
                          TypeIndexedProduct.Proxy l_akB
                          -> TypeIndexedProduct.Proxy (l'_akD, ls_akC)
                          -> GHC.Types.Int
                            ~
                          forall l_akB ls_akC l'_akD.
                          (TypeIndexedProduct.Member l_akB ls_akC) =>
                          l_akB TypeIndexedProduct.:TMember (l'_akD, ls_akC)))




==================== Tidy Core Rules ====================


