singletons-base-3.4: tests/compile-and-dump/Singletons/T166.golden
Singletons/T166.hs:(0,0)-(0,0): Splicing declarations
singletonsOnly
[d| class Foo a where
foosPrec :: Natural -> a -> [Bool] -> [Bool]
foo :: a -> [Bool]
foo x s = foosPrec 0 x s |]
======>
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 FooSym0 :: forall a. (~>) a [Bool]
data FooSym0 :: (~>) a [Bool]
where
FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
FooSym0 a0123456789876543210
type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
instance SuppressUnusedWarnings FooSym0 where
suppressUnusedWarnings = snd ((,) FooSym0KindInference ())
type FooSym1 :: forall a. a -> [Bool]
type family FooSym1 @a (a0123456789876543210 :: a) :: [Bool] where
FooSym1 a0123456789876543210 = Foo a0123456789876543210
type family Lambda_0123456789876543210 x0123456789876543210 s where
Lambda_0123456789876543210 x s = Apply (Apply (Apply FoosPrecSym0 (FromInteger 0)) x) s
data Lambda_0123456789876543210Sym0 x0123456789876543210
where
Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
Lambda_0123456789876543210Sym0 x0123456789876543210
type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
suppressUnusedWarnings
= snd ((,) Lambda_0123456789876543210Sym0KindInference ())
data Lambda_0123456789876543210Sym1 x0123456789876543210 s0123456789876543210
where
Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
Lambda_0123456789876543210Sym1 x0123456789876543210 s0123456789876543210
type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) s0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 s0123456789876543210
instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
suppressUnusedWarnings
= snd ((,) Lambda_0123456789876543210Sym1KindInference ())
type family Lambda_0123456789876543210Sym2 x0123456789876543210 s0123456789876543210 where
Lambda_0123456789876543210Sym2 x0123456789876543210 s0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 s0123456789876543210
type Foo_0123456789876543210 :: a -> [Bool]
type family Foo_0123456789876543210 @a (a :: a) :: [Bool] where
Foo_0123456789876543210 x = Apply Lambda_0123456789876543210Sym0 x
type Foo_0123456789876543210Sym0 :: (~>) a [Bool]
data Foo_0123456789876543210Sym0 :: (~>) a [Bool]
where
Foo_0123456789876543210Sym0KindInference :: SameKind (Apply Foo_0123456789876543210Sym0 arg) (Foo_0123456789876543210Sym1 arg) =>
Foo_0123456789876543210Sym0 a0123456789876543210
type instance Apply Foo_0123456789876543210Sym0 a0123456789876543210 = Foo_0123456789876543210 a0123456789876543210
instance SuppressUnusedWarnings Foo_0123456789876543210Sym0 where
suppressUnusedWarnings
= snd ((,) Foo_0123456789876543210Sym0KindInference ())
type Foo_0123456789876543210Sym1 :: a -> [Bool]
type family Foo_0123456789876543210Sym1 @a (a0123456789876543210 :: a) :: [Bool] where
Foo_0123456789876543210Sym1 a0123456789876543210 = Foo_0123456789876543210 a0123456789876543210
class PFoo a where
type family FoosPrec (arg :: Natural) (arg :: a) (arg :: [Bool]) :: [Bool]
type family Foo (arg :: a) :: [Bool]
type Foo a = Apply Foo_0123456789876543210Sym0 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)
sFoo ::
(forall (t :: a).
Sing t -> Sing (Apply FooSym0 t :: [Bool]) :: Type)
default sFoo ::
(forall (t :: a).
((Apply FooSym0 t :: [Bool])
~ Apply Foo_0123456789876543210Sym0 t) =>
Sing t -> Sing (Apply FooSym0 t :: [Bool]) :: Type)
sFoo (sX :: Sing x)
= singFun1
@(Apply Lambda_0123456789876543210Sym0 x)
(\ sS
-> case sS of
(_ :: Sing s)
-> applySing
(applySing
(applySing
(singFun3 @FoosPrecSym0 sFoosPrec) (sFromInteger (sing :: Sing 0)))
sX)
sS)
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 (FooSym0 :: (~>) a [Bool]) where
sing = singFun1 @FooSym0 sFoo
Singletons/T166.hs:0:0: error: [GHC-83865]
• Expecting one more argument to ‘Apply Lambda_0123456789876543210Sym0 x’
Expected kind ‘[Bool]’,
but ‘Apply Lambda_0123456789876543210Sym0 x’ has kind ‘TyFun
[Bool] [Bool]
-> Type’
• In the type ‘Apply Lambda_0123456789876543210Sym0 x’
In the type family declaration for ‘Foo_0123456789876543210’
|
6 | $(singletonsOnly [d|
| ^^^^^^^^^^^^^^^^^^^...