singletons-base-3.5: tests/compile-and-dump/Singletons/T582.golden
Singletons/T582.hs:(0,0)-(0,0): Splicing declarations
singletons
[d| infixl 4 type !!!
infixl 4 data %%%
infixl 4 type `Bar`
infixl 4 data `foo`
foo :: a -> a -> a
x `foo` _ = x
(%%%) :: a -> a -> a
x %%% _ = x
type Bar :: a -> a -> a
type (!!!) :: a -> a -> a
type x `Bar` y = x
type x !!! y = x |]
======>
infixl 4 data `foo`
foo :: a -> a -> a
foo x _ = x
infixl 4 type `Bar`
type Bar :: a -> a -> a
type Bar x y = x
infixl 4 data %%%
(%%%) :: a -> a -> a
(%%%) x _ = x
infixl 4 type !!!
type (!!!) :: a -> a -> a
type (!!!) x y = x
type BarSym0 :: (~>) a ((~>) a a)
data BarSym0 :: (~>) a ((~>) a a)
where
BarSym0KindInference :: SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
BarSym0 a0123456789876543210
type instance Apply @a @((~>) a a) BarSym0 a0123456789876543210 = BarSym1 a0123456789876543210
instance SuppressUnusedWarnings BarSym0 where
suppressUnusedWarnings = snd ((,) BarSym0KindInference ())
infixl 4 type `BarSym0`
type BarSym1 :: a -> (~>) a a
data BarSym1 (a0123456789876543210 :: a) :: (~>) a a
where
BarSym1KindInference :: SameKind (Apply (BarSym1 a0123456789876543210) arg) (BarSym2 a0123456789876543210 arg) =>
BarSym1 a0123456789876543210 a0123456789876543210
type instance Apply @a @a (BarSym1 a0123456789876543210) a0123456789876543210 = Bar a0123456789876543210 a0123456789876543210
instance SuppressUnusedWarnings (BarSym1 a0123456789876543210) where
suppressUnusedWarnings = snd ((,) BarSym1KindInference ())
infixl 4 type `BarSym1`
type BarSym2 :: a -> a -> a
type family BarSym2 @a (a0123456789876543210 :: a) (a0123456789876543210 :: a) :: a where
BarSym2 a0123456789876543210 a0123456789876543210 = Bar a0123456789876543210 a0123456789876543210
infixl 4 type `BarSym2`
type (!!!@#@$) :: (~>) a ((~>) a a)
data (!!!@#@$) :: (~>) a ((~>) a a)
where
(:!!!@#@$###) :: SameKind (Apply (!!!@#@$) arg) ((!!!@#@$$) arg) =>
(!!!@#@$) a0123456789876543210
type instance Apply @a @((~>) a a) (!!!@#@$) a0123456789876543210 = (!!!@#@$$) a0123456789876543210
instance SuppressUnusedWarnings (!!!@#@$) where
suppressUnusedWarnings = snd ((,) (:!!!@#@$###) ())
infixl 4 type !!!@#@$
type (!!!@#@$$) :: a -> (~>) a a
data (!!!@#@$$) (a0123456789876543210 :: a) :: (~>) a a
where
(:!!!@#@$$###) :: SameKind (Apply ((!!!@#@$$) a0123456789876543210) arg) ((!!!@#@$$$) a0123456789876543210 arg) =>
(!!!@#@$$) a0123456789876543210 a0123456789876543210
type instance Apply @a @a ((!!!@#@$$) a0123456789876543210) a0123456789876543210 = (!!!) a0123456789876543210 a0123456789876543210
instance SuppressUnusedWarnings ((!!!@#@$$) a0123456789876543210) where
suppressUnusedWarnings = snd ((,) (:!!!@#@$$###) ())
infixl 4 type !!!@#@$$
type (!!!@#@$$$) :: a -> a -> a
type family (!!!@#@$$$) @a (a0123456789876543210 :: a) (a0123456789876543210 :: a) :: a where
(!!!@#@$$$) a0123456789876543210 a0123456789876543210 = (!!!) a0123456789876543210 a0123456789876543210
infixl 4 type !!!@#@$$$
type (%%%@#@$) :: (~>) a ((~>) a a)
data (%%%@#@$) :: (~>) a ((~>) a a)
where
(:%%%@#@$###) :: SameKind (Apply (%%%@#@$) arg) ((%%%@#@$$) arg) =>
(%%%@#@$) a0123456789876543210
type instance Apply @a @((~>) a a) (%%%@#@$) a0123456789876543210 = (%%%@#@$$) a0123456789876543210
instance SuppressUnusedWarnings (%%%@#@$) where
suppressUnusedWarnings = snd ((,) (:%%%@#@$###) ())
infixl 4 type %%%@#@$
type (%%%@#@$$) :: a -> (~>) a a
data (%%%@#@$$) (a0123456789876543210 :: a) :: (~>) a a
where
(:%%%@#@$$###) :: SameKind (Apply ((%%%@#@$$) a0123456789876543210) arg) ((%%%@#@$$$) a0123456789876543210 arg) =>
(%%%@#@$$) a0123456789876543210 a0123456789876543210
type instance Apply @a @a ((%%%@#@$$) a0123456789876543210) a0123456789876543210 = (%%%) a0123456789876543210 a0123456789876543210
instance SuppressUnusedWarnings ((%%%@#@$$) a0123456789876543210) where
suppressUnusedWarnings = snd ((,) (:%%%@#@$$###) ())
infixl 4 type %%%@#@$$
type (%%%@#@$$$) :: a -> a -> a
type family (%%%@#@$$$) @a (a0123456789876543210 :: a) (a0123456789876543210 :: a) :: a where
(%%%@#@$$$) a0123456789876543210 a0123456789876543210 = (%%%) a0123456789876543210 a0123456789876543210
infixl 4 type %%%@#@$$$
type FooSym0 :: (~>) a ((~>) a a)
data FooSym0 :: (~>) a ((~>) a a)
where
FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
FooSym0 a0123456789876543210
type instance Apply @a @((~>) a a) FooSym0 a0123456789876543210 = FooSym1 a0123456789876543210
instance SuppressUnusedWarnings FooSym0 where
suppressUnusedWarnings = snd ((,) FooSym0KindInference ())
infixl 4 type `FooSym0`
type FooSym1 :: a -> (~>) a a
data FooSym1 (a0123456789876543210 :: a) :: (~>) a a
where
FooSym1KindInference :: SameKind (Apply (FooSym1 a0123456789876543210) arg) (FooSym2 a0123456789876543210 arg) =>
FooSym1 a0123456789876543210 a0123456789876543210
type instance Apply @a @a (FooSym1 a0123456789876543210) a0123456789876543210 = Foo a0123456789876543210 a0123456789876543210
instance SuppressUnusedWarnings (FooSym1 a0123456789876543210) where
suppressUnusedWarnings = snd ((,) FooSym1KindInference ())
infixl 4 type `FooSym1`
type FooSym2 :: a -> a -> a
type family FooSym2 @a (a0123456789876543210 :: a) (a0123456789876543210 :: a) :: a where
FooSym2 a0123456789876543210 a0123456789876543210 = Foo a0123456789876543210 a0123456789876543210
infixl 4 type `FooSym2`
type (%%%) :: a -> a -> a
type family (%%%) @a (a :: a) (a :: a) :: a where
(%%%) x _ = x
type Foo :: a -> a -> a
type family Foo @a (a :: a) (a :: a) :: a where
Foo x _ = x
infixl 4 type %%%
infixl 4 type `Foo`
infixl 4 data %%%%
infixl 4 data `sFoo`
(%%%%) ::
(forall (t :: a) (t :: a).
Sing t -> Sing t -> Sing ((%%%) t t :: a) :: Type)
sFoo ::
(forall (t :: a) (t :: a).
Sing t -> Sing t -> Sing (Foo t t :: a) :: Type)
(%%%%) (sX :: Sing x) _ = sX
sFoo (sX :: Sing x) _ = sX
instance SingI ((%%%@#@$) :: (~>) a ((~>) a a)) where
sing = singFun2 @(%%%@#@$) (%%%%)
instance SingI d => SingI ((%%%@#@$$) (d :: a) :: (~>) a a) where
sing = singFun1 @((%%%@#@$$) (d :: a)) ((%%%%) (sing @d))
instance SingI1 ((%%%@#@$$) :: a -> (~>) a a) where
liftSing (s :: Sing (d :: a))
= singFun1 @((%%%@#@$$) (d :: a)) ((%%%%) s)
instance SingI (FooSym0 :: (~>) a ((~>) a a)) where
sing = singFun2 @FooSym0 sFoo
instance SingI d => SingI (FooSym1 (d :: a) :: (~>) a a) where
sing = singFun1 @(FooSym1 (d :: a)) (sFoo (sing @d))
instance SingI1 (FooSym1 :: a -> (~>) a a) where
liftSing (s :: Sing (d :: a))
= singFun1 @(FooSym1 (d :: a)) (sFoo s)