singletons-2.3: tests/compile-and-dump/Singletons/Error.ghc82.template
Singletons/Error.hs:(0,0)-(0,0): Splicing declarations
singletons
[d| head :: [a] -> a
head (a : _) = a
head [] = error "Data.Singletons.List.head: empty list" |]
======>
head :: [a] -> a
head (a GHC.Types.: _) = a
head GHC.Types.[] = error "Data.Singletons.List.head: empty list"
type HeadSym1 (t :: [a0123456789876543210]) = Head t
instance SuppressUnusedWarnings HeadSym0 where
suppressUnusedWarnings _
= snd ((GHC.Tuple.(,) HeadSym0KindInference) GHC.Tuple.())
data HeadSym0 (l :: TyFun [a0123456789876543210] a0123456789876543210)
= forall arg. SameKind (Apply HeadSym0 arg) (HeadSym1 arg) =>
HeadSym0KindInference
type instance Apply HeadSym0 l = Head l
type family Head (a :: [a]) :: a where
Head ((:) a _z_0123456789876543210) = a
Head '[] = Apply ErrorSym0 "Data.Singletons.List.head: empty list"
sHead :: forall (t :: [a]). Sing t -> Sing (Apply HeadSym0 t :: a)
sHead (SCons (sA :: Sing a) _) = sA
sHead SNil
= sError (sing :: Sing "Data.Singletons.List.head: empty list")