singletons-base-3.5: tests/compile-and-dump/Singletons/T445.golden
Singletons/T445.hs:0:0:: Splicing declarations
genDefunSymbols [''Lit]
======>
type LitSym0 :: (~>) Natural Nat
data LitSym0 :: (~>) Natural Nat
where
LitSym0KindInference :: SameKind (Apply LitSym0 arg) (LitSym1 arg) =>
LitSym0 a0123456789876543210
type instance Apply @Natural @Nat LitSym0 a0123456789876543210 = Lit a0123456789876543210
instance SuppressUnusedWarnings LitSym0 where
suppressUnusedWarnings = snd ((,) LitSym0KindInference ())
type LitSym1 :: Natural -> Nat
type family LitSym1 (a0123456789876543210 :: Natural) :: Nat where
LitSym1 a0123456789876543210 = Lit a0123456789876543210
Singletons/T445.hs:(0,0)-(0,0): Splicing declarations
promoteOnly
[d| evenb :: Nat -> Bool
evenb Zero = True
evenb (Succ Zero) = False
evenb (Succ (Succ n)) = evenb n
filterEvenGt7 :: [Nat] -> [Nat]
filterEvenGt7 = filter (\ x -> evenb x && x > lit 7) |]
======>
type family LamCases_0123456789876543210 (a_01234567898765432100123456789876543210 :: [Nat]) a_0123456789876543210 where
LamCases_0123456789876543210 a_0123456789876543210 x = Apply (Apply (&&@#@$) (Apply EvenbSym0 x)) (Apply (Apply (>@#@$) x) (Apply LitSym0 (FromInteger 7)))
data LamCases_0123456789876543210Sym0 (a_01234567898765432100123456789876543210 :: [Nat]) a_01234567898765432100123456789876543210
where
LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 arg) =>
LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
type instance Apply @_ @_ (LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210) where
suppressUnusedWarnings
= snd ((,) LamCases_0123456789876543210Sym0KindInference ())
type family LamCases_0123456789876543210Sym1 (a_01234567898765432100123456789876543210 :: [Nat]) a_01234567898765432100123456789876543210 where
LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
type FilterEvenGt7Sym0 :: (~>) [Nat] [Nat]
data FilterEvenGt7Sym0 :: (~>) [Nat] [Nat]
where
FilterEvenGt7Sym0KindInference :: SameKind (Apply FilterEvenGt7Sym0 arg) (FilterEvenGt7Sym1 arg) =>
FilterEvenGt7Sym0 a0123456789876543210
type instance Apply @[Nat] @[Nat] FilterEvenGt7Sym0 a0123456789876543210 = FilterEvenGt7 a0123456789876543210
instance SuppressUnusedWarnings FilterEvenGt7Sym0 where
suppressUnusedWarnings
= snd ((,) FilterEvenGt7Sym0KindInference ())
type FilterEvenGt7Sym1 :: [Nat] -> [Nat]
type family FilterEvenGt7Sym1 (a0123456789876543210 :: [Nat]) :: [Nat] where
FilterEvenGt7Sym1 a0123456789876543210 = FilterEvenGt7 a0123456789876543210
type EvenbSym0 :: (~>) Nat Bool
data EvenbSym0 :: (~>) Nat Bool
where
EvenbSym0KindInference :: SameKind (Apply EvenbSym0 arg) (EvenbSym1 arg) =>
EvenbSym0 a0123456789876543210
type instance Apply @Nat @Bool EvenbSym0 a0123456789876543210 = Evenb a0123456789876543210
instance SuppressUnusedWarnings EvenbSym0 where
suppressUnusedWarnings = snd ((,) EvenbSym0KindInference ())
type EvenbSym1 :: Nat -> Bool
type family EvenbSym1 (a0123456789876543210 :: Nat) :: Bool where
EvenbSym1 a0123456789876543210 = Evenb a0123456789876543210
type FilterEvenGt7 :: [Nat] -> [Nat]
type family FilterEvenGt7 (a :: [Nat]) :: [Nat] where
FilterEvenGt7 a_0123456789876543210 = Apply (Apply FilterSym0 (LamCases_0123456789876543210Sym0 a_0123456789876543210)) a_0123456789876543210
type Evenb :: Nat -> Bool
type family Evenb (a :: Nat) :: Bool where
Evenb 'Zero = TrueSym0
Evenb ('Succ 'Zero) = FalseSym0
Evenb ('Succ ('Succ n)) = Apply EvenbSym0 n