singletons-2.7: tests/compile-and-dump/Singletons/T287.golden
Singletons/T287.hs:(0,0)-(0,0): Splicing declarations
singletons
[d| class S a where
(<<>>) :: a -> a -> a
instance S b => S (a -> b) where
f <<>> g = \ x -> f x <<>> g x |]
======>
class S a where
(<<>>) :: a -> a -> a
instance S b => S (a -> b) where
(<<>>) f g = \ x -> (f x <<>> g x)
type (<<>>@#@$) :: forall a. (~>) a ((~>) a a)
data (<<>>@#@$) a0123456789876543210
where
(:<<>>@#@$###) :: SameKind (Apply (<<>>@#@$) arg) ((<<>>@#@$$) arg) =>
(<<>>@#@$) a0123456789876543210
type instance Apply (<<>>@#@$) a0123456789876543210 = (<<>>@#@$$) a0123456789876543210
instance SuppressUnusedWarnings (<<>>@#@$) where
suppressUnusedWarnings = snd (((,) (:<<>>@#@$###)) ())
type (<<>>@#@$$) :: forall a. a -> (~>) a a
data (<<>>@#@$$) a0123456789876543210 a0123456789876543210
where
(:<<>>@#@$$###) :: SameKind (Apply ((<<>>@#@$$) a0123456789876543210) arg) ((<<>>@#@$$$) a0123456789876543210 arg) =>
(<<>>@#@$$) a0123456789876543210 a0123456789876543210
type instance Apply ((<<>>@#@$$) a0123456789876543210) a0123456789876543210 = (<<>>@#@$$$) a0123456789876543210 a0123456789876543210
instance SuppressUnusedWarnings ((<<>>@#@$$) a0123456789876543210) where
suppressUnusedWarnings = snd (((,) (:<<>>@#@$$###)) ())
type (<<>>@#@$$$) (a0123456789876543210 :: a) (a0123456789876543210 :: a) =
(<<>>) a0123456789876543210 a0123456789876543210 :: a
class PS a where
type (<<>>) (arg :: a) (arg :: a) :: a
type family Lambda_0123456789876543210 f g x where
Lambda_0123456789876543210 f g x = Apply (Apply (<<>>@#@$) (Apply f x)) (Apply g x)
data Lambda_0123456789876543210Sym0 f0123456789876543210
where
Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
Lambda_0123456789876543210Sym0 f0123456789876543210
type instance Apply Lambda_0123456789876543210Sym0 f0123456789876543210 = Lambda_0123456789876543210Sym1 f0123456789876543210
instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
suppressUnusedWarnings
= snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
data Lambda_0123456789876543210Sym1 f0123456789876543210 g0123456789876543210
where
Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 f0123456789876543210) arg) (Lambda_0123456789876543210Sym2 f0123456789876543210 arg) =>
Lambda_0123456789876543210Sym1 f0123456789876543210 g0123456789876543210
type instance Apply (Lambda_0123456789876543210Sym1 f0123456789876543210) g0123456789876543210 = Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210
instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 f0123456789876543210) where
suppressUnusedWarnings
= snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
data Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210 x0123456789876543210
where
Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210) arg) (Lambda_0123456789876543210Sym3 f0123456789876543210 g0123456789876543210 arg) =>
Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210 x0123456789876543210
type instance Apply (Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym3 f0123456789876543210 g0123456789876543210 x0123456789876543210
instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210) where
suppressUnusedWarnings
= snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
type Lambda_0123456789876543210Sym3 f0123456789876543210 g0123456789876543210 x0123456789876543210 =
Lambda_0123456789876543210 f0123456789876543210 g0123456789876543210 x0123456789876543210
type TFHelper_0123456789876543210 :: (~>) a b
-> (~>) a b -> (~>) a b
type family TFHelper_0123456789876543210 a a where
TFHelper_0123456789876543210 f g = Apply (Apply Lambda_0123456789876543210Sym0 f) g
type TFHelper_0123456789876543210Sym0 :: (~>) ((~>) a b) ((~>) ((~>) a b) ((~>) a b))
data TFHelper_0123456789876543210Sym0 a0123456789876543210
where
TFHelper_0123456789876543210Sym0KindInference :: SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) =>
TFHelper_0123456789876543210Sym0 a0123456789876543210
type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210
instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where
suppressUnusedWarnings
= snd (((,) TFHelper_0123456789876543210Sym0KindInference) ())
type TFHelper_0123456789876543210Sym1 :: (~>) a b
-> (~>) ((~>) a b) ((~>) a b)
data TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
where
TFHelper_0123456789876543210Sym1KindInference :: SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) =>
TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where
suppressUnusedWarnings
= snd (((,) TFHelper_0123456789876543210Sym1KindInference) ())
type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a b) (a0123456789876543210 :: (~>) a b) =
TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210 :: (~>) a b
instance PS ((~>) a b) where
type (<<>>) a a = Apply (Apply TFHelper_0123456789876543210Sym0 a) a
class SS a where
(%<<>>) ::
forall (t :: a) (t :: a).
Sing t -> Sing t -> Sing (Apply (Apply (<<>>@#@$) t) t :: a)
instance SS b => SS ((~>) a b) where
(%<<>>) ::
forall (t :: (~>) a b) (t :: (~>) a b).
Sing t -> Sing t -> Sing (Apply (Apply (<<>>@#@$) t) t :: (~>) a b)
(%<<>>) (sF :: Sing f) (sG :: Sing g)
= (singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 f) g))
(\ sX
-> case sX of {
(_ :: Sing x)
-> (applySing
((applySing ((singFun2 @(<<>>@#@$)) (%<<>>))) ((applySing sF) sX)))
((applySing sG) sX) })
instance SS a => SingI ((<<>>@#@$) :: (~>) a ((~>) a a)) where
sing = (singFun2 @(<<>>@#@$)) (%<<>>)
instance (SS a, SingI d) =>
SingI ((<<>>@#@$$) (d :: a) :: (~>) a a) where
sing = (singFun1 @((<<>>@#@$$) (d :: a))) ((%<<>>) (sing @d))