singletons-0.10.0: tests/compile-and-dump/Promote/PatternMatching.ghc78.template
Promote/PatternMatching.hs:0:0: Splicing declarations
promote
[d| pr = Pair (Succ Zero) ([Zero])
complex = Pair (Pair (Just Zero) Zero) False
tuple = (False, Just Zero, True)
aList = [Zero, Succ Zero, Succ (Succ Zero)]
data Pair a b
= Pair a b
deriving (Show) |]
======>
Promote/PatternMatching.hs:(0,0)-(0,0)
data Pair a b
= Pair a b
deriving (Show)
pr = Pair (Succ Zero) [Zero]
complex = Pair (Pair (Just Zero) Zero) False
tuple = (False, Just Zero, True)
aList = [Zero, Succ Zero, Succ (Succ Zero)]
type Pr = Pair (Succ Zero) '[Zero]
type Complex = Pair (Pair (Just Zero) Zero) False
type Tuple = '(False, Just Zero, True)
type AList = '[Zero, Succ Zero, Succ (Succ Zero)]
Promote/PatternMatching.hs:0:0: Splicing declarations
promote
[d| Pair sz lz = pr
Pair (Pair jz zz) fls = complex
(tf, tjz, tt) = tuple
[_, lsz, (Succ blimy)] = aList |]
======>
Promote/PatternMatching.hs:(0,0)-(0,0)
Pair sz lz = pr
Pair (Pair jz zz) fls = complex
(tf, tjz, tt) = tuple
[_, lsz, Succ blimy] = aList
type Sz = Extract_0123456789 Pr
type Lz = Extract_0123456789 Pr
type family Extract_0123456789 (a :: Pair a b) :: a
type family Extract_0123456789 (a :: Pair a b) :: b
type instance Extract_0123456789 (Pair a a) = a
type instance Extract_0123456789 (Pair a a) = a
type Jz = Extract_0123456789 (Extract_0123456789 Complex)
type Zz = Extract_0123456789 (Extract_0123456789 Complex)
type Fls = Extract_0123456789 Complex
type family Extract_0123456789 (a :: Pair a b) :: a
type family Extract_0123456789 (a :: Pair a b) :: b
type instance Extract_0123456789 (Pair a a) = a
type instance Extract_0123456789 (Pair a a) = a
type family Extract_0123456789 (a :: Pair a b) :: a
type family Extract_0123456789 (a :: Pair a b) :: b
type instance Extract_0123456789 (Pair a a) = a
type instance Extract_0123456789 (Pair a a) = a
type Tf = Extract_0123456789 Tuple
type Tjz = Extract_0123456789 Tuple
type Tt = Extract_0123456789 Tuple
type family Extract_0123456789 (a :: GHC.Tuple.(,,) a b c) :: a
type family Extract_0123456789 (a :: GHC.Tuple.(,,) a b c) :: b
type family Extract_0123456789 (a :: GHC.Tuple.(,,) a b c) :: c
type instance Extract_0123456789 (GHC.Tuple.(,,) a a a) = a
type instance Extract_0123456789 (GHC.Tuple.(,,) a a a) = a
type instance Extract_0123456789 (GHC.Tuple.(,,) a a a) = a
type Lsz = Head (Tail AList)
type Blimy = Extract_0123456789 (Head (Tail (Tail AList)))
type family Extract_0123456789 (a :: Nat) :: Nat
type instance Extract_0123456789 (Succ a) = a