packages feed

singletons-2.5: tests/compile-and-dump/Singletons/T312.ghc86.template

Singletons/T312.hs:(0,0)-(0,0): Splicing declarations
    singletons
      [d| class Foo a where
            bar :: a -> b -> b
            bar _ x = x
            baz :: forall b. a -> b -> b
            baz
              = h
              where
                  h :: forall c. c -> b -> b
                  h _ x = x |]
  ======>
    class Foo a where
      bar :: a -> b -> b
      baz :: forall b. a -> b -> b
      bar _ x = x
      baz
        = h
        where
            h :: forall c. c -> b -> b
            h _ x = x
    type BarSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: b0123456789876543210) =
        Bar arg0123456789876543210 arg0123456789876543210
    instance SuppressUnusedWarnings (BarSym1 arg0123456789876543210) where
      suppressUnusedWarnings = snd (((,) BarSym1KindInference) ())
    data BarSym1 (arg0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
                                                                     (~>) b0123456789876543210 b0123456789876543210
      where
        BarSym1KindInference :: forall arg0123456789876543210
                                       arg0123456789876543210
                                       arg. SameKind (Apply (BarSym1 arg0123456789876543210) arg) (BarSym2 arg0123456789876543210 arg) =>
                                BarSym1 arg0123456789876543210 arg0123456789876543210
    type instance Apply (BarSym1 arg0123456789876543210) arg0123456789876543210 = Bar arg0123456789876543210 arg0123456789876543210
    instance SuppressUnusedWarnings BarSym0 where
      suppressUnusedWarnings = snd (((,) BarSym0KindInference) ())
    data BarSym0 :: forall a0123456789876543210 b0123456789876543210.
                    (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
      where
        BarSym0KindInference :: forall arg0123456789876543210
                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
                                BarSym0 arg0123456789876543210
    type instance Apply BarSym0 arg0123456789876543210 = BarSym1 arg0123456789876543210
    type BazSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: b0123456789876543210) =
        Baz arg0123456789876543210 arg0123456789876543210
    instance SuppressUnusedWarnings (BazSym1 arg0123456789876543210) where
      suppressUnusedWarnings = snd (((,) BazSym1KindInference) ())
    data BazSym1 (arg0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
                                                                     (~>) b0123456789876543210 b0123456789876543210
      where
        BazSym1KindInference :: forall arg0123456789876543210
                                       arg0123456789876543210
                                       arg. SameKind (Apply (BazSym1 arg0123456789876543210) arg) (BazSym2 arg0123456789876543210 arg) =>
                                BazSym1 arg0123456789876543210 arg0123456789876543210
    type instance Apply (BazSym1 arg0123456789876543210) arg0123456789876543210 = Baz arg0123456789876543210 arg0123456789876543210
    instance SuppressUnusedWarnings BazSym0 where
      suppressUnusedWarnings = snd (((,) BazSym0KindInference) ())
    data BazSym0 :: forall a0123456789876543210 b0123456789876543210.
                    (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
      where
        BazSym0KindInference :: forall arg0123456789876543210
                                       arg. SameKind (Apply BazSym0 arg) (BazSym1 arg) =>
                                BazSym0 arg0123456789876543210
    type instance Apply BazSym0 arg0123456789876543210 = BazSym1 arg0123456789876543210
    type family Bar_0123456789876543210 (a :: a) (a :: b) :: b where
      Bar_0123456789876543210 _ x = x
    type Bar_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
        Bar_0123456789876543210 a0123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings (Bar_0123456789876543210Sym1 a0123456789876543210) where
      suppressUnusedWarnings
        = snd (((,) Bar_0123456789876543210Sym1KindInference) ())
    data Bar_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
                                                                                       (~>) b0123456789876543210 b0123456789876543210
      where
        Bar_0123456789876543210Sym1KindInference :: forall a0123456789876543210
                                                           a0123456789876543210
                                                           arg. SameKind (Apply (Bar_0123456789876543210Sym1 a0123456789876543210) arg) (Bar_0123456789876543210Sym2 a0123456789876543210 arg) =>
                                                    Bar_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
    type instance Apply (Bar_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Bar_0123456789876543210 a0123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings Bar_0123456789876543210Sym0 where
      suppressUnusedWarnings
        = snd (((,) Bar_0123456789876543210Sym0KindInference) ())
    data Bar_0123456789876543210Sym0 :: forall a0123456789876543210
                                               b0123456789876543210.
                                        (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
      where
        Bar_0123456789876543210Sym0KindInference :: forall a0123456789876543210
                                                           arg. SameKind (Apply Bar_0123456789876543210Sym0 arg) (Bar_0123456789876543210Sym1 arg) =>
                                                    Bar_0123456789876543210Sym0 a0123456789876543210
    type instance Apply Bar_0123456789876543210Sym0 a0123456789876543210 = Bar_0123456789876543210Sym1 a0123456789876543210
    type Let0123456789876543210HSym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 (a0123456789876543210 :: c0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
        Let0123456789876543210H a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings (Let0123456789876543210HSym3 a0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where
      suppressUnusedWarnings
        = snd (((,) Let0123456789876543210HSym3KindInference) ())
    data Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 (a0123456789876543210 :: c0123456789876543210) :: forall b0123456789876543210.
                                                                                                                                                                         (~>) b0123456789876543210 b0123456789876543210
      where
        Let0123456789876543210HSym3KindInference :: forall a_01234567898765432100123456789876543210
                                                           a_01234567898765432100123456789876543210
                                                           a0123456789876543210
                                                           a0123456789876543210
                                                           arg. SameKind (Apply (Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210) arg) (Let0123456789876543210HSym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210 arg) =>
                                                    Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210 a0123456789876543210
    type instance Apply (Let0123456789876543210HSym3 a0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a0123456789876543210 = Let0123456789876543210H a0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where
      suppressUnusedWarnings
        = snd (((,) Let0123456789876543210HSym2KindInference) ())
    data Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 :: forall b0123456789876543210
                                                                                                                                 c0123456789876543210.
                                                                                                                          (~>) c0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
      where
        Let0123456789876543210HSym2KindInference :: forall a_01234567898765432100123456789876543210
                                                           a_01234567898765432100123456789876543210
                                                           a0123456789876543210
                                                           arg. SameKind (Apply (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
                                                    Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210
    type instance Apply (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a0123456789876543210 = Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings (Let0123456789876543210HSym1 a_01234567898765432100123456789876543210) where
      suppressUnusedWarnings
        = snd (((,) Let0123456789876543210HSym1KindInference) ())
    data Let0123456789876543210HSym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
      where
        Let0123456789876543210HSym1KindInference :: forall a_01234567898765432100123456789876543210
                                                           a_01234567898765432100123456789876543210
                                                           arg. SameKind (Apply (Let0123456789876543210HSym1 a_01234567898765432100123456789876543210) arg) (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 arg) =>
                                                    Let0123456789876543210HSym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
    type instance Apply (Let0123456789876543210HSym1 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
    instance SuppressUnusedWarnings Let0123456789876543210HSym0 where
      suppressUnusedWarnings
        = snd (((,) Let0123456789876543210HSym0KindInference) ())
    data Let0123456789876543210HSym0 a_01234567898765432100123456789876543210
      where
        Let0123456789876543210HSym0KindInference :: forall a_01234567898765432100123456789876543210
                                                           arg. SameKind (Apply Let0123456789876543210HSym0 arg) (Let0123456789876543210HSym1 arg) =>
                                                    Let0123456789876543210HSym0 a_01234567898765432100123456789876543210
    type instance Apply Let0123456789876543210HSym0 a_01234567898765432100123456789876543210 = Let0123456789876543210HSym1 a_01234567898765432100123456789876543210
    type family Let0123456789876543210H a_0123456789876543210 a_0123456789876543210 (a :: c) (a :: b) :: b where
      Let0123456789876543210H a_0123456789876543210 a_0123456789876543210 _ x = x
    type family Baz_0123456789876543210 (a :: a) (a :: b) :: b where
      Baz_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply (Let0123456789876543210HSym2 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210) a_0123456789876543210
    type Baz_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
        Baz_0123456789876543210 a0123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings (Baz_0123456789876543210Sym1 a0123456789876543210) where
      suppressUnusedWarnings
        = snd (((,) Baz_0123456789876543210Sym1KindInference) ())
    data Baz_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
                                                                                       (~>) b0123456789876543210 b0123456789876543210
      where
        Baz_0123456789876543210Sym1KindInference :: forall a0123456789876543210
                                                           a0123456789876543210
                                                           arg. SameKind (Apply (Baz_0123456789876543210Sym1 a0123456789876543210) arg) (Baz_0123456789876543210Sym2 a0123456789876543210 arg) =>
                                                    Baz_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
    type instance Apply (Baz_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Baz_0123456789876543210 a0123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings Baz_0123456789876543210Sym0 where
      suppressUnusedWarnings
        = snd (((,) Baz_0123456789876543210Sym0KindInference) ())
    data Baz_0123456789876543210Sym0 :: forall a0123456789876543210
                                               b0123456789876543210.
                                        (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
      where
        Baz_0123456789876543210Sym0KindInference :: forall a0123456789876543210
                                                           arg. SameKind (Apply Baz_0123456789876543210Sym0 arg) (Baz_0123456789876543210Sym1 arg) =>
                                                    Baz_0123456789876543210Sym0 a0123456789876543210
    type instance Apply Baz_0123456789876543210Sym0 a0123456789876543210 = Baz_0123456789876543210Sym1 a0123456789876543210
    class PFoo (a :: GHC.Types.Type) where
      type Bar (arg :: a) (arg :: b) :: b
      type Baz (arg :: a) (arg :: b) :: b
      type Bar a a = Apply (Apply Bar_0123456789876543210Sym0 a) a
      type Baz a a = Apply (Apply Baz_0123456789876543210Sym0 a) a
    class SFoo a where
      sBar ::
        forall b (t :: a) (t :: b).
        Sing t -> Sing t -> Sing (Apply (Apply BarSym0 t) t :: b)
      sBaz ::
        forall b (t :: a) (t :: b).
        Sing t -> Sing t -> Sing (Apply (Apply BazSym0 t) t :: b)
      default sBar ::
                forall b (t :: a) (t :: b).
                (Apply (Apply BarSym0 t) t :: b)
                ~ Apply (Apply Bar_0123456789876543210Sym0 t) t =>
                Sing t -> Sing t -> Sing (Apply (Apply BarSym0 t) t :: b)
      default sBaz ::
                forall b (t :: a) (t :: b).
                (Apply (Apply BazSym0 t) t :: b)
                ~ Apply (Apply Baz_0123456789876543210Sym0 t) t =>
                Sing t -> Sing t -> Sing (Apply (Apply BazSym0 t) t :: b)
      sBar _ (sX :: Sing x) = sX
      sBaz
        (sA_0123456789876543210 :: Sing a_0123456789876543210)
        (sA_0123456789876543210 :: Sing a_0123456789876543210)
        = (applySing
             ((applySing
                 (let
                    sH ::
                      forall c (t :: c) (t :: b).
                      Sing t
                      -> Sing t
                         -> Sing (Apply (Apply (Let0123456789876543210HSym2 a_0123456789876543210 a_0123456789876543210) t) t :: b)
                    sH _ (sX :: Sing x) = sX
                  in
                    (singFun2
                       @(Let0123456789876543210HSym2 a_0123456789876543210 a_0123456789876543210))
                      sH))
                sA_0123456789876543210))
            sA_0123456789876543210
    instance SFoo a => SingI (BarSym0 :: (~>) a ((~>) b b)) where
      sing = (singFun2 @BarSym0) sBar
    instance (SFoo a, SingI d) =>
             SingI (BarSym1 (d :: a) :: (~>) b b) where
      sing = (singFun1 @(BarSym1 (d :: a))) (sBar (sing @d))
    instance SFoo a => SingI (BazSym0 :: (~>) a ((~>) b b)) where
      sing = (singFun2 @BazSym0) sBaz
    instance (SFoo a, SingI d) =>
             SingI (BazSym1 (d :: a) :: (~>) b b) where
      sing = (singFun1 @(BazSym1 (d :: a))) (sBaz (sing @d))