diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index f7cdc09b..8de70fc2 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -215,7 +215,7 @@ jobs: source-repository-package type: git location: https://github.com/goldfirere/th-desugar - tag: ae6c075edb50175a99b35f0bdcf475b695a5ee78 + tag: a3a73a28e7bbfb808c75473dc4909a2963fdf590 EOF $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|Cabal-syntax|singletons|singletons-base|singletons-th)$/; }' >> cabal.project.local cat cabal.project diff --git a/cabal.project b/cabal.project index 17fe96cf..c3e2848d 100644 --- a/cabal.project +++ b/cabal.project @@ -5,4 +5,4 @@ packages: ./singletons source-repository-package type: git location: https://github.com/goldfirere/th-desugar - tag: ae6c075edb50175a99b35f0bdcf475b695a5ee78 + tag: a3a73a28e7bbfb808c75473dc4909a2963fdf590 diff --git a/singletons-base/singletons-base.cabal b/singletons-base/singletons-base.cabal index 44182f16..5455d4e9 100644 --- a/singletons-base/singletons-base.cabal +++ b/singletons-base/singletons-base.cabal @@ -78,7 +78,7 @@ library singletons-th >= 3.4 && < 3.5, template-haskell >= 2.22 && < 2.23, text >= 1.2, - th-desugar >= 1.17 && < 1.18 + th-desugar >= 1.18 && < 1.19 default-language: GHC2021 other-extensions: TemplateHaskell exposed-modules: Data.Singletons.Base.CustomStar diff --git a/singletons-base/tests/compile-and-dump/GradingClient/Database.golden b/singletons-base/tests/compile-and-dump/GradingClient/Database.golden index adedd4fb..86a8b820 100644 --- a/singletons-base/tests/compile-and-dump/GradingClient/Database.golden +++ b/singletons-base/tests/compile-and-dump/GradingClient/Database.golden @@ -90,7 +90,8 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations fromSing (SSucc b) = Succ (fromSing b) toSing Zero = SomeSing SZero toSing (Succ (b :: Demote Nat)) - = case toSing b :: SomeSing Nat of SomeSing c -> SomeSing (SSucc c) + = (\cases (SomeSing c) -> SomeSing (SSucc c)) + (toSing b :: SomeSing Nat) instance SEq Nat => SEq Nat where (%==) SZero SZero = STrue (%==) SZero (SSucc _) = SFalse @@ -126,13 +127,13 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations sCompare (SSucc _) SZero = SGT instance SDecide Nat => SDecide Nat where (%~) SZero SZero = Proved Refl - (%~) SZero (SSucc _) = Disproved (\ x -> case x of {}) - (%~) (SSucc _) SZero = Disproved (\ x -> case x of {}) + (%~) SZero (SSucc _) = Disproved (\case) + (%~) (SSucc _) SZero = Disproved (\case) (%~) (SSucc a) (SSucc b) - = case (%~) a b of - Proved Refl -> Proved Refl - Disproved contra - -> Disproved (\ refl -> case refl of Refl -> contra Refl) + = (\cases + (Proved Refl) -> Proved Refl + (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) instance Eq (SNat (z :: Nat)) where (==) _ _ = True instance SDecide Nat => @@ -395,13 +396,19 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations type SchSym1 :: [Attribute] -> Schema type family SchSym1 (a0123456789876543210 :: [Attribute]) :: Schema where SchSym1 a0123456789876543210 = Sch a0123456789876543210 - type family Let0123456789876543210Scrutinee_0123456789876543210Sym0 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210Sym0 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 - type family Let0123456789876543210Scrutinee_0123456789876543210 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210 name name' u attrs = Apply (Apply (==@#@$) name) name' - type family Case_0123456789876543210 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 t where - Case_0123456789876543210 name name' u attrs 'True = u - Case_0123456789876543210 name name' u attrs 'False = Apply (Apply LookupSym0 name) (Apply SchSym0 attrs) + type family LamCases_0123456789876543210 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 name name' u attrs 'True = u + LamCases_0123456789876543210 name name' u attrs 'False = Apply (Apply LookupSym0 name) (Apply SchSym0 attrs) + data LamCases_0123456789876543210Sym0 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210) arg) (LamCases_0123456789876543210Sym1 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 a_01234567898765432100123456789876543210 type LookupSym0 :: (~>) [AChar] ((~>) Schema U) data LookupSym0 :: (~>) [AChar] ((~>) Schema U) where @@ -500,7 +507,7 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations type Lookup :: [AChar] -> Schema -> U type family Lookup (a :: [AChar]) (a :: Schema) :: U where Lookup _ (Sch '[]) = UndefinedSym0 - Lookup name (Sch ('(:) (Attr name' u) attrs)) = Case_0123456789876543210 name name' u attrs (Let0123456789876543210Scrutinee_0123456789876543210Sym0 name name' u attrs) + Lookup name (Sch ('(:) (Attr name' u) attrs)) = Apply (LamCases_0123456789876543210Sym0 name name' u attrs) (Apply (Apply (==@#@$) name) name') type Occurs :: [AChar] -> Schema -> Bool type family Occurs (a :: [AChar]) (a :: Schema) :: Bool where Occurs _ (Sch '[]) = FalseSym0 @@ -1390,20 +1397,16 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations (sName :: Sing name) (SSch (SCons (SAttr (sName' :: Sing name') (sU :: Sing u)) (sAttrs :: Sing attrs))) - = let - sScrutinee_0123456789876543210 :: - Sing @_ (Let0123456789876543210Scrutinee_0123456789876543210Sym0 name name' u attrs) - sScrutinee_0123456789876543210 - = applySing (applySing (singFun2 @(==@#@$) (%==)) sName) sName' - in - GHC.Internal.Base.id - @(Sing (Case_0123456789876543210 name name' u attrs (Let0123456789876543210Scrutinee_0123456789876543210Sym0 name name' u attrs))) - (case sScrutinee_0123456789876543210 of - STrue -> sU - SFalse - -> applySing - (applySing (singFun2 @LookupSym0 sLookup) sName) - (applySing (singFun1 @SchSym0 SSch) sAttrs)) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 name name' u attrs) + (\cases + STrue -> sU + SFalse + -> applySing + (applySing (singFun2 @LookupSym0 sLookup) sName) + (applySing (singFun1 @SchSym0 SSch) sAttrs))) + (applySing (applySing (singFun2 @(==@#@$) (%==)) sName) sName') sOccurs _ (SSch SNil) = SFalse sOccurs (sName :: Sing name) @@ -1506,8 +1509,8 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations toSing STRING = SomeSing SSTRING toSing NAT = SomeSing SNAT toSing (VEC (b :: Demote U) (b :: Demote Nat)) - = case (,) (toSing b :: SomeSing U) (toSing b :: SomeSing Nat) of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SVEC c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SVEC c c)) + (toSing b :: SomeSing U) (toSing b :: SomeSing Nat) data SAChar :: AChar -> Type where SCA :: SAChar (CA :: AChar) @@ -1600,10 +1603,8 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations type Demote Attribute = Attribute fromSing (SAttr b b) = Attr (fromSing b) (fromSing b) toSing (Attr (b :: Demote [AChar]) (b :: Demote U)) - = case - (,) (toSing b :: SomeSing [AChar]) (toSing b :: SomeSing U) - of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SAttr c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SAttr c c)) + (toSing b :: SomeSing [AChar]) (toSing b :: SomeSing U) data SSchema :: Schema -> Type where SSch :: forall (n :: [Attribute]). @@ -1613,8 +1614,8 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations type Demote Schema = Schema fromSing (SSch b) = Sch (fromSing b) toSing (Sch (b :: Demote [Attribute])) - = case toSing b :: SomeSing [Attribute] of - SomeSing c -> SomeSing (SSch c) + = (\cases (SomeSing c) -> SomeSing (SSch c)) + (toSing b :: SomeSing [Attribute]) instance (SEq U, SEq Nat) => SEq U where (%==) SBOOL SBOOL = STrue (%==) SBOOL SSTRING = SFalse @@ -2592,27 +2593,26 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations (%==) SCZ SCZ = STrue instance (SDecide U, SDecide Nat) => SDecide U where (%~) SBOOL SBOOL = Proved Refl - (%~) SBOOL SSTRING = Disproved (\ x -> case x of {}) - (%~) SBOOL SNAT = Disproved (\ x -> case x of {}) - (%~) SBOOL (SVEC _ _) = Disproved (\ x -> case x of {}) - (%~) SSTRING SBOOL = Disproved (\ x -> case x of {}) + (%~) SBOOL SSTRING = Disproved (\case) + (%~) SBOOL SNAT = Disproved (\case) + (%~) SBOOL (SVEC _ _) = Disproved (\case) + (%~) SSTRING SBOOL = Disproved (\case) (%~) SSTRING SSTRING = Proved Refl - (%~) SSTRING SNAT = Disproved (\ x -> case x of {}) - (%~) SSTRING (SVEC _ _) = Disproved (\ x -> case x of {}) - (%~) SNAT SBOOL = Disproved (\ x -> case x of {}) - (%~) SNAT SSTRING = Disproved (\ x -> case x of {}) + (%~) SSTRING SNAT = Disproved (\case) + (%~) SSTRING (SVEC _ _) = Disproved (\case) + (%~) SNAT SBOOL = Disproved (\case) + (%~) SNAT SSTRING = Disproved (\case) (%~) SNAT SNAT = Proved Refl - (%~) SNAT (SVEC _ _) = Disproved (\ x -> case x of {}) - (%~) (SVEC _ _) SBOOL = Disproved (\ x -> case x of {}) - (%~) (SVEC _ _) SSTRING = Disproved (\ x -> case x of {}) - (%~) (SVEC _ _) SNAT = Disproved (\ x -> case x of {}) + (%~) SNAT (SVEC _ _) = Disproved (\case) + (%~) (SVEC _ _) SBOOL = Disproved (\case) + (%~) (SVEC _ _) SSTRING = Disproved (\case) + (%~) (SVEC _ _) SNAT = Disproved (\case) (%~) (SVEC a a) (SVEC b b) - = case (,) ((%~) a b) ((%~) a b) of - (,) (Proved Refl) (Proved Refl) -> Proved Refl - (,) (Disproved contra) _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,) _ (Disproved contra) - -> Disproved (\ refl -> case refl of Refl -> contra Refl) + = (\cases + (Proved Refl) (Proved Refl) -> Proved Refl + (Disproved contra) _ -> Disproved (\cases Refl -> contra Refl) + _ (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) ((%~) a b) instance Eq (SU (z :: U)) where (==) _ _ = True instance (SDecide U, SDecide Nat) => @@ -2627,680 +2627,680 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations = Data.Singletons.Decide.decideCoercion instance SDecide AChar where (%~) SCA SCA = Proved Refl - (%~) SCA SCB = Disproved (\ x -> case x of {}) - (%~) SCA SCC = Disproved (\ x -> case x of {}) - (%~) SCA SCD = Disproved (\ x -> case x of {}) - (%~) SCA SCE = Disproved (\ x -> case x of {}) - (%~) SCA SCF = Disproved (\ x -> case x of {}) - (%~) SCA SCG = Disproved (\ x -> case x of {}) - (%~) SCA SCH = Disproved (\ x -> case x of {}) - (%~) SCA SCI = Disproved (\ x -> case x of {}) - (%~) SCA SCJ = Disproved (\ x -> case x of {}) - (%~) SCA SCK = Disproved (\ x -> case x of {}) - (%~) SCA SCL = Disproved (\ x -> case x of {}) - (%~) SCA SCM = Disproved (\ x -> case x of {}) - (%~) SCA SCN = Disproved (\ x -> case x of {}) - (%~) SCA SCO = Disproved (\ x -> case x of {}) - (%~) SCA SCP = Disproved (\ x -> case x of {}) - (%~) SCA SCQ = Disproved (\ x -> case x of {}) - (%~) SCA SCR = Disproved (\ x -> case x of {}) - (%~) SCA SCS = Disproved (\ x -> case x of {}) - (%~) SCA SCT = Disproved (\ x -> case x of {}) - (%~) SCA SCU = Disproved (\ x -> case x of {}) - (%~) SCA SCV = Disproved (\ x -> case x of {}) - (%~) SCA SCW = Disproved (\ x -> case x of {}) - (%~) SCA SCX = Disproved (\ x -> case x of {}) - (%~) SCA SCY = Disproved (\ x -> case x of {}) - (%~) SCA SCZ = Disproved (\ x -> case x of {}) - (%~) SCB SCA = Disproved (\ x -> case x of {}) + (%~) SCA SCB = Disproved (\case) + (%~) SCA SCC = Disproved (\case) + (%~) SCA SCD = Disproved (\case) + (%~) SCA SCE = Disproved (\case) + (%~) SCA SCF = Disproved (\case) + (%~) SCA SCG = Disproved (\case) + (%~) SCA SCH = Disproved (\case) + (%~) SCA SCI = Disproved (\case) + (%~) SCA SCJ = Disproved (\case) + (%~) SCA SCK = Disproved (\case) + (%~) SCA SCL = Disproved (\case) + (%~) SCA SCM = Disproved (\case) + (%~) SCA SCN = Disproved (\case) + (%~) SCA SCO = Disproved (\case) + (%~) SCA SCP = Disproved (\case) + (%~) SCA SCQ = Disproved (\case) + (%~) SCA SCR = Disproved (\case) + (%~) SCA SCS = Disproved (\case) + (%~) SCA SCT = Disproved (\case) + (%~) SCA SCU = Disproved (\case) + (%~) SCA SCV = Disproved (\case) + (%~) SCA SCW = Disproved (\case) + (%~) SCA SCX = Disproved (\case) + (%~) SCA SCY = Disproved (\case) + (%~) SCA SCZ = Disproved (\case) + (%~) SCB SCA = Disproved (\case) (%~) SCB SCB = Proved Refl - (%~) SCB SCC = Disproved (\ x -> case x of {}) - (%~) SCB SCD = Disproved (\ x -> case x of {}) - (%~) SCB SCE = Disproved (\ x -> case x of {}) - (%~) SCB SCF = Disproved (\ x -> case x of {}) - (%~) SCB SCG = Disproved (\ x -> case x of {}) - (%~) SCB SCH = Disproved (\ x -> case x of {}) - (%~) SCB SCI = Disproved (\ x -> case x of {}) - (%~) SCB SCJ = Disproved (\ x -> case x of {}) - (%~) SCB SCK = Disproved (\ x -> case x of {}) - (%~) SCB SCL = Disproved (\ x -> case x of {}) - (%~) SCB SCM = Disproved (\ x -> case x of {}) - (%~) SCB SCN = Disproved (\ x -> case x of {}) - (%~) SCB SCO = Disproved (\ x -> case x of {}) - (%~) SCB SCP = Disproved (\ x -> case x of {}) - (%~) SCB SCQ = Disproved (\ x -> case x of {}) - (%~) SCB SCR = Disproved (\ x -> case x of {}) - (%~) SCB SCS = Disproved (\ x -> case x of {}) - (%~) SCB SCT = Disproved (\ x -> case x of {}) - (%~) SCB SCU = Disproved (\ x -> case x of {}) - (%~) SCB SCV = Disproved (\ x -> case x of {}) - (%~) SCB SCW = Disproved (\ x -> case x of {}) - (%~) SCB SCX = Disproved (\ x -> case x of {}) - (%~) SCB SCY = Disproved (\ x -> case x of {}) - (%~) SCB SCZ = Disproved (\ x -> case x of {}) - (%~) SCC SCA = Disproved (\ x -> case x of {}) - (%~) SCC SCB = Disproved (\ x -> case x of {}) + (%~) SCB SCC = Disproved (\case) + (%~) SCB SCD = Disproved (\case) + (%~) SCB SCE = Disproved (\case) + (%~) SCB SCF = Disproved (\case) + (%~) SCB SCG = Disproved (\case) + (%~) SCB SCH = Disproved (\case) + (%~) SCB SCI = Disproved (\case) + (%~) SCB SCJ = Disproved (\case) + (%~) SCB SCK = Disproved (\case) + (%~) SCB SCL = Disproved (\case) + (%~) SCB SCM = Disproved (\case) + (%~) SCB SCN = Disproved (\case) + (%~) SCB SCO = Disproved (\case) + (%~) SCB SCP = Disproved (\case) + (%~) SCB SCQ = Disproved (\case) + (%~) SCB SCR = Disproved (\case) + (%~) SCB SCS = Disproved (\case) + (%~) SCB SCT = Disproved (\case) + (%~) SCB SCU = Disproved (\case) + (%~) SCB SCV = Disproved (\case) + (%~) SCB SCW = Disproved (\case) + (%~) SCB SCX = Disproved (\case) + (%~) SCB SCY = Disproved (\case) + (%~) SCB SCZ = Disproved (\case) + (%~) SCC SCA = Disproved (\case) + (%~) SCC SCB = Disproved (\case) (%~) SCC SCC = Proved Refl - (%~) SCC SCD = Disproved (\ x -> case x of {}) - (%~) SCC SCE = Disproved (\ x -> case x of {}) - (%~) SCC SCF = Disproved (\ x -> case x of {}) - (%~) SCC SCG = Disproved (\ x -> case x of {}) - (%~) SCC SCH = Disproved (\ x -> case x of {}) - (%~) SCC SCI = Disproved (\ x -> case x of {}) - (%~) SCC SCJ = Disproved (\ x -> case x of {}) - (%~) SCC SCK = Disproved (\ x -> case x of {}) - (%~) SCC SCL = Disproved (\ x -> case x of {}) - (%~) SCC SCM = Disproved (\ x -> case x of {}) - (%~) SCC SCN = Disproved (\ x -> case x of {}) - (%~) SCC SCO = Disproved (\ x -> case x of {}) - (%~) SCC SCP = Disproved (\ x -> case x of {}) - (%~) SCC SCQ = Disproved (\ x -> case x of {}) - (%~) SCC SCR = Disproved (\ x -> case x of {}) - (%~) SCC SCS = Disproved (\ x -> case x of {}) - (%~) SCC SCT = Disproved (\ x -> case x of {}) - (%~) SCC SCU = Disproved (\ x -> case x of {}) - (%~) SCC SCV = Disproved (\ x -> case x of {}) - (%~) SCC SCW = Disproved (\ x -> case x of {}) - (%~) SCC SCX = Disproved (\ x -> case x of {}) - (%~) SCC SCY = Disproved (\ x -> case x of {}) - (%~) SCC SCZ = Disproved (\ x -> case x of {}) - (%~) SCD SCA = Disproved (\ x -> case x of {}) - (%~) SCD SCB = Disproved (\ x -> case x of {}) - (%~) SCD SCC = Disproved (\ x -> case x of {}) + (%~) SCC SCD = Disproved (\case) + (%~) SCC SCE = Disproved (\case) + (%~) SCC SCF = Disproved (\case) + (%~) SCC SCG = Disproved (\case) + (%~) SCC SCH = Disproved (\case) + (%~) SCC SCI = Disproved (\case) + (%~) SCC SCJ = Disproved (\case) + (%~) SCC SCK = Disproved (\case) + (%~) SCC SCL = Disproved (\case) + (%~) SCC SCM = Disproved (\case) + (%~) SCC SCN = Disproved (\case) + (%~) SCC SCO = Disproved (\case) + (%~) SCC SCP = Disproved (\case) + (%~) SCC SCQ = Disproved (\case) + (%~) SCC SCR = Disproved (\case) + (%~) SCC SCS = Disproved (\case) + (%~) SCC SCT = Disproved (\case) + (%~) SCC SCU = Disproved (\case) + (%~) SCC SCV = Disproved (\case) + (%~) SCC SCW = Disproved (\case) + (%~) SCC SCX = Disproved (\case) + (%~) SCC SCY = Disproved (\case) + (%~) SCC SCZ = Disproved (\case) + (%~) SCD SCA = Disproved (\case) + (%~) SCD SCB = Disproved (\case) + (%~) SCD SCC = Disproved (\case) (%~) SCD SCD = Proved Refl - (%~) SCD SCE = Disproved (\ x -> case x of {}) - (%~) SCD SCF = Disproved (\ x -> case x of {}) - (%~) SCD SCG = Disproved (\ x -> case x of {}) - (%~) SCD SCH = Disproved (\ x -> case x of {}) - (%~) SCD SCI = Disproved (\ x -> case x of {}) - (%~) SCD SCJ = Disproved (\ x -> case x of {}) - (%~) SCD SCK = Disproved (\ x -> case x of {}) - (%~) SCD SCL = Disproved (\ x -> case x of {}) - (%~) SCD SCM = Disproved (\ x -> case x of {}) - (%~) SCD SCN = Disproved (\ x -> case x of {}) - (%~) SCD SCO = Disproved (\ x -> case x of {}) - (%~) SCD SCP = Disproved (\ x -> case x of {}) - (%~) SCD SCQ = Disproved (\ x -> case x of {}) - (%~) SCD SCR = Disproved (\ x -> case x of {}) - (%~) SCD SCS = Disproved (\ x -> case x of {}) - (%~) SCD SCT = Disproved (\ x -> case x of {}) - (%~) SCD SCU = Disproved (\ x -> case x of {}) - (%~) SCD SCV = Disproved (\ x -> case x of {}) - (%~) SCD SCW = Disproved (\ x -> case x of {}) - (%~) SCD SCX = Disproved (\ x -> case x of {}) - (%~) SCD SCY = Disproved (\ x -> case x of {}) - (%~) SCD SCZ = Disproved (\ x -> case x of {}) - (%~) SCE SCA = Disproved (\ x -> case x of {}) - (%~) SCE SCB = Disproved (\ x -> case x of {}) - (%~) SCE SCC = Disproved (\ x -> case x of {}) - (%~) SCE SCD = Disproved (\ x -> case x of {}) + (%~) SCD SCE = Disproved (\case) + (%~) SCD SCF = Disproved (\case) + (%~) SCD SCG = Disproved (\case) + (%~) SCD SCH = Disproved (\case) + (%~) SCD SCI = Disproved (\case) + (%~) SCD SCJ = Disproved (\case) + (%~) SCD SCK = Disproved (\case) + (%~) SCD SCL = Disproved (\case) + (%~) SCD SCM = Disproved (\case) + (%~) SCD SCN = Disproved (\case) + (%~) SCD SCO = Disproved (\case) + (%~) SCD SCP = Disproved (\case) + (%~) SCD SCQ = Disproved (\case) + (%~) SCD SCR = Disproved (\case) + (%~) SCD SCS = Disproved (\case) + (%~) SCD SCT = Disproved (\case) + (%~) SCD SCU = Disproved (\case) + (%~) SCD SCV = Disproved (\case) + (%~) SCD SCW = Disproved (\case) + (%~) SCD SCX = Disproved (\case) + (%~) SCD SCY = Disproved (\case) + (%~) SCD SCZ = Disproved (\case) + (%~) SCE SCA = Disproved (\case) + (%~) SCE SCB = Disproved (\case) + (%~) SCE SCC = Disproved (\case) + (%~) SCE SCD = Disproved (\case) (%~) SCE SCE = Proved Refl - (%~) SCE SCF = Disproved (\ x -> case x of {}) - (%~) SCE SCG = Disproved (\ x -> case x of {}) - (%~) SCE SCH = Disproved (\ x -> case x of {}) - (%~) SCE SCI = Disproved (\ x -> case x of {}) - (%~) SCE SCJ = Disproved (\ x -> case x of {}) - (%~) SCE SCK = Disproved (\ x -> case x of {}) - (%~) SCE SCL = Disproved (\ x -> case x of {}) - (%~) SCE SCM = Disproved (\ x -> case x of {}) - (%~) SCE SCN = Disproved (\ x -> case x of {}) - (%~) SCE SCO = Disproved (\ x -> case x of {}) - (%~) SCE SCP = Disproved (\ x -> case x of {}) - (%~) SCE SCQ = Disproved (\ x -> case x of {}) - (%~) SCE SCR = Disproved (\ x -> case x of {}) - (%~) SCE SCS = Disproved (\ x -> case x of {}) - (%~) SCE SCT = Disproved (\ x -> case x of {}) - (%~) SCE SCU = Disproved (\ x -> case x of {}) - (%~) SCE SCV = Disproved (\ x -> case x of {}) - (%~) SCE SCW = Disproved (\ x -> case x of {}) - (%~) SCE SCX = Disproved (\ x -> case x of {}) - (%~) SCE SCY = Disproved (\ x -> case x of {}) - (%~) SCE SCZ = Disproved (\ x -> case x of {}) - (%~) SCF SCA = Disproved (\ x -> case x of {}) - (%~) SCF SCB = Disproved (\ x -> case x of {}) - (%~) SCF SCC = Disproved (\ x -> case x of {}) - (%~) SCF SCD = Disproved (\ x -> case x of {}) - (%~) SCF SCE = Disproved (\ x -> case x of {}) + (%~) SCE SCF = Disproved (\case) + (%~) SCE SCG = Disproved (\case) + (%~) SCE SCH = Disproved (\case) + (%~) SCE SCI = Disproved (\case) + (%~) SCE SCJ = Disproved (\case) + (%~) SCE SCK = Disproved (\case) + (%~) SCE SCL = Disproved (\case) + (%~) SCE SCM = Disproved (\case) + (%~) SCE SCN = Disproved (\case) + (%~) SCE SCO = Disproved (\case) + (%~) SCE SCP = Disproved (\case) + (%~) SCE SCQ = Disproved (\case) + (%~) SCE SCR = Disproved (\case) + (%~) SCE SCS = Disproved (\case) + (%~) SCE SCT = Disproved (\case) + (%~) SCE SCU = Disproved (\case) + (%~) SCE SCV = Disproved (\case) + (%~) SCE SCW = Disproved (\case) + (%~) SCE SCX = Disproved (\case) + (%~) SCE SCY = Disproved (\case) + (%~) SCE SCZ = Disproved (\case) + (%~) SCF SCA = Disproved (\case) + (%~) SCF SCB = Disproved (\case) + (%~) SCF SCC = Disproved (\case) + (%~) SCF SCD = Disproved (\case) + (%~) SCF SCE = Disproved (\case) (%~) SCF SCF = Proved Refl - (%~) SCF SCG = Disproved (\ x -> case x of {}) - (%~) SCF SCH = Disproved (\ x -> case x of {}) - (%~) SCF SCI = Disproved (\ x -> case x of {}) - (%~) SCF SCJ = Disproved (\ x -> case x of {}) - (%~) SCF SCK = Disproved (\ x -> case x of {}) - (%~) SCF SCL = Disproved (\ x -> case x of {}) - (%~) SCF SCM = Disproved (\ x -> case x of {}) - (%~) SCF SCN = Disproved (\ x -> case x of {}) - (%~) SCF SCO = Disproved (\ x -> case x of {}) - (%~) SCF SCP = Disproved (\ x -> case x of {}) - (%~) SCF SCQ = Disproved (\ x -> case x of {}) - (%~) SCF SCR = Disproved (\ x -> case x of {}) - (%~) SCF SCS = Disproved (\ x -> case x of {}) - (%~) SCF SCT = Disproved (\ x -> case x of {}) - (%~) SCF SCU = Disproved (\ x -> case x of {}) - (%~) SCF SCV = Disproved (\ x -> case x of {}) - (%~) SCF SCW = Disproved (\ x -> case x of {}) - (%~) SCF SCX = Disproved (\ x -> case x of {}) - (%~) SCF SCY = Disproved (\ x -> case x of {}) - (%~) SCF SCZ = Disproved (\ x -> case x of {}) - (%~) SCG SCA = Disproved (\ x -> case x of {}) - (%~) SCG SCB = Disproved (\ x -> case x of {}) - (%~) SCG SCC = Disproved (\ x -> case x of {}) - (%~) SCG SCD = Disproved (\ x -> case x of {}) - (%~) SCG SCE = Disproved (\ x -> case x of {}) - (%~) SCG SCF = Disproved (\ x -> case x of {}) + (%~) SCF SCG = Disproved (\case) + (%~) SCF SCH = Disproved (\case) + (%~) SCF SCI = Disproved (\case) + (%~) SCF SCJ = Disproved (\case) + (%~) SCF SCK = Disproved (\case) + (%~) SCF SCL = Disproved (\case) + (%~) SCF SCM = Disproved (\case) + (%~) SCF SCN = Disproved (\case) + (%~) SCF SCO = Disproved (\case) + (%~) SCF SCP = Disproved (\case) + (%~) SCF SCQ = Disproved (\case) + (%~) SCF SCR = Disproved (\case) + (%~) SCF SCS = Disproved (\case) + (%~) SCF SCT = Disproved (\case) + (%~) SCF SCU = Disproved (\case) + (%~) SCF SCV = Disproved (\case) + (%~) SCF SCW = Disproved (\case) + (%~) SCF SCX = Disproved (\case) + (%~) SCF SCY = Disproved (\case) + (%~) SCF SCZ = Disproved (\case) + (%~) SCG SCA = Disproved (\case) + (%~) SCG SCB = Disproved (\case) + (%~) SCG SCC = Disproved (\case) + (%~) SCG SCD = Disproved (\case) + (%~) SCG SCE = Disproved (\case) + (%~) SCG SCF = Disproved (\case) (%~) SCG SCG = Proved Refl - (%~) SCG SCH = Disproved (\ x -> case x of {}) - (%~) SCG SCI = Disproved (\ x -> case x of {}) - (%~) SCG SCJ = Disproved (\ x -> case x of {}) - (%~) SCG SCK = Disproved (\ x -> case x of {}) - (%~) SCG SCL = Disproved (\ x -> case x of {}) - (%~) SCG SCM = Disproved (\ x -> case x of {}) - (%~) SCG SCN = Disproved (\ x -> case x of {}) - (%~) SCG SCO = Disproved (\ x -> case x of {}) - (%~) SCG SCP = Disproved (\ x -> case x of {}) - (%~) SCG SCQ = Disproved (\ x -> case x of {}) - (%~) SCG SCR = Disproved (\ x -> case x of {}) - (%~) SCG SCS = Disproved (\ x -> case x of {}) - (%~) SCG SCT = Disproved (\ x -> case x of {}) - (%~) SCG SCU = Disproved (\ x -> case x of {}) - (%~) SCG SCV = Disproved (\ x -> case x of {}) - (%~) SCG SCW = Disproved (\ x -> case x of {}) - (%~) SCG SCX = Disproved (\ x -> case x of {}) - (%~) SCG SCY = Disproved (\ x -> case x of {}) - (%~) SCG SCZ = Disproved (\ x -> case x of {}) - (%~) SCH SCA = Disproved (\ x -> case x of {}) - (%~) SCH SCB = Disproved (\ x -> case x of {}) - (%~) SCH SCC = Disproved (\ x -> case x of {}) - (%~) SCH SCD = Disproved (\ x -> case x of {}) - (%~) SCH SCE = Disproved (\ x -> case x of {}) - (%~) SCH SCF = Disproved (\ x -> case x of {}) - (%~) SCH SCG = Disproved (\ x -> case x of {}) + (%~) SCG SCH = Disproved (\case) + (%~) SCG SCI = Disproved (\case) + (%~) SCG SCJ = Disproved (\case) + (%~) SCG SCK = Disproved (\case) + (%~) SCG SCL = Disproved (\case) + (%~) SCG SCM = Disproved (\case) + (%~) SCG SCN = Disproved (\case) + (%~) SCG SCO = Disproved (\case) + (%~) SCG SCP = Disproved (\case) + (%~) SCG SCQ = Disproved (\case) + (%~) SCG SCR = Disproved (\case) + (%~) SCG SCS = Disproved (\case) + (%~) SCG SCT = Disproved (\case) + (%~) SCG SCU = Disproved (\case) + (%~) SCG SCV = Disproved (\case) + (%~) SCG SCW = Disproved (\case) + (%~) SCG SCX = Disproved (\case) + (%~) SCG SCY = Disproved (\case) + (%~) SCG SCZ = Disproved (\case) + (%~) SCH SCA = Disproved (\case) + (%~) SCH SCB = Disproved (\case) + (%~) SCH SCC = Disproved (\case) + (%~) SCH SCD = Disproved (\case) + (%~) SCH SCE = Disproved (\case) + (%~) SCH SCF = Disproved (\case) + (%~) SCH SCG = Disproved (\case) (%~) SCH SCH = Proved Refl - (%~) SCH SCI = Disproved (\ x -> case x of {}) - (%~) SCH SCJ = Disproved (\ x -> case x of {}) - (%~) SCH SCK = Disproved (\ x -> case x of {}) - (%~) SCH SCL = Disproved (\ x -> case x of {}) - (%~) SCH SCM = Disproved (\ x -> case x of {}) - (%~) SCH SCN = Disproved (\ x -> case x of {}) - (%~) SCH SCO = Disproved (\ x -> case x of {}) - (%~) SCH SCP = Disproved (\ x -> case x of {}) - (%~) SCH SCQ = Disproved (\ x -> case x of {}) - (%~) SCH SCR = Disproved (\ x -> case x of {}) - (%~) SCH SCS = Disproved (\ x -> case x of {}) - (%~) SCH SCT = Disproved (\ x -> case x of {}) - (%~) SCH SCU = Disproved (\ x -> case x of {}) - (%~) SCH SCV = Disproved (\ x -> case x of {}) - (%~) SCH SCW = Disproved (\ x -> case x of {}) - (%~) SCH SCX = Disproved (\ x -> case x of {}) - (%~) SCH SCY = Disproved (\ x -> case x of {}) - (%~) SCH SCZ = Disproved (\ x -> case x of {}) - (%~) SCI SCA = Disproved (\ x -> case x of {}) - (%~) SCI SCB = Disproved (\ x -> case x of {}) - (%~) SCI SCC = Disproved (\ x -> case x of {}) - (%~) SCI SCD = Disproved (\ x -> case x of {}) - (%~) SCI SCE = Disproved (\ x -> case x of {}) - (%~) SCI SCF = Disproved (\ x -> case x of {}) - (%~) SCI SCG = Disproved (\ x -> case x of {}) - (%~) SCI SCH = Disproved (\ x -> case x of {}) + (%~) SCH SCI = Disproved (\case) + (%~) SCH SCJ = Disproved (\case) + (%~) SCH SCK = Disproved (\case) + (%~) SCH SCL = Disproved (\case) + (%~) SCH SCM = Disproved (\case) + (%~) SCH SCN = Disproved (\case) + (%~) SCH SCO = Disproved (\case) + (%~) SCH SCP = Disproved (\case) + (%~) SCH SCQ = Disproved (\case) + (%~) SCH SCR = Disproved (\case) + (%~) SCH SCS = Disproved (\case) + (%~) SCH SCT = Disproved (\case) + (%~) SCH SCU = Disproved (\case) + (%~) SCH SCV = Disproved (\case) + (%~) SCH SCW = Disproved (\case) + (%~) SCH SCX = Disproved (\case) + (%~) SCH SCY = Disproved (\case) + (%~) SCH SCZ = Disproved (\case) + (%~) SCI SCA = Disproved (\case) + (%~) SCI SCB = Disproved (\case) + (%~) SCI SCC = Disproved (\case) + (%~) SCI SCD = Disproved (\case) + (%~) SCI SCE = Disproved (\case) + (%~) SCI SCF = Disproved (\case) + (%~) SCI SCG = Disproved (\case) + (%~) SCI SCH = Disproved (\case) (%~) SCI SCI = Proved Refl - (%~) SCI SCJ = Disproved (\ x -> case x of {}) - (%~) SCI SCK = Disproved (\ x -> case x of {}) - (%~) SCI SCL = Disproved (\ x -> case x of {}) - (%~) SCI SCM = Disproved (\ x -> case x of {}) - (%~) SCI SCN = Disproved (\ x -> case x of {}) - (%~) SCI SCO = Disproved (\ x -> case x of {}) - (%~) SCI SCP = Disproved (\ x -> case x of {}) - (%~) SCI SCQ = Disproved (\ x -> case x of {}) - (%~) SCI SCR = Disproved (\ x -> case x of {}) - (%~) SCI SCS = Disproved (\ x -> case x of {}) - (%~) SCI SCT = Disproved (\ x -> case x of {}) - (%~) SCI SCU = Disproved (\ x -> case x of {}) - (%~) SCI SCV = Disproved (\ x -> case x of {}) - (%~) SCI SCW = Disproved (\ x -> case x of {}) - (%~) SCI SCX = Disproved (\ x -> case x of {}) - (%~) SCI SCY = Disproved (\ x -> case x of {}) - (%~) SCI SCZ = Disproved (\ x -> case x of {}) - (%~) SCJ SCA = Disproved (\ x -> case x of {}) - (%~) SCJ SCB = Disproved (\ x -> case x of {}) - (%~) SCJ SCC = Disproved (\ x -> case x of {}) - (%~) SCJ SCD = Disproved (\ x -> case x of {}) - (%~) SCJ SCE = Disproved (\ x -> case x of {}) - (%~) SCJ SCF = Disproved (\ x -> case x of {}) - (%~) SCJ SCG = Disproved (\ x -> case x of {}) - (%~) SCJ SCH = Disproved (\ x -> case x of {}) - (%~) SCJ SCI = Disproved (\ x -> case x of {}) + (%~) SCI SCJ = Disproved (\case) + (%~) SCI SCK = Disproved (\case) + (%~) SCI SCL = Disproved (\case) + (%~) SCI SCM = Disproved (\case) + (%~) SCI SCN = Disproved (\case) + (%~) SCI SCO = Disproved (\case) + (%~) SCI SCP = Disproved (\case) + (%~) SCI SCQ = Disproved (\case) + (%~) SCI SCR = Disproved (\case) + (%~) SCI SCS = Disproved (\case) + (%~) SCI SCT = Disproved (\case) + (%~) SCI SCU = Disproved (\case) + (%~) SCI SCV = Disproved (\case) + (%~) SCI SCW = Disproved (\case) + (%~) SCI SCX = Disproved (\case) + (%~) SCI SCY = Disproved (\case) + (%~) SCI SCZ = Disproved (\case) + (%~) SCJ SCA = Disproved (\case) + (%~) SCJ SCB = Disproved (\case) + (%~) SCJ SCC = Disproved (\case) + (%~) SCJ SCD = Disproved (\case) + (%~) SCJ SCE = Disproved (\case) + (%~) SCJ SCF = Disproved (\case) + (%~) SCJ SCG = Disproved (\case) + (%~) SCJ SCH = Disproved (\case) + (%~) SCJ SCI = Disproved (\case) (%~) SCJ SCJ = Proved Refl - (%~) SCJ SCK = Disproved (\ x -> case x of {}) - (%~) SCJ SCL = Disproved (\ x -> case x of {}) - (%~) SCJ SCM = Disproved (\ x -> case x of {}) - (%~) SCJ SCN = Disproved (\ x -> case x of {}) - (%~) SCJ SCO = Disproved (\ x -> case x of {}) - (%~) SCJ SCP = Disproved (\ x -> case x of {}) - (%~) SCJ SCQ = Disproved (\ x -> case x of {}) - (%~) SCJ SCR = Disproved (\ x -> case x of {}) - (%~) SCJ SCS = Disproved (\ x -> case x of {}) - (%~) SCJ SCT = Disproved (\ x -> case x of {}) - (%~) SCJ SCU = Disproved (\ x -> case x of {}) - (%~) SCJ SCV = Disproved (\ x -> case x of {}) - (%~) SCJ SCW = Disproved (\ x -> case x of {}) - (%~) SCJ SCX = Disproved (\ x -> case x of {}) - (%~) SCJ SCY = Disproved (\ x -> case x of {}) - (%~) SCJ SCZ = Disproved (\ x -> case x of {}) - (%~) SCK SCA = Disproved (\ x -> case x of {}) - (%~) SCK SCB = Disproved (\ x -> case x of {}) - (%~) SCK SCC = Disproved (\ x -> case x of {}) - (%~) SCK SCD = Disproved (\ x -> case x of {}) - (%~) SCK SCE = Disproved (\ x -> case x of {}) - (%~) SCK SCF = Disproved (\ x -> case x of {}) - (%~) SCK SCG = Disproved (\ x -> case x of {}) - (%~) SCK SCH = Disproved (\ x -> case x of {}) - (%~) SCK SCI = Disproved (\ x -> case x of {}) - (%~) SCK SCJ = Disproved (\ x -> case x of {}) + (%~) SCJ SCK = Disproved (\case) + (%~) SCJ SCL = Disproved (\case) + (%~) SCJ SCM = Disproved (\case) + (%~) SCJ SCN = Disproved (\case) + (%~) SCJ SCO = Disproved (\case) + (%~) SCJ SCP = Disproved (\case) + (%~) SCJ SCQ = Disproved (\case) + (%~) SCJ SCR = Disproved (\case) + (%~) SCJ SCS = Disproved (\case) + (%~) SCJ SCT = Disproved (\case) + (%~) SCJ SCU = Disproved (\case) + (%~) SCJ SCV = Disproved (\case) + (%~) SCJ SCW = Disproved (\case) + (%~) SCJ SCX = Disproved (\case) + (%~) SCJ SCY = Disproved (\case) + (%~) SCJ SCZ = Disproved (\case) + (%~) SCK SCA = Disproved (\case) + (%~) SCK SCB = Disproved (\case) + (%~) SCK SCC = Disproved (\case) + (%~) SCK SCD = Disproved (\case) + (%~) SCK SCE = Disproved (\case) + (%~) SCK SCF = Disproved (\case) + (%~) SCK SCG = Disproved (\case) + (%~) SCK SCH = Disproved (\case) + (%~) SCK SCI = Disproved (\case) + (%~) SCK SCJ = Disproved (\case) (%~) SCK SCK = Proved Refl - (%~) SCK SCL = Disproved (\ x -> case x of {}) - (%~) SCK SCM = Disproved (\ x -> case x of {}) - (%~) SCK SCN = Disproved (\ x -> case x of {}) - (%~) SCK SCO = Disproved (\ x -> case x of {}) - (%~) SCK SCP = Disproved (\ x -> case x of {}) - (%~) SCK SCQ = Disproved (\ x -> case x of {}) - (%~) SCK SCR = Disproved (\ x -> case x of {}) - (%~) SCK SCS = Disproved (\ x -> case x of {}) - (%~) SCK SCT = Disproved (\ x -> case x of {}) - (%~) SCK SCU = Disproved (\ x -> case x of {}) - (%~) SCK SCV = Disproved (\ x -> case x of {}) - (%~) SCK SCW = Disproved (\ x -> case x of {}) - (%~) SCK SCX = Disproved (\ x -> case x of {}) - (%~) SCK SCY = Disproved (\ x -> case x of {}) - (%~) SCK SCZ = Disproved (\ x -> case x of {}) - (%~) SCL SCA = Disproved (\ x -> case x of {}) - (%~) SCL SCB = Disproved (\ x -> case x of {}) - (%~) SCL SCC = Disproved (\ x -> case x of {}) - (%~) SCL SCD = Disproved (\ x -> case x of {}) - (%~) SCL SCE = Disproved (\ x -> case x of {}) - (%~) SCL SCF = Disproved (\ x -> case x of {}) - (%~) SCL SCG = Disproved (\ x -> case x of {}) - (%~) SCL SCH = Disproved (\ x -> case x of {}) - (%~) SCL SCI = Disproved (\ x -> case x of {}) - (%~) SCL SCJ = Disproved (\ x -> case x of {}) - (%~) SCL SCK = Disproved (\ x -> case x of {}) + (%~) SCK SCL = Disproved (\case) + (%~) SCK SCM = Disproved (\case) + (%~) SCK SCN = Disproved (\case) + (%~) SCK SCO = Disproved (\case) + (%~) SCK SCP = Disproved (\case) + (%~) SCK SCQ = Disproved (\case) + (%~) SCK SCR = Disproved (\case) + (%~) SCK SCS = Disproved (\case) + (%~) SCK SCT = Disproved (\case) + (%~) SCK SCU = Disproved (\case) + (%~) SCK SCV = Disproved (\case) + (%~) SCK SCW = Disproved (\case) + (%~) SCK SCX = Disproved (\case) + (%~) SCK SCY = Disproved (\case) + (%~) SCK SCZ = Disproved (\case) + (%~) SCL SCA = Disproved (\case) + (%~) SCL SCB = Disproved (\case) + (%~) SCL SCC = Disproved (\case) + (%~) SCL SCD = Disproved (\case) + (%~) SCL SCE = Disproved (\case) + (%~) SCL SCF = Disproved (\case) + (%~) SCL SCG = Disproved (\case) + (%~) SCL SCH = Disproved (\case) + (%~) SCL SCI = Disproved (\case) + (%~) SCL SCJ = Disproved (\case) + (%~) SCL SCK = Disproved (\case) (%~) SCL SCL = Proved Refl - (%~) SCL SCM = Disproved (\ x -> case x of {}) - (%~) SCL SCN = Disproved (\ x -> case x of {}) - (%~) SCL SCO = Disproved (\ x -> case x of {}) - (%~) SCL SCP = Disproved (\ x -> case x of {}) - (%~) SCL SCQ = Disproved (\ x -> case x of {}) - (%~) SCL SCR = Disproved (\ x -> case x of {}) - (%~) SCL SCS = Disproved (\ x -> case x of {}) - (%~) SCL SCT = Disproved (\ x -> case x of {}) - (%~) SCL SCU = Disproved (\ x -> case x of {}) - (%~) SCL SCV = Disproved (\ x -> case x of {}) - (%~) SCL SCW = Disproved (\ x -> case x of {}) - (%~) SCL SCX = Disproved (\ x -> case x of {}) - (%~) SCL SCY = Disproved (\ x -> case x of {}) - (%~) SCL SCZ = Disproved (\ x -> case x of {}) - (%~) SCM SCA = Disproved (\ x -> case x of {}) - (%~) SCM SCB = Disproved (\ x -> case x of {}) - (%~) SCM SCC = Disproved (\ x -> case x of {}) - (%~) SCM SCD = Disproved (\ x -> case x of {}) - (%~) SCM SCE = Disproved (\ x -> case x of {}) - (%~) SCM SCF = Disproved (\ x -> case x of {}) - (%~) SCM SCG = Disproved (\ x -> case x of {}) - (%~) SCM SCH = Disproved (\ x -> case x of {}) - (%~) SCM SCI = Disproved (\ x -> case x of {}) - (%~) SCM SCJ = Disproved (\ x -> case x of {}) - (%~) SCM SCK = Disproved (\ x -> case x of {}) - (%~) SCM SCL = Disproved (\ x -> case x of {}) + (%~) SCL SCM = Disproved (\case) + (%~) SCL SCN = Disproved (\case) + (%~) SCL SCO = Disproved (\case) + (%~) SCL SCP = Disproved (\case) + (%~) SCL SCQ = Disproved (\case) + (%~) SCL SCR = Disproved (\case) + (%~) SCL SCS = Disproved (\case) + (%~) SCL SCT = Disproved (\case) + (%~) SCL SCU = Disproved (\case) + (%~) SCL SCV = Disproved (\case) + (%~) SCL SCW = Disproved (\case) + (%~) SCL SCX = Disproved (\case) + (%~) SCL SCY = Disproved (\case) + (%~) SCL SCZ = Disproved (\case) + (%~) SCM SCA = Disproved (\case) + (%~) SCM SCB = Disproved (\case) + (%~) SCM SCC = Disproved (\case) + (%~) SCM SCD = Disproved (\case) + (%~) SCM SCE = Disproved (\case) + (%~) SCM SCF = Disproved (\case) + (%~) SCM SCG = Disproved (\case) + (%~) SCM SCH = Disproved (\case) + (%~) SCM SCI = Disproved (\case) + (%~) SCM SCJ = Disproved (\case) + (%~) SCM SCK = Disproved (\case) + (%~) SCM SCL = Disproved (\case) (%~) SCM SCM = Proved Refl - (%~) SCM SCN = Disproved (\ x -> case x of {}) - (%~) SCM SCO = Disproved (\ x -> case x of {}) - (%~) SCM SCP = Disproved (\ x -> case x of {}) - (%~) SCM SCQ = Disproved (\ x -> case x of {}) - (%~) SCM SCR = Disproved (\ x -> case x of {}) - (%~) SCM SCS = Disproved (\ x -> case x of {}) - (%~) SCM SCT = Disproved (\ x -> case x of {}) - (%~) SCM SCU = Disproved (\ x -> case x of {}) - (%~) SCM SCV = Disproved (\ x -> case x of {}) - (%~) SCM SCW = Disproved (\ x -> case x of {}) - (%~) SCM SCX = Disproved (\ x -> case x of {}) - (%~) SCM SCY = Disproved (\ x -> case x of {}) - (%~) SCM SCZ = Disproved (\ x -> case x of {}) - (%~) SCN SCA = Disproved (\ x -> case x of {}) - (%~) SCN SCB = Disproved (\ x -> case x of {}) - (%~) SCN SCC = Disproved (\ x -> case x of {}) - (%~) SCN SCD = Disproved (\ x -> case x of {}) - (%~) SCN SCE = Disproved (\ x -> case x of {}) - (%~) SCN SCF = Disproved (\ x -> case x of {}) - (%~) SCN SCG = Disproved (\ x -> case x of {}) - (%~) SCN SCH = Disproved (\ x -> case x of {}) - (%~) SCN SCI = Disproved (\ x -> case x of {}) - (%~) SCN SCJ = Disproved (\ x -> case x of {}) - (%~) SCN SCK = Disproved (\ x -> case x of {}) - (%~) SCN SCL = Disproved (\ x -> case x of {}) - (%~) SCN SCM = Disproved (\ x -> case x of {}) + (%~) SCM SCN = Disproved (\case) + (%~) SCM SCO = Disproved (\case) + (%~) SCM SCP = Disproved (\case) + (%~) SCM SCQ = Disproved (\case) + (%~) SCM SCR = Disproved (\case) + (%~) SCM SCS = Disproved (\case) + (%~) SCM SCT = Disproved (\case) + (%~) SCM SCU = Disproved (\case) + (%~) SCM SCV = Disproved (\case) + (%~) SCM SCW = Disproved (\case) + (%~) SCM SCX = Disproved (\case) + (%~) SCM SCY = Disproved (\case) + (%~) SCM SCZ = Disproved (\case) + (%~) SCN SCA = Disproved (\case) + (%~) SCN SCB = Disproved (\case) + (%~) SCN SCC = Disproved (\case) + (%~) SCN SCD = Disproved (\case) + (%~) SCN SCE = Disproved (\case) + (%~) SCN SCF = Disproved (\case) + (%~) SCN SCG = Disproved (\case) + (%~) SCN SCH = Disproved (\case) + (%~) SCN SCI = Disproved (\case) + (%~) SCN SCJ = Disproved (\case) + (%~) SCN SCK = Disproved (\case) + (%~) SCN SCL = Disproved (\case) + (%~) SCN SCM = Disproved (\case) (%~) SCN SCN = Proved Refl - (%~) SCN SCO = Disproved (\ x -> case x of {}) - (%~) SCN SCP = Disproved (\ x -> case x of {}) - (%~) SCN SCQ = Disproved (\ x -> case x of {}) - (%~) SCN SCR = Disproved (\ x -> case x of {}) - (%~) SCN SCS = Disproved (\ x -> case x of {}) - (%~) SCN SCT = Disproved (\ x -> case x of {}) - (%~) SCN SCU = Disproved (\ x -> case x of {}) - (%~) SCN SCV = Disproved (\ x -> case x of {}) - (%~) SCN SCW = Disproved (\ x -> case x of {}) - (%~) SCN SCX = Disproved (\ x -> case x of {}) - (%~) SCN SCY = Disproved (\ x -> case x of {}) - (%~) SCN SCZ = Disproved (\ x -> case x of {}) - (%~) SCO SCA = Disproved (\ x -> case x of {}) - (%~) SCO SCB = Disproved (\ x -> case x of {}) - (%~) SCO SCC = Disproved (\ x -> case x of {}) - (%~) SCO SCD = Disproved (\ x -> case x of {}) - (%~) SCO SCE = Disproved (\ x -> case x of {}) - (%~) SCO SCF = Disproved (\ x -> case x of {}) - (%~) SCO SCG = Disproved (\ x -> case x of {}) - (%~) SCO SCH = Disproved (\ x -> case x of {}) - (%~) SCO SCI = Disproved (\ x -> case x of {}) - (%~) SCO SCJ = Disproved (\ x -> case x of {}) - (%~) SCO SCK = Disproved (\ x -> case x of {}) - (%~) SCO SCL = Disproved (\ x -> case x of {}) - (%~) SCO SCM = Disproved (\ x -> case x of {}) - (%~) SCO SCN = Disproved (\ x -> case x of {}) + (%~) SCN SCO = Disproved (\case) + (%~) SCN SCP = Disproved (\case) + (%~) SCN SCQ = Disproved (\case) + (%~) SCN SCR = Disproved (\case) + (%~) SCN SCS = Disproved (\case) + (%~) SCN SCT = Disproved (\case) + (%~) SCN SCU = Disproved (\case) + (%~) SCN SCV = Disproved (\case) + (%~) SCN SCW = Disproved (\case) + (%~) SCN SCX = Disproved (\case) + (%~) SCN SCY = Disproved (\case) + (%~) SCN SCZ = Disproved (\case) + (%~) SCO SCA = Disproved (\case) + (%~) SCO SCB = Disproved (\case) + (%~) SCO SCC = Disproved (\case) + (%~) SCO SCD = Disproved (\case) + (%~) SCO SCE = Disproved (\case) + (%~) SCO SCF = Disproved (\case) + (%~) SCO SCG = Disproved (\case) + (%~) SCO SCH = Disproved (\case) + (%~) SCO SCI = Disproved (\case) + (%~) SCO SCJ = Disproved (\case) + (%~) SCO SCK = Disproved (\case) + (%~) SCO SCL = Disproved (\case) + (%~) SCO SCM = Disproved (\case) + (%~) SCO SCN = Disproved (\case) (%~) SCO SCO = Proved Refl - (%~) SCO SCP = Disproved (\ x -> case x of {}) - (%~) SCO SCQ = Disproved (\ x -> case x of {}) - (%~) SCO SCR = Disproved (\ x -> case x of {}) - (%~) SCO SCS = Disproved (\ x -> case x of {}) - (%~) SCO SCT = Disproved (\ x -> case x of {}) - (%~) SCO SCU = Disproved (\ x -> case x of {}) - (%~) SCO SCV = Disproved (\ x -> case x of {}) - (%~) SCO SCW = Disproved (\ x -> case x of {}) - (%~) SCO SCX = Disproved (\ x -> case x of {}) - (%~) SCO SCY = Disproved (\ x -> case x of {}) - (%~) SCO SCZ = Disproved (\ x -> case x of {}) - (%~) SCP SCA = Disproved (\ x -> case x of {}) - (%~) SCP SCB = Disproved (\ x -> case x of {}) - (%~) SCP SCC = Disproved (\ x -> case x of {}) - (%~) SCP SCD = Disproved (\ x -> case x of {}) - (%~) SCP SCE = Disproved (\ x -> case x of {}) - (%~) SCP SCF = Disproved (\ x -> case x of {}) - (%~) SCP SCG = Disproved (\ x -> case x of {}) - (%~) SCP SCH = Disproved (\ x -> case x of {}) - (%~) SCP SCI = Disproved (\ x -> case x of {}) - (%~) SCP SCJ = Disproved (\ x -> case x of {}) - (%~) SCP SCK = Disproved (\ x -> case x of {}) - (%~) SCP SCL = Disproved (\ x -> case x of {}) - (%~) SCP SCM = Disproved (\ x -> case x of {}) - (%~) SCP SCN = Disproved (\ x -> case x of {}) - (%~) SCP SCO = Disproved (\ x -> case x of {}) + (%~) SCO SCP = Disproved (\case) + (%~) SCO SCQ = Disproved (\case) + (%~) SCO SCR = Disproved (\case) + (%~) SCO SCS = Disproved (\case) + (%~) SCO SCT = Disproved (\case) + (%~) SCO SCU = Disproved (\case) + (%~) SCO SCV = Disproved (\case) + (%~) SCO SCW = Disproved (\case) + (%~) SCO SCX = Disproved (\case) + (%~) SCO SCY = Disproved (\case) + (%~) SCO SCZ = Disproved (\case) + (%~) SCP SCA = Disproved (\case) + (%~) SCP SCB = Disproved (\case) + (%~) SCP SCC = Disproved (\case) + (%~) SCP SCD = Disproved (\case) + (%~) SCP SCE = Disproved (\case) + (%~) SCP SCF = Disproved (\case) + (%~) SCP SCG = Disproved (\case) + (%~) SCP SCH = Disproved (\case) + (%~) SCP SCI = Disproved (\case) + (%~) SCP SCJ = Disproved (\case) + (%~) SCP SCK = Disproved (\case) + (%~) SCP SCL = Disproved (\case) + (%~) SCP SCM = Disproved (\case) + (%~) SCP SCN = Disproved (\case) + (%~) SCP SCO = Disproved (\case) (%~) SCP SCP = Proved Refl - (%~) SCP SCQ = Disproved (\ x -> case x of {}) - (%~) SCP SCR = Disproved (\ x -> case x of {}) - (%~) SCP SCS = Disproved (\ x -> case x of {}) - (%~) SCP SCT = Disproved (\ x -> case x of {}) - (%~) SCP SCU = Disproved (\ x -> case x of {}) - (%~) SCP SCV = Disproved (\ x -> case x of {}) - (%~) SCP SCW = Disproved (\ x -> case x of {}) - (%~) SCP SCX = Disproved (\ x -> case x of {}) - (%~) SCP SCY = Disproved (\ x -> case x of {}) - (%~) SCP SCZ = Disproved (\ x -> case x of {}) - (%~) SCQ SCA = Disproved (\ x -> case x of {}) - (%~) SCQ SCB = Disproved (\ x -> case x of {}) - (%~) SCQ SCC = Disproved (\ x -> case x of {}) - (%~) SCQ SCD = Disproved (\ x -> case x of {}) - (%~) SCQ SCE = Disproved (\ x -> case x of {}) - (%~) SCQ SCF = Disproved (\ x -> case x of {}) - (%~) SCQ SCG = Disproved (\ x -> case x of {}) - (%~) SCQ SCH = Disproved (\ x -> case x of {}) - (%~) SCQ SCI = Disproved (\ x -> case x of {}) - (%~) SCQ SCJ = Disproved (\ x -> case x of {}) - (%~) SCQ SCK = Disproved (\ x -> case x of {}) - (%~) SCQ SCL = Disproved (\ x -> case x of {}) - (%~) SCQ SCM = Disproved (\ x -> case x of {}) - (%~) SCQ SCN = Disproved (\ x -> case x of {}) - (%~) SCQ SCO = Disproved (\ x -> case x of {}) - (%~) SCQ SCP = Disproved (\ x -> case x of {}) + (%~) SCP SCQ = Disproved (\case) + (%~) SCP SCR = Disproved (\case) + (%~) SCP SCS = Disproved (\case) + (%~) SCP SCT = Disproved (\case) + (%~) SCP SCU = Disproved (\case) + (%~) SCP SCV = Disproved (\case) + (%~) SCP SCW = Disproved (\case) + (%~) SCP SCX = Disproved (\case) + (%~) SCP SCY = Disproved (\case) + (%~) SCP SCZ = Disproved (\case) + (%~) SCQ SCA = Disproved (\case) + (%~) SCQ SCB = Disproved (\case) + (%~) SCQ SCC = Disproved (\case) + (%~) SCQ SCD = Disproved (\case) + (%~) SCQ SCE = Disproved (\case) + (%~) SCQ SCF = Disproved (\case) + (%~) SCQ SCG = Disproved (\case) + (%~) SCQ SCH = Disproved (\case) + (%~) SCQ SCI = Disproved (\case) + (%~) SCQ SCJ = Disproved (\case) + (%~) SCQ SCK = Disproved (\case) + (%~) SCQ SCL = Disproved (\case) + (%~) SCQ SCM = Disproved (\case) + (%~) SCQ SCN = Disproved (\case) + (%~) SCQ SCO = Disproved (\case) + (%~) SCQ SCP = Disproved (\case) (%~) SCQ SCQ = Proved Refl - (%~) SCQ SCR = Disproved (\ x -> case x of {}) - (%~) SCQ SCS = Disproved (\ x -> case x of {}) - (%~) SCQ SCT = Disproved (\ x -> case x of {}) - (%~) SCQ SCU = Disproved (\ x -> case x of {}) - (%~) SCQ SCV = Disproved (\ x -> case x of {}) - (%~) SCQ SCW = Disproved (\ x -> case x of {}) - (%~) SCQ SCX = Disproved (\ x -> case x of {}) - (%~) SCQ SCY = Disproved (\ x -> case x of {}) - (%~) SCQ SCZ = Disproved (\ x -> case x of {}) - (%~) SCR SCA = Disproved (\ x -> case x of {}) - (%~) SCR SCB = Disproved (\ x -> case x of {}) - (%~) SCR SCC = Disproved (\ x -> case x of {}) - (%~) SCR SCD = Disproved (\ x -> case x of {}) - (%~) SCR SCE = Disproved (\ x -> case x of {}) - (%~) SCR SCF = Disproved (\ x -> case x of {}) - (%~) SCR SCG = Disproved (\ x -> case x of {}) - (%~) SCR SCH = Disproved (\ x -> case x of {}) - (%~) SCR SCI = Disproved (\ x -> case x of {}) - (%~) SCR SCJ = Disproved (\ x -> case x of {}) - (%~) SCR SCK = Disproved (\ x -> case x of {}) - (%~) SCR SCL = Disproved (\ x -> case x of {}) - (%~) SCR SCM = Disproved (\ x -> case x of {}) - (%~) SCR SCN = Disproved (\ x -> case x of {}) - (%~) SCR SCO = Disproved (\ x -> case x of {}) - (%~) SCR SCP = Disproved (\ x -> case x of {}) - (%~) SCR SCQ = Disproved (\ x -> case x of {}) + (%~) SCQ SCR = Disproved (\case) + (%~) SCQ SCS = Disproved (\case) + (%~) SCQ SCT = Disproved (\case) + (%~) SCQ SCU = Disproved (\case) + (%~) SCQ SCV = Disproved (\case) + (%~) SCQ SCW = Disproved (\case) + (%~) SCQ SCX = Disproved (\case) + (%~) SCQ SCY = Disproved (\case) + (%~) SCQ SCZ = Disproved (\case) + (%~) SCR SCA = Disproved (\case) + (%~) SCR SCB = Disproved (\case) + (%~) SCR SCC = Disproved (\case) + (%~) SCR SCD = Disproved (\case) + (%~) SCR SCE = Disproved (\case) + (%~) SCR SCF = Disproved (\case) + (%~) SCR SCG = Disproved (\case) + (%~) SCR SCH = Disproved (\case) + (%~) SCR SCI = Disproved (\case) + (%~) SCR SCJ = Disproved (\case) + (%~) SCR SCK = Disproved (\case) + (%~) SCR SCL = Disproved (\case) + (%~) SCR SCM = Disproved (\case) + (%~) SCR SCN = Disproved (\case) + (%~) SCR SCO = Disproved (\case) + (%~) SCR SCP = Disproved (\case) + (%~) SCR SCQ = Disproved (\case) (%~) SCR SCR = Proved Refl - (%~) SCR SCS = Disproved (\ x -> case x of {}) - (%~) SCR SCT = Disproved (\ x -> case x of {}) - (%~) SCR SCU = Disproved (\ x -> case x of {}) - (%~) SCR SCV = Disproved (\ x -> case x of {}) - (%~) SCR SCW = Disproved (\ x -> case x of {}) - (%~) SCR SCX = Disproved (\ x -> case x of {}) - (%~) SCR SCY = Disproved (\ x -> case x of {}) - (%~) SCR SCZ = Disproved (\ x -> case x of {}) - (%~) SCS SCA = Disproved (\ x -> case x of {}) - (%~) SCS SCB = Disproved (\ x -> case x of {}) - (%~) SCS SCC = Disproved (\ x -> case x of {}) - (%~) SCS SCD = Disproved (\ x -> case x of {}) - (%~) SCS SCE = Disproved (\ x -> case x of {}) - (%~) SCS SCF = Disproved (\ x -> case x of {}) - (%~) SCS SCG = Disproved (\ x -> case x of {}) - (%~) SCS SCH = Disproved (\ x -> case x of {}) - (%~) SCS SCI = Disproved (\ x -> case x of {}) - (%~) SCS SCJ = Disproved (\ x -> case x of {}) - (%~) SCS SCK = Disproved (\ x -> case x of {}) - (%~) SCS SCL = Disproved (\ x -> case x of {}) - (%~) SCS SCM = Disproved (\ x -> case x of {}) - (%~) SCS SCN = Disproved (\ x -> case x of {}) - (%~) SCS SCO = Disproved (\ x -> case x of {}) - (%~) SCS SCP = Disproved (\ x -> case x of {}) - (%~) SCS SCQ = Disproved (\ x -> case x of {}) - (%~) SCS SCR = Disproved (\ x -> case x of {}) + (%~) SCR SCS = Disproved (\case) + (%~) SCR SCT = Disproved (\case) + (%~) SCR SCU = Disproved (\case) + (%~) SCR SCV = Disproved (\case) + (%~) SCR SCW = Disproved (\case) + (%~) SCR SCX = Disproved (\case) + (%~) SCR SCY = Disproved (\case) + (%~) SCR SCZ = Disproved (\case) + (%~) SCS SCA = Disproved (\case) + (%~) SCS SCB = Disproved (\case) + (%~) SCS SCC = Disproved (\case) + (%~) SCS SCD = Disproved (\case) + (%~) SCS SCE = Disproved (\case) + (%~) SCS SCF = Disproved (\case) + (%~) SCS SCG = Disproved (\case) + (%~) SCS SCH = Disproved (\case) + (%~) SCS SCI = Disproved (\case) + (%~) SCS SCJ = Disproved (\case) + (%~) SCS SCK = Disproved (\case) + (%~) SCS SCL = Disproved (\case) + (%~) SCS SCM = Disproved (\case) + (%~) SCS SCN = Disproved (\case) + (%~) SCS SCO = Disproved (\case) + (%~) SCS SCP = Disproved (\case) + (%~) SCS SCQ = Disproved (\case) + (%~) SCS SCR = Disproved (\case) (%~) SCS SCS = Proved Refl - (%~) SCS SCT = Disproved (\ x -> case x of {}) - (%~) SCS SCU = Disproved (\ x -> case x of {}) - (%~) SCS SCV = Disproved (\ x -> case x of {}) - (%~) SCS SCW = Disproved (\ x -> case x of {}) - (%~) SCS SCX = Disproved (\ x -> case x of {}) - (%~) SCS SCY = Disproved (\ x -> case x of {}) - (%~) SCS SCZ = Disproved (\ x -> case x of {}) - (%~) SCT SCA = Disproved (\ x -> case x of {}) - (%~) SCT SCB = Disproved (\ x -> case x of {}) - (%~) SCT SCC = Disproved (\ x -> case x of {}) - (%~) SCT SCD = Disproved (\ x -> case x of {}) - (%~) SCT SCE = Disproved (\ x -> case x of {}) - (%~) SCT SCF = Disproved (\ x -> case x of {}) - (%~) SCT SCG = Disproved (\ x -> case x of {}) - (%~) SCT SCH = Disproved (\ x -> case x of {}) - (%~) SCT SCI = Disproved (\ x -> case x of {}) - (%~) SCT SCJ = Disproved (\ x -> case x of {}) - (%~) SCT SCK = Disproved (\ x -> case x of {}) - (%~) SCT SCL = Disproved (\ x -> case x of {}) - (%~) SCT SCM = Disproved (\ x -> case x of {}) - (%~) SCT SCN = Disproved (\ x -> case x of {}) - (%~) SCT SCO = Disproved (\ x -> case x of {}) - (%~) SCT SCP = Disproved (\ x -> case x of {}) - (%~) SCT SCQ = Disproved (\ x -> case x of {}) - (%~) SCT SCR = Disproved (\ x -> case x of {}) - (%~) SCT SCS = Disproved (\ x -> case x of {}) + (%~) SCS SCT = Disproved (\case) + (%~) SCS SCU = Disproved (\case) + (%~) SCS SCV = Disproved (\case) + (%~) SCS SCW = Disproved (\case) + (%~) SCS SCX = Disproved (\case) + (%~) SCS SCY = Disproved (\case) + (%~) SCS SCZ = Disproved (\case) + (%~) SCT SCA = Disproved (\case) + (%~) SCT SCB = Disproved (\case) + (%~) SCT SCC = Disproved (\case) + (%~) SCT SCD = Disproved (\case) + (%~) SCT SCE = Disproved (\case) + (%~) SCT SCF = Disproved (\case) + (%~) SCT SCG = Disproved (\case) + (%~) SCT SCH = Disproved (\case) + (%~) SCT SCI = Disproved (\case) + (%~) SCT SCJ = Disproved (\case) + (%~) SCT SCK = Disproved (\case) + (%~) SCT SCL = Disproved (\case) + (%~) SCT SCM = Disproved (\case) + (%~) SCT SCN = Disproved (\case) + (%~) SCT SCO = Disproved (\case) + (%~) SCT SCP = Disproved (\case) + (%~) SCT SCQ = Disproved (\case) + (%~) SCT SCR = Disproved (\case) + (%~) SCT SCS = Disproved (\case) (%~) SCT SCT = Proved Refl - (%~) SCT SCU = Disproved (\ x -> case x of {}) - (%~) SCT SCV = Disproved (\ x -> case x of {}) - (%~) SCT SCW = Disproved (\ x -> case x of {}) - (%~) SCT SCX = Disproved (\ x -> case x of {}) - (%~) SCT SCY = Disproved (\ x -> case x of {}) - (%~) SCT SCZ = Disproved (\ x -> case x of {}) - (%~) SCU SCA = Disproved (\ x -> case x of {}) - (%~) SCU SCB = Disproved (\ x -> case x of {}) - (%~) SCU SCC = Disproved (\ x -> case x of {}) - (%~) SCU SCD = Disproved (\ x -> case x of {}) - (%~) SCU SCE = Disproved (\ x -> case x of {}) - (%~) SCU SCF = Disproved (\ x -> case x of {}) - (%~) SCU SCG = Disproved (\ x -> case x of {}) - (%~) SCU SCH = Disproved (\ x -> case x of {}) - (%~) SCU SCI = Disproved (\ x -> case x of {}) - (%~) SCU SCJ = Disproved (\ x -> case x of {}) - (%~) SCU SCK = Disproved (\ x -> case x of {}) - (%~) SCU SCL = Disproved (\ x -> case x of {}) - (%~) SCU SCM = Disproved (\ x -> case x of {}) - (%~) SCU SCN = Disproved (\ x -> case x of {}) - (%~) SCU SCO = Disproved (\ x -> case x of {}) - (%~) SCU SCP = Disproved (\ x -> case x of {}) - (%~) SCU SCQ = Disproved (\ x -> case x of {}) - (%~) SCU SCR = Disproved (\ x -> case x of {}) - (%~) SCU SCS = Disproved (\ x -> case x of {}) - (%~) SCU SCT = Disproved (\ x -> case x of {}) + (%~) SCT SCU = Disproved (\case) + (%~) SCT SCV = Disproved (\case) + (%~) SCT SCW = Disproved (\case) + (%~) SCT SCX = Disproved (\case) + (%~) SCT SCY = Disproved (\case) + (%~) SCT SCZ = Disproved (\case) + (%~) SCU SCA = Disproved (\case) + (%~) SCU SCB = Disproved (\case) + (%~) SCU SCC = Disproved (\case) + (%~) SCU SCD = Disproved (\case) + (%~) SCU SCE = Disproved (\case) + (%~) SCU SCF = Disproved (\case) + (%~) SCU SCG = Disproved (\case) + (%~) SCU SCH = Disproved (\case) + (%~) SCU SCI = Disproved (\case) + (%~) SCU SCJ = Disproved (\case) + (%~) SCU SCK = Disproved (\case) + (%~) SCU SCL = Disproved (\case) + (%~) SCU SCM = Disproved (\case) + (%~) SCU SCN = Disproved (\case) + (%~) SCU SCO = Disproved (\case) + (%~) SCU SCP = Disproved (\case) + (%~) SCU SCQ = Disproved (\case) + (%~) SCU SCR = Disproved (\case) + (%~) SCU SCS = Disproved (\case) + (%~) SCU SCT = Disproved (\case) (%~) SCU SCU = Proved Refl - (%~) SCU SCV = Disproved (\ x -> case x of {}) - (%~) SCU SCW = Disproved (\ x -> case x of {}) - (%~) SCU SCX = Disproved (\ x -> case x of {}) - (%~) SCU SCY = Disproved (\ x -> case x of {}) - (%~) SCU SCZ = Disproved (\ x -> case x of {}) - (%~) SCV SCA = Disproved (\ x -> case x of {}) - (%~) SCV SCB = Disproved (\ x -> case x of {}) - (%~) SCV SCC = Disproved (\ x -> case x of {}) - (%~) SCV SCD = Disproved (\ x -> case x of {}) - (%~) SCV SCE = Disproved (\ x -> case x of {}) - (%~) SCV SCF = Disproved (\ x -> case x of {}) - (%~) SCV SCG = Disproved (\ x -> case x of {}) - (%~) SCV SCH = Disproved (\ x -> case x of {}) - (%~) SCV SCI = Disproved (\ x -> case x of {}) - (%~) SCV SCJ = Disproved (\ x -> case x of {}) - (%~) SCV SCK = Disproved (\ x -> case x of {}) - (%~) SCV SCL = Disproved (\ x -> case x of {}) - (%~) SCV SCM = Disproved (\ x -> case x of {}) - (%~) SCV SCN = Disproved (\ x -> case x of {}) - (%~) SCV SCO = Disproved (\ x -> case x of {}) - (%~) SCV SCP = Disproved (\ x -> case x of {}) - (%~) SCV SCQ = Disproved (\ x -> case x of {}) - (%~) SCV SCR = Disproved (\ x -> case x of {}) - (%~) SCV SCS = Disproved (\ x -> case x of {}) - (%~) SCV SCT = Disproved (\ x -> case x of {}) - (%~) SCV SCU = Disproved (\ x -> case x of {}) + (%~) SCU SCV = Disproved (\case) + (%~) SCU SCW = Disproved (\case) + (%~) SCU SCX = Disproved (\case) + (%~) SCU SCY = Disproved (\case) + (%~) SCU SCZ = Disproved (\case) + (%~) SCV SCA = Disproved (\case) + (%~) SCV SCB = Disproved (\case) + (%~) SCV SCC = Disproved (\case) + (%~) SCV SCD = Disproved (\case) + (%~) SCV SCE = Disproved (\case) + (%~) SCV SCF = Disproved (\case) + (%~) SCV SCG = Disproved (\case) + (%~) SCV SCH = Disproved (\case) + (%~) SCV SCI = Disproved (\case) + (%~) SCV SCJ = Disproved (\case) + (%~) SCV SCK = Disproved (\case) + (%~) SCV SCL = Disproved (\case) + (%~) SCV SCM = Disproved (\case) + (%~) SCV SCN = Disproved (\case) + (%~) SCV SCO = Disproved (\case) + (%~) SCV SCP = Disproved (\case) + (%~) SCV SCQ = Disproved (\case) + (%~) SCV SCR = Disproved (\case) + (%~) SCV SCS = Disproved (\case) + (%~) SCV SCT = Disproved (\case) + (%~) SCV SCU = Disproved (\case) (%~) SCV SCV = Proved Refl - (%~) SCV SCW = Disproved (\ x -> case x of {}) - (%~) SCV SCX = Disproved (\ x -> case x of {}) - (%~) SCV SCY = Disproved (\ x -> case x of {}) - (%~) SCV SCZ = Disproved (\ x -> case x of {}) - (%~) SCW SCA = Disproved (\ x -> case x of {}) - (%~) SCW SCB = Disproved (\ x -> case x of {}) - (%~) SCW SCC = Disproved (\ x -> case x of {}) - (%~) SCW SCD = Disproved (\ x -> case x of {}) - (%~) SCW SCE = Disproved (\ x -> case x of {}) - (%~) SCW SCF = Disproved (\ x -> case x of {}) - (%~) SCW SCG = Disproved (\ x -> case x of {}) - (%~) SCW SCH = Disproved (\ x -> case x of {}) - (%~) SCW SCI = Disproved (\ x -> case x of {}) - (%~) SCW SCJ = Disproved (\ x -> case x of {}) - (%~) SCW SCK = Disproved (\ x -> case x of {}) - (%~) SCW SCL = Disproved (\ x -> case x of {}) - (%~) SCW SCM = Disproved (\ x -> case x of {}) - (%~) SCW SCN = Disproved (\ x -> case x of {}) - (%~) SCW SCO = Disproved (\ x -> case x of {}) - (%~) SCW SCP = Disproved (\ x -> case x of {}) - (%~) SCW SCQ = Disproved (\ x -> case x of {}) - (%~) SCW SCR = Disproved (\ x -> case x of {}) - (%~) SCW SCS = Disproved (\ x -> case x of {}) - (%~) SCW SCT = Disproved (\ x -> case x of {}) - (%~) SCW SCU = Disproved (\ x -> case x of {}) - (%~) SCW SCV = Disproved (\ x -> case x of {}) + (%~) SCV SCW = Disproved (\case) + (%~) SCV SCX = Disproved (\case) + (%~) SCV SCY = Disproved (\case) + (%~) SCV SCZ = Disproved (\case) + (%~) SCW SCA = Disproved (\case) + (%~) SCW SCB = Disproved (\case) + (%~) SCW SCC = Disproved (\case) + (%~) SCW SCD = Disproved (\case) + (%~) SCW SCE = Disproved (\case) + (%~) SCW SCF = Disproved (\case) + (%~) SCW SCG = Disproved (\case) + (%~) SCW SCH = Disproved (\case) + (%~) SCW SCI = Disproved (\case) + (%~) SCW SCJ = Disproved (\case) + (%~) SCW SCK = Disproved (\case) + (%~) SCW SCL = Disproved (\case) + (%~) SCW SCM = Disproved (\case) + (%~) SCW SCN = Disproved (\case) + (%~) SCW SCO = Disproved (\case) + (%~) SCW SCP = Disproved (\case) + (%~) SCW SCQ = Disproved (\case) + (%~) SCW SCR = Disproved (\case) + (%~) SCW SCS = Disproved (\case) + (%~) SCW SCT = Disproved (\case) + (%~) SCW SCU = Disproved (\case) + (%~) SCW SCV = Disproved (\case) (%~) SCW SCW = Proved Refl - (%~) SCW SCX = Disproved (\ x -> case x of {}) - (%~) SCW SCY = Disproved (\ x -> case x of {}) - (%~) SCW SCZ = Disproved (\ x -> case x of {}) - (%~) SCX SCA = Disproved (\ x -> case x of {}) - (%~) SCX SCB = Disproved (\ x -> case x of {}) - (%~) SCX SCC = Disproved (\ x -> case x of {}) - (%~) SCX SCD = Disproved (\ x -> case x of {}) - (%~) SCX SCE = Disproved (\ x -> case x of {}) - (%~) SCX SCF = Disproved (\ x -> case x of {}) - (%~) SCX SCG = Disproved (\ x -> case x of {}) - (%~) SCX SCH = Disproved (\ x -> case x of {}) - (%~) SCX SCI = Disproved (\ x -> case x of {}) - (%~) SCX SCJ = Disproved (\ x -> case x of {}) - (%~) SCX SCK = Disproved (\ x -> case x of {}) - (%~) SCX SCL = Disproved (\ x -> case x of {}) - (%~) SCX SCM = Disproved (\ x -> case x of {}) - (%~) SCX SCN = Disproved (\ x -> case x of {}) - (%~) SCX SCO = Disproved (\ x -> case x of {}) - (%~) SCX SCP = Disproved (\ x -> case x of {}) - (%~) SCX SCQ = Disproved (\ x -> case x of {}) - (%~) SCX SCR = Disproved (\ x -> case x of {}) - (%~) SCX SCS = Disproved (\ x -> case x of {}) - (%~) SCX SCT = Disproved (\ x -> case x of {}) - (%~) SCX SCU = Disproved (\ x -> case x of {}) - (%~) SCX SCV = Disproved (\ x -> case x of {}) - (%~) SCX SCW = Disproved (\ x -> case x of {}) + (%~) SCW SCX = Disproved (\case) + (%~) SCW SCY = Disproved (\case) + (%~) SCW SCZ = Disproved (\case) + (%~) SCX SCA = Disproved (\case) + (%~) SCX SCB = Disproved (\case) + (%~) SCX SCC = Disproved (\case) + (%~) SCX SCD = Disproved (\case) + (%~) SCX SCE = Disproved (\case) + (%~) SCX SCF = Disproved (\case) + (%~) SCX SCG = Disproved (\case) + (%~) SCX SCH = Disproved (\case) + (%~) SCX SCI = Disproved (\case) + (%~) SCX SCJ = Disproved (\case) + (%~) SCX SCK = Disproved (\case) + (%~) SCX SCL = Disproved (\case) + (%~) SCX SCM = Disproved (\case) + (%~) SCX SCN = Disproved (\case) + (%~) SCX SCO = Disproved (\case) + (%~) SCX SCP = Disproved (\case) + (%~) SCX SCQ = Disproved (\case) + (%~) SCX SCR = Disproved (\case) + (%~) SCX SCS = Disproved (\case) + (%~) SCX SCT = Disproved (\case) + (%~) SCX SCU = Disproved (\case) + (%~) SCX SCV = Disproved (\case) + (%~) SCX SCW = Disproved (\case) (%~) SCX SCX = Proved Refl - (%~) SCX SCY = Disproved (\ x -> case x of {}) - (%~) SCX SCZ = Disproved (\ x -> case x of {}) - (%~) SCY SCA = Disproved (\ x -> case x of {}) - (%~) SCY SCB = Disproved (\ x -> case x of {}) - (%~) SCY SCC = Disproved (\ x -> case x of {}) - (%~) SCY SCD = Disproved (\ x -> case x of {}) - (%~) SCY SCE = Disproved (\ x -> case x of {}) - (%~) SCY SCF = Disproved (\ x -> case x of {}) - (%~) SCY SCG = Disproved (\ x -> case x of {}) - (%~) SCY SCH = Disproved (\ x -> case x of {}) - (%~) SCY SCI = Disproved (\ x -> case x of {}) - (%~) SCY SCJ = Disproved (\ x -> case x of {}) - (%~) SCY SCK = Disproved (\ x -> case x of {}) - (%~) SCY SCL = Disproved (\ x -> case x of {}) - (%~) SCY SCM = Disproved (\ x -> case x of {}) - (%~) SCY SCN = Disproved (\ x -> case x of {}) - (%~) SCY SCO = Disproved (\ x -> case x of {}) - (%~) SCY SCP = Disproved (\ x -> case x of {}) - (%~) SCY SCQ = Disproved (\ x -> case x of {}) - (%~) SCY SCR = Disproved (\ x -> case x of {}) - (%~) SCY SCS = Disproved (\ x -> case x of {}) - (%~) SCY SCT = Disproved (\ x -> case x of {}) - (%~) SCY SCU = Disproved (\ x -> case x of {}) - (%~) SCY SCV = Disproved (\ x -> case x of {}) - (%~) SCY SCW = Disproved (\ x -> case x of {}) - (%~) SCY SCX = Disproved (\ x -> case x of {}) + (%~) SCX SCY = Disproved (\case) + (%~) SCX SCZ = Disproved (\case) + (%~) SCY SCA = Disproved (\case) + (%~) SCY SCB = Disproved (\case) + (%~) SCY SCC = Disproved (\case) + (%~) SCY SCD = Disproved (\case) + (%~) SCY SCE = Disproved (\case) + (%~) SCY SCF = Disproved (\case) + (%~) SCY SCG = Disproved (\case) + (%~) SCY SCH = Disproved (\case) + (%~) SCY SCI = Disproved (\case) + (%~) SCY SCJ = Disproved (\case) + (%~) SCY SCK = Disproved (\case) + (%~) SCY SCL = Disproved (\case) + (%~) SCY SCM = Disproved (\case) + (%~) SCY SCN = Disproved (\case) + (%~) SCY SCO = Disproved (\case) + (%~) SCY SCP = Disproved (\case) + (%~) SCY SCQ = Disproved (\case) + (%~) SCY SCR = Disproved (\case) + (%~) SCY SCS = Disproved (\case) + (%~) SCY SCT = Disproved (\case) + (%~) SCY SCU = Disproved (\case) + (%~) SCY SCV = Disproved (\case) + (%~) SCY SCW = Disproved (\case) + (%~) SCY SCX = Disproved (\case) (%~) SCY SCY = Proved Refl - (%~) SCY SCZ = Disproved (\ x -> case x of {}) - (%~) SCZ SCA = Disproved (\ x -> case x of {}) - (%~) SCZ SCB = Disproved (\ x -> case x of {}) - (%~) SCZ SCC = Disproved (\ x -> case x of {}) - (%~) SCZ SCD = Disproved (\ x -> case x of {}) - (%~) SCZ SCE = Disproved (\ x -> case x of {}) - (%~) SCZ SCF = Disproved (\ x -> case x of {}) - (%~) SCZ SCG = Disproved (\ x -> case x of {}) - (%~) SCZ SCH = Disproved (\ x -> case x of {}) - (%~) SCZ SCI = Disproved (\ x -> case x of {}) - (%~) SCZ SCJ = Disproved (\ x -> case x of {}) - (%~) SCZ SCK = Disproved (\ x -> case x of {}) - (%~) SCZ SCL = Disproved (\ x -> case x of {}) - (%~) SCZ SCM = Disproved (\ x -> case x of {}) - (%~) SCZ SCN = Disproved (\ x -> case x of {}) - (%~) SCZ SCO = Disproved (\ x -> case x of {}) - (%~) SCZ SCP = Disproved (\ x -> case x of {}) - (%~) SCZ SCQ = Disproved (\ x -> case x of {}) - (%~) SCZ SCR = Disproved (\ x -> case x of {}) - (%~) SCZ SCS = Disproved (\ x -> case x of {}) - (%~) SCZ SCT = Disproved (\ x -> case x of {}) - (%~) SCZ SCU = Disproved (\ x -> case x of {}) - (%~) SCZ SCV = Disproved (\ x -> case x of {}) - (%~) SCZ SCW = Disproved (\ x -> case x of {}) - (%~) SCZ SCX = Disproved (\ x -> case x of {}) - (%~) SCZ SCY = Disproved (\ x -> case x of {}) + (%~) SCY SCZ = Disproved (\case) + (%~) SCZ SCA = Disproved (\case) + (%~) SCZ SCB = Disproved (\case) + (%~) SCZ SCC = Disproved (\case) + (%~) SCZ SCD = Disproved (\case) + (%~) SCZ SCE = Disproved (\case) + (%~) SCZ SCF = Disproved (\case) + (%~) SCZ SCG = Disproved (\case) + (%~) SCZ SCH = Disproved (\case) + (%~) SCZ SCI = Disproved (\case) + (%~) SCZ SCJ = Disproved (\case) + (%~) SCZ SCK = Disproved (\case) + (%~) SCZ SCL = Disproved (\case) + (%~) SCZ SCM = Disproved (\case) + (%~) SCZ SCN = Disproved (\case) + (%~) SCZ SCO = Disproved (\case) + (%~) SCZ SCP = Disproved (\case) + (%~) SCZ SCQ = Disproved (\case) + (%~) SCZ SCR = Disproved (\case) + (%~) SCZ SCS = Disproved (\case) + (%~) SCZ SCT = Disproved (\case) + (%~) SCZ SCU = Disproved (\case) + (%~) SCZ SCV = Disproved (\case) + (%~) SCZ SCW = Disproved (\case) + (%~) SCZ SCX = Disproved (\case) + (%~) SCZ SCY = Disproved (\case) (%~) SCZ SCZ = Proved Refl instance Eq (SAChar (z :: AChar)) where (==) _ _ = True @@ -3414,6 +3414,7 @@ GradingClient/Database.hs:0:0:: Splicing declarations GradingClient/Database.hs:(0,0)-(0,0): Splicing expression cases ''Row [| r |] [| changeId (n ++ (getId r)) r |] ======> - case r of - EmptyRow _ -> changeId ((++) n (getId r)) r - ConsRow _ _ -> changeId ((++) n (getId r)) r + (\cases + (EmptyRow _) -> changeId ((++) n (getId r)) r + (ConsRow _ _) -> changeId ((++) n (getId r)) r) + r diff --git a/singletons-base/tests/compile-and-dump/InsertionSort/InsertionSortImp.golden b/singletons-base/tests/compile-and-dump/InsertionSort/InsertionSortImp.golden index 6debb057..843a2f29 100644 --- a/singletons-base/tests/compile-and-dump/InsertionSort/InsertionSortImp.golden +++ b/singletons-base/tests/compile-and-dump/InsertionSort/InsertionSortImp.golden @@ -27,7 +27,8 @@ InsertionSort/InsertionSortImp.hs:(0,0)-(0,0): Splicing declarations fromSing (SSucc b) = Succ (fromSing b) toSing Zero = SomeSing SZero toSing (Succ (b :: Demote Nat)) - = case toSing b :: SomeSing Nat of SomeSing c -> SomeSing (SSucc c) + = (\cases (SomeSing c) -> SomeSing (SSucc c)) + (toSing b :: SomeSing Nat) instance SingI Zero where sing = SZero instance SingI n => SingI (Succ (n :: Nat)) where @@ -61,13 +62,19 @@ InsertionSort/InsertionSortImp.hs:(0,0)-(0,0): Splicing declarations insertionSort :: [Nat] -> [Nat] insertionSort [] = [] insertionSort (h : t) = insert h (insertionSort t) - type family Let0123456789876543210Scrutinee_0123456789876543210Sym0 n0123456789876543210 h0123456789876543210 t0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210Sym0 n0123456789876543210 h0123456789876543210 t0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 n0123456789876543210 h0123456789876543210 t0123456789876543210 - type family Let0123456789876543210Scrutinee_0123456789876543210 n0123456789876543210 h0123456789876543210 t0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210 n h t = Apply (Apply LeqSym0 n) h - type family Case_0123456789876543210 n0123456789876543210 h0123456789876543210 t0123456789876543210 t where - Case_0123456789876543210 n h t 'True = Apply (Apply (:@#@$) n) (Apply (Apply (:@#@$) h) t) - Case_0123456789876543210 n h t 'False = Apply (Apply (:@#@$) h) (Apply (Apply InsertSym0 n) t) + type family LamCases_0123456789876543210 n0123456789876543210 h0123456789876543210 t0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 n h t 'True = Apply (Apply (:@#@$) n) (Apply (Apply (:@#@$) h) t) + LamCases_0123456789876543210 n h t 'False = Apply (Apply (:@#@$) h) (Apply (Apply InsertSym0 n) t) + data LamCases_0123456789876543210Sym0 n0123456789876543210 h0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210 h0123456789876543210 t0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 h0123456789876543210 t0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 n0123456789876543210 h0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 n0123456789876543210 h0123456789876543210 t0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 h0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210 h0123456789876543210 t0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 n0123456789876543210 h0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 n0123456789876543210 h0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 h0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 type InsertionSortSym0 :: (~>) [Nat] [Nat] data InsertionSortSym0 :: (~>) [Nat] [Nat] where @@ -125,7 +132,7 @@ InsertionSort/InsertionSortImp.hs:(0,0)-(0,0): Splicing declarations type Insert :: Nat -> [Nat] -> [Nat] type family Insert (a :: Nat) (a :: [Nat]) :: [Nat] where Insert n '[] = Apply (Apply (:@#@$) n) NilSym0 - Insert n ('(:) h t) = Case_0123456789876543210 n h t (Let0123456789876543210Scrutinee_0123456789876543210Sym0 n h t) + Insert n ('(:) h t) = Apply (LamCases_0123456789876543210Sym0 n h t) (Apply (Apply LeqSym0 n) h) type Leq :: Nat -> Nat -> Bool type family Leq (a :: Nat) (a :: Nat) :: Bool where Leq 'Zero _ = TrueSym0 @@ -150,23 +157,19 @@ InsertionSort/InsertionSortImp.hs:(0,0)-(0,0): Splicing declarations sInsert (sN :: Sing n) SNil = applySing (applySing (singFun2 @(:@#@$) SCons) sN) SNil sInsert (sN :: Sing n) (SCons (sH :: Sing h) (sT :: Sing t)) - = let - sScrutinee_0123456789876543210 :: - Sing @_ (Let0123456789876543210Scrutinee_0123456789876543210Sym0 n h t) - sScrutinee_0123456789876543210 - = applySing (applySing (singFun2 @LeqSym0 sLeq) sN) sH - in - id - @(Sing (Case_0123456789876543210 n h t (Let0123456789876543210Scrutinee_0123456789876543210Sym0 n h t))) - (case sScrutinee_0123456789876543210 of - STrue - -> applySing - (applySing (singFun2 @(:@#@$) SCons) sN) - (applySing (applySing (singFun2 @(:@#@$) SCons) sH) sT) - SFalse - -> applySing - (applySing (singFun2 @(:@#@$) SCons) sH) - (applySing (applySing (singFun2 @InsertSym0 sInsert) sN) sT)) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 n h t) + (\cases + STrue + -> applySing + (applySing (singFun2 @(:@#@$) SCons) sN) + (applySing (applySing (singFun2 @(:@#@$) SCons) sH) sT) + SFalse + -> applySing + (applySing (singFun2 @(:@#@$) SCons) sH) + (applySing (applySing (singFun2 @InsertSym0 sInsert) sN) sT))) + (applySing (applySing (singFun2 @LeqSym0 sLeq) sN) sH) sLeq SZero _ = STrue sLeq (SSucc _) SZero = SFalse sLeq (SSucc (sA :: Sing a)) (SSucc (sB :: Sing b)) diff --git a/singletons-base/tests/compile-and-dump/Singletons/AsPattern.golden b/singletons-base/tests/compile-and-dump/Singletons/AsPattern.golden index 2fbf7158..8c228522 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/AsPattern.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/AsPattern.golden @@ -288,13 +288,10 @@ Singletons/AsPattern.hs:(0,0)-(0,0): Splicing declarations type Demote Baz = Baz fromSing (SBaz b b b) = Baz (fromSing b) (fromSing b) (fromSing b) toSing (Baz (b :: Demote Nat) (b :: Demote Nat) (b :: Demote Nat)) - = case - (,,) - (toSing b :: SomeSing Nat) (toSing b :: SomeSing Nat) - (toSing b :: SomeSing Nat) - of - (,,) (SomeSing c) (SomeSing c) (SomeSing c) - -> SomeSing (SBaz c c c) + = (\cases + (SomeSing c) (SomeSing c) (SomeSing c) -> SomeSing (SBaz c c c)) + (toSing b :: SomeSing Nat) (toSing b :: SomeSing Nat) + (toSing b :: SomeSing Nat) instance (SingI n, SingI n, SingI n) => SingI (Baz (n :: Nat) (n :: Nat) (n :: Nat)) where sing = SBaz sing sing sing diff --git a/singletons-base/tests/compile-and-dump/Singletons/BoundedDeriving.golden b/singletons-base/tests/compile-and-dump/Singletons/BoundedDeriving.golden index 15caee8c..06aca8c9 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/BoundedDeriving.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/BoundedDeriving.golden @@ -194,7 +194,8 @@ Singletons/BoundedDeriving.hs:(0,0)-(0,0): Splicing declarations type Demote (Foo3 a) = Foo3 (Demote a) fromSing (SFoo3 b) = Foo3 (fromSing b) toSing (Foo3 (b :: Demote a)) - = case toSing b :: SomeSing a of SomeSing c -> SomeSing (SFoo3 c) + = (\cases (SomeSing c) -> SomeSing (SFoo3 c)) + (toSing b :: SomeSing a) data SFoo4 :: forall (a :: Type) (b :: Type). Foo4 a b -> Type where SFoo41 :: forall (a :: Type) (b :: Type). SFoo4 (Foo41 :: Foo4 a b) @@ -215,10 +216,8 @@ Singletons/BoundedDeriving.hs:(0,0)-(0,0): Splicing declarations type Demote Pair = Pair fromSing (SPair b b) = Pair (fromSing b) (fromSing b) toSing (Pair (b :: Demote Bool) (b :: Demote Bool)) - = case - (,) (toSing b :: SomeSing Bool) (toSing b :: SomeSing Bool) - of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SPair c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SPair c c)) + (toSing b :: SomeSing Bool) (toSing b :: SomeSing Bool) instance SBounded Foo1 where sMinBound = SFoo1 sMaxBound = SFoo1 diff --git a/singletons-base/tests/compile-and-dump/Singletons/BoxUnBox.golden b/singletons-base/tests/compile-and-dump/Singletons/BoxUnBox.golden index cf5d5ce9..1394d30e 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/BoxUnBox.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/BoxUnBox.golden @@ -47,7 +47,8 @@ Singletons/BoxUnBox.hs:(0,0)-(0,0): Splicing declarations type Demote (Box a) = Box (Demote a) fromSing (SFBox b) = FBox (fromSing b) toSing (FBox (b :: Demote a)) - = case toSing b :: SomeSing a of SomeSing c -> SomeSing (SFBox c) + = (\cases (SomeSing c) -> SomeSing (SFBox c)) + (toSing b :: SomeSing a) instance SingI n => SingI (FBox (n :: a)) where sing = SFBox sing instance SingI1 FBox where diff --git a/singletons-base/tests/compile-and-dump/Singletons/CaseExpressions.golden b/singletons-base/tests/compile-and-dump/Singletons/CaseExpressions.golden index c9ab31d1..33d6091c 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/CaseExpressions.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/CaseExpressions.golden @@ -37,43 +37,83 @@ Singletons/CaseExpressions.hs:(0,0)-(0,0): Splicing declarations in z foo5 :: a -> a foo5 x = case x of y -> (\ _ -> x) y - type family Case_0123456789876543210 arg_01234567898765432100123456789876543210 y0123456789876543210 x0123456789876543210 t where - Case_0123456789876543210 arg_0123456789876543210 y x _ = x - type family Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 arg_0123456789876543210 where - Lambda_0123456789876543210 y x arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 y x arg_0123456789876543210 - data Lambda_0123456789876543210Sym0 y0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 y0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 y x _ = x + data LamCases_0123456789876543210Sym0 y0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 y0123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym1 y0123456789876543210 x0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 y0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 y0123456789876543210 x0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 y0123456789876543210 x0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 y0123456789876543210 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 y0123456789876543210 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 y0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 y0123456789876543210 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 y0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 y0123456789876543210 x0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 y0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 y0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 - type family Case_0123456789876543210 x0123456789876543210 t where - Case_0123456789876543210 x y = Apply (Lambda_0123456789876543210Sym0 y x) y + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 y0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 y0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 y0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x y = Apply (LamCases_0123456789876543210Sym0 y x) y + data LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 type family Let0123456789876543210ZSym0 a0123456789876543210 y0123456789876543210 x0123456789876543210 :: a0123456789876543210 where Let0123456789876543210ZSym0 a0123456789876543210 y0123456789876543210 x0123456789876543210 = Let0123456789876543210Z a0123456789876543210 y0123456789876543210 x0123456789876543210 type family Let0123456789876543210Z a0123456789876543210 y0123456789876543210 x0123456789876543210 :: a0123456789876543210 where Let0123456789876543210Z a y x = y - type family Case_0123456789876543210 a0123456789876543210 x0123456789876543210 t where - Case_0123456789876543210 a x y = Let0123456789876543210ZSym0 a y x - type family Let0123456789876543210Scrutinee_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 a0123456789876543210 b0123456789876543210 - type family Let0123456789876543210Scrutinee_0123456789876543210 a0123456789876543210 b0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210 a b = Apply (Apply Tuple2Sym0 a) b - type family Case_0123456789876543210 a0123456789876543210 b0123456789876543210 t where - Case_0123456789876543210 a b '(p, _) = p - type family Let0123456789876543210Scrutinee_0123456789876543210Sym0 d0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210Sym0 d0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 d0123456789876543210 - type family Let0123456789876543210Scrutinee_0123456789876543210 d0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210 d = Apply JustSym0 d - type family Case_0123456789876543210 d0123456789876543210 t where - Case_0123456789876543210 d ('Just y) = y - type family Case_0123456789876543210 d0123456789876543210 x0123456789876543210 t where - Case_0123456789876543210 d x ('Just y) = y - Case_0123456789876543210 d x 'Nothing = d + type family LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a x y = Let0123456789876543210ZSym0 a y x + data LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a b '(p, _) = p + data LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) arg) (LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 d0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 d ('Just y) = y + data LamCases_0123456789876543210Sym0 d0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 d0123456789876543210) arg) (LamCases_0123456789876543210Sym1 d0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 d0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 d0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 d0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 d0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 d0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 d0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 d0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 d0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 d x ('Just y) = y + LamCases_0123456789876543210 d x 'Nothing = d + data LamCases_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 d0123456789876543210 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 d0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 d0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 d0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 d0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 type Foo5Sym0 :: (~>) a a data Foo5Sym0 :: (~>) a a where @@ -155,19 +195,19 @@ Singletons/CaseExpressions.hs:(0,0)-(0,0): Splicing declarations Foo1Sym2 a0123456789876543210 a0123456789876543210 = Foo1 a0123456789876543210 a0123456789876543210 type Foo5 :: a -> a type family Foo5 @a (a :: a) :: a where - Foo5 x = Case_0123456789876543210 x x + Foo5 x = Apply (LamCases_0123456789876543210Sym0 x) x type Foo4 :: forall a. a -> a type family Foo4 @a (a :: a) :: a where - Foo4 @a (x :: a) = Case_0123456789876543210 a x x + Foo4 @a (x :: a) = Apply (LamCases_0123456789876543210Sym0 a x) x type Foo3 :: a -> b -> a type family Foo3 @a @b (a :: a) (a :: b) :: a where - Foo3 a b = Case_0123456789876543210 a b (Let0123456789876543210Scrutinee_0123456789876543210Sym0 a b) + Foo3 a b = Apply (LamCases_0123456789876543210Sym0 a b) (Apply (Apply Tuple2Sym0 a) b) type Foo2 :: a -> Maybe a -> a type family Foo2 @a (a :: a) (a :: Maybe a) :: a where - Foo2 d _ = Case_0123456789876543210 d (Let0123456789876543210Scrutinee_0123456789876543210Sym0 d) + Foo2 d _ = Apply (LamCases_0123456789876543210Sym0 d) (Apply JustSym0 d) type Foo1 :: a -> Maybe a -> a type family Foo1 @a (a :: a) (a :: Maybe a) :: a where - Foo1 d x = Case_0123456789876543210 d x x + Foo1 d x = Apply (LamCases_0123456789876543210Sym0 d x) x sFoo5 :: (forall (t :: a). Sing t -> Sing (Apply Foo5Sym0 t :: a) :: Type) sFoo4 :: forall a (t :: a). Sing t -> Sing (Apply Foo4Sym0 t :: a) @@ -181,56 +221,46 @@ Singletons/CaseExpressions.hs:(0,0)-(0,0): Splicing declarations (forall (t :: a) (t :: Maybe a). Sing t -> Sing t -> Sing (Apply (Apply Foo1Sym0 t) t :: a) :: Type) sFoo5 (sX :: Sing x) - = id - @(Sing (Case_0123456789876543210 x x)) - (case sX of - (sY :: Sing y) - -> applySing - (singFun1 - @(Lambda_0123456789876543210Sym0 y x) - (\ sArg_0123456789876543210 - -> case sArg_0123456789876543210 of - (_ :: Sing arg_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 arg_0123456789876543210 y x arg_0123456789876543210)) - (case sArg_0123456789876543210 of _ -> sX))) - sY) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 x) + (\cases + (sY :: Sing y) + -> applySing + (singFun1 @(LamCases_0123456789876543210Sym0 y x) (\cases _ -> sX)) + sY)) + sX sFoo4 (sX :: Sing x) - = id - @(Sing (Case_0123456789876543210 a x x)) - (case sX of - (sY :: Sing y) - -> let - sZ :: (Sing (Let0123456789876543210ZSym0 a y x :: a) :: Type) - sZ = sY - in sZ) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 a x) + (\cases + (sY :: Sing y) + -> let + sZ :: (Sing (Let0123456789876543210ZSym0 a y x :: a) :: Type) + sZ = sY + in sZ)) + sX sFoo3 (sA :: Sing a) (sB :: Sing b) - = let - sScrutinee_0123456789876543210 :: - Sing @_ (Let0123456789876543210Scrutinee_0123456789876543210Sym0 a b) - sScrutinee_0123456789876543210 - = applySing (applySing (singFun2 @Tuple2Sym0 STuple2) sA) sB - in - id - @(Sing (Case_0123456789876543210 a b (Let0123456789876543210Scrutinee_0123456789876543210Sym0 a b))) - (case sScrutinee_0123456789876543210 of - STuple2 (sP :: Sing p) _ -> sP) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 a b) + (\cases (STuple2 (sP :: Sing p) _) -> sP)) + (applySing (applySing (singFun2 @Tuple2Sym0 STuple2) sA) sB) sFoo2 (sD :: Sing d) _ - = let - sScrutinee_0123456789876543210 :: - Sing @_ (Let0123456789876543210Scrutinee_0123456789876543210Sym0 d) - sScrutinee_0123456789876543210 - = applySing (singFun1 @JustSym0 SJust) sD - in - id - @(Sing (Case_0123456789876543210 d (Let0123456789876543210Scrutinee_0123456789876543210Sym0 d))) - (case sScrutinee_0123456789876543210 of SJust (sY :: Sing y) -> sY) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 d) + (\cases (SJust (sY :: Sing y)) -> sY)) + (applySing (singFun1 @JustSym0 SJust) sD) sFoo1 (sD :: Sing d) (sX :: Sing x) - = id - @(Sing (Case_0123456789876543210 d x x)) - (case sX of - SJust (sY :: Sing y) -> sY - SNothing -> sD) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 d x) + (\cases + (SJust (sY :: Sing y)) -> sY + SNothing -> sD)) + sX instance SingI (Foo5Sym0 :: (~>) a a) where sing = singFun1 @Foo5Sym0 sFoo5 instance SingI (Foo4Sym0 :: (~>) a a) where diff --git a/singletons-base/tests/compile-and-dump/Singletons/Classes.golden b/singletons-base/tests/compile-and-dump/Singletons/Classes.golden index 55ac5b52..432c65a8 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Classes.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Classes.golden @@ -575,8 +575,8 @@ Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations fromSing (SSucc' b) = Succ' (fromSing b) toSing Zero' = SomeSing SZero' toSing (Succ' (b :: Demote Nat')) - = case toSing b :: SomeSing Nat' of - SomeSing c -> SomeSing (SSucc' c) + = (\cases (SomeSing c) -> SomeSing (SSucc' c)) + (toSing b :: SomeSing Nat') instance SMyOrd Nat' where sMycompare SZero' SZero' = SEQ sMycompare SZero' (SSucc' _) = SLT diff --git a/singletons-base/tests/compile-and-dump/Singletons/Classes2.golden b/singletons-base/tests/compile-and-dump/Singletons/Classes2.golden index 6bf5f3eb..0777ce05 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Classes2.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Classes2.golden @@ -71,8 +71,8 @@ Singletons/Classes2.hs:(0,0)-(0,0): Splicing declarations fromSing (SSuccFoo b) = SuccFoo (fromSing b) toSing ZeroFoo = SomeSing SZeroFoo toSing (SuccFoo (b :: Demote NatFoo)) - = case toSing b :: SomeSing NatFoo of - SomeSing c -> SomeSing (SSuccFoo c) + = (\cases (SomeSing c) -> SomeSing (SSuccFoo c)) + (toSing b :: SomeSing NatFoo) instance SMyOrd NatFoo where sMycompare SZeroFoo SZeroFoo = SEQ sMycompare SZeroFoo (SSuccFoo _) = SLT diff --git a/singletons-base/tests/compile-and-dump/Singletons/DataValues.golden b/singletons-base/tests/compile-and-dump/Singletons/DataValues.golden index 3db747b9..9c6ff9b6 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/DataValues.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/DataValues.golden @@ -144,8 +144,8 @@ Singletons/DataValues.hs:(0,0)-(0,0): Splicing declarations type Demote (Pair a b) = Pair (Demote a) (Demote b) fromSing (SPair b b) = Pair (fromSing b) (fromSing b) toSing (Pair (b :: Demote a) (b :: Demote b)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing b) of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SPair c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SPair c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing b) instance (SShow a, SShow b) => SShow (Pair a b) where sShowsPrec (sP_0123456789876543210 :: Sing p_0123456789876543210) diff --git a/singletons-base/tests/compile-and-dump/Singletons/Empty.golden b/singletons-base/tests/compile-and-dump/Singletons/Empty.golden index 39216696..ca1f55ff 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Empty.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Empty.golden @@ -6,5 +6,5 @@ Singletons/Empty.hs:(0,0)-(0,0): Splicing declarations type instance Sing @Empty = SEmpty instance SingKind Empty where type Demote Empty = Empty - fromSing x = case x of {} - toSing x = SomeSing (case x of {}) + fromSing x = (\case) x + toSing x = SomeSing ((\case) x) diff --git a/singletons-base/tests/compile-and-dump/Singletons/EmptyShowDeriving.golden b/singletons-base/tests/compile-and-dump/Singletons/EmptyShowDeriving.golden index a32d845f..f38b91af 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/EmptyShowDeriving.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/EmptyShowDeriving.golden @@ -6,11 +6,21 @@ Singletons/EmptyShowDeriving.hs:(0,0)-(0,0): Splicing declarations ======> data Foo deriving instance Show Foo - type family Case_0123456789876543210 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t where + type family LamCases_0123456789876543210 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + data LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 type ShowsPrec_0123456789876543210 :: GHC.Num.Natural.Natural -> Foo -> GHC.Types.Symbol -> GHC.Types.Symbol type family ShowsPrec_0123456789876543210 (a :: GHC.Num.Natural.Natural) (a :: Foo) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where - ShowsPrec_0123456789876543210 _ v_0123456789876543210 a_0123456789876543210 = Apply (Case_0123456789876543210 v_0123456789876543210 a_0123456789876543210 v_0123456789876543210) a_0123456789876543210 + ShowsPrec_0123456789876543210 _ v_0123456789876543210 a_0123456789876543210 = Apply (Apply (LamCases_0123456789876543210Sym0 v_0123456789876543210 a_0123456789876543210) v_0123456789876543210) a_0123456789876543210 type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Num.Natural.Natural ((~>) Foo ((~>) GHC.Types.Symbol GHC.Types.Symbol)) data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Num.Natural.Natural ((~>) Foo ((~>) GHC.Types.Symbol GHC.Types.Symbol)) where @@ -50,16 +60,18 @@ Singletons/EmptyShowDeriving.hs:(0,0)-(0,0): Splicing declarations type instance Sing @Foo = SFoo instance SingKind Foo where type Demote Foo = Foo - fromSing x = case x of {} - toSing x = SomeSing (case x of {}) + fromSing x = (\case) x + toSing x = SomeSing ((\case) x) instance SShow Foo where sShowsPrec _ (sV_0123456789876543210 :: Sing v_0123456789876543210) (sA_0123456789876543210 :: Sing a_0123456789876543210) = applySing - (id - @(Sing (Case_0123456789876543210 v_0123456789876543210 a_0123456789876543210 v_0123456789876543210)) - (case sV_0123456789876543210 of {})) + (applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 v_0123456789876543210 a_0123456789876543210) + (\case)) + sV_0123456789876543210) sA_0123456789876543210 deriving instance Show (SFoo (z :: Foo)) diff --git a/singletons-base/tests/compile-and-dump/Singletons/EnumDeriving.golden b/singletons-base/tests/compile-and-dump/Singletons/EnumDeriving.golden index 37d486bd..6318bf93 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/EnumDeriving.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/EnumDeriving.golden @@ -24,18 +24,48 @@ Singletons/EnumDeriving.hs:(0,0)-(0,0): Splicing declarations type Q2Sym0 :: Quux type family Q2Sym0 :: Quux where Q2Sym0 = Q2 - type family Case_0123456789876543210 n0123456789876543210 t where - Case_0123456789876543210 n 'True = BumSym0 - Case_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument" - type family Case_0123456789876543210 n0123456789876543210 t where - Case_0123456789876543210 n 'True = BazSym0 - Case_0123456789876543210 n 'False = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 2)) - type family Case_0123456789876543210 n0123456789876543210 t where - Case_0123456789876543210 n 'True = BarSym0 - Case_0123456789876543210 n 'False = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 1)) + type family LamCases_0123456789876543210 n0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 n 'True = BumSym0 + LamCases_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument" + data LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 n0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 n 'True = BazSym0 + LamCases_0123456789876543210 n 'False = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 2)) + data LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 n0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 n 'True = BarSym0 + LamCases_0123456789876543210 n 'False = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 1)) + data LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 type ToEnum_0123456789876543210 :: GHC.Num.Natural.Natural -> Foo type family ToEnum_0123456789876543210 (a :: GHC.Num.Natural.Natural) :: Foo where - ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 0)) + ToEnum_0123456789876543210 n = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 0)) type ToEnum_0123456789876543210Sym0 :: (~>) GHC.Num.Natural.Natural Foo data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Num.Natural.Natural Foo where @@ -97,36 +127,36 @@ Singletons/EnumDeriving.hs:(0,0)-(0,0): Splicing declarations toSing Q2 = SomeSing SQ2 instance SEnum Foo where sToEnum (sN :: Sing n) - = id - @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 0)))) - (case - applySing - (applySing (singFun2 @(==@#@$) (%==)) sN) - (sFromInteger (sing :: Sing 0)) - of - STrue -> SBar - SFalse - -> id - @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 1)))) - (case - applySing - (applySing (singFun2 @(==@#@$) (%==)) sN) - (sFromInteger (sing :: Sing 1)) - of - STrue -> SBaz - SFalse - -> id - @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 2)))) - (case - applySing - (applySing (singFun2 @(==@#@$) (%==)) sN) - (sFromInteger (sing :: Sing 2)) - of - STrue -> SBum - SFalse - -> applySing - (singFun1 @ErrorSym0 sError) - (sing :: Sing "toEnum: bad argument")))) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 n) + (\cases + STrue -> SBar + SFalse + -> applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 n) + (\cases + STrue -> SBaz + SFalse + -> applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 n) + (\cases + STrue -> SBum + SFalse + -> applySing + (singFun1 @ErrorSym0 sError) + (sing :: Sing "toEnum: bad argument"))) + (applySing + (applySing (singFun2 @(==@#@$) (%==)) sN) + (sFromInteger (sing :: Sing 2))))) + (applySing + (applySing (singFun2 @(==@#@$) (%==)) sN) + (sFromInteger (sing :: Sing 1))))) + (applySing + (applySing (singFun2 @(==@#@$) (%==)) sN) + (sFromInteger (sing :: Sing 0))) sFromEnum SBar = sFromInteger (sing :: Sing 0) sFromEnum SBaz = sFromInteger (sing :: Sing 1) sFromEnum SBum = sFromInteger (sing :: Sing 2) @@ -143,15 +173,35 @@ Singletons/EnumDeriving.hs:(0,0)-(0,0): Splicing declarations Singletons/EnumDeriving.hs:0:0:: Splicing declarations singEnumInstance ''Quux ======> - type family Case_0123456789876543210 n0123456789876543210 t where - Case_0123456789876543210 n 'True = Q2Sym0 - Case_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument" - type family Case_0123456789876543210 n0123456789876543210 t where - Case_0123456789876543210 n 'True = Q1Sym0 - Case_0123456789876543210 n 'False = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 1)) + type family LamCases_0123456789876543210 n0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 n 'True = Q2Sym0 + LamCases_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument" + data LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 n0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 n 'True = Q1Sym0 + LamCases_0123456789876543210 n 'False = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 1)) + data LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 type ToEnum_0123456789876543210 :: GHC.Num.Natural.Natural -> Quux type family ToEnum_0123456789876543210 (a :: GHC.Num.Natural.Natural) :: Quux where - ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 0)) + ToEnum_0123456789876543210 n = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 0)) type ToEnum_0123456789876543210Sym0 :: (~>) GHC.Num.Natural.Natural Quux data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Num.Natural.Natural Quux where @@ -188,26 +238,26 @@ Singletons/EnumDeriving.hs:0:0:: Splicing declarations type FromEnum a = Apply FromEnum_0123456789876543210Sym0 a instance SEnum Quux where sToEnum (sN :: Sing n) - = id - @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 0)))) - (case - applySing - (applySing (singFun2 @(==@#@$) (%==)) sN) - (sFromInteger (sing :: Sing 0)) - of - STrue -> SQ1 - SFalse - -> id - @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 1)))) - (case - applySing - (applySing (singFun2 @(==@#@$) (%==)) sN) - (sFromInteger (sing :: Sing 1)) - of - STrue -> SQ2 - SFalse - -> applySing - (singFun1 @ErrorSym0 sError) - (sing :: Sing "toEnum: bad argument"))) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 n) + (\cases + STrue -> SQ1 + SFalse + -> applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 n) + (\cases + STrue -> SQ2 + SFalse + -> applySing + (singFun1 @ErrorSym0 sError) + (sing :: Sing "toEnum: bad argument"))) + (applySing + (applySing (singFun2 @(==@#@$) (%==)) sN) + (sFromInteger (sing :: Sing 1))))) + (applySing + (applySing (singFun2 @(==@#@$) (%==)) sN) + (sFromInteger (sing :: Sing 0))) sFromEnum SQ1 = sFromInteger (sing :: Sing 0) sFromEnum SQ2 = sFromInteger (sing :: Sing 1) diff --git a/singletons-base/tests/compile-and-dump/Singletons/FunctorLikeDeriving.golden b/singletons-base/tests/compile-and-dump/Singletons/FunctorLikeDeriving.golden index d2ed4d2d..c5921500 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/FunctorLikeDeriving.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/FunctorLikeDeriving.golden @@ -60,35 +60,35 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations type MkT2Sym1 :: forall x a. Maybe x -> T x a type family MkT2Sym1 @x @a (a0123456789876543210 :: Maybe x) :: T x a where MkT2Sym1 a0123456789876543210 = MkT2 a0123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_0123456789876543210 where - Lambda_0123456789876543210 x _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_0123456789876543210 where - Lambda_0123456789876543210 x _f_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210 + data LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x _f_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210 + data LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 type Fmap_0123456789876543210 :: forall a b x. (~>) a b -> T x a -> T x b type family Fmap_0123456789876543210 @a @b @x (a :: (~>) a b) (a :: T x a) :: T x b where - Fmap_0123456789876543210 @a @b @x (_f_0123456789876543210 :: (~>) a b) (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 :: T x a) = Apply (Apply (Apply (Apply MkT1Sym0 (Apply (Lambda_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210)) (Apply _f_0123456789876543210 a_0123456789876543210)) (Apply (Apply FmapSym0 _f_0123456789876543210) a_0123456789876543210)) (Apply (Apply FmapSym0 (Apply FmapSym0 _f_0123456789876543210)) a_0123456789876543210) - Fmap_0123456789876543210 @a @b @x (_f_0123456789876543210 :: (~>) a b) (MkT2 a_0123456789876543210 :: T x a) = Apply MkT2Sym0 (Apply (Lambda_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210) a_0123456789876543210) + Fmap_0123456789876543210 @a @b @x (_f_0123456789876543210 :: (~>) a b) (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 :: T x a) = Apply (Apply (Apply (Apply MkT1Sym0 (Apply (LamCases_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210)) (Apply _f_0123456789876543210 a_0123456789876543210)) (Apply (Apply FmapSym0 _f_0123456789876543210) a_0123456789876543210)) (Apply (Apply FmapSym0 (Apply FmapSym0 _f_0123456789876543210)) a_0123456789876543210) + Fmap_0123456789876543210 @a @b @x (_f_0123456789876543210 :: (~>) a b) (MkT2 a_0123456789876543210 :: T x a) = Apply MkT2Sym0 (Apply (LamCases_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210) a_0123456789876543210) type Fmap_0123456789876543210Sym0 :: forall a b x. (~>) ((~>) a b) ((~>) (T x a) (T x b)) @@ -114,47 +114,47 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations -> T x a -> T x b type family Fmap_0123456789876543210Sym2 @a @b @x (a0123456789876543210 :: (~>) a b) (a0123456789876543210 :: T x a) :: T x b where Fmap_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 = Fmap_0123456789876543210 a0123456789876543210 a0123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_0123456789876543210 where - Lambda_0123456789876543210 x _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_0123456789876543210 where - Lambda_0123456789876543210 x _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = _z_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_0123456789876543210 where - Lambda_0123456789876543210 x _z_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210 + data LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 _ = _z_0123456789876543210 + data LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x _z_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210 + data LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 type TFHelper_0123456789876543210 :: forall a x b. a -> T x b -> T x a type family TFHelper_0123456789876543210 @a @x @b (a :: a) (a :: T x b) :: T x a where - TFHelper_0123456789876543210 @a @x @b (_z_0123456789876543210 :: a) (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 :: T x b) = Apply (Apply (Apply (Apply MkT1Sym0 (Apply (Lambda_0123456789876543210Sym0 x _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210)) (Apply (Lambda_0123456789876543210Sym0 x _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210)) (Apply (Apply (<$@#@$) _z_0123456789876543210) a_0123456789876543210)) (Apply (Apply FmapSym0 (Apply (<$@#@$) _z_0123456789876543210)) a_0123456789876543210) - TFHelper_0123456789876543210 @a @x @b (_z_0123456789876543210 :: a) (MkT2 a_0123456789876543210 :: T x b) = Apply MkT2Sym0 (Apply (Lambda_0123456789876543210Sym0 x _z_0123456789876543210 a_0123456789876543210) a_0123456789876543210) + TFHelper_0123456789876543210 @a @x @b (_z_0123456789876543210 :: a) (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 :: T x b) = Apply (Apply (Apply (Apply MkT1Sym0 (Apply (LamCases_0123456789876543210Sym0 x _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210)) (Apply (LamCases_0123456789876543210Sym0 x _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210)) (Apply (Apply (<$@#@$) _z_0123456789876543210) a_0123456789876543210)) (Apply (Apply FmapSym0 (Apply (<$@#@$) _z_0123456789876543210)) a_0123456789876543210) + TFHelper_0123456789876543210 @a @x @b (_z_0123456789876543210 :: a) (MkT2 a_0123456789876543210 :: T x b) = Apply MkT2Sym0 (Apply (LamCases_0123456789876543210Sym0 x _z_0123456789876543210 a_0123456789876543210) a_0123456789876543210) type TFHelper_0123456789876543210Sym0 :: forall a x b. (~>) a ((~>) (T x b) (T x a)) @@ -183,35 +183,35 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations instance PFunctor (T x) where type Fmap a a = Apply (Apply Fmap_0123456789876543210Sym0 a) a type (<$) a a = Apply (Apply TFHelper_0123456789876543210Sym0 a) a - type family Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_0123456789876543210 where - Lambda_0123456789876543210 x _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = MemptySym0 - data Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_0123456789876543210 where - Lambda_0123456789876543210 x _f_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = MemptySym0 - data Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 _ = MemptySym0 + data LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x _f_0123456789876543210 a_0123456789876543210 _ = MemptySym0 + data LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 type FoldMap_0123456789876543210 :: forall a m x. (~>) a m -> T x a -> m type family FoldMap_0123456789876543210 @a @m @x (a :: (~>) a m) (a :: T x a) :: m where - FoldMap_0123456789876543210 @a @m @x (_f_0123456789876543210 :: (~>) a m) (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 :: T x a) = Apply (Apply MappendSym0 (Apply (Lambda_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210)) (Apply (Apply MappendSym0 (Apply _f_0123456789876543210 a_0123456789876543210)) (Apply (Apply MappendSym0 (Apply (Apply FoldMapSym0 _f_0123456789876543210) a_0123456789876543210)) (Apply (Apply FoldMapSym0 (Apply FoldMapSym0 _f_0123456789876543210)) a_0123456789876543210))) - FoldMap_0123456789876543210 @a @m @x (_f_0123456789876543210 :: (~>) a m) (MkT2 a_0123456789876543210 :: T x a) = Apply (Lambda_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210) a_0123456789876543210 + FoldMap_0123456789876543210 @a @m @x (_f_0123456789876543210 :: (~>) a m) (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 :: T x a) = Apply (Apply MappendSym0 (Apply (LamCases_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210)) (Apply (Apply MappendSym0 (Apply _f_0123456789876543210 a_0123456789876543210)) (Apply (Apply MappendSym0 (Apply (Apply FoldMapSym0 _f_0123456789876543210) a_0123456789876543210)) (Apply (Apply FoldMapSym0 (Apply FoldMapSym0 _f_0123456789876543210)) a_0123456789876543210))) + FoldMap_0123456789876543210 @a @m @x (_f_0123456789876543210 :: (~>) a m) (MkT2 a_0123456789876543210 :: T x a) = Apply (LamCases_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210) a_0123456789876543210 type FoldMap_0123456789876543210Sym0 :: forall a m x. (~>) ((~>) a m) ((~>) (T x a) m) @@ -237,111 +237,111 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations -> T x a -> m type family FoldMap_0123456789876543210Sym2 @a @m @x (a0123456789876543210 :: (~>) a m) (a0123456789876543210 :: T x a) :: m where FoldMap_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 = FoldMap_0123456789876543210 a0123456789876543210 a0123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_0123456789876543210 n2_0123456789876543210 where - Lambda_0123456789876543210 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = n2_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n1_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - data Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym1KindInference ()) - type family Lambda_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_0123456789876543210 n2_0123456789876543210 where - Lambda_0123456789876543210 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = Apply (Apply (Apply FoldrSym0 _f_0123456789876543210) n2_0123456789876543210) n1_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n1_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - data Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym1KindInference ()) - type family Lambda_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_0123456789876543210 n2_0123456789876543210 where - Lambda_0123456789876543210 x n1_0123456789876543210 n2_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = Apply (Apply (Apply FoldrSym0 _f_0123456789876543210) n2_0123456789876543210) n1_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n1_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - data Lambda_0123456789876543210Sym1 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym1 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym1KindInference ()) - type family Lambda_0123456789876543210Sym2 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_0123456789876543210 n2_0123456789876543210 where - Lambda_0123456789876543210 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = Apply (Apply (Apply FoldrSym0 (Lambda_0123456789876543210Sym0 x n1_0123456789876543210 n2_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210)) n2_0123456789876543210) n1_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n1_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - data Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym1KindInference ()) - type family Lambda_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_0123456789876543210 n2_0123456789876543210 where - Lambda_0123456789876543210 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = n2_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n1_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - data Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where - suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym1KindInference ()) - type family Lambda_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 _ n_0123456789876543210 = n_0123456789876543210 + data LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + data LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym1KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym1KindInference ()) + type family LamCases_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = Apply (Apply (Apply FoldrSym0 _f_0123456789876543210) n2_0123456789876543210) n1_0123456789876543210 + data LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + data LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym1KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym1KindInference ()) + type family LamCases_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x n1_0123456789876543210 n2_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = Apply (Apply (Apply FoldrSym0 _f_0123456789876543210) n2_0123456789876543210) n1_0123456789876543210 + data LamCases_0123456789876543210Sym0 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210Sym1 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + data LamCases_0123456789876543210Sym1 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym1KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym1 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym2 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym1 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym1 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym1 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym1KindInference ()) + type family LamCases_0123456789876543210Sym2 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym2 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = Apply (Apply (Apply FoldrSym0 (LamCases_0123456789876543210Sym0 x n1_0123456789876543210 n2_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210)) n2_0123456789876543210) n1_0123456789876543210 + data LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + data LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym1KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym1KindInference ()) + type family LamCases_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 _ n_0123456789876543210 = n_0123456789876543210 + data LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + data LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym1KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym1 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym1KindInference ()) + type family LamCases_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym2 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 type Foldr_0123456789876543210 :: forall a b x. (~>) a ((~>) b b) -> b -> T x a -> b type family Foldr_0123456789876543210 @a @b @x (a :: (~>) a ((~>) b b)) (a :: b) (a :: T x a) :: b where - Foldr_0123456789876543210 @a @b @x (_f_0123456789876543210 :: (~>) a ((~>) b b)) (_z_0123456789876543210 :: b) (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 :: T x a) = Apply (Apply (Lambda_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210) (Apply (Apply _f_0123456789876543210 a_0123456789876543210) (Apply (Apply (Lambda_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210) (Apply (Apply (Lambda_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210) _z_0123456789876543210))) - Foldr_0123456789876543210 @a @b @x (_f_0123456789876543210 :: (~>) a ((~>) b b)) (_z_0123456789876543210 :: b) (MkT2 a_0123456789876543210 :: T x a) = Apply (Apply (Lambda_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210) a_0123456789876543210) _z_0123456789876543210 + Foldr_0123456789876543210 @a @b @x (_f_0123456789876543210 :: (~>) a ((~>) b b)) (_z_0123456789876543210 :: b) (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 :: T x a) = Apply (Apply (LamCases_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210) (Apply (Apply _f_0123456789876543210 a_0123456789876543210) (Apply (Apply (LamCases_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210) (Apply (Apply (LamCases_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210) _z_0123456789876543210))) + Foldr_0123456789876543210 @a @b @x (_f_0123456789876543210 :: (~>) a ((~>) b b)) (_z_0123456789876543210 :: b) (MkT2 a_0123456789876543210 :: T x a) = Apply (Apply (LamCases_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210) a_0123456789876543210) _z_0123456789876543210 type Foldr_0123456789876543210Sym0 :: forall a b x. (~>) ((~>) a ((~>) b b)) ((~>) b ((~>) (T x a) b)) @@ -420,11 +420,21 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations Traverse_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 = Traverse_0123456789876543210 a0123456789876543210 a0123456789876543210 instance PTraversable (T x) where type Traverse a a = Apply (Apply Traverse_0123456789876543210Sym0 a) a - type family Case_0123456789876543210 v_01234567898765432100123456789876543210 t where + type family LamCases_0123456789876543210 v_01234567898765432100123456789876543210 a_0123456789876543210 where + data LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 v_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 type Fmap_0123456789876543210 :: forall a b. (~>) a b -> Empty a -> Empty b type family Fmap_0123456789876543210 @a @b (a :: (~>) a b) (a :: Empty a) :: Empty b where - Fmap_0123456789876543210 @a @b _ v_0123456789876543210 = Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210 + Fmap_0123456789876543210 @a @b _ v_0123456789876543210 = Apply (LamCases_0123456789876543210Sym0 v_0123456789876543210) v_0123456789876543210 type Fmap_0123456789876543210Sym0 :: forall a b. (~>) ((~>) a b) ((~>) (Empty a) (Empty b)) data Fmap_0123456789876543210Sym0 :: (~>) ((~>) a b) ((~>) (Empty a) (Empty b)) @@ -449,11 +459,21 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations -> Empty a -> Empty b type family Fmap_0123456789876543210Sym2 @a @b (a0123456789876543210 :: (~>) a b) (a0123456789876543210 :: Empty a) :: Empty b where Fmap_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 = Fmap_0123456789876543210 a0123456789876543210 a0123456789876543210 - type family Case_0123456789876543210 v_01234567898765432100123456789876543210 t where + type family LamCases_0123456789876543210 v_01234567898765432100123456789876543210 a_0123456789876543210 where + data LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 v_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 type TFHelper_0123456789876543210 :: forall a b. a -> Empty b -> Empty a type family TFHelper_0123456789876543210 @a @b (a :: a) (a :: Empty b) :: Empty a where - TFHelper_0123456789876543210 @a @b _ v_0123456789876543210 = Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210 + TFHelper_0123456789876543210 @a @b _ v_0123456789876543210 = Apply (LamCases_0123456789876543210Sym0 v_0123456789876543210) v_0123456789876543210 type TFHelper_0123456789876543210Sym0 :: forall a b. (~>) a ((~>) (Empty b) (Empty a)) data TFHelper_0123456789876543210Sym0 :: (~>) a ((~>) (Empty b) (Empty a)) @@ -511,11 +531,21 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations FoldMap_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 = FoldMap_0123456789876543210 a0123456789876543210 a0123456789876543210 instance PFoldable Empty where type FoldMap a a = Apply (Apply FoldMap_0123456789876543210Sym0 a) a - type family Case_0123456789876543210 v_01234567898765432100123456789876543210 t where + type family LamCases_0123456789876543210 v_01234567898765432100123456789876543210 a_0123456789876543210 where + data LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 v_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 v_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 v_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 type Traverse_0123456789876543210 :: forall a f b. (~>) a (f b) -> Empty a -> f (Empty b) type family Traverse_0123456789876543210 @a @f @b (a :: (~>) a (f b)) (a :: Empty a) :: f (Empty b) where - Traverse_0123456789876543210 @a @f @b _ v_0123456789876543210 = Apply PureSym0 (Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210) + Traverse_0123456789876543210 @a @f @b _ v_0123456789876543210 = Apply PureSym0 (Apply (LamCases_0123456789876543210Sym0 v_0123456789876543210) v_0123456789876543210) type Traverse_0123456789876543210Sym0 :: forall a f b. (~>) ((~>) a (f b)) ((~>) (Empty a) (f (Empty b))) @@ -567,23 +597,21 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations toSing (MkT1 (b :: Demote x) (b :: Demote a) (b :: Demote (Maybe a)) (b :: Demote (Maybe (Maybe a)))) - = case - (,,,) - (toSing b :: SomeSing x) (toSing b :: SomeSing a) - (toSing b :: SomeSing (Maybe a)) - (toSing b :: SomeSing (Maybe (Maybe a))) - of - (,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c) - -> SomeSing (SMkT1 c c c c) + = (\cases + (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c) + -> SomeSing (SMkT1 c c c c)) + (toSing b :: SomeSing x) (toSing b :: SomeSing a) + (toSing b :: SomeSing (Maybe a)) + (toSing b :: SomeSing (Maybe (Maybe a))) toSing (MkT2 (b :: Demote (Maybe x))) - = case toSing b :: SomeSing (Maybe x) of - SomeSing c -> SomeSing (SMkT2 c) + = (\cases (SomeSing c) -> SomeSing (SMkT2 c)) + (toSing b :: SomeSing (Maybe x)) data SEmpty :: forall (a :: Type). Empty a -> Type type instance Sing @(Empty a) = SEmpty instance SingKind a => SingKind (Empty a) where type Demote (Empty a) = Empty (Demote a) - fromSing x = case x of {} - toSing x = SomeSing (case x of {}) + fromSing x = (\case) x + toSing x = SomeSing ((\case) x) instance SFunctor (T x) where sFmap (_sf_0123456789876543210 :: Sing _f_0123456789876543210) @@ -598,10 +626,10 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations (singFun4 @MkT1Sym0 SMkT1) (applySing (singFun1 - @(Lambda_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) - (\ sN_0123456789876543210 - -> case sN_0123456789876543210 of - (_ :: Sing n_0123456789876543210) -> sN_0123456789876543210)) + @(LamCases_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) + (\cases + (sN_0123456789876543210 :: Sing n_0123456789876543210) + -> sN_0123456789876543210)) sA_0123456789876543210)) (applySing _sf_0123456789876543210 sA_0123456789876543210)) (applySing @@ -619,10 +647,10 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations (singFun1 @MkT2Sym0 SMkT2) (applySing (singFun1 - @(Lambda_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210) - (\ sN_0123456789876543210 - -> case sN_0123456789876543210 of - (_ :: Sing n_0123456789876543210) -> sN_0123456789876543210)) + @(LamCases_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210) + (\cases + (sN_0123456789876543210 :: Sing n_0123456789876543210) + -> sN_0123456789876543210)) sA_0123456789876543210) (%<$) (_sz_0123456789876543210 :: Sing _z_0123456789876543210) @@ -637,17 +665,15 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations (singFun4 @MkT1Sym0 SMkT1) (applySing (singFun1 - @(Lambda_0123456789876543210Sym0 x _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) - (\ sN_0123456789876543210 - -> case sN_0123456789876543210 of - (_ :: Sing n_0123456789876543210) -> sN_0123456789876543210)) + @(LamCases_0123456789876543210Sym0 x _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) + (\cases + (sN_0123456789876543210 :: Sing n_0123456789876543210) + -> sN_0123456789876543210)) sA_0123456789876543210)) (applySing (singFun1 - @(Lambda_0123456789876543210Sym0 x _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) - (\ sN_0123456789876543210 - -> case sN_0123456789876543210 of - (_ :: Sing n_0123456789876543210) -> _sz_0123456789876543210)) + @(LamCases_0123456789876543210Sym0 x _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) + (\cases _ -> _sz_0123456789876543210)) sA_0123456789876543210)) (applySing (applySing (singFun2 @(<$@#@$) (%<$)) _sz_0123456789876543210) @@ -664,10 +690,10 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations (singFun1 @MkT2Sym0 SMkT2) (applySing (singFun1 - @(Lambda_0123456789876543210Sym0 x _z_0123456789876543210 a_0123456789876543210) - (\ sN_0123456789876543210 - -> case sN_0123456789876543210 of - (_ :: Sing n_0123456789876543210) -> sN_0123456789876543210)) + @(LamCases_0123456789876543210Sym0 x _z_0123456789876543210 a_0123456789876543210) + (\cases + (sN_0123456789876543210 :: Sing n_0123456789876543210) + -> sN_0123456789876543210)) sA_0123456789876543210) instance SFoldable (T x) where sFoldMap @@ -681,10 +707,8 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations (singFun2 @MappendSym0 sMappend) (applySing (singFun1 - @(Lambda_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) - (\ sN_0123456789876543210 - -> case sN_0123456789876543210 of - (_ :: Sing n_0123456789876543210) -> sMempty)) + @(LamCases_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) + (\cases _ -> sMempty)) sA_0123456789876543210)) (applySing (applySing @@ -708,10 +732,8 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations (SMkT2 (sA_0123456789876543210 :: Sing a_0123456789876543210)) = applySing (singFun1 - @(Lambda_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210) - (\ sN_0123456789876543210 - -> case sN_0123456789876543210 of - (_ :: Sing n_0123456789876543210) -> sMempty)) + @(LamCases_0123456789876543210Sym0 x _f_0123456789876543210 a_0123456789876543210) + (\cases _ -> sMempty)) sA_0123456789876543210 sFoldr (_sf_0123456789876543210 :: Sing _f_0123456789876543210) @@ -723,62 +745,52 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations = applySing (applySing (singFun2 - @(Lambda_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) - (\ sN1_0123456789876543210 sN2_0123456789876543210 - -> case (,) sN1_0123456789876543210 sN2_0123456789876543210 of - (,) (_ :: Sing n1_0123456789876543210) - (_ :: Sing n2_0123456789876543210) - -> sN2_0123456789876543210)) + @(LamCases_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) + (\cases + _ (sN_0123456789876543210 :: Sing n_0123456789876543210) + -> sN_0123456789876543210)) sA_0123456789876543210) (applySing (applySing _sf_0123456789876543210 sA_0123456789876543210) (applySing (applySing (singFun2 - @(Lambda_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) - (\ sN1_0123456789876543210 sN2_0123456789876543210 - -> case (,) sN1_0123456789876543210 sN2_0123456789876543210 of - (,) (_ :: Sing n1_0123456789876543210) - (_ :: Sing n2_0123456789876543210) - -> applySing - (applySing - (applySing - (singFun3 @FoldrSym0 sFoldr) _sf_0123456789876543210) - sN2_0123456789876543210) - sN1_0123456789876543210)) + @(LamCases_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) + (\cases + (sN1_0123456789876543210 :: Sing n1_0123456789876543210) + (sN2_0123456789876543210 :: Sing n2_0123456789876543210) + -> applySing + (applySing + (applySing + (singFun3 @FoldrSym0 sFoldr) _sf_0123456789876543210) + sN2_0123456789876543210) + sN1_0123456789876543210)) sA_0123456789876543210) (applySing (applySing (singFun2 - @(Lambda_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) - (\ sN1_0123456789876543210 sN2_0123456789876543210 - -> case (,) sN1_0123456789876543210 sN2_0123456789876543210 of - (,) (_ :: Sing n1_0123456789876543210) - (_ :: Sing n2_0123456789876543210) - -> applySing - (applySing - (applySing - (singFun3 @FoldrSym0 sFoldr) - (singFun2 - @(Lambda_0123456789876543210Sym0 x n1_0123456789876543210 n2_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) - (\ sN1_0123456789876543210 - sN2_0123456789876543210 - -> case - (,) - sN1_0123456789876543210 - sN2_0123456789876543210 - of - (,) (_ :: Sing n1_0123456789876543210) - (_ :: Sing n2_0123456789876543210) - -> applySing - (applySing - (applySing - (singFun3 @FoldrSym0 sFoldr) - _sf_0123456789876543210) - sN2_0123456789876543210) - sN1_0123456789876543210))) - sN2_0123456789876543210) - sN1_0123456789876543210)) + @(LamCases_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) + (\cases + (sN1_0123456789876543210 :: Sing n1_0123456789876543210) + (sN2_0123456789876543210 :: Sing n2_0123456789876543210) + -> applySing + (applySing + (applySing + (singFun3 @FoldrSym0 sFoldr) + (singFun2 + @(LamCases_0123456789876543210Sym0 x n1_0123456789876543210 n2_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) + (\cases + (sN1_0123456789876543210 :: Sing n1_0123456789876543210) + (sN2_0123456789876543210 :: Sing n2_0123456789876543210) + -> applySing + (applySing + (applySing + (singFun3 @FoldrSym0 sFoldr) + _sf_0123456789876543210) + sN2_0123456789876543210) + sN1_0123456789876543210))) + sN2_0123456789876543210) + sN1_0123456789876543210)) sA_0123456789876543210) _sz_0123456789876543210))) sFoldr @@ -788,12 +800,10 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations = applySing (applySing (singFun2 - @(Lambda_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210) - (\ sN1_0123456789876543210 sN2_0123456789876543210 - -> case (,) sN1_0123456789876543210 sN2_0123456789876543210 of - (,) (_ :: Sing n1_0123456789876543210) - (_ :: Sing n2_0123456789876543210) - -> sN2_0123456789876543210)) + @(LamCases_0123456789876543210Sym0 x _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210) + (\cases + _ (sN_0123456789876543210 :: Sing n_0123456789876543210) + -> sN_0123456789876543210)) sA_0123456789876543210) _sz_0123456789876543210 instance STraversable (T x) where @@ -833,22 +843,25 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations (applySing (singFun1 @PureSym0 sPure) sA_0123456789876543210) instance SFunctor Empty where sFmap _ (sV_0123456789876543210 :: Sing v_0123456789876543210) - = id - @(Sing (Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210)) - (case sV_0123456789876543210 of {}) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 v_0123456789876543210) (\case)) + sV_0123456789876543210 (%<$) _ (sV_0123456789876543210 :: Sing v_0123456789876543210) - = id - @(Sing (Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210)) - (case sV_0123456789876543210 of {}) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 v_0123456789876543210) (\case)) + sV_0123456789876543210 instance SFoldable Empty where sFoldMap _ _ = sMempty instance STraversable Empty where sTraverse _ (sV_0123456789876543210 :: Sing v_0123456789876543210) = applySing (singFun1 @PureSym0 sPure) - (id - @(Sing (Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210)) - (case sV_0123456789876543210 of {})) + (applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 v_0123456789876543210) (\case)) + sV_0123456789876543210) instance (SingI n, SingI n, SingI n, SingI n) => SingI (MkT1 (n :: x) (n :: a) (n :: Maybe a) (n :: Maybe (Maybe a))) where sing = SMkT1 sing sing sing sing diff --git a/singletons-base/tests/compile-and-dump/Singletons/HigherOrder.golden b/singletons-base/tests/compile-and-dump/Singletons/HigherOrder.golden index ac0111ba..f368fba8 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/HigherOrder.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/HigherOrder.golden @@ -62,52 +62,72 @@ Singletons/HigherOrder.hs:(0,0)-(0,0): Splicing declarations type RightSym1 :: forall a b. b -> Either a b type family RightSym1 @a @b (a0123456789876543210 :: b) :: Either a b where RightSym1 a0123456789876543210 = Right a0123456789876543210 - type family Case_0123456789876543210 n0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t where - Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 'True = Apply SuccSym0 (Apply SuccSym0 n) - Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 'False = n - type family Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n b where - Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n b = Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 b - data Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 + type family LamCases_0123456789876543210 n0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 'True = Apply SuccSym0 (Apply SuccSym0 n) + LamCases_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 'False = n + data LamCases_0123456789876543210Sym0 n0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n0123456789876543210 = Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 n0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 n0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - data Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 b0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 n0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 n0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n b = Apply (LamCases_0123456789876543210Sym0 n b a_0123456789876543210 a_0123456789876543210) b + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210) arg) (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 arg) => - Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 b0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 b0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym1KindInference ()) - type family Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 b0123456789876543210 where - Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 b0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 b0123456789876543210 - type family Case_0123456789876543210 n0123456789876543210 b0123456789876543210 ns0123456789876543210 bs0123456789876543210 t where - Case_0123456789876543210 n b ns bs 'True = Apply SuccSym0 (Apply SuccSym0 n) - Case_0123456789876543210 n b ns bs 'False = n - type family Lambda_0123456789876543210 ns0123456789876543210 bs0123456789876543210 n b where - Lambda_0123456789876543210 ns bs n b = Case_0123456789876543210 n b ns bs b - data Lambda_0123456789876543210Sym0 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + data LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 ns0123456789876543210 bs0123456789876543210) arg) (Lambda_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 ns0123456789876543210 bs0123456789876543210) n0123456789876543210 = Lambda_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 ns0123456789876543210 bs0123456789876543210) where + LamCases_0123456789876543210Sym1KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - data Lambda_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 b0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym1KindInference ()) + type family LamCases_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 n0123456789876543210 b0123456789876543210 ns0123456789876543210 bs0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 n b ns bs 'True = Apply SuccSym0 (Apply SuccSym0 n) + LamCases_0123456789876543210 n b ns bs 'False = n + data LamCases_0123456789876543210Sym0 n0123456789876543210 b0123456789876543210 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 n0123456789876543210) arg) (Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 arg) => - Lambda_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 b0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 n0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 b0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 n0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210 b0123456789876543210 ns0123456789876543210 bs0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 b0123456789876543210 ns0123456789876543210 bs0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 n0123456789876543210 b0123456789876543210 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 n0123456789876543210 b0123456789876543210 ns0123456789876543210 bs0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 b0123456789876543210 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210 b0123456789876543210 ns0123456789876543210 bs0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym1KindInference ()) - type family Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 b0123456789876543210 where - Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 b0123456789876543210 = Lambda_0123456789876543210 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 b0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 n0123456789876543210 b0123456789876543210 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 n0123456789876543210 b0123456789876543210 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 b0123456789876543210 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 ns0123456789876543210 bs0123456789876543210 a_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 ns bs n b = Apply (LamCases_0123456789876543210Sym0 n b ns bs) b + data LamCases_0123456789876543210Sym0 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 ns0123456789876543210 bs0123456789876543210) arg) (LamCases_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 ns0123456789876543210 bs0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 ns0123456789876543210 bs0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + data LamCases_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym1KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym1KindInference ()) + type family LamCases_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 ns0123456789876543210 bs0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 type EtadSym0 :: (~>) [Nat] ((~>) [Bool] [Nat]) data EtadSym0 :: (~>) [Nat] ((~>) [Bool] [Nat]) where @@ -241,10 +261,10 @@ Singletons/HigherOrder.hs:(0,0)-(0,0): Splicing declarations MapSym2 a0123456789876543210 a0123456789876543210 = Map a0123456789876543210 a0123456789876543210 type Etad :: [Nat] -> [Bool] -> [Nat] type family Etad (a :: [Nat]) (a :: [Bool]) :: [Nat] where - Etad a_0123456789876543210 a_0123456789876543210 = Apply (Apply (Apply ZipWithSym0 (Lambda_0123456789876543210Sym0 a_0123456789876543210 a_0123456789876543210)) a_0123456789876543210) a_0123456789876543210 + Etad a_0123456789876543210 a_0123456789876543210 = Apply (Apply (Apply ZipWithSym0 (LamCases_0123456789876543210Sym0 a_0123456789876543210 a_0123456789876543210)) a_0123456789876543210) a_0123456789876543210 type Splunge :: [Nat] -> [Bool] -> [Nat] type family Splunge (a :: [Nat]) (a :: [Bool]) :: [Nat] where - Splunge ns bs = Apply (Apply (Apply ZipWithSym0 (Lambda_0123456789876543210Sym0 ns bs)) ns) bs + Splunge ns bs = Apply (Apply (Apply ZipWithSym0 (LamCases_0123456789876543210Sym0 ns bs)) ns) bs type Foo :: (~>) ((~>) a b) ((~>) a b) -> (~>) a b -> a -> b type family Foo @a @b (a :: (~>) ((~>) a b) ((~>) a b)) (a :: (~>) a b) (a :: a) :: b where Foo f g a = Apply (Apply f g) a @@ -299,18 +319,19 @@ Singletons/HigherOrder.hs:(0,0)-(0,0): Splicing declarations (applySing (singFun3 @ZipWithSym0 sZipWith) (singFun2 - @(Lambda_0123456789876543210Sym0 a_0123456789876543210 a_0123456789876543210) - (\ sN sB - -> case (,) sN sB of - (,) (_ :: Sing n) (_ :: Sing b) - -> id - @(Sing (Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 b)) - (case sB of - STrue - -> applySing - (singFun1 @SuccSym0 SSucc) - (applySing (singFun1 @SuccSym0 SSucc) sN) - SFalse -> sN)))) + @(LamCases_0123456789876543210Sym0 a_0123456789876543210 a_0123456789876543210) + (\cases + (sN :: Sing n) (sB :: Sing b) + -> applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 n b a_0123456789876543210 a_0123456789876543210) + (\cases + STrue + -> applySing + (singFun1 @SuccSym0 SSucc) + (applySing (singFun1 @SuccSym0 SSucc) sN) + SFalse -> sN)) + sB))) sA_0123456789876543210) sA_0123456789876543210 sSplunge (sNs :: Sing ns) (sBs :: Sing bs) @@ -319,18 +340,19 @@ Singletons/HigherOrder.hs:(0,0)-(0,0): Splicing declarations (applySing (singFun3 @ZipWithSym0 sZipWith) (singFun2 - @(Lambda_0123456789876543210Sym0 ns bs) - (\ sN sB - -> case (,) sN sB of - (,) (_ :: Sing n) (_ :: Sing b) - -> id - @(Sing (Case_0123456789876543210 n b ns bs b)) - (case sB of - STrue - -> applySing - (singFun1 @SuccSym0 SSucc) - (applySing (singFun1 @SuccSym0 SSucc) sN) - SFalse -> sN)))) + @(LamCases_0123456789876543210Sym0 ns bs) + (\cases + (sN :: Sing n) (sB :: Sing b) + -> applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 n b ns bs) + (\cases + STrue + -> applySing + (singFun1 @SuccSym0 SSucc) + (applySing (singFun1 @SuccSym0 SSucc) sN) + SFalse -> sN)) + sB))) sNs) sBs sFoo (sF :: Sing f) (sG :: Sing g) (sA :: Sing a) @@ -465,9 +487,11 @@ Singletons/HigherOrder.hs:(0,0)-(0,0): Splicing declarations fromSing (SLeft b) = Left (fromSing b) fromSing (SRight b) = Right (fromSing b) toSing (Left (b :: Demote a)) - = case toSing b :: SomeSing a of SomeSing c -> SomeSing (SLeft c) + = (\cases (SomeSing c) -> SomeSing (SLeft c)) + (toSing b :: SomeSing a) toSing (Right (b :: Demote b)) - = case toSing b :: SomeSing b of SomeSing c -> SomeSing (SRight c) + = (\cases (SomeSing c) -> SomeSing (SRight c)) + (toSing b :: SomeSing b) instance SingI n => SingI (Left (n :: a)) where sing = SLeft sing instance SingI1 Left where diff --git a/singletons-base/tests/compile-and-dump/Singletons/LambdaCase.golden b/singletons-base/tests/compile-and-dump/Singletons/LambdaCase.golden index db9082e6..6fd025e1 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/LambdaCase.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/LambdaCase.golden @@ -29,50 +29,44 @@ Singletons/LambdaCase.hs:(0,0)-(0,0): Splicing declarations (Just d) foo3 :: a -> b -> a foo3 a b = (\case (p, _) -> p) (a, b) - type family Case_0123456789876543210 x_01234567898765432100123456789876543210 a0123456789876543210 b0123456789876543210 t where - Case_0123456789876543210 x_0123456789876543210 a b '(p, _) = p - type family Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 x_0123456789876543210 where - Lambda_0123456789876543210 a b x_0123456789876543210 = Case_0123456789876543210 x_0123456789876543210 a b x_0123456789876543210 - data Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 x_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a b '(p, _) = p + data LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 x_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) x_01234567898765432100123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 x_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) arg) (LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 x_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 x_01234567898765432100123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 x_01234567898765432100123456789876543210 - type family Case_0123456789876543210 x_01234567898765432100123456789876543210 d0123456789876543210 t where - Case_0123456789876543210 x_0123456789876543210 d ('Just y) = y - Case_0123456789876543210 x_0123456789876543210 d 'Nothing = d - type family Lambda_0123456789876543210 d0123456789876543210 x_0123456789876543210 where - Lambda_0123456789876543210 d x_0123456789876543210 = Case_0123456789876543210 x_0123456789876543210 d x_0123456789876543210 - data Lambda_0123456789876543210Sym0 d0123456789876543210 x_01234567898765432100123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 d0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 d ('Just y) = y + LamCases_0123456789876543210 d 'Nothing = d + data LamCases_0123456789876543210Sym0 d0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 d0123456789876543210) arg) (Lambda_0123456789876543210Sym1 d0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 d0123456789876543210 x_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 d0123456789876543210) x_01234567898765432100123456789876543210 = Lambda_0123456789876543210 d0123456789876543210 x_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 d0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 d0123456789876543210) arg) (LamCases_0123456789876543210Sym1 d0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 d0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 d0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 d0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 d0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 d0123456789876543210 x_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 d0123456789876543210 x_01234567898765432100123456789876543210 = Lambda_0123456789876543210 d0123456789876543210 x_01234567898765432100123456789876543210 - type family Case_0123456789876543210 x_01234567898765432100123456789876543210 d0123456789876543210 x0123456789876543210 t where - Case_0123456789876543210 x_0123456789876543210 d x ('Just y) = y - Case_0123456789876543210 x_0123456789876543210 d x 'Nothing = d - type family Lambda_0123456789876543210 d0123456789876543210 x0123456789876543210 x_0123456789876543210 where - Lambda_0123456789876543210 d x x_0123456789876543210 = Case_0123456789876543210 x_0123456789876543210 d x x_0123456789876543210 - data Lambda_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210 x_01234567898765432100123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 d0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 d0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 d0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 d0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 d x ('Just y) = y + LamCases_0123456789876543210 d x 'Nothing = d + data LamCases_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym1 d0123456789876543210 x0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210 x_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210) x_01234567898765432100123456789876543210 = Lambda_0123456789876543210 d0123456789876543210 x0123456789876543210 x_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 d0123456789876543210 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 d0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 d0123456789876543210 x0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 d0123456789876543210 x0123456789876543210 x_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 d0123456789876543210 x0123456789876543210 x_01234567898765432100123456789876543210 = Lambda_0123456789876543210 d0123456789876543210 x0123456789876543210 x_01234567898765432100123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 d0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 d0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 d0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 type Foo3Sym0 :: (~>) a ((~>) b a) data Foo3Sym0 :: (~>) a ((~>) b a) where @@ -132,13 +126,13 @@ Singletons/LambdaCase.hs:(0,0)-(0,0): Splicing declarations Foo1Sym2 a0123456789876543210 a0123456789876543210 = Foo1 a0123456789876543210 a0123456789876543210 type Foo3 :: a -> b -> a type family Foo3 @a @b (a :: a) (a :: b) :: a where - Foo3 a b = Apply (Lambda_0123456789876543210Sym0 a b) (Apply (Apply Tuple2Sym0 a) b) + Foo3 a b = Apply (LamCases_0123456789876543210Sym0 a b) (Apply (Apply Tuple2Sym0 a) b) type Foo2 :: a -> Maybe a -> a type family Foo2 @a (a :: a) (a :: Maybe a) :: a where - Foo2 d _ = Apply (Lambda_0123456789876543210Sym0 d) (Apply JustSym0 d) + Foo2 d _ = Apply (LamCases_0123456789876543210Sym0 d) (Apply JustSym0 d) type Foo1 :: a -> Maybe a -> a type family Foo1 @a (a :: a) (a :: Maybe a) :: a where - Foo1 d x = Apply (Lambda_0123456789876543210Sym0 d x) x + Foo1 d x = Apply (LamCases_0123456789876543210Sym0 d x) x sFoo3 :: (forall (t :: a) (t :: b). Sing t -> Sing t -> Sing (Apply (Apply Foo3Sym0 t) t :: a) :: Type) @@ -151,39 +145,24 @@ Singletons/LambdaCase.hs:(0,0)-(0,0): Splicing declarations sFoo3 (sA :: Sing a) (sB :: Sing b) = applySing (singFun1 - @(Lambda_0123456789876543210Sym0 a b) - (\ sX_0123456789876543210 - -> case sX_0123456789876543210 of - (_ :: Sing x_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 x_0123456789876543210 a b x_0123456789876543210)) - (case sX_0123456789876543210 of STuple2 (sP :: Sing p) _ -> sP))) + @(LamCases_0123456789876543210Sym0 a b) + (\cases (STuple2 (sP :: Sing p) _) -> sP)) (applySing (applySing (singFun2 @Tuple2Sym0 STuple2) sA) sB) sFoo2 (sD :: Sing d) _ = applySing (singFun1 - @(Lambda_0123456789876543210Sym0 d) - (\ sX_0123456789876543210 - -> case sX_0123456789876543210 of - (_ :: Sing x_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 x_0123456789876543210 d x_0123456789876543210)) - (case sX_0123456789876543210 of - SJust (sY :: Sing y) -> sY - SNothing -> sD))) + @(LamCases_0123456789876543210Sym0 d) + (\cases + (SJust (sY :: Sing y)) -> sY + SNothing -> sD)) (applySing (singFun1 @JustSym0 SJust) sD) sFoo1 (sD :: Sing d) (sX :: Sing x) = applySing (singFun1 - @(Lambda_0123456789876543210Sym0 d x) - (\ sX_0123456789876543210 - -> case sX_0123456789876543210 of - (_ :: Sing x_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 x_0123456789876543210 d x x_0123456789876543210)) - (case sX_0123456789876543210 of - SJust (sY :: Sing y) -> sY - SNothing -> sD))) + @(LamCases_0123456789876543210Sym0 d x) + (\cases + (SJust (sY :: Sing y)) -> sY + SNothing -> sD)) sX instance SingI (Foo3Sym0 :: (~>) a ((~>) b a)) where sing = singFun2 @Foo3Sym0 sFoo3 diff --git a/singletons-base/tests/compile-and-dump/Singletons/Lambdas.golden b/singletons-base/tests/compile-and-dump/Singletons/Lambdas.golden index cd0c39a4..515828b6 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Lambdas.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Lambdas.golden @@ -59,155 +59,142 @@ Singletons/Lambdas.hs:(0,0)-(0,0): Splicing declarations type FooSym2 :: forall a b. a -> b -> Foo a b type family FooSym2 @a @b (a0123456789876543210 :: a) (a0123456789876543210 :: b) :: Foo a b where FooSym2 a0123456789876543210 a0123456789876543210 = Foo a0123456789876543210 a0123456789876543210 - type family Case_0123456789876543210 arg_01234567898765432100123456789876543210 x0123456789876543210 t where - Case_0123456789876543210 arg_0123456789876543210 x (Foo a _) = a - type family Lambda_0123456789876543210 x0123456789876543210 arg_0123456789876543210 where - Lambda_0123456789876543210 x arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x arg_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 arg_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 arg_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210) where + type family LamCases_0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x (Foo a _) = a + data LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 - type family Case_0123456789876543210 arg_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 t where - Case_0123456789876543210 arg_0123456789876543210 x y '(_, b) = b - type family Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 arg_0123456789876543210 where - Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x y arg_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) where + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x y '(_, b) = b + data LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 - type family Case_0123456789876543210 arg_01234567898765432100123456789876543210 x0123456789876543210 a0123456789876543210 b0123456789876543210 t where - Case_0123456789876543210 arg_0123456789876543210 x a b _ = x - type family Lambda_0123456789876543210 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg_0123456789876543210 where - Lambda_0123456789876543210 x a b arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x a b arg_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 a0123456789876543210 b0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 a0123456789876543210 b0123456789876543210) where + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 a0123456789876543210 b0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x a b _ = x + data LamCases_0123456789876543210Sym0 x0123456789876543210 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 a0123456789876543210 b0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 a0123456789876543210 b0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 a0123456789876543210 b0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg_01234567898765432100123456789876543210 - type family Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 x where - Lambda_0123456789876543210 a b x = Lambda_0123456789876543210Sym0 x a b - data Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 x0123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 x0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) where + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a b x = LamCases_0123456789876543210Sym0 x a b + data LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) arg) (LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 x0123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 x where - Lambda_0123456789876543210 x y x = x - data Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 x0123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 x0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) where + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x y x = x + data LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 x0123456789876543210 - type family Case_0123456789876543210 arg_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 z0123456789876543210 t where - Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210 x y z '(_, - _) = x - type family Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_0123456789876543210 arg_0123456789876543210 where - Lambda_0123456789876543210 x y z arg_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210 x y z (Apply (Apply Tuple2Sym0 arg_0123456789876543210) arg_0123456789876543210) - data Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 z0123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 z0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 z0123456789876543210) where + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 z0123456789876543210 a_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x y z _ _ = x + data LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 z0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 z0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 z0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 z0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 z0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 z0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + data LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 z0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210) where + LamCases_0123456789876543210Sym1KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 z0123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 z0123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 z0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 z0123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 z0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 z0123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym1KindInference ()) - type family Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 y where - Lambda_0123456789876543210 x y = y - data Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210) where + = snd ((,) LamCases_0123456789876543210Sym1KindInference ()) + type family LamCases_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 z0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 z0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 z0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x y = y + data LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 - type family Case_0123456789876543210 arg_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 t where - Case_0123456789876543210 arg_0123456789876543210 x y _ = x - type family Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 arg_0123456789876543210 where - Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x y arg_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) where + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x y _ = x + data LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 - type family Case_0123456789876543210 arg_01234567898765432100123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 t where - Case_0123456789876543210 arg_0123456789876543210 x a_0123456789876543210 _ = x - type family Lambda_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 arg_0123456789876543210 where - Lambda_0123456789876543210 x a_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x a_0123456789876543210 arg_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210) where + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x a_0123456789876543210 _ = x + data LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 - type family Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x y where - Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 x y = x - data Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 - where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a_0123456789876543210 a_0123456789876543210 x y = x + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - data Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + data LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 arg) => - Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210) where + LamCases_0123456789876543210Sym1KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym1KindInference ()) - type family Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 where - Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym1KindInference ()) + type family LamCases_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 type Foo8Sym0 :: (~>) (Foo a b) a data Foo8Sym0 :: (~>) (Foo a b) a where @@ -373,31 +360,31 @@ Singletons/Lambdas.hs:(0,0)-(0,0): Splicing declarations Foo0Sym2 a0123456789876543210 a0123456789876543210 = Foo0 a0123456789876543210 a0123456789876543210 type Foo8 :: Foo a b -> a type family Foo8 @a @b (a :: Foo a b) :: a where - Foo8 x = Apply (Lambda_0123456789876543210Sym0 x) x + Foo8 x = Apply (LamCases_0123456789876543210Sym0 x) x type Foo7 :: a -> b -> b type family Foo7 @a @b (a :: a) (a :: b) :: b where - Foo7 x y = Apply (Lambda_0123456789876543210Sym0 x y) (Apply (Apply Tuple2Sym0 x) y) + Foo7 x y = Apply (LamCases_0123456789876543210Sym0 x y) (Apply (Apply Tuple2Sym0 x) y) type Foo6 :: a -> b -> a type family Foo6 @a @b (a :: a) (a :: b) :: a where - Foo6 a b = Apply (Apply (Lambda_0123456789876543210Sym0 a b) a) b + Foo6 a b = Apply (Apply (LamCases_0123456789876543210Sym0 a b) a) b type Foo5 :: a -> b -> b type family Foo5 @a @b (a :: a) (a :: b) :: b where - Foo5 x y = Apply (Lambda_0123456789876543210Sym0 x y) y + Foo5 x y = Apply (LamCases_0123456789876543210Sym0 x y) y type Foo4 :: a -> b -> c -> a type family Foo4 @a @b @c (a :: a) (a :: b) (a :: c) :: a where - Foo4 x y z = Apply (Apply (Lambda_0123456789876543210Sym0 x y z) y) z + Foo4 x y z = Apply (Apply (LamCases_0123456789876543210Sym0 x y z) y) z type Foo3 :: a -> a type family Foo3 @a (a :: a) :: a where - Foo3 x = Apply (Lambda_0123456789876543210Sym0 x) x + Foo3 x = Apply (LamCases_0123456789876543210Sym0 x) x type Foo2 :: a -> b -> a type family Foo2 @a @b (a :: a) (a :: b) :: a where - Foo2 x y = Apply (Lambda_0123456789876543210Sym0 x y) y + Foo2 x y = Apply (LamCases_0123456789876543210Sym0 x y) y type Foo1 :: a -> b -> a type family Foo1 @a @b (a :: a) (a :: b) :: a where - Foo1 x a_0123456789876543210 = Apply (Lambda_0123456789876543210Sym0 x a_0123456789876543210) a_0123456789876543210 + Foo1 x a_0123456789876543210 = Apply (LamCases_0123456789876543210Sym0 x a_0123456789876543210) a_0123456789876543210 type Foo0 :: a -> b -> a type family Foo0 @a @b (a :: a) (a :: b) :: a where - Foo0 a_0123456789876543210 a_0123456789876543210 = Apply (Apply (Lambda_0123456789876543210Sym0 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210) a_0123456789876543210 + Foo0 a_0123456789876543210 a_0123456789876543210 = Apply (Apply (LamCases_0123456789876543210Sym0 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210) a_0123456789876543210 sFoo8 :: (forall (t :: Foo a b). Sing t -> Sing (Apply Foo8Sym0 t :: a) :: Type) @@ -430,98 +417,56 @@ Singletons/Lambdas.hs:(0,0)-(0,0): Splicing declarations sFoo8 (sX :: Sing x) = applySing (singFun1 - @(Lambda_0123456789876543210Sym0 x) - (\ sArg_0123456789876543210 - -> case sArg_0123456789876543210 of - (_ :: Sing arg_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 arg_0123456789876543210 x arg_0123456789876543210)) - (case sArg_0123456789876543210 of SFoo (sA :: Sing a) _ -> sA))) + @(LamCases_0123456789876543210Sym0 x) + (\cases (SFoo (sA :: Sing a) _) -> sA)) sX sFoo7 (sX :: Sing x) (sY :: Sing y) = applySing (singFun1 - @(Lambda_0123456789876543210Sym0 x y) - (\ sArg_0123456789876543210 - -> case sArg_0123456789876543210 of - (_ :: Sing arg_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 arg_0123456789876543210 x y arg_0123456789876543210)) - (case sArg_0123456789876543210 of STuple2 _ (sB :: Sing b) -> sB))) + @(LamCases_0123456789876543210Sym0 x y) + (\cases (STuple2 _ (sB :: Sing b)) -> sB)) (applySing (applySing (singFun2 @Tuple2Sym0 STuple2) sX) sY) sFoo6 (sA :: Sing a) (sB :: Sing b) = applySing (applySing (singFun1 - @(Lambda_0123456789876543210Sym0 a b) - (\ sX - -> case sX of - (_ :: Sing x) - -> singFun1 - @(Lambda_0123456789876543210Sym0 x a b) - (\ sArg_0123456789876543210 - -> case sArg_0123456789876543210 of - (_ :: Sing arg_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 arg_0123456789876543210 x a b arg_0123456789876543210)) - (case sArg_0123456789876543210 of _ -> sX)))) + @(LamCases_0123456789876543210Sym0 a b) + (\cases + (sX :: Sing x) + -> singFun1 + @(LamCases_0123456789876543210Sym0 x a b) (\cases _ -> sX))) sA) sB sFoo5 (sX :: Sing x) (sY :: Sing y) = applySing (singFun1 - @(Lambda_0123456789876543210Sym0 x y) - (\ sX -> case sX of (_ :: Sing x) -> sX)) + @(LamCases_0123456789876543210Sym0 x y) + (\cases (sX :: Sing x) -> sX)) sY sFoo4 (sX :: Sing x) (sY :: Sing y) (sZ :: Sing z) = applySing (applySing (singFun2 - @(Lambda_0123456789876543210Sym0 x y z) - (\ sArg_0123456789876543210 sArg_0123456789876543210 - -> case (,) sArg_0123456789876543210 sArg_0123456789876543210 of - (,) (_ :: Sing arg_0123456789876543210) - (_ :: Sing arg_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210 x y z (Apply (Apply Tuple2Sym0 arg_0123456789876543210) arg_0123456789876543210))) - (case - applySing - (applySing - (singFun2 @Tuple2Sym0 STuple2) sArg_0123456789876543210) - sArg_0123456789876543210 - of - STuple2 _ _ -> sX))) + @(LamCases_0123456789876543210Sym0 x y z) (\cases _ _ -> sX)) sY) sZ sFoo3 (sX :: Sing x) = applySing (singFun1 - @(Lambda_0123456789876543210Sym0 x) - (\ sY -> case sY of (_ :: Sing y) -> sY)) + @(LamCases_0123456789876543210Sym0 x) + (\cases (sY :: Sing y) -> sY)) sX sFoo2 (sX :: Sing x) (sY :: Sing y) = applySing - (singFun1 - @(Lambda_0123456789876543210Sym0 x y) - (\ sArg_0123456789876543210 - -> case sArg_0123456789876543210 of - (_ :: Sing arg_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 arg_0123456789876543210 x y arg_0123456789876543210)) - (case sArg_0123456789876543210 of _ -> sX))) + (singFun1 @(LamCases_0123456789876543210Sym0 x y) (\cases _ -> sX)) sY sFoo1 (sX :: Sing x) (sA_0123456789876543210 :: Sing a_0123456789876543210) = applySing (singFun1 - @(Lambda_0123456789876543210Sym0 x a_0123456789876543210) - (\ sArg_0123456789876543210 - -> case sArg_0123456789876543210 of - (_ :: Sing arg_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 arg_0123456789876543210 x a_0123456789876543210 arg_0123456789876543210)) - (case sArg_0123456789876543210 of _ -> sX))) + @(LamCases_0123456789876543210Sym0 x a_0123456789876543210) + (\cases _ -> sX)) sA_0123456789876543210 sFoo0 (sA_0123456789876543210 :: Sing a_0123456789876543210) @@ -529,9 +474,8 @@ Singletons/Lambdas.hs:(0,0)-(0,0): Splicing declarations = applySing (applySing (singFun2 - @(Lambda_0123456789876543210Sym0 a_0123456789876543210 a_0123456789876543210) - (\ sX sY - -> case (,) sX sY of (,) (_ :: Sing x) (_ :: Sing y) -> sX)) + @(LamCases_0123456789876543210Sym0 a_0123456789876543210 a_0123456789876543210) + (\cases (sX :: Sing x) (sY :: Sing y) -> sX)) sA_0123456789876543210) sA_0123456789876543210 instance SingI (Foo8Sym0 :: (~>) (Foo a b) a) where @@ -609,8 +553,8 @@ Singletons/Lambdas.hs:(0,0)-(0,0): Splicing declarations type Demote (Foo a b) = Foo (Demote a) (Demote b) fromSing (SFoo b b) = Foo (fromSing b) (fromSing b) toSing (Foo (b :: Demote a) (b :: Demote b)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing b) of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SFoo c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SFoo c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing b) instance (SingI n, SingI n) => SingI (Foo (n :: a) (n :: b)) where sing = SFoo sing sing instance SingI n => SingI1 (Foo (n :: a)) where diff --git a/singletons-base/tests/compile-and-dump/Singletons/LambdasComprehensive.golden b/singletons-base/tests/compile-and-dump/Singletons/LambdasComprehensive.golden index 9fc5d97f..804ebb52 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/LambdasComprehensive.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/LambdasComprehensive.golden @@ -11,18 +11,18 @@ Singletons/LambdasComprehensive.hs:(0,0)-(0,0): Splicing declarations = map (\ x -> either_ pred Succ x) [Left Zero, Right (Succ Zero)] bar :: [Nat] bar = map (either_ pred Succ) [Left Zero, Right (Succ Zero)] - type family Lambda_0123456789876543210 x where - Lambda_0123456789876543210 x = Apply (Apply (Apply Either_Sym0 PredSym0) SuccSym0) x - data Lambda_0123456789876543210Sym0 x0123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x = Apply (Apply (Apply Either_Sym0 PredSym0) SuccSym0) x + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 - type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 type BarSym0 :: [Nat] type family BarSym0 :: [Nat] where BarSym0 = Bar @@ -34,7 +34,7 @@ Singletons/LambdasComprehensive.hs:(0,0)-(0,0): Splicing declarations Bar = Apply (Apply MapSym0 (Apply (Apply Either_Sym0 PredSym0) SuccSym0)) (Apply (Apply (:@#@$) (Apply LeftSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply RightSym0 (Apply SuccSym0 ZeroSym0))) NilSym0)) type Foo :: [Nat] type family Foo :: [Nat] where - Foo = Apply (Apply MapSym0 Lambda_0123456789876543210Sym0) (Apply (Apply (:@#@$) (Apply LeftSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply RightSym0 (Apply SuccSym0 ZeroSym0))) NilSym0)) + Foo = Apply (Apply MapSym0 LamCases_0123456789876543210Sym0) (Apply (Apply (:@#@$) (Apply LeftSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply RightSym0 (Apply SuccSym0 ZeroSym0))) NilSym0)) sBar :: (Sing (BarSym0 :: [Nat]) :: Type) sFoo :: (Sing (FooSym0 :: [Nat]) :: Type) sBar @@ -61,16 +61,15 @@ Singletons/LambdasComprehensive.hs:(0,0)-(0,0): Splicing declarations (applySing (singFun2 @MapSym0 sMap) (singFun1 - @Lambda_0123456789876543210Sym0 - (\ sX - -> case sX of - (_ :: Sing x) - -> applySing - (applySing - (applySing - (singFun3 @Either_Sym0 sEither_) (singFun1 @PredSym0 sPred)) - (singFun1 @SuccSym0 SSucc)) - sX))) + @LamCases_0123456789876543210Sym0 + (\cases + (sX :: Sing x) + -> applySing + (applySing + (applySing + (singFun3 @Either_Sym0 sEither_) (singFun1 @PredSym0 sPred)) + (singFun1 @SuccSym0 SSucc)) + sX))) (applySing (applySing (singFun2 @(:@#@$) SCons) diff --git a/singletons-base/tests/compile-and-dump/Singletons/LetStatements.golden b/singletons-base/tests/compile-and-dump/Singletons/LetStatements.golden index 16e9ddc2..1c2c2422 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/LetStatements.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/LetStatements.golden @@ -189,12 +189,32 @@ Singletons/LetStatements.hs:(0,0)-(0,0): Splicing declarations foo13_ y = y foo14 :: Nat -> (Nat, Nat) foo14 x = let (y, z) = (Succ x, x) in (z, y) - type family Case_0123456789876543210 x0123456789876543210 t where - Case_0123456789876543210 x '(_, - y_0123456789876543210) = y_0123456789876543210 - type family Case_0123456789876543210 x0123456789876543210 t where - Case_0123456789876543210 x '(y_0123456789876543210, - _) = y_0123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x '(_, + y_0123456789876543210) = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x '(y_0123456789876543210, + _) = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 type family Let0123456789876543210ZSym0 x0123456789876543210 where Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210Z x0123456789876543210 type family Let0123456789876543210YSym0 x0123456789876543210 where @@ -202,9 +222,9 @@ Singletons/LetStatements.hs:(0,0)-(0,0): Splicing declarations type family Let0123456789876543210X_0123456789876543210Sym0 x0123456789876543210 where Let0123456789876543210X_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210X_0123456789876543210 x0123456789876543210 type family Let0123456789876543210Z x0123456789876543210 where - Let0123456789876543210Z x = Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym0 x) + Let0123456789876543210Z x = Apply (LamCases_0123456789876543210Sym0 x) (Let0123456789876543210X_0123456789876543210Sym0 x) type family Let0123456789876543210Y x0123456789876543210 where - Let0123456789876543210Y x = Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym0 x) + Let0123456789876543210Y x = Apply (LamCases_0123456789876543210Sym0 x) (Let0123456789876543210X_0123456789876543210Sym0 x) type family Let0123456789876543210X_0123456789876543210 x0123456789876543210 where Let0123456789876543210X_0123456789876543210 x = Apply (Apply Tuple2Sym0 (Apply SuccSym0 x)) x type family Let0123456789876543210BarSym0 a0123456789876543210 x0123456789876543210 :: a0123456789876543210 where @@ -278,18 +298,18 @@ Singletons/LetStatements.hs:(0,0)-(0,0): Splicing declarations type family (<<<%%%%%%%%%%%%%%%%%%%%) x0123456789876543210 (a :: Nat) (a :: Nat) :: Nat where (<<<%%%%%%%%%%%%%%%%%%%%) x 'Zero m = m (<<<%%%%%%%%%%%%%%%%%%%%) x ('Succ n) m = Apply SuccSym0 (Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$) x) n) m) - type family Lambda_0123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 x where - Lambda_0123456789876543210 a_0123456789876543210 x x = x - data Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 x0123456789876543210 x0123456789876543210 + type family LamCases_0123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a_0123456789876543210 x x = x + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 x0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 x0123456789876543210 x0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 x0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 x0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 x0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 x0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 x0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 x0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 data Let0123456789876543210ZSym0 x0123456789876543210 :: (~>) Nat Nat where Let0123456789876543210ZSym0KindInference :: SameKind (Apply (Let0123456789876543210ZSym0 x0123456789876543210) arg) (Let0123456789876543210ZSym1 x0123456789876543210 arg) => @@ -301,23 +321,23 @@ Singletons/LetStatements.hs:(0,0)-(0,0): Splicing declarations type family Let0123456789876543210ZSym1 x0123456789876543210 (a0123456789876543210 :: Nat) :: Nat where Let0123456789876543210ZSym1 x0123456789876543210 a0123456789876543210 = Let0123456789876543210Z x0123456789876543210 a0123456789876543210 type family Let0123456789876543210Z x0123456789876543210 (a :: Nat) :: Nat where - Let0123456789876543210Z x a_0123456789876543210 = Apply (Lambda_0123456789876543210Sym0 a_0123456789876543210 x) a_0123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 x where - Lambda_0123456789876543210 x x = x - data Lambda_0123456789876543210Sym0 x0123456789876543210 x0123456789876543210 + Let0123456789876543210Z x a_0123456789876543210 = Apply (LamCases_0123456789876543210Sym0 a_0123456789876543210 x) a_0123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x x = x + data LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 x0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 x0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 type family Let0123456789876543210ZSym0 x0123456789876543210 :: Nat where Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210Z x0123456789876543210 type family Let0123456789876543210Z x0123456789876543210 :: Nat where - Let0123456789876543210Z x = Apply (Lambda_0123456789876543210Sym0 x) ZeroSym0 + Let0123456789876543210Z x = Apply (LamCases_0123456789876543210Sym0 x) ZeroSym0 type family Let0123456789876543210XSym0 x0123456789876543210 :: Nat where Let0123456789876543210XSym0 x0123456789876543210 = Let0123456789876543210X x0123456789876543210 type family Let0123456789876543210X x0123456789876543210 :: Nat where @@ -633,17 +653,21 @@ Singletons/LetStatements.hs:(0,0)-(0,0): Splicing declarations sX_0123456789876543210 :: Sing @_ (Let0123456789876543210X_0123456789876543210Sym0 x) sZ - = id - @(Sing (Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym0 x))) - (case sX_0123456789876543210 of - STuple2 _ (sY_0123456789876543210 :: Sing y_0123456789876543210) - -> sY_0123456789876543210) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 x) + (\cases + (STuple2 _ (sY_0123456789876543210 :: Sing y_0123456789876543210)) + -> sY_0123456789876543210)) + sX_0123456789876543210 sY - = id - @(Sing (Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym0 x))) - (case sX_0123456789876543210 of - STuple2 (sY_0123456789876543210 :: Sing y_0123456789876543210) _ - -> sY_0123456789876543210) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 x) + (\cases + (STuple2 (sY_0123456789876543210 :: Sing y_0123456789876543210) _) + -> sY_0123456789876543210)) + sX_0123456789876543210 sX_0123456789876543210 = applySing (applySing @@ -728,8 +752,8 @@ Singletons/LetStatements.hs:(0,0)-(0,0): Splicing declarations sZ (sA_0123456789876543210 :: Sing a_0123456789876543210) = applySing (singFun1 - @(Lambda_0123456789876543210Sym0 a_0123456789876543210 x) - (\ sX -> case sX of (_ :: Sing x) -> sX)) + @(LamCases_0123456789876543210Sym0 a_0123456789876543210 x) + (\cases (sX :: Sing x) -> sX)) sA_0123456789876543210 in applySing (singFun1 @(Let0123456789876543210ZSym0 x) sZ) sX sFoo8 (sX :: Sing x) @@ -738,8 +762,8 @@ Singletons/LetStatements.hs:(0,0)-(0,0): Splicing declarations sZ = applySing (singFun1 - @(Lambda_0123456789876543210Sym0 x) - (\ sX -> case sX of (_ :: Sing x) -> sX)) + @(LamCases_0123456789876543210Sym0 x) + (\cases (sX :: Sing x) -> sX)) SZero in sZ sFoo7 (sX :: Sing x) diff --git a/singletons-base/tests/compile-and-dump/Singletons/Maybe.golden b/singletons-base/tests/compile-and-dump/Singletons/Maybe.golden index 01e697df..fabeba9f 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Maybe.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Maybe.golden @@ -107,7 +107,8 @@ Singletons/Maybe.hs:(0,0)-(0,0): Splicing declarations fromSing (SJust b) = Just (fromSing b) toSing Nothing = SomeSing SNothing toSing (Just (b :: Demote a)) - = case toSing b :: SomeSing a of SomeSing c -> SomeSing (SJust c) + = (\cases (SomeSing c) -> SomeSing (SJust c)) + (toSing b :: SomeSing a) instance SEq a => SEq (Maybe a) where (%==) SNothing SNothing = STrue (%==) SNothing (SJust _) = SFalse @@ -151,13 +152,13 @@ Singletons/Maybe.hs:(0,0)-(0,0): Splicing declarations sA_0123456789876543210 instance SDecide a => SDecide (Maybe a) where (%~) SNothing SNothing = Proved Refl - (%~) SNothing (SJust _) = Disproved (\ x -> case x of {}) - (%~) (SJust _) SNothing = Disproved (\ x -> case x of {}) + (%~) SNothing (SJust _) = Disproved (\case) + (%~) (SJust _) SNothing = Disproved (\case) (%~) (SJust a) (SJust b) - = case (%~) a b of - Proved Refl -> Proved Refl - Disproved contra - -> Disproved (\ refl -> case refl of Refl -> contra Refl) + = (\cases + (Proved Refl) -> Proved Refl + (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) instance Eq (SMaybe (z :: Maybe a)) where (==) _ _ = True instance SDecide a => diff --git a/singletons-base/tests/compile-and-dump/Singletons/Nat.golden b/singletons-base/tests/compile-and-dump/Singletons/Nat.golden index 8d6abc58..e1b894de 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Nat.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Nat.golden @@ -209,7 +209,8 @@ Singletons/Nat.hs:(0,0)-(0,0): Splicing declarations fromSing (SSucc b) = Succ (fromSing b) toSing Zero = SomeSing SZero toSing (Succ (b :: Demote Nat)) - = case toSing b :: SomeSing Nat of SomeSing c -> SomeSing (SSucc c) + = (\cases (SomeSing c) -> SomeSing (SSucc c)) + (toSing b :: SomeSing Nat) instance SEq Nat => SEq Nat where (%==) SZero SZero = STrue (%==) SZero (SSucc _) = SFalse @@ -276,13 +277,13 @@ Singletons/Nat.hs:(0,0)-(0,0): Splicing declarations sCompare (SSucc _) SZero = SGT instance SDecide Nat => SDecide Nat where (%~) SZero SZero = Proved Refl - (%~) SZero (SSucc _) = Disproved (\ x -> case x of {}) - (%~) (SSucc _) SZero = Disproved (\ x -> case x of {}) + (%~) SZero (SSucc _) = Disproved (\case) + (%~) (SSucc _) SZero = Disproved (\case) (%~) (SSucc a) (SSucc b) - = case (%~) a b of - Proved Refl -> Proved Refl - Disproved contra - -> Disproved (\ refl -> case refl of Refl -> contra Refl) + = (\cases + (Proved Refl) -> Proved Refl + (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) instance Eq (SNat (z :: Nat)) where (==) _ _ = True instance SDecide Nat => diff --git a/singletons-base/tests/compile-and-dump/Singletons/Natural.golden b/singletons-base/tests/compile-and-dump/Singletons/Natural.golden index f55c270a..5a21c34f 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Natural.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Natural.golden @@ -48,12 +48,13 @@ Singletons/Natural.hs:(0,0)-(0,0): Splicing declarations Sing t -> Sing t -> Sing (Apply (Apply AddAgeSym0 t) t :: Age) :: Type) sAddAge (SMkAge (sX :: Sing x)) (SMkAge (sY :: Sing y)) - = case (,) (sX :: Sing x) (sY :: Sing y) of - (,) (_ :: Sing (x :: Natural)) (_ :: Sing (y :: Natural)) - -> applySing - (singFun1 @MkAgeSym0 SMkAge) - (applySing (applySing (singFun2 @(+@#@$) (%+)) sX) sY :: - Sing (Apply (Apply (+@#@$) x) y :: Natural)) + = (\cases + (_ :: Sing (x :: Natural)) (_ :: Sing (y :: Natural)) + -> applySing + (singFun1 @MkAgeSym0 SMkAge) + (applySing (applySing (singFun2 @(+@#@$) (%+)) sX) sY :: + Sing (Apply (Apply (+@#@$) x) y :: Natural))) + (sX :: Sing x) (sY :: Sing y) instance SingI (AddAgeSym0 :: (~>) Age ((~>) Age Age)) where sing = singFun2 @AddAgeSym0 sAddAge instance SingI d => @@ -70,8 +71,8 @@ Singletons/Natural.hs:(0,0)-(0,0): Splicing declarations type Demote Age = Age fromSing (SMkAge b) = MkAge (fromSing b) toSing (MkAge (b :: Demote Natural)) - = case toSing b :: SomeSing Natural of - SomeSing c -> SomeSing (SMkAge c) + = (\cases (SomeSing c) -> SomeSing (SMkAge c)) + (toSing b :: SomeSing Natural) instance SingI n => SingI (MkAge (n :: Natural)) where sing = SMkAge sing instance SingI1 MkAge where diff --git a/singletons-base/tests/compile-and-dump/Singletons/Operators.golden b/singletons-base/tests/compile-and-dump/Singletons/Operators.golden index 3eb42c6b..11d18129 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Operators.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Operators.golden @@ -118,8 +118,8 @@ Singletons/Operators.hs:(0,0)-(0,0): Splicing declarations fromSing ((:%+:) b b) = (:+:) (fromSing b) (fromSing b) toSing FLeaf = SomeSing SFLeaf toSing ((:+:) (b :: Demote Foo) (b :: Demote Foo)) - = case (,) (toSing b :: SomeSing Foo) (toSing b :: SomeSing Foo) of - (,) (SomeSing c) (SomeSing c) -> SomeSing ((:%+:) c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing ((:%+:) c c)) + (toSing b :: SomeSing Foo) (toSing b :: SomeSing Foo) instance SingI FLeaf where sing = SFLeaf instance (SingI n, SingI n) => diff --git a/singletons-base/tests/compile-and-dump/Singletons/OrdDeriving.golden b/singletons-base/tests/compile-and-dump/Singletons/OrdDeriving.golden index 516bfb3e..e91a44ae 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/OrdDeriving.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/OrdDeriving.golden @@ -484,7 +484,8 @@ Singletons/OrdDeriving.hs:(0,0)-(0,0): Splicing declarations fromSing (SSucc b) = Succ (fromSing b) toSing Zero = SomeSing SZero toSing (Succ (b :: Demote Nat)) - = case toSing b :: SomeSing Nat of SomeSing c -> SomeSing (SSucc c) + = (\cases (SomeSing c) -> SomeSing (SSucc c)) + (toSing b :: SomeSing Nat) data SFoo :: forall a b c d. Foo a b c d -> Type where SA :: forall a b c d (n :: a) (n :: b) (n :: c) (n :: d). @@ -541,58 +542,46 @@ Singletons/OrdDeriving.hs:(0,0)-(0,0): Splicing declarations = F (fromSing b) (fromSing b) (fromSing b) (fromSing b) toSing (A (b :: Demote a) (b :: Demote b) (b :: Demote c) (b :: Demote d)) - = case - (,,,) - (toSing b :: SomeSing a) (toSing b :: SomeSing b) - (toSing b :: SomeSing c) (toSing b :: SomeSing d) - of - (,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c) - -> SomeSing (SA c c c c) + = (\cases + (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c) + -> SomeSing (SA c c c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing b) + (toSing b :: SomeSing c) (toSing b :: SomeSing d) toSing (B (b :: Demote a) (b :: Demote b) (b :: Demote c) (b :: Demote d)) - = case - (,,,) - (toSing b :: SomeSing a) (toSing b :: SomeSing b) - (toSing b :: SomeSing c) (toSing b :: SomeSing d) - of - (,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c) - -> SomeSing (SB c c c c) + = (\cases + (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c) + -> SomeSing (SB c c c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing b) + (toSing b :: SomeSing c) (toSing b :: SomeSing d) toSing (C (b :: Demote a) (b :: Demote b) (b :: Demote c) (b :: Demote d)) - = case - (,,,) - (toSing b :: SomeSing a) (toSing b :: SomeSing b) - (toSing b :: SomeSing c) (toSing b :: SomeSing d) - of - (,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c) - -> SomeSing (SC c c c c) + = (\cases + (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c) + -> SomeSing (SC c c c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing b) + (toSing b :: SomeSing c) (toSing b :: SomeSing d) toSing (D (b :: Demote a) (b :: Demote b) (b :: Demote c) (b :: Demote d)) - = case - (,,,) - (toSing b :: SomeSing a) (toSing b :: SomeSing b) - (toSing b :: SomeSing c) (toSing b :: SomeSing d) - of - (,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c) - -> SomeSing (SD c c c c) + = (\cases + (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c) + -> SomeSing (SD c c c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing b) + (toSing b :: SomeSing c) (toSing b :: SomeSing d) toSing (E (b :: Demote a) (b :: Demote b) (b :: Demote c) (b :: Demote d)) - = case - (,,,) - (toSing b :: SomeSing a) (toSing b :: SomeSing b) - (toSing b :: SomeSing c) (toSing b :: SomeSing d) - of - (,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c) - -> SomeSing (SE c c c c) + = (\cases + (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c) + -> SomeSing (SE c c c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing b) + (toSing b :: SomeSing c) (toSing b :: SomeSing d) toSing (F (b :: Demote a) (b :: Demote b) (b :: Demote c) (b :: Demote d)) - = case - (,,,) - (toSing b :: SomeSing a) (toSing b :: SomeSing b) - (toSing b :: SomeSing c) (toSing b :: SomeSing d) - of - (,,,) (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c) - -> SomeSing (SF c c c c) + = (\cases + (SomeSing c) (SomeSing c) (SomeSing c) (SomeSing c) + -> SomeSing (SF c c c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing b) + (toSing b :: SomeSing c) (toSing b :: SomeSing d) instance SEq Nat => SEq Nat where (%==) SZero SZero = STrue (%==) SZero (SSucc _) = SFalse @@ -1099,13 +1088,13 @@ Singletons/OrdDeriving.hs:(0,0)-(0,0): Splicing declarations sCompare (SF _ _ _ _) (SE _ _ _ _) = SGT instance SDecide Nat => SDecide Nat where (%~) SZero SZero = Proved Refl - (%~) SZero (SSucc _) = Disproved (\ x -> case x of {}) - (%~) (SSucc _) SZero = Disproved (\ x -> case x of {}) + (%~) SZero (SSucc _) = Disproved (\case) + (%~) (SSucc _) SZero = Disproved (\case) (%~) (SSucc a) (SSucc b) - = case (%~) a b of - Proved Refl -> Proved Refl - Disproved contra - -> Disproved (\ refl -> case refl of Refl -> contra Refl) + = (\cases + (Proved Refl) -> Proved Refl + (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) instance Eq (SNat (z :: Nat)) where (==) _ _ = True instance SDecide Nat => @@ -1121,107 +1110,89 @@ Singletons/OrdDeriving.hs:(0,0)-(0,0): Splicing declarations instance (SDecide a, SDecide b, SDecide c, SDecide d) => SDecide (Foo a b c d) where (%~) (SA a a a a) (SA b b b b) - = case (,,,) ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b) of - (,,,) (Proved Refl) (Proved Refl) (Proved Refl) (Proved Refl) - -> Proved Refl - (,,,) (Disproved contra) _ _ _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ (Disproved contra) _ _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ _ (Disproved contra) _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ _ _ (Disproved contra) - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (%~) (SA _ _ _ _) (SB _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SA _ _ _ _) (SC _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SA _ _ _ _) (SD _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SA _ _ _ _) (SE _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SA _ _ _ _) (SF _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SB _ _ _ _) (SA _ _ _ _) = Disproved (\ x -> case x of {}) + = (\cases + (Proved Refl) (Proved Refl) (Proved Refl) (Proved Refl) + -> Proved Refl + (Disproved contra) _ _ _ -> Disproved (\cases Refl -> contra Refl) + _ (Disproved contra) _ _ -> Disproved (\cases Refl -> contra Refl) + _ _ (Disproved contra) _ -> Disproved (\cases Refl -> contra Refl) + _ _ _ (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b) + (%~) (SA _ _ _ _) (SB _ _ _ _) = Disproved (\case) + (%~) (SA _ _ _ _) (SC _ _ _ _) = Disproved (\case) + (%~) (SA _ _ _ _) (SD _ _ _ _) = Disproved (\case) + (%~) (SA _ _ _ _) (SE _ _ _ _) = Disproved (\case) + (%~) (SA _ _ _ _) (SF _ _ _ _) = Disproved (\case) + (%~) (SB _ _ _ _) (SA _ _ _ _) = Disproved (\case) (%~) (SB a a a a) (SB b b b b) - = case (,,,) ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b) of - (,,,) (Proved Refl) (Proved Refl) (Proved Refl) (Proved Refl) - -> Proved Refl - (,,,) (Disproved contra) _ _ _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ (Disproved contra) _ _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ _ (Disproved contra) _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ _ _ (Disproved contra) - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (%~) (SB _ _ _ _) (SC _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SB _ _ _ _) (SD _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SB _ _ _ _) (SE _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SB _ _ _ _) (SF _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SC _ _ _ _) (SA _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SC _ _ _ _) (SB _ _ _ _) = Disproved (\ x -> case x of {}) + = (\cases + (Proved Refl) (Proved Refl) (Proved Refl) (Proved Refl) + -> Proved Refl + (Disproved contra) _ _ _ -> Disproved (\cases Refl -> contra Refl) + _ (Disproved contra) _ _ -> Disproved (\cases Refl -> contra Refl) + _ _ (Disproved contra) _ -> Disproved (\cases Refl -> contra Refl) + _ _ _ (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b) + (%~) (SB _ _ _ _) (SC _ _ _ _) = Disproved (\case) + (%~) (SB _ _ _ _) (SD _ _ _ _) = Disproved (\case) + (%~) (SB _ _ _ _) (SE _ _ _ _) = Disproved (\case) + (%~) (SB _ _ _ _) (SF _ _ _ _) = Disproved (\case) + (%~) (SC _ _ _ _) (SA _ _ _ _) = Disproved (\case) + (%~) (SC _ _ _ _) (SB _ _ _ _) = Disproved (\case) (%~) (SC a a a a) (SC b b b b) - = case (,,,) ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b) of - (,,,) (Proved Refl) (Proved Refl) (Proved Refl) (Proved Refl) - -> Proved Refl - (,,,) (Disproved contra) _ _ _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ (Disproved contra) _ _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ _ (Disproved contra) _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ _ _ (Disproved contra) - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (%~) (SC _ _ _ _) (SD _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SC _ _ _ _) (SE _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SC _ _ _ _) (SF _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SD _ _ _ _) (SA _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SD _ _ _ _) (SB _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SD _ _ _ _) (SC _ _ _ _) = Disproved (\ x -> case x of {}) + = (\cases + (Proved Refl) (Proved Refl) (Proved Refl) (Proved Refl) + -> Proved Refl + (Disproved contra) _ _ _ -> Disproved (\cases Refl -> contra Refl) + _ (Disproved contra) _ _ -> Disproved (\cases Refl -> contra Refl) + _ _ (Disproved contra) _ -> Disproved (\cases Refl -> contra Refl) + _ _ _ (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b) + (%~) (SC _ _ _ _) (SD _ _ _ _) = Disproved (\case) + (%~) (SC _ _ _ _) (SE _ _ _ _) = Disproved (\case) + (%~) (SC _ _ _ _) (SF _ _ _ _) = Disproved (\case) + (%~) (SD _ _ _ _) (SA _ _ _ _) = Disproved (\case) + (%~) (SD _ _ _ _) (SB _ _ _ _) = Disproved (\case) + (%~) (SD _ _ _ _) (SC _ _ _ _) = Disproved (\case) (%~) (SD a a a a) (SD b b b b) - = case (,,,) ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b) of - (,,,) (Proved Refl) (Proved Refl) (Proved Refl) (Proved Refl) - -> Proved Refl - (,,,) (Disproved contra) _ _ _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ (Disproved contra) _ _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ _ (Disproved contra) _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ _ _ (Disproved contra) - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (%~) (SD _ _ _ _) (SE _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SD _ _ _ _) (SF _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SE _ _ _ _) (SA _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SE _ _ _ _) (SB _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SE _ _ _ _) (SC _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SE _ _ _ _) (SD _ _ _ _) = Disproved (\ x -> case x of {}) + = (\cases + (Proved Refl) (Proved Refl) (Proved Refl) (Proved Refl) + -> Proved Refl + (Disproved contra) _ _ _ -> Disproved (\cases Refl -> contra Refl) + _ (Disproved contra) _ _ -> Disproved (\cases Refl -> contra Refl) + _ _ (Disproved contra) _ -> Disproved (\cases Refl -> contra Refl) + _ _ _ (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b) + (%~) (SD _ _ _ _) (SE _ _ _ _) = Disproved (\case) + (%~) (SD _ _ _ _) (SF _ _ _ _) = Disproved (\case) + (%~) (SE _ _ _ _) (SA _ _ _ _) = Disproved (\case) + (%~) (SE _ _ _ _) (SB _ _ _ _) = Disproved (\case) + (%~) (SE _ _ _ _) (SC _ _ _ _) = Disproved (\case) + (%~) (SE _ _ _ _) (SD _ _ _ _) = Disproved (\case) (%~) (SE a a a a) (SE b b b b) - = case (,,,) ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b) of - (,,,) (Proved Refl) (Proved Refl) (Proved Refl) (Proved Refl) - -> Proved Refl - (,,,) (Disproved contra) _ _ _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ (Disproved contra) _ _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ _ (Disproved contra) _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ _ _ (Disproved contra) - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (%~) (SE _ _ _ _) (SF _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SF _ _ _ _) (SA _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SF _ _ _ _) (SB _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SF _ _ _ _) (SC _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SF _ _ _ _) (SD _ _ _ _) = Disproved (\ x -> case x of {}) - (%~) (SF _ _ _ _) (SE _ _ _ _) = Disproved (\ x -> case x of {}) + = (\cases + (Proved Refl) (Proved Refl) (Proved Refl) (Proved Refl) + -> Proved Refl + (Disproved contra) _ _ _ -> Disproved (\cases Refl -> contra Refl) + _ (Disproved contra) _ _ -> Disproved (\cases Refl -> contra Refl) + _ _ (Disproved contra) _ -> Disproved (\cases Refl -> contra Refl) + _ _ _ (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b) + (%~) (SE _ _ _ _) (SF _ _ _ _) = Disproved (\case) + (%~) (SF _ _ _ _) (SA _ _ _ _) = Disproved (\case) + (%~) (SF _ _ _ _) (SB _ _ _ _) = Disproved (\case) + (%~) (SF _ _ _ _) (SC _ _ _ _) = Disproved (\case) + (%~) (SF _ _ _ _) (SD _ _ _ _) = Disproved (\case) + (%~) (SF _ _ _ _) (SE _ _ _ _) = Disproved (\case) (%~) (SF a a a a) (SF b b b b) - = case (,,,) ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b) of - (,,,) (Proved Refl) (Proved Refl) (Proved Refl) (Proved Refl) - -> Proved Refl - (,,,) (Disproved contra) _ _ _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ (Disproved contra) _ _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ _ (Disproved contra) _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,,,) _ _ _ (Disproved contra) - -> Disproved (\ refl -> case refl of Refl -> contra Refl) + = (\cases + (Proved Refl) (Proved Refl) (Proved Refl) (Proved Refl) + -> Proved Refl + (Disproved contra) _ _ _ -> Disproved (\cases Refl -> contra Refl) + _ (Disproved contra) _ _ -> Disproved (\cases Refl -> contra Refl) + _ _ (Disproved contra) _ -> Disproved (\cases Refl -> contra Refl) + _ _ _ (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) ((%~) a b) ((%~) a b) ((%~) a b) instance Eq (SFoo (z :: Foo a b c d)) where (==) _ _ = True instance (SDecide a, SDecide b, SDecide c, SDecide d) => diff --git a/singletons-base/tests/compile-and-dump/Singletons/PatternMatching.golden b/singletons-base/tests/compile-and-dump/Singletons/PatternMatching.golden index 2d54150a..caa188ff 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/PatternMatching.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/PatternMatching.golden @@ -144,8 +144,8 @@ Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations type Demote (Pair a b) = Pair (Demote a) (Demote b) fromSing (SPair b b) = Pair (fromSing b) (fromSing b) toSing (Pair (b :: Demote a) (b :: Demote b)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing b) of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SPair c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SPair c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing b) instance (SShow a, SShow b) => SShow (Pair a b) where sShowsPrec (sP_0123456789876543210 :: Sing p_0123456789876543210) @@ -225,73 +225,189 @@ Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations foo2 t@(# x, y #) = case t of (# a, b #) -> (\ _ -> a) b silly :: a -> () silly x = case x of _ -> () - type family Case_0123456789876543210 x0123456789876543210 t where - Case_0123456789876543210 x _ = Tuple0Sym0 + type family LamCases_0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x _ = Tuple0Sym0 + data LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 type family Let0123456789876543210TSym0 x0123456789876543210 y0123456789876543210 where Let0123456789876543210TSym0 x0123456789876543210 y0123456789876543210 = Let0123456789876543210T x0123456789876543210 y0123456789876543210 type family Let0123456789876543210T x0123456789876543210 y0123456789876543210 where Let0123456789876543210T x y = Apply (Apply Tuple2Sym0 x) y - type family Case_0123456789876543210 arg_01234567898765432100123456789876543210 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 t where - Case_0123456789876543210 arg_0123456789876543210 a b x y _ = a - type family Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg_0123456789876543210 where - Lambda_0123456789876543210 a b x y arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 a b x y arg_0123456789876543210 - data Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a b x y _ = a + data LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210) arg) (LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x y '(a, + b) = Apply (LamCases_0123456789876543210Sym0 a b x y) b + data LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x y _ = x + data LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 '[_, + _, + 'Succ y_0123456789876543210] = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 '[_, + y_0123456789876543210, + 'Succ _] = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 '(_, + _, + y_0123456789876543210) = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 '(_, + y_0123456789876543210, + _) = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 '(y_0123456789876543210, + _, + _) = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 ('Pair ('Pair _ _) y_0123456789876543210) = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 ('Pair ('Pair _ y_0123456789876543210) _) = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 ('Pair ('Pair y_0123456789876543210 _) _) = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 ('Pair _ y_0123456789876543210) = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 - type family Case_0123456789876543210 x0123456789876543210 y0123456789876543210 t where - Case_0123456789876543210 x y '(a, - b) = Apply (Lambda_0123456789876543210Sym0 a b x y) b - type family Case_0123456789876543210 arg_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 t where - Case_0123456789876543210 arg_0123456789876543210 x y _ = x - type family Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 arg_0123456789876543210 where - Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x y arg_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 ('Pair y_0123456789876543210 _) = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 y0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 - type family Case_0123456789876543210 t where - Case_0123456789876543210 '[_, - _, - 'Succ y_0123456789876543210] = y_0123456789876543210 - type family Case_0123456789876543210 t where - Case_0123456789876543210 '[_, - y_0123456789876543210, - 'Succ _] = y_0123456789876543210 - type family Case_0123456789876543210 t where - Case_0123456789876543210 '(_, - _, - y_0123456789876543210) = y_0123456789876543210 - type family Case_0123456789876543210 t where - Case_0123456789876543210 '(_, - y_0123456789876543210, - _) = y_0123456789876543210 - type family Case_0123456789876543210 t where - Case_0123456789876543210 '(y_0123456789876543210, - _, - _) = y_0123456789876543210 - type family Case_0123456789876543210 t where - Case_0123456789876543210 ('Pair ('Pair _ _) y_0123456789876543210) = y_0123456789876543210 - type family Case_0123456789876543210 t where - Case_0123456789876543210 ('Pair ('Pair _ y_0123456789876543210) _) = y_0123456789876543210 - type family Case_0123456789876543210 t where - Case_0123456789876543210 ('Pair ('Pair y_0123456789876543210 _) _) = y_0123456789876543210 - type family Case_0123456789876543210 t where - Case_0123456789876543210 ('Pair _ y_0123456789876543210) = y_0123456789876543210 - type family Case_0123456789876543210 t where - Case_0123456789876543210 ('Pair y_0123456789876543210 _) = y_0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 type SillySym0 :: (~>) a () data SillySym0 :: (~>) a () where @@ -359,42 +475,42 @@ Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations X_0123456789876543210Sym0 = X_0123456789876543210 type Silly :: a -> () type family Silly @a (a :: a) :: () where - Silly x = Case_0123456789876543210 x x + Silly x = Apply (LamCases_0123456789876543210Sym0 x) x type Foo2 :: (a, b) -> a type family Foo2 @a @b (a :: (a, b)) :: a where Foo2 '(x, - y) = Case_0123456789876543210 x y (Let0123456789876543210TSym0 x y) + y) = Apply (LamCases_0123456789876543210Sym0 x y) (Let0123456789876543210TSym0 x y) type Foo1 :: (a, b) -> a type family Foo1 @a @b (a :: (a, b)) :: a where - Foo1 '(x, y) = Apply (Lambda_0123456789876543210Sym0 x y) y + Foo1 '(x, y) = Apply (LamCases_0123456789876543210Sym0 x y) y type family Blimy where - Blimy = Case_0123456789876543210 X_0123456789876543210Sym0 + Blimy = Apply LamCases_0123456789876543210Sym0 X_0123456789876543210Sym0 type Lsz :: Nat type family Lsz :: Nat where - Lsz = Case_0123456789876543210 X_0123456789876543210Sym0 + Lsz = Apply LamCases_0123456789876543210Sym0 X_0123456789876543210Sym0 type family X_0123456789876543210 where X_0123456789876543210 = AListSym0 type family Tt where - Tt = Case_0123456789876543210 X_0123456789876543210Sym0 + Tt = Apply LamCases_0123456789876543210Sym0 X_0123456789876543210Sym0 type family Tjz where - Tjz = Case_0123456789876543210 X_0123456789876543210Sym0 + Tjz = Apply LamCases_0123456789876543210Sym0 X_0123456789876543210Sym0 type family Tf where - Tf = Case_0123456789876543210 X_0123456789876543210Sym0 + Tf = Apply LamCases_0123456789876543210Sym0 X_0123456789876543210Sym0 type family X_0123456789876543210 where X_0123456789876543210 = TupleSym0 type Fls :: Bool type family Fls :: Bool where - Fls = Case_0123456789876543210 X_0123456789876543210Sym0 + Fls = Apply LamCases_0123456789876543210Sym0 X_0123456789876543210Sym0 type family Zz where - Zz = Case_0123456789876543210 X_0123456789876543210Sym0 + Zz = Apply LamCases_0123456789876543210Sym0 X_0123456789876543210Sym0 type family Jz where - Jz = Case_0123456789876543210 X_0123456789876543210Sym0 + Jz = Apply LamCases_0123456789876543210Sym0 X_0123456789876543210Sym0 type family X_0123456789876543210 where X_0123456789876543210 = ComplexSym0 type family Lz where - Lz = Case_0123456789876543210 X_0123456789876543210Sym0 + Lz = Apply LamCases_0123456789876543210Sym0 X_0123456789876543210Sym0 type family Sz where - Sz = Case_0123456789876543210 X_0123456789876543210Sym0 + Sz = Apply LamCases_0123456789876543210Sym0 X_0123456789876543210Sym0 type family X_0123456789876543210 where X_0123456789876543210 = PrSym0 sSilly :: @@ -420,111 +536,125 @@ Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations sSz :: Sing @_ SzSym0 sX_0123456789876543210 :: Sing @_ X_0123456789876543210Sym0 sSilly (sX :: Sing x) - = id - @(Sing (Case_0123456789876543210 x x)) (case sX of _ -> STuple0) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 x) (\cases _ -> STuple0)) + sX sFoo2 (STuple2 (sX :: Sing x) (sY :: Sing y)) = let sT :: Sing @_ (Let0123456789876543210TSym0 x y) sT = applySing (applySing (singFun2 @Tuple2Sym0 STuple2) sX) sY in - id - @(Sing (Case_0123456789876543210 x y (Let0123456789876543210TSym0 x y))) - (case sT of - STuple2 (sA :: Sing a) (sB :: Sing b) - -> applySing - (singFun1 - @(Lambda_0123456789876543210Sym0 a b x y) - (\ sArg_0123456789876543210 - -> case sArg_0123456789876543210 of - (_ :: Sing arg_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 arg_0123456789876543210 a b x y arg_0123456789876543210)) - (case sArg_0123456789876543210 of _ -> sA))) - sB) + applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 x y) + (\cases + (STuple2 (sA :: Sing a) (sB :: Sing b)) + -> applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 a b x y) (\cases _ -> sA)) + sB)) + sT sFoo1 (STuple2 (sX :: Sing x) (sY :: Sing y)) = applySing - (singFun1 - @(Lambda_0123456789876543210Sym0 x y) - (\ sArg_0123456789876543210 - -> case sArg_0123456789876543210 of - (_ :: Sing arg_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 arg_0123456789876543210 x y arg_0123456789876543210)) - (case sArg_0123456789876543210 of _ -> sX))) + (singFun1 @(LamCases_0123456789876543210Sym0 x y) (\cases _ -> sX)) sY sBlimy - = id - @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - SCons _ - (SCons _ - (SCons (SSucc (sY_0123456789876543210 :: Sing y_0123456789876543210)) - SNil)) - -> sY_0123456789876543210) + = applySing + (singFun1 + @LamCases_0123456789876543210Sym0 + (\cases + (SCons _ + (SCons _ + (SCons (SSucc (sY_0123456789876543210 :: Sing y_0123456789876543210)) + SNil))) + -> sY_0123456789876543210)) + sX_0123456789876543210 sLsz - = id - @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - SCons _ - (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) - (SCons (SSucc _) SNil)) - -> sY_0123456789876543210) + = applySing + (singFun1 + @LamCases_0123456789876543210Sym0 + (\cases + (SCons _ + (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) + (SCons (SSucc _) SNil))) + -> sY_0123456789876543210)) + sX_0123456789876543210 sX_0123456789876543210 = sAList sTt - = id - @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - STuple3 _ _ (sY_0123456789876543210 :: Sing y_0123456789876543210) - -> sY_0123456789876543210) + = applySing + (singFun1 + @LamCases_0123456789876543210Sym0 + (\cases + (STuple3 _ _ + (sY_0123456789876543210 :: Sing y_0123456789876543210)) + -> sY_0123456789876543210)) + sX_0123456789876543210 sTjz - = id - @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - STuple3 _ (sY_0123456789876543210 :: Sing y_0123456789876543210) _ - -> sY_0123456789876543210) + = applySing + (singFun1 + @LamCases_0123456789876543210Sym0 + (\cases + (STuple3 _ (sY_0123456789876543210 :: Sing y_0123456789876543210) + _) + -> sY_0123456789876543210)) + sX_0123456789876543210 sTf - = id - @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - STuple3 (sY_0123456789876543210 :: Sing y_0123456789876543210) _ _ - -> sY_0123456789876543210) + = applySing + (singFun1 + @LamCases_0123456789876543210Sym0 + (\cases + (STuple3 (sY_0123456789876543210 :: Sing y_0123456789876543210) _ + _) + -> sY_0123456789876543210)) + sX_0123456789876543210 sX_0123456789876543210 = sTuple sFls - = id - @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - SPair (SPair _ _) - (sY_0123456789876543210 :: Sing y_0123456789876543210) - -> sY_0123456789876543210) + = applySing + (singFun1 + @LamCases_0123456789876543210Sym0 + (\cases + (SPair (SPair _ _) + (sY_0123456789876543210 :: Sing y_0123456789876543210)) + -> sY_0123456789876543210)) + sX_0123456789876543210 sZz - = id - @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - SPair (SPair _ - (sY_0123456789876543210 :: Sing y_0123456789876543210)) - _ - -> sY_0123456789876543210) + = applySing + (singFun1 + @LamCases_0123456789876543210Sym0 + (\cases + (SPair (SPair _ + (sY_0123456789876543210 :: Sing y_0123456789876543210)) + _) + -> sY_0123456789876543210)) + sX_0123456789876543210 sJz - = id - @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - SPair (SPair (sY_0123456789876543210 :: Sing y_0123456789876543210) - _) - _ - -> sY_0123456789876543210) + = applySing + (singFun1 + @LamCases_0123456789876543210Sym0 + (\cases + (SPair (SPair (sY_0123456789876543210 :: Sing y_0123456789876543210) + _) + _) + -> sY_0123456789876543210)) + sX_0123456789876543210 sX_0123456789876543210 = sComplex sLz - = id - @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - SPair _ (sY_0123456789876543210 :: Sing y_0123456789876543210) - -> sY_0123456789876543210) + = applySing + (singFun1 + @LamCases_0123456789876543210Sym0 + (\cases + (SPair _ (sY_0123456789876543210 :: Sing y_0123456789876543210)) + -> sY_0123456789876543210)) + sX_0123456789876543210 sSz - = id - @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - SPair (sY_0123456789876543210 :: Sing y_0123456789876543210) _ - -> sY_0123456789876543210) + = applySing + (singFun1 + @LamCases_0123456789876543210Sym0 + (\cases + (SPair (sY_0123456789876543210 :: Sing y_0123456789876543210) _) + -> sY_0123456789876543210)) + sX_0123456789876543210 sX_0123456789876543210 = sPr instance SingI (SillySym0 :: (~>) a ()) where sing = singFun1 @SillySym0 sSilly diff --git a/singletons-base/tests/compile-and-dump/Singletons/Records.golden b/singletons-base/tests/compile-and-dump/Singletons/Records.golden index cddbbfb9..cdeed17d 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Records.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Records.golden @@ -70,8 +70,8 @@ Singletons/Records.hs:(0,0)-(0,0): Splicing declarations type Demote (Record a) = Record (Demote a) fromSing (SMkRecord b b) = MkRecord (fromSing b) (fromSing b) toSing (MkRecord (b :: Demote a) (b :: Demote Bool)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing Bool) of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SMkRecord c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SMkRecord c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing Bool) instance (SingI n, SingI n) => SingI (MkRecord (n :: a) (n :: Bool)) where sing = SMkRecord sing sing diff --git a/singletons-base/tests/compile-and-dump/Singletons/Sections.golden b/singletons-base/tests/compile-and-dump/Singletons/Sections.golden index 1d25ef89..ab5d2c80 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Sections.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Sections.golden @@ -19,18 +19,18 @@ Singletons/Sections.hs:(0,0)-(0,0): Splicing declarations foo2 = map (+ Succ Zero) [Zero, Succ Zero] foo3 :: [Nat] foo3 = zipWith (+) [Succ Zero, Succ Zero] [Zero, Succ Zero] - type family Lambda_0123456789876543210 lhs_0123456789876543210 where - Lambda_0123456789876543210 lhs_0123456789876543210 = Apply (Apply (+@#@$) lhs_0123456789876543210) (Apply SuccSym0 ZeroSym0) - data Lambda_0123456789876543210Sym0 lhs_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 lhs_0123456789876543210 = Apply (Apply (+@#@$) lhs_0123456789876543210) (Apply SuccSym0 ZeroSym0) + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => - Lambda_0123456789876543210Sym0 lhs_01234567898765432100123456789876543210 - type instance Apply Lambda_0123456789876543210Sym0 lhs_01234567898765432100123456789876543210 = Lambda_0123456789876543210 lhs_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 lhs_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 lhs_01234567898765432100123456789876543210 = Lambda_0123456789876543210 lhs_01234567898765432100123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 type Foo3Sym0 :: [Nat] type family Foo3Sym0 :: [Nat] where Foo3Sym0 = Foo3 @@ -64,7 +64,7 @@ Singletons/Sections.hs:(0,0)-(0,0): Splicing declarations Foo3 = Apply (Apply (Apply ZipWithSym0 (+@#@$)) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) NilSym0))) (Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) NilSym0)) type Foo2 :: [Nat] type family Foo2 :: [Nat] where - Foo2 = Apply (Apply MapSym0 Lambda_0123456789876543210Sym0) (Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) NilSym0)) + Foo2 = Apply (Apply MapSym0 LamCases_0123456789876543210Sym0) (Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) NilSym0)) type Foo1 :: [Nat] type family Foo1 :: [Nat] where Foo1 = Apply (Apply MapSym0 (Apply (+@#@$) (Apply SuccSym0 ZeroSym0))) (Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) NilSym0)) @@ -105,13 +105,12 @@ Singletons/Sections.hs:(0,0)-(0,0): Splicing declarations (applySing (singFun2 @MapSym0 sMap) (singFun1 - @Lambda_0123456789876543210Sym0 - (\ sLhs_0123456789876543210 - -> case sLhs_0123456789876543210 of - (_ :: Sing lhs_0123456789876543210) - -> applySing - (applySing (singFun2 @(+@#@$) (%+)) sLhs_0123456789876543210) - (applySing (singFun1 @SuccSym0 SSucc) SZero)))) + @LamCases_0123456789876543210Sym0 + (\cases + (sLhs_0123456789876543210 :: Sing lhs_0123456789876543210) + -> applySing + (applySing (singFun2 @(+@#@$) (%+)) sLhs_0123456789876543210) + (applySing (singFun1 @SuccSym0 SSucc) SZero)))) (applySing (applySing (singFun2 @(:@#@$) SCons) SZero) (applySing diff --git a/singletons-base/tests/compile-and-dump/Singletons/ShowDeriving.golden b/singletons-base/tests/compile-and-dump/Singletons/ShowDeriving.golden index 50defbca..af207724 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/ShowDeriving.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/ShowDeriving.golden @@ -318,17 +318,17 @@ Singletons/ShowDeriving.hs:(0,0)-(0,0): Splicing declarations fromSing ((:%*:) b b) = (:*:) (fromSing b) (fromSing b) fromSing ((:%&:) b b) = (:&:) (fromSing b) (fromSing b) toSing (MkFoo2a (b :: Demote a) (b :: Demote a)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing a) of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SMkFoo2a c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SMkFoo2a c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing a) toSing (MkFoo2b (b :: Demote a) (b :: Demote a)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing a) of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SMkFoo2b c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SMkFoo2b c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing a) toSing ((:*:) (b :: Demote a) (b :: Demote a)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing a) of - (,) (SomeSing c) (SomeSing c) -> SomeSing ((:%*:) c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing ((:%*:) c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing a) toSing ((:&:) (b :: Demote a) (b :: Demote a)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing a) of - (,) (SomeSing c) (SomeSing c) -> SomeSing ((:%&:) c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing ((:%&:) c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing a) data SFoo3 :: Foo3 -> Type where SMkFoo3 :: forall (n :: Bool) (n :: Bool). @@ -338,10 +338,8 @@ Singletons/ShowDeriving.hs:(0,0)-(0,0): Splicing declarations type Demote Foo3 = Foo3 fromSing (SMkFoo3 b b) = MkFoo3 (fromSing b) (fromSing b) toSing (MkFoo3 (b :: Demote Bool) (b :: Demote Bool)) - = case - (,) (toSing b :: SomeSing Bool) (toSing b :: SomeSing Bool) - of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SMkFoo3 c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SMkFoo3 c c)) + (toSing b :: SomeSing Bool) (toSing b :: SomeSing Bool) instance SShow Foo1 where sShowsPrec _ diff --git a/singletons-base/tests/compile-and-dump/Singletons/StandaloneDeriving.golden b/singletons-base/tests/compile-and-dump/Singletons/StandaloneDeriving.golden index 36a2a8e1..49596169 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/StandaloneDeriving.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/StandaloneDeriving.golden @@ -263,15 +263,35 @@ Singletons/StandaloneDeriving.hs:(0,0)-(0,0): Splicing declarations instance PBounded S where type MinBound = MinBound_0123456789876543210Sym0 type MaxBound = MaxBound_0123456789876543210Sym0 - type family Case_0123456789876543210 n0123456789876543210 t where - Case_0123456789876543210 n 'True = S2Sym0 - Case_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument" - type family Case_0123456789876543210 n0123456789876543210 t where - Case_0123456789876543210 n 'True = S1Sym0 - Case_0123456789876543210 n 'False = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 1)) + type family LamCases_0123456789876543210 n0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 n 'True = S2Sym0 + LamCases_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument" + data LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 n0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 n 'True = S1Sym0 + LamCases_0123456789876543210 n 'False = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 1)) + data LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 type ToEnum_0123456789876543210 :: GHC.Num.Natural.Natural -> S type family ToEnum_0123456789876543210 (a :: GHC.Num.Natural.Natural) :: S where - ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 0)) + ToEnum_0123456789876543210 n = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 0)) type ToEnum_0123456789876543210Sym0 :: (~>) GHC.Num.Natural.Natural S data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Num.Natural.Natural S where @@ -314,8 +334,8 @@ Singletons/StandaloneDeriving.hs:(0,0)-(0,0): Splicing declarations type Demote (T a b) = T (Demote a) (Demote b) fromSing ((:%*:) b b) = (:*:) (fromSing b) (fromSing b) toSing ((:*:) (b :: Demote a) (b :: Demote b)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing b) of - (,) (SomeSing c) (SomeSing c) -> SomeSing ((:%*:) c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing ((:%*:) c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing b) data SS :: S -> Type where SS1 :: SS (S1 :: S) @@ -439,37 +459,36 @@ Singletons/StandaloneDeriving.hs:(0,0)-(0,0): Splicing declarations sMaxBound = SS2 instance SEnum S where sToEnum (sN :: Sing n) - = id - @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 0)))) - (case - applySing - (applySing (singFun2 @(==@#@$) (%==)) sN) - (sFromInteger (sing :: Sing 0)) - of - STrue -> SS1 - SFalse - -> id - @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 1)))) - (case - applySing - (applySing (singFun2 @(==@#@$) (%==)) sN) - (sFromInteger (sing :: Sing 1)) - of - STrue -> SS2 - SFalse - -> applySing - (singFun1 @ErrorSym0 sError) - (sing :: Sing "toEnum: bad argument"))) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 n) + (\cases + STrue -> SS1 + SFalse + -> applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 n) + (\cases + STrue -> SS2 + SFalse + -> applySing + (singFun1 @ErrorSym0 sError) + (sing :: Sing "toEnum: bad argument"))) + (applySing + (applySing (singFun2 @(==@#@$) (%==)) sN) + (sFromInteger (sing :: Sing 1))))) + (applySing + (applySing (singFun2 @(==@#@$) (%==)) sN) + (sFromInteger (sing :: Sing 0))) sFromEnum SS1 = sFromInteger (sing :: Sing 0) sFromEnum SS2 = sFromInteger (sing :: Sing 1) instance SDecide a => SDecide (T a ()) where (%~) ((:%*:) a a) ((:%*:) b b) - = case (,) ((%~) a b) ((%~) a b) of - (,) (Proved Refl) (Proved Refl) -> Proved Refl - (,) (Disproved contra) _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,) _ (Disproved contra) - -> Disproved (\ refl -> case refl of Refl -> contra Refl) + = (\cases + (Proved Refl) (Proved Refl) -> Proved Refl + (Disproved contra) _ -> Disproved (\cases Refl -> contra Refl) + _ (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) ((%~) a b) instance Eq (ST (z :: T a ())) where (==) _ _ = True instance SDecide a => @@ -484,8 +503,8 @@ Singletons/StandaloneDeriving.hs:(0,0)-(0,0): Splicing declarations = Data.Singletons.Decide.decideCoercion instance SDecide S where (%~) SS1 SS1 = Proved Refl - (%~) SS1 SS2 = Disproved (\ x -> case x of {}) - (%~) SS2 SS1 = Disproved (\ x -> case x of {}) + (%~) SS1 SS2 = Disproved (\case) + (%~) SS2 SS1 = Disproved (\case) (%~) SS2 SS2 = Proved Refl instance Eq (SS (z :: S)) where (==) _ _ = True diff --git a/singletons-base/tests/compile-and-dump/Singletons/Star.golden b/singletons-base/tests/compile-and-dump/Singletons/Star.golden index 313f9e7a..ec2eef77 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/Star.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/Star.golden @@ -211,49 +211,46 @@ Singletons/Star.hs:0:0:: Splicing declarations toSing Singletons.Star.Int = SomeSing SInt toSing Singletons.Star.String = SomeSing SString toSing (Singletons.Star.Maybe (b :: Demote Type)) - = case toSing b :: SomeSing Type of - SomeSing c -> SomeSing (SMaybe c) + = (\cases (SomeSing c) -> SomeSing (SMaybe c)) + (toSing b :: SomeSing Type) toSing (Singletons.Star.Vec (b :: Demote Type) (b :: Demote Nat)) - = case - (,) (toSing b :: SomeSing Type) (toSing b :: SomeSing Nat) - of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SVec c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SVec c c)) + (toSing b :: SomeSing Type) (toSing b :: SomeSing Nat) instance (SDecide Type, SDecide Nat) => SDecide Type where (%~) SNat SNat = Proved Refl - (%~) SNat SInt = Disproved (\ x -> case x of {}) - (%~) SNat SString = Disproved (\ x -> case x of {}) - (%~) SNat (SMaybe _) = Disproved (\ x -> case x of {}) - (%~) SNat (SVec _ _) = Disproved (\ x -> case x of {}) - (%~) SInt SNat = Disproved (\ x -> case x of {}) + (%~) SNat SInt = Disproved (\case) + (%~) SNat SString = Disproved (\case) + (%~) SNat (SMaybe _) = Disproved (\case) + (%~) SNat (SVec _ _) = Disproved (\case) + (%~) SInt SNat = Disproved (\case) (%~) SInt SInt = Proved Refl - (%~) SInt SString = Disproved (\ x -> case x of {}) - (%~) SInt (SMaybe _) = Disproved (\ x -> case x of {}) - (%~) SInt (SVec _ _) = Disproved (\ x -> case x of {}) - (%~) SString SNat = Disproved (\ x -> case x of {}) - (%~) SString SInt = Disproved (\ x -> case x of {}) + (%~) SInt SString = Disproved (\case) + (%~) SInt (SMaybe _) = Disproved (\case) + (%~) SInt (SVec _ _) = Disproved (\case) + (%~) SString SNat = Disproved (\case) + (%~) SString SInt = Disproved (\case) (%~) SString SString = Proved Refl - (%~) SString (SMaybe _) = Disproved (\ x -> case x of {}) - (%~) SString (SVec _ _) = Disproved (\ x -> case x of {}) - (%~) (SMaybe _) SNat = Disproved (\ x -> case x of {}) - (%~) (SMaybe _) SInt = Disproved (\ x -> case x of {}) - (%~) (SMaybe _) SString = Disproved (\ x -> case x of {}) + (%~) SString (SMaybe _) = Disproved (\case) + (%~) SString (SVec _ _) = Disproved (\case) + (%~) (SMaybe _) SNat = Disproved (\case) + (%~) (SMaybe _) SInt = Disproved (\case) + (%~) (SMaybe _) SString = Disproved (\case) (%~) (SMaybe a) (SMaybe b) - = case (%~) a b of - Proved Refl -> Proved Refl - Disproved contra - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (%~) (SMaybe _) (SVec _ _) = Disproved (\ x -> case x of {}) - (%~) (SVec _ _) SNat = Disproved (\ x -> case x of {}) - (%~) (SVec _ _) SInt = Disproved (\ x -> case x of {}) - (%~) (SVec _ _) SString = Disproved (\ x -> case x of {}) - (%~) (SVec _ _) (SMaybe _) = Disproved (\ x -> case x of {}) + = (\cases + (Proved Refl) -> Proved Refl + (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) + (%~) (SMaybe _) (SVec _ _) = Disproved (\case) + (%~) (SVec _ _) SNat = Disproved (\case) + (%~) (SVec _ _) SInt = Disproved (\case) + (%~) (SVec _ _) SString = Disproved (\case) + (%~) (SVec _ _) (SMaybe _) = Disproved (\case) (%~) (SVec a a) (SVec b b) - = case (,) ((%~) a b) ((%~) a b) of - (,) (Proved Refl) (Proved Refl) -> Proved Refl - (,) (Disproved contra) _ - -> Disproved (\ refl -> case refl of Refl -> contra Refl) - (,) _ (Disproved contra) - -> Disproved (\ refl -> case refl of Refl -> contra Refl) + = (\cases + (Proved Refl) (Proved Refl) -> Proved Refl + (Disproved contra) _ -> Disproved (\cases Refl -> contra Refl) + _ (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) ((%~) a b) instance Eq (SRep (z :: Type)) where (==) _ _ = True instance (SDecide Type, SDecide Nat) => diff --git a/singletons-base/tests/compile-and-dump/Singletons/T124.golden b/singletons-base/tests/compile-and-dump/Singletons/T124.golden index 6946d9fd..214a46be 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T124.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T124.golden @@ -32,6 +32,7 @@ Singletons/T124.hs:(0,0)-(0,0): Splicing declarations Singletons/T124.hs:0:0:: Splicing expression sCases ''Bool [| b |] [| STuple0 |] ======> - case b of - SFalse -> STuple0 - STrue -> STuple0 + (\cases + SFalse -> STuple0 + STrue -> STuple0) + b diff --git a/singletons-base/tests/compile-and-dump/Singletons/T136.golden b/singletons-base/tests/compile-and-dump/Singletons/T136.golden index f18966b6..57aff289 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T136.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T136.golden @@ -63,18 +63,48 @@ Singletons/T136.hs:(0,0)-(0,0): Splicing declarations type Pred_0123456789876543210Sym1 :: [Bool] -> [Bool] type family Pred_0123456789876543210Sym1 (a0123456789876543210 :: [Bool]) :: [Bool] where Pred_0123456789876543210Sym1 a0123456789876543210 = Pred_0123456789876543210 a0123456789876543210 - type family Case_0123456789876543210 i0123456789876543210 arg_01234567898765432100123456789876543210 t where - Case_0123456789876543210 i arg_0123456789876543210 'True = NilSym0 - Case_0123456789876543210 i arg_0123456789876543210 'False = Apply SuccSym0 (Apply ToEnumSym0 (Apply PredSym0 i)) - type family Case_0123456789876543210 i0123456789876543210 arg_01234567898765432100123456789876543210 t where - Case_0123456789876543210 i arg_0123456789876543210 'True = Apply ErrorSym0 "negative toEnum" - Case_0123456789876543210 i arg_0123456789876543210 'False = Case_0123456789876543210 i arg_0123456789876543210 (Apply (Apply (==@#@$) i) (FromInteger 0)) - type family Case_0123456789876543210 arg_01234567898765432100123456789876543210 t where - Case_0123456789876543210 arg_0123456789876543210 i = Case_0123456789876543210 i arg_0123456789876543210 (Apply (Apply (<@#@$) i) (FromInteger 0)) + type family LamCases_0123456789876543210 i0123456789876543210 arg_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 i arg_0123456789876543210 'True = NilSym0 + LamCases_0123456789876543210 i arg_0123456789876543210 'False = Apply SuccSym0 (Apply ToEnumSym0 (Apply PredSym0 i)) + data LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 i0123456789876543210 arg_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 i0123456789876543210 arg_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 i arg_0123456789876543210 'True = Apply ErrorSym0 "negative toEnum" + LamCases_0123456789876543210 i arg_0123456789876543210 'False = Apply (LamCases_0123456789876543210Sym0 i arg_0123456789876543210) (Apply (Apply (==@#@$) i) (FromInteger 0)) + data LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 i0123456789876543210 arg_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 i0123456789876543210 arg_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 i0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 arg_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 arg_0123456789876543210 i = Apply (LamCases_0123456789876543210Sym0 i arg_0123456789876543210) (Apply (Apply (<@#@$) i) (FromInteger 0)) + data LamCases_0123456789876543210Sym0 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 arg_01234567898765432100123456789876543210) arg) (LamCases_0123456789876543210Sym1 arg_01234567898765432100123456789876543210 arg) => + LamCases_0123456789876543210Sym0 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 arg_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 arg_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 type ToEnum_0123456789876543210 :: GHC.Num.Natural.Natural -> [Bool] type family ToEnum_0123456789876543210 (a :: GHC.Num.Natural.Natural) :: [Bool] where - ToEnum_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210 + ToEnum_0123456789876543210 arg_0123456789876543210 = Apply (LamCases_0123456789876543210Sym0 arg_0123456789876543210) arg_0123456789876543210 type ToEnum_0123456789876543210Sym0 :: (~>) GHC.Num.Natural.Natural [Bool] data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Num.Natural.Natural [Bool] where @@ -130,35 +160,37 @@ Singletons/T136.hs:(0,0)-(0,0): Splicing declarations sPred (SCons STrue (sAs :: Sing as)) = applySing (applySing (singFun2 @(:@#@$) SCons) SFalse) sAs sToEnum (sArg_0123456789876543210 :: Sing arg_0123456789876543210) - = id - @(Sing (Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210)) - (case sArg_0123456789876543210 of - (sI :: Sing i) - -> id - @(Sing (Case_0123456789876543210 i arg_0123456789876543210 (Apply (Apply (<@#@$) i) (FromInteger 0)))) - (case - applySing - (applySing (singFun2 @(<@#@$) (%<)) sI) - (sFromInteger (sing :: Sing 0)) - of - STrue - -> applySing - (singFun1 @ErrorSym0 sError) (sing :: Sing "negative toEnum") - SFalse - -> id - @(Sing (Case_0123456789876543210 i arg_0123456789876543210 (Apply (Apply (==@#@$) i) (FromInteger 0)))) - (case - applySing - (applySing (singFun2 @(==@#@$) (%==)) sI) - (sFromInteger (sing :: Sing 0)) - of - STrue -> SNil - SFalse - -> applySing - (singFun1 @SuccSym0 sSucc) - (applySing - (singFun1 @ToEnumSym0 sToEnum) - (applySing (singFun1 @PredSym0 sPred) sI))))) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 arg_0123456789876543210) + (\cases + (sI :: Sing i) + -> applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 i arg_0123456789876543210) + (\cases + STrue + -> applySing + (singFun1 @ErrorSym0 sError) (sing :: Sing "negative toEnum") + SFalse + -> applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 i arg_0123456789876543210) + (\cases + STrue -> SNil + SFalse + -> applySing + (singFun1 @SuccSym0 sSucc) + (applySing + (singFun1 @ToEnumSym0 sToEnum) + (applySing (singFun1 @PredSym0 sPred) sI)))) + (applySing + (applySing (singFun2 @(==@#@$) (%==)) sI) + (sFromInteger (sing :: Sing 0))))) + (applySing + (applySing (singFun2 @(<@#@$) (%<)) sI) + (sFromInteger (sing :: Sing 0))))) + sArg_0123456789876543210 sFromEnum SNil = sFromInteger (sing :: Sing 0) sFromEnum (SCons SFalse (sAs :: Sing as)) = applySing diff --git a/singletons-base/tests/compile-and-dump/Singletons/T150.golden b/singletons-base/tests/compile-and-dump/Singletons/T150.golden index 7da2cf48..3c1bcdc8 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T150.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T150.golden @@ -148,7 +148,17 @@ Singletons/T150.hs:(0,0)-(0,0): Splicing declarations type ObjSym1 :: a -> Obj type family ObjSym1 @a (a0123456789876543210 :: a) :: Obj where ObjSym1 a0123456789876543210 = Obj a0123456789876543210 - type family Case_0123456789876543210 n0123456789876543210 t where + type family LamCases_0123456789876543210 n0123456789876543210 a_0123456789876543210 where + data LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 type TransitivitySym0 :: (~>) (Equal a b) ((~>) (Equal b c) (Equal a c)) data TransitivitySym0 :: (~>) (Equal a b) ((~>) (Equal b c) (Equal a c)) where @@ -253,7 +263,7 @@ Singletons/T150.hs:(0,0)-(0,0): Splicing declarations type family (!) @n @a (a :: Vec n a) (a :: Fin n) :: a where (!) (VCons x _) FZ = x (!) (VCons _ xs) (FS n) = Apply (Apply (!@#@$) xs) n - (!) VNil n = Case_0123456789876543210 n n + (!) VNil n = Apply (LamCases_0123456789876543210Sym0 n) n type TailVec :: Vec ('Succ n) a -> Vec n a type family TailVec @n @a (a :: Vec ('Succ n) a) :: Vec n a where TailVec (VCons _ xs) = xs @@ -293,7 +303,8 @@ Singletons/T150.hs:(0,0)-(0,0): Splicing declarations (%!) (SVCons _ (sXs :: Sing xs)) (SFS (sN :: Sing n)) = applySing (applySing (singFun2 @(!@#@$) (%!)) sXs) sN (%!) SVNil (sN :: Sing n) - = id @(Sing (Case_0123456789876543210 n n)) (case sN of {}) + = applySing + (singFun1 @(LamCases_0123456789876543210Sym0 n) (\case)) sN sTailVec (SVCons _ (sXs :: Sing xs)) = sXs sHeadVec (SVCons (sX :: Sing x) _) = sX instance SingI (TransitivitySym0 :: (~>) (Equal a b) ((~>) (Equal b c) (Equal a c))) where diff --git a/singletons-base/tests/compile-and-dump/Singletons/T159.golden b/singletons-base/tests/compile-and-dump/Singletons/T159.golden index 636b2c10..a523c165 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T159.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T159.golden @@ -118,11 +118,11 @@ Singletons/T159.hs:0:0:: Splicing declarations fromSing ((:%&&) b b) = (:&&) (fromSing b) (fromSing b) toSing N1 = SomeSing SN1 toSing (C1 (b :: Demote T0) (b :: Demote T1)) - = case (,) (toSing b :: SomeSing T0) (toSing b :: SomeSing T1) of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SC1 c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SC1 c c)) + (toSing b :: SomeSing T0) (toSing b :: SomeSing T1) toSing ((:&&) (b :: Demote T0) (b :: Demote T1)) - = case (,) (toSing b :: SomeSing T0) (toSing b :: SomeSing T1) of - (,) (SomeSing c) (SomeSing c) -> SomeSing ((:%&&) c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing ((:%&&) c c)) + (toSing b :: SomeSing T0) (toSing b :: SomeSing T1) infixr 5 `SC1` infixr 5 :%&& instance SingI 'N1 where @@ -230,11 +230,11 @@ Singletons/T159.hs:(0,0)-(0,0): Splicing declarations fromSing ((:%||) b b) = (:||) (fromSing b) (fromSing b) toSing N2 = SomeSing SN2 toSing (C2 (b :: Demote T0) (b :: Demote T2)) - = case (,) (toSing b :: SomeSing T0) (toSing b :: SomeSing T2) of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SC2 c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SC2 c c)) + (toSing b :: SomeSing T0) (toSing b :: SomeSing T2) toSing ((:||) (b :: Demote T0) (b :: Demote T2)) - = case (,) (toSing b :: SomeSing T0) (toSing b :: SomeSing T2) of - (,) (SomeSing c) (SomeSing c) -> SomeSing ((:%||) c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing ((:%||) c c)) + (toSing b :: SomeSing T0) (toSing b :: SomeSing T2) instance SingI N2 where sing = SN2 instance (SingI n, SingI n) => SingI (C2 (n :: T0) (n :: T2)) where diff --git a/singletons-base/tests/compile-and-dump/Singletons/T160.golden b/singletons-base/tests/compile-and-dump/Singletons/T160.golden index 7263203f..3d2ce521 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T160.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T160.golden @@ -5,13 +5,19 @@ Singletons/T160.hs:(0,0)-(0,0): Splicing declarations ======> foo :: (Num a, Eq a) => a -> a foo x = if (x == 0) then 1 else (typeError $ ShowType x) - type family Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210 - type family Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210 x = Apply (Apply (==@#@$) x) (FromInteger 0) - type family Case_0123456789876543210 x0123456789876543210 t where - Case_0123456789876543210 x 'True = FromInteger 1 - Case_0123456789876543210 x 'False = Apply (Apply ($@#@$) TypeErrorSym0) (Apply ShowTypeSym0 x) + type family LamCases_0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x 'True = FromInteger 1 + LamCases_0123456789876543210 x 'False = Apply (Apply ($@#@$) TypeErrorSym0) (Apply ShowTypeSym0 x) + data LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 type FooSym0 :: (~>) a a data FooSym0 :: (~>) a a where @@ -25,28 +31,24 @@ Singletons/T160.hs:(0,0)-(0,0): Splicing declarations FooSym1 a0123456789876543210 = Foo a0123456789876543210 type Foo :: a -> a type family Foo @a (a :: a) :: a where - Foo x = Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym0 x) + Foo x = Apply (LamCases_0123456789876543210Sym0 x) (Apply (Apply (==@#@$) x) (FromInteger 0)) sFoo :: (forall (t :: a). (SNum a, SEq a) => Sing t -> Sing (Apply FooSym0 t :: a) :: Type) sFoo (sX :: Sing x) - = let - sScrutinee_0123456789876543210 :: - Sing @_ (Let0123456789876543210Scrutinee_0123456789876543210Sym0 x) - sScrutinee_0123456789876543210 - = applySing - (applySing (singFun2 @(==@#@$) (%==)) sX) - (sFromInteger (sing :: Sing 0)) - in - id - @(Sing (Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym0 x))) - (case sScrutinee_0123456789876543210 of - STrue -> sFromInteger (sing :: Sing 1) - SFalse - -> applySing - (applySing - (singFun2 @($@#@$) (%$)) (singFun1 @TypeErrorSym0 sTypeError)) - (applySing (singFun1 @ShowTypeSym0 SShowType) sX)) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 x) + (\cases + STrue -> sFromInteger (sing :: Sing 1) + SFalse + -> applySing + (applySing + (singFun2 @($@#@$) (%$)) (singFun1 @TypeErrorSym0 sTypeError)) + (applySing (singFun1 @ShowTypeSym0 SShowType) sX))) + (applySing + (applySing (singFun2 @(==@#@$) (%==)) sX) + (sFromInteger (sing :: Sing 0))) instance (SNum a, SEq a) => SingI (FooSym0 :: (~>) a a) where sing = singFun1 @FooSym0 sFoo Singletons/T160.hs:0:0: error: [GHC-64725] diff --git a/singletons-base/tests/compile-and-dump/Singletons/T163.golden b/singletons-base/tests/compile-and-dump/Singletons/T163.golden index 433ca640..52dac215 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T163.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T163.golden @@ -34,9 +34,9 @@ Singletons/T163.hs:0:0:: Splicing declarations fromSing (SL b) = L (fromSing b) fromSing (SR b) = R (fromSing b) toSing (L (b :: Demote a)) - = case toSing b :: SomeSing a of SomeSing c -> SomeSing (SL c) + = (\cases (SomeSing c) -> SomeSing (SL c)) (toSing b :: SomeSing a) toSing (R (b :: Demote b)) - = case toSing b :: SomeSing b of SomeSing c -> SomeSing (SR c) + = (\cases (SomeSing c) -> SomeSing (SR c)) (toSing b :: SomeSing b) instance SingI n => SingI (L (n :: a)) where sing = SL sing instance SingI1 L where diff --git a/singletons-base/tests/compile-and-dump/Singletons/T166.golden b/singletons-base/tests/compile-and-dump/Singletons/T166.golden index c5a5e8c2..7db3dc4c 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T166.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T166.golden @@ -44,21 +44,21 @@ Singletons/T166.hs:(0,0)-(0,0): Splicing declarations type FooSym1 :: forall a. a -> [Bool] type family FooSym1 @a (a0123456789876543210 :: a) :: [Bool] where FooSym1 a0123456789876543210 = Foo a0123456789876543210 - type family Lambda_0123456789876543210 a0123456789876543210 x0123456789876543210 s where - Lambda_0123456789876543210 a x s = Apply (Apply (Apply FoosPrecSym0 (FromInteger 0)) x) s - data Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 s0123456789876543210 + type family LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a x s = Apply (Apply (Apply FoosPrecSym0 (FromInteger 0)) x) s + data LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 s0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210) s0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 x0123456789876543210 s0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 s0123456789876543210 where - Lambda_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 s0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 x0123456789876543210 s0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 type Foo_0123456789876543210 :: forall a. a -> [Bool] type family Foo_0123456789876543210 @a (a :: a) :: [Bool] where - Foo_0123456789876543210 @a (x :: a) = Lambda_0123456789876543210Sym0 a x + Foo_0123456789876543210 @a (x :: a) = LamCases_0123456789876543210Sym0 a x type Foo_0123456789876543210Sym0 :: forall a. (~>) a [Bool] data Foo_0123456789876543210Sym0 :: (~>) a [Bool] where @@ -92,16 +92,15 @@ Singletons/T166.hs:(0,0)-(0,0): Splicing declarations Sing t -> Sing (Apply FooSym0 t :: [Bool]) :: Type) sFoo (sX :: Sing x) = singFun1 - @(Lambda_0123456789876543210Sym0 a x) - (\ sS - -> case sS of - (_ :: Sing s) - -> applySing - (applySing - (applySing - (singFun3 @FoosPrecSym0 sFoosPrec) (sFromInteger (sing :: Sing 0))) - sX) - sS) + @(LamCases_0123456789876543210Sym0 a x) + (\cases + (sS :: Sing s) + -> applySing + (applySing + (applySing + (singFun3 @FoosPrecSym0 sFoosPrec) (sFromInteger (sing :: Sing 0))) + sX) + sS) instance SFoo a => SingI (FoosPrecSym0 :: (~>) Natural ((~>) a ((~>) [Bool] [Bool]))) where sing = singFun3 @FoosPrecSym0 sFoosPrec @@ -133,12 +132,12 @@ Singletons/T166.hs:(0,0)-(0,0): Splicing declarations instance SFoo a => SingI (FooSym0 :: (~>) a [Bool]) where sing = singFun1 @FooSym0 sFoo Singletons/T166.hs:0:0: error: [GHC-83865] - • Expecting one more argument to ‘Lambda_0123456789876543210Sym0 a x’ + • Expecting one more argument to ‘LamCases_0123456789876543210Sym0 a x’ Expected kind ‘[Bool]’, - but ‘Lambda_0123456789876543210Sym0 a x’ has kind ‘TyFun - [Bool] [Bool] - -> Type’ - • In the type ‘Lambda_0123456789876543210Sym0 a x’ + but ‘LamCases_0123456789876543210Sym0 a x’ has kind ‘TyFun + [Bool] [Bool] + -> Type’ + • In the type ‘LamCases_0123456789876543210Sym0 a x’ In the type family declaration for ‘Foo_0123456789876543210’ | 6 | $(singletonsOnly [d| diff --git a/singletons-base/tests/compile-and-dump/Singletons/T176.golden b/singletons-base/tests/compile-and-dump/Singletons/T176.golden index 3e86a20d..41004a98 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T176.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T176.golden @@ -22,20 +22,18 @@ Singletons/T176.hs:(0,0)-(0,0): Splicing declarations baz2 :: a quux2 :: Foo2 a => a -> a quux2 x = (x `bar2` baz2) - type family Case_0123456789876543210 arg_01234567898765432100123456789876543210 x0123456789876543210 t where - Case_0123456789876543210 arg_0123456789876543210 x _ = Baz1Sym0 - type family Lambda_0123456789876543210 x0123456789876543210 arg_0123456789876543210 where - Lambda_0123456789876543210 x arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x arg_0123456789876543210 - data Lambda_0123456789876543210Sym0 x0123456789876543210 arg_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x _ = Baz1Sym0 + data LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 arg_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 type Quux2Sym0 :: (~>) a a data Quux2Sym0 :: (~>) a a where @@ -63,7 +61,7 @@ Singletons/T176.hs:(0,0)-(0,0): Splicing declarations Quux2 x = Apply (Apply Bar2Sym0 x) Baz2Sym0 type Quux1 :: a -> a type family Quux1 @a (a :: a) :: a where - Quux1 x = Apply (Apply Bar1Sym0 x) (Lambda_0123456789876543210Sym0 x) + Quux1 x = Apply (Apply Bar1Sym0 x) (LamCases_0123456789876543210Sym0 x) type Bar1Sym0 :: forall a b. (~>) a ((~>) ((~>) a b) b) data Bar1Sym0 :: (~>) a ((~>) ((~>) a b) b) where @@ -126,13 +124,7 @@ Singletons/T176.hs:(0,0)-(0,0): Splicing declarations = applySing (applySing (singFun2 @Bar1Sym0 sBar1) sX) (singFun1 - @(Lambda_0123456789876543210Sym0 x) - (\ sArg_0123456789876543210 - -> case sArg_0123456789876543210 of - (_ :: Sing arg_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 arg_0123456789876543210 x arg_0123456789876543210)) - (case sArg_0123456789876543210 of _ -> sBaz1))) + @(LamCases_0123456789876543210Sym0 x) (\cases _ -> sBaz1)) instance SFoo2 a => SingI (Quux2Sym0 :: (~>) a a) where sing = singFun1 @Quux2Sym0 sQuux2 instance SFoo1 a => SingI (Quux1Sym0 :: (~>) a a) where diff --git a/singletons-base/tests/compile-and-dump/Singletons/T178.golden b/singletons-base/tests/compile-and-dump/Singletons/T178.golden index 45601070..c31c5509 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T178.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T178.golden @@ -218,13 +218,13 @@ Singletons/T178.hs:(0,0)-(0,0): Splicing declarations sA_0123456789876543210 instance SDecide Occ where (%~) SStr SStr = Proved Refl - (%~) SStr SOpt = Disproved (\ x -> case x of {}) - (%~) SStr SMany = Disproved (\ x -> case x of {}) - (%~) SOpt SStr = Disproved (\ x -> case x of {}) + (%~) SStr SOpt = Disproved (\case) + (%~) SStr SMany = Disproved (\case) + (%~) SOpt SStr = Disproved (\case) (%~) SOpt SOpt = Proved Refl - (%~) SOpt SMany = Disproved (\ x -> case x of {}) - (%~) SMany SStr = Disproved (\ x -> case x of {}) - (%~) SMany SOpt = Disproved (\ x -> case x of {}) + (%~) SOpt SMany = Disproved (\case) + (%~) SMany SStr = Disproved (\case) + (%~) SMany SOpt = Disproved (\case) (%~) SMany SMany = Proved Refl instance Eq (SOcc (z :: Occ)) where (==) _ _ = True diff --git a/singletons-base/tests/compile-and-dump/Singletons/T183.golden b/singletons-base/tests/compile-and-dump/Singletons/T183.golden index 032ef643..6bf2c3ba 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T183.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T183.golden @@ -87,33 +87,43 @@ Singletons/T183.hs:(0,0)-(0,0): Splicing declarations Let0123456789876543210XSym0 a0123456789876543210 = Let0123456789876543210X a0123456789876543210 type family Let0123456789876543210X a0123456789876543210 where Let0123456789876543210X a = NothingSym0 :: Maybe a - type family Let0123456789876543210Scrutinee_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 a0123456789876543210 x0123456789876543210 - type family Let0123456789876543210Scrutinee_0123456789876543210 a0123456789876543210 x0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210 a x = x :: Maybe a - type family Case_0123456789876543210 a0123456789876543210 x0123456789876543210 t where - Case_0123456789876543210 a x ('Just (y :: a) :: Maybe a) = Apply JustSym0 (Apply JustSym0 (y :: a) :: Maybe a) - type family Case_0123456789876543210 arg_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t where - Case_0123456789876543210 arg_0123456789876543210 a_0123456789876543210 '(x :: a, - y :: b) = Apply (Apply Tuple2Sym0 (y :: b)) (x :: a) - type family Lambda_0123456789876543210 a_01234567898765432100123456789876543210 arg_0123456789876543210 where - Lambda_0123456789876543210 a_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 a_0123456789876543210 arg_0123456789876543210 - data Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a x ('Just (y :: a) :: Maybe a) = Apply JustSym0 (Apply JustSym0 (y :: a) :: Maybe a) + data LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 - type family Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210 - type family Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210 x = Apply JustSym0 x - type family Case_0123456789876543210 x0123456789876543210 t where - Case_0123456789876543210 x ('Just y :: Maybe Bool) = y :: Bool + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a_0123456789876543210 '(x :: a, + y :: b) = Apply (Apply Tuple2Sym0 (y :: b)) (x :: a) + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 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 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x ('Just y :: Maybe Bool) = y :: Bool + data LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 type Foo9Sym0 :: (~>) a a data Foo9Sym0 :: (~>) a a where @@ -270,13 +280,13 @@ Singletons/T183.hs:(0,0)-(0,0): Splicing declarations Foo7 (x :: a) (wild_0123456789876543210 :: b) = x :: a type Foo6 :: Maybe (Maybe a) -> Maybe (Maybe a) type family Foo6 @a (a :: Maybe (Maybe a)) :: Maybe (Maybe a) where - Foo6 ('Just x :: Maybe (Maybe a)) = Case_0123456789876543210 a x (Let0123456789876543210Scrutinee_0123456789876543210Sym0 a x) + Foo6 ('Just x :: Maybe (Maybe a)) = Apply (LamCases_0123456789876543210Sym0 a x) (x :: Maybe a) type Foo5 :: Maybe (Maybe a) -> Maybe (Maybe a) type family Foo5 @a (a :: Maybe (Maybe a)) :: Maybe (Maybe a) where Foo5 ('Just ('Just (x :: a) :: Maybe a) :: Maybe (Maybe a)) = Apply JustSym0 (Apply JustSym0 (x :: a) :: Maybe a) :: Maybe (Maybe a) type Foo4 :: (a, b) -> (b, a) type family Foo4 @a @b (a :: (a, b)) :: (b, a) where - Foo4 a_0123456789876543210 = Apply (Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210 + Foo4 a_0123456789876543210 = Apply (LamCases_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210 type Foo3 :: forall a. Maybe a -> a type family Foo3 @a (a :: Maybe a) :: a where Foo3 @a ('Just x :: Maybe a) = x :: a @@ -287,7 +297,7 @@ Singletons/T183.hs:(0,0)-(0,0): Splicing declarations type family Foo1 @a (a :: Maybe a) :: a where Foo1 ('Just x :: Maybe a) = x :: a type family G a where - G x = Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym0 x) + G x = Apply (LamCases_0123456789876543210Sym0 x) (Apply JustSym0 x) type family F3 a where F3 ('Just a :: Maybe Bool) = "hi" type family F2 a where @@ -323,136 +333,124 @@ Singletons/T183.hs:(0,0)-(0,0): Splicing declarations sF2 :: forall arg. Sing arg -> Sing (Apply F2Sym0 arg) sF1 :: forall arg. Sing arg -> Sing (Apply F1Sym0 arg) sFoo9 (sX :: Sing x) - = case sX :: Sing x of - (_ :: Sing (x :: a)) - -> let - sG :: - (forall (t :: a) (t :: b). - Sing t - -> Sing t - -> Sing (Apply (Apply (Let0123456789876543210GSym0 a x) t) t :: a) :: Type) - sG (sY :: Sing y) _ = sY - in - applySing - (applySing (singFun2 @(Let0123456789876543210GSym0 a x) sG) sX) - STuple0 + = (\cases + (_ :: Sing (x :: a)) + -> let + sG :: + (forall (t :: a) (t :: b). + Sing t + -> Sing t + -> Sing (Apply (Apply (Let0123456789876543210GSym0 a x) t) t :: a) :: Type) + sG (sY :: Sing y) _ = sY + in + applySing + (applySing (singFun2 @(Let0123456789876543210GSym0 a x) sG) sX) + STuple0) + (sX :: Sing x) sFoo8 (SJust (sWild_0123456789876543210 :: Sing wild_0123456789876543210)) - = case - (,) - (sWild_0123456789876543210 :: Sing wild_0123456789876543210) - (SJust - (sWild_0123456789876543210 :: Sing wild_0123456789876543210)) - of - (,) (_ :: Sing (wild_0123456789876543210 :: a)) - (_ :: Sing ('Just (wild_0123456789876543210 :: a) :: Maybe a)) - -> let - sX :: - Sing @_ (Let0123456789876543210XSym0 a wild_0123456789876543210) - sX - = applySing - (singFun1 @JustSym0 SJust) - (sWild_0123456789876543210 :: - Sing (wild_0123456789876543210 :: a)) :: - Sing (Apply JustSym0 (wild_0123456789876543210 :: a) :: Maybe a) - in sX + = (\cases + (_ :: Sing (wild_0123456789876543210 :: a)) + (_ :: Sing ('Just (wild_0123456789876543210 :: a) :: Maybe a)) + -> let + sX :: + Sing @_ (Let0123456789876543210XSym0 a wild_0123456789876543210) + sX + = applySing + (singFun1 @JustSym0 SJust) + (sWild_0123456789876543210 :: + Sing (wild_0123456789876543210 :: a)) :: + Sing (Apply JustSym0 (wild_0123456789876543210 :: a) :: Maybe a) + in sX) + (sWild_0123456789876543210 :: Sing wild_0123456789876543210) + (SJust + (sWild_0123456789876543210 :: Sing wild_0123456789876543210)) sFoo8 SNothing - = case SNothing of - (_ :: Sing ('Nothing :: Maybe a)) - -> let - sX :: Sing @_ (Let0123456789876543210XSym0 a) - sX = SNothing :: Sing (NothingSym0 :: Maybe a) - in sX + = (\cases + (_ :: Sing ('Nothing :: Maybe a)) + -> let + sX :: Sing @_ (Let0123456789876543210XSym0 a) + sX = SNothing :: Sing (NothingSym0 :: Maybe a) + in sX) + SNothing sFoo7 (sX :: Sing x) (sWild_0123456789876543210 :: Sing wild_0123456789876543210) - = case - (,) - (sX :: Sing x) - (sWild_0123456789876543210 :: Sing wild_0123456789876543210) - of - (,) (_ :: Sing (x :: a)) - (_ :: Sing (wild_0123456789876543210 :: b)) - -> sX :: Sing (x :: a) + = (\cases + (_ :: Sing (x :: a)) (_ :: Sing (wild_0123456789876543210 :: b)) + -> sX :: Sing (x :: a)) + (sX :: Sing x) + (sWild_0123456789876543210 :: Sing wild_0123456789876543210) sFoo6 (SJust (sX :: Sing x)) - = case SJust (sX :: Sing x) of - (_ :: Sing ('Just x :: Maybe (Maybe a))) - -> let - sScrutinee_0123456789876543210 :: - Sing @_ (Let0123456789876543210Scrutinee_0123456789876543210Sym0 a x) - sScrutinee_0123456789876543210 = sX :: Sing (x :: Maybe a) - in - id - @(Sing (Case_0123456789876543210 a x (Let0123456789876543210Scrutinee_0123456789876543210Sym0 a x))) - (case sScrutinee_0123456789876543210 of - SJust (sY :: Sing y) - -> case (,) (sY :: Sing y) (SJust (sY :: Sing y)) of - (,) (_ :: Sing (y :: a)) (_ :: Sing ('Just (y :: a) :: Maybe a)) - -> applySing - (singFun1 @JustSym0 SJust) - (applySing (singFun1 @JustSym0 SJust) (sY :: Sing (y :: a)) :: - Sing (Apply JustSym0 (y :: a) :: Maybe a))) + = (\cases + (_ :: Sing ('Just x :: Maybe (Maybe a))) + -> applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 a x) + (\cases + (SJust (sY :: Sing y)) + -> (\cases + (_ :: Sing (y :: a)) (_ :: Sing ('Just (y :: a) :: Maybe a)) + -> applySing + (singFun1 @JustSym0 SJust) + (applySing + (singFun1 @JustSym0 SJust) (sY :: Sing (y :: a)) :: + Sing (Apply JustSym0 (y :: a) :: Maybe a))) + (sY :: Sing y) (SJust (sY :: Sing y)))) + (sX :: Sing (x :: Maybe a))) + (SJust (sX :: Sing x)) sFoo5 (SJust (SJust (sX :: Sing x))) - = case - (,,) - (sX :: Sing x) (SJust (sX :: Sing x)) - (SJust (SJust (sX :: Sing x))) - of - (,,) (_ :: Sing (x :: a)) (_ :: Sing ('Just (x :: a) :: Maybe a)) - (_ :: Sing ('Just ('Just (x :: a) :: Maybe a) :: Maybe (Maybe a))) - -> applySing - (singFun1 @JustSym0 SJust) - (applySing (singFun1 @JustSym0 SJust) (sX :: Sing (x :: a)) :: - Sing (Apply JustSym0 (x :: a) :: Maybe a)) :: - Sing (Apply JustSym0 (Apply JustSym0 (x :: a) :: Maybe a) :: Maybe (Maybe a)) + = (\cases + (_ :: Sing (x :: a)) + (_ :: Sing ('Just (x :: a) :: Maybe a)) + (_ :: Sing ('Just ('Just (x :: a) :: Maybe a) :: Maybe (Maybe a))) + -> applySing + (singFun1 @JustSym0 SJust) + (applySing (singFun1 @JustSym0 SJust) (sX :: Sing (x :: a)) :: + Sing (Apply JustSym0 (x :: a) :: Maybe a)) :: + Sing (Apply JustSym0 (Apply JustSym0 (x :: a) :: Maybe a) :: Maybe (Maybe a))) + (sX :: Sing x) (SJust (sX :: Sing x)) + (SJust (SJust (sX :: Sing x))) sFoo4 (sA_0123456789876543210 :: Sing a_0123456789876543210) = applySing (singFun1 - @(Lambda_0123456789876543210Sym0 a_0123456789876543210) - (\ sArg_0123456789876543210 - -> case sArg_0123456789876543210 of - (_ :: Sing arg_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 arg_0123456789876543210 a_0123456789876543210 arg_0123456789876543210)) - (case sArg_0123456789876543210 of - STuple2 (sX :: Sing x) (sY :: Sing y) - -> case (,) (sX :: Sing x) (sY :: Sing y) of - (,) (_ :: Sing (x :: a)) (_ :: Sing (y :: b)) - -> applySing - (applySing - (singFun2 @Tuple2Sym0 STuple2) - (sY :: Sing (y :: b))) - (sX :: Sing (x :: a))))) + @(LamCases_0123456789876543210Sym0 a_0123456789876543210) + (\cases + (STuple2 (sX :: Sing x) (sY :: Sing y)) + -> (\cases + (_ :: Sing (x :: a)) (_ :: Sing (y :: b)) + -> applySing + (applySing (singFun2 @Tuple2Sym0 STuple2) (sY :: Sing (y :: b))) + (sX :: Sing (x :: a))) + (sX :: Sing x) (sY :: Sing y))) sA_0123456789876543210 sFoo3 (SJust (sX :: Sing x)) = sX :: Sing (x :: a) sFoo2 (SJust (sX :: Sing x)) - = case SJust (sX :: Sing x) of - (_ :: Sing ('Just x :: Maybe a)) -> sX :: Sing (x :: a) + = (\cases (_ :: Sing ('Just x :: Maybe a)) -> sX :: Sing (x :: a)) + (SJust (sX :: Sing x)) sFoo1 (SJust (sX :: Sing x)) - = case SJust (sX :: Sing x) of - (_ :: Sing ('Just x :: Maybe a)) -> sX :: Sing (x :: a) + = (\cases (_ :: Sing ('Just x :: Maybe a)) -> sX :: Sing (x :: a)) + (SJust (sX :: Sing x)) sG (sX :: Sing x) - = let - sScrutinee_0123456789876543210 :: - Sing @_ (Let0123456789876543210Scrutinee_0123456789876543210Sym0 x) - sScrutinee_0123456789876543210 - = applySing (singFun1 @JustSym0 SJust) sX - in - id - @(Sing (Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym0 x))) - (case sScrutinee_0123456789876543210 of - SJust (sY :: Sing y) - -> case SJust (sY :: Sing y) of - (_ :: Sing ('Just y :: Maybe Bool)) -> sY :: Sing (y :: Bool)) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 x) + (\cases + (SJust (sY :: Sing y)) + -> (\cases + (_ :: Sing ('Just y :: Maybe Bool)) -> sY :: Sing (y :: Bool)) + (SJust (sY :: Sing y)))) + (applySing (singFun1 @JustSym0 SJust) sX) sF3 (SJust (sA :: Sing a)) - = case SJust (sA :: Sing a) of - (_ :: Sing ('Just a :: Maybe Bool)) -> sing :: Sing "hi" + = (\cases (_ :: Sing ('Just a :: Maybe Bool)) -> sing :: Sing "hi") + (SJust (sA :: Sing a)) sF2 (sX :: Sing x) - = case sX :: Sing x of - (_ :: Sing (x :: Maybe a)) -> sX :: Sing (x :: Maybe a) + = (\cases (_ :: Sing (x :: Maybe a)) -> sX :: Sing (x :: Maybe a)) + (sX :: Sing x) sF1 (sX :: Sing x) - = case sX :: Sing x of - (_ :: Sing (x :: Maybe Bool)) -> sX :: Sing (x :: Maybe Bool) + = (\cases + (_ :: Sing (x :: Maybe Bool)) -> sX :: Sing (x :: Maybe Bool)) + (sX :: Sing x) instance SingI (Foo9Sym0 :: (~>) a a) where sing = singFun1 @Foo9Sym0 sFoo9 instance SingI (Foo8Sym0 :: (~>) (Maybe a) (Maybe a)) where diff --git a/singletons-base/tests/compile-and-dump/Singletons/T184.golden b/singletons-base/tests/compile-and-dump/Singletons/T184.golden index 53549939..9ee0e125 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T184.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T184.golden @@ -25,105 +25,103 @@ Singletons/T184.hs:(0,0)-(0,0): Splicing declarations cartProd xs ys = [(x, y) | x <- xs, y <- ys] trues :: [Bool] -> [Bool] trues xs = [x | x <- xs, x] - type family Lambda_0123456789876543210 xs0123456789876543210 x where - Lambda_0123456789876543210 xs x = Apply (Apply (>>@#@$) (Apply GuardSym0 x)) (Apply ReturnSym0 x) - data Lambda_0123456789876543210Sym0 xs0123456789876543210 x0123456789876543210 + type family LamCases_0123456789876543210 xs0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 xs x = Apply (Apply (>>@#@$) (Apply GuardSym0 x)) (Apply ReturnSym0 x) + data LamCases_0123456789876543210Sym0 xs0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym1 xs0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 xs0123456789876543210 x0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 xs0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 xs0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 xs0123456789876543210) arg) (LamCases_0123456789876543210Sym1 xs0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 xs0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 xs0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 xs0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 xs0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 xs0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym1 xs0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 x0123456789876543210 - type family Lambda_0123456789876543210 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 y where - Lambda_0123456789876543210 x xs ys y = Apply ReturnSym0 (Apply (Apply Tuple2Sym0 x) y) - data Lambda_0123456789876543210Sym0 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 xs0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 xs0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 xs0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 x xs ys y = Apply ReturnSym0 (Apply (Apply Tuple2Sym0 x) y) + data LamCases_0123456789876543210Sym0 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym1 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 x0123456789876543210 xs0123456789876543210 ys0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 x0123456789876543210 xs0123456789876543210 ys0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 xs0123456789876543210 ys0123456789876543210) arg) (LamCases_0123456789876543210Sym1 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 x0123456789876543210 xs0123456789876543210 ys0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 x0123456789876543210 xs0123456789876543210 ys0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 where - Lambda_0123456789876543210Sym1 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 - type family Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 x where - Lambda_0123456789876543210 xs ys x = Apply (Apply (>>=@#@$) ys) (Lambda_0123456789876543210Sym0 x xs ys) - data Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 xs ys x = Apply (Apply (>>=@#@$) ys) (LamCases_0123456789876543210Sym0 x xs ys) + data LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) arg) (LamCases_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 - type family Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 x where - Lambda_0123456789876543210 xs ys x = Apply ReturnSym0 x - data Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 xs ys x = Apply ReturnSym0 x + data LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) arg) (LamCases_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 - type family Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 y where - Lambda_0123456789876543210 xs ys y = Apply ReturnSym0 y - data Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 xs ys y = Apply ReturnSym0 y + data LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) arg) (LamCases_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 where - Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 - type family Case_0123456789876543210 arg_01234567898765432100123456789876543210 xs0123456789876543210 ys0123456789876543210 t where - Case_0123456789876543210 arg_0123456789876543210 xs ys '(x, - y) = Apply ReturnSym0 (Apply (Apply Tuple2Sym0 x) y) - type family Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 arg_0123456789876543210 where - Lambda_0123456789876543210 xs ys arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 xs ys arg_0123456789876543210 - data Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 arg_01234567898765432100123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 xs ys '(x, + y) = Apply ReturnSym0 (Apply (Apply Tuple2Sym0 x) y) + data LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 arg_01234567898765432100123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) arg) (LamCases_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 xs0123456789876543210 ys0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 arg_01234567898765432100123456789876543210 - type family Lambda_0123456789876543210 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 b where - Lambda_0123456789876543210 a ma mb b = Apply (Apply (>>@#@$) (Apply GuardSym0 b)) (Apply ReturnSym0 a) - data Lambda_0123456789876543210Sym0 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 b0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 xs0123456789876543210 ys0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a ma mb b = Apply (Apply (>>@#@$) (Apply GuardSym0 b)) (Apply ReturnSym0 a) + data LamCases_0123456789876543210Sym0 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 ma0123456789876543210 mb0123456789876543210) arg) (Lambda_0123456789876543210Sym1 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 b0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 ma0123456789876543210 mb0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 b0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 a0123456789876543210 ma0123456789876543210 mb0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 ma0123456789876543210 mb0123456789876543210) arg) (LamCases_0123456789876543210Sym1 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 ma0123456789876543210 mb0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a0123456789876543210 ma0123456789876543210 mb0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 b0123456789876543210 where - Lambda_0123456789876543210Sym1 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 b0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 b0123456789876543210 - type family Lambda_0123456789876543210 ma0123456789876543210 mb0123456789876543210 a where - Lambda_0123456789876543210 ma mb a = Apply (Apply (>>=@#@$) mb) (Lambda_0123456789876543210Sym0 a ma mb) - data Lambda_0123456789876543210Sym0 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 ma0123456789876543210 mb0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 ma mb a = Apply (Apply (>>=@#@$) mb) (LamCases_0123456789876543210Sym0 a ma mb) + data LamCases_0123456789876543210Sym0 ma0123456789876543210 mb0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 ma0123456789876543210 mb0123456789876543210) arg) (Lambda_0123456789876543210Sym1 ma0123456789876543210 mb0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 ma0123456789876543210 mb0123456789876543210) a0123456789876543210 = Lambda_0123456789876543210 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 ma0123456789876543210 mb0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 ma0123456789876543210 mb0123456789876543210) arg) (LamCases_0123456789876543210Sym1 ma0123456789876543210 mb0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 ma0123456789876543210 mb0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 ma0123456789876543210 mb0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 ma0123456789876543210 mb0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 ma0123456789876543210 mb0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 where - Lambda_0123456789876543210Sym1 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 = Lambda_0123456789876543210 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 ma0123456789876543210 mb0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 ma0123456789876543210 mb0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 ma0123456789876543210 mb0123456789876543210 a_01234567898765432100123456789876543210 type TruesSym0 :: (~>) [Bool] [Bool] data TruesSym0 :: (~>) [Bool] [Bool] where @@ -197,16 +195,16 @@ Singletons/T184.hs:(0,0)-(0,0): Splicing declarations BoogieSym2 a0123456789876543210 a0123456789876543210 = Boogie a0123456789876543210 a0123456789876543210 type Trues :: [Bool] -> [Bool] type family Trues (a :: [Bool]) :: [Bool] where - Trues xs = Apply (Apply (>>=@#@$) xs) (Lambda_0123456789876543210Sym0 xs) + Trues xs = Apply (Apply (>>=@#@$) xs) (LamCases_0123456789876543210Sym0 xs) type CartProd :: [a] -> [b] -> [(a, b)] type family CartProd @a @b (a :: [a]) (a :: [b]) :: [(a, b)] where - CartProd xs ys = Apply (Apply (>>=@#@$) xs) (Lambda_0123456789876543210Sym0 xs ys) + CartProd xs ys = Apply (Apply (>>=@#@$) xs) (LamCases_0123456789876543210Sym0 xs ys) type Zip' :: [a] -> [b] -> [(a, b)] type family Zip' @a @b (a :: [a]) (a :: [b]) :: [(a, b)] where - Zip' xs ys = Apply (Apply (>>=@#@$) (Apply (Apply MzipSym0 (Apply (Apply (>>=@#@$) xs) (Lambda_0123456789876543210Sym0 xs ys))) (Apply (Apply (>>=@#@$) ys) (Lambda_0123456789876543210Sym0 xs ys)))) (Lambda_0123456789876543210Sym0 xs ys) + Zip' xs ys = Apply (Apply (>>=@#@$) (Apply (Apply MzipSym0 (Apply (Apply (>>=@#@$) xs) (LamCases_0123456789876543210Sym0 xs ys))) (Apply (Apply (>>=@#@$) ys) (LamCases_0123456789876543210Sym0 xs ys)))) (LamCases_0123456789876543210Sym0 xs ys) type Boogie :: Maybe a -> Maybe Bool -> Maybe a type family Boogie @a (a :: Maybe a) (a :: Maybe Bool) :: Maybe a where - Boogie ma mb = Apply (Apply (>>=@#@$) ma) (Lambda_0123456789876543210Sym0 ma mb) + Boogie ma mb = Apply (Apply (>>=@#@$) ma) (LamCases_0123456789876543210Sym0 ma mb) sTrues :: (forall (t :: [Bool]). Sing t -> Sing (Apply TruesSym0 t :: [Bool]) :: Type) @@ -228,35 +226,30 @@ Singletons/T184.hs:(0,0)-(0,0): Splicing declarations = applySing (applySing (singFun2 @(>>=@#@$) (%>>=)) sXs) (singFun1 - @(Lambda_0123456789876543210Sym0 xs) - (\ sX - -> case sX of - (_ :: Sing x) - -> applySing - (applySing - (singFun2 @(>>@#@$) (%>>)) - (applySing (singFun1 @GuardSym0 sGuard) sX)) - (applySing (singFun1 @ReturnSym0 sReturn) sX))) + @(LamCases_0123456789876543210Sym0 xs) + (\cases + (sX :: Sing x) + -> applySing + (applySing + (singFun2 @(>>@#@$) (%>>)) + (applySing (singFun1 @GuardSym0 sGuard) sX)) + (applySing (singFun1 @ReturnSym0 sReturn) sX))) sCartProd (sXs :: Sing xs) (sYs :: Sing ys) = applySing (applySing (singFun2 @(>>=@#@$) (%>>=)) sXs) (singFun1 - @(Lambda_0123456789876543210Sym0 xs ys) - (\ sX - -> case sX of - (_ :: Sing x) - -> applySing - (applySing (singFun2 @(>>=@#@$) (%>>=)) sYs) - (singFun1 - @(Lambda_0123456789876543210Sym0 x xs ys) - (\ sY - -> case sY of - (_ :: Sing y) - -> applySing - (singFun1 @ReturnSym0 sReturn) - (applySing - (applySing (singFun2 @Tuple2Sym0 STuple2) sX) - sY))))) + @(LamCases_0123456789876543210Sym0 xs ys) + (\cases + (sX :: Sing x) + -> applySing + (applySing (singFun2 @(>>=@#@$) (%>>=)) sYs) + (singFun1 + @(LamCases_0123456789876543210Sym0 x xs ys) + (\cases + (sY :: Sing y) + -> applySing + (singFun1 @ReturnSym0 sReturn) + (applySing (applySing (singFun2 @Tuple2Sym0 STuple2) sX) sY))))) sZip' (sXs :: Sing xs) (sYs :: Sing ys) = applySing (applySing @@ -267,50 +260,40 @@ Singletons/T184.hs:(0,0)-(0,0): Splicing declarations (applySing (applySing (singFun2 @(>>=@#@$) (%>>=)) sXs) (singFun1 - @(Lambda_0123456789876543210Sym0 xs ys) - (\ sX - -> case sX of - (_ :: Sing x) -> applySing (singFun1 @ReturnSym0 sReturn) sX)))) + @(LamCases_0123456789876543210Sym0 xs ys) + (\cases + (sX :: Sing x) -> applySing (singFun1 @ReturnSym0 sReturn) sX)))) (applySing (applySing (singFun2 @(>>=@#@$) (%>>=)) sYs) (singFun1 - @(Lambda_0123456789876543210Sym0 xs ys) - (\ sY - -> case sY of - (_ :: Sing y) -> applySing (singFun1 @ReturnSym0 sReturn) sY))))) + @(LamCases_0123456789876543210Sym0 xs ys) + (\cases + (sY :: Sing y) -> applySing (singFun1 @ReturnSym0 sReturn) sY))))) (singFun1 - @(Lambda_0123456789876543210Sym0 xs ys) - (\ sArg_0123456789876543210 - -> case sArg_0123456789876543210 of - (_ :: Sing arg_0123456789876543210) - -> id - @(Sing (Case_0123456789876543210 arg_0123456789876543210 xs ys arg_0123456789876543210)) - (case sArg_0123456789876543210 of - STuple2 (sX :: Sing x) (sY :: Sing y) - -> applySing - (singFun1 @ReturnSym0 sReturn) - (applySing - (applySing (singFun2 @Tuple2Sym0 STuple2) sX) sY)))) + @(LamCases_0123456789876543210Sym0 xs ys) + (\cases + (STuple2 (sX :: Sing x) (sY :: Sing y)) + -> applySing + (singFun1 @ReturnSym0 sReturn) + (applySing (applySing (singFun2 @Tuple2Sym0 STuple2) sX) sY))) sBoogie (sMa :: Sing ma) (sMb :: Sing mb) = applySing (applySing (singFun2 @(>>=@#@$) (%>>=)) sMa) (singFun1 - @(Lambda_0123456789876543210Sym0 ma mb) - (\ sA - -> case sA of - (_ :: Sing a) - -> applySing - (applySing (singFun2 @(>>=@#@$) (%>>=)) sMb) - (singFun1 - @(Lambda_0123456789876543210Sym0 a ma mb) - (\ sB - -> case sB of - (_ :: Sing b) - -> applySing - (applySing - (singFun2 @(>>@#@$) (%>>)) - (applySing (singFun1 @GuardSym0 sGuard) sB)) - (applySing (singFun1 @ReturnSym0 sReturn) sA))))) + @(LamCases_0123456789876543210Sym0 ma mb) + (\cases + (sA :: Sing a) + -> applySing + (applySing (singFun2 @(>>=@#@$) (%>>=)) sMb) + (singFun1 + @(LamCases_0123456789876543210Sym0 a ma mb) + (\cases + (sB :: Sing b) + -> applySing + (applySing + (singFun2 @(>>@#@$) (%>>)) + (applySing (singFun1 @GuardSym0 sGuard) sB)) + (applySing (singFun1 @ReturnSym0 sReturn) sA))))) instance SingI (TruesSym0 :: (~>) [Bool] [Bool]) where sing = singFun1 @TruesSym0 sTrues instance SingI (CartProdSym0 :: (~>) [a] ((~>) [b] [(a, b)])) where diff --git a/singletons-base/tests/compile-and-dump/Singletons/T187.golden b/singletons-base/tests/compile-and-dump/Singletons/T187.golden index fb4952a7..534a47be 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T187.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T187.golden @@ -65,14 +65,14 @@ Singletons/T187.hs:(0,0)-(0,0): Splicing declarations type instance Sing @Empty = SEmpty instance SingKind Empty where type Demote Empty = Empty - fromSing x = case x of {} - toSing x = SomeSing (case x of {}) + fromSing x = (\case) x + toSing x = SomeSing ((\case) x) instance SEq Empty where (%==) _ _ = STrue instance SOrd Empty where sCompare _ _ = SEQ instance SDecide Empty where - (%~) x _ = Proved (case x of {}) + (%~) x _ = Proved ((\case) x) instance Eq (SEmpty (z :: Empty)) where (==) _ _ = True instance GHC.Internal.Data.Type.Equality.TestEquality (SEmpty :: Empty diff --git a/singletons-base/tests/compile-and-dump/Singletons/T190.golden b/singletons-base/tests/compile-and-dump/Singletons/T190.golden index f2bc8ad3..28d85b75 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T190.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T190.golden @@ -62,12 +62,22 @@ Singletons/T190.hs:0:0:: Splicing declarations Compare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 instance POrd T where type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a - type family Case_0123456789876543210 n0123456789876543210 t where - Case_0123456789876543210 n 'True = TSym0 - Case_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument" + type family LamCases_0123456789876543210 n0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 n 'True = TSym0 + LamCases_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument" + data LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 type ToEnum_0123456789876543210 :: GHC.Num.Natural.Natural -> T type family ToEnum_0123456789876543210 (a :: GHC.Num.Natural.Natural) :: T where - ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 0)) + ToEnum_0123456789876543210 n = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 0)) type ToEnum_0123456789876543210Sym0 :: (~>) GHC.Num.Natural.Natural T data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Num.Natural.Natural T where @@ -170,17 +180,18 @@ Singletons/T190.hs:0:0:: Splicing declarations SNil instance SEnum T where sToEnum (sN :: Sing n) - = id - @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 0)))) - (case - applySing - (applySing (singFun2 @(==@#@$) (%==)) sN) - (sFromInteger (sing :: Sing 0)) - of - STrue -> ST - SFalse - -> applySing - (singFun1 @ErrorSym0 sError) (sing :: Sing "toEnum: bad argument")) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 n) + (\cases + STrue -> ST + SFalse + -> applySing + (singFun1 @ErrorSym0 sError) + (sing :: Sing "toEnum: bad argument"))) + (applySing + (applySing (singFun2 @(==@#@$) (%==)) sN) + (sFromInteger (sing :: Sing 0))) sFromEnum ST = sFromInteger (sing :: Sing 0) instance SBounded T where sMinBound = ST diff --git a/singletons-base/tests/compile-and-dump/Singletons/T197b.golden b/singletons-base/tests/compile-and-dump/Singletons/T197b.golden index 4c9b22e8..8a473985 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T197b.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T197b.golden @@ -60,8 +60,8 @@ Singletons/T197b.hs:(0,0)-(0,0): Splicing declarations type Demote ((:*:) a b) = (:*:) (Demote a) (Demote b) fromSing ((:%*:) b b) = (:*:) (fromSing b) (fromSing b) toSing ((:*:) (b :: Demote a) (b :: Demote b)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing b) of - (,) (SomeSing c) (SomeSing c) -> SomeSing ((:%*:) c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing ((:%*:) c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing b) data SPair :: forall a b. Pair a b -> Type where SMkPair :: forall a b (n :: a) (n :: b). @@ -71,8 +71,8 @@ Singletons/T197b.hs:(0,0)-(0,0): Splicing declarations type Demote (Pair a b) = Pair (Demote a) (Demote b) fromSing (SMkPair b b) = MkPair (fromSing b) (fromSing b) toSing (MkPair (b :: Demote a) (b :: Demote b)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing b) of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SMkPair c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SMkPair c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing b) instance (SingI n, SingI n) => SingI ((:*:) (n :: a) (n :: b)) where sing = (:%*:) sing sing diff --git a/singletons-base/tests/compile-and-dump/Singletons/T200.golden b/singletons-base/tests/compile-and-dump/Singletons/T200.golden index e886e5b0..ec40edfb 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T200.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T200.golden @@ -161,23 +161,17 @@ Singletons/T200.hs:(0,0)-(0,0): Splicing declarations fromSing (SEM b) = EM (fromSing b) toSing ((:$$:) (b :: Demote ErrorMessage) (b :: Demote ErrorMessage)) - = case - (,) - (toSing b :: SomeSing ErrorMessage) - (toSing b :: SomeSing ErrorMessage) - of - (,) (SomeSing c) (SomeSing c) -> SomeSing ((:%$$:) c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing ((:%$$:) c c)) + (toSing b :: SomeSing ErrorMessage) + (toSing b :: SomeSing ErrorMessage) toSing ((:<>:) (b :: Demote ErrorMessage) (b :: Demote ErrorMessage)) - = case - (,) - (toSing b :: SomeSing ErrorMessage) - (toSing b :: SomeSing ErrorMessage) - of - (,) (SomeSing c) (SomeSing c) -> SomeSing ((:%<>:) c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing ((:%<>:) c c)) + (toSing b :: SomeSing ErrorMessage) + (toSing b :: SomeSing ErrorMessage) toSing (EM (b :: Demote [Bool])) - = case toSing b :: SomeSing [Bool] of - SomeSing c -> SomeSing (SEM c) + = (\cases (SomeSing c) -> SomeSing (SEM c)) + (toSing b :: SomeSing [Bool]) instance (SingI n, SingI n) => SingI ((:$$:) (n :: ErrorMessage) (n :: ErrorMessage)) where sing = (:%$$:) sing sing diff --git a/singletons-base/tests/compile-and-dump/Singletons/T204.golden b/singletons-base/tests/compile-and-dump/Singletons/T204.golden index dd7bcd1f..e2ee456c 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T204.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T204.golden @@ -62,8 +62,8 @@ Singletons/T204.hs:(0,0)-(0,0): Splicing declarations type Demote (Ratio1 a) = Ratio1 (Demote a) fromSing ((:^%) b b) = (:%) (fromSing b) (fromSing b) toSing ((:%) (b :: Demote a) (b :: Demote a)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing a) of - (,) (SomeSing c) (SomeSing c) -> SomeSing ((:^%) c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing ((:^%) c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing a) data SRatio2 :: forall a. Ratio2 a -> GHC.Types.Type where (:^%%) :: forall a (n :: a) (n :: a). @@ -73,8 +73,8 @@ Singletons/T204.hs:(0,0)-(0,0): Splicing declarations type Demote (Ratio2 a) = Ratio2 (Demote a) fromSing ((:^%%) b b) = (:%%) (fromSing b) (fromSing b) toSing ((:%%) (b :: Demote a) (b :: Demote a)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing a) of - (,) (SomeSing c) (SomeSing c) -> SomeSing ((:^%%) c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing ((:^%%) c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing a) instance (SingI n, SingI n) => SingI ((:%) (n :: a) (n :: a)) where sing = (:^%) sing sing instance SingI n => SingI1 ((:%) (n :: a)) where diff --git a/singletons-base/tests/compile-and-dump/Singletons/T249.golden b/singletons-base/tests/compile-and-dump/Singletons/T249.golden index 5f349806..6678a31c 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T249.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T249.golden @@ -49,7 +49,8 @@ Singletons/T249.hs:(0,0)-(0,0): Splicing declarations type Demote (Foo1 a) = Foo1 (Demote a) fromSing (SMkFoo1 b) = MkFoo1 (fromSing b) toSing (MkFoo1 (b :: Demote a)) - = case toSing b :: SomeSing a of SomeSing c -> SomeSing (SMkFoo1 c) + = (\cases (SomeSing c) -> SomeSing (SMkFoo1 c)) + (toSing b :: SomeSing a) data SFoo2 :: forall a. Foo2 a -> Type where SMkFoo2 :: forall x (n :: x). @@ -59,7 +60,8 @@ Singletons/T249.hs:(0,0)-(0,0): Splicing declarations type Demote (Foo2 a) = Foo2 (Demote a) fromSing (SMkFoo2 b) = MkFoo2 (fromSing b) toSing (MkFoo2 (b :: Demote x)) - = case toSing b :: SomeSing x of SomeSing c -> SomeSing (SMkFoo2 c) + = (\cases (SomeSing c) -> SomeSing (SMkFoo2 c)) + (toSing b :: SomeSing x) data SFoo3 :: forall a. Foo3 a -> Type where SMkFoo3 :: forall x (n :: x). @@ -69,7 +71,8 @@ Singletons/T249.hs:(0,0)-(0,0): Splicing declarations type Demote (Foo3 a) = Foo3 (Demote a) fromSing (SMkFoo3 b) = MkFoo3 (fromSing b) toSing (MkFoo3 (b :: Demote x)) - = case toSing b :: SomeSing x of SomeSing c -> SomeSing (SMkFoo3 c) + = (\cases (SomeSing c) -> SomeSing (SMkFoo3 c)) + (toSing b :: SomeSing x) instance SingI n => SingI (MkFoo1 (n :: a)) where sing = SMkFoo1 sing instance SingI1 MkFoo1 where diff --git a/singletons-base/tests/compile-and-dump/Singletons/T271.golden b/singletons-base/tests/compile-and-dump/Singletons/T271.golden index f608b627..96f99c04 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T271.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T271.golden @@ -165,8 +165,8 @@ Singletons/T271.hs:(0,0)-(0,0): Splicing declarations type Demote (Constant a b) = Constant (Demote a) (Demote b) fromSing (SConstant b) = Constant (fromSing b) toSing (Constant (b :: Demote a)) - = case toSing b :: SomeSing a of - SomeSing c -> SomeSing (SConstant c) + = (\cases (SomeSing c) -> SomeSing (SConstant c)) + (toSing b :: SomeSing a) data SIdentity :: forall (a :: Type). Identity a -> Type where SIdentity :: forall a (n :: a). @@ -176,8 +176,8 @@ Singletons/T271.hs:(0,0)-(0,0): Splicing declarations type Demote (Identity a) = Identity (Demote a) fromSing (SIdentity b) = Identity (fromSing b) toSing (Identity (b :: Demote a)) - = case toSing b :: SomeSing a of - SomeSing c -> SomeSing (SIdentity c) + = (\cases (SomeSing c) -> SomeSing (SIdentity c)) + (toSing b :: SomeSing a) instance SEq a => SEq (Constant a b) where (%==) (SConstant (sA_0123456789876543210 :: Sing a_0123456789876543210)) @@ -224,10 +224,10 @@ Singletons/T271.hs:(0,0)-(0,0): Splicing declarations SNil) instance SDecide a => SDecide (Constant a b) where (%~) (SConstant a) (SConstant b) - = case (%~) a b of - Proved Refl -> Proved Refl - Disproved contra - -> Disproved (\ refl -> case refl of Refl -> contra Refl) + = (\cases + (Proved Refl) -> Proved Refl + (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) instance Eq (SConstant (z :: Constant a b)) where (==) _ _ = True instance SDecide a => @@ -242,10 +242,10 @@ Singletons/T271.hs:(0,0)-(0,0): Splicing declarations = Data.Singletons.Decide.decideCoercion instance SDecide a => SDecide (Identity a) where (%~) (SIdentity a) (SIdentity b) - = case (%~) a b of - Proved Refl -> Proved Refl - Disproved contra - -> Disproved (\ refl -> case refl of Refl -> contra Refl) + = (\cases + (Proved Refl) -> Proved Refl + (Disproved contra) -> Disproved (\cases Refl -> contra Refl)) + ((%~) a b) instance Eq (SIdentity (z :: Identity a)) where (==) _ _ = True instance SDecide a => diff --git a/singletons-base/tests/compile-and-dump/Singletons/T287.golden b/singletons-base/tests/compile-and-dump/Singletons/T287.golden index a3b9ddb1..c484bb7d 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T287.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T287.golden @@ -31,22 +31,22 @@ Singletons/T287.hs:(0,0)-(0,0): Splicing declarations (<<>>@#@$$$) a0123456789876543210 a0123456789876543210 = (<<>>) a0123456789876543210 a0123456789876543210 class PS a where type family (<<>>) (arg :: a) (arg :: a) :: a - type family Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 x where - Lambda_0123456789876543210 a b f g x = Apply (Apply (<<>>@#@$) (Apply f x)) (Apply g x) - data Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 x0123456789876543210 + type family LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a b f g x = Apply (Apply (<<>>@#@$) (Apply f x)) (Apply g x) + data LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210) arg) (Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 x0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210) arg) (LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 x0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 b0123456789876543210 f0123456789876543210 g0123456789876543210 a_01234567898765432100123456789876543210 type TFHelper_0123456789876543210 :: forall a b. (~>) a b -> (~>) a b -> (~>) a b type family TFHelper_0123456789876543210 @a @b (a :: (~>) a b) (a :: (~>) a b) :: (~>) a b where - TFHelper_0123456789876543210 @a @b (f :: (~>) a b) (g :: (~>) a b) = Lambda_0123456789876543210Sym0 a b f g + TFHelper_0123456789876543210 @a @b (f :: (~>) a b) (g :: (~>) a b) = LamCases_0123456789876543210Sym0 a b f g type TFHelper_0123456789876543210Sym0 :: forall a b. (~>) ((~>) a b) ((~>) ((~>) a b) ((~>) a b)) data TFHelper_0123456789876543210Sym0 :: (~>) ((~>) a b) ((~>) ((~>) a b) ((~>) a b)) @@ -81,13 +81,12 @@ Singletons/T287.hs:(0,0)-(0,0): Splicing declarations instance SS b => SS ((~>) a b) where (%<<>>) (sF :: Sing f) (sG :: Sing g) = singFun1 - @(Lambda_0123456789876543210Sym0 a b f g) - (\ sX - -> case sX of - (_ :: Sing x) - -> applySing - (applySing (singFun2 @(<<>>@#@$) (%<<>>)) (applySing sF sX)) - (applySing sG sX)) + @(LamCases_0123456789876543210Sym0 a b f g) + (\cases + (sX :: Sing x) + -> applySing + (applySing (singFun2 @(<<>>@#@$) (%<<>>)) (applySing sF sX)) + (applySing sG sX)) instance SS a => SingI ((<<>>@#@$) :: (~>) a ((~>) a a)) where sing = singFun2 @(<<>>@#@$) (%<<>>) instance (SS a, SingI d) => diff --git a/singletons-base/tests/compile-and-dump/Singletons/T371.golden b/singletons-base/tests/compile-and-dump/Singletons/T371.golden index 7c44e989..04281b31 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T371.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T371.golden @@ -136,7 +136,8 @@ Singletons/T371.hs:(0,0)-(0,0): Splicing declarations fromSing (SX2 b) = X2 (fromSing b) toSing X1 = SomeSing SX1 toSing (X2 (b :: Demote (Y a))) - = case toSing b :: SomeSing (Y a) of SomeSing c -> SomeSing (SX2 c) + = (\cases (SomeSing c) -> SomeSing (SX2 c)) + (toSing b :: SomeSing (Y a)) data SY :: forall (a :: Type). Y a -> Type where SY1 :: forall (a :: Type). SY (Y1 :: Y a) @@ -148,7 +149,8 @@ Singletons/T371.hs:(0,0)-(0,0): Splicing declarations fromSing (SY2 b) = Y2 (fromSing b) toSing Y1 = SomeSing SY1 toSing (Y2 (b :: Demote (X a))) - = case toSing b :: SomeSing (X a) of SomeSing c -> SomeSing (SY2 c) + = (\cases (SomeSing c) -> SomeSing (SY2 c)) + (toSing b :: SomeSing (X a)) instance SShow (Y a) => SShow (X a) where sShowsPrec _ diff --git a/singletons-base/tests/compile-and-dump/Singletons/T378b.golden b/singletons-base/tests/compile-and-dump/Singletons/T378b.golden index cc31d5ae..9cf6d53f 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T378b.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T378b.golden @@ -113,7 +113,7 @@ Singletons/T378b.hs:(0,0)-(0,0): Splicing declarations type instance Sing @(D x y) = SD instance (SingKind x, SingKind y) => SingKind (D x y) where type Demote (D x y) = D (Demote x) (Demote y) - fromSing x = case x of {} - toSing x = SomeSing (case x of {}) + fromSing x = (\case) x + toSing x = SomeSing ((\case) x) class SC x y type SC :: forall b a. a -> b -> Constraint diff --git a/singletons-base/tests/compile-and-dump/Singletons/T412.golden b/singletons-base/tests/compile-and-dump/Singletons/T412.golden index dc1e31a3..8b9550fd 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T412.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T412.golden @@ -169,8 +169,8 @@ Singletons/T412.hs:(0,0)-(0,0): Splicing declarations type Demote (D1 a b) = D1 (Demote a) (Demote b) fromSing (SMkD1 b b) = MkD1 (fromSing b) (fromSing b) toSing (MkD1 (b :: Demote a) (b :: Demote b)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing b) of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SMkD1 c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SMkD1 c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing b) class SC1 a b where sM1 :: (forall (t :: a) (t :: b). @@ -363,8 +363,8 @@ Singletons/T412.hs:0:0:: Splicing declarations type Demote (D2 a b) = D2 (Demote a) (Demote b) fromSing (SMkD2 b b) = MkD2 (fromSing b) (fromSing b) toSing (MkD2 (b :: Demote a) (b :: Demote b)) - = case (,) (toSing b :: SomeSing a) (toSing b :: SomeSing b) of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SMkD2 c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SMkD2 c c)) + (toSing b :: SomeSing a) (toSing b :: SomeSing b) infixr 5 `SMkD2` infixr 5 `sD2A` infixr 5 `sD2B` diff --git a/singletons-base/tests/compile-and-dump/Singletons/T445.golden b/singletons-base/tests/compile-and-dump/Singletons/T445.golden index 570db3d2..c83e0bc5 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T445.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T445.golden @@ -21,18 +21,18 @@ Singletons/T445.hs:(0,0)-(0,0): Splicing declarations filterEvenGt7 :: [Nat] -> [Nat] filterEvenGt7 = filter (\ x -> evenb x && x > lit 7) |] ======> - type family Lambda_0123456789876543210 a_01234567898765432100123456789876543210 x where - Lambda_0123456789876543210 a_0123456789876543210 x = Apply (Apply (&&@#@$) (Apply EvenbSym0 x)) (Apply (Apply (>@#@$) x) (Apply LitSym0 (FromInteger 7))) - data Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 x0123456789876543210 + type family LamCases_0123456789876543210 a_01234567898765432100123456789876543210 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 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 arg) => - Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 x0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210) x0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 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 ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 type FilterEvenGt7Sym0 :: (~>) [Nat] [Nat] data FilterEvenGt7Sym0 :: (~>) [Nat] [Nat] where @@ -58,7 +58,7 @@ Singletons/T445.hs:(0,0)-(0,0): Splicing declarations EvenbSym1 a0123456789876543210 = Evenb a0123456789876543210 type FilterEvenGt7 :: [Nat] -> [Nat] type family FilterEvenGt7 (a :: [Nat]) :: [Nat] where - FilterEvenGt7 a_0123456789876543210 = Apply (Apply FilterSym0 (Lambda_0123456789876543210Sym0 a_0123456789876543210)) a_0123456789876543210 + 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 diff --git a/singletons-base/tests/compile-and-dump/Singletons/T450.golden b/singletons-base/tests/compile-and-dump/Singletons/T450.golden index 5823fff1..7f66867b 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T450.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T450.golden @@ -57,8 +57,8 @@ Singletons/T450.hs:(0,0)-(0,0): Splicing declarations type Demote PMessage = Message fromSing (SMkMessage b) = MkMessage (fromSing b) toSing (MkMessage (b :: Demote Symbol)) - = case toSing b :: SomeSing Symbol of - SomeSing c -> SomeSing (SMkMessage c) + = (\cases (SomeSing c) -> SomeSing (SMkMessage c)) + (toSing b :: SomeSing Symbol) instance SingI n => SingI ('PMkMessage (n :: Symbol)) where sing = SMkMessage sing instance SingI1 'PMkMessage where @@ -100,12 +100,13 @@ Singletons/T450.hs:(0,0)-(0,0): Splicing declarations sAppendMessage (SMkMessage (sX :: Sing x)) (SMkMessage (sY :: Sing y)) - = case (,) (sX :: Sing x) (sY :: Sing y) of - (,) (_ :: Sing (x :: Symbol)) (_ :: Sing (y :: Symbol)) - -> applySing - (singFun1 @PMkMessageSym0 SMkMessage) - (applySing (applySing (singFun2 @(<>@#@$) (%<>)) sX) sY :: - Sing (Apply (Apply (<>@#@$) x) y :: Symbol)) + = (\cases + (_ :: Sing (x :: Symbol)) (_ :: Sing (y :: Symbol)) + -> applySing + (singFun1 @PMkMessageSym0 SMkMessage) + (applySing (applySing (singFun2 @(<>@#@$) (%<>)) sX) sY :: + Sing (Apply (Apply (<>@#@$) x) y :: Symbol))) + (sX :: Sing x) (sY :: Sing y) instance SingI (AppendMessageSym0 :: (~>) PMessage ((~>) PMessage PMessage)) where sing = singFun2 @AppendMessageSym0 sAppendMessage instance SingI d => @@ -142,8 +143,8 @@ Singletons/T450.hs:(0,0)-(0,0): Splicing declarations type Demote (PFunction a b) = Function (Demote a) (Demote b) fromSing (SMkFunction b) = MkFunction (fromSing b) toSing (MkFunction (b :: Demote ((~>) a b))) - = case toSing b :: SomeSing ((~>) a b) of - SomeSing c -> SomeSing (SMkFunction c) + = (\cases (SomeSing c) -> SomeSing (SMkFunction c)) + (toSing b :: SomeSing ((~>) a b)) instance SingI n => SingI ('PMkFunction (n :: (~>) a b)) where sing = SMkFunction sing instance SingI1 'PMkFunction where @@ -190,12 +191,13 @@ Singletons/T450.hs:(0,0)-(0,0): Splicing declarations sComposeFunction (SMkFunction (sF :: Sing f)) (SMkFunction (sG :: Sing g)) - = case (,) (sF :: Sing f) (sG :: Sing g) of - (,) (_ :: Sing (f :: (~>) b c)) (_ :: Sing (g :: (~>) a b)) - -> applySing - (singFun1 @PMkFunctionSym0 SMkFunction) - (applySing (applySing (singFun3 @(.@#@$) (%.)) sF) sG :: - Sing (Apply (Apply (.@#@$) f) g :: (~>) a c)) + = (\cases + (_ :: Sing (f :: (~>) b c)) (_ :: Sing (g :: (~>) a b)) + -> applySing + (singFun1 @PMkFunctionSym0 SMkFunction) + (applySing (applySing (singFun3 @(.@#@$) (%.)) sF) sG :: + Sing (Apply (Apply (.@#@$) f) g :: (~>) a c))) + (sF :: Sing f) (sG :: Sing g) instance SingI (ComposeFunctionSym0 :: (~>) (PFunction b c) ((~>) (PFunction a b) (PFunction a c))) where sing = singFun2 @ComposeFunctionSym0 sComposeFunction instance SingI d => diff --git a/singletons-base/tests/compile-and-dump/Singletons/T470.golden b/singletons-base/tests/compile-and-dump/Singletons/T470.golden index 32d3ad92..13a1b255 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T470.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T470.golden @@ -58,10 +58,11 @@ Singletons/T470.hs:(0,0)-(0,0): Splicing declarations fromSing (SMkT1 b) = MkT1 (fromSing b) fromSing (SMkT2 b) = MkT2 (fromSing b) toSing (MkT1 (b :: Demote a)) - = case toSing b :: SomeSing a of SomeSing c -> SomeSing (SMkT1 c) + = (\cases (SomeSing c) -> SomeSing (SMkT1 c)) + (toSing b :: SomeSing a) toSing (MkT2 (b :: Demote Void)) - = case toSing b :: SomeSing Void of - SomeSing c -> SomeSing (SMkT2 c) + = (\cases (SomeSing c) -> SomeSing (SMkT2 c)) + (toSing b :: SomeSing Void) data SS :: S -> Type where SMkS :: forall (n :: Bool). !(Sing n) -> SS (MkS n :: S) type instance Sing @S = SS @@ -69,7 +70,8 @@ Singletons/T470.hs:(0,0)-(0,0): Splicing declarations type Demote S = S fromSing (SMkS b) = MkS (fromSing b) toSing (MkS (b :: Demote Bool)) - = case toSing b :: SomeSing Bool of SomeSing c -> SomeSing (SMkS c) + = (\cases (SomeSing c) -> SomeSing (SMkS c)) + (toSing b :: SomeSing Bool) instance SingI n => SingI (MkT1 (n :: a)) where sing = SMkT1 sing instance SingI1 MkT1 where diff --git a/singletons-base/tests/compile-and-dump/Singletons/T536.golden b/singletons-base/tests/compile-and-dump/Singletons/T536.golden index 4f7c21b9..ca3bfbdc 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T536.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T536.golden @@ -46,10 +46,10 @@ Singletons/T536.hs:(0,0)-(0,0): Splicing declarations = MkMessage (Data.Singletons.fromSing b) Data.Singletons.toSing (MkMessage (b :: Data.Singletons.Demote Symbol)) - = case Data.Singletons.toSing b :: Data.Singletons.SomeSing Symbol - of - Data.Singletons.SomeSing c - -> Data.Singletons.SomeSing (SMkMessage c) + = (\cases + (Data.Singletons.SomeSing c) + -> Data.Singletons.SomeSing (SMkMessage c)) + (Data.Singletons.toSing b :: Data.Singletons.SomeSing Symbol) instance Data.Singletons.SingI n => Data.Singletons.SingI ('PMkMessage (n :: Symbol)) where Data.Singletons.sing = SMkMessage Data.Singletons.sing @@ -75,16 +75,16 @@ Singletons/T536.hs:(0,0)-(0,0): Splicing declarations instance Data.Singletons.Decide.SDecide Text => Data.Singletons.Decide.SDecide PMessage where (Data.Singletons.Decide.%~) (SMkMessage a) (SMkMessage b) - = case (Data.Singletons.Decide.%~) a b of - Data.Singletons.Decide.Proved GHC.Internal.Data.Type.Equality.Refl - -> Data.Singletons.Decide.Proved - GHC.Internal.Data.Type.Equality.Refl - Data.Singletons.Decide.Disproved contra - -> Data.Singletons.Decide.Disproved - (\ refl - -> case refl of - GHC.Internal.Data.Type.Equality.Refl - -> contra GHC.Internal.Data.Type.Equality.Refl) + = (\cases + (Data.Singletons.Decide.Proved GHC.Internal.Data.Type.Equality.Refl) + -> Data.Singletons.Decide.Proved + GHC.Internal.Data.Type.Equality.Refl + (Data.Singletons.Decide.Disproved contra) + -> Data.Singletons.Decide.Disproved + (\cases + GHC.Internal.Data.Type.Equality.Refl + -> contra GHC.Internal.Data.Type.Equality.Refl)) + ((Data.Singletons.Decide.%~) a b) instance Eq (SMessage (z :: PMessage)) where (==) _ _ = True instance Data.Singletons.Decide.SDecide Text => diff --git a/singletons-base/tests/compile-and-dump/Singletons/T54.golden b/singletons-base/tests/compile-and-dump/Singletons/T54.golden index 941d4f92..93b5b6b2 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T54.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T54.golden @@ -5,12 +5,18 @@ Singletons/T54.hs:(0,0)-(0,0): Splicing declarations ======> g :: Bool -> Bool g e = (case [not] of [_] -> not) e - type family Let0123456789876543210Scrutinee_0123456789876543210Sym0 e0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210Sym0 e0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 e0123456789876543210 - type family Let0123456789876543210Scrutinee_0123456789876543210 e0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210 e = Apply (Apply (:@#@$) NotSym0) NilSym0 - type family Case_0123456789876543210 e0123456789876543210 t where - Case_0123456789876543210 e '[_] = NotSym0 + type family LamCases_0123456789876543210 e0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 e '[_] = NotSym0 + data LamCases_0123456789876543210Sym0 e0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 e0123456789876543210) arg) (LamCases_0123456789876543210Sym1 e0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 e0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 e0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 e0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 e0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 e0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 e0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 e0123456789876543210 a_01234567898765432100123456789876543210 type GSym0 :: (~>) Bool Bool data GSym0 :: (~>) Bool Bool where @@ -24,23 +30,19 @@ Singletons/T54.hs:(0,0)-(0,0): Splicing declarations GSym1 a0123456789876543210 = G a0123456789876543210 type G :: Bool -> Bool type family G (a :: Bool) :: Bool where - G e = Apply (Case_0123456789876543210 e (Let0123456789876543210Scrutinee_0123456789876543210Sym0 e)) e + G e = Apply (Apply (LamCases_0123456789876543210Sym0 e) (Apply (Apply (:@#@$) NotSym0) NilSym0)) e sG :: (forall (t :: Bool). Sing t -> Sing (Apply GSym0 t :: Bool) :: Type) sG (sE :: Sing e) = applySing - (let - sScrutinee_0123456789876543210 :: - Sing @_ (Let0123456789876543210Scrutinee_0123456789876543210Sym0 e) - sScrutinee_0123456789876543210 - = applySing - (applySing (singFun2 @(:@#@$) SCons) (singFun1 @NotSym0 sNot)) SNil - in - id - @(Sing (Case_0123456789876543210 e (Let0123456789876543210Scrutinee_0123456789876543210Sym0 e))) - (case sScrutinee_0123456789876543210 of - SCons _ SNil -> singFun1 @NotSym0 sNot)) + (applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 e) + (\cases (SCons _ SNil) -> singFun1 @NotSym0 sNot)) + (applySing + (applySing (singFun2 @(:@#@$) SCons) (singFun1 @NotSym0 sNot)) + SNil)) sE instance SingI (GSym0 :: (~>) Bool Bool) where sing = singFun1 @GSym0 sG diff --git a/singletons-base/tests/compile-and-dump/Singletons/T555.golden b/singletons-base/tests/compile-and-dump/Singletons/T555.golden index 654440b5..f2ef1907 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T555.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T555.golden @@ -167,8 +167,8 @@ Singletons/T555.hs:(0,0)-(0,0): Splicing declarations sA_0123456789876543210 instance SDecide MyPropKind where (%~) SLocation SLocation = Proved Refl - (%~) SLocation SQuaternion = Disproved (\ x -> case x of {}) - (%~) SQuaternion SLocation = Disproved (\ x -> case x of {}) + (%~) SLocation SQuaternion = Disproved (\case) + (%~) SQuaternion SLocation = Disproved (\case) (%~) SQuaternion SQuaternion = Proved Refl instance Eq (SMyPropKind (z :: MyPropKind)) where (==) _ _ = True diff --git a/singletons-base/tests/compile-and-dump/Singletons/T563.golden b/singletons-base/tests/compile-and-dump/Singletons/T563.golden index 69c53b7f..14d3e289 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T563.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T563.golden @@ -25,8 +25,8 @@ Singletons/T563.hs:(0,0)-(0,0): Splicing declarations type Demote Foo = Foo fromSing (SMkFoo b) = MkFoo (fromSing b) toSing (MkFoo (b :: Demote Bool)) - = case toSing b :: SomeSing Bool of - SomeSing c -> SomeSing (SMkFoo c) + = (\cases (SomeSing c) -> SomeSing (SMkFoo c)) + (toSing b :: SomeSing Bool) instance SingI n => SingI (MkFoo (n :: Bool)) where sing = SMkFoo sing instance SingI1 MkFoo where @@ -59,7 +59,6 @@ Singletons/T563.hs:(0,0)-(0,0): Splicing declarations = applySing sUnFoo sA_0123456789876543210 instance SingI (UnFoo'Sym0 :: (~>) Foo Bool) where sing = singFun1 @UnFoo'Sym0 sUnFoo' - Singletons/T563.hs:0:0: error: [GHC-76037] Not in scope: type constructor or class ‘UnFooSym0’ Suggested fix: @@ -69,3 +68,4 @@ Singletons/T563.hs:0:0: error: [GHC-76037] | 13 | $(singletonsOnly [d| | ^^^^^^^^^^^^^^^^^^^... + diff --git a/singletons-base/tests/compile-and-dump/Singletons/T581.golden b/singletons-base/tests/compile-and-dump/Singletons/T581.golden index 8f9ce156..e5c0a0a6 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T581.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T581.golden @@ -217,23 +217,23 @@ Singletons/T581.hs:(0,0)-(0,0): Splicing declarations M2_0123456789876543210Sym1 a0123456789876543210 = M2_0123456789876543210 a0123456789876543210 instance PC2 (Maybe a) where type M2 a = Apply M2_0123456789876543210Sym0 a - type family Lambda_0123456789876543210 a0123456789876543210 x0123456789876543210 y0123456789876543210 xx where - Lambda_0123456789876543210 a x y xx = xx :: a - data Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210 xx0123456789876543210 + type family LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 y0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a x y xx = xx :: a + data LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 y0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210 xx0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210) xx0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 x0123456789876543210 y0123456789876543210 xx0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210) arg) (LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 y0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 y0123456789876543210 xx0123456789876543210 where - Lambda_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 y0123456789876543210 xx0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 x0123456789876543210 y0123456789876543210 xx0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 type M3_0123456789876543210 :: forall a b. Maybe a -> b -> (Maybe a, b) type family M3_0123456789876543210 @a @b (a :: Maybe a) (a :: b) :: (Maybe a, b) where - M3_0123456789876543210 @a @b (x :: Maybe a) (y :: b) = Apply (Apply Tuple2Sym0 (Apply (Apply FmapSym0 (Lambda_0123456789876543210Sym0 a x y)) x)) y + M3_0123456789876543210 @a @b (x :: Maybe a) (y :: b) = Apply (Apply Tuple2Sym0 (Apply (Apply FmapSym0 (LamCases_0123456789876543210Sym0 a x y)) x)) y type M3_0123456789876543210Sym0 :: forall a b. (~>) (Maybe a) ((~>) b (Maybe a, b)) data M3_0123456789876543210Sym0 :: (~>) (Maybe a) ((~>) b (Maybe a, @@ -263,22 +263,22 @@ Singletons/T581.hs:(0,0)-(0,0): Splicing declarations M3_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 = M3_0123456789876543210 a0123456789876543210 a0123456789876543210 instance PC3 (Maybe a) where type M3 a a = Apply (Apply M3_0123456789876543210Sym0 a) a - type family Lambda_0123456789876543210 a0123456789876543210 x0123456789876543210 y0123456789876543210 xx where - Lambda_0123456789876543210 a x y xx = xx :: a - data Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210 xx0123456789876543210 + type family LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 y0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a x y xx = xx :: a + data LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 y0123456789876543210 arg) => - Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210 xx0123456789876543210 - type instance Apply (Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210) xx0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 x0123456789876543210 y0123456789876543210 xx0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210) where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210) arg) (LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 y0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 a0123456789876543210 x0123456789876543210 y0123456789876543210) where suppressUnusedWarnings - = snd ((,) Lambda_0123456789876543210Sym0KindInference ()) - type family Lambda_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 y0123456789876543210 xx0123456789876543210 where - Lambda_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 y0123456789876543210 xx0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 x0123456789876543210 y0123456789876543210 xx0123456789876543210 + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a0123456789876543210 x0123456789876543210 y0123456789876543210 a_01234567898765432100123456789876543210 type M3_0123456789876543210 :: forall a b. [a] -> b -> ([a], b) type family M3_0123456789876543210 @a @b (a :: [a]) (a :: b) :: ([a], b) where - M3_0123456789876543210 @a @b (x :: [a]) (y :: b) = Apply (Apply Tuple2Sym0 (Apply (Apply FmapSym0 (Lambda_0123456789876543210Sym0 a x y)) x)) y + M3_0123456789876543210 @a @b (x :: [a]) (y :: b) = Apply (Apply Tuple2Sym0 (Apply (Apply FmapSym0 (LamCases_0123456789876543210Sym0 a x y)) x)) y type M3_0123456789876543210Sym0 :: forall a b. (~>) [a] ((~>) b ([a], b)) data M3_0123456789876543210Sym0 :: (~>) [a] ((~>) b ([a], b)) @@ -362,8 +362,8 @@ Singletons/T581.hs:(0,0)-(0,0): Splicing declarations (applySing (singFun2 @FmapSym0 sFmap) (singFun1 - @(Lambda_0123456789876543210Sym0 a x y) - (\ sXx -> case sXx of (_ :: Sing xx) -> sXx :: Sing (xx :: a)))) + @(LamCases_0123456789876543210Sym0 a x y) + (\cases (sXx :: Sing xx) -> sXx :: Sing (xx :: a)))) sX)) sY instance SC3 [a] where @@ -375,8 +375,8 @@ Singletons/T581.hs:(0,0)-(0,0): Splicing declarations (applySing (singFun2 @FmapSym0 sFmap) (singFun1 - @(Lambda_0123456789876543210Sym0 a x y) - (\ sXx -> case sXx of (_ :: Sing xx) -> sXx :: Sing (xx :: a)))) + @(LamCases_0123456789876543210Sym0 a x y) + (\cases (sXx :: Sing xx) -> sXx :: Sing (xx :: a)))) sX)) sY instance SC1 a => SingI (M1Sym0 :: (~>) a (Maybe (a, b))) where diff --git a/singletons-base/tests/compile-and-dump/Singletons/T89.golden b/singletons-base/tests/compile-and-dump/Singletons/T89.golden index fc8815cf..aef0384f 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/T89.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/T89.golden @@ -10,12 +10,22 @@ Singletons/T89.hs:0:0:: Splicing declarations type FooSym0 :: Foo type family FooSym0 :: Foo where FooSym0 = Foo - type family Case_0123456789876543210 n0123456789876543210 t where - Case_0123456789876543210 n 'True = FooSym0 - Case_0123456789876543210 n 'False = Apply ErrorSym0 (FromString "toEnum: bad argument") + type family LamCases_0123456789876543210 n0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 n 'True = FooSym0 + LamCases_0123456789876543210 n 'False = Apply ErrorSym0 (FromString "toEnum: bad argument") + data LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) arg) (LamCases_0123456789876543210Sym1 n0123456789876543210 arg) => + LamCases_0123456789876543210Sym0 n0123456789876543210 a_01234567898765432100123456789876543210 + type instance Apply (LamCases_0123456789876543210Sym0 n0123456789876543210) a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (LamCases_0123456789876543210Sym0 n0123456789876543210) where + suppressUnusedWarnings + = snd ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 n0123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 n0123456789876543210 a_01234567898765432100123456789876543210 type ToEnum_0123456789876543210 :: GHC.Num.Natural.Natural -> Foo type family ToEnum_0123456789876543210 (a :: GHC.Num.Natural.Natural) :: Foo where - ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 0)) + ToEnum_0123456789876543210 n = Apply (LamCases_0123456789876543210Sym0 n) (Apply (Apply (==@#@$) n) (FromInteger 0)) type ToEnum_0123456789876543210Sym0 :: (~>) GHC.Num.Natural.Natural Foo data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Num.Natural.Natural Foo where @@ -56,18 +66,18 @@ Singletons/T89.hs:0:0:: Splicing declarations toSing Foo = SomeSing SFoo instance SEnum Foo where sToEnum (sN :: Sing n) - = id - @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 0)))) - (case - applySing - (applySing (singFun2 @(==@#@$) (%==)) sN) - (sFromInteger (sing :: Sing 0)) - of - STrue -> SFoo - SFalse - -> applySing - (singFun1 @ErrorSym0 sError) - (sFromString (sing :: Sing "toEnum: bad argument"))) + = applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 n) + (\cases + STrue -> SFoo + SFalse + -> applySing + (singFun1 @ErrorSym0 sError) + (sFromString (sing :: Sing "toEnum: bad argument")))) + (applySing + (applySing (singFun2 @(==@#@$) (%==)) sN) + (sFromInteger (sing :: Sing 0))) sFromEnum SFoo = sFromInteger (sing :: Sing 0) instance SingI Foo where sing = SFoo diff --git a/singletons-base/tests/compile-and-dump/Singletons/TopLevelPatterns.golden b/singletons-base/tests/compile-and-dump/Singletons/TopLevelPatterns.golden index 4d357738..cfb9eee9 100644 --- a/singletons-base/tests/compile-and-dump/Singletons/TopLevelPatterns.golden +++ b/singletons-base/tests/compile-and-dump/Singletons/TopLevelPatterns.golden @@ -52,10 +52,8 @@ Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations type Demote Foo = Foo fromSing (SBar b b) = Bar (fromSing b) (fromSing b) toSing (Bar (b :: Demote Bool) (b :: Demote Bool)) - = case - (,) (toSing b :: SomeSing Bool) (toSing b :: SomeSing Bool) - of - (,) (SomeSing c) (SomeSing c) -> SomeSing (SBar c c) + = (\cases (SomeSing c) (SomeSing c) -> SomeSing (SBar c c)) + (toSing b :: SomeSing Bool) (toSing b :: SomeSing Bool) instance SingI False where sing = SFalse instance SingI True where @@ -114,28 +112,116 @@ Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations l :: Bool m :: Bool [l, m] = [not True, id False] - type family Case_0123456789876543210 t where - Case_0123456789876543210 '[_, - y_0123456789876543210] = y_0123456789876543210 - type family Case_0123456789876543210 t where - Case_0123456789876543210 '[y_0123456789876543210, - _] = y_0123456789876543210 - type family Case_0123456789876543210 t where - Case_0123456789876543210 ('Bar _ y_0123456789876543210) = y_0123456789876543210 - type family Case_0123456789876543210 t where - Case_0123456789876543210 ('Bar y_0123456789876543210 _) = y_0123456789876543210 - type family Case_0123456789876543210 a_01234567898765432100123456789876543210 t where - Case_0123456789876543210 a_0123456789876543210 '(_, - y_0123456789876543210) = y_0123456789876543210 - type family Case_0123456789876543210 a_01234567898765432100123456789876543210 t where - Case_0123456789876543210 a_0123456789876543210 '(y_0123456789876543210, - _) = y_0123456789876543210 - type family Case_0123456789876543210 a_01234567898765432100123456789876543210 t where - Case_0123456789876543210 a_0123456789876543210 '[_, - y_0123456789876543210] = y_0123456789876543210 - type family Case_0123456789876543210 a_01234567898765432100123456789876543210 t where - Case_0123456789876543210 a_0123456789876543210 '[y_0123456789876543210, - _] = y_0123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 '[_, + y_0123456789876543210] = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where + suppressUnusedWarnings + = GHC.Internal.Data.Tuple.snd + ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 '[y_0123456789876543210, + _] = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where + suppressUnusedWarnings + = GHC.Internal.Data.Tuple.snd + ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 ('Bar _ y_0123456789876543210) = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where + suppressUnusedWarnings + = GHC.Internal.Data.Tuple.snd + ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 ('Bar y_0123456789876543210 _) = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + where + LamCases_0123456789876543210Sym0KindInference :: SameKind (Apply LamCases_0123456789876543210Sym0 arg) (LamCases_0123456789876543210Sym1 arg) => + LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 + type instance Apply LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings LamCases_0123456789876543210Sym0 where + suppressUnusedWarnings + = GHC.Internal.Data.Tuple.snd + ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a_0123456789876543210 '(_, + y_0123456789876543210) = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 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 + = GHC.Internal.Data.Tuple.snd + ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a_0123456789876543210 '(y_0123456789876543210, + _) = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 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 + = GHC.Internal.Data.Tuple.snd + ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a_0123456789876543210 '[_, + y_0123456789876543210] = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 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 + = GHC.Internal.Data.Tuple.snd + ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 + type family LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_0123456789876543210 where + LamCases_0123456789876543210 a_0123456789876543210 '[y_0123456789876543210, + _] = y_0123456789876543210 + data LamCases_0123456789876543210Sym0 a_01234567898765432100123456789876543210 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 + = GHC.Internal.Data.Tuple.snd + ((,) LamCases_0123456789876543210Sym0KindInference ()) + type family LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where + LamCases_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 = LamCases_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 type MSym0 :: Bool type family MSym0 :: Bool where MSym0 = M @@ -235,34 +321,34 @@ Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations OtherwiseSym0 = Otherwise type M :: Bool type family M :: Bool where - M = Case_0123456789876543210 X_0123456789876543210Sym0 + M = Apply LamCases_0123456789876543210Sym0 X_0123456789876543210Sym0 type L :: Bool type family L :: Bool where - L = Case_0123456789876543210 X_0123456789876543210Sym0 + L = Apply LamCases_0123456789876543210Sym0 X_0123456789876543210Sym0 type family X_0123456789876543210 where X_0123456789876543210 = Apply (Apply (:@#@$) (Apply NotSym0 TrueSym0)) (Apply (Apply (:@#@$) (Apply IdSym0 FalseSym0)) NilSym0) type K :: Bool type family K :: Bool where - K = Case_0123456789876543210 X_0123456789876543210Sym0 + K = Apply LamCases_0123456789876543210Sym0 X_0123456789876543210Sym0 type J :: Bool type family J :: Bool where - J = Case_0123456789876543210 X_0123456789876543210Sym0 + J = Apply LamCases_0123456789876543210Sym0 X_0123456789876543210Sym0 type family X_0123456789876543210 where X_0123456789876543210 = Apply (Apply BarSym0 TrueSym0) (Apply HSym0 FalseSym0) type I :: Bool -> Bool type family I (a :: Bool) :: Bool where - I a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210 + I a_0123456789876543210 = Apply (Apply (LamCases_0123456789876543210Sym0 a_0123456789876543210) X_0123456789876543210Sym0) a_0123456789876543210 type H :: Bool -> Bool type family H (a :: Bool) :: Bool where - H a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210 + H a_0123456789876543210 = Apply (Apply (LamCases_0123456789876543210Sym0 a_0123456789876543210) X_0123456789876543210Sym0) a_0123456789876543210 type family X_0123456789876543210 where X_0123456789876543210 = Apply (Apply Tuple2Sym0 FSym0) GSym0 type G :: Bool -> Bool type family G (a :: Bool) :: Bool where - G a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210 + G a_0123456789876543210 = Apply (Apply (LamCases_0123456789876543210Sym0 a_0123456789876543210) X_0123456789876543210Sym0) a_0123456789876543210 type F :: Bool -> Bool type family F (a :: Bool) :: Bool where - F a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210 + F a_0123456789876543210 = Apply (Apply (LamCases_0123456789876543210Sym0 a_0123456789876543210) X_0123456789876543210Sym0) a_0123456789876543210 type family X_0123456789876543210 where X_0123456789876543210 = Apply (Apply (:@#@$) NotSym0) (Apply (Apply (:@#@$) IdSym0) NilSym0) type family False_ where @@ -305,19 +391,24 @@ Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations (forall (t :: a). Sing t -> Sing (Apply IdSym0 t :: a) :: Type) sOtherwise :: (Sing (OtherwiseSym0 :: Bool) :: Type) sM - = GHC.Internal.Base.id - @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - SCons _ - (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) SNil) - -> sY_0123456789876543210) + = applySing + (singFun1 + @LamCases_0123456789876543210Sym0 + (\cases + (SCons _ + (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) + SNil)) + -> sY_0123456789876543210)) + sX_0123456789876543210 sL - = GHC.Internal.Base.id - @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) - (SCons _ SNil) - -> sY_0123456789876543210) + = applySing + (singFun1 + @LamCases_0123456789876543210Sym0 + (\cases + (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) + (SCons _ SNil)) + -> sY_0123456789876543210)) + sX_0123456789876543210 sX_0123456789876543210 = applySing (applySing @@ -329,36 +420,44 @@ Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations (applySing (singFun1 @IdSym0 sId) SFalse)) SNil) sK - = GHC.Internal.Base.id - @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - SBar _ (sY_0123456789876543210 :: Sing y_0123456789876543210) - -> sY_0123456789876543210) + = applySing + (singFun1 + @LamCases_0123456789876543210Sym0 + (\cases + (SBar _ (sY_0123456789876543210 :: Sing y_0123456789876543210)) + -> sY_0123456789876543210)) + sX_0123456789876543210 sJ - = GHC.Internal.Base.id - @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - SBar (sY_0123456789876543210 :: Sing y_0123456789876543210) _ - -> sY_0123456789876543210) + = applySing + (singFun1 + @LamCases_0123456789876543210Sym0 + (\cases + (SBar (sY_0123456789876543210 :: Sing y_0123456789876543210) _) + -> sY_0123456789876543210)) + sX_0123456789876543210 sX_0123456789876543210 = applySing (applySing (singFun2 @BarSym0 SBar) STrue) (applySing (singFun1 @HSym0 sH) SFalse) sI (sA_0123456789876543210 :: Sing a_0123456789876543210) = applySing - (GHC.Internal.Base.id - @(Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - STuple2 _ (sY_0123456789876543210 :: Sing y_0123456789876543210) - -> sY_0123456789876543210)) + (applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 a_0123456789876543210) + (\cases + (STuple2 _ (sY_0123456789876543210 :: Sing y_0123456789876543210)) + -> sY_0123456789876543210)) + sX_0123456789876543210) sA_0123456789876543210 sH (sA_0123456789876543210 :: Sing a_0123456789876543210) = applySing - (GHC.Internal.Base.id - @(Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - STuple2 (sY_0123456789876543210 :: Sing y_0123456789876543210) _ - -> sY_0123456789876543210)) + (applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 a_0123456789876543210) + (\cases + (STuple2 (sY_0123456789876543210 :: Sing y_0123456789876543210) _) + -> sY_0123456789876543210)) + sX_0123456789876543210) sA_0123456789876543210 sX_0123456789876543210 = applySing @@ -366,21 +465,26 @@ Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations (singFun1 @GSym0 sG) sG (sA_0123456789876543210 :: Sing a_0123456789876543210) = applySing - (GHC.Internal.Base.id - @(Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - SCons _ - (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) SNil) - -> sY_0123456789876543210)) + (applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 a_0123456789876543210) + (\cases + (SCons _ + (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) + SNil)) + -> sY_0123456789876543210)) + sX_0123456789876543210) sA_0123456789876543210 sF (sA_0123456789876543210 :: Sing a_0123456789876543210) = applySing - (GHC.Internal.Base.id - @(Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)) - (case sX_0123456789876543210 of - SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) - (SCons _ SNil) - -> sY_0123456789876543210)) + (applySing + (singFun1 + @(LamCases_0123456789876543210Sym0 a_0123456789876543210) + (\cases + (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) + (SCons _ SNil)) + -> sY_0123456789876543210)) + sX_0123456789876543210) sA_0123456789876543210 sX_0123456789876543210 = applySing diff --git a/singletons-th/CHANGES.md b/singletons-th/CHANGES.md index 386e415a..97324e11 100644 --- a/singletons-th/CHANGES.md +++ b/singletons-th/CHANGES.md @@ -3,6 +3,17 @@ Changelog for the `singletons-th` project next [????.??.??] ----------------- +* Require building with `th-desugar-1.18` or later. Notably, `th-desugar-1.18` + now desugars all lambda, `case`, and `\case` expressions to `\cases` + expressions, and the same principle applies to the code that `singletons-th` + generates. + + Generally speaking, most code should continue to work after this change. Note + that singled code might now generate `-Wunused-matches` warnings where it + didn't before. For example, previous versions of `singletons-th` would not + warn that the `x` in `map (\x -> ())` is unused after singling it, but this + `singletons-th` will now generate an `-Wunused-matches` warning for the + singled version of `x`. * Add support for promoting and singling type variables that scope over the bodies of class method defaults and instance methods. * When promoting a class with a standalone kind signature, `singletons-th` will diff --git a/singletons-th/singletons-th.cabal b/singletons-th/singletons-th.cabal index 7f6aec1e..81059a37 100644 --- a/singletons-th/singletons-th.cabal +++ b/singletons-th/singletons-th.cabal @@ -59,7 +59,7 @@ library singletons == 3.0.*, syb >= 0.4, template-haskell >= 2.22 && < 2.23, - th-desugar >= 1.17 && < 1.18, + th-desugar >= 1.18 && < 1.19, th-orphans >= 0.13.11 && < 0.14, transformers >= 0.5.2 default-language: GHC2021 diff --git a/singletons-th/src/Data/Singletons/TH.hs b/singletons-th/src/Data/Singletons/TH.hs index beff2a25..8b04038b 100644 --- a/singletons-th/src/Data/Singletons/TH.hs +++ b/singletons-th/src/Data/Singletons/TH.hs @@ -165,7 +165,7 @@ buildCases :: DsMonad m -> m Exp -- body -> m DExp buildCases ctor_infos expq bodyq = - DCaseE <$> (dsExp =<< expq) <*> + dCaseE <$> (dsExp =<< expq) <*> mapM (\con -> DMatch (conToPat con) <$> (dsExp =<< bodyq)) ctor_infos where conToPat :: (Name, Int) -> DPat diff --git a/singletons-th/src/Data/Singletons/TH/Deriving/Enum.hs b/singletons-th/src/Data/Singletons/TH/Deriving/Enum.hs index 78a0f104..aa6f0fca 100644 --- a/singletons-th/src/Data/Singletons/TH/Deriving/Enum.hs +++ b/singletons-th/src/Data/Singletons/TH/Deriving/Enum.hs @@ -44,7 +44,7 @@ mkEnumInstance mb_ctxt ty (DataDecl _ _ _ cons) = do let to_enum = UFunction [DClause [DVarP n] (to_enum_rhs cons [0..])] to_enum_rhs [] _ = DVarE errorName `DAppE` DLitE (StringL "toEnum: bad argument") to_enum_rhs (DCon _ _ name _ _ : rest) (num:nums) = - DCaseE (DVarE equalsName `DAppE` DVarE n `DAppE` DLitE (IntegerL num)) + dCaseE (DVarE equalsName `DAppE` DVarE n `DAppE` DLitE (IntegerL num)) [ DMatch (DConP trueName [] []) (DConE name) , DMatch (DConP falseName [] []) (to_enum_rhs rest nums) ] to_enum_rhs _ _ = error "Internal error: exhausted infinite list in to_enum_rhs" diff --git a/singletons-th/src/Data/Singletons/TH/Deriving/Foldable.hs b/singletons-th/src/Data/Singletons/TH/Deriving/Foldable.hs index ad49e9a4..91e470b0 100644 --- a/singletons-th/src/Data/Singletons/TH/Deriving/Foldable.hs +++ b/singletons-th/src/Data/Singletons/TH/Deriving/Foldable.hs @@ -25,7 +25,7 @@ mkFoldableInstance mb_ctxt ty dd@(DataDecl _ _ _ cons) = do f <- newUniqueName "_f" z <- newUniqueName "_z" let ft_foldMap :: FFoldType (q DExp) - ft_foldMap = FT { ft_triv = mkSimpleLam $ \_ -> pure $ DVarE memptyName + ft_foldMap = FT { ft_triv = mkSimpleWildLam $ pure $ DVarE memptyName -- foldMap f = \x -> mempty , ft_var = pure $ DVarE f -- foldMap f = f @@ -36,7 +36,7 @@ mkFoldableInstance mb_ctxt ty dd@(DataDecl _ _ _ cons) = do } ft_foldr :: FFoldType (q DExp) - ft_foldr = FT { ft_triv = mkSimpleLam2 $ \_ z' -> pure z' + ft_foldr = FT { ft_triv = mkSimpleWildLam2 pure -- foldr f = \x z -> z , ft_var = pure $ DVarE f -- foldr f = f diff --git a/singletons-th/src/Data/Singletons/TH/Deriving/Functor.hs b/singletons-th/src/Data/Singletons/TH/Deriving/Functor.hs index d66c5dcf..75eaf579 100644 --- a/singletons-th/src/Data/Singletons/TH/Deriving/Functor.hs +++ b/singletons-th/src/Data/Singletons/TH/Deriving/Functor.hs @@ -39,7 +39,7 @@ mkFunctorInstance mb_ctxt ty dd@(DataDecl _ _ _ cons) = do ft_replace :: FFoldType (q Replacer) ft_replace = FT { ft_triv = fmap Nested $ mkSimpleLam pure -- (p <$) = \x -> x - , ft_var = fmap Immediate $ mkSimpleLam $ \_ -> pure $ DVarE z + , ft_var = fmap Immediate $ mkSimpleWildLam $ pure $ DVarE z -- (p <$) = const p , ft_ty_app = \_ gm -> do g <- gm @@ -69,13 +69,13 @@ mkFunctorInstance mb_ctxt ty dd@(DataDecl _ _ _ cons) = do mk_fmap :: q [DClause] mk_fmap = case cons of [] -> do v <- newUniqueName "v" - pure [DClause [DWildP, DVarP v] (DCaseE (DVarE v) [])] + pure [DClause [DWildP, DVarP v] (dCaseE (DVarE v) [])] _ -> traverse mk_fmap_clause cons mk_replace :: q [DClause] mk_replace = case cons of [] -> do v <- newUniqueName "v" - pure [DClause [DWildP, DVarP v] (DCaseE (DVarE v) [])] + pure [DClause [DWildP, DVarP v] (dCaseE (DVarE v) [])] _ -> traverse mk_replace_clause cons fmap_clauses <- mk_fmap diff --git a/singletons-th/src/Data/Singletons/TH/Deriving/Show.hs b/singletons-th/src/Data/Singletons/TH/Deriving/Show.hs index 95d29556..8cc2349c 100644 --- a/singletons-th/src/Data/Singletons/TH/Deriving/Show.hs +++ b/singletons-th/src/Data/Singletons/TH/Deriving/Show.hs @@ -43,7 +43,7 @@ mk_showsPrec cons = do p <- newUniqueName "p" -- The precedence argument (not always used) if null cons then do v <- newUniqueName "v" - pure [DClause [DWildP, DVarP v] (DCaseE (DVarE v) [])] + pure [DClause [DWildP, DVarP v] (dCaseE (DVarE v) [])] else mapM (mk_showsPrec_clause p) cons mk_showsPrec_clause :: forall q. DsMonad q diff --git a/singletons-th/src/Data/Singletons/TH/Deriving/Traversable.hs b/singletons-th/src/Data/Singletons/TH/Deriving/Traversable.hs index ed8df604..3ac889bf 100644 --- a/singletons-th/src/Data/Singletons/TH/Deriving/Traversable.hs +++ b/singletons-th/src/Data/Singletons/TH/Deriving/Traversable.hs @@ -55,7 +55,7 @@ mkTraversableInstance mb_ctxt ty dd@(DataDecl _ _ _ cons) = do mk_trav = case cons of [] -> do v <- newUniqueName "v" pure [DClause [DWildP, DVarP v] - (DVarE pureName `DAppE` DCaseE (DVarE v) [])] + (DVarE pureName `DAppE` dCaseE (DVarE v) [])] _ -> traverse mk_trav_clause cons trav_clauses <- mk_trav diff --git a/singletons-th/src/Data/Singletons/TH/Deriving/Util.hs b/singletons-th/src/Data/Singletons/TH/Deriving/Util.hs index b6055d0d..80384af7 100644 --- a/singletons-th/src/Data/Singletons/TH/Deriving/Util.hs +++ b/singletons-th/src/Data/Singletons/TH/Deriving/Util.hs @@ -258,7 +258,13 @@ mkSimpleLam :: Quasi q => (DExp -> q DExp) -> q DExp mkSimpleLam lam = do n <- newUniqueName "n" body <- lam (DVarE n) - return $ DLamE [n] body + return $ dLamE [DVarP n] body + +-- Make a 'DLamE' using a wildcard pattern. +mkSimpleWildLam :: Quasi q => q DExp -> q DExp +mkSimpleWildLam lam = do + body <- lam + return $ dLamE [DWildP] body -- Make a 'DLamE' using two fresh variables. mkSimpleLam2 :: Quasi q => (DExp -> DExp -> q DExp) -> q DExp @@ -266,7 +272,15 @@ mkSimpleLam2 lam = do n1 <- newUniqueName "n1" n2 <- newUniqueName "n2" body <- lam (DVarE n1) (DVarE n2) - return $ DLamE [n1, n2] body + return $ dLamE [DVarP n1, DVarP n2] body + +-- Make a 'DLamE' where the first argument is a wildcard pattern and the second +-- argument is a fresh variable. +mkSimpleWildLam2 :: Quasi q => (DExp -> q DExp) -> q DExp +mkSimpleWildLam2 lam = do + n <- newUniqueName "n" + body <- lam (DVarE n) + return $ dLamE [DWildP, DVarP n] body -- "Con a1 a2 a3 -> fold [x1 a1, x2 a2, x3 a3]" -- diff --git a/singletons-th/src/Data/Singletons/TH/Promote.hs b/singletons-th/src/Data/Singletons/TH/Promote.hs index 694790bb..e84d17f9 100644 --- a/singletons-th/src/Data/Singletons/TH/Promote.hs +++ b/singletons-th/src/Data/Singletons/TH/Promote.hs @@ -1143,7 +1143,7 @@ promoteLetDecRHS rhs_sort type_env fix_env mb_let_uniq name let_dec_rhs = do return $ DClause (pats ++ newPats) (foldExp exp newArgs) | otherwise = do -- Eta-contract let (clausePats, lamPats) = splitAt ty_num_args pats - lamExp <- mkDLamEFromDPats lamPats exp + lamExp = dLamE lamPats exp return $ DClause clausePats lamExp where n = ty_num_args - clause_num_args @@ -1332,23 +1332,6 @@ promoteClause mb_let_uniq name m_ldrki all_locals (DClause pats exp) = do return ( DTySynEqn Nothing (foldType pro_clause_fun types_w_kinds) ty , ADClause new_vars pats' ann_exp ) -promoteMatch :: DType -- What to use as the LHS of the promoted type family - -- equation. This should consist of the promoted name of - -- the case expression to which the match belongs, applied - -- to any local arguments (e.g., `Case x y z`). - -> DMatch -> PrM (DTySynEqn, ADMatch) -promoteMatch pro_case_fun (DMatch pat exp) = do - -- promoting the patterns creates variable bindings. These are passed - -- to the function promoted the RHS - ((ty, pat'), prom_pat_infos) <- evalForPair $ promotePat pat - let PromDPatInfos { prom_dpat_vars = new_vars - , prom_dpat_sig_kvs = sig_kvs } = prom_pat_infos - (rhs, ann_exp) <- scopedBind sig_kvs $ - lambdaBind new_vars $ - promoteExp exp - return $ ( DTySynEqn Nothing (pro_case_fun `DAppT` ty) rhs - , ADMatch new_vars pat' ann_exp) - -- promotes a term pattern into a type pattern, accumulating bound variable names promotePat :: DPat -> QWithAux PromDPatInfos PrM (DType, ADPat) promotePat (DLitP lit) = (, ADLitP lit) <$> promoteLitPat lit @@ -1402,39 +1385,29 @@ promoteExp (DAppE exp1 exp2) = do promoteExp (DAppTypeE exp _) = do qReportWarning "Visible type applications are ignored by `singletons-th`." promoteExp exp -promoteExp (DLamE names exp) = do +promoteExp (DLamCasesE clauses) = do opts <- getOptions - lambdaName <- newUniqueName "Lambda" - tyNames <- mapM mkTyName names - let var_proms = zip names tyNames - (rhs, ann_exp) <- lambdaBind var_proms $ promoteExp exp - all_locals <- allLocals - let tvbs = map (`DPlainTV` BndrReq) tyNames - all_args = all_locals ++ tyNames - tfh = dTypeFamilyHead_with_locals lambdaName all_locals tvbs DNoSig - emitDecs [DClosedTypeFamilyD - tfh - [DTySynEqn Nothing - (foldType (DConT lambdaName) (map DVarT all_args)) - rhs]] - emitDecsM $ defunctionalize lambdaName Nothing $ DefunNoSAK all_locals tvbs Nothing - let promLambda = foldType (DConT (defunctionalizedName opts lambdaName 0)) - (map DVarT all_locals) - return (promLambda, ADLamE tyNames promLambda names ann_exp) -promoteExp (DCaseE exp matches) = do - caseTFName <- newUniqueName "Case" + lam_cases_tf_name <- newUniqueName "LamCases" all_locals <- allLocals - let prom_case = foldType (DConT caseTFName) (map DVarT all_locals) - (exp', ann_exp) <- promoteExp exp - (eqns, ann_matches) <- mapAndUnzipM (promoteMatch prom_case) matches - tyvarName <- qNewName "t" - let tvbs = [DPlainTV tyvarName BndrReq] - tfh = dTypeFamilyHead_with_locals caseTFName all_locals tvbs DNoSig + (eqns, ann_clauses) <- + mapAndUnzipM (promoteClause Nothing lam_cases_tf_name Nothing all_locals) clauses + -- Per the Haddocks for DLamCasesE, an empty list of clauses indicates that + -- the overall `\cases` expression takes one argument. Otherwise, we look at + -- the first clause to see how many arguments the expression takes, as each + -- clause is required to have the same number of patterns. + let num_args = + case clauses of + [] -> 1 + DClause pats _ : _ -> length pats + arg_tvb_names <- replicateM num_args (newUniqueName "a") + let arg_tvbs = map (`DPlainTV` BndrReq) arg_tvb_names + tfh = dTypeFamilyHead_with_locals lam_cases_tf_name all_locals arg_tvbs DNoSig emitDecs [DClosedTypeFamilyD tfh eqns] - -- See Note [Annotate case return type] in Single - let applied_case = prom_case `DAppT` exp' - return ( applied_case - , ADCaseE ann_exp ann_matches applied_case ) + emitDecsM $ defunctionalize lam_cases_tf_name Nothing $ DefunNoSAK all_locals arg_tvbs Nothing + let prom_lam_cases = + foldType (DConT (defunctionalizedName opts lam_cases_tf_name 0)) + (map DVarT all_locals) + pure (prom_lam_cases, ADLamCasesE num_args prom_lam_cases ann_clauses) promoteExp (DLetE decs exp) = do unique <- qNewUnique (binds, ann_env) <- promoteLetDecs (Just unique) decs diff --git a/singletons-th/src/Data/Singletons/TH/Single.hs b/singletons-th/src/Data/Singletons/TH/Single.hs index f1cc9b85..57d18e8f 100644 --- a/singletons-th/src/Data/Singletons/TH/Single.hs +++ b/singletons-th/src/Data/Singletons/TH/Single.hs @@ -263,7 +263,7 @@ singITyConInstance n [DLetDec $ DFunD singMethName [DClause [] $ wrapSingFun 1 DWildCardT $ - DLamE [x] $ + dLamE [DVarP x] $ DVarE withSingIName `DAppE` DVarE x `DAppE` DVarE singMethName]] @@ -630,10 +630,8 @@ having a type signature. It's as if one had written this: This is too general, since `sX` will only typecheck if the return kind of `LetX` is `MyProxy a`, not `MyProxy a1`. In order to avoid this problem, we need to avoid kind generalization when kind-checking the type of `sX`. -To accomplish this, we borrow a trick from -Note [The id hack; or, how singletons-th learned to stop worrying and avoid kind generalization] -and use TypeApplications plus a wildcard type. That is, we generate this code -for `sF`: +To accomplish this, we use TypeApplications plus a wildcard type. That is, we +generate this code for `sF`: sF :: forall a (t :: MyProxy a). Sing t -> Sing (F t :: MyProxy a) sF SMyProxy = @@ -744,28 +742,10 @@ singPat var_proms = go -- that brings singleton equality constraints into scope via pattern-matching. -- See @Note [Singling pattern signatures]@. mkSigPaCaseE :: SingDSigPaInfos -> DExp -> DExp -mkSigPaCaseE exps_with_sigs exp - | null exps_with_sigs = exp - | otherwise = - let (exps, sigs) = unzip exps_with_sigs - scrutinee = mkTupleDExp exps - pats = map (DSigP DWildP . DAppT (DConT singFamilyName)) sigs - in DCaseE scrutinee [DMatch (mkTupleDPat pats) exp] - --- Note [Annotate case return type] --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- --- We're straining GHC's type inference here. One particular trouble area --- is determining the return type of a GADT pattern match. In general, GHC --- cannot infer return types of GADT pattern matches because the return type --- becomes "untouchable" in the case matches. See the OutsideIn paper. But, --- during singletonization, we *know* the return type. So, just add a type --- annotation. See #54. --- --- In particular, we add a type annotation in a somewhat unorthodox fashion. --- Instead of the usual `(x :: t)`, we use `id @t x`. See --- Note [The id hack; or, how singletons-th learned to stop worrying and avoid --- kind generalization] for an explanation of why we do this. +mkSigPaCaseE exps_with_sigs exp = + let (exps, sigs) = unzip exps_with_sigs + pats = map (DSigP DWildP . DAppT (DConT singFamilyName)) sigs + in multiCase exps pats exp -- Note [Singling pattern signatures] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -851,25 +831,9 @@ singExp (ADAppE e1 e2) = do e1' <- singExp e1 e2' <- singExp e2 pure $ DVarE applySingName `DAppE` e1' `DAppE` e2' -singExp (ADLamE ty_names prom_lam names exp) = do - opts <- getOptions - let sNames = map (singledValueName opts) names - exp' <- bindLambdas (zip names sNames) $ singExp exp - -- we need to bind the type variables... but DLamE doesn't allow SigT patterns. - -- So: build a case - let caseExp = DCaseE (mkTupleDExp (map DVarE sNames)) - [DMatch (mkTupleDPat - (map ((DWildP `DSigP`) . - (singFamily `DAppT`) . - DVarT) ty_names)) exp'] - return $ wrapSingFun (length names) prom_lam $ DLamE sNames caseExp -singExp (ADCaseE exp matches ret_ty) = - -- See Note [Annotate case return type] and - -- Note [The id hack; or, how singletons-th learned to stop worrying and - -- avoid kind generalization] - DAppE (DAppTypeE (DVarE 'id) - (singFamily `DAppT` ret_ty)) - <$> (DCaseE <$> singExp exp <*> mapM singMatch matches) +singExp (ADLamCasesE num_args prom_lam_cases clauses) = do + clauses' <- traverse singClause clauses + pure $ wrapSingFun num_args prom_lam_cases $ DLamCasesE clauses' singExp (ADLetE env exp) = do -- We intentionally discard the SingI instances for exp's defunctionalization -- symbols, as we also do not generate the declarations for the @@ -941,14 +905,6 @@ singDerivedShowDecs (DerivedDecl { ded_mb_cxt = mb_cxt (DConT showName `DAppT` (DConT sty_tycon `DAppT` DSigT (DVarT z) ki)) pure [show_inst] -singMatch :: ADMatch -> SgM DMatch -singMatch (ADMatch var_proms pat exp) = do - opts <- getOptions - (sPat, sigPaExpsSigs) <- evalForPair $ singPat (Map.fromList var_proms) pat - let lambda_binds = map (\(n,_) -> (n, singledValueName opts n)) var_proms - sExp <- bindLambdas lambda_binds $ singExp exp - return $ DMatch sPat $ mkSigPaCaseE sigPaExpsSigs sExp - singLit :: Lit -> SgM DExp singLit (IntegerL n) = do opts <- getOptions @@ -971,85 +927,3 @@ singLit (CharL c) = return $ DVarE singMethName `DSigE` (singFamily `DAppT` DLitT (CharTyLit c)) singLit lit = fail ("Only string, natural number, and character literals can be singled: " ++ show lit) - -{- -Note [The id hack; or, how singletons-th learned to stop worrying and avoid kind generalization] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -GHC 8.8 was a time of great change. In particular, 8.8 debuted a fix for -Trac #15141 (decideKindGeneralisationPlan is too complicated). To fix this, a -wily GHC developer—who shall remain unnamed, but whose username rhymes with -schmoldfire—decided to make decideKindGeneralisationPlan less complicated by, -well, removing the whole thing. One consequence of this is that local -definitions are now kind-generalized (whereas they would not have been -previously). - -While schmoldfire had the noblest of intentions when authoring his fix, he -unintentionally made life much harder for singletons-th. Why? Consider the -following program: - - class Foo a where - bar :: a -> (a -> b) -> b - baz :: a - - quux :: Foo a => a -> a - quux x = x `bar` \_ -> baz - -When singled, this program will turn into something like this: - - type family Quux (x :: a) :: a where - Quux x = Bar x (LambdaSym1 x) - - sQuux :: forall a (x :: a). SFoo a => Sing x -> Sing (Quux x :: a) - sQuux (sX :: Sing x) - = sBar sX - ((singFun1 @(LambdaSym1 x)) - (\ sArg - -> case sArg of { - (_ :: Sing arg) - -> (case sArg of { _ -> sBaz }) :: - Sing (Case x arg arg) })) - - type family Case x arg t where - Case x arg _ = Baz - type family Lambda x t where - Lambda x arg = Case x arg arg - data LambdaSym1 x t - type instance Apply (LambdaSym1 x) t = Lambda x t - -The high-level bit is the explicit `Sing (Case x arg arg)` signature. Question: -what is the kind of `Case x arg arg`? The answer depends on whether local -definitions are kind-generalized or not! - -1. If local definitions are *not* kind-generalized (i.e., the status quo before - GHC 8.8), then `Case x arg arg :: a`. -2. If local definitions *are* kind-generalized (i.e., the status quo in GHC 8.8 - and later), then `Case x arg arg :: k` for some fresh kind variable `k`. - -Unfortunately, the kind of `Case x arg arg` *must* be `a` in order for `sQuux` -to type-check. This means that the code above suddenly stopped working in GHC -8.8. What's more, we can't just remove these explicit signatures, as there is -code elsewhere in `singletons-th` that crucially relies on them to guide type -inference along (e.g., `sShowParen` in `Text.Show.Singletons`). - -Luckily, there is an ingenious hack that lets us the benefits of explicit -signatures without the pain of kind generalization: our old friend, the `id` -function. The plan is as follows: instead of generating this code: - - (case sArg of ...) :: Sing (Case x arg arg) - -We instead generate this code: - - id @(Sing (Case x arg arg)) (case sArg of ...) - -That's it! This works because visible type arguments in terms do not get kind- -generalized, unlike top-level or local signatures. Now `Case x arg arg`'s kind -is not generalized, and all is well. We dub this: the `id` hack. - -One might wonder: will we need the `id` hack around forever? Perhaps not. While -GHC 8.8 removed the decideKindGeneralisationPlan function, there have been -rumblings that a future version of GHC may bring it back (in a limited form). -If this happens, it is possibly that GHC's attitude towards kind-generalizing -local definitions may change *again*, which could conceivably render the `id` -hack unnecessary. This is all speculation, of course, so all we can do now is -wait and revisit this design at a later date. --} diff --git a/singletons-th/src/Data/Singletons/TH/Single/Data.hs b/singletons-th/src/Data/Singletons/TH/Single/Data.hs index 7817dc85..fa66ada0 100644 --- a/singletons-th/src/Data/Singletons/TH/Single/Data.hs +++ b/singletons-th/src/Data/Singletons/TH/Single/Data.hs @@ -148,13 +148,13 @@ singDataD (DataDecl df name tvbs ctors) = do mkEmptyFromSingClause = do x <- qNewName "x" pure $ DClause [DVarP x] - $ DCaseE (DVarE x) [] + $ dCaseE (DVarE x) [] mkEmptyToSingClause :: SgM DClause mkEmptyToSingClause = do x <- qNewName "x" pure $ DClause [DVarP x] - $ DConE someSingDataName `DAppE` DCaseE (DVarE x) [] + $ DConE someSingDataName `DAppE` dCaseE (DVarE x) [] -- Single a constructor. singCtor :: Name -> DCon -> SgM DCon diff --git a/singletons-th/src/Data/Singletons/TH/Single/Decide.hs b/singletons-th/src/Data/Singletons/TH/Single/Decide.hs index ff579875..610807f6 100644 --- a/singletons-th/src/Data/Singletons/TH/Single/Decide.hs +++ b/singletons-th/src/Data/Singletons/TH/Single/Decide.hs @@ -96,32 +96,33 @@ mkDecideMethClause (c1, c2) rpats = map DVarP rnames lvars = map DVarE lnames rvars = map DVarE rnames - refl <- qNewName "refl" return $ DClause [DConP lname [] lpats, DConP rname [] rpats] - (DCaseE (mkTupleDExp $ - zipWith (\l r -> foldExp (DVarE sDecideMethName) [l, r]) - lvars rvars) - ((DMatch (mkTupleDPat (replicate lNumArgs - (DConP provedName [] [DConP reflName [] []]))) - (DAppE (DConE provedName) (DConE reflName))) : - [DMatch (mkTupleDPat (replicate i DWildP ++ - DConP disprovedName [] [DVarP contra] : - replicate (lNumArgs - i - 1) DWildP)) - (DAppE (DConE disprovedName) - (DLamE [refl] $ - DCaseE (DVarE refl) - [DMatch (DConP reflName [] []) $ - (DAppE (DVarE contra) - (DConE reflName))])) - | i <- [0..lNumArgs-1] ])) + (dCasesE + (zipWith (\l r -> foldExp (DVarE sDecideMethName) [l, r]) + lvars rvars) + ((DClause + (replicate + lNumArgs + (DConP provedName [] [DConP reflName [] []])) + (DAppE (DConE provedName) (DConE reflName))) : + [ DClause + (replicate i DWildP ++ + DConP disprovedName [] [DVarP contra] : + replicate (lNumArgs - i - 1) DWildP) + (DAppE + (DConE disprovedName) + (dLamCaseE + [DMatch (DConP reflName [] []) $ + (DAppE (DVarE contra) + (DConE reflName))])) + | i <- [0..lNumArgs-1] ])) - | otherwise = do - x <- qNewName "x" + | otherwise = return $ DClause [DConP lname [] (replicate lNumArgs DWildP), DConP rname [] (replicate rNumArgs DWildP)] - (DAppE (DConE disprovedName) (DLamE [x] (DCaseE (DVarE x) []))) + (DAppE (DConE disprovedName) (dLamCaseE [])) where (lname, lNumArgs) = extractNameArgs c1 @@ -131,4 +132,4 @@ mkEmptyDecideMethClause :: Quasi q => q DClause mkEmptyDecideMethClause = do x <- qNewName "x" pure $ DClause [DVarP x, DWildP] - $ DConE provedName `DAppE` DCaseE (DVarE x) [] + $ DConE provedName `DAppE` dCaseE (DVarE x) [] diff --git a/singletons-th/src/Data/Singletons/TH/Syntax.hs b/singletons-th/src/Data/Singletons/TH/Syntax.hs index 31cf7f74..fe8e3312 100644 --- a/singletons-th/src/Data/Singletons/TH/Syntax.hs +++ b/singletons-th/src/Data/Singletons/TH/Syntax.hs @@ -101,11 +101,16 @@ data ADExp = ADVarE Name | ADConE Name | ADLitE Lit | ADAppE ADExp ADExp - | ADLamE [Name] -- type-level names corresponding to term-level ones - DType -- the promoted lambda - [Name] ADExp - | ADCaseE ADExp [ADMatch] DType - -- the type is the return type + | ADLamCasesE + Int + -- ^ The number of arguments in each clause. Although this can be + -- computed from the list of ADClauses, this information is used + -- multiple times during promotion and singling, so we cache this + -- number here as a convenience. + DType + -- ^ The promoted lambda. + [ADClause] + -- ^ The list of clauses in the @\\cases@ expression. | ADLetE ALetDecEnv ADExp | ADSigE DType -- the promoted expression ADExp DType diff --git a/singletons-th/src/Data/Singletons/TH/Util.hs b/singletons-th/src/Data/Singletons/TH/Util.hs index 1e9a37ea..dc24ce23 100644 --- a/singletons-th/src/Data/Singletons/TH/Util.hs +++ b/singletons-th/src/Data/Singletons/TH/Util.hs @@ -613,8 +613,7 @@ orIfEmpty x _ = x -- build a pattern match over several expressions, each with only one pattern multiCase :: [DExp] -> [DPat] -> DExp -> DExp multiCase [] [] body = body -multiCase scruts pats body = - DCaseE (mkTupleDExp scruts) [DMatch (mkTupleDPat pats) body] +multiCase scruts pats body = dCasesE scruts [DClause pats body] -- a monad transformer for writing a monoid alongside returning a Q newtype QWithAux m q a = QWA { runQWA :: WriterT m q a }