singletons-base-3.4: 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 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 (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 (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 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 (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 :: a -> [Bool] -> [Bool]
type family FooList_0123456789876543210 @a (a :: a) (a :: [Bool]) :: [Bool] where
FooList_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply UndefinedSym0 a_0123456789876543210) a_0123456789876543210
type FooList_0123456789876543210Sym0 :: (~>) a ((~>) [Bool] [Bool])
data FooList_0123456789876543210Sym0 :: (~>) a ((~>) [Bool] [Bool])
where
FooList_0123456789876543210Sym0KindInference :: SameKind (Apply FooList_0123456789876543210Sym0 arg) (FooList_0123456789876543210Sym1 arg) =>
FooList_0123456789876543210Sym0 a0123456789876543210
type instance Apply FooList_0123456789876543210Sym0 a0123456789876543210 = FooList_0123456789876543210Sym1 a0123456789876543210
instance SuppressUnusedWarnings FooList_0123456789876543210Sym0 where
suppressUnusedWarnings
= snd ((,) FooList_0123456789876543210Sym0KindInference ())
type FooList_0123456789876543210Sym1 :: a -> (~>) [Bool] [Bool]
data FooList_0123456789876543210Sym1 (a0123456789876543210 :: a) :: (~>) [Bool] [Bool]
where
FooList_0123456789876543210Sym1KindInference :: SameKind (Apply (FooList_0123456789876543210Sym1 a0123456789876543210) arg) (FooList_0123456789876543210Sym2 a0123456789876543210 arg) =>
FooList_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
type instance Apply (FooList_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = FooList_0123456789876543210 a0123456789876543210 a0123456789876543210
instance SuppressUnusedWarnings (FooList_0123456789876543210Sym1 a0123456789876543210) where
suppressUnusedWarnings
= snd ((,) FooList_0123456789876543210Sym1KindInference ())
type FooList_0123456789876543210Sym2 :: a -> [Bool] -> [Bool]
type family FooList_0123456789876543210Sym2 @a (a0123456789876543210 :: a) (a0123456789876543210 :: [Bool]) :: [Bool] where
FooList_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 = FooList_0123456789876543210 a0123456789876543210 a0123456789876543210
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 = Apply (Apply FooList_0123456789876543210Sym0 a) a
type FoosPrec_0123456789876543210 :: Natural
-> [a] -> [Bool] -> [Bool]
type family FoosPrec_0123456789876543210 @a (a :: Natural) (a :: [a]) (a :: [Bool]) :: [Bool] where
FoosPrec_0123456789876543210 _ a_0123456789876543210 a_0123456789876543210 = Apply (Apply FooListSym0 a_0123456789876543210) a_0123456789876543210
type FoosPrec_0123456789876543210Sym0 :: (~>) Natural ((~>) [a] ((~>) [Bool] [Bool]))
data FoosPrec_0123456789876543210Sym0 :: (~>) Natural ((~>) [a] ((~>) [Bool] [Bool]))
where
FoosPrec_0123456789876543210Sym0KindInference :: SameKind (Apply FoosPrec_0123456789876543210Sym0 arg) (FoosPrec_0123456789876543210Sym1 arg) =>
FoosPrec_0123456789876543210Sym0 a0123456789876543210
type instance Apply FoosPrec_0123456789876543210Sym0 a0123456789876543210 = FoosPrec_0123456789876543210Sym1 a0123456789876543210
instance SuppressUnusedWarnings FoosPrec_0123456789876543210Sym0 where
suppressUnusedWarnings
= snd ((,) FoosPrec_0123456789876543210Sym0KindInference ())
type FoosPrec_0123456789876543210Sym1 :: Natural
-> (~>) [a] ((~>) [Bool] [Bool])
data FoosPrec_0123456789876543210Sym1 (a0123456789876543210 :: Natural) :: (~>) [a] ((~>) [Bool] [Bool])
where
FoosPrec_0123456789876543210Sym1KindInference :: SameKind (Apply (FoosPrec_0123456789876543210Sym1 a0123456789876543210) arg) (FoosPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
FoosPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
type instance Apply (FoosPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
instance SuppressUnusedWarnings (FoosPrec_0123456789876543210Sym1 a0123456789876543210) where
suppressUnusedWarnings
= snd ((,) FoosPrec_0123456789876543210Sym1KindInference ())
type FoosPrec_0123456789876543210Sym2 :: Natural
-> [a] -> (~>) [Bool] [Bool]
data FoosPrec_0123456789876543210Sym2 (a0123456789876543210 :: Natural) (a0123456789876543210 :: [a]) :: (~>) [Bool] [Bool]
where
FoosPrec_0123456789876543210Sym2KindInference :: SameKind (Apply (FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (FoosPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
type instance Apply (FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = FoosPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
instance SuppressUnusedWarnings (FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
suppressUnusedWarnings
= snd ((,) FoosPrec_0123456789876543210Sym2KindInference ())
type FoosPrec_0123456789876543210Sym3 :: Natural
-> [a] -> [Bool] -> [Bool]
type family FoosPrec_0123456789876543210Sym3 @a (a0123456789876543210 :: Natural) (a0123456789876543210 :: [a]) (a0123456789876543210 :: [Bool]) :: [Bool] where
FoosPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 = FoosPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
instance PFoo [a] where
type FoosPrec a a a = Apply (Apply (Apply FoosPrec_0123456789876543210Sym0 a) a) a
class SFoo a where
sFoosPrec ::
(forall (t :: Natural) (t :: a) (t :: [Bool]).
Sing t
-> Sing t
-> Sing t
-> Sing (Apply (Apply (Apply FoosPrecSym0 t) t) t :: [Bool]) :: Type)
sFooList ::
(forall (t :: a) (t :: [Bool]).
Sing t
-> Sing t
-> Sing (Apply (Apply FooListSym0 t) t :: [Bool]) :: Type)
default sFooList ::
(forall (t :: a) (t :: [Bool]).
((Apply (Apply FooListSym0 t) t :: [Bool])
~ Apply (Apply FooList_0123456789876543210Sym0 t) t) =>
Sing t
-> Sing t
-> Sing (Apply (Apply FooListSym0 t) t :: [Bool]) :: Type)
sFooList
(sA_0123456789876543210 :: Sing a_0123456789876543210)
(sA_0123456789876543210 :: Sing a_0123456789876543210)
= sUndefined sA_0123456789876543210 sA_0123456789876543210
instance SFoo a => SFoo [a] where
sFoosPrec ::
(forall (t :: Natural) (t :: [a]) (t :: [Bool]).
Sing t
-> Sing t
-> Sing t
-> Sing (Apply (Apply (Apply FoosPrecSym0 t) t) t :: [Bool]) :: Type)
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)