packages feed

singletons-base-3.5: tests/compile-and-dump/Singletons/T167.golden

Singletons/T167.hs:(0,0)-(0,0): Splicing declarations
    singletonsOnly
      [d| class Foo a where
            foosPrec :: Natural -> a -> DiffList
            fooList :: a -> DiffList
            fooList = undefined
          
          instance Foo a => Foo [a] where
            foosPrec _ = fooList |]
  ======>
    type FoosPrecSym0 :: forall a. (~>) Natural ((~>) a ((~>) [Bool] [Bool]))
    data FoosPrecSym0 :: (~>) Natural ((~>) a ((~>) [Bool] [Bool]))
      where
        FoosPrecSym0KindInference :: SameKind (Apply FoosPrecSym0 arg) (FoosPrecSym1 arg) =>
                                     FoosPrecSym0 a0123456789876543210
    type instance Apply @Natural @((~>) a ((~>) [Bool] [Bool])) FoosPrecSym0 a0123456789876543210 = FoosPrecSym1 a0123456789876543210
    instance SuppressUnusedWarnings FoosPrecSym0 where
      suppressUnusedWarnings = snd ((,) FoosPrecSym0KindInference ())
    type FoosPrecSym1 :: forall a. Natural
                                   -> (~>) a ((~>) [Bool] [Bool])
    data FoosPrecSym1 (a0123456789876543210 :: Natural) :: (~>) a ((~>) [Bool] [Bool])
      where
        FoosPrecSym1KindInference :: SameKind (Apply (FoosPrecSym1 a0123456789876543210) arg) (FoosPrecSym2 a0123456789876543210 arg) =>
                                     FoosPrecSym1 a0123456789876543210 a0123456789876543210
    type instance Apply @a @((~>) [Bool] [Bool]) (FoosPrecSym1 a0123456789876543210) a0123456789876543210 = FoosPrecSym2 a0123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings (FoosPrecSym1 a0123456789876543210) where
      suppressUnusedWarnings = snd ((,) FoosPrecSym1KindInference ())
    type FoosPrecSym2 :: forall a. Natural -> a -> (~>) [Bool] [Bool]
    data FoosPrecSym2 (a0123456789876543210 :: Natural) (a0123456789876543210 :: a) :: (~>) [Bool] [Bool]
      where
        FoosPrecSym2KindInference :: SameKind (Apply (FoosPrecSym2 a0123456789876543210 a0123456789876543210) arg) (FoosPrecSym3 a0123456789876543210 a0123456789876543210 arg) =>
                                     FoosPrecSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
    type instance Apply @[Bool] @[Bool] (FoosPrecSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = FoosPrec a0123456789876543210 a0123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings (FoosPrecSym2 a0123456789876543210 a0123456789876543210) where
      suppressUnusedWarnings = snd ((,) FoosPrecSym2KindInference ())
    type FoosPrecSym3 :: forall a. Natural -> a -> [Bool] -> [Bool]
    type family FoosPrecSym3 @a (a0123456789876543210 :: Natural) (a0123456789876543210 :: a) (a0123456789876543210 :: [Bool]) :: [Bool] where
      FoosPrecSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 = FoosPrec a0123456789876543210 a0123456789876543210 a0123456789876543210
    type FooListSym0 :: forall a. (~>) a ((~>) [Bool] [Bool])
    data FooListSym0 :: (~>) a ((~>) [Bool] [Bool])
      where
        FooListSym0KindInference :: SameKind (Apply FooListSym0 arg) (FooListSym1 arg) =>
                                    FooListSym0 a0123456789876543210
    type instance Apply @a @((~>) [Bool] [Bool]) FooListSym0 a0123456789876543210 = FooListSym1 a0123456789876543210
    instance SuppressUnusedWarnings FooListSym0 where
      suppressUnusedWarnings = snd ((,) FooListSym0KindInference ())
    type FooListSym1 :: forall a. a -> (~>) [Bool] [Bool]
    data FooListSym1 (a0123456789876543210 :: a) :: (~>) [Bool] [Bool]
      where
        FooListSym1KindInference :: SameKind (Apply (FooListSym1 a0123456789876543210) arg) (FooListSym2 a0123456789876543210 arg) =>
                                    FooListSym1 a0123456789876543210 a0123456789876543210
    type instance Apply @[Bool] @[Bool] (FooListSym1 a0123456789876543210) a0123456789876543210 = FooList a0123456789876543210 a0123456789876543210
    instance SuppressUnusedWarnings (FooListSym1 a0123456789876543210) where
      suppressUnusedWarnings = snd ((,) FooListSym1KindInference ())
    type FooListSym2 :: forall a. a -> [Bool] -> [Bool]
    type family FooListSym2 @a (a0123456789876543210 :: a) (a0123456789876543210 :: [Bool]) :: [Bool] where
      FooListSym2 a0123456789876543210 a0123456789876543210 = FooList a0123456789876543210 a0123456789876543210
    type FooList_0123456789876543210 :: forall a. a -> [Bool] -> [Bool]
    type family FooList_0123456789876543210 @a (a :: a) (a :: [Bool]) :: [Bool] where
      FooList_0123456789876543210 @a (a_0123456789876543210 :: a) (a_0123456789876543210 :: [Bool]) = Apply (Apply UndefinedSym0 a_0123456789876543210) a_0123456789876543210
    class PFoo a where
      type family FoosPrec (arg :: Natural) (arg :: a) (arg :: [Bool]) :: [Bool]
      type family FooList (arg :: a) (arg :: [Bool]) :: [Bool]
      type FooList a a = FooList_0123456789876543210 a a
    type FoosPrec_0123456789876543210 :: forall a. Natural
                                                   -> [a] -> [Bool] -> [Bool]
    type family FoosPrec_0123456789876543210 @a (a :: Natural) (a :: [a]) (a :: [Bool]) :: [Bool] where
      FoosPrec_0123456789876543210 @a (_ :: Natural) (a_0123456789876543210 :: [a]) (a_0123456789876543210 :: [Bool]) = Apply (Apply FooListSym0 a_0123456789876543210) a_0123456789876543210
    instance PFoo [a] where
      type FoosPrec a a a = FoosPrec_0123456789876543210 a a a
    class SFoo a where
      sFoosPrec ::
        (forall (t :: Natural) (t :: a) (t :: [Bool]).
         Sing t
         -> Sing t -> Sing t -> Sing (FoosPrec t t t :: [Bool]) :: Type)
      sFooList ::
        (forall (t :: a) (t :: [Bool]).
         Sing t -> Sing t -> Sing (FooList t t :: [Bool]) :: Type)
      default sFooList ::
                (forall (t :: a) (t :: [Bool]).
                 ((FooList t t :: [Bool]) ~ FooList_0123456789876543210 t t) =>
                 Sing t -> Sing t -> Sing (FooList t t :: [Bool]) :: Type)
      sFooList
        (sA_0123456789876543210 :: Sing a_0123456789876543210)
        (sA_0123456789876543210 :: Sing a_0123456789876543210)
        = applySing
            (applySing sUndefined sA_0123456789876543210)
            sA_0123456789876543210
    instance SFoo a => SFoo [a] where
      sFoosPrec
        _
        (sA_0123456789876543210 :: Sing a_0123456789876543210)
        (sA_0123456789876543210 :: Sing a_0123456789876543210)
        = applySing
            (applySing (singFun2 @FooListSym0 sFooList) sA_0123456789876543210)
            sA_0123456789876543210
    instance SFoo a =>
             SingI (FoosPrecSym0 :: (~>) Natural ((~>) a ((~>) [Bool] [Bool]))) where
      sing = singFun3 @FoosPrecSym0 sFoosPrec
    instance (SFoo a, SingI d) =>
             SingI (FoosPrecSym1 (d :: Natural) :: (~>) a ((~>) [Bool] [Bool])) where
      sing
        = singFun2 @(FoosPrecSym1 (d :: Natural)) (sFoosPrec (sing @d))
    instance SFoo a =>
             SingI1 (FoosPrecSym1 :: Natural
                                     -> (~>) a ((~>) [Bool] [Bool])) where
      liftSing (s :: Sing (d :: Natural))
        = singFun2 @(FoosPrecSym1 (d :: Natural)) (sFoosPrec s)
    instance (SFoo a, SingI d, SingI d) =>
             SingI (FoosPrecSym2 (d :: Natural) (d :: a) :: (~>) [Bool] [Bool]) where
      sing
        = singFun1
            @(FoosPrecSym2 (d :: Natural) (d :: a))
            (sFoosPrec (sing @d) (sing @d))
    instance (SFoo a, SingI d) =>
             SingI1 (FoosPrecSym2 (d :: Natural) :: a
                                                    -> (~>) [Bool] [Bool]) where
      liftSing (s :: Sing (d :: a))
        = singFun1
            @(FoosPrecSym2 (d :: Natural) (d :: a)) (sFoosPrec (sing @d) s)
    instance SFoo a =>
             SingI2 (FoosPrecSym2 :: Natural -> a -> (~>) [Bool] [Bool]) where
      liftSing2 (s :: Sing (d :: Natural)) (s :: Sing (d :: a))
        = singFun1 @(FoosPrecSym2 (d :: Natural) (d :: a)) (sFoosPrec s s)
    instance SFoo a =>
             SingI (FooListSym0 :: (~>) a ((~>) [Bool] [Bool])) where
      sing = singFun2 @FooListSym0 sFooList
    instance (SFoo a, SingI d) =>
             SingI (FooListSym1 (d :: a) :: (~>) [Bool] [Bool]) where
      sing = singFun1 @(FooListSym1 (d :: a)) (sFooList (sing @d))
    instance SFoo a =>
             SingI1 (FooListSym1 :: a -> (~>) [Bool] [Bool]) where
      liftSing (s :: Sing (d :: a))
        = singFun1 @(FooListSym1 (d :: a)) (sFooList s)