singletons-base-3.5: tests/compile-and-dump/Singletons/T555.golden
Singletons/T555.hs:(0,0)-(0,0): Splicing declarations
singletons
[d| data MyPropKind
= Location | Quaternion
deriving (Eq, Ord, Show) |]
======>
data MyPropKind
= Location | Quaternion
deriving (Eq, Ord, Show)
type LocationSym0 :: MyPropKind
type family LocationSym0 :: MyPropKind where
LocationSym0 = Location
type QuaternionSym0 :: MyPropKind
type family QuaternionSym0 :: MyPropKind where
QuaternionSym0 = Quaternion
type TFHelper_0123456789876543210 :: MyPropKind
-> MyPropKind -> Bool
type family TFHelper_0123456789876543210 (a :: MyPropKind) (a :: MyPropKind) :: Bool where
TFHelper_0123456789876543210 Location Location = TrueSym0
TFHelper_0123456789876543210 Location Quaternion = FalseSym0
TFHelper_0123456789876543210 Quaternion Location = FalseSym0
TFHelper_0123456789876543210 Quaternion Quaternion = TrueSym0
instance PEq MyPropKind where
type (==) a a = TFHelper_0123456789876543210 a a
type Compare_0123456789876543210 :: MyPropKind
-> MyPropKind -> Ordering
type family Compare_0123456789876543210 (a :: MyPropKind) (a :: MyPropKind) :: Ordering where
Compare_0123456789876543210 Location Location = Apply (Apply (Apply FoldlSym0 (<>@#@$)) EQSym0) NilSym0
Compare_0123456789876543210 Quaternion Quaternion = Apply (Apply (Apply FoldlSym0 (<>@#@$)) EQSym0) NilSym0
Compare_0123456789876543210 Location Quaternion = LTSym0
Compare_0123456789876543210 Quaternion Location = GTSym0
instance POrd MyPropKind where
type Compare a a = Compare_0123456789876543210 a a
type ShowsPrec_0123456789876543210 :: GHC.Num.Natural.Natural
-> MyPropKind -> Symbol -> Symbol
type family ShowsPrec_0123456789876543210 (a :: GHC.Num.Natural.Natural) (a :: MyPropKind) (a :: Symbol) :: Symbol where
ShowsPrec_0123456789876543210 _ Location a_0123456789876543210 = Apply (Apply ShowStringSym0 "Location") a_0123456789876543210
ShowsPrec_0123456789876543210 _ Quaternion a_0123456789876543210 = Apply (Apply ShowStringSym0 "Quaternion") a_0123456789876543210
instance PShow MyPropKind where
type ShowsPrec a a a = ShowsPrec_0123456789876543210 a a a
data SMyPropKind :: MyPropKind -> Type
where
SLocation :: SMyPropKind (Location :: MyPropKind)
SQuaternion :: SMyPropKind (Quaternion :: MyPropKind)
type instance Sing @MyPropKind = SMyPropKind
instance SingKind MyPropKind where
type Demote MyPropKind = MyPropKind
fromSing SLocation = Location
fromSing SQuaternion = Quaternion
toSing Location = SomeSing SLocation
toSing Quaternion = SomeSing SQuaternion
instance SEq MyPropKind where
(%==) SLocation SLocation = STrue
(%==) SLocation SQuaternion = SFalse
(%==) SQuaternion SLocation = SFalse
(%==) SQuaternion SQuaternion = STrue
instance SOrd MyPropKind where
sCompare SLocation SLocation
= applySing
(applySing
(applySing (singFun3 @FoldlSym0 sFoldl) (singFun2 @(<>@#@$) (%<>)))
SEQ)
SNil
sCompare SQuaternion SQuaternion
= applySing
(applySing
(applySing (singFun3 @FoldlSym0 sFoldl) (singFun2 @(<>@#@$) (%<>)))
SEQ)
SNil
sCompare SLocation SQuaternion = SLT
sCompare SQuaternion SLocation = SGT
instance SShow MyPropKind where
sShowsPrec
_
SLocation
(sA_0123456789876543210 :: Sing a_0123456789876543210)
= applySing
(applySing
(singFun2 @ShowStringSym0 sShowString) (sing :: Sing "Location"))
sA_0123456789876543210
sShowsPrec
_
SQuaternion
(sA_0123456789876543210 :: Sing a_0123456789876543210)
= applySing
(applySing
(singFun2 @ShowStringSym0 sShowString) (sing :: Sing "Quaternion"))
sA_0123456789876543210
instance SDecide MyPropKind where
(%~) SLocation SLocation = Proved Refl
(%~) SLocation SQuaternion = Disproved (\case)
(%~) SQuaternion SLocation = Disproved (\case)
(%~) SQuaternion SQuaternion = Proved Refl
instance Eq (SMyPropKind (z :: MyPropKind)) where
(==) _ _ = True
instance GHC.Internal.Data.Type.Equality.TestEquality (SMyPropKind :: MyPropKind
-> Type) where
GHC.Internal.Data.Type.Equality.testEquality
= Data.Singletons.Decide.decideEquality
instance GHC.Internal.Data.Type.Coercion.TestCoercion (SMyPropKind :: MyPropKind
-> Type) where
GHC.Internal.Data.Type.Coercion.testCoercion
= Data.Singletons.Decide.decideCoercion
instance Ord (SMyPropKind (z :: MyPropKind)) where
compare _ _ = EQ
deriving instance Show (SMyPropKind (z :: MyPropKind))
instance SingI Location where
sing = SLocation
instance SingI Quaternion where
sing = SQuaternion