diff --git a/CHANGES.md b/CHANGES.md
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,6 +1,163 @@
 Changelog for singletons project
 ================================
 
+2.6
+---
+* Require GHC 8.8.
+* `Sing` has switched from a data family to a type family. This has a number of
+  consequences:
+  * Names like `SBool`, `SMaybe`, etc. are no longer type synonyms for
+    particular instantiations of `Sing` but are instead the names of the
+    singleton data types themselves. In other words, previous versions of
+    `singletons` would provide this:
+
+    ```haskell
+    data instance Sing :: Bool -> Type where
+      SFalse :: Sing False
+      STrue  :: Sing True
+    type SBool = (Sing :: Bool -> Type)
+    ```
+
+    Whereas with `Sing`-as-a-type-family, `singletons` now provides this:
+
+    ```haskell
+    data SBool :: Bool -> Type where
+      SFalse :: SBool False
+      STrue  :: SBool True
+    type instance Sing @Bool = SBool
+    ```
+  * The `Sing` instance for `TYPE rep` in `Data.Singletons.TypeRepTYPE` is now
+    directly defined as `type instance Sing @(TYPE rep) = TypeRep`, without the
+    use of an intermediate newtype as before.
+  * Due to limitations in the ways that quantified constraints and type
+    families can interact
+    (see [this GHC issue](https://gitlab.haskell.org/ghc/ghc/issues/14860)),
+    the internals of `ShowSing` has to be tweaked in order to continue to
+    work with `Sing`-as-a-type-family. One notable consequence of this is
+    that `Show` instances for singleton types can no longer be derived—they
+    must be written by hand in order to work around
+    [this GHC bug](https://gitlab.haskell.org/ghc/ghc/issues/16365).
+    This is unlikely to affect you unless you define 'Show' instances for
+    singleton types by hand. For more information, refer to the Haddocks for
+    `ShowSing'` in `Data.Singletons.ShowSing`.
+  * GHC does not permit type class instances to mention type families, which
+    means that it is no longer possible to define instances that mention the
+    `Sing` type constructor. For this reason, a `WrappedSing` data type (which
+    is a newtype around `Sing`) was introduced so that one can hang instances
+    off of it.
+
+    This had one noticeable effect in `singletons`
+    itself: there are no longer `TestEquality Sing` or `TestCoercion Sing`
+    instances. Instead, `singletons` now generates a separate
+    `TestEquality`/`TestCoercion` instance for every data type that singles a
+    derived `Eq` instance. In addition, the `Data.Singletons.Decide` module
+    now provides top-level `decideEquality`/`decideCoercion` functions which
+    provide the behavior of `testEquality`/`testCoercion`, but monomorphized
+    to `Sing`. Finally, `TestEquality`/`TestCoercion` instances are provided
+    for `WrappedSing`.
+* GHC's behavior surrounding kind inference for local definitions has changed
+  in 8.8, and certain code that `singletons` generates for local definitions
+  may no longer typecheck as a result. While we have taken measures to mitigate
+  the issue on `singletons`' end, there still exists code that must be patched
+  on the users' end in order to continue compiling. For instance, here is an
+  example of code that stopped compiling with the switch to GHC 8.8:
+
+  ```haskell
+  replicateM_ :: (Applicative m) => Nat -> m a -> m ()
+  replicateM_ cnt0 f =
+      loop cnt0
+    where
+      loop cnt
+          | cnt <= 0  = pure ()
+          | otherwise = f *> loop (cnt - 1)
+  ```
+
+  This produces errors to the effect of:
+
+  ```
+  • Could not deduce (SNum k1) arising from a use of ‘sFromInteger’
+    from the context: SApplicative m
+    ...
+
+  • Could not deduce (SOrd k1) arising from a use of ‘%<=’
+    from the context: SApplicative m
+    ...
+  ```
+
+  The issue is that GHC 8.8 now kind-generalizes `sLoop` (whereas it did not
+  previously), explaining why the error message mentions a mysterious kind
+  variable `k1` that only appeared after kind generalization. The solution is
+  to give `loop` an explicit type signature like so:
+
+  ```diff
+  -replicateM_       :: (Applicative m) => Nat -> m a -> m ()
+  +replicateM_       :: forall m a. (Applicative m) => Nat -> m a -> m ()
+   replicateM_ cnt0 f =
+       loop cnt0
+     where
+  +    loop :: Nat -> m ()
+       loop cnt
+           | cnt <= 0  = pure ()
+           | otherwise = f *> loop (cnt - 1)
+  ```
+
+  This general approach should be sufficient to fix any type inference
+  regressions that were introduced between GHC 8.6 and 8.8. If this isn't the
+  case, please file an issue.
+* Due to [GHC Trac #16133](https://ghc.haskell.org/trac/ghc/ticket/16133) being
+  fixed, `singletons`-generated code now requires explicitly enabling the
+  `TypeApplications` extension. (The generated code was always using
+  `TypeApplications` under the hood, but it's only now that GHC is detecting
+  it.)
+* `Data.Singletons` now defines a family of `SingI` instances for `TyCon1`
+  through `TyCon8`:
+
+  ```haskell
+  instance (forall a.    SingI a           => SingI (f a),   ...) => SingI (TyCon1 f)
+  instance (forall a b. (SingI a, SingI b) => SingI (f a b), ...) => SingI (TyCon2 f)
+  ...
+  ```
+
+  As a result, `singletons` no longer generates instances for `SingI` instances
+  for applications of `TyCon{N}` to particular type constructors, as they have
+  been superseded by the instances above.
+* Changes to `Data.Singletons.Sigma`:
+  * `SSigma`, the singleton type for `Sigma`, is now defined.
+  * New functions `fstSigma`, `sndSigma`, `FstSigma`, `SndSigma`, `currySigma`,
+    and `uncurrySigma` have been added. A `Show` instance for `Sigma` has also
+    been added.
+  * `projSigma1` has been redefined to use continuation-passing style to more
+    closely resemble its cousin `projSigma2`. The new type signature of
+    `projSigma1` is:
+
+    ```hs
+    projSigma1 :: (forall (fst :: s). Sing fst -> r) -> Sigma s t -> r
+    ```
+
+    The old type signature of `projSigma1` can be found in the `fstSigma`
+    function.
+  * `Σ` has been redefined such that it is now a partial application of
+    `Sigma`, like so:
+
+    ```haskell
+    type Σ = Sigma
+    ```
+
+    One benefit of this change is that one no longer needs defunctionalization
+    symbols in order to partially apply `Σ`. As a result, `ΣSym0`, `ΣSym1`,
+    and `ΣSym2` have been removed.
+* In line with corresponding changes in `base-4.13`, the `Fail`/`sFail` methods
+  of `{P,S}Monad` have been removed in favor of new `{P,S}MonadFail` classes
+  introduced in the `Data.Singletons.Prelude.Monad.Fail` module. These classes
+  are also re-exported from `Data.Singletons.Prelude`.
+* Fix a bug where expressions with explicit signatures involving function types
+  would fail to single.
+* The infix names `(.)` and `(!)` are no longer mapped to `(:.)` and `(:!)`,
+  as GHC 8.8 learned to parse them at the type level.
+* The `Enum` instance for `SomeSing` now uses more efficient implementations of
+  `enumFromTo` and `enumFromThenTo` that no longer require a `SingKind`
+  constraint.
+
 2.5.1
 -----
 * `ShowSing` is now a type class (with a single instance) instead of a type
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-singletons 2.5.1
-================
+singletons 2.6
+==============
 
 [![Hackage](https://img.shields.io/hackage/v/singletons.svg)](http://hackage.haskell.org/package/singletons)
 [![Build Status](https://travis-ci.org/goldfirere/singletons.svg?branch=master)](https://travis-ci.org/goldfirere/singletons)
@@ -40,7 +40,7 @@
 Compatibility
 -------------
 
-The singletons library requires GHC 8.6.1 or greater. Any code that uses the
+The singletons library requires GHC 8.8.1 or greater. Any code that uses the
 singleton generation primitives needs to enable a long list of GHC
 extensions. This list includes, but is not necessarily limited to, the
 following:
@@ -58,8 +58,8 @@
 * `PolyKinds`
 * `RankNTypes`
 * `ScopedTypeVariables`
-* `StandaloneDeriving`
 * `TemplateHaskell`
+* `TypeApplications`
 * `TypeFamilies`
 * `TypeOperators`
 * `UndecidableInstances`
@@ -151,10 +151,10 @@
 definitions. Many of the definitions were developed in tandem with Iavor Diatchki.
 
 ```haskell
-data family Sing (a :: k)
+type family Sing :: k -> Type
 ```
 
-The data family of singleton types. A new instance of this data family is
+The type family of singleton types. A new instance of this type family is
 generated for every new singleton type.
 
 ```haskell
@@ -221,9 +221,10 @@
 while propositional equality has the advantage that GHC can use the equality
 of types during type inference.
 
-Instances of both `SEq` and `SDecide` are generated when `singletons` is called
-on a datatype that has `deriving Eq`. You can also generate these instances
-directly through functions exported from `Data.Singletons.TH`.
+Instances of `SEq`, `SDecide`, `TestEquality`, and `TestCoercion` are generated
+when `singletons` is called on a datatype that has `deriving Eq`. You can also
+generate these instances directly through functions exported from
+`Data.Singletons.TH`.
 
 
 `Show` classes
@@ -534,27 +535,7 @@
    All tuples (including the 0-tuple, unit) are treated similarly.
 
 
-6. original value: `(.)`
-
-   promoted type\*: `(:.)`
-
-   singleton value: `(%.)`
-
-   symbols: `(.@#@$)`, `(.@#@$$)`, `(.@#@$$$)`
-
-   The promoted type is special because GHC can't parse a type named `(.)`.
-
-7. original value: `(!)`
-
-   promoted type\*: `(:!)`
-
-   singleton value: `(%!)`
-
-   symbols: `(!@#@$)`, `(!@#@$$)`, `(!@#@$$$)`
-
-   The promoted type is special because GHC can't parse a type named `(!)`.
-
-8. original value: `___foo`
+6. original value: `___foo`
 
    promoted type\*: `US___foo` ("`US`" stands for "underscore")
 
@@ -711,8 +692,8 @@
 
 The built-in Haskell promotion mechanism does not yet have a full story around
 the kind `*` (the kind of types that have values). Ideally, promoting some form
-of `TypeRep` would yield `*`, but the implementation of TypeRep would have to be
-updated for this to really work out. In the meantime, users who wish to
+of `TypeRep` would yield `*`, but the implementation of `TypeRep` would have to
+be updated for this to really work out. In the meantime, users who wish to
 experiment with this feature have two options:
 
 1) The module `Data.Singletons.TypeRepTYPE` has all the definitions possible for
@@ -720,14 +701,12 @@
 The singleton associated with `TypeRep` has one constructor:
 
     ```haskell
-    newtype instance Sing :: forall (rep :: RuntimeRep). TYPE rep -> Type where
-      STypeRep :: forall (rep :: RuntimeRep) (a :: TYPE rep). TypeRep a -> Sing a
+    type instance Sing @(TYPE rep) = TypeRep
     ```
 
-   (Recall that `type * = TYPE LiftedRep`.) Thus, a `TypeRep` is stored in the
-singleton constructor. However, any datatypes that store `TypeRep`s will not
-generally work as expected; the built-in promotion mechanism will not promote
-`TypeRep` to `*`.
+    (Recall that `type * = TYPE LiftedRep`.) Note that any datatypes that store
+`TypeRep`s will not generally work as expected; the built-in promotion
+mechanism will not promote `TypeRep` to `*`.
 
 2) The module `Data.Singletons.CustomStar` allows the programmer to define a subset
 of types with which to work. See the Haddock documentation for the function
diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -47,7 +47,7 @@
                 | otherwise           = distPref
       -- Package DBs
       dbStack = withPackageDB lbi ++ [ SpecificPackageDB $ distPref' </> "package.conf.inplace" ]
-      dbFlags = "-hide-all-packages" : packageDbArgsDb dbStack
+      dbFlags = "-hide-all-packages" : "-package-env=-" : packageDbArgsDb dbStack
 
       ghc = case lookupProgram ghcProgram (withPrograms lbi) of
               Just fp -> locationPath $ programLocation fp
diff --git a/singletons.cabal b/singletons.cabal
--- a/singletons.cabal
+++ b/singletons.cabal
@@ -1,5 +1,5 @@
 name:           singletons
-version:        2.5.1
+version:        2.6
                 -- Remember to bump version in the Makefile as well
 cabal-version:  >= 1.10
 synopsis:       A framework for generating singleton types
@@ -9,17 +9,17 @@
 maintainer:     Ryan Scott <ryan.gl.scott@gmail.com>
 bug-reports:    https://github.com/goldfirere/singletons/issues
 stability:      experimental
-tested-with:    GHC == 8.6.2
+tested-with:    GHC == 8.8.1
 extra-source-files: README.md, CHANGES.md,
                     tests/compile-and-dump/buildGoldenFiles.awk,
                     tests/compile-and-dump/GradingClient/*.hs,
                     tests/compile-and-dump/InsertionSort/*.hs,
                     tests/compile-and-dump/Promote/*.hs,
                     tests/compile-and-dump/Singletons/*.hs
-                    tests/compile-and-dump/GradingClient/*.ghc86.template,
-                    tests/compile-and-dump/InsertionSort/*.ghc86.template,
-                    tests/compile-and-dump/Promote/*.ghc86.template,
-                    tests/compile-and-dump/Singletons/*.ghc86.template
+                    tests/compile-and-dump/GradingClient/*.ghc88.template,
+                    tests/compile-and-dump/InsertionSort/*.ghc88.template,
+                    tests/compile-and-dump/Promote/*.ghc88.template,
+                    tests/compile-and-dump/Singletons/*.ghc88.template
 license:        BSD3
 license-file:   LICENSE
 build-type:     Custom
@@ -38,7 +38,7 @@
 source-repository this
   type:     git
   location: https://github.com/goldfirere/singletons.git
-  tag:      v2.5.1
+  tag:      v2.6
 
 source-repository head
   type:     git
@@ -47,19 +47,19 @@
 
 custom-setup
   setup-depends:
-    base      >= 4.12 && < 4.13,
-    Cabal     >= 2.3 && < 2.5,
+    base      >= 4.13 && < 4.14,
+    Cabal     >= 2.5 && < 3.1,
     directory >= 1,
     filepath  >= 1.3
 
 library
   hs-source-dirs:     src
-  build-depends:      base >= 4.12 && < 4.13,
+  build-depends:      base >= 4.13 && < 4.14,
                       mtl >= 2.2.1,
                       ghc-boot-th,
                       template-haskell,
                       containers >= 0.5,
-                      th-desugar >= 1.9 && < 1.10,
+                      th-desugar >= 1.10 && < 1.11,
                       pretty,
                       syb >= 0.4,
                       text >= 1.2,
@@ -91,6 +91,7 @@
                       Data.Singletons.Prelude.List.NonEmpty
                       Data.Singletons.Prelude.Maybe
                       Data.Singletons.Prelude.Monad
+                      Data.Singletons.Prelude.Monad.Fail
                       Data.Singletons.Prelude.Monad.Zip
                       Data.Singletons.Prelude.Monoid
                       Data.Singletons.Prelude.Num
@@ -139,21 +140,23 @@
                       Data.Singletons.TypeLits.Internal
                       Data.Singletons.Syntax
 
-  ghc-options:        -Wall -Wno-redundant-constraints
+  ghc-options:        -Wall -Wcompat -Wno-redundant-constraints
 
 test-suite singletons-test-suite
   type:               exitcode-stdio-1.0
   hs-source-dirs:     tests
-  ghc-options:        -Wall
+  ghc-options:        -Wall -Wcompat -threaded -with-rtsopts=-maxN16
   default-language:   Haskell2010
   main-is:            SingletonsTestSuite.hs
   other-modules:      ByHand
                       ByHand2
                       SingletonsTestSuiteUtils
 
-  build-depends:      base >= 4.12 && < 4.13,
+  build-depends:      base >= 4.13 && < 4.14,
                       filepath >= 1.3,
                       process >= 1.1,
+                      turtle >= 1.5,
+                      text >= 1.2,
                       singletons,
-                      tasty >= 0.6,
+                      tasty >= 1.2,
                       tasty-golden >= 2.2
diff --git a/src/Data/Singletons.hs b/src/Data/Singletons.hs
--- a/src/Data/Singletons.hs
+++ b/src/Data/Singletons.hs
@@ -1,12 +1,16 @@
 {-# LANGUAGE ConstraintKinds #-}
 {-# LANGUAGE DataKinds #-}
 {-# LANGUAGE ExplicitNamespaces #-}
+{-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE GADTs #-}
 {-# LANGUAGE MagicHash #-}
 {-# LANGUAGE PatternSynonyms #-}
 {-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE QuantifiedConstraints #-}
+{-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
@@ -35,7 +39,7 @@
 module Data.Singletons (
   -- * Main singleton definitions
 
-  Sing(SLambda, applySing), (@@),
+  Sing, SLambda(..), (@@),
 
   SingI(..), SingKind(..),
 
@@ -49,6 +53,10 @@
   singByProxy#,
   withSing, singThat,
 
+  -- ** @WrappedSing@
+  WrappedSing(..), SWrappedSing(..), UnwrapSing,
+  -- $SingletonsOfSingletons
+
   -- ** Defunctionalization
   TyFun, type (~>),
   TyCon1, TyCon2, TyCon3, TyCon4, TyCon5, TyCon6, TyCon7, TyCon8,
@@ -85,6 +93,7 @@
 import Data.Singletons.Internal
 import Data.Singletons.Prelude.Enum
 import Data.Singletons.Prelude.Eq
+import Data.Singletons.Prelude.Instances
 import Data.Singletons.Prelude.IsString
 import Data.Singletons.Prelude.Monoid
 import Data.Singletons.Prelude.Num
@@ -92,10 +101,24 @@
 import Data.Singletons.Prelude.Semigroup
 import Data.Singletons.Promote
 import Data.Singletons.ShowSing
+import Data.Singletons.Single (singITyConInstances)
 import Data.String
 import qualified Data.Text as T (pack)
 
 ----------------------------------------------------------------------
+---- SingI TyCon{N} instances ----------------------------------------
+----------------------------------------------------------------------
+
+{-
+Generates SingI instances for TyCon1 through TyCon8:
+
+  instance (forall a.    SingI a           => SingI (f a),   ...) => SingI (TyCon1 f)
+  instance (forall a b. (SingI a, SingI b) => SingI (f a b), ...) => SingI (TyCon2 f)
+  ...
+-}
+$(singITyConInstances [1..8])
+
+----------------------------------------------------------------------
 ---- SomeSing instances ----------------------------------------------
 ----------------------------------------------------------------------
 
@@ -114,16 +137,22 @@
   minBound = SomeSing sMinBound
   maxBound = SomeSing sMaxBound
 
-instance (SEnum k, SingKind k) => Enum (SomeSing k) where
+instance SEnum k => Enum (SomeSing k) where
   succ (SomeSing a) = SomeSing (sSucc a)
   pred (SomeSing a) = SomeSing (sPred a)
   toEnum n = withSomeSing (fromIntegral n) (SomeSing . sToEnum)
   fromEnum (SomeSing a) = fromIntegral (fromSing (sFromEnum a))
   enumFromTo (SomeSing from) (SomeSing to) =
-    map toSing (fromSing (sEnumFromTo from to))
+    listFromSingShallow (sEnumFromTo from to)
   enumFromThenTo (SomeSing from) (SomeSing then_) (SomeSing to) =
-    map toSing (fromSing (sEnumFromThenTo from then_ to))
+    listFromSingShallow (sEnumFromThenTo from then_ to)
 
+-- Like the 'fromSing' implementation for lists, but bottoms out at
+-- 'SomeSing' instead of recursively invoking 'fromSing'.
+listFromSingShallow :: SList (x :: [a]) -> [SomeSing a]
+listFromSingShallow SNil         = []
+listFromSingShallow (SCons x xs) = SomeSing x : listFromSingShallow xs
+
 instance SNum k => Num (SomeSing k) where
   SomeSing a + SomeSing b = SomeSing (a %+ b)
   SomeSing a - SomeSing b = SomeSing (a %- b)
@@ -133,7 +162,10 @@
   signum (SomeSing a) = SomeSing (sSignum a)
   fromInteger n = withSomeSing (fromIntegral n) (SomeSing . sFromInteger)
 
-deriving instance ShowSing k => Show (SomeSing k)
+instance ShowSing k => Show (SomeSing k) where
+  showsPrec p (SomeSing (s :: Sing a)) =
+    showParen (p > 10) $ showString "SomeSing " . showsPrec 11 s
+      :: ShowSing' a => ShowS
 
 instance SSemigroup k => Semigroup (SomeSing k) where
   SomeSing a <> SomeSing b = SomeSing (a %<> b)
@@ -149,7 +181,76 @@
 ----------------------------------------------------------------------
 
 $(genDefunSymbols [''Demote, ''SameKind, ''KindOf, ''(~>), ''Apply, ''(@@)])
--- SingFunction1 et al. are not defunctionalizable at the moment due to #198
+-- WrapSing, UnwrapSing, and SingFunction1 et al. are not defunctionalizable
+-- at the moment due to Trac #9269
+
+{- $SingletonsOfSingletons
+
+Aside from being a data type to hang instances off of, 'WrappedSing' has
+another purpose as a general-purpose mechanism for allowing one to write
+code that uses singletons of other singletons. For instance, suppose you
+had the following data type:
+
+@
+data T :: Type -> Type where
+  MkT :: forall a (x :: a). 'Sing' x -> F a -> T a
+@
+
+A naïve attempt at defining a singleton for @T@ would look something like
+this:
+
+@
+data ST :: forall a. T a -> Type where
+  SMkT :: forall a (x :: a) (sx :: 'Sing' x) (f :: F a).
+          'Sing' sx -> 'Sing' f -> ST (MkT sx f)
+@
+
+But there is a problem here: what exactly /is/ @'Sing' sx@? If @x@ were 'True',
+for instance, then @sx@ would be 'STrue', but it's not clear what
+@'Sing' 'STrue'@ should be. One could define @SSBool@ to be the singleton of
+'SBool's, but in order to be thorough, one would have to generate a singleton
+for /every/ singleton type out there. Plus, it's not clear when to stop. Should
+we also generate @SSSBool@, @SSSSBool@, etc.?
+
+Instead, 'WrappedSing' and its singleton 'SWrappedSing' provide a way to talk
+about singletons of other arbitrary singletons without the need to generate a
+bazillion instances. For reference, here is the definition of 'SWrappedSing':
+
+@
+newtype 'SWrappedSing' :: forall k (a :: k). 'WrappedSing' a -> Type where
+  'SWrapSing' :: forall k (a :: k) (ws :: 'WrappedSing' a).
+                 { 'sUnwrapSing' :: 'Sing' a } -> 'SWrappedSing' ws
+type instance 'Sing' \@('WrappedSing' a) = 'SWrappedSing'
+@
+
+'SWrappedSing' is a bit of an unusual singleton in that its field is a
+singleton for @'Sing' \@k@, not @'WrappedSing' \@k@. But that's exactly the
+point—a singleton of a singleton contains as much type information as the
+underlying singleton itself, so we can get away with just @'Sing' \@k@.
+
+As an example of this in action, here is how you would define the singleton
+for the earlier @T@ type:
+
+@
+data ST :: forall a. T a -> Type where
+  SMkT :: forall a (x :: a) (sx :: 'Sing' x) (f :: F a).
+          'Sing' ('WrapSing' sx) -> 'Sing' f -> ST (MkT sx f)
+@
+
+With this technique, we won't need anything like @SSBool@ in order to
+instantiate @x@ with 'True'. Instead, the field of type
+@'Sing' ('WrapSing' sx)@ will simply be a newtype around 'SBool'. In general,
+you'll need /n/ layers of 'WrapSing' if you wish to single a singleton /n/
+times.
+
+Note that this is not the only possible way to define a singleton for @T@.
+An alternative approach that does not make use of singletons-of-singletons is
+discussed at some length
+<https://github.com/goldfirere/singletons/issues/366#issuecomment-489469086 here>.
+Due to the technical limitations of this approach, however, we do not use it
+in @singletons@ at the moment, instead favoring the
+slightly-clunkier-but-more-reliable 'WrappedSing' approach.
+-}
 
 {- $SLambdaPatternSynonyms
 
diff --git a/src/Data/Singletons/CustomStar.hs b/src/Data/Singletons/CustomStar.hs
--- a/src/Data/Singletons/CustomStar.hs
+++ b/src/Data/Singletons/CustomStar.hs
@@ -60,10 +60,11 @@
 -- and its singleton. However, because @Rep@ is promoted to @*@, the singleton
 -- is perhaps slightly unexpected:
 --
--- > data instance Sing (a :: *) where
+-- > data SRep (a :: *) where
 -- >   SNat :: Sing Nat
 -- >   SBool :: Sing Bool
 -- >   SMaybe :: Sing a -> Sing (Maybe a)
+-- > type instance Sing = SRep
 --
 -- The unexpected part is that @Nat@, @Bool@, and @Maybe@ above are the real @Nat@,
 -- @Bool@, and @Maybe@, not just promoted data constructors.
@@ -76,7 +77,7 @@
   kinds <- mapM getKind names
   ctors <- zipWithM (mkCtor True) names kinds
   let repDecl = DDataD Data [] repName [] (Just (DConT typeKindName)) ctors
-                         [DDerivClause Nothing (map DConPr [''Eq, ''Ord, ''Read, ''Show])]
+                         [DDerivClause Nothing (map DConT [''Eq, ''Ord, ''Read, ''Show])]
   fakeCtors <- zipWithM (mkCtor False) names kinds
   let dataDecl = DataDecl repName [] fakeCtors
   -- Why do we need withLocalDeclarations here? It's because we end up
@@ -86,10 +87,10 @@
   withLocalDeclarations (decToTH repDecl) $ do
     -- We opt to infer the constraints for the Eq instance here so that when it's
     -- promoted, Rep will be promoted to Type.
-    dataDeclEqCxt <- inferConstraints (DConPr ''Eq) (DConT repName) fakeCtors
-    let dataDeclEqInst = DerivedDecl (Just dataDeclEqCxt) (DConT repName) dataDecl
+    dataDeclEqCxt <- inferConstraints (DConT ''Eq) (DConT repName) fakeCtors
+    let dataDeclEqInst = DerivedDecl (Just dataDeclEqCxt) (DConT repName) repName dataDecl
     ordInst  <- mkOrdInstance Nothing (DConT repName) dataDecl
-    showInst <- mkShowInstance Nothing (DConT repName) dataDecl
+    showInst <- mkShowInstance ForPromotion Nothing (DConT repName) dataDecl
     (pInsts, promDecls) <- promoteM [] $ do promoteDataDec dataDecl
                                             promoteDerivedEqDec dataDeclEqInst
                                             traverse (promoteInstanceDec mempty)
@@ -131,21 +132,24 @@
               noBang = Bang NoSourceUnpackedness NoSourceStrictness
 
         -- demote a kind back to a type, accumulating any unbound parameters
-        kindToType :: DsMonad q => [DType] -> DKind -> QWithAux [Name] q DType
+        kindToType :: DsMonad q => [DTypeArg] -> DKind -> QWithAux [Name] q DType
         kindToType _    (DForallT _ _ _) = fail "Explicit forall encountered in kind"
         kindToType args (DAppT f a) = do
           a' <- kindToType [] a
-          kindToType (a' : args) f
+          kindToType (DTANormal a' : args) f
+        kindToType args (DAppKindT f a) = do
+          a' <- kindToType [] a
+          kindToType (DTyArg a' : args) f
         kindToType args (DSigT t k) = do
           t' <- kindToType [] t
           k' <- kindToType [] k
-          return $ DSigT t' k' `foldType` args
+          return $ DSigT t' k' `applyDType` args
         kindToType args (DVarT n) = do
           addElement n
-          return $ DVarT n `foldType` args
-        kindToType args (DConT n)    = return $ DConT name    `foldType` args
+          return $ DVarT n `applyDType` args
+        kindToType args (DConT n)    = return $ DConT name `applyDType` args
           where name | isTypeKindName n = repName
                      | otherwise        = n
-        kindToType args DArrowT      = return $ DArrowT       `foldType` args
-        kindToType args k@(DLitT {}) = return $ k             `foldType` args
-        kindToType args DWildCardT   = return $ DWildCardT    `foldType` args
+        kindToType args DArrowT      = return $ DArrowT    `applyDType` args
+        kindToType args k@(DLitT {}) = return $ k          `applyDType` args
+        kindToType args DWildCardT   = return $ DWildCardT `applyDType` args
diff --git a/src/Data/Singletons/Decide.hs b/src/Data/Singletons/Decide.hs
--- a/src/Data/Singletons/Decide.hs
+++ b/src/Data/Singletons/Decide.hs
@@ -1,5 +1,6 @@
 {-# LANGUAGE RankNTypes, PolyKinds, DataKinds, TypeOperators,
-             TypeFamilies, FlexibleContexts, UndecidableInstances, GADTs #-}
+             TypeFamilies, FlexibleContexts, UndecidableInstances,
+             GADTs, TypeApplications #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
 
 -----------------------------------------------------------------------------
@@ -20,10 +21,10 @@
   SDecide(..),
 
   -- * Supporting definitions
-  (:~:)(..), Void, Refuted, Decision(..)
+  (:~:)(..), Void, Refuted, Decision(..),
+  decideEquality, decideCoercion
   ) where
 
-import Data.Kind (Type)
 import Data.Singletons.Internal
 import Data.Type.Coercion
 import Data.Type.Equality
@@ -51,14 +52,26 @@
   (%~) :: forall (a :: k) (b :: k). Sing a -> Sing b -> Decision (a :~: b)
   infix 4 %~
 
-instance SDecide k => TestEquality (Sing :: k -> Type) where
-  testEquality a b =
-    case a %~ b of
-      Proved Refl -> Just Refl
-      Disproved _ -> Nothing
+-- | A suitable default implementation for 'testEquality' that leverages
+-- 'SDecide'.
+decideEquality :: forall k (a :: k) (b :: k). SDecide k
+               => Sing a -> Sing b -> Maybe (a :~: b)
+decideEquality a b =
+  case a %~ b of
+    Proved Refl -> Just Refl
+    Disproved _ -> Nothing
 
-instance SDecide k => TestCoercion (Sing :: k -> Type) where
-  testCoercion a b =
-    case a %~ b of
-      Proved Refl -> Just Coercion
-      Disproved _ -> Nothing
+instance SDecide k => TestEquality (WrappedSing @k) where
+  testEquality (WrapSing s1) (WrapSing s2) = decideEquality s1 s2
+
+-- | A suitable default implementation for 'testCoercion' that leverages
+-- 'SDecide'.
+decideCoercion :: forall k (a :: k) (b :: k). SDecide k
+               => Sing a -> Sing b -> Maybe (Coercion a b)
+decideCoercion a b =
+  case a %~ b of
+    Proved Refl -> Just Coercion
+    Disproved _ -> Nothing
+
+instance SDecide k => TestCoercion (WrappedSing @k) where
+  testCoercion (WrapSing s1) (WrapSing s2) = decideCoercion s1 s2
diff --git a/src/Data/Singletons/Deriving/Bounded.hs b/src/Data/Singletons/Deriving/Bounded.hs
--- a/src/Data/Singletons/Deriving/Bounded.hs
+++ b/src/Data/Singletons/Deriving/Bounded.hs
@@ -50,7 +50,7 @@
           in (minEqnRHS, maxEqnRHS)
 
       mk_rhs rhs = UFunction [DClause [] rhs]
-  constraints <- inferConstraintsDef mb_ctxt (DConPr boundedName) ty cons
+  constraints <- inferConstraintsDef mb_ctxt (DConT boundedName) ty cons
   return $ InstDecl { id_cxt = constraints
                     , id_name = boundedName
                     , id_arg_tys = [ty]
diff --git a/src/Data/Singletons/Deriving/Enum.hs b/src/Data/Singletons/Deriving/Enum.hs
--- a/src/Data/Singletons/Deriving/Enum.hs
+++ b/src/Data/Singletons/Deriving/Enum.hs
@@ -33,15 +33,15 @@
               non_vanilla || not (null $ tysOfConFields f)) cons) $
     fail ("Can't derive Enum instance for " ++ pprint (typeToTH ty) ++ ".")
   n <- qNewName "n"
-  let to_enum = UFunction [DClause [DVarPa n] (to_enum_rhs cons [0..])]
+  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))
-          [ DMatch (DConPa trueName []) (DConE name)
-          , DMatch (DConPa falseName []) (to_enum_rhs rest nums) ]
+          [ 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"
 
-      from_enum = UFunction (zipWith (\i con -> DClause [DConPa (extractName con) []]
+      from_enum = UFunction (zipWith (\i con -> DClause [DConP (extractName con) []]
                                                         (DLitE (IntegerL i)))
                                      [0..] cons)
   return (InstDecl { id_cxt     = fromMaybe [] mb_ctxt
diff --git a/src/Data/Singletons/Deriving/Foldable.hs b/src/Data/Singletons/Deriving/Foldable.hs
--- a/src/Data/Singletons/Deriving/Foldable.hs
+++ b/src/Data/Singletons/Deriving/Foldable.hs
@@ -69,17 +69,17 @@
       mk_foldMap_clause :: DCon -> q DClause
       mk_foldMap_clause con = do
         parts <- foldDataConArgs ft_foldMap con
-        clause_for_foldMap [DVarPa f] con =<< sequence parts
+        clause_for_foldMap [DVarP f] con =<< sequence parts
 
       mk_foldr_clause :: DCon -> q DClause
       mk_foldr_clause con = do
         parts <- foldDataConArgs ft_foldr con
-        clause_for_foldr [DVarPa f, DVarPa z] con =<< sequence parts
+        clause_for_foldr [DVarP f, DVarP z] con =<< sequence parts
 
       mk_foldMap :: q [DClause]
       mk_foldMap =
         case cons of
-          [] -> pure [DClause [DWildPa, DWildPa] (DVarE memptyName)]
+          [] -> pure [DClause [DWildP, DWildP] (DVarE memptyName)]
           _  -> traverse mk_foldMap_clause cons
 
       mk_foldr :: q [DClause]
@@ -91,7 +91,7 @@
               : case cons of
                   [] -> []
                   _  -> [(foldrName, UFunction foldr_clauses)]
-  constraints <- inferConstraintsDef mb_ctxt (DConPr foldableName) ty cons
+  constraints <- inferConstraintsDef mb_ctxt (DConT foldableName) ty cons
   return $ InstDecl { id_cxt = constraints
                     , id_name = foldableName
                     , id_arg_tys = [ty]
diff --git a/src/Data/Singletons/Deriving/Functor.hs b/src/Data/Singletons/Deriving/Functor.hs
--- a/src/Data/Singletons/Deriving/Functor.hs
+++ b/src/Data/Singletons/Deriving/Functor.hs
@@ -61,28 +61,28 @@
       mk_fmap_clause :: DCon -> q DClause
       mk_fmap_clause con = do
         parts <- foldDataConArgs ft_fmap con
-        clause_for_con [DVarPa f] con =<< sequence parts
+        clause_for_con [DVarP f] con =<< sequence parts
 
       mk_replace_clause :: DCon -> q DClause
       mk_replace_clause con = do
         parts <- foldDataConArgs ft_replace con
-        clause_for_con [DVarPa z] con =<< traverse (fmap replace) parts
+        clause_for_con [DVarP z] con =<< traverse (fmap replace) parts
 
       mk_fmap :: q [DClause]
       mk_fmap = case cons of
                   [] -> do v <- newUniqueName "v"
-                           pure [DClause [DWildPa, DVarPa 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 [DWildPa, DVarPa v] (DCaseE (DVarE v) [])]
+                              pure [DClause [DWildP, DVarP v] (DCaseE (DVarE v) [])]
                      _  -> traverse mk_replace_clause cons
 
   fmap_clauses    <- mk_fmap
   replace_clauses <- mk_replace
-  constraints <- inferConstraintsDef mb_ctxt (DConPr functorName) ty cons
+  constraints <- inferConstraintsDef mb_ctxt (DConT functorName) ty cons
   return $ InstDecl { id_cxt = constraints
                     , id_name = functorName
                     , id_arg_tys = [ty]
diff --git a/src/Data/Singletons/Deriving/Infer.hs b/src/Data/Singletons/Deriving/Infer.hs
--- a/src/Data/Singletons/Deriving/Infer.hs
+++ b/src/Data/Singletons/Deriving/Infer.hs
@@ -20,8 +20,6 @@
 import Data.Singletons.Deriving.Util
 import Data.Singletons.Util
 import Data.List
-import Data.List.NonEmpty (NonEmpty(..))
-import Data.Generics.Twins
 
 -- @inferConstraints cls inst_ty cons@ infers the instance context for a
 -- derived type class instance of @cls@ for @inst_ty@, using the constructors
@@ -63,7 +61,7 @@
 -- For more information on what this means, refer to the documentation for
 -- infer_ct below.
 inferConstraints :: forall q. DsMonad q => DPred -> DType -> [DCon] -> q DCxt
-inferConstraints pr inst_ty = fmap (nubBy geq) . concatMapM infer_ct
+inferConstraints pr inst_ty = fmap nub . concatMapM infer_ct
   where
     -- A thorny situation arises when attempting to infer an instance context
     -- for a GADT. Consider the following example:
@@ -128,7 +126,7 @@
                       Just subst -> traverse (substTy subst) field_tys
       if is_functor_like
          then mk_functor_like_constraints field_tys' res_ty'
-         else pure $ map (pr `DAppPr`) field_tys'
+         else pure $ map (pr `DAppT`) field_tys'
 
     -- If we derive a Functor-like class, e.g.,
     --
@@ -142,15 +140,15 @@
       -- This function is partial. But that's OK, because
       -- functorLikeValidityChecks ensures that this is total by the time
       -- we invoke this.
-      let _ :| res_ty_args     = unfoldType res_ty
-          (_, last_res_ty_arg) = snocView res_ty_args
+      let (_, res_ty_args)     = unfoldDType res_ty
+          (_, last_res_ty_arg) = snocView $ filterDTANormals res_ty_args
           Just last_tv         = getDVarTName_maybe last_res_ty_arg
       deep_subtypes <- concatMapM (deepSubtypesContaining last_tv) fields
-      pure $ map (pr `DAppPr`) deep_subtypes
+      pure $ map (pr `DAppT`) deep_subtypes
 
     is_functor_like :: Bool
     is_functor_like
-      | DConT pr_class_name :| _ <- unfoldType (predToType pr)
+      | (DConT pr_class_name, _) <- unfoldDType pr
       = isFunctorLikeClassName pr_class_name
       | otherwise
       = False
diff --git a/src/Data/Singletons/Deriving/Ord.hs b/src/Data/Singletons/Deriving/Ord.hs
--- a/src/Data/Singletons/Deriving/Ord.hs
+++ b/src/Data/Singletons/Deriving/Ord.hs
@@ -24,7 +24,7 @@
 -- | Make a *non-singleton* Ord instance
 mkOrdInstance :: DsMonad q => DerivDesc q
 mkOrdInstance mb_ctxt ty (DataDecl _ _ cons) = do
-  constraints <- inferConstraintsDef mb_ctxt (DConPr ordName) ty cons
+  constraints <- inferConstraintsDef mb_ctxt (DConT ordName) ty cons
   compare_eq_clauses <- mapM mk_equal_clause cons
   let compare_noneq_clauses = map (uncurry mk_nonequal_clause)
                                   [ (con1, con2)
@@ -45,8 +45,8 @@
   let tys = tysOfConFields fields
   a_names <- mapM (const $ newUniqueName "a") tys
   b_names <- mapM (const $ newUniqueName "b") tys
-  let pat1 = DConPa name (map DVarPa a_names)
-      pat2 = DConPa name (map DVarPa b_names)
+  let pat1 = DConP name (map DVarP a_names)
+      pat2 = DConP name (map DVarP b_names)
   return $ DClause [pat1, pat2] (DVarE foldlName `DAppE`
                                  DVarE thenCmpName `DAppE`
                                  DConE cmpEQName `DAppE`
@@ -63,9 +63,9 @@
                           EQ -> DConE cmpEQName
                           GT -> DConE cmpGTName)
   where
-    pat1 = DConPa name1 (map (const DWildPa) (tysOfConFields fields1))
-    pat2 = DConPa name2 (map (const DWildPa) (tysOfConFields fields2))
+    pat1 = DConP name1 (map (const DWildP) (tysOfConFields fields1))
+    pat2 = DConP name2 (map (const DWildP) (tysOfConFields fields2))
 
 -- A variant of mk_equal_clause tailored to empty datatypes
 mk_empty_clause :: DClause
-mk_empty_clause = DClause [DWildPa, DWildPa] (DConE cmpEQName)
+mk_empty_clause = DClause [DWildP, DWildP] (DConE cmpEQName)
diff --git a/src/Data/Singletons/Deriving/Show.hs b/src/Data/Singletons/Deriving/Show.hs
--- a/src/Data/Singletons/Deriving/Show.hs
+++ b/src/Data/Singletons/Deriving/Show.hs
@@ -13,6 +13,7 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 module Data.Singletons.Deriving.Show (
     mkShowInstance
+  , ShowMode(..)
   , mkShowSingContext
   ) where
 
@@ -27,60 +28,84 @@
 import GHC.Lexeme (startsConSym, startsVarSym)
 import GHC.Show (appPrec, appPrec1)
 
-mkShowInstance :: DsMonad q => DerivDesc q
-mkShowInstance mb_ctxt ty (DataDecl _ _ cons) = do
-  clauses <- mk_showsPrec cons
-  constraints <- inferConstraintsDef mb_ctxt (DConPr showName) ty cons
+mkShowInstance :: DsMonad q => ShowMode -> DerivDesc q
+mkShowInstance mode mb_ctxt ty (DataDecl _ _ cons) = do
+  clauses <- mk_showsPrec mode cons
+  constraints <- inferConstraintsDef (fmap (mkShowSingContext mode) mb_ctxt)
+                                     (DConT (mk_Show_name mode))
+                                     ty cons
+  ty' <- mk_Show_inst_ty mode ty
   return $ InstDecl { id_cxt = constraints
                     , id_name = showName
-                    , id_arg_tys = [ty]
+                    , id_arg_tys = [ty']
                     , id_sigs  = mempty
                     , id_meths = [ (showsPrecName, UFunction clauses) ] }
 
-mk_showsPrec :: DsMonad q => [DCon] -> q [DClause]
-mk_showsPrec cons = do
+mk_showsPrec :: DsMonad q => ShowMode -> [DCon] -> q [DClause]
+mk_showsPrec mode cons = do
     p <- newUniqueName "p" -- The precedence argument (not always used)
     if null cons
        then do v <- newUniqueName "v"
-               pure [DClause [DWildPa, DVarPa v] (DCaseE (DVarE v) [])]
-       else mapM (mk_showsPrec_clause p) cons
+               pure [DClause [DWildP, DVarP v] (DCaseE (DVarE v) [])]
+       else mapM (mk_showsPrec_clause mode p) cons
 
 mk_showsPrec_clause :: forall q. DsMonad q
-                    => Name -> DCon
+                    => ShowMode -> Name -> DCon
                     -> q DClause
-mk_showsPrec_clause p (DCon _ _ con_name con_fields _) = go con_fields
+mk_showsPrec_clause mode p (DCon _ _ con_name con_fields _) = go con_fields
   where
+    con_name' :: Name
+    con_name' = case mode of
+                  ForPromotion  -> con_name
+                  ForShowSing{} -> singDataConName con_name
+
     go :: DConFields -> q DClause
 
     -- No fields: print just the constructor name, with no parentheses
     go (DNormalC _ []) = return $
-      DClause [DWildPa, DConPa con_name []] $
-        DVarE showStringName `DAppE` dStringE (parenInfixConName con_name "")
+      DClause [DWildP, DConP con_name' []] $
+        DVarE showStringName `DAppE` dStringE (parenInfixConName con_name' "")
 
     -- Infix constructors have special Show treatment.
-    go (DNormalC True [_, _]) = do
-      argL <- newUniqueName "argL"
-      argR <- newUniqueName "argR"
-      fi <- fromMaybe defaultFixity <$> reifyFixityWithLocals con_name
-      let con_prec = case fi of Fixity prec _ -> prec
-          op_name  = nameBase con_name
-          infixOpE = DAppE (DVarE showStringName) . dStringE $
-                       if isInfixDataCon op_name
-                          then " "  ++ op_name ++ " "
-                          -- Make sure to handle infix data constructors
-                          -- like (Int `Foo` Int)
-                          else " `" ++ op_name ++ "` "
-      return $ DClause [DVarPa p, DConPa con_name [DVarPa argL, DVarPa argR]] $
-        (DVarE showParenName `DAppE` (DVarE gtName `DAppE` DVarE p
-                                                   `DAppE` dIntegerE con_prec))
-          `DAppE` (DVarE composeName
-                     `DAppE` showsPrecE (con_prec + 1) argL
-                     `DAppE` (DVarE composeName
-                                `DAppE` infixOpE
-                                `DAppE` showsPrecE (con_prec + 1) argR))
+    go (DNormalC True tys@[_, _])
+        -- Although the (:) constructor is infix, its singled counterpart SCons
+        -- is not, which matters if we're deriving a ShowSing instance.
+        -- Unless we remove this special case (see #234), we will simply
+        -- shunt it along as if we were dealing with a prefix constructor.
+      | ForShowSing{} <- mode
+      , con_name == consName
+      = go (DNormalC False tys)
 
+      | otherwise
+      = do argL   <- newUniqueName "argL"
+           argR   <- newUniqueName "argR"
+           argTyL <- newUniqueName "argTyL"
+           argTyR <- newUniqueName "argTyR"
+           fi <- fromMaybe defaultFixity <$> reifyFixityWithLocals con_name'
+           let con_prec = case fi of Fixity prec _ -> prec
+               op_name  = nameBase con_name'
+               infixOpE = DAppE (DVarE showStringName) . dStringE $
+                            if isInfixDataCon op_name
+                               then " "  ++ op_name ++ " "
+                               -- Make sure to handle infix data constructors
+                               -- like (Int `Foo` Int)
+                               else " `" ++ op_name ++ "` "
+           return $ DClause [ DVarP p
+                            , DConP con_name' $
+                              zipWith (mk_Show_arg_pat mode) [argL, argR] [argTyL, argTyR]
+                            ] $
+             mk_Show_rhs_sig mode [argTyL, argTyR] $
+             (DVarE showParenName `DAppE` (DVarE gtName `DAppE` DVarE p
+                                                        `DAppE` dIntegerE con_prec))
+               `DAppE` (DVarE composeName
+                          `DAppE` showsPrecE (con_prec + 1) argL
+                          `DAppE` (DVarE composeName
+                                     `DAppE` infixOpE
+                                     `DAppE` showsPrecE (con_prec + 1) argR))
+
     go (DNormalC _ tys) = do
-      args <- mapM (const $ newUniqueName "arg") tys
+      args   <- mapM (const $ newUniqueName "arg")   tys
+      argTys <- mapM (const $ newUniqueName "argTy") tys
       let show_args     = map (showsPrecE appPrec1) args
           composed_args = foldr1 (\v q -> DVarE composeName
                                            `DAppE` v
@@ -89,9 +114,13 @@
                                                      `DAppE` q)) show_args
           named_args = DVarE composeName
                          `DAppE` (DVarE showStringName
-                                   `DAppE` dStringE (parenInfixConName con_name " "))
+                                   `DAppE` dStringE (parenInfixConName con_name' " "))
                          `DAppE` composed_args
-      return $ DClause [DVarPa p, DConPa con_name $ map DVarPa args] $
+      return $ DClause [ DVarP p
+                       , DConP con_name' $
+                         zipWith (mk_Show_arg_pat mode) args argTys
+                       ] $
+        mk_Show_rhs_sig mode argTys $
         DVarE showParenName
           `DAppE` (DVarE gtName `DAppE` DVarE p `DAppE` dIntegerE appPrec)
           `DAppE` named_args
@@ -101,10 +130,14 @@
     go (DRecC []) = go (DNormalC False [])
 
     go (DRecC tys) = do
-      args <- mapM (const $ newUniqueName "arg") tys
+      args   <- mapM (const $ newUniqueName "arg")   tys
+      argTys <- mapM (const $ newUniqueName "argTy") tys
       let show_args =
             concatMap (\((arg_name, _, _), arg) ->
-                        let arg_nameBase = nameBase arg_name
+                        let arg_name'    = case mode of
+                                             ForPromotion  -> arg_name
+                                             ForShowSing{} -> singValName arg_name
+                            arg_nameBase = nameBase arg_name'
                             infix_rec    = showParen (isSym arg_nameBase)
                                                      (showString arg_nameBase) ""
                         in [ DVarE showStringName `DAppE` dStringE (infix_rec ++ " = ")
@@ -112,16 +145,20 @@
                            , DVarE showCommaSpaceName
                            ])
                       (zip tys args)
-          brace_comma_args =   (DVarE showCharName `DAppE` dCharE '{')
+          brace_comma_args =   (DVarE showCharName `DAppE` dCharE mode '{')
                              : take (length show_args - 1) show_args
           composed_args = foldr (\x y -> DVarE composeName `DAppE` x `DAppE` y)
-                                (DVarE showCharName `DAppE` dCharE '}')
+                                (DVarE showCharName `DAppE` dCharE mode '}')
                                 brace_comma_args
           named_args = DVarE composeName
                          `DAppE` (DVarE showStringName
-                                   `DAppE` dStringE (parenInfixConName con_name " "))
+                                   `DAppE` dStringE (parenInfixConName con_name' " "))
                          `DAppE` composed_args
-      return $ DClause [DVarPa p, DConPa con_name $ map DVarPa args] $
+      return $ DClause [ DVarP p
+                       , DConP con_name' $
+                         zipWith (mk_Show_arg_pat mode) args argTys
+                       ] $
+        mk_Show_rhs_sig mode argTys $
         DVarE showParenName
           `DAppE` (DVarE gtName `DAppE` DVarE p `DAppE` dIntegerE appPrec)
           `DAppE` named_args
@@ -136,9 +173,14 @@
 showsPrecE :: Int -> Name -> DExp
 showsPrecE prec n = DVarE showsPrecName `DAppE` dIntegerE prec `DAppE` DVarE n
 
-dCharE :: Char -> DExp
-dCharE c = DLitE $ StringL [c] -- There aren't type-level characters yet,
-                               -- so fake it with a string
+dCharE :: ShowMode -> Char -> DExp
+dCharE mode = DLitE . to_lit
+  where
+    to_lit :: Char -> Lit
+    to_lit c = case mode of
+                 ForPromotion  -> StringL [c] -- There aren't type-level characters yet,
+                                              -- so fake it with a string
+                 ForShowSing{} -> CharL c
 
 dStringE :: String -> DExp
 dStringE = DLitE . StringL
@@ -150,13 +192,54 @@
 isSym ""      = False
 isSym (c : _) = startsVarSym c || startsConSym c
 
+-----
+-- ShowMode
+-----
+
+-- | Is a 'Show' instance being generated to be promoted/singled, or is it
+-- being generated to create a 'Show' instance for a singleton type?
+data ShowMode = ForPromotion      -- ^ For promotion/singling
+              | ForShowSing Name  -- ^ For a 'Show' instance.
+                                  --   Bundles the 'Name' of the data type.
+
 -- | Turn a context like @('Show' a, 'Show' b)@ into @('ShowSing' a, 'ShowSing' b)@.
--- This is necessary for standalone-derived 'Show' instances for singleton types.
-mkShowSingContext :: DCxt -> DCxt
-mkShowSingContext = map show_to_SingShow
+-- This is necessary for 'Show' instances for singleton types.
+mkShowSingContext :: ShowMode -> DCxt -> DCxt
+mkShowSingContext ForPromotion  = id
+mkShowSingContext ForShowSing{} = map show_to_SingShow
   where
     show_to_SingShow :: DPred -> DPred
-    show_to_SingShow = modifyConNameDPred $ \n ->
+    show_to_SingShow = modifyConNameDType $ \n ->
                          if n == showName
                             then showSingName
                             else n
+
+mk_Show_name :: ShowMode -> Name
+mk_Show_name ForPromotion  = showName
+mk_Show_name ForShowSing{} = showSingName
+
+-- If we're creating a 'Show' instance for a singleon type, decorate the type
+-- appropriately (e.g., turn @Maybe a@ into @SMaybe (z :: Maybe a)@).
+-- Otherwise, return the type (@Maybe a@) unchanged.
+mk_Show_inst_ty :: Quasi q => ShowMode -> DType -> q DType
+mk_Show_inst_ty ForPromotion           ty = pure ty
+mk_Show_inst_ty (ForShowSing ty_tycon) ty = do
+  z <- qNewName "z"
+  pure $ DConT (singTyConName ty_tycon) `DAppT` (DVarT z `DSigT` ty)
+
+-- If we're creating a 'Show' instance for a singleton type, create a pattern
+-- of the form @(sx :: Sing x)@. Otherwise, simply return the pattern @sx@.
+mk_Show_arg_pat :: ShowMode -> Name -> Name -> DPat
+mk_Show_arg_pat ForPromotion  arg _      = DVarP arg
+mk_Show_arg_pat ForShowSing{} arg arg_ty =
+  DSigP (DVarP arg) (DConT singFamilyName `DAppT` DVarT arg_ty)
+
+-- If we're creating a 'Show' instance for a singleton type, decorate the
+-- expression with an explicit signature of the form
+-- @e :: (ShowSing' a_1, ..., ShowSing' a_n) => ShowS@. Otherwise, return
+-- the expression (@e@) unchanged.
+mk_Show_rhs_sig :: ShowMode -> [Name] -> DExp -> DExp
+mk_Show_rhs_sig ForPromotion  _            e = e
+mk_Show_rhs_sig ForShowSing{} arg_ty_names e =
+  e `DSigE` DForallT [] (map (DAppT (DConT showSing'Name) . DVarT) arg_ty_names)
+                        (DConT showSName)
diff --git a/src/Data/Singletons/Deriving/Traversable.hs b/src/Data/Singletons/Deriving/Traversable.hs
--- a/src/Data/Singletons/Deriving/Traversable.hs
+++ b/src/Data/Singletons/Deriving/Traversable.hs
@@ -51,17 +51,17 @@
       mk_trav_clause :: DCon -> q DClause
       mk_trav_clause con = do
         parts <- foldDataConArgs ft_trav con
-        clause_for_con [DVarPa f] con =<< sequence parts
+        clause_for_con [DVarP f] con =<< sequence parts
 
       mk_trav :: q [DClause]
       mk_trav = case cons of
                   [] -> do v <- newUniqueName "v"
-                           pure [DClause [DWildPa, DVarPa v]
+                           pure [DClause [DWildP, DVarP v]
                                          (DVarE pureName `DAppE` DCaseE (DVarE v) [])]
                   _  -> traverse mk_trav_clause cons
 
   trav_clauses <- mk_trav
-  constraints <- inferConstraintsDef mb_ctxt (DConPr traversableName) ty cons
+  constraints <- inferConstraintsDef mb_ctxt (DConT traversableName) ty cons
   return $ InstDecl { id_cxt = constraints
                     , id_name = traversableName
                     , id_arg_tys = [ty]
diff --git a/src/Data/Singletons/Deriving/Util.hs b/src/Data/Singletons/Deriving/Util.hs
--- a/src/Data/Singletons/Deriving/Util.hs
+++ b/src/Data/Singletons/Deriving/Util.hs
@@ -16,12 +16,11 @@
 
 import Control.Monad
 import Data.List
-import Data.List.NonEmpty (NonEmpty(..))
-import qualified Data.Set as Set
 import Data.Singletons.Names
 import Data.Singletons.Syntax
 import Data.Singletons.Util
 import Language.Haskell.TH.Desugar
+import qualified Language.Haskell.TH.Desugar.OSet as OSet
 import Language.Haskell.TH.Syntax
 
 -- A generic type signature for describing how to produce a derived instance.
@@ -141,14 +140,20 @@
                              inspect (DForallT _ _ t) = inspect t
                              inspect (DSigT t _)      = inspect t
                              inspect (DAppT t _)      = inspect t
+                             inspect (DAppKindT t _)  = inspect t
                              inspect (DVarT {})       = tyApp
                              inspect DArrowT          = tyApp
                              inspect (DLitT {})       = tyApp
                              inspect DWildCardT       = tyApp
 
-                         in case unfoldType f of
-                              f_head :| _ -> inspect f_head
+                         in case unfoldDType f of
+                              (f_head, _) -> inspect f_head
                     else trivial
+    go (DAppKindT t k) = do
+      (_, kc) <- go k
+      if kc
+         then pure (caseWrongArg, True)
+         else go t
     go (DSigT t k) = do
       (_, kc) <- go k
       if kc
@@ -202,13 +207,13 @@
     check_universal con@(DCon con_tvbs con_theta con_name _ res_ty)
       | allowConstrainedLastTyVar
       = pure ()
-      | _ :| res_ty_args <- unfoldType res_ty
-      , (_, last_res_ty_arg) <- snocView res_ty_args
+      | (_, res_ty_args) <- unfoldDType res_ty
+      , (_, last_res_ty_arg) <- snocView $ filterDTANormals res_ty_args
       , Just last_tv <- getDVarTName_maybe last_res_ty_arg
       = do ex_tvbs <- conExistentialTvbs (foldTypeTvbs (DConT n) data_tvbs) con
            let univ_tvb_names = map extractTvbName con_tvbs \\ map extractTvbName ex_tvbs
            if last_tv `elem` univ_tvb_names
-                && last_tv `Set.notMember` foldMap (fvDType . predToType) con_theta
+                && last_tv `OSet.notMember` foldMap fvDType con_theta
               then pure ()
               else fail $ badCon con_name existential
       | otherwise
@@ -243,7 +248,7 @@
             , ft_forall  = \tvbs xs -> filter (\x -> all (not_in_ty x) tvbs) xs })
   where
     not_in_ty :: DType -> DTyVarBndr -> Bool
-    not_in_ty ty tvb = extractTvbName tvb `Set.notMember` fvDType ty
+    not_in_ty ty tvb = extractTvbName tvb `OSet.notMember` fvDType ty
 
 -- Fold over the arguments of a data constructor in a Functor-like way.
 foldDataConArgs :: forall q a. DsMonad q => FFoldType a -> DCon -> q [a]
@@ -253,8 +258,8 @@
   where
     foldArg :: DType -> q a
     foldArg
-      | _ :| res_ty_args <- unfoldType res_ty
-      , (_, last_res_ty_arg) <- snocView res_ty_args
+      | (_, res_ty_args) <- unfoldDType res_ty
+      , (_, last_res_ty_arg) <- snocView $ filterDTANormals res_ty_args
       , Just last_tv <- getDVarTName_maybe last_res_ty_arg
       = functorLikeTraverse last_tv ft
       | otherwise
@@ -297,7 +302,7 @@
                   -> q DClause
 mkSimpleConClause fold extra_pats (DCon _ _ con_name _ _) insides = do
   vars_needed <- replicateM (length insides) $ newUniqueName "a"
-  let pat = DConPa con_name (map DVarPa vars_needed)
+  let pat = DConP con_name (map DVarP vars_needed)
       rhs = fold con_name (zipWith (\i v -> i `DAppE` DVarE v) insides vars_needed)
   pure $ DClause (extra_pats ++ [pat]) rhs
 
diff --git a/src/Data/Singletons/Internal.hs b/src/Data/Singletons/Internal.hs
--- a/src/Data/Singletons/Internal.hs
+++ b/src/Data/Singletons/Internal.hs
@@ -45,9 +45,62 @@
 ---- Sing & friends --------------------------------------------------
 ----------------------------------------------------------------------
 
--- | The singleton kind-indexed data family.
-data family Sing :: k -> Type
+-- | The singleton kind-indexed type family.
+type family Sing :: k -> Type
 
+{-
+Note [The kind of Sing]
+~~~~~~~~~~~~~~~~~~~~~~~
+It is important to define Sing like this:
+
+  type family Sing :: k -> Type
+
+There are other conceivable ways to define Sing, but they all suffer from
+various drawbacks:
+
+* type family Sing :: forall k. k -> Type
+
+  Surprisingly, this is /not/ equivalent to `type family Sing :: k -> Type`.
+  The difference lies in their arity, i.e., the number of arguments that must
+  be supplied in order to apply Sing. The former declaration has arity 0, while
+  the latter has arity 1 (this is more obvious if you write the declaration as
+  GHCi would display it with -fprint-explicit-kinds enabled:
+  `type family Sing @k :: k -> Type`).
+
+  The former declaration having arity 0 is actually what makes it useless. If
+  we were to adopt an arity-0 definition of `Sing`, then in order to write
+  `type instance Sing = SFoo`, GHC would require that `SFoo` must have the kind
+  `forall k. k -> Type`, and moreover, the kind /must/ be polymorphic in `k`.
+  This is undesirable, because in practice, every single `Sing` instance in the
+  wild must monomorphize `k` (e.g., `SBool` monomorphizes it to `Bool`), so an
+  arity-0 `Sing` simply won't work. In contrast, the current arity-1 definition
+  of `Sing` /does/ let you monomorphize `k` in type family instances.
+
+* type family Sing (a :: k) = (r :: Type) | r -> a
+
+  Again, this is not equivalent to `type family Sing :: k -> Type`. This
+  version of `Sing` has arity 2, since one must supply both `k` and `a` in
+  order to apply it. While an arity-2 `Sing` is not suffer from the same
+  polymorphism issues as the arity-0 `Sing` in the previous bullet point, it
+  does suffer from another issue in that it cannot be partially applied. This
+  is because its `a` argument /must/ be supplied, whereas with the arity-1
+  `Sing`, it is perfectly admissible to write `Sing` without an explicit `a`
+  argument. (Its invisible `k` argument is filled in automatically behind the
+  scenes.)
+
+* type family Sing = (r :: k -> Type) | r -> k
+
+  This is the same as `type family Sing :: k -> Type`, but with an injectivity
+  annotation. Technically, this definition isn't /wrong/, but the injectivity
+  annotation is actually unnecessary. Because the return kind of `Sing` is
+  declared to be `k -> Type`, the `Sing` type constructor is automatically
+  injective, so `Sing a1 ~ Sing a2` implies `a1 ~~ a2`.
+
+  Another way of phrasing this, using the terminology of Dependent Haskell, is
+  that the arrow in `Sing`'s return kind is /matchable/, which implies that
+  `Sing` is an injective type constructor as a consequence.
+-}
+
 -- | A 'SingI' constraint is essentially an implicitly-passed singleton.
 -- If you need to satisfy this constraint with an explicit singleton, please
 -- see 'withSingI' or the 'Sing' pattern synonym.
@@ -144,6 +197,39 @@
   where FromSing sng = fromSing sng
 
 ----------------------------------------------------------------------
+---- WrappedSing -----------------------------------------------------
+----------------------------------------------------------------------
+
+-- | A newtype around 'Sing'.
+--
+-- Since 'Sing' is a type family, it cannot be used directly in type class
+-- instances. As one example, one cannot write a catch-all
+-- @instance 'SDecide' k => 'TestEquality' ('Sing' k)@. On the other hand,
+-- 'WrappedSing' is a perfectly ordinary data type, which means that it is
+-- quite possible to define an
+-- @instance 'SDecide' k => 'TestEquality' ('WrappedSing' k)@.
+newtype WrappedSing :: forall k. k -> Type where
+  WrapSing :: forall k (a :: k). { unwrapSing :: Sing a } -> WrappedSing a
+
+-- | The singleton for 'WrappedSing's. Informally, this is the singleton type
+-- for other singletons.
+newtype SWrappedSing :: forall k (a :: k). WrappedSing a -> Type where
+  SWrapSing :: forall k (a :: k) (ws :: WrappedSing a).
+               { sUnwrapSing :: Sing a } -> SWrappedSing ws
+type instance Sing = SWrappedSing
+
+type family UnwrapSing (ws :: WrappedSing a) :: Sing a where
+  UnwrapSing ('WrapSing s) = s
+
+instance SingKind (WrappedSing a) where
+  type Demote (WrappedSing a) = WrappedSing a
+  fromSing (SWrapSing s) = WrapSing s
+  toSing (WrapSing s) = SomeSing $ SWrapSing s
+
+instance forall a (s :: Sing a). SingI a => SingI ('WrapSing s) where
+  sing = SWrapSing sing
+
+----------------------------------------------------------------------
 ---- SingInstance ----------------------------------------------------
 ----------------------------------------------------------------------
 
@@ -201,11 +287,39 @@
 -- here because dealing with inequality like this is hard, and
 -- I (Richard) wasn't sure what concrete value the ticket would
 -- have, given that we don't know how to begin fixing it.
-type family ApplyTyCon (f :: k1 -> k2) (x :: k1) :: k3 where
-  ApplyTyCon (f :: k1 -> k2 -> k3) x = TyCon (f x)
-  ApplyTyCon f x                     = f x
+type family ApplyTyCon :: (k1 -> k2) -> (k1 ~> unmatchable_fun) where
+  ApplyTyCon @k1 @(k2 -> k3) @unmatchable_fun = ApplyTyConAux2
+  ApplyTyCon @k1 @k2         @k2              = ApplyTyConAux1
+-- Upon first glance, the definition of ApplyTyCon (as well as the
+-- corresponding Apply instance for TyCon) seems a little indirect. One might
+-- wonder why these aren't defined like so:
+--
+--   type family ApplyTyCon (f :: k1 -> k2) (x :: k1) :: k3 where
+--     ApplyTyCon (f :: k1 -> k2 -> k3) x = TyCon (f x)
+--     ApplyTyCon f x                     = f x
+--
+--   type instance Apply (TyCon f) x = ApplyTyCon f x
+--
+-- This also works, but it requires that ApplyTyCon always be applied to a
+-- minimum of two arguments. In particular, this rules out a trick that we use
+-- elsewhere in the library to write SingI instances for different TyCons,
+-- which relies on partial applications of ApplyTyCon:
+--
+--   instance forall k1 k2 (f :: k1 -> k2).
+--            ( forall a. SingI a => SingI (f a)
+--            , (ApplyTyCon :: (k1 -> k2) -> (k1 ~> k2)) ~ ApplyTyConAux1
+--            ) => SingI (TyCon1 f) where
+type instance Apply (TyCon f) x = ApplyTyCon f @@ x
 
-type instance Apply (TyCon f) x = ApplyTyCon f x
+-- | An \"internal\" defunctionalization symbol used primarily in the
+-- definition of 'ApplyTyCon', as well as the 'SingI' instances for 'TyCon1',
+-- 'TyCon2', etc.
+data ApplyTyConAux1 :: (k1 -> k2) -> (k1 ~> k2)
+-- | An \"internal\" defunctionalization symbol used primarily in the
+-- definition of 'ApplyTyCon'.
+data ApplyTyConAux2 :: (k1 -> k2 -> k3) -> (k1 ~> unmatchable_fun)
+type instance Apply (ApplyTyConAux1 f) x = f x
+type instance Apply (ApplyTyConAux2 f) x = TyCon (f x)
 
 -- | Wrapper for converting the normal type-level arrow into a '~>'.
 -- For example, given:
@@ -237,8 +351,9 @@
 ---- Defunctionalized Sing instance and utilities --------------------
 ----------------------------------------------------------------------
 
-newtype instance Sing (f :: k1 ~> k2) =
+newtype SLambda (f :: k1 ~> k2) =
   SLambda { applySing :: forall t. Sing t -> Sing (f @@ t) }
+type instance Sing = SLambda
 
 -- | An infix synonym for `applySing`
 (@@) :: forall k1 k2 (f :: k1 ~> k2) (t :: k1). Sing f -> Sing t -> Sing (f @@ t)
diff --git a/src/Data/Singletons/Names.hs b/src/Data/Singletons/Names.hs
--- a/src/Data/Singletons/Names.hs
+++ b/src/Data/Singletons/Names.hs
@@ -18,6 +18,8 @@
 import GHC.TypeLits ( Nat, Symbol )
 import GHC.Exts ( Constraint )
 import GHC.Show ( showCommaSpace, showSpace )
+import Data.Type.Equality ( TestEquality(..) )
+import Data.Type.Coercion ( TestCoercion(..) )
 import Data.Typeable ( TypeRep )
 import Data.Singletons.Util
 import Control.Applicative
@@ -26,13 +28,16 @@
 boolName, andName, tyEqName, compareName, minBoundName,
   maxBoundName, repName,
   nilName, consName, listName, tyFunArrowName,
-  applyName, natName, symbolName, typeRepName, stringName,
+  applyName, applyTyConName, applyTyConAux1Name,
+  natName, symbolName, typeRepName, stringName,
   eqName, ordName, boundedName, orderingName,
-  singFamilyName, singIName, singMethName, demoteName,
+  singFamilyName, singIName, singMethName, demoteName, withSingIName,
   singKindClassName, sEqClassName, sEqMethName, sconsName, snilName, strueName,
   sIfName,
   someSingTypeName, someSingDataName,
   sListName, sDecideClassName, sDecideMethName,
+  testEqualityClassName, testEqualityMethName, decideEqualityName,
+  testCoercionClassName, testCoercionMethName, decideCoercionName,
   provedName, disprovedName, reflName, toSingName, fromSingName,
   equalityName, applySingName, suppressClassName, suppressMethodName,
   thenCmpName,
@@ -40,8 +45,8 @@
   sNegateName, errorName, foldlName, cmpEQName, cmpLTName, cmpGTName,
   singletonsToEnumName, singletonsFromEnumName, enumName, singletonsEnumName,
   equalsName, constraintName,
-  showName, showCharName, showCommaSpaceName, showParenName, showsPrecName,
-  showSpaceName, showStringName, showSingName,
+  showName, showSName, showCharName, showCommaSpaceName, showParenName, showsPrecName,
+  showSpaceName, showStringName, showSingName, showSing'Name,
   composeName, gtName, tyFromStringName, sFromStringName,
   foldableName, foldMapName, memptyName, mappendName, foldrName,
   functorName, fmapName, replaceName,
@@ -58,6 +63,8 @@
 listName = ''[]
 tyFunArrowName = ''(~>)
 applyName = ''Apply
+applyTyConName = ''ApplyTyCon
+applyTyConAux1Name = ''ApplyTyConAux1
 symbolName = ''Symbol
 natName = ''Nat
 typeRepName = ''TypeRep
@@ -72,6 +79,7 @@
 toSingName = 'toSing
 fromSingName = 'fromSing
 demoteName = ''Demote
+withSingIName = 'withSingI
 singKindClassName = ''SingKind
 sEqClassName = mk_name_tc "Data.Singletons.Prelude.Eq" "SEq"
 sEqMethName = mk_name_v "Data.Singletons.Prelude.Eq" "%=="
@@ -84,6 +92,12 @@
 sListName = mk_name_tc "Data.Singletons.Prelude.Instances" "SList"
 sDecideClassName = ''SDecide
 sDecideMethName = '(%~)
+testEqualityClassName = ''TestEquality
+testEqualityMethName = 'testEquality
+decideEqualityName = 'decideEquality
+testCoercionClassName = ''TestCoercion
+testCoercionMethName = 'testCoercion
+decideCoercionName = 'decideCoercion
 provedName = 'Proved
 disprovedName = 'Disproved
 reflName = 'Refl
@@ -109,12 +123,14 @@
 equalsName = '(==)
 constraintName = ''Constraint
 showName = ''Show
+showSName = ''ShowS
 showCharName = 'showChar
 showParenName = 'showParen
 showSpaceName = 'showSpace
 showsPrecName = 'showsPrec
 showStringName = 'showString
 showSingName = mk_name_tc "Data.Singletons.ShowSing" "ShowSing"
+showSing'Name = mk_name_tc "Data.Singletons.ShowSing" "ShowSing'"
 composeName = '(.)
 gtName = '(>)
 showCommaSpaceName = 'showCommaSpace
@@ -161,13 +177,7 @@
 
 -- like promoteValNameLhs, but adds a prefix to the promoted name
 promoteValNameLhsPrefix :: (String, String) -> Name -> Name
-promoteValNameLhsPrefix pres@(alpha, symb) n
-  | nameBase n == "."
-  = mkName $ symb ++ ":."
-  | nameBase n == "!"
-  = mkName $ symb ++ ":!"
-    -- See Note [Special cases for (.) and (!)]
-
+promoteValNameLhsPrefix pres@(alpha, _) n
     -- We can't promote promote idenitifers beginning with underscores to
     -- type names, so we work around the issue by prepending "US" at the
     -- front of the name (#229).
@@ -193,15 +203,6 @@
 -- names.
 promoteTySym :: Name -> Int -> Name
 promoteTySym name sat
-    | nameBase name == ":."
-    = default_case (mkName ".")
-    | nameBase name == ":!"
-    = default_case (mkName "!")
-      -- Although (:.) and (:!) are special cases, we need not have a colon in
-      -- front of their defunctionalization symbols, since only the names
-      -- (.) and (!) are problematic for the parser.
-      -- See Note [Special cases for (.) and (!)]
-
       -- We can't promote promote idenitifers beginning with underscores to
       -- type names, so we work around the issue by prepending "US" at the
       -- front of the name (#229).
@@ -285,7 +286,7 @@
 singFamily = DConT singFamilyName
 
 singKindConstraint :: DKind -> DPred
-singKindConstraint = DAppPr (DConPr singKindClassName)
+singKindConstraint = DAppT (DConT singKindClassName)
 
 demote :: DType
 demote = DConT demoteName
@@ -302,9 +303,9 @@
 foldApply :: DType -> [DType] -> DType
 foldApply = foldl apply
 
--- make and equality predicate
+-- make an equality predicate
 mkEqPred :: DType -> DType -> DPred
-mkEqPred ty1 ty2 = foldPred (DConPr equalityName) [ty1, ty2]
+mkEqPred ty1 ty2 = foldType (DConT equalityName) [ty1, ty2]
 
 -- | If a 'String' begins with one or more underscores, return
 -- @'Just' (us, rest)@, where @us@ contain all of the underscores at the
@@ -315,16 +316,19 @@
                        ([], _) -> Nothing
                        res     -> Just res
 
--- Walk a DPred, applying a function to all occurrences of constructor names.
-modifyConNameDPred :: (Name -> Name) -> DPred -> DPred
-modifyConNameDPred mod_con_name = go
+-- Walk a DType, applying a function to all occurrences of constructor names.
+modifyConNameDType :: (Name -> Name) -> DType -> DType
+modifyConNameDType mod_con_name = go
   where
-    go (DForallPr tvbs cxt p) = DForallPr tvbs (map go cxt) (go p)
-    go (DAppPr p t)           = DAppPr (go p) t
-    go (DSigPr p k)           = DSigPr (go p) k
-    go p@(DVarPr _)           = p
-    go (DConPr n)             = DConPr (mod_con_name n)
-    go p@DWildCardPr          = p
+    go (DForallT tvbs cxt p) = DForallT tvbs (map go cxt) (go p)
+    go (DAppT     p t)       = DAppT     (go p) t
+    go (DAppKindT p k)       = DAppKindT (go p) k
+    go (DSigT     p k)       = DSigT     (go p) k
+    go p@(DVarT _)           = p
+    go (DConT n)             = DConT (mod_con_name n)
+    go p@DWildCardT          = p
+    go p@(DLitT {})          = p
+    go p@DArrowT             = p
 
 {-
 Note [Defunctionalization symbol suffixes]
@@ -351,12 +355,4 @@
 $@#@$$
 
 And there is no conflict.
-
-Note [Special cases for (.) and (!)]
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Almost every infix value name can be promoted trivially. For example, (+) works
-both at the value- and type-level. The two exceptions to this rule are (.) and (!),
-which we promote to the special type names (:.) and (:!), respectively.
-This is necessary since one cannot define or apply (.) or (!) at the type level --
-they simply won't parse. Bummer.
 -}
diff --git a/src/Data/Singletons/Partition.hs b/src/Data/Singletons/Partition.hs
--- a/src/Data/Singletons/Partition.hs
+++ b/src/Data/Singletons/Partition.hs
@@ -30,15 +30,15 @@
 import Language.Haskell.TH.Syntax hiding (showName)
 import Language.Haskell.TH.Ppr
 import Language.Haskell.TH.Desugar
+import qualified Language.Haskell.TH.Desugar.OMap.Strict as OMap
+import Language.Haskell.TH.Desugar.OMap.Strict (OMap)
 import Data.Singletons.Util
 
 import Control.Monad
 import Data.Bifunctor (bimap)
-import Data.List.NonEmpty (NonEmpty(..))
 import qualified Data.Map as Map
 import Data.Map (Map)
 import Data.Maybe
-import Data.Semigroup (Semigroup(..))
 
 data PartitionedDecs =
   PDecs { pd_let_decs :: [DLetDec]
@@ -77,7 +77,7 @@
   derived_decs
     <- mapM (\(strat, deriv_pred) ->
               let etad_tvbs
-                    | DConT pred_name :| _ <- unfoldType deriv_pred
+                    | (DConT pred_name, _) <- unfoldDType deriv_pred
                     , isFunctorLikeClassName pred_name
                       -- If deriving Functor, Foldable, or Traversable,
                       -- we need to use one less type variable than we normally do.
@@ -89,9 +89,9 @@
       $ concatMap flatten_clause derivings
   return $ mconcat $ derived_dec : derived_decs
   where
-    flatten_clause :: DDerivClause -> [(Maybe DDerivStrategy, DType)]
+    flatten_clause :: DDerivClause -> [(Maybe DDerivStrategy, DPred)]
     flatten_clause (DDerivClause strat preds) =
-      map (\p -> (strat, predToType p)) preds
+      map (\p -> (strat, p)) preds
 
 partitionDec (DClassD cxt name tvbs fds decs) = do
   (lde, otfs) <- concatMapM partitionClassDec decs
@@ -101,7 +101,7 @@
                                                , cd_fds       = fds
                                                , cd_lde       = lde }]
                   , pd_open_type_family_decs = otfs }
-partitionDec (DInstanceD _ cxt ty decs) = do
+partitionDec (DInstanceD _ _ cxt ty decs) = do
   (defns, sigs) <- liftM (bimap catMaybes mconcat) $
                    mapAndUnzipM partitionInstanceDec decs
   (name, tys) <- split_app_tys [] ty
@@ -116,9 +116,9 @@
     split_app_tys acc (DSigT t _)   = split_app_tys acc t
     split_app_tys _ _ = fail $ "Illegal instance head: " ++ show ty
 partitionDec (DRoleAnnotD {}) = return mempty  -- ignore these
-partitionDec (DTySynD name tvbs _type) =
+partitionDec (DTySynD name tvbs rhs) =
   -- See Note [Partitioning, type synonyms, and type families]
-  pure $ mempty { pd_ty_syn_decs = [TySynDecl name tvbs] }
+  pure $ mempty { pd_ty_syn_decs = [TySynDecl name tvbs rhs] }
 partitionDec (DClosedTypeFamilyD tf_head _) =
   -- See Note [Partitioning, type synonyms, and type families]
   pure $ mempty { pd_closed_type_family_decs = [TypeFamilyDecl tf_head] }
@@ -128,13 +128,14 @@
 partitionDec (DTySynInstD {}) = pure mempty
   -- There's no need to track type family instances, since
   -- we already record the type family itself separately.
-partitionDec (DStandaloneDerivD mb_strat ctxt ty) =
-  case unfoldType ty of
-    cls_pred_ty :| cls_tys
-      | not (null cls_tys) -- We can't handle zero-parameter type classes
-      , let cls_arg_tys  = init cls_tys
-            data_ty      = last cls_tys
-            data_ty_head = case unfoldType data_ty of ty_head :| _ -> ty_head
+partitionDec (DStandaloneDerivD mb_strat _ ctxt ty) =
+  case unfoldDType ty of
+    (cls_pred_ty, cls_tys)
+      | let cls_normal_tys = filterDTANormals cls_tys
+      , not (null cls_normal_tys) -- We can't handle zero-parameter type classes
+      , let cls_arg_tys  = init cls_normal_tys
+            data_ty      = last cls_normal_tys
+            data_ty_head = case unfoldDType data_ty of (ty_head, _) -> ty_head
       , DConT data_tycon <- data_ty_head -- We can't handle deriving an instance for something
                                          -- other than a type constructor application
       -> do let cls_pred = foldType cls_pred_ty cls_arg_tys
@@ -152,10 +153,10 @@
 partitionDec dec =
   fail $ "Declaration cannot be promoted: " ++ pprint (decToTH dec)
 
-partitionClassDec :: Monad m => DDec -> m (ULetDecEnv, [OpenTypeFamilyDecl])
+partitionClassDec :: MonadFail m => DDec -> m (ULetDecEnv, [OpenTypeFamilyDecl])
 partitionClassDec (DLetDec (DSigD name ty)) =
   pure (typeBinding name ty, mempty)
-partitionClassDec (DLetDec (DValD (DVarPa name) exp)) =
+partitionClassDec (DLetDec (DValD (DVarP name) exp)) =
   pure (valueBinding name (UValue exp), mempty)
 partitionClassDec (DLetDec (DFunD name clauses)) =
   pure (valueBinding name (UFunction clauses), mempty)
@@ -173,16 +174,16 @@
 partitionClassDec _ =
   fail "Only method declarations can be promoted within a class."
 
-partitionInstanceDec :: Monad m => DDec
+partitionInstanceDec :: MonadFail m => DDec
                      -> m ( Maybe (Name, ULetDecRHS) -- right-hand sides of methods
-                          , Map Name DType           -- method type signatures
+                          , OMap Name DType          -- method type signatures
                           )
-partitionInstanceDec (DLetDec (DValD (DVarPa name) exp)) =
+partitionInstanceDec (DLetDec (DValD (DVarP name) exp)) =
   pure (Just (name, UValue exp), mempty)
 partitionInstanceDec (DLetDec (DFunD name clauses)) =
   pure (Just (name, UFunction clauses), mempty)
 partitionInstanceDec (DLetDec (DSigD name ty)) =
-  pure (Nothing, Map.singleton name ty)
+  pure (Nothing, OMap.singleton name ty)
 partitionInstanceDec (DLetDec (DPragmaD {})) =
   pure (Nothing, mempty)
 partitionInstanceDec (DTySynInstD {}) =
@@ -196,7 +197,7 @@
   :: forall m. DsMonad m
   => Maybe DDerivStrategy
                 -- ^ The deriving strategy, if present.
-  -> DType      -- ^ The class being derived (e.g., 'Eq'), possibly applied to
+  -> DPred      -- ^ The class being derived (e.g., 'Eq'), possibly applied to
                 --   some number of arguments (e.g., @C Int Bool@).
   -> Maybe DCxt -- ^ @'Just' ctx@ if @ctx@ was provided via @StandaloneDeriving@.
                 --   'Nothing' if using a @deriving@ clause.
@@ -204,8 +205,8 @@
   -> DataDecl   -- ^ The original data type information (e.g., its constructors).
   -> m PartitionedDecs
 partitionDeriving mb_strat deriv_pred mb_ctxt ty data_decl =
-  case unfoldType deriv_pred of
-    DConT deriv_name :| arg_tys
+  case unfoldDType deriv_pred of
+    (DConT deriv_name, arg_tys)
          -- Here, we are more conservative than GHC: DeriveAnyClass only kicks
          -- in if the user explicitly chooses to do so with the anyclass
          -- deriving strategy
@@ -223,7 +224,7 @@
                       -- StandaloneDeriving, use that.)
 
                     , id_name      = deriv_name
-                    , id_arg_tys   = arg_tys ++ [ty]
+                    , id_arg_tys   = filterDTANormals arg_tys ++ [ty]
                     , id_sigs      = mempty
                     , id_meths     = [] }
 
@@ -237,7 +238,7 @@
 
     -- Stock classes. These are derived only if `singletons` supports them
     -- (and, optionally, if an explicit stock deriving strategy is used)
-    DConT deriv_name :| [] -- For now, all stock derivable class supported in
+    (DConT deriv_name, []) -- For now, all stock derivable class supported in
                            -- singletons take just one argument (the data
                            -- type itself)
        | stock_or_default
@@ -258,9 +259,17 @@
 
       mk_derived_inst    dec = mempty { pd_instance_decs   = [dec] }
       mk_derived_eq_inst dec = mempty { pd_derived_eq_decs = [dec] }
-      derived_decl = DerivedDecl { ded_mb_cxt = mb_ctxt
-                                 , ded_type   = ty
-                                 , ded_decl   = data_decl }
+
+      derived_decl :: DerivedDecl cls
+      derived_decl = DerivedDecl { ded_mb_cxt     = mb_ctxt
+                                 , ded_type       = ty
+                                 , ded_type_tycon = ty_tycon
+                                 , ded_decl       = data_decl }
+        where
+          ty_tycon :: Name
+          ty_tycon = case unfoldDType ty of
+                       (DConT tc, _) -> tc
+                       (t,        _) -> error $ "Not a data type: " ++ show t
       stock_or_default = isStockOrDefault mb_strat
 
       -- A mapping from all stock derivable classes (that singletons supports)
@@ -277,7 +286,7 @@
         , ( eqName, return $ mk_derived_eq_inst derived_decl )
           -- See Note [DerivedDecl] in Data.Singletons.Syntax
         , ( showName, do -- These will become PShow/SShow instances...
-                         inst_for_promotion <- mk_instance mkShowInstance
+                         inst_for_promotion <- mk_instance $ mkShowInstance ForPromotion
                          -- ...and this will become a Show instance.
                          let inst_for_show = derived_decl
                          pure $ mempty { pd_instance_decs     = [inst_for_promotion]
diff --git a/src/Data/Singletons/Prelude.hs b/src/Data/Singletons/Prelude.hs
--- a/src/Data/Singletons/Prelude.hs
+++ b/src/Data/Singletons/Prelude.hs
@@ -22,15 +22,11 @@
   -- * Basic singleton definitions
   module Data.Singletons,
 
-  Sing(SFalse, STrue, SNil, SCons, SJust, SNothing, SLeft, SRight, SLT, SEQ, SGT,
-       STuple0, STuple2, STuple3, STuple4, STuple5, STuple6, STuple7),
-
-  -- * Singleton type synonyms
+  -- * Singleton types
 
-  -- | These synonyms are all kind-restricted synonyms of 'Sing'.
-  -- For example 'SBool' requires an argument of kind 'Bool'.
-  SBool, SList, SMaybe, SEither, SOrdering,
-  STuple0, STuple2, STuple3, STuple4, STuple5, STuple6, STuple7,
+  SBool(..), SList(..), SMaybe(..), SEither(..), SOrdering(..),
+  STuple0(..), STuple2(..), STuple3(..), STuple4(..),
+  STuple5(..), STuple6(..), STuple7(..),
 
   -- * Functions working with 'Bool'
   If, sIf, Not, sNot, type (&&), type (||), (%&&), (%||), Otherwise, sOtherwise,
@@ -65,12 +61,14 @@
   PSemigroup(type (<>)), SSemigroup((%<>)),
   PMonoid(..), SMonoid(..),
 
-  -- * Singleton 'Functor', 'Applicative', and 'Monad'
+  -- * Singleton 'Functor', 'Applicative', 'Monad', and 'MonadFail'
   PFunctor(Fmap, type (<$)), SFunctor(sFmap, (%<$)), type (<$>), (%<$>),
   PApplicative(Pure, type (<*>), type (*>), type (<*)),
   SApplicative(sPure, (%<*>), (%*>), (%<*)),
-  PMonad(type (>>=), type (>>), Return, Fail),
-  SMonad((%>>=), (%>>), sReturn, sFail),
+  PMonad(type (>>=), type (>>), Return),
+  SMonad((%>>=), (%>>), sReturn),
+  PMonadFail(Fail), SMonadFail(sFail),
+
   MapM_, sMapM_,
   Sequence_, sSequence_,
   type (=<<), (%=<<),
@@ -84,7 +82,7 @@
   STraversable(sTraverse, sSequenceA, sMapM, sSequence),
 
   -- ** Miscellaneous functions
-  Id, sId, Const, sConst, (:.), (%.), type ($), (%$), type ($!), (%$!),
+  Id, sId, Const, sConst, type (.), (%.), type ($), (%$), type ($!), (%$!),
   Flip, sFlip, AsTypeOf, sAsTypeOf,
   Seq, sSeq,
 
diff --git a/src/Data/Singletons/Prelude/Applicative.hs b/src/Data/Singletons/Prelude/Applicative.hs
--- a/src/Data/Singletons/Prelude/Applicative.hs
+++ b/src/Data/Singletons/Prelude/Applicative.hs
@@ -6,6 +6,7 @@
 {-# LANGUAGE PolyKinds #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
@@ -27,7 +28,7 @@
 module Data.Singletons.Prelude.Applicative (
   PApplicative(..), SApplicative(..),
   PAlternative(..), SAlternative(..),
-  Sing (SConst, sGetConst), SConst, Const, GetConst,
+  Sing, SConst(..), Const, GetConst,
   type (<$>), (%<$>), type (<$), (%<$), type (<**>), (%<**>),
   LiftA, sLiftA, LiftA3, sLiftA3, Optional, sOptional,
 
diff --git a/src/Data/Singletons/Prelude/Base.hs b/src/Data/Singletons/Prelude/Base.hs
--- a/src/Data/Singletons/Prelude/Base.hs
+++ b/src/Data/Singletons/Prelude/Base.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TemplateHaskell, TypeOperators, DataKinds, PolyKinds,
              ScopedTypeVariables, TypeFamilies, GADTs,
-             UndecidableInstances, BangPatterns #-}
+             UndecidableInstances, BangPatterns, TypeApplications #-}
 
 -----------------------------------------------------------------------------
 -- |
@@ -24,7 +24,7 @@
 module Data.Singletons.Prelude.Base (
   -- * Basic functions
   Foldr, sFoldr, Map, sMap, type (++), (%++), Otherwise, sOtherwise,
-  Id, sId, Const, sConst, (:.), (%.), type ($), type ($!), (%$), (%$!),
+  Id, sId, Const, sConst, type (.), (%.), type ($), type ($!), (%$), (%$!),
   Until, sUntil, Flip, sFlip, AsTypeOf, sAsTypeOf,
   Seq, sSeq,
 
@@ -111,5 +111,6 @@
 
 -- Workaround for #326
 infixr 5 ++
+infixr 9 .
 infixr 0 $
 infixr 0 $!
diff --git a/src/Data/Singletons/Prelude/Bool.hs b/src/Data/Singletons/Prelude/Bool.hs
--- a/src/Data/Singletons/Prelude/Bool.hs
+++ b/src/Data/Singletons/Prelude/Bool.hs
@@ -24,16 +24,7 @@
 
 module Data.Singletons.Prelude.Bool (
   -- * The 'Bool' singleton
-
-  Sing(SFalse, STrue),
-  -- | Though Haddock doesn't show it, the 'Sing' instance above declares
-  -- constructors
-  --
-  -- > SFalse :: Sing False
-  -- > STrue  :: Sing True
-
-  SBool,
-  -- | 'SBool' is a kind-restricted synonym for 'Sing': @type SBool (a :: Bool) = Sing a@
+  Sing, SBool(..),
 
   -- * Conditionals
   If, sIf,
diff --git a/src/Data/Singletons/Prelude/Const.hs b/src/Data/Singletons/Prelude/Const.hs
--- a/src/Data/Singletons/Prelude/Const.hs
+++ b/src/Data/Singletons/Prelude/Const.hs
@@ -1,11 +1,11 @@
 {-# LANGUAGE DataKinds #-}
-{-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE GADTs #-}
 {-# LANGUAGE InstanceSigs #-}
 {-# LANGUAGE PolyKinds #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
@@ -26,8 +26,7 @@
 
 module Data.Singletons.Prelude.Const (
   -- * The 'Const' singleton
-  Sing(SConst, sGetConst),
-  SConst, GetConst,
+  Sing, SConst(..), GetConst,
 
   -- * Defunctionalization symbols
   ConstSym0, ConstSym1,
@@ -71,9 +70,9 @@
 poly-kinded Sing instances (see #150), we simply write the Sing instance by
 hand.
 -}
-data instance Sing :: forall (k :: Type) (a :: Type) (b :: k). Const a b -> Type where
-  SConst :: { sGetConst :: Sing a } -> Sing ('Const a)
-type SConst = (Sing :: Const a b -> Type)
+data SConst :: forall (k :: Type) (a :: Type) (b :: k). Const a b -> Type where
+  SConst :: { sGetConst :: Sing a } -> SConst ('Const a)
+type instance Sing = SConst
 instance SingKind a => SingKind (Const a b) where
   type Demote (Const a b) = Const (Demote a) b
   fromSing (SConst sa) = Const (fromSing sa)
@@ -83,8 +82,6 @@
 
 $(genDefunSymbols [''Const])
 instance SingI ConstSym0 where
-  sing = singFun1 SConst
-instance SingI (TyCon1 'Const) where
   sing = singFun1 SConst
 
 $(singletons [d|
diff --git a/src/Data/Singletons/Prelude/Either.hs b/src/Data/Singletons/Prelude/Either.hs
--- a/src/Data/Singletons/Prelude/Either.hs
+++ b/src/Data/Singletons/Prelude/Either.hs
@@ -1,5 +1,6 @@
 {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeFamilies, GADTs,
-             RankNTypes, UndecidableInstances, DataKinds, PolyKinds #-}
+             RankNTypes, UndecidableInstances, DataKinds, PolyKinds,
+             TypeApplications #-}
 
 -----------------------------------------------------------------------------
 -- |
@@ -23,16 +24,7 @@
 
 module Data.Singletons.Prelude.Either (
   -- * The 'Either' singleton
-  Sing(SLeft, SRight),
-  -- | Though Haddock doesn't show it, the 'Sing' instance above declares
-  -- constructors
-  --
-  -- > SLeft  :: Sing a -> Sing (Left a)
-  -- > SRight :: Sing b -> Sing (Right b)
-
-  SEither,
-  -- | 'SEither' is a kind-restricted synonym for 'Sing':
-  -- @type SEither (a :: Either x y) = Sing a@
+  Sing, SEither(..),
 
   -- * Singletons from @Data.Either@
   either_, Either_, sEither_,
diff --git a/src/Data/Singletons/Prelude/Enum.hs b/src/Data/Singletons/Prelude/Enum.hs
--- a/src/Data/Singletons/Prelude/Enum.hs
+++ b/src/Data/Singletons/Prelude/Enum.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE TemplateHaskell, DataKinds, PolyKinds, ScopedTypeVariables,
              TypeFamilies, TypeOperators, GADTs, UndecidableInstances,
              FlexibleContexts, DefaultSignatures, BangPatterns,
-             InstanceSigs #-}
+             InstanceSigs, TypeApplications #-}
 
 -----------------------------------------------------------------------------
 -- |
diff --git a/src/Data/Singletons/Prelude/Foldable.hs b/src/Data/Singletons/Prelude/Foldable.hs
--- a/src/Data/Singletons/Prelude/Foldable.hs
+++ b/src/Data/Singletons/Prelude/Foldable.hs
@@ -7,6 +7,7 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
@@ -107,7 +108,8 @@
 import Data.Singletons.Prelude.Bool
 import Data.Singletons.Prelude.Either
 import Data.Singletons.Prelude.Eq
-import Data.Singletons.Prelude.Instances (Sing(..), type (:@#@$))
+import Data.Singletons.Prelude.Instances
+  hiding (Foldl, FoldlSym0(..), FoldlSym1(..), FoldlSym2(..), FoldlSym3, sFoldl)
 import Data.Singletons.Prelude.List.Internal.Disambiguation
 import Data.Singletons.Prelude.Maybe
 import Data.Singletons.Prelude.Monad.Internal
@@ -132,8 +134,9 @@
 import Data.Singletons.TypeLits.Internal
 
 newtype Endo a = Endo (a ~> a)
-data instance Sing :: forall a. Endo a -> Type where
-  SEndo :: Sing x -> Sing ('Endo x)
+data SEndo :: forall a. Endo a -> Type where
+  SEndo :: Sing x -> SEndo ('Endo x)
+type instance Sing = SEndo
 data EndoSym0 :: forall a. (a ~> a) ~> Endo a
 type instance Apply EndoSym0 x = 'Endo x
 
@@ -146,13 +149,15 @@
   |])
 
 newtype MaxInternal a = MaxInternal (Maybe a)
-data instance Sing :: forall a. MaxInternal a -> Type where
-  SMaxInternal :: Sing x -> Sing ('MaxInternal x)
+data SMaxInternal :: forall a. MaxInternal a -> Type where
+  SMaxInternal :: Sing x -> SMaxInternal ('MaxInternal x)
+type instance Sing = SMaxInternal
 $(genDefunSymbols [''MaxInternal])
 
 newtype MinInternal a = MinInternal (Maybe a)
-data instance Sing :: forall a. MinInternal a -> Type where
-  SMinInternal :: Sing x -> Sing ('MinInternal x)
+data SMinInternal :: forall a. MinInternal a -> Type where
+  SMinInternal :: Sing x -> SMinInternal ('MinInternal x)
+type instance Sing = SMinInternal
 $(genDefunSymbols [''MinInternal])
 
 $(singletonsOnly [d|
diff --git a/src/Data/Singletons/Prelude/Function.hs b/src/Data/Singletons/Prelude/Function.hs
--- a/src/Data/Singletons/Prelude/Function.hs
+++ b/src/Data/Singletons/Prelude/Function.hs
@@ -19,11 +19,11 @@
 
 {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeFamilies,
              TypeOperators, UndecidableInstances, GADTs,
-             DataKinds, PolyKinds #-}
+             DataKinds, PolyKinds, TypeApplications #-}
 
 module Data.Singletons.Prelude.Function (
     -- * "Prelude" re-exports
-    Id, sId, Const, sConst, (:.), (%.), Flip, sFlip, type ($), (%$)
+    Id, sId, Const, sConst, type (.), (%.), Flip, sFlip, type ($), (%$)
     -- * Other combinators
   , type (&), (%&), On, sOn
 
diff --git a/src/Data/Singletons/Prelude/Functor.hs b/src/Data/Singletons/Prelude/Functor.hs
--- a/src/Data/Singletons/Prelude/Functor.hs
+++ b/src/Data/Singletons/Prelude/Functor.hs
@@ -7,6 +7,7 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
diff --git a/src/Data/Singletons/Prelude/Identity.hs b/src/Data/Singletons/Prelude/Identity.hs
--- a/src/Data/Singletons/Prelude/Identity.hs
+++ b/src/Data/Singletons/Prelude/Identity.hs
@@ -6,6 +6,7 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE UndecidableInstances #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
@@ -25,8 +26,7 @@
 
 module Data.Singletons.Prelude.Identity (
   -- * The 'Identity' singleton
-  Sing(SIdentity, sRunIdentity),
-  SIdentity, RunIdentity,
+  Sing, SIdentity(..), RunIdentity,
 
   -- * Defunctionalization symbols
   IdentitySym0, IdentitySym1,
diff --git a/src/Data/Singletons/Prelude/Instances.hs b/src/Data/Singletons/Prelude/Instances.hs
--- a/src/Data/Singletons/Prelude/Instances.hs
+++ b/src/Data/Singletons/Prelude/Instances.hs
@@ -10,11 +10,16 @@
 
 {-# LANGUAGE DataKinds, PolyKinds, RankNTypes, GADTs, TypeFamilies, EmptyCase,
              FlexibleContexts, TemplateHaskell, ScopedTypeVariables,
-             UndecidableInstances, TypeOperators, FlexibleInstances #-}
+             UndecidableInstances, TypeOperators, FlexibleInstances,
+             TypeApplications #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
 
-module Data.Singletons.Prelude.Instances where
+module Data.Singletons.Prelude.Instances (
+    module Data.Singletons.Prelude.Instances
+  , Sing
+  ) where
 
+import Data.Singletons.Internal
 import Data.Singletons.Single
 import Data.Singletons.Util
 
diff --git a/src/Data/Singletons/Prelude/IsString.hs b/src/Data/Singletons/Prelude/IsString.hs
--- a/src/Data/Singletons/Prelude/IsString.hs
+++ b/src/Data/Singletons/Prelude/IsString.hs
@@ -4,6 +4,7 @@
 {-# LANGUAGE PolyKinds #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE UndecidableInstances #-}
 
diff --git a/src/Data/Singletons/Prelude/List.hs b/src/Data/Singletons/Prelude/List.hs
--- a/src/Data/Singletons/Prelude/List.hs
+++ b/src/Data/Singletons/Prelude/List.hs
@@ -22,15 +22,7 @@
 
 module Data.Singletons.Prelude.List (
   -- * The singleton for lists
-  Sing(SNil, SCons),
-  -- | Though Haddock doesn't show it, the 'Sing' instance above declares
-  -- constructors
-  --
-  -- > SNil  :: Sing '[]
-  -- > SCons :: Sing (h :: k) -> Sing (t :: [k]) -> Sing (h ': t)
-
-  SList,
-  -- | 'SList' is a kind-restricted synonym for 'Sing': @type SList (a :: [k]) = Sing a@
+  Sing, SList(..),
 
   -- * Basic functions
   type (++), (%++), Head, sHead, Last, sLast, Tail, sTail, Init, sInit,
@@ -267,7 +259,7 @@
        )
 import Data.Singletons.Prelude.Foldable
 import Data.Singletons.Prelude.Instances
-       (Sing(..), SList, NilSym0, type (:@#@$), type (:@#@$$), type (:@#@$$$))
+       (Sing, SList(..), NilSym0, type (:@#@$), type (:@#@$$), type (:@#@$$$))
 import Data.Singletons.Prelude.Traversable
 
 import Data.Singletons.Prelude.List.Internal
diff --git a/src/Data/Singletons/Prelude/List/Internal.hs b/src/Data/Singletons/Prelude/List/Internal.hs
--- a/src/Data/Singletons/Prelude/List/Internal.hs
+++ b/src/Data/Singletons/Prelude/List/Internal.hs
@@ -1,6 +1,7 @@
 {-# LANGUAGE TypeOperators, DataKinds, PolyKinds, TypeFamilies,
              TemplateHaskell, GADTs, UndecidableInstances, RankNTypes,
-             ScopedTypeVariables, FlexibleContexts, AllowAmbiguousTypes #-}
+             ScopedTypeVariables, FlexibleContexts,
+             TypeApplications #-}
 {-# OPTIONS_GHC -O0 #-}
 
 -----------------------------------------------------------------------------
@@ -96,11 +97,6 @@
       perms (t:ts) is = foldr interleave (perms ts (t:is)) (permutations is)
         where interleave    xs     r = let (_,zs) = interleave' id xs r in zs
 
-              -- This type signature isn't present in the reference
-              -- implementation of permutations in base. However, it is needed
-              -- here, since (at least in GHC 8.2.1) the singletonized version
-              -- will fail to typecheck without it. See #13549 for the full story.
-              interleave' :: ([a] -> b) -> [a] -> [b] -> ([a], [b])
               interleave' _ []     r = (ts, r)
               interleave' f (y:ys) r = let (us,zs) = interleave' (f . (y:)) ys r
                                        in  (y:us, f (t:y:us) : zs)
diff --git a/src/Data/Singletons/Prelude/List/Internal/Disambiguation.hs b/src/Data/Singletons/Prelude/List/Internal/Disambiguation.hs
--- a/src/Data/Singletons/Prelude/List/Internal/Disambiguation.hs
+++ b/src/Data/Singletons/Prelude/List/Internal/Disambiguation.hs
@@ -13,7 +13,8 @@
 ----------------------------------------------------------------------------
 
 {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeFamilies,
-             UndecidableInstances, GADTs, DataKinds, PolyKinds #-}
+             UndecidableInstances, GADTs, DataKinds, PolyKinds,
+             TypeApplications #-}
 {-# OPTIONS_GHC -Wno-missing-signatures #-}
 
 module Data.Singletons.Prelude.List.Internal.Disambiguation where
diff --git a/src/Data/Singletons/Prelude/List/NonEmpty.hs b/src/Data/Singletons/Prelude/List/NonEmpty.hs
--- a/src/Data/Singletons/Prelude/List/NonEmpty.hs
+++ b/src/Data/Singletons/Prelude/List/NonEmpty.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeOperators,
              TypeFamilies, GADTs, UndecidableInstances, InstanceSigs,
-             DataKinds, PolyKinds #-}
+             DataKinds, PolyKinds, TypeApplications #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
 
 -----------------------------------------------------------------------------
@@ -25,17 +25,7 @@
 
 module Data.Singletons.Prelude.List.NonEmpty (
   -- * The 'NonEmpty' singleton
-
-  Sing((:%|)),
-
-  -- | Though Haddock doesn't show it, the 'Sing' instance above declares
-  -- constructor
-  --
-  -- > (:%|) :: Sing h -> Sing t -> Sing (h :| t)
-
-  SNonEmpty,
-  -- | 'SNonEmpty' is a kind-restricted synonym for 'Sing':
-  -- @type SNonEmpty (a :: NonEmpty) = Sing a@
+  Sing, SNonEmpty(..),
 
   -- * Non-empty stream transformations
   Map, sMap,
diff --git a/src/Data/Singletons/Prelude/Maybe.hs b/src/Data/Singletons/Prelude/Maybe.hs
--- a/src/Data/Singletons/Prelude/Maybe.hs
+++ b/src/Data/Singletons/Prelude/Maybe.hs
@@ -1,5 +1,6 @@
 {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeFamilies,
-             DataKinds, PolyKinds, UndecidableInstances, GADTs, RankNTypes #-}
+             DataKinds, PolyKinds, UndecidableInstances, GADTs, RankNTypes,
+             TypeApplications #-}
 
 -----------------------------------------------------------------------------
 -- |
@@ -24,16 +25,7 @@
 
 module Data.Singletons.Prelude.Maybe (
   -- The 'Maybe' singleton
-
-  Sing(SNothing, SJust),
-  -- | Though Haddock doesn't show it, the 'Sing' instance above declares
-  -- constructors
-  --
-  -- > SNothing :: Sing Nothing
-  -- > SJust    :: Sing a -> Sing (Just a)
-
-  SMaybe,
-  -- | 'SBool' is a kind-restricted synonym for 'Sing': @type SMaybe (a :: Maybe k) = Sing a@
+  Sing, SMaybe(..),
 
   -- * Singletons from @Data.Maybe@
   maybe_, Maybe_, sMaybe_,
diff --git a/src/Data/Singletons/Prelude/Monad.hs b/src/Data/Singletons/Prelude/Monad.hs
--- a/src/Data/Singletons/Prelude/Monad.hs
+++ b/src/Data/Singletons/Prelude/Monad.hs
@@ -6,6 +6,7 @@
 {-# LANGUAGE PolyKinds #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
@@ -27,6 +28,7 @@
 module Data.Singletons.Prelude.Monad (
   PFunctor(Fmap), SFunctor(sFmap),
   PMonad(..), SMonad(..), PMonadPlus(..), SMonadPlus(..),
+  PMonadFail(Fail), SMonadFail(sFail),
 
   MapM, sMapM, MapM_, sMapM_, ForM, sForM,
   Sequence, sSequence, Sequence_, sSequence_,
@@ -98,6 +100,7 @@
 import Data.Singletons.Prelude.Functor
 import Data.Singletons.Prelude.Instances
 import Data.Singletons.Prelude.List (UnzipSym0, sUnzip, ZipWithSym0, sZipWith)
+import Data.Singletons.Prelude.Monad.Fail
 import Data.Singletons.Prelude.Monad.Internal
 import Data.Singletons.Prelude.Monoid
 import Data.Singletons.Prelude.Num
@@ -208,19 +211,21 @@
 
   -- -| @'replicateM' n act@ performs the action @n@ times,
   -- gathering the results.
-  replicateM        :: (Applicative m) => Nat -> m a -> m [a]
+  replicateM        :: forall m a. (Applicative m) => Nat -> m a -> m [a]
   replicateM cnt0 f =
       loop cnt0
     where
+      loop :: Nat -> m [a]
       loop cnt
           | cnt <= 0  = pure []
           | otherwise = liftA2 (:) f (loop (cnt - 1))
 
   -- -| Like 'replicateM', but discards the result.
-  replicateM_       :: (Applicative m) => Nat -> m a -> m ()
+  replicateM_       :: forall m a. (Applicative m) => Nat -> m a -> m ()
   replicateM_ cnt0 f =
       loop cnt0
     where
+      loop :: Nat -> m ()
       loop cnt
           | cnt <= 0  = pure ()
           | otherwise = f *> loop (cnt - 1)
diff --git a/src/Data/Singletons/Prelude/Monad/Fail.hs b/src/Data/Singletons/Prelude/Monad/Fail.hs
new file mode 100644
--- /dev/null
+++ b/src/Data/Singletons/Prelude/Monad/Fail.hs
@@ -0,0 +1,64 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE InstanceSigs #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE UndecidableInstances #-}
+
+-----------------------------------------------------------------------------
+-- |
+-- Module      :  Data.Singletons.Prelude.Monad.Fail
+-- Copyright   :  (C) 2019 Ryan Scott
+-- License     :  BSD-style (see LICENSE)
+-- Maintainer  :  Ryan Scott
+-- Stability   :  experimental
+-- Portability :  non-portable
+--
+-- Defines the promoted and singled versions of the 'MonadFail' type class.
+--
+----------------------------------------------------------------------------
+
+module Data.Singletons.Prelude.Monad.Fail (
+  PMonadFail(..), SMonadFail(..),
+
+  -- * Defunctionalization symbols
+  FailSym0, FailSym1
+  ) where
+
+import Data.Kind
+import Data.Singletons.Prelude.Instances
+import Data.Singletons.Prelude.Monad.Internal
+import Data.Singletons.Single
+
+$(singletonsOnly [d|
+  -- -| When a value is bound in @do@-notation, the pattern on the left
+  -- hand side of @<-@ might not match. In this case, this class
+  -- provides a function to recover.
+  --
+  -- A 'Monad' without a 'MonadFail' instance may only be used in conjunction
+  -- with pattern that always match, such as newtypes, tuples, data types with
+  -- only a single data constructor, and irrefutable patterns (@~pat@).
+  --
+  -- Instances of 'MonadFail' should satisfy the following law: @fail s@ should
+  -- be a left zero for 'Control.Monad.>>=',
+  --
+  -- @
+  -- fail s >>= f  =  fail s
+  -- @
+  --
+  -- If your 'Monad' is also 'Control.Monad.MonadPlus', a popular definition is
+  --
+  -- @
+  -- fail _ = mzero
+  -- @
+  class Monad m => MonadFail (m :: Type -> Type) where
+      fail :: String -> m a
+
+  instance MonadFail Maybe where
+      fail _ = Nothing
+
+  instance MonadFail [] where
+      fail _ = []
+  |])
diff --git a/src/Data/Singletons/Prelude/Monad/Internal.hs b/src/Data/Singletons/Prelude/Monad/Internal.hs
--- a/src/Data/Singletons/Prelude/Monad/Internal.hs
+++ b/src/Data/Singletons/Prelude/Monad/Internal.hs
@@ -7,6 +7,7 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
@@ -43,7 +44,6 @@
 import Data.Singletons.Prelude.Base
 import Data.Singletons.Prelude.Instances
 import Data.Singletons.Single
-import Data.Singletons.TypeLits.Internal
 
 {-
 Note [How to get the right kinds when promoting Functor and friends]
@@ -275,17 +275,6 @@
       return      :: a -> m a
       return      = pure
 
-      -- -| Fail with a message.  This operation is not part of the
-      -- mathematical definition of a monad, but is invoked on pattern-match
-      -- failure in a @do@ expression.
-      --
-      -- As part of the MonadFail proposal (MFP), this function is moved
-      -- to its own class 'MonadFail' (see "Control.Monad.Fail" for more
-      -- details). The definition here will be removed in a future
-      -- release.
-      fail        :: Symbol -> m a
-      fail s      = error s
-
   {- Note [Recursive bindings for Applicative/Monad]
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -489,8 +478,6 @@
 
       (>>) = (*>)
 
-      fail _              = Nothing
-
   instance Monad NonEmpty where
     (a :| as) >>= f = b :| (bs ++ bs')
       where b :| bs = f a
@@ -499,7 +486,6 @@
 
   instance Monad []  where
       xs >>= f = foldr ((++) . f) [] xs
-      fail _ = []
 
   instance Monad (Either e) where
       Left  l >>= _ = Left l
diff --git a/src/Data/Singletons/Prelude/Monad/Zip.hs b/src/Data/Singletons/Prelude/Monad/Zip.hs
--- a/src/Data/Singletons/Prelude/Monad/Zip.hs
+++ b/src/Data/Singletons/Prelude/Monad/Zip.hs
@@ -6,6 +6,7 @@
 {-# LANGUAGE PolyKinds #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
diff --git a/src/Data/Singletons/Prelude/Monoid.hs b/src/Data/Singletons/Prelude/Monoid.hs
--- a/src/Data/Singletons/Prelude/Monoid.hs
+++ b/src/Data/Singletons/Prelude/Monoid.hs
@@ -7,6 +7,7 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
@@ -29,12 +30,10 @@
 module Data.Singletons.Prelude.Monoid (
   PMonoid(..), SMonoid(..),
 
-  Sing(SDual, sGetDual, SAll, sGetAll, SAny, sGetAny, SSum, sGetSum,
-       SProduct, sGetProduct, SFirst, sGetFirst, SLast, sGetLast),
+  Sing, SDual(..), SAll(..), SAny(..),
+  SSum(..), SProduct(..), SFirst(..), SLast(..),
   GetDual, GetAll, GetAny, GetSum, GetProduct, GetFirst, GetLast,
 
-  SDual, SAll, SAny, SSum, SProduct, SFirst, SLast,
-
   -- ** Defunctionalization symbols
   MemptySym0,
   MappendSym0, MappendSym1, MappendSym2,
@@ -58,7 +57,7 @@
 import Data.Singletons.Prelude.Num
 import Data.Singletons.Prelude.Ord
 import Data.Singletons.Prelude.Semigroup.Internal hiding
-       (Sing(SFirst, SLast), SFirst, SLast,
+       (SFirst, SLast,
         FirstSym0, FirstSym1, FirstSym0KindInference,
         LastSym0,  LastSym1,  LastSym0KindInference,
         GetFirst,  GetFirstSym0, GetFirstSym1, GetFirstSym0KindInference,
diff --git a/src/Data/Singletons/Prelude/Num.hs b/src/Data/Singletons/Prelude/Num.hs
--- a/src/Data/Singletons/Prelude/Num.hs
+++ b/src/Data/Singletons/Prelude/Num.hs
@@ -1,6 +1,7 @@
 {-# LANGUAGE TemplateHaskell, PolyKinds, DataKinds, TypeFamilies,
              TypeOperators, GADTs, ScopedTypeVariables, UndecidableInstances,
-             DefaultSignatures, FlexibleContexts, InstanceSigs, NoStarIsType
+             DefaultSignatures, FlexibleContexts, InstanceSigs, NoStarIsType,
+             TypeApplications
   #-}
 
 -----------------------------------------------------------------------------
@@ -41,7 +42,7 @@
 import Data.Singletons.TypeLits.Internal
 import Data.Singletons.Decide
 import qualified GHC.TypeNats as TN
-import GHC.TypeNats (Nat, SomeNat(..), someNatVal)
+import GHC.TypeNats (SomeNat(..), someNatVal)
 import Unsafe.Coerce
 
 $(singletonsOnly [d|
diff --git a/src/Data/Singletons/Prelude/Ord.hs b/src/Data/Singletons/Prelude/Ord.hs
--- a/src/Data/Singletons/Prelude/Ord.hs
+++ b/src/Data/Singletons/Prelude/Ord.hs
@@ -1,7 +1,7 @@
 {-# LANGUAGE TemplateHaskell, DataKinds, PolyKinds, ScopedTypeVariables,
              TypeFamilies, TypeOperators, GADTs, UndecidableInstances,
              FlexibleContexts, DefaultSignatures, InstanceSigs,
-             StandaloneDeriving, FlexibleInstances #-}
+             StandaloneDeriving, FlexibleInstances, TypeApplications #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
 
 -----------------------------------------------------------------------------
@@ -27,9 +27,7 @@
   -- it returns its first argument.
   thenCmp, ThenCmp, sThenCmp,
 
-  Sing(SLT, SEQ, SGT, SDown),
-
-  SOrdering, SDown,
+  Sing, SOrdering(..), SDown(..),
 
   -- ** Defunctionalization symbols
   ThenCmpSym0, ThenCmpSym1, ThenCmpSym2,
diff --git a/src/Data/Singletons/Prelude/Semigroup.hs b/src/Data/Singletons/Prelude/Semigroup.hs
--- a/src/Data/Singletons/Prelude/Semigroup.hs
+++ b/src/Data/Singletons/Prelude/Semigroup.hs
@@ -7,6 +7,7 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
@@ -29,18 +30,12 @@
 module Data.Singletons.Prelude.Semigroup (
   PSemigroup(..), SSemigroup(..),
 
-  Sing(SMin, sGetMin, SMax, sGetMax,
-       SFirst, sGetFirst, SLast, sGetLast,
-       SWrapMonoid, sUnwrapMonoid, SDual, sGetDual,
-       SAll, sGetAll, SAny, sGetAny,
-       SSum, sGetSum, SProduct, sGetProduct,
-       SOption, sGetOption, SArg),
-  GetMin, GetMax, GetFirst, GetLast, GetDual,
+  Sing, SMin(..), SMax(..), SFirst(..), SLast(..),
+  SWrappedMonoid(..), SDual(..), SAll(..), SAny(..),
+  SSum(..), SProduct(..), SOption(..), SArg(..),
+  GetMin, GetMax, GetFirst, GetLast, UnwrapMonoid, GetDual,
   GetAll, GetAny, GetSum, GetProduct, GetOption,
 
-  SMin, SMax, SFirst, SLast, SWrappedMonoid, SDual,
-  SAll, SAny, SSum, SProduct, SOption, SArg,
-
   option_, sOption_, Option_,
 
   -- ** Defunctionalization symbols
@@ -78,7 +73,7 @@
 import Data.Singletons.Prelude.Maybe
 import Data.Singletons.Prelude.Monad.Internal
 import Data.Singletons.Prelude.Monoid hiding
-       (Sing(SFirst, SLast), SFirst, sGetFirst, SLast, sGetLast,
+       (SFirst(..), SLast(..),
         FirstSym0, FirstSym1, LastSym0, LastSym1,
         GetFirst,  GetFirstSym0, GetFirstSym1,
         GetLast,   GetLastSym0,  GetLastSym1)
diff --git a/src/Data/Singletons/Prelude/Semigroup/Internal.hs b/src/Data/Singletons/Prelude/Semigroup/Internal.hs
--- a/src/Data/Singletons/Prelude/Semigroup/Internal.hs
+++ b/src/Data/Singletons/Prelude/Semigroup/Internal.hs
@@ -7,6 +7,7 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
@@ -53,7 +54,7 @@
 import qualified Data.Text as T
 import Data.Void (Void)
 
-import GHC.TypeLits (AppendSymbol, SomeSymbol(..), someSymbolVal, Symbol)
+import GHC.TypeLits (AppendSymbol, SomeSymbol(..), someSymbolVal)
 
 import Unsafe.Coerce
 
@@ -75,6 +76,7 @@
         --
         sconcat :: NonEmpty a -> a
         sconcat (a :| as) = go a as where
+          go :: a -> [a] -> a
           go b (c:cs) = b <> go c cs
           go b []     = b
 
diff --git a/src/Data/Singletons/Prelude/Show.hs b/src/Data/Singletons/Prelude/Show.hs
--- a/src/Data/Singletons/Prelude/Show.hs
+++ b/src/Data/Singletons/Prelude/Show.hs
@@ -7,6 +7,7 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
diff --git a/src/Data/Singletons/Prelude/Traversable.hs b/src/Data/Singletons/Prelude/Traversable.hs
--- a/src/Data/Singletons/Prelude/Traversable.hs
+++ b/src/Data/Singletons/Prelude/Traversable.hs
@@ -7,6 +7,7 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
 {-# LANGUAGE UndecidableInstances #-}
@@ -54,7 +55,7 @@
 import Data.Singletons.Internal
 import Data.Singletons.Prelude.Base hiding (Const, ConstSym0)
 import Data.Singletons.Prelude.Const
-import Data.Singletons.Prelude.Foldable (PFoldable, SFoldable)
+import Data.Singletons.Prelude.Foldable (SFoldable)
 import Data.Singletons.Prelude.Functor
 import Data.Singletons.Prelude.Identity
 import Data.Singletons.Prelude.Instances
@@ -63,14 +64,16 @@
 import Data.Singletons.Single
 
 newtype StateL s a = StateL (s ~> (s, a))
-data instance Sing :: forall s a. StateL s a -> Type where
-  SStateL :: Sing x -> Sing ('StateL x)
+data SStateL :: forall s a. StateL s a -> Type where
+  SStateL :: Sing x -> SStateL ('StateL x)
+type instance Sing = SStateL
 data StateLSym0 :: forall s a. (s ~> (s, a)) ~> StateL s a
 type instance Apply StateLSym0 x = 'StateL x
 
 newtype StateR s a = StateR (s ~> (s, a))
-data instance Sing :: forall s a. StateR s a -> Type where
-  SStateR :: Sing x -> Sing ('StateR x)
+data SStateR :: forall s a. StateR s a -> Type where
+  SStateR :: Sing x -> SStateR ('StateR x)
+type instance Sing = SStateR
 data StateRSym0 :: forall s a. (s ~> (s, a)) ~> StateR s a
 type instance Apply StateRSym0 x = 'StateR x
 
diff --git a/src/Data/Singletons/Prelude/Tuple.hs b/src/Data/Singletons/Prelude/Tuple.hs
--- a/src/Data/Singletons/Prelude/Tuple.hs
+++ b/src/Data/Singletons/Prelude/Tuple.hs
@@ -1,5 +1,6 @@
 {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, DataKinds, PolyKinds,
-             RankNTypes, TypeFamilies, GADTs, UndecidableInstances #-}
+             RankNTypes, TypeFamilies, GADTs, UndecidableInstances,
+             TypeApplications #-}
 
 -----------------------------------------------------------------------------
 -- |
@@ -25,8 +26,8 @@
   -- * Singleton definitions
   -- | See 'Data.Singletons.Prelude.Sing' for more info.
 
-  Sing(STuple0, STuple2, STuple3, STuple4, STuple5, STuple6, STuple7),
-  STuple0, STuple2, STuple3, STuple4, STuple5, STuple6, STuple7,
+  Sing, STuple0(..), STuple2(..), STuple3(..),
+  STuple4(..), STuple5(..), STuple6(..), STuple7(..),
 
   -- * Singletons from @Data.Tuple@
   Fst, sFst, Snd, sSnd, Curry, sCurry, Uncurry, sUncurry, Swap, sSwap,
diff --git a/src/Data/Singletons/Prelude/Void.hs b/src/Data/Singletons/Prelude/Void.hs
--- a/src/Data/Singletons/Prelude/Void.hs
+++ b/src/Data/Singletons/Prelude/Void.hs
@@ -4,6 +4,7 @@
 {-# LANGUAGE PolyKinds #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE UndecidableInstances #-}
 -----------------------------------------------------------------------------
diff --git a/src/Data/Singletons/Promote.hs b/src/Data/Singletons/Promote.hs
--- a/src/Data/Singletons/Promote.hs
+++ b/src/Data/Singletons/Promote.hs
@@ -14,6 +14,10 @@
 import Language.Haskell.TH hiding ( Q, cxt )
 import Language.Haskell.TH.Syntax ( Quasi(..) )
 import Language.Haskell.TH.Desugar
+import qualified Language.Haskell.TH.Desugar.OMap.Strict as OMap
+import Language.Haskell.TH.Desugar.OMap.Strict (OMap)
+import qualified Language.Haskell.TH.Desugar.OSet as OSet
+import Language.Haskell.TH.Desugar.OSet (OSet)
 import Data.Singletons.Names
 import Data.Singletons.Promote.Monad
 import Data.Singletons.Promote.Eq
@@ -31,13 +35,10 @@
 import Control.Applicative (Alternative(..))
 import Control.Arrow (second)
 import Control.Monad
-import Control.Monad.Trans.Class (MonadTrans(..))
 import Control.Monad.Trans.Maybe
 import Control.Monad.Writer
 import qualified Data.Map.Strict as Map
 import Data.Map.Strict ( Map )
-import qualified Data.Set as Set
-import Data.Set ( Set )
 import Data.Maybe
 import qualified GHC.LanguageExtensions.Type as LangExt
 
@@ -141,7 +142,7 @@
 
 -- | Produce an instance for 'PShow' from the given type
 promoteShowInstance :: DsMonad q => Name -> q [Dec]
-promoteShowInstance = promoteInstance mkShowInstance "Show"
+promoteShowInstance = promoteInstance (mkShowInstance ForPromotion) "Show"
 
 -- | Produce an instance for @(==)@ (type-level equality) from the given type
 promoteEqInstance :: DsMonad q => Name -> q [Dec]
@@ -163,7 +164,7 @@
   cons' <- concatMapM (dsCon tvbs' data_ty) cons
   let data_decl = DataDecl name tvbs' cons'
   raw_inst <- mk_inst Nothing data_ty data_decl
-  decs <- promoteM_ [] $ void $ promoteInstanceDec Map.empty raw_inst
+  decs <- promoteM_ [] $ void $ promoteInstanceDec OMap.empty raw_inst
   return $ decsToTH decs
 
 promoteInfo :: DInfo -> PrM ()
@@ -256,12 +257,12 @@
   let_dec_env <- buildLetDecEnv decls
   all_locals <- allLocals
   let binds = [ (name, foldType (DConT sym) (map DVarT all_locals))
-              | name <- Map.keys $ lde_defns let_dec_env
+              | (name, _) <- OMap.assocs $ lde_defns let_dec_env
               , let proName = promoteValNameLhsPrefix prefixes name
                     sym = promoteTySym proName (length all_locals) ]
   (decs, let_dec_env') <- letBind binds $ promoteLetDecEnv prefixes let_dec_env
   emitDecs decs
-  return (binds, let_dec_env' { lde_proms = Map.fromList binds })
+  return (binds, let_dec_env' { lde_proms = OMap.fromList binds })
 
 -- Promotion of data types to kinds is automatic (see "Giving Haskell a
 -- Promotion" paper for more details). Here we "plug into" the promotion
@@ -297,8 +298,7 @@
 
 promoteClassDec :: UClassDecl
                 -> PrM AClassDecl
-promoteClassDec decl@(ClassDecl { cd_cxt  = cxt
-                                , cd_name = cls_name
+promoteClassDec decl@(ClassDecl { cd_name = cls_name
                                 , cd_tvbs = tvbs'
                                 , cd_fds  = fundeps
                                 , cd_lde  = lde@LetDecEnv
@@ -309,31 +309,30 @@
     -- a workaround for GHC Trac #12928; see Note [CUSKification]
     tvbs = map cuskify tvbs'
   let pClsName = promoteClassName cls_name
-  pCxt <- mapM promote_superclass_pred cxt
   forallBind cls_kvs_to_bind $ do
-    sig_decs <- mapM (uncurry promote_sig) (Map.toList meth_sigs)
-    let defaults_list  = Map.toList defaults
+    sig_decs <- mapM (uncurry promote_sig) (OMap.assocs meth_sigs)
+    let defaults_list  = OMap.assocs defaults
         defaults_names = map fst defaults_list
     (default_decs, ann_rhss, prom_rhss)
-      <- mapAndUnzip3M (promoteMethod Map.empty Nothing meth_sigs) defaults_list
+      <- mapAndUnzip3M (promoteMethod OMap.empty Nothing meth_sigs) defaults_list
 
     let infix_decls' = catMaybes $ map (uncurry promoteInfixDecl)
-                                 $ Map.toList infix_decls
+                                 $ OMap.assocs infix_decls
 
     -- no need to do anything to the fundeps. They work as is!
-    emitDecs [DClassD pCxt pClsName tvbs fundeps
+    emitDecs [DClassD [] pClsName tvbs fundeps
                       (sig_decs ++ default_decs ++ infix_decls')]
     let defaults_list'   = zip defaults_names ann_rhss
         proms            = zip defaults_names prom_rhss
         cls_kvs_to_bind' = cls_kvs_to_bind <$ meth_sigs
-    return (decl { cd_lde = lde { lde_defns     = Map.fromList defaults_list'
-                                , lde_proms     = Map.fromList proms
+    return (decl { cd_lde = lde { lde_defns     = OMap.fromList defaults_list'
+                                , lde_proms     = OMap.fromList proms
                                 , lde_bound_kvs = cls_kvs_to_bind' } })
   where
-    cls_kvb_names, cls_tvb_names, cls_kvs_to_bind :: Set Name
+    cls_kvb_names, cls_tvb_names, cls_kvs_to_bind :: OSet Name
     cls_kvb_names   = foldMap (foldMap fvDType . extractTvbKind) tvbs'
-    cls_tvb_names   = Set.fromList $ map extractTvbName tvbs'
-    cls_kvs_to_bind = cls_kvb_names `Set.union` cls_tvb_names
+    cls_tvb_names   = OSet.fromList $ map extractTvbName tvbs'
+    cls_kvs_to_bind = cls_kvb_names `OSet.union` cls_tvb_names
 
     promote_sig :: Name -> DType -> PrM DDec
     promote_sig name ty = do
@@ -348,19 +347,8 @@
                                                  (DKindSig resK)
                                                  Nothing)
 
-    promote_superclass_pred :: DPred -> PrM DPred
-    promote_superclass_pred = go
-      where
-      go (DForallPr {}) = fail "Cannot promote quantified constraints"
-      go (DAppPr pr ty) = DAppPr <$> go pr <*> promoteType ty
-      go (DSigPr pr _k) = go pr    -- just ignore the kind; it can't matter
-      go (DVarPr name)  = fail $ "Cannot promote ConstraintKinds variables like "
-                              ++ show name
-      go (DConPr name)  = return $ DConPr (promoteClassName name)
-      go DWildCardPr    = return DWildCardPr
-
 -- returns (unpromoted method name, ALetDecRHS) pairs
-promoteInstanceDec :: Map Name DType -> UInstDecl -> PrM AInstDecl
+promoteInstanceDec :: OMap Name DType -> UInstDecl -> PrM AInstDecl
 promoteInstanceDec orig_meth_sigs
                    decl@(InstDecl { id_name     = cls_name
                                   , id_arg_tys  = inst_tys
@@ -372,8 +360,8 @@
   forallBind kvs_to_bind $ do
     let subst = Map.fromList $ zip cls_tvb_names inst_kis
     (meths', ann_rhss, _) <- mapAndUnzip3M (promoteMethod inst_sigs (Just subst) orig_meth_sigs) meths
-    emitDecs [DInstanceD Nothing [] (foldType (DConT pClsName)
-                                      inst_kis) meths']
+    emitDecs [DInstanceD Nothing Nothing [] (foldType (DConT pClsName)
+                                              inst_kis) meths']
     return (decl { id_meths = zip (map fst meths) ann_rhss })
   where
     pClsName = promoteClassName cls_name
@@ -430,19 +418,16 @@
 that's in the type namespace) and _then_ reifies it.
 -}
 
-promoteMethod :: Map Name DType -- InstanceSigs for methods
+promoteMethod :: OMap Name DType -- InstanceSigs for methods
               -> Maybe (Map Name DKind)
                     -- ^ instantiations for class tyvars (Nothing for default decls)
                     --   See Note [Promoted class method kinds]
-              -> Map Name DType     -- method types
+              -> OMap Name DType    -- method types
               -> (Name, ULetDecRHS)
               -> PrM (DDec, ALetDecRHS, DType)
                  -- returns (type instance, ALetDecRHS, promoted RHS)
 promoteMethod inst_sigs_map m_subst orig_sigs_map (meth_name, meth_rhs) = do
   (meth_arg_kis, meth_res_ki) <- lookup_meth_ty
-  ((_, _, _, eqns), _defuns, ann_rhs)
-    <- promoteLetDecRHS (Just (meth_arg_kis, meth_res_ki)) Map.empty Map.empty
-                        noPrefix meth_name meth_rhs
   meth_arg_tvs <- mapM (const $ qNewName "a") meth_arg_kis
   let helperNameBase = case nameBase proName of
                          first:_ | not (isHsLetter first) -> "TFHelper"
@@ -462,17 +447,21 @@
       -- strictly necessary, as kind inference can figure them out just as well.
       family_args = map DVarT meth_arg_tvs
   helperName <- newUniqueName helperNameBase
+  let proHelperName = promoteValNameLhs helperName
+  ((_, _, _, eqns), _defuns, ann_rhs)
+    <- promoteLetDecRHS (Just (meth_arg_kis, meth_res_ki)) OMap.empty OMap.empty
+                        noPrefix helperName meth_rhs
   let tvbs = zipWith DKindedTV meth_arg_tvs meth_arg_kis
   emitDecs [DClosedTypeFamilyD (DTypeFamilyHead
-                                  helperName
+                                  proHelperName
                                   tvbs
                                   (DKindSig meth_res_ki)
                                   Nothing)
                                eqns]
-  emitDecsM (defunctionalize helperName Nothing tvbs (Just meth_res_ki))
+  emitDecsM (defunctionalize proHelperName Nothing tvbs (Just meth_res_ki))
   return ( DTySynInstD
-             proName
-             (DTySynEqn family_args
+             (DTySynEqn Nothing
+                        (foldType (DConT proName) family_args)
                         (foldApply (promoteValRhs helperName) (map DVarT meth_arg_tvs)))
          , ann_rhs
          , DConT (promoteTySym helperName 0) )
@@ -481,7 +470,7 @@
 
     lookup_meth_ty :: PrM ([DKind], DKind)
     lookup_meth_ty =
-      case Map.lookup meth_name inst_sigs_map of
+      case OMap.lookup meth_name inst_sigs_map of
         Just ty ->
           -- We have an InstanceSig. These are easy: no substitution for clas
           -- variables is required at all!
@@ -490,7 +479,7 @@
           -- We don't have an InstanceSig, so we must compute the kind to use
           -- ourselves (possibly substituting for class variables below).
           (arg_kis, res_ki) <-
-            case Map.lookup meth_name orig_sigs_map of
+            case OMap.lookup meth_name orig_sigs_map of
               Nothing -> do
                 mb_info <- dsReifyTypeNameInfo proName
                            -- See Note [Using dsReifyTypeNameInfo when promoting instances]
@@ -551,10 +540,10 @@
                                      , lde_types = type_env
                                      , lde_infix = fix_env }) = do
   let infix_decls = catMaybes $ map (uncurry promoteInfixDecl)
-                              $ Map.toList fix_env
+                              $ OMap.assocs fix_env
 
     -- promote all the declarations, producing annotated declarations
-  let (names, rhss) = unzip $ Map.toList value_env
+  let (names, rhss) = unzip $ OMap.assocs value_env
   (payloads, defun_decss, ann_rhss)
     <- fmap unzip3 $ zipWithM (promoteLetDecRHS Nothing type_env fix_env prefixes) names rhss
 
@@ -563,11 +552,11 @@
   let decs = map payload_to_dec payloads ++ infix_decls
 
     -- build the ALetDecEnv
-  let let_dec_env' = LetDecEnv { lde_defns     = Map.fromList $ zip names ann_rhss
+  let let_dec_env' = LetDecEnv { lde_defns     = OMap.fromList $ zip names ann_rhss
                                , lde_types     = type_env
                                , lde_infix     = fix_env
-                               , lde_proms     = Map.empty   -- filled in promoteLetDecs
-                               , lde_bound_kvs = Map.fromList $ map (, bound_kvs) names }
+                               , lde_proms     = OMap.empty  -- filled in promoteLetDecs
+                               , lde_bound_kvs = OMap.fromList $ map (, bound_kvs) names }
 
   return (decs, let_dec_env')
   where
@@ -583,11 +572,8 @@
    -- If a name and its promoted counterpart are the same (modulo module
    -- prefixes), then there's no need to promote a fixity declaration for
    -- that name, since the existing fixity declaration will cover both
-   -- the term- and type-level versions of that name,
-   --
-   -- Names that fall into this category include data constructor names
-   -- and infix names, with the exceptions of (.) and (!).
-   -- See Note [Special cases for (.) and (!)] in Data.Singletons.Names.
+   -- the term- and type-level versions of that name. Names that fall into this
+   -- category include data constructor names and infix names.
  = Nothing
  | otherwise
  = Just $ DLetDec $ DInfixD fixity promoted_name
@@ -599,8 +585,8 @@
 -- an intermediate structure. Perhaps a better design is available.
 promoteLetDecRHS :: Maybe ([DKind], DKind)  -- the promoted type of the RHS (if known)
                                             -- needed to fix #136
-                 -> Map Name DType       -- local type env't
-                 -> Map Name Fixity      -- local fixity env't
+                 -> OMap Name DType      -- local type env't
+                 -> OMap Name Fixity     -- local fixity env't
                  -> (String, String)     -- let-binding prefixes
                  -> Name                 -- name of the thing being promoted
                  -> ULetDecRHS           -- body of the thing
@@ -612,7 +598,7 @@
     <- case m_rhs_ki of
          Just (arg_kis, res_ki) -> return ( Just (ravelTyFun (arg_kis ++ [res_ki]))
                                           , length arg_kis )
-         _ |  Just ty <- Map.lookup name type_env
+         _ |  Just ty <- OMap.lookup name type_env
            -> do ki <- promoteType ty
                  return (Just ki, countArgs ty)
            |  otherwise
@@ -623,18 +609,18 @@
       let lde_kvs_to_bind = foldMap fvDType res_kind
       (exp', ann_exp) <- forallBind lde_kvs_to_bind $ promoteExp exp
       let proName = promoteValNameLhsPrefix prefixes name
-          m_fixity = Map.lookup name fix_env
+          m_fixity = OMap.lookup name fix_env
           tvbs = map DPlainTV all_locals
       defuns <- defunctionalize proName m_fixity tvbs res_kind
       return ( ( proName, tvbs, res_kind
-               , [DTySynEqn (map DVarT all_locals) exp'] )
+               , [DTySynEqn Nothing (foldType (DConT proName) $ map DVarT all_locals) exp'] )
              , defuns
              , AValue (foldType (DConT proName) (map DVarT all_locals))
                       num_arrows ann_exp )
     _ -> do
       names <- replicateM num_arrows (newUniqueName "a")
-      let pats    = map DVarPa names
-          newArgs = map DVarE  names
+      let pats    = map DVarP names
+          newArgs = map DVarE names
       promoteLetDecRHS m_rhs_ki type_env fix_env prefixes name
                        (UFunction [DClause pats (foldExp exp newArgs)])
 
@@ -642,7 +628,7 @@
   numArgs <- count_args clauses
   (m_argKs, m_resK, ty_num_args) <- case m_rhs_ki of
     Just (arg_kis, res_ki) -> return (map Just arg_kis, Just res_ki, length arg_kis)
-    _ |  Just ty <- Map.lookup name type_env
+    _ |  Just ty <- OMap.lookup name type_env
       -> do
       -- promoteType turns arrows into TyFun. So, we unravel first to
       -- avoid this behavior. Note the use of ravelTyFun in resultK
@@ -654,7 +640,7 @@
       |  otherwise
       -> return (replicate numArgs Nothing, Nothing, numArgs)
   let proName  = promoteValNameLhsPrefix prefixes name
-      m_fixity = Map.lookup name fix_env
+      m_fixity = OMap.lookup name fix_env
   all_locals <- allLocals
   let local_tvbs = map DPlainTV all_locals
   tyvarNames <- mapM (const $ qNewName "a") m_argKs
@@ -664,7 +650,7 @@
   expClauses <- mapM (etaContractOrExpand ty_num_args numArgs) clauses
   let lde_kvs_to_bind = foldMap (foldMap fvDType) m_argKs <> foldMap fvDType m_resK
   (eqns, ann_clauses) <- forallBind lde_kvs_to_bind $
-                         mapAndUnzipM promoteClause expClauses
+                         mapAndUnzipM (promoteClause proName) expClauses
   prom_fun <- lookupVarE name
   return ( (proName, all_args, m_resK, eqns)
          , defun_decs
@@ -675,8 +661,8 @@
     etaContractOrExpand ty_num_args clause_num_args (DClause pats exp)
       | n >= 0 = do -- Eta-expand
           names <- replicateM n (newUniqueName "a")
-          let newPats = map DVarPa names
-              newArgs = map DVarE  names
+          let newPats = map DVarP names
+              newArgs = map DVarE names
           return $ DClause (pats ++ newPats) (foldExp exp newArgs)
       | otherwise = do -- Eta-contract
           let (clausePats, lamPats) = splitAt ty_num_args pats
@@ -688,8 +674,8 @@
     count_args (DClause pats _ : _) = return $ length pats
     count_args _ = fail $ "Impossible! A function without clauses."
 
-promoteClause :: DClause -> PrM (DTySynEqn, ADClause)
-promoteClause (DClause pats exp) = do
+promoteClause :: Name -> DClause -> PrM (DTySynEqn, ADClause)
+promoteClause proName (DClause pats exp) = do
   -- promoting the patterns creates variable bindings. These are passed
   -- to the function promoted the RHS
   ((types, pats'), prom_pat_infos) <- evalForPair $ mapAndUnzipM promotePat pats
@@ -699,11 +685,11 @@
                    lambdaBind new_vars $
                    promoteExp exp
   all_locals <- allLocals   -- these are bound *outside* of this clause
-  return ( DTySynEqn (map DVarT all_locals ++ types) ty
+  return ( DTySynEqn Nothing (foldType (DConT proName) $ map DVarT all_locals ++ types) ty
          , ADClause new_vars pats' ann_exp )
 
-promoteMatch :: DMatch -> PrM (DTySynEqn, ADMatch)
-promoteMatch (DMatch pat exp) = do
+promoteMatch :: Name -> DMatch -> PrM (DTySynEqn, ADMatch)
+promoteMatch caseTFName (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
@@ -713,32 +699,34 @@
                     lambdaBind new_vars $
                     promoteExp exp
   all_locals <- allLocals
-  return $ ( DTySynEqn (map DVarT all_locals ++ [ty]) rhs
+  return $ ( DTySynEqn Nothing
+                       (foldType (DConT caseTFName) $ map DVarT all_locals ++ [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 (DLitPa lit) = (, ADLitPa lit) <$> promoteLitPat lit
-promotePat (DVarPa name) = do
+promotePat (DLitP lit) = (, ADLitP lit) <$> promoteLitPat lit
+promotePat (DVarP name) = do
       -- term vars can be symbols... type vars can't!
   tyName <- mkTyName name
-  tell $ PromDPatInfos [(name, tyName)] Set.empty
-  return (DVarT tyName, ADVarPa name)
-promotePat (DConPa name pats) = do
+  tell $ PromDPatInfos [(name, tyName)] OSet.empty
+  return (DVarT tyName, ADVarP name)
+promotePat (DConP name pats) = do
   (types, pats') <- mapAndUnzipM promotePat pats
   let name' = unboxed_tuple_to_tuple name
-  return (foldType (DConT name') types, ADConPa name pats')
+  return (foldType (DConT name') types, ADConP name pats')
   where
     unboxed_tuple_to_tuple n
       | Just deg <- unboxedTupleNameDegree_maybe n = tupleDataName deg
       | otherwise                                  = n
-promotePat (DTildePa pat) = do
+promotePat (DTildeP pat) = do
   qReportWarning "Lazy pattern converted into regular pattern in promotion"
-  second ADTildePa <$> promotePat pat
-promotePat (DBangPa pat) = do
+  second ADTildeP <$> promotePat pat
+promotePat (DBangP pat) = do
   qReportWarning "Strict pattern converted into regular pattern in promotion"
-  second ADBangPa <$> promotePat pat
-promotePat (DSigPa pat ty) = do
+  second ADBangP <$> promotePat pat
+promotePat (DSigP pat ty) = do
   -- We must maintain the invariant that any promoted pattern signature must
   -- not have any wildcards in the underlying pattern.
   -- See Note [Singling pattern signatures].
@@ -746,8 +734,8 @@
   (promoted, pat') <- promotePat wildless_pat
   ki <- promoteType ty
   tell $ PromDPatInfos [] (fvDType ki)
-  return (DSigT promoted ki, ADSigPa promoted pat' ki)
-promotePat DWildPa = return (DWildCardT, ADWildPa)
+  return (DSigT promoted ki, ADSigP promoted pat' ki)
+promotePat DWildP = return (DWildCardT, ADWildP)
 
 promoteExp :: DExp -> PrM (DType, ADExp)
 promoteExp (DVarE name) = fmap (, ADVarE name) $ lookupVarE name
@@ -775,7 +763,9 @@
                                  tvbs
                                  DNoSig
                                  Nothing)
-                               [DTySynEqn (map DVarT (all_locals ++ tyNames))
+                               [DTySynEqn Nothing
+                                          (foldType (DConT lambdaName) $
+                                           map DVarT (all_locals ++ tyNames))
                                           rhs]]
   emitDecsM $ defunctionalize lambdaName Nothing tvbs Nothing
   let promLambda = foldl apply (DConT (promoteTySym lambdaName 0))
@@ -786,7 +776,7 @@
   all_locals <- allLocals
   let prom_case = foldType (DConT caseTFName) (map DVarT all_locals)
   (exp', ann_exp)     <- promoteExp exp
-  (eqns, ann_matches) <- mapAndUnzipM promoteMatch matches
+  (eqns, ann_matches) <- mapAndUnzipM (promoteMatch caseTFName) matches
   tyvarName  <- qNewName "t"
   let all_args = all_locals ++ [tyvarName]
       tvbs     = map DPlainTV all_args
@@ -804,7 +794,7 @@
 promoteExp (DSigE exp ty) = do
   (exp', ann_exp) <- promoteExp exp
   ty' <- promoteType ty
-  return (DSigT exp' ty', ADSigE exp' ann_exp ty)
+  return (DSigT exp' ty', ADSigE exp' ann_exp ty')
 promoteExp e@(DStaticE _) = fail ("Static expressions cannot be promoted: " ++ show e)
 
 promoteLitExp :: Quasi q => Lit -> q DType
@@ -821,7 +811,7 @@
 promoteLitExp lit =
   fail ("Only string and natural number literals can be promoted: " ++ show lit)
 
-promoteLitPat :: Monad m => Lit -> m DType
+promoteLitPat :: MonadFail m => Lit -> m DType
 promoteLitPat (IntegerL n)
   | n >= 0    = return $ (DLitT (NumTyLit n))
   | otherwise =
diff --git a/src/Data/Singletons/Promote/Defun.hs b/src/Data/Singletons/Promote/Defun.hs
--- a/src/Data/Singletons/Promote/Defun.hs
+++ b/src/Data/Singletons/Promote/Defun.hs
@@ -11,6 +11,7 @@
 module Data.Singletons.Promote.Defun where
 
 import Language.Haskell.TH.Desugar
+import qualified Language.Haskell.TH.Desugar.OSet as OSet
 import Data.Singletons.Promote.Monad
 import Data.Singletons.Promote.Type
 import Data.Singletons.Names
@@ -18,10 +19,10 @@
 import Data.Singletons.Syntax
 import Data.Singletons.Util
 import Control.Monad
+import Data.Foldable
 import qualified Data.Map.Strict as Map
 import Data.Map.Strict (Map)
 import Data.Maybe
-import qualified Data.Set as Set
 
 defunInfo :: DInfo -> PrM [DDec]
 defunInfo (DTyConI dec _instances) = buildDefunSyms dec
@@ -41,7 +42,7 @@
                -> PrM ()
 defunTypeDecls ty_syns c_tyfams o_tyfams = do
   defun_ty_syns <-
-    concatMapM (\(TySynDecl name tvbs) -> buildDefunSymsTySynD name tvbs) ty_syns
+    concatMapM (\(TySynDecl name tvbs rhs) -> buildDefunSymsTySynD name tvbs rhs) ty_syns
   defun_c_tyfams <-
     concatMapM (buildDefunSymsClosedTypeFamilyD . getTypeFamilyDecl) c_tyfams
   defun_o_tyfams <-
@@ -55,8 +56,8 @@
   buildDefunSymsClosedTypeFamilyD tf_head
 buildDefunSyms (DOpenTypeFamilyD tf_head) =
   buildDefunSymsOpenTypeFamilyD tf_head
-buildDefunSyms (DTySynD name tvbs _type) =
-  buildDefunSymsTySynD name tvbs
+buildDefunSyms (DTySynD name tvbs rhs) =
+  buildDefunSymsTySynD name tvbs rhs
 buildDefunSyms (DClassD _cxt name tvbs _fundeps _members) = do
   defunReifyFixity name tvbs (Just (DConT constraintName))
 buildDefunSyms _ = fail $ "Defunctionalization symbols can only be built for " ++
@@ -82,9 +83,18 @@
       res_kind = default_kind (resultSigToMaybeKind result_sig)
   defunReifyFixity name arg_tvbs res_kind
 
-buildDefunSymsTySynD :: Name -> [DTyVarBndr] -> PrM [DDec]
-buildDefunSymsTySynD name tvbs =
-  defunReifyFixity name tvbs Nothing
+buildDefunSymsTySynD :: Name -> [DTyVarBndr] -> DType -> PrM [DDec]
+buildDefunSymsTySynD name tvbs rhs =
+  defunReifyFixity name tvbs mb_res_kind
+  where
+    -- In order to have a CUSK, a type synonym must annotate its right-hand
+    -- side with an explicit kind signature, so we can make use of this
+    -- property to determine the result kind when defunctionalizing the
+    -- type synonym.
+    mb_res_kind :: Maybe DKind
+    mb_res_kind = case rhs of
+                    DSigT _ k -> Just k
+                    _         -> Nothing
 
 buildDefunSymsDataD :: [DCon] -> PrM [DDec]
 buildDefunSymsDataD ctors =
@@ -173,10 +183,9 @@
                           -- Note [Defunctionalization and dependent quantification]
                           map (map_tvb_kind (substType tvb_to_type_map)) $
                           reverse m_args
-            tyfun_param = mk_tvb tyfun_name m_tyfun
             arg_names   = map extractTvbName arg_params
-            params      = arg_params ++ [tyfun_param]
-            con_eq_ct   = DConPr sameKindName `DAppPr` lhs `DAppPr` rhs
+            params      = arg_params ++ [DPlainTV tyfun_name]
+            con_eq_ct   = DConT sameKindName `DAppT` lhs `DAppT` rhs
               where
                 lhs = foldType (DConT data_name) (map DVarT arg_names) `apply` (DVarT extra_name)
                 rhs = foldType (DConT next_name) (map DVarT (arg_names ++ [extra_name]))
@@ -193,23 +202,26 @@
                                     -- If we cannot infer the return type, don't bother
                                     -- trying to construct an explicit return kind.
                       Just tyfun ->
-                        let bound_tvs = Set.fromList (map extractTvbName arg_params) `Set.union`
-                                        foldMap (foldMap fvDType) (map extractTvbKind arg_params)
-                            not_bound tvb = not (extractTvbName tvb `Set.member` bound_tvs)
+                        let bound_tvs = OSet.fromList (map extractTvbName arg_params)
+                                        `OSet.union` foldMap (foldMap fvDType)
+                                                             (map extractTvbKind arg_params)
+                            not_bound tvb = not (extractTvbName tvb `OSet.member` bound_tvs)
                             tvb_to_type tvb_name = fromMaybe (DVarT tvb_name) $
                                                    Map.lookup tvb_name tvb_to_type_map
                             -- Implements part (2)(iii) from
                             -- Note [Defunctionalization and dependent quantification]
-                            tyfun_tvbs = filter not_bound $         -- (2)(iii)(d)
-                                         toposortTyVarsOf $         -- (2)(iii)(c)
-                                         map tvb_to_type $          -- (2)(iii)(b)
-                                         Set.toList $ fvDType tyfun -- (2)(iii)(a)
+                            tyfun_tvbs = filter not_bound $     -- (2)(iii)(d)
+                                         toposortTyVarsOf $     -- (2)(iii)(c)
+                                         map tvb_to_type $      -- (2)(iii)(b)
+                                         toList $ fvDType tyfun -- (2)(iii)(a)
                         in (arg_params, Just (DForallT tyfun_tvbs [] tyfun))
             app_data_ty = foldTypeTvbs (DConT data_name) m_args
-            app_eqn     = DTySynEqn [app_data_ty, DVarT tyfun_name]
+            app_eqn     = DTySynEqn Nothing
+                                    (DConT applyName `DAppT` app_data_ty
+                                                     `DAppT` DVarT tyfun_name)
                                     (mk_rhs (m_args ++ [DPlainTV tyfun_name]))
-            app_decl    = DTySynInstD applyName app_eqn
-            suppress    = DInstanceD Nothing []
+            app_decl    = DTySynInstD app_eqn
+            suppress    = DInstanceD Nothing Nothing []
                             (DConT suppressClassName `DAppT` app_data_ty)
                             [DLetDec $ DFunD suppressMethodName
                                              [DClause []
@@ -234,10 +246,6 @@
   other_decs <- go (num_args - 1) (reverse m_arg_tvbs) m_res_kind mk_rhs
   return $ sat_dec : other_decs
   where
-    mk_tvb :: Name -> Maybe DKind -> DTyVarBndr
-    mk_tvb tvb_name Nothing  = DPlainTV tvb_name
-    mk_tvb tvb_name (Just k) = DKindedTV tvb_name k
-
     eta_expand :: [DTyVarBndr] -> Maybe DKind -> PrM ([DTyVarBndr], Maybe DKind)
     eta_expand m_arg_tvbs Nothing = pure (m_arg_tvbs, Nothing)
     eta_expand m_arg_tvbs (Just res_kind) = do
diff --git a/src/Data/Singletons/Promote/Eq.hs b/src/Data/Singletons/Promote/Eq.hs
--- a/src/Data/Singletons/Promote/Eq.hs
+++ b/src/Data/Singletons/Promote/Eq.hs
@@ -22,9 +22,9 @@
   helperName <- newUniqueName "Equals"
   aName <- qNewName "a"
   bName <- qNewName "b"
-  true_branches <- mapM mk_branch cons
-  let null_branch  = catch_all_case trueName
-      false_branch = catch_all_case falseName
+  true_branches <- mapM (mk_branch helperName) cons
+  let null_branch  = catch_all_case helperName trueName
+      false_branch = catch_all_case helperName falseName
       branches | null cons = [null_branch]
                | otherwise = true_branches ++ [false_branch]
       closedFam = DClosedTypeFamilyD (DTypeFamilyHead helperName
@@ -37,16 +37,17 @@
                                                       (DKindSig boolKi)
                                                       Nothing)
                                      branches
-      eqInst = DTySynInstD tyEqName (DTySynEqn [DVarT aName, DVarT bName]
-                                             (foldType (DConT helperName)
-                                                       [DVarT aName, DVarT bName]))
-      inst = DInstanceD Nothing [] ((DConT $ promoteClassName eqName) `DAppT`
-                                    kind) [eqInst]
+      eqInst = DTySynInstD $
+               DTySynEqn Nothing
+                         (DConT tyEqName `DAppT` DVarT aName `DAppT` DVarT bName)
+                         (foldType (DConT helperName) [DVarT aName, DVarT bName])
+      inst = DInstanceD Nothing Nothing [] ((DConT $ promoteClassName eqName) `DAppT`
+                                            kind) [eqInst]
 
   return [closedFam, inst]
 
-  where mk_branch :: Quasi q => DCon -> q DTySynEqn
-        mk_branch con = do
+  where mk_branch :: Quasi q => Name -> DCon -> q DTySynEqn
+        mk_branch helper_name con = do
           let (name, numArgs) = extractNameArgs con
           lnames <- replicateM numArgs (qNewName "a")
           rnames <- replicateM numArgs (qNewName "b")
@@ -56,11 +57,16 @@
               rtype = foldType (DConT name) rvars
               results = zipWith (\l r -> foldType (DConT tyEqName) [l, r]) lvars rvars
               result = tyAll results
-          return $ DTySynEqn [ltype, rtype] result
+          return $ DTySynEqn Nothing
+                             (DConT helper_name `DAppT` ltype `DAppT` rtype)
+                             result
 
-        catch_all_case :: Name -> DTySynEqn
-        catch_all_case returned_val_name =
-          DTySynEqn [DSigT DWildCardT kind, DSigT DWildCardT kind]
+        catch_all_case :: Name -> Name -> DTySynEqn
+        catch_all_case helper_name returned_val_name =
+          DTySynEqn Nothing
+                    (DConT helper_name
+                       `DAppT` DSigT DWildCardT kind
+                       `DAppT` DSigT DWildCardT kind)
                     (promoteValRhs returned_val_name)
 
         tyAll :: [DType] -> DType -- "all" at the type level
diff --git a/src/Data/Singletons/Promote/Monad.hs b/src/Data/Singletons/Promote/Monad.hs
--- a/src/Data/Singletons/Promote/Monad.hs
+++ b/src/Data/Singletons/Promote/Monad.hs
@@ -9,8 +9,8 @@
 of DDec, and is wrapped around a Q.
 -}
 
-{-# LANGUAGE GeneralizedNewtypeDeriving, StandaloneDeriving,
-             FlexibleContexts, TypeFamilies, KindSignatures #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleContexts,
+             TypeFamilies, KindSignatures #-}
 
 module Data.Singletons.Promote.Monad (
   PrM, promoteM, promoteM_, promoteMDecs, VarPromotions,
@@ -20,30 +20,29 @@
 
 import Control.Monad.Reader
 import Control.Monad.Writer
-import qualified Data.Map.Strict as Map
-import Data.Map.Strict ( Map )
-import qualified Data.Set as Set
-import Data.Set ( Set )
 import Language.Haskell.TH.Syntax hiding ( lift )
 import Language.Haskell.TH.Desugar
+import qualified Language.Haskell.TH.Desugar.OMap.Strict as OMap
+import Language.Haskell.TH.Desugar.OMap.Strict (OMap)
+import qualified Language.Haskell.TH.Desugar.OSet as OSet
+import Language.Haskell.TH.Desugar.OSet (OSet)
 import Data.Singletons.Names
 import Data.Singletons.Syntax
-import Control.Monad.Fail ( MonadFail )
 
-type LetExpansions = Map Name DType  -- from **term-level** name
+type LetExpansions = OMap Name DType  -- from **term-level** name
 
 -- environment during promotion
 data PrEnv =
-  PrEnv { pr_lambda_bound :: Map Name Name
+  PrEnv { pr_lambda_bound :: OMap Name Name
         , pr_let_bound    :: LetExpansions
-        , pr_forall_bound :: Set Name -- See Note [Explicitly quantifying kinds variables]
+        , pr_forall_bound :: OSet Name -- See Note [Explicitly quantifying kinds variables]
         , pr_local_decls  :: [Dec]
         }
 
 emptyPrEnv :: PrEnv
-emptyPrEnv = PrEnv { pr_lambda_bound = Map.empty
-                   , pr_let_bound    = Map.empty
-                   , pr_forall_bound = Set.empty
+emptyPrEnv = PrEnv { pr_lambda_bound = OMap.empty
+                   , pr_let_bound    = OMap.empty
+                   , pr_forall_bound = OSet.empty
                    , pr_local_decls  = [] }
 
 -- the promotion monad
@@ -58,12 +57,12 @@
 -- return *type-level* names
 allLocals :: MonadReader PrEnv m => m [Name]
 allLocals = do
-  lambdas <- asks (Map.toList . pr_lambda_bound)
+  lambdas <- asks (OMap.assocs . pr_lambda_bound)
   lets    <- asks pr_let_bound
     -- filter out shadowed variables!
   return [ typeName
          | (termName, typeName) <- lambdas
-         , case Map.lookup termName lets of
+         , case OMap.lookup termName lets of
              Just (DVarT typeName') | typeName' == typeName -> True
              _                                              -> False ]
 
@@ -81,33 +80,33 @@
 lambdaBind binds = local add_binds
   where add_binds env@(PrEnv { pr_lambda_bound = lambdas
                              , pr_let_bound    = lets }) =
-          let new_lets = Map.fromList [ (tmN, DVarT tyN) | (tmN, tyN) <- binds ] in
-          env { pr_lambda_bound = Map.union (Map.fromList binds) lambdas
-              , pr_let_bound    = Map.union new_lets lets }
+          let new_lets = OMap.fromList [ (tmN, DVarT tyN) | (tmN, tyN) <- binds ] in
+          env { pr_lambda_bound = OMap.fromList binds `OMap.union` lambdas
+              , pr_let_bound    = new_lets            `OMap.union` lets }
 
 type LetBind = (Name, DType)
 letBind :: [LetBind] -> PrM a -> PrM a
 letBind binds = local add_binds
   where add_binds env@(PrEnv { pr_let_bound = lets }) =
-          env { pr_let_bound = Map.union (Map.fromList binds) lets }
+          env { pr_let_bound = OMap.fromList binds `OMap.union` lets }
 
 lookupVarE :: Name -> PrM DType
 lookupVarE n = do
   lets <- asks pr_let_bound
-  case Map.lookup n lets of
+  case OMap.lookup n lets of
     Just ty -> return ty
     Nothing -> return $ promoteValRhs n
 
 -- Add to the set of bound kind variables currently in scope.
 -- See Note [Explicitly binding kind variables]
-forallBind :: Set Name -> PrM a -> PrM a
+forallBind :: OSet Name -> PrM a -> PrM a
 forallBind kvs1 =
   local (\env@(PrEnv { pr_forall_bound = kvs2 }) ->
-    env { pr_forall_bound = kvs1 `Set.union` kvs2 })
+    env { pr_forall_bound = kvs1 `OSet.union` kvs2 })
 
 -- Look up the set of bound kind variables currently in scope.
 -- See Note [Explicitly binding kind variables]
-allBoundKindVars :: PrM (Set Name)
+allBoundKindVars :: PrM (OSet Name)
 allBoundKindVars = asks pr_forall_bound
 
 promoteM :: DsMonad q => [Dec] -> PrM a -> q (a, [DDec])
diff --git a/src/Data/Singletons/Promote/Type.hs b/src/Data/Singletons/Promote/Type.hs
--- a/src/Data/Singletons/Promote/Type.hs
+++ b/src/Data/Singletons/Promote/Type.hs
@@ -6,19 +6,20 @@
 This file implements promotion of types into kinds.
 -}
 
-module Data.Singletons.Promote.Type ( promoteType, promoteUnraveled ) where
+module Data.Singletons.Promote.Type
+  ( promoteType, promoteTypeArg, promoteUnraveled
+  ) where
 
 import Language.Haskell.TH.Desugar
 import Data.Singletons.Names
-import Data.Singletons.Util
 import Language.Haskell.TH
 
 -- the only monadic thing we do here is fail. This allows the function
 -- to be used from the Singletons module
-promoteType :: Monad m => DType -> m DKind
+promoteType :: MonadFail m => DType -> m DKind
 promoteType = go []
   where
-    go :: Monad m => [DKind] -> DType -> m DKind
+    go :: MonadFail m => [DTypeArg] -> DType -> m DKind
     -- We don't need to worry about constraints: they are used to express
     -- static guarantees at runtime. But, because we don't need to do
     -- anything special to keep static guarantees at compile time, we don't
@@ -28,34 +29,42 @@
       fail "Cannot promote types of rank above 1."
     go args     (DAppT t1 t2) = do
       k2 <- go [] t2
-      go (k2 : args) t1
+      go (DTANormal k2 : args) t1
        -- NB: This next case means that promoting something like
        --   (((->) a) :: Type -> Type) b
        -- will fail because the pattern below won't recognize the
        -- arrow to turn it into a TyFun. But I'm not terribly
        -- bothered by this, and it would be annoying to fix. Wait
        -- for someone to report.
+    go args     (DAppKindT ty ki) = do
+      ki' <- go [] ki
+      go (DTyArg ki' : args) ty
     go args     (DSigT ty ki) = do
       ty' <- go [] ty
       -- No need to promote 'ki' - it is already a kind.
-      return $ foldType (DSigT ty' ki) args
-    go args     (DVarT name) = return $ foldType (DVarT name) args
+      return $ applyDType (DSigT ty' ki) args
+    go args     (DVarT name) = return $ applyDType (DVarT name) args
     go []       (DConT name)
       | name == typeRepName               = return $ DConT typeKindName
       | nameBase name == nameBase repName = return $ DConT typeKindName
     go args     (DConT name)
       | Just n <- unboxedTupleNameDegree_maybe name
-      = return $ foldType (DConT (tupleTypeName n)) args
+      = return $ applyDType (DConT (tupleTypeName n)) args
       | otherwise
-      = return $ foldType (DConT name) args
-    go [k1, k2] DArrowT = return $ DConT tyFunArrowName `DAppT` k1 `DAppT` k2
+      = return $ applyDType (DConT name) args
+    go [DTANormal k1, DTANormal k2] DArrowT
+      = return $ DConT tyFunArrowName `DAppT` k1 `DAppT` k2
     go _        ty@DLitT{} = pure ty
 
     go args     hd = fail $ "Illegal Haskell construct encountered:\n" ++
                             "headed by: " ++ show hd ++ "\n" ++
                             "applied to: " ++ show args
 
-promoteUnraveled :: Monad m => DType -> m ([DKind], DKind)
+promoteTypeArg :: MonadFail m => DTypeArg -> m DTypeArg
+promoteTypeArg (DTANormal t) = DTANormal <$> promoteType t
+promoteTypeArg ta@(DTyArg _) = pure ta -- Kinds are already promoted
+
+promoteUnraveled :: MonadFail m => DType -> m ([DKind], DKind)
 promoteUnraveled ty = do
   arg_kis <- mapM promoteType arg_tys
   res_ki  <- promoteType res_ty
diff --git a/src/Data/Singletons/ShowSing.hs b/src/Data/Singletons/ShowSing.hs
--- a/src/Data/Singletons/ShowSing.hs
+++ b/src/Data/Singletons/ShowSing.hs
@@ -1,11 +1,12 @@
-{-# LANGUAGE ConstraintKinds #-}
 {-# LANGUAGE DataKinds #-}
+{-# LANGUAGE EmptyCase #-}
+{-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE GADTs #-}
 {-# LANGUAGE PolyKinds #-}
 {-# LANGUAGE QuantifiedConstraints #-}
 {-# LANGUAGE RankNTypes #-}
-{-# LANGUAGE StandaloneDeriving #-}
+{-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE UndecidableInstances #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
@@ -26,7 +27,10 @@
 
 module Data.Singletons.ShowSing (
   -- * The 'ShowSing' type
-  ShowSing
+  ShowSing,
+
+  -- * Internal utilities
+  ShowSing'
   ) where
 
 import Data.Singletons.Internal
@@ -48,35 +52,50 @@
 -- an instance with the following shape:
 --
 -- @
--- deriving instance ??? => Show (Sing (x :: [k]))
+-- instance ??? => 'Show' ('SList' (z :: [k])) where
+--   showsPrec p 'SNil' = showString \"SNil\"
+--   showsPrec p ('SCons' sx sxs) =
+--     showParen (p > 10) $ showString \"SCons \" . showsPrec 11 sx
+--                        . showSpace . showsPrec 11 sxs
 -- @
 --
 -- To figure out what should go in place of @???@, observe that we require the
 -- type of each field to also be 'Show' instances. In other words, we need
--- something like @(Show (Sing (a :: k)))@. But this isn't quite right, as the
+-- something like @('Show' ('Sing' (a :: k)))@. But this isn't quite right, as the
 -- type variable @a@ doesn't appear in the instance head. In fact, this @a@
 -- type is really referring to an existentially quantified type variable in the
 -- 'SCons' constructor, so it doesn't make sense to try and use it like this.
 --
 -- Luckily, the @QuantifiedConstraints@ language extension provides a solution
 -- to this problem. This lets you write a context of the form
--- @(forall a. Show (Sing (a :: k)))@, which demands that there be an instance
--- for @Show (Sing (a :: k))@ that is parametric in the use of @a@. Thus, our
--- final instance looks like:
+-- @(forall a. 'Show' ('Sing' (a :: k)))@, which demands that there be an instance
+-- for @'Show' ('Sing' (a :: k))@ that is parametric in the use of @a@.
+-- This lets us write something closer to this:
 --
 -- @
--- deriving instance (forall a. Show (Sing (a :: k))) => Show (Sing (x :: [k]))
+-- instance (forall a. 'Show' ('Sing' (a :: k))) => 'SList' ('Sing' (z :: [k])) where ...
 -- @
 --
--- Because that quantified constraint is somewhat lengthy, we provide the
--- 'ShowSing' class synonym as a convenient shorthand. Thus, the above instance
--- is equivalent to:
+-- The 'ShowSing' class is a thin wrapper around
+-- @(forall a. 'Show' ('Sing' (a :: k)))@. With 'ShowSing', our final instance
+-- declaration becomes this:
 --
 -- @
--- deriving instance ShowSing k => Show (Sing (x :: [k]))
+-- instance 'ShowSing' k => 'Show' ('SList' (z :: [k])) where
+--   showsPrec p 'SNil' = showString \"SNil\"
+--   showsPrec p ('SCons' (sx :: 'Sing' x) (sxs :: 'Sing' xs)) =
+--     (showParen (p > 10) $ showString \"SCons \" . showsPrec 11 sx
+--                         . showSpace . showsPrec 11 sxs)
+--       :: (ShowSing' x, ShowSing' xs) => ShowS
 -- @
 --
--- When singling a derived 'Show' instance, @singletons@ will also derive
+-- (Note that the actual definition of 'ShowSing' is slightly more complicated
+-- than what this documentation might suggest. For the full story, as well as
+-- an explanation of why we need an explicit
+-- @(ShowSing' x, ShowSing' xs) => ShowS@ signature at the end,
+-- refer to the documentation for `ShowSing'`.)
+--
+-- When singling a derived 'Show' instance, @singletons@ will also generate
 -- a 'Show' instance for the corresponding singleton type using 'ShowSing'.
 -- In other words, if you give @singletons@ a derived 'Show' instance, then
 -- you'll receive the following in return:
@@ -86,21 +105,106 @@
 -- * A 'Show' instance for the singleton type
 --
 -- What a bargain!
-class    (forall (z :: k). Show (Sing z)) => ShowSing k
-instance (forall (z :: k). Show (Sing z)) => ShowSing k
 
+-- One might wonder we we simply don't define ShowSing as
+-- @type ShowSing k = (forall (z :: k). ShowSing' z)@ instead of going the
+-- extra mile to define it as a class.
+-- See Note [Define ShowSing as a class, not a type synonym] for an explanation.
+class    (forall (z :: k). ShowSing' z) => ShowSing k
+instance (forall (z :: k). ShowSing' z) => ShowSing k
+
+-- | The workhorse that powers 'ShowSing'. The only reason that `ShowSing'`
+-- exists is to work around GHC's inability to put type families in the head
+-- of a quantified constraint (see
+-- <https://gitlab.haskell.org/ghc/ghc/issues/14860 this GHC issue> for more
+-- details on this point). In other words, GHC will not let you define
+-- 'ShowSing' like so:
+--
+-- @
+-- class (forall (z :: k). 'Show' ('Sing' z)) => 'ShowSing' k
+-- @
+--
+-- By replacing @'Show' ('Sing' z)@ with @ShowSing' z@, we are able to avoid
+-- this restriction for the most part. There is one major downside to using
+-- @ShowSing'@, however: deriving 'Show' instances for singleton types does
+-- not work out of the box. In other words, if you try to do this:
+--
+-- @
+-- deriving instance 'ShowSing' k => 'Show' ('SList' (z :: [k]))
+-- @
+--
+-- Then GHC will complain to the effect that it could not deduce a
+-- @'Show' ('Sing' x)@ constraint. This is due to
+-- <https://gitlab.haskell.org/ghc/ghc/issues/16365 another unfortunate GHC bug>
+-- that prevents GHC from realizing that @'ShowSing' k@ implies
+-- @'Show' ('Sing' (x :: k))@. The workaround is to force GHC to come to its
+-- senses by using an explicit type signature:
+--
+-- @
+-- instance 'ShowSing' k => 'Show' ('SList' (z :: [k])) where
+--   showsPrec p 'SNil' = showString \"SNil\"
+--   showsPrec p ('SCons' (sx :: 'Sing' x) (sxs :: 'Sing' xs)) =
+--     (showParen (p > 10) $ showString \"SCons \" . showsPrec 11 sx
+--                         . showSpace . showsPrec 11 sxs)
+--       :: (ShowSing' x, ShowSing' xs) => ShowS
+-- @
+--
+-- The use of @ShowSing' x@ in the signature is sufficient to make the
+-- constraint solver connect the dots between @'ShowSing' k@ and
+-- @'Show' ('Sing' (x :: k))@. (The @ShowSing' xs@ constraint is not strictly
+-- necessary, but it is shown here since that is in fact the code that
+-- @singletons@ will generate for this instance.)
+--
+-- Because @deriving 'Show'@ will not insert these explicit signatures for us,
+-- it is not possible to derive 'Show' instances for singleton types.
+-- Thankfully, @singletons@' Template Haskell machinery can do this manual
+-- gruntwork for us 99% of the time, but if you ever find yourself in a
+-- situation where you must define a 'Show' instance for a singleton type by
+-- hand, this is important to keep in mind.
+--
+-- Note that there is one potential future direction that might alleviate this
+-- pain. We could define `ShowSing'` like this instead:
+--
+-- @
+-- class (forall sing. sing ~ 'Sing' => 'Show' (sing z)) => ShowSing' z
+-- instance 'Show' ('Sing' z) => ShowSing' z
+-- @
+--
+-- For many examples, this lets you just derive 'Show' instances for singleton
+-- types like you would expect. Alas, this topples over on @Bar@ in the
+-- following example:
+--
+-- @
+-- newtype Foo a = MkFoo a
+-- data SFoo :: forall a. Foo a -> Type where
+--   SMkFoo :: Sing x -> SFoo (MkFoo x)
+-- type instance Sing = SFoo
+-- deriving instance ShowSing a => Show (SFoo (z :: Foo a))
+--
+-- newtype Bar a = MkBar (Foo a)
+-- data SBar :: forall a. Bar a -> Type where
+--   SMkBar :: Sing x -> SBar (MkBar x)
+-- type instance Sing = SBar
+-- deriving instance ShowSing (Foo a) => Show (SBar (z :: Bar a))
+-- @
+--
+-- This fails because
+-- of—you guessed it—<https://gitlab.haskell.org/ghc/ghc/issues/16502 another GHC bug>.
+-- Bummer. Unless that bug were to be fixed, the current definition of
+-- `ShowSing'` is the best that we can do.
+class    Show (Sing z) => ShowSing' z
+instance Show (Sing z) => ShowSing' z
+
 {-
 Note [Define ShowSing as a class, not a type synonym]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-In an ideal world, we would simply define ShowSing as an ordinary type synonym,
-like this:
+In an ideal world, we would simply define ShowSing like this:
 
-  type ShowSing k = (forall (z :: k). Show (Sing z) :: Constraint)
+  type ShowSing k = (forall (z :: k). ShowSing' z) :: Constraint)
 
-In fact, I used to assume that we lived in an ideal world, so I defined
-ShowSing as a type synonym in version 2.5 of this library. However, I realized
-some time after 2.5's release that the world is far from ideal, unfortunately,
-and that this approach is unfeasible at the time being due to GHC Trac #15888.
+In fact, I used to define ShowSing in a manner similar to this in version 2.5
+of singletons. However, I realized some time after 2.5's release that the
+this encoding is unfeasible at the time being due to GHC Trac #15888.
 
 To be more precise, the exact issue involves an infelicity in the way
 QuantifiedConstraints interacts with recursive type class instances.
@@ -130,18 +234,18 @@
 To see why this happens, observe what goes on if we expand the occurrences of
 the ShowSing type synonym in the generated instances:
 
-  deriving instance (forall z. Show (Sing (z :: Y a))) => Show (Sing (z :: X a))
-  deriving instance (forall z. Show (Sing (z :: X a))) => Show (Sing (z :: Y a))
+  deriving instance (forall z. ShowSing' (z :: Y a)) => Show (Sing (z :: X a))
+  deriving instance (forall z. ShowSing' (z :: X a)) => Show (Sing (z :: Y a))
 
 Due to the way QuantifiedConstraints currently works (as surmised in Trac
-#15888), when GHC has a Wanted `Show (Sing X1 :: X Bool)` constraint, it
+#15888), when GHC has a Wanted `ShowSing' (X1 :: X Bool)` constraint, it
 chooses the appropriate instance and emits a Wanted
-`forall z. Show (Sing (z :: Y Bool))` constraint (from the instance context).
+`forall z. ShowSing' (z :: Y Bool)` constraint (from the instance context).
 GHC skolemizes the `z` to `z1` and tries to solve a Wanted
-`Show (Sing (z1 :: Y Bool))` constraint. GHC chooses the appropriate instance
-and emits a Wanted `forall z. Show (Sing (z :: X Bool))` constraint. GHC
+`ShowSing' (z1 :: Y Bool)` constraint. GHC chooses the appropriate instance
+and emits a Wanted `forall z. ShowSing' (z :: X Bool)` constraint. GHC
 skolemizes the `z` to `z2` and tries to solve a Wanted
-`Show (Sing (z2 :: X Bool))` constraint... we repeat the process and find
+`ShowSing' (z2 :: X Bool)` constraint... we repeat the process and find
 ourselves in an infinite loop that eventually overflows the reduction stack.
 Eep.
 
@@ -162,6 +266,20 @@
 Given the two options, (2) is by far the easier option, so that is what we
 ultimately went with.
 -}
+
+------------------------------------------------------------
+-- (S)WrappedSing instances
+------------------------------------------------------------
+
+instance ShowSing k => Show (WrappedSing (a :: k)) where
+  showsPrec p (WrapSing s) = showParen (p >= 11) $
+    showString "WrapSing {unwrapSing = " . showsPrec 0 s . showChar '}'
+      :: ShowSing' a => ShowS
+
+instance ShowSing k => Show (SWrappedSing (ws :: WrappedSing (a :: k))) where
+  showsPrec p (SWrapSing s) = showParen (p >= 11) $
+    showString "SWrapSing {sUnwrapSing = " . showsPrec 0 s . showChar '}'
+      :: ShowSing' a => ShowS
 
 ------------------------------------------------------------
 -- TypeLits instances
diff --git a/src/Data/Singletons/Sigma.hs b/src/Data/Singletons/Sigma.hs
--- a/src/Data/Singletons/Sigma.hs
+++ b/src/Data/Singletons/Sigma.hs
@@ -1,13 +1,18 @@
 {-# LANGUAGE AllowAmbiguousTypes #-}
 {-# LANGUAGE DataKinds #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE GADTs #-}
+{-# LANGUAGE ImpredicativeTypes #-} -- See Note [Impredicative Σ?]
+{-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE QuantifiedConstraints #-}
 {-# LANGUAGE RankNTypes #-}
 {-# LANGUAGE ScopedTypeVariables #-}
-{-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE TypeOperators #-}
+{-# LANGUAGE UndecidableInstances #-}
 
 -----------------------------------------------------------------------------
 -- |
@@ -23,40 +28,96 @@
 ----------------------------------------------------------------------------
 
 module Data.Singletons.Sigma
-    ( Sigma(..), Σ
+    ( -- * The 'Sigma' type
+      Sigma(..), Σ
+    , Sing, SSigma(..), SΣ
+
+      -- * Operations over 'Sigma'
+    , fstSigma, FstSigma, sndSigma, SndSigma
     , projSigma1, projSigma2
     , mapSigma, zipSigma
+    , currySigma, uncurrySigma
 
-      -- * Defunctionalization symbols
-    , ΣSym0, ΣSym1, ΣSym2
+      -- * Internal utilities
+      -- $internalutilities
+    , ShowApply,  ShowSingApply
+    , ShowApply', ShowSingApply'
     ) where
 
 import Data.Kind (Type)
 import Data.Singletons.Internal
-import Data.Singletons.Promote
+import Data.Singletons.ShowSing
 
 -- | A dependent pair.
 data Sigma (s :: Type) :: (s ~> Type) -> Type where
   (:&:) :: forall s t fst. Sing (fst :: s) -> t @@ fst -> Sigma s t
 infixr 4 :&:
+instance (ShowSing s, ShowApply t) => Show (Sigma s t) where
+  showsPrec p ((a :: Sing (fst :: s)) :&: b) = showParen (p >= 5) $
+    showsPrec 5 a . showString " :&: " . showsPrec 5 b
+      :: (ShowSing' fst, ShowApply' t fst) => ShowS
 
 -- | Unicode shorthand for 'Sigma'.
-type Σ (s :: Type) (t :: s ~> Type) = Sigma s t
+type Σ = Sigma
 
+{-
+Note [Impredicative Σ?]
+~~~~~~~~~~~~~~~~~~~~~~~
+The definition of Σ currently will not typecheck without the use of
+ImpredicativeTypes. There isn't a fundamental reason that this should be the
+case, and the only reason that GHC currently requires this is due to Trac
+#13408. If someone ever fixes that bug, we could remove the use of
+ImpredicativeTypes.
+-}
+
+-- | The singleton type for 'Sigma'.
+data SSigma :: forall s (t :: s ~> Type). Sigma s t -> Type where
+  (:%&:) :: forall s t (fst :: s) (sfst :: Sing fst) (snd :: t @@ fst).
+            Sing ('WrapSing sfst) -> Sing snd -> SSigma (sfst ':&: snd :: Sigma s t)
+infixr 4 :%&:
+
+type instance Sing = SSigma
+instance forall s (t :: s ~> Type) (sig :: Sigma s t).
+         (ShowSing s, ShowSingApply t)
+      => Show (SSigma sig) where
+  showsPrec p ((sa :: Sing ('WrapSing (sfst :: Sing fst))) :%&: (sb :: Sing snd)) =
+    showParen (p >= 5) $
+      showsPrec 5 sa . showString " :&: " . showsPrec 5 sb
+        :: (ShowSing' fst, ShowSingApply' t fst snd) => ShowS
+
+instance forall s t (fst :: s) (a :: Sing fst) (b :: t @@ fst).
+       (SingI fst, SingI b)
+    => SingI (a ':&: b :: Sigma s t) where
+  sing = sing :%&: sing
+
+-- | Unicode shorthand for 'SSigma'.
+type SΣ = SSigma
+
 -- | Project the first element out of a dependent pair.
-projSigma1 :: forall s t. SingKind s => Sigma s t -> Demote s
-projSigma1 (a :&: _) = fromSing a
+fstSigma :: forall s t. SingKind s => Sigma s t -> Demote s
+fstSigma (a :&: _) = fromSing a
 
+-- | Project the first element out of a dependent pair.
+type family FstSigma (sig :: Sigma s t) :: s where
+  FstSigma ((_ :: Sing fst) ':&: _) = fst
+
 -- | Project the second element out of a dependent pair.
---
--- In an ideal setting, the type of 'projSigma2' would be closer to:
---
--- @
--- 'projSigma2' :: 'Sing' (sig :: 'Sigma' s t) -> t @@ ProjSigma1 sig
--- @
---
--- But promoting 'projSigma1' to a type family is not a simple task. Instead,
--- we do the next-best thing, which is to use Church-style elimination.
+sndSigma :: forall s t (sig :: Sigma s t).
+            SingKind (t @@ FstSigma sig)
+         => SSigma sig -> Demote (t @@ FstSigma sig)
+sndSigma (_ :%&: b) = fromSing b
+
+-- | Project the second element out of a dependent pair.
+type family SndSigma (sig :: Sigma s t) :: t @@ FstSigma sig where
+  SndSigma (_ ':&: b) = b
+
+-- | Project the first element out of a dependent pair using
+-- continuation-passing style.
+projSigma1 :: (forall (fst :: s). Sing fst -> r) -> Sigma s t -> r
+projSigma1 f (a :&: _) = f a
+
+-- | Project the second element out of a dependent pair using
+-- continuation-passing style.
 projSigma2 :: forall s t r. (forall (fst :: s). t @@ fst -> r) -> Sigma s t -> r
 projSigma2 f ((_ :: Sing (fst :: s)) :&: b) = f @fst b
 
@@ -72,4 +133,57 @@
 zipSigma f g ((a :: Sing (fstA :: a)) :&: p) ((b :: Sing (fstB :: b)) :&: q) =
   (f @@ a @@ b) :&: (g @fstA @fstB p q)
 
-$(genDefunSymbols [''Σ])
+-- | Convert an uncurried function on 'Sigma' to a curried one.
+--
+-- Together, 'currySigma' and 'uncurrySigma' witness an isomorphism such that
+-- the following identities hold:
+--
+-- @
+-- id1 :: forall a (b :: a ~> Type) (c :: 'Sigma' a b ~> Type).
+--        (forall (p :: Sigma a b). 'SSigma' p -> c @@ p)
+--     -> (forall (p :: Sigma a b). 'SSigma' p -> c @@ p)
+-- id1 f = 'uncurrySigma' @a @b @c ('currySigma' @a @b @c f)
+--
+-- id2 :: forall a (b :: a ~> Type) (c :: 'Sigma' a b ~> Type).
+--        (forall (x :: a) (sx :: Sing x) (y :: b @@ x). Sing ('WrapSing' sx) -> Sing y -> c @@ (sx :&: y))
+--     -> (forall (x :: a) (sx :: Sing x) (y :: b @@ x). Sing ('WrapSing' sx) -> Sing y -> c @@ (sx :&: y))
+-- id2 f = 'currySigma' @a @b @c ('uncurrySigma' @a @b @c f)
+-- @
+currySigma :: forall a (b :: a ~> Type) (c :: Sigma a b ~> Type).
+              (forall (p :: Sigma a b). SSigma p -> c @@ p)
+           -> (forall (x :: a) (sx :: Sing x) (y :: b @@ x).
+                 Sing ('WrapSing sx) -> Sing y -> c @@ (sx ':&: y))
+currySigma f x y = f (x :%&: y)
+
+-- | Convert a curried function on 'Sigma' to an uncurried one.
+--
+-- Together, 'currySigma' and 'uncurrySigma' witness an isomorphism.
+-- (Refer to the documentation for 'currySigma' for more details.)
+uncurrySigma :: forall a (b :: a ~> Type) (c :: Sigma a b ~> Type).
+                (forall (x :: a) (sx :: Sing x) (y :: b @@ x).
+                   Sing ('WrapSing sx) -> Sing y -> c @@ (sx ':&: y))
+             -> (forall (p :: Sigma a b). SSigma p -> c @@ p)
+uncurrySigma f (x :%&: y) = f x y
+
+------------------------------------------------------------
+-- Internal utilities
+------------------------------------------------------------
+
+{- $internal-utilities
+
+See the documentation in "Data.Singletons.ShowSing"—in particular, the
+Haddocks for 'ShowSing' and `ShowSing'`—for an explanation for why these
+classes exist.
+-}
+
+class    (forall (x :: a). ShowApply' f x) => ShowApply (f :: a ~> Type)
+instance (forall (x :: a). ShowApply' f x) => ShowApply (f :: a ~> Type)
+
+class    Show (Apply f x) => ShowApply' (f :: a ~> Type) (x :: a)
+instance Show (Apply f x) => ShowApply' (f :: a ~> Type) (x :: a)
+
+class    (forall (x :: a) (z :: Apply f x). ShowSingApply' f x z) => ShowSingApply (f :: a ~> Type)
+instance (forall (x :: a) (z :: Apply f x). ShowSingApply' f x z) => ShowSingApply (f :: a ~> Type)
+
+class    Show (Sing z) => ShowSingApply' (f :: a ~> Type) (x :: a) (z :: Apply f x)
+instance Show (Sing z) => ShowSingApply' (f :: a ~> Type) (x :: a) (z :: Apply f x)
diff --git a/src/Data/Singletons/Single.hs b/src/Data/Singletons/Single.hs
--- a/src/Data/Singletons/Single.hs
+++ b/src/Data/Singletons/Single.hs
@@ -13,7 +13,6 @@
 import Prelude hiding ( exp )
 import Language.Haskell.TH hiding ( cxt )
 import Language.Haskell.TH.Syntax (NameSpace(..), Quasi(..))
-import Data.Singletons.Deriving.Infer
 import Data.Singletons.Deriving.Ord
 import Data.Singletons.Deriving.Bounded
 import Data.Singletons.Deriving.Enum
@@ -34,11 +33,14 @@
 import Data.Singletons.Syntax
 import Data.Singletons.Partition
 import Language.Haskell.TH.Desugar
+import qualified Language.Haskell.TH.Desugar.OMap.Strict as OMap
+import Language.Haskell.TH.Desugar.OMap.Strict (OMap)
+import qualified Language.Haskell.TH.Desugar.OSet as OSet
+import Language.Haskell.TH.Desugar.OSet (OSet)
 import qualified Data.Map.Strict as Map
 import Data.Map.Strict ( Map )
 import Data.Maybe
 import qualified Data.Set as Set
-import Data.Set ( Set )
 import Control.Monad
 import Data.List
 import qualified GHC.LanguageExtensions.Type as LangExt
@@ -128,11 +130,13 @@
 singEqInstanceOnly :: DsMonad q => Name -> q [Dec]
 singEqInstanceOnly name = singEqualityInstance sEqClassDesc name
 
--- | Create instances of 'SDecide' for each type in the list.
+-- | Create instances of 'SDecide', 'TestEquality', and 'TestCoercion' for each
+-- type in the list.
 singDecideInstances :: DsMonad q => [Name] -> q [Dec]
 singDecideInstances = concatMapM singDecideInstance
 
--- | Create instance of 'SDecide' for the given type.
+-- | Create instance of 'SDecide', 'TestEquality', and 'TestCoercion' for the
+-- given type.
 singDecideInstance :: DsMonad q => Name -> q [Dec]
 singDecideInstance name = singEqualityInstance sDecideClassDesc name
 
@@ -146,9 +150,14 @@
   dcons <- concatMapM (dsCon dtvbs data_ty) cons
   let tyvars = map (DVarT . extractTvbName) dtvbs
       kind = foldType (DConT name) tyvars
-  (scons, _) <- singM [] $ mapM singCtor dcons
+  (scons, _) <- singM [] $ mapM (singCtor name) dcons
   eqInstance <- mkEqualityInstance Nothing kind dcons scons desc
-  return $ decToTH eqInstance
+  testInstances <-
+    if className == sDecideClassName
+       then traverse (mkTestInstance Nothing kind name dcons)
+                     [TestEquality, TestCoercion]
+       else pure []
+  return $ decsToTH (eqInstance:testInstances)
 
 -- | Create instances of 'SOrd' for the given types
 singOrdInstances :: DsMonad q => [Name] -> q [Dec]
@@ -178,7 +187,7 @@
 --
 -- (Not to be confused with 'showShowInstance'.)
 singShowInstance :: DsMonad q => Name -> q [Dec]
-singShowInstance = singInstance mkShowInstance "Show"
+singShowInstance = singInstance (mkShowInstance ForPromotion) "Show"
 
 -- | Create instances of 'SShow' for the given types
 --
@@ -198,9 +207,10 @@
   let tyvars    = map (DVarT . extractTvbName) dtvbs
       kind      = foldType (DConT name) tyvars
       data_decl = DataDecl name dtvbs dcons
-      deriv_show_decl = DerivedDecl { ded_mb_cxt = Nothing
-                                    , ded_type   = kind
-                                    , ded_decl   = data_decl }
+      deriv_show_decl = DerivedDecl { ded_mb_cxt     = Nothing
+                                    , ded_type       = kind
+                                    , ded_type_tycon = name
+                                    , ded_decl       = data_decl }
   (show_insts, _) <- singM [] $ singDerivedShowDecs deriv_show_decl
   pure $ decsToTH show_insts
 
@@ -210,6 +220,55 @@
 showSingInstances :: DsMonad q => [Name] -> q [Dec]
 showSingInstances = concatMapM showSingInstance
 
+-- | Create an instance for @'SingI' TyCon{N}@, where @N@ is the positive
+-- number provided as an argument.
+--
+-- Note that the generated code requires the use of the @QuantifiedConstraints@
+-- language extension.
+singITyConInstances :: DsMonad q => [Int] -> q [Dec]
+singITyConInstances = concatMapM singITyConInstance
+
+-- | Create an instance for @'SingI' TyCon{N}@, where @N@ is the positive
+-- number provided as an argument.
+--
+-- Note that the generated code requires the use of the @QuantifiedConstraints@
+-- language extension.
+singITyConInstance :: DsMonad q => Int -> q [Dec]
+singITyConInstance n
+  | n <= 0
+  = fail $ "Argument must be a positive number (given " ++ show n ++ ")"
+  | otherwise
+  = do as <- replicateM n (qNewName "a")
+       ks <- replicateM n (qNewName "k")
+       k_last <- qNewName "k_last"
+       f      <- qNewName "f"
+       x      <- qNewName "x"
+       let k_penult = last ks
+           k_fun = ravel (map DVarT ks) (DVarT k_last)
+           f_ty  = DVarT f
+           a_tys = map DVarT as
+           mk_fun arrow t1 t2 = arrow `DAppT` t1 `DAppT` t2
+           matchable_apply_fun   = mk_fun DArrowT                (DVarT k_penult) (DVarT k_last)
+           unmatchable_apply_fun = mk_fun (DConT tyFunArrowName) (DVarT k_penult) (DVarT k_last)
+           ctxt = [ DForallT (map DPlainTV as)
+                             (map (DAppT (DConT singIName)) a_tys)
+                             (DConT singIName `DAppT` foldType f_ty a_tys)
+                  , DConT equalityName
+                      `DAppT` (DConT applyTyConName `DSigT`
+                                mk_fun DArrowT matchable_apply_fun unmatchable_apply_fun)
+                      `DAppT` DConT applyTyConAux1Name
+                  ]
+       pure $ decToTH
+            $ DInstanceD
+                Nothing Nothing ctxt
+                (DConT singIName `DAppT` (DConT (mkTyConName n) `DAppT` (f_ty `DSigT` k_fun)))
+                [DLetDec $ DFunD singMethName
+                           [DClause [] $
+                            wrapSingFun 1 DWildCardT $
+                            DLamE [x] $
+                            DVarE withSingIName `DAppE` DVarE x
+                                                `DAppE` DVarE singMethName]]
+
 singInstance :: DsMonad q => DerivDesc q -> String -> Name -> q [Dec]
 singInstance mk_inst inst_name name = do
   (tvbs, cons) <- getDataD ("I cannot make an instance of " ++ inst_name
@@ -220,7 +279,7 @@
   let data_decl = DataDecl name dtvbs dcons
   raw_inst <- mk_inst Nothing data_ty data_decl
   (a_inst, decs) <- promoteM [] $
-                    promoteInstanceDec Map.empty raw_inst
+                    promoteInstanceDec OMap.empty raw_inst
   decs' <- singDecsM [] $ (:[]) <$> singInstD a_inst
   return $ decsToTH (decs ++ decs')
 
@@ -297,7 +356,7 @@
 -- see comment at top of file
 buildMethLets :: UClassDecl -> [(Name, DExp)]
 buildMethLets (ClassDecl { cd_lde = LetDecEnv { lde_types = meth_sigs } }) =
-  map mk_bind (Map.toList meth_sigs)
+  map mk_bind (OMap.assocs meth_sigs)
   where
     mk_bind (meth_name, meth_ty) =
       ( meth_name
@@ -314,7 +373,7 @@
                                             , lde_infix     = fixities
                                             , lde_proms     = promoted_defaults
                                             , lde_bound_kvs = meth_bound_kvs } }) =
-  bindContext [foldPredTvbs (DConPr cls_name) cls_tvbs] $ do
+  bindContext [foldTypeTvbs (DConT cls_name) cls_tvbs] $ do
     (sing_sigs, _, tyvar_names, cxts, res_kis, singIDefunss)
       <- unzip6 <$> zipWithM (singTySig no_meth_defns meth_sigs meth_bound_kvs)
                              meth_names (map promoteValRhs meth_names)
@@ -326,8 +385,8 @@
     sing_meths <- mapM (uncurry (singLetDecRHS (Map.fromList tyvar_names)
                                                (Map.fromList cxts)
                                                res_ki_map))
-                       (Map.toList default_defns)
-    fixities' <- traverse (uncurry singInfixDecl) $ Map.toList fixities
+                       (OMap.assocs default_defns)
+    fixities' <- traverse (uncurry singInfixDecl) $ OMap.assocs fixities
     cls_cxt' <- mapM singPred cls_cxt
     return $ DClassD cls_cxt'
                      (singClassName cls_name)
@@ -337,15 +396,15 @@
   where
     no_meth_defns = error "Internal error: can't find declared method type"
     always_sig    = error "Internal error: no signature for default method"
-    meth_names    = Map.keys meth_sigs
+    meth_names    = map fst $ OMap.assocs meth_sigs
 
     mk_default_sig meth_name (DSigD s_name sty) bound_kvs (Just res_ki) =
       DDefaultSigD s_name <$> add_constraints meth_name sty bound_kvs res_ki
     mk_default_sig _ _ _ _ = error "Internal error: a singled signature isn't a signature."
 
     add_constraints meth_name sty (_, bound_kvs) res_ki = do  -- Maybe monad
-      prom_dflt <- Map.lookup meth_name promoted_defaults
-      let default_pred = foldPred (DConPr equalityName)
+      prom_dflt <- OMap.lookup meth_name promoted_defaults
+      let default_pred = foldType (DConT equalityName)
                                 -- NB: Need the res_ki here to prevent ambiguous
                                 -- kinds in result-inferred default methods.
                                 -- See #175
@@ -382,6 +441,7 @@
     inst_kis <- mapM promoteType inst_tys
     meths <- concatMapM (uncurry sing_meth) ann_meths
     return (DInstanceD Nothing
+                       Nothing
                        cxt'
                        (foldl DAppT (DConT s_inst_name) inst_kis)
                        meths)
@@ -406,7 +466,7 @@
               -- less confusing.
               vis_cls_tvbs = drop (length cls_tvbs - length inst_kis) cls_tvbs
 
-          sing_meth_ty :: Set Name -> DType
+          sing_meth_ty :: OSet Name -> DType
                        -> SgM (DType, [Name], DCxt, DKind)
           sing_meth_ty bound_kvs inner_ty = do
             -- Make sure to expand through type synonyms here! Not doing so
@@ -416,11 +476,11 @@
               <- singType bound_kvs (promoteValRhs name) raw_ty
             pure (s_ty, tyvar_names, ctxt, res_ki)
 
-      (s_ty, tyvar_names, ctxt, m_res_ki) <- case Map.lookup name inst_sigs of
+      (s_ty, tyvar_names, ctxt, m_res_ki) <- case OMap.lookup name inst_sigs of
         Just inst_sig -> do
           -- We have an InstanceSig, so just single that type. Take care to
           -- avoid binding the variables bound by the instance head as well.
-          let inst_bound = foldMap (fvDType . predToType) cxt <> foldMap fvDType inst_kis
+          let inst_bound = foldMap fvDType (cxt ++ inst_kis)
           (s_ty, tyvar_names, ctxt, res_ki) <- sing_meth_ty inst_bound inst_sig
           pure (s_ty, tyvar_names, ctxt, Just res_ki)
         Nothing -> case mb_s_info of
@@ -435,7 +495,7 @@
 
             pure ( substType subst s_ty
                  , map extractTvbName sing_tvbs
-                 , map (substPred subst) ctxt
+                 , map (substType subst) ctxt
                  , m_res_ki )
           _ -> do
             mb_info <- dsReify name
@@ -443,8 +503,8 @@
               Just (DVarI _ (DForallT cls_tvbs _cls_pred inner_ty) _) -> do
                 let subst = mk_subst cls_tvbs
                     cls_kvb_names = foldMap (foldMap fvDType . extractTvbKind) cls_tvbs
-                    cls_tvb_names = Set.fromList $ map extractTvbName cls_tvbs
-                    cls_bound     = cls_kvb_names `Set.union` cls_tvb_names
+                    cls_tvb_names = OSet.fromList $ map extractTvbName cls_tvbs
+                    cls_bound     = cls_kvb_names `OSet.union` cls_tvb_names
                 (s_ty, tyvar_names, ctxt, res_ki) <- sing_meth_ty cls_bound inner_ty
                 pure ( substType subst s_ty
                      , tyvar_names
@@ -473,23 +533,23 @@
                          , lde_proms     = proms
                          , lde_bound_kvs = bound_kvs })
               thing_inside = do
-  let prom_list = Map.toList proms
+  let prom_list = OMap.assocs proms
   (typeSigs, letBinds, tyvarNames, cxts, res_kis, singIDefunss)
     <- unzip6 <$> mapM (uncurry (singTySig defns types bound_kvs)) prom_list
-  infix_decls' <- traverse (uncurry singInfixDecl) $ Map.toList infix_decls
+  infix_decls' <- traverse (uncurry singInfixDecl) $ OMap.assocs infix_decls
   let res_ki_map = Map.fromList [ (name, res_ki) | ((name, _), Just res_ki)
                                                      <- zip prom_list res_kis ]
   bindLets letBinds $ do
     let_decs <- mapM (uncurry (singLetDecRHS (Map.fromList tyvarNames)
                                              (Map.fromList cxts)
                                              res_ki_map))
-                     (Map.toList defns)
+                     (OMap.assocs defns)
     thing <- thing_inside
     return (infix_decls' ++ typeSigs ++ let_decs, concat singIDefunss, thing)
 
-singTySig :: Map Name ALetDecRHS  -- definitions
-          -> Map Name DType       -- type signatures
-          -> Map Name (Set Name)  -- bound kind variables
+singTySig :: OMap Name ALetDecRHS  -- definitions
+          -> OMap Name DType       -- type signatures
+          -> OMap Name (OSet Name) -- bound kind variables
           -> Name -> DType   -- the type is the promoted type, not the type sig!
           -> SgM ( DLetDec               -- the new type signature
                  , (Name, DExp)          -- the let-bind entry
@@ -500,7 +560,7 @@
                  )
 singTySig defns types bound_kvs name prom_ty =
   let sName = singValName name in
-  case Map.lookup name types of
+  case OMap.lookup name types of
     Nothing -> do
       num_args <- guess_num_args
       (sty, tyvar_names) <- mk_sing_ty num_args
@@ -528,14 +588,14 @@
   where
     guess_num_args :: SgM Int
     guess_num_args =
-      case Map.lookup name defns of
+      case OMap.lookup name defns of
         Nothing -> fail "Internal error: promotion known for something not let-bound."
         Just (AValue _ n _) -> return n
         Just (AFunction _ n _) -> return n
 
-    lookup_bound_kvs :: SgM (Set Name)
+    lookup_bound_kvs :: SgM (OSet Name)
     lookup_bound_kvs =
-      case Map.lookup name bound_kvs of
+      case OMap.lookup name bound_kvs of
         Nothing -> fail $ "Internal error: " ++ nameBase name ++ " has no type variable "
                           ++ "bindings, despite having a type signature"
         Just kvs -> pure kvs
@@ -559,7 +619,7 @@
   bindContext (Map.findWithDefault [] name cxts) $
     case ld_rhs of
       AValue prom num_arrows exp ->
-        DValD (DVarPa (singValName name)) <$>
+        DValD (DVarP (singValName name)) <$>
         (wrapUnSingFun num_arrows prom <$> singExp exp (Map.lookup name res_kis))
       AFunction prom_fun num_arrows clauses ->
         let tyvar_names = case Map.lookup name bound_names of
@@ -603,21 +663,21 @@
 singPat var_proms = go
   where
     go :: ADPat -> QWithAux SingDSigPaInfos SgM DPat
-    go (ADLitPa _lit) =
+    go (ADLitP _lit) =
       fail "Singling of literal patterns not yet supported"
-    go (ADVarPa name) = do
+    go (ADVarP name) = do
       tyname <- case Map.lookup name var_proms of
                   Nothing     ->
                     fail "Internal error: unknown variable when singling pattern"
                   Just tyname -> return tyname
-      pure $ DVarPa (singValName name) `DSigPa` (singFamily `DAppT` DVarT tyname)
-    go (ADConPa name pats) = DConPa (singDataConName name) <$> mapM go pats
-    go (ADTildePa pat) = do
+      pure $ DVarP (singValName name) `DSigP` (singFamily `DAppT` DVarT tyname)
+    go (ADConP name pats) = DConP (singDataConName name) <$> mapM go pats
+    go (ADTildeP pat) = do
       qReportWarning
         "Lazy pattern converted into regular pattern during singleton generation."
       go pat
-    go (ADBangPa pat) = DBangPa <$> go pat
-    go (ADSigPa prom_pat pat ty) = do
+    go (ADBangP pat) = DBangP <$> go pat
+    go (ADSigP prom_pat pat ty) = do
       pat' <- go pat
       -- Normally, calling dPatToDExp would be dangerous, since it fails if the
       -- supplied pattern contains any wildcard patterns. However, promotePat
@@ -627,7 +687,7 @@
       -- See Note [Singling pattern signatures].
       addElement (dPatToDExp pat', DSigT prom_pat ty)
       pure pat'
-    go ADWildPa = pure DWildPa
+    go ADWildP = pure DWildP
 
 -- | If given a non-empty list of 'SingDSigPaInfos', construct a case expression
 -- that brings singleton equality constraints into scope via pattern-matching.
@@ -638,7 +698,7 @@
   | otherwise =
       let (exps, sigs) = unzip exps_with_sigs
           scrutinee = mkTupleDExp exps
-          pats = map (DSigPa DWildPa . DAppT (DConT singFamilyName)) sigs
+          pats = map (DSigP DWildP . DAppT (DConT singFamilyName)) sigs
       in DCaseE scrutinee [DMatch (mkTupleDPat pats) exp]
 
 -- Note [Annotate case return type]
@@ -650,6 +710,11 @@
 -- 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 learned to stop worrying and avoid
+-- kind generalization] for an explanation of why we do this.
 
 -- Note [Why error is so special]
 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -765,14 +830,17 @@
   -- So: build a case
   let caseExp = DCaseE (mkTupleDExp (map DVarE sNames))
                        [DMatch (mkTupleDPat
-                                (map ((DWildPa `DSigPa`) .
+                                (map ((DWildP `DSigP`) .
                                       (singFamily `DAppT`) .
                                       DVarT) ty_names)) exp']
   return $ wrapSingFun (length names) prom_lam $ DLamE sNames caseExp
 singExp (ADCaseE exp matches ret_ty) res_ki =
-    -- See Note [Annotate case return type]
-  DSigE <$> (DCaseE <$> singExp exp Nothing <*> mapM (singMatch res_ki) matches)
-        <*> pure (singFamily `DAppT` (ret_ty `maybeSigT` res_ki))
+    -- See Note [Annotate case return type] and
+    --     Note [The id hack; or, how singletons learned to stop worrying and
+    --           avoid kind generalization]
+  DAppE (DAppTypeE (DVarE 'id)
+                   (singFamily `DAppT` (ret_ty `maybeSigT` res_ki)))
+    <$> (DCaseE <$> singExp exp Nothing <*> mapM (singMatch res_ki) matches)
 singExp (ADLetE env exp) res_ki = do
   -- We intentionally discard the SingI instances for exp's defunctionalization
   -- symbols, as we also do not generate the declarations for the
@@ -783,12 +851,13 @@
   exp' <- singExp exp (Just ty)
   pure $ DSigE exp' $ DConT singFamilyName `DAppT` DSigT prom_exp ty
 
--- See Note [DerivedDecl]
+-- See Note [DerivedDecl] in Data.Singletons.Syntax
 singDerivedEqDecs :: DerivedEqDecl -> SgM [DDec]
-singDerivedEqDecs (DerivedDecl { ded_mb_cxt = mb_ctxt
-                               , ded_type   = ty
-                               , ded_decl   = DataDecl _ _ cons }) = do
-  (scons, _) <- singM [] $ mapM singCtor cons
+singDerivedEqDecs (DerivedDecl { ded_mb_cxt     = mb_ctxt
+                               , ded_type       = ty
+                               , ded_type_tycon = ty_tycon
+                               , ded_decl       = DataDecl _ _ cons }) = do
+  (scons, _) <- singM [] $ mapM (singCtor ty_tycon) cons
   mb_sctxt <- mapM (mapM singPred) mb_ctxt
   kind <- promoteType ty
   sEqInst <- mkEqualityInstance mb_sctxt kind cons scons sEqClassDesc
@@ -801,36 +870,50 @@
   -- all occurrences of SEq with SDecide in the context.
   let mb_sctxtDecide = fmap (map sEqToSDecide) mb_sctxt
   sDecideInst <- mkEqualityInstance mb_sctxtDecide kind cons scons sDecideClassDesc
-  return [sEqInst, sDecideInst]
+  testInsts <- traverse (mkTestInstance mb_sctxtDecide kind ty_tycon cons)
+                        [TestEquality, TestCoercion]
+  return (sEqInst:sDecideInst:testInsts)
 
 -- Walk a DPred, replacing all occurrences of SEq with SDecide.
 sEqToSDecide :: DPred -> DPred
-sEqToSDecide = modifyConNameDPred $ \n ->
+sEqToSDecide = modifyConNameDType $ \n ->
   -- Why don't we directly compare n to sEqClassName? Because n is almost certainly
   -- produced from a call to singClassName, which uses unqualified Names. Ugh.
   if nameBase n == nameBase sEqClassName
      then sDecideClassName
      else n
 
--- See Note [DerivedDecl]
+-- See Note [DerivedDecl] in Data.Singletons.Syntax
 singDerivedShowDecs :: DerivedShowDecl -> SgM [DDec]
-singDerivedShowDecs (DerivedDecl { ded_mb_cxt = mb_cxt
-                                 , ded_type   = ty
-                                 , ded_decl   = DataDecl _ _ cons }) = do
-    z <- qNewName "z"
-    -- Derive the Show instance for the singleton type, like this:
+singDerivedShowDecs (DerivedDecl { ded_mb_cxt     = mb_cxt
+                                 , ded_type       = ty
+                                 , ded_type_tycon = ty_tycon
+                                 , ded_decl       = data_decl }) = do
+    -- Generate a Show instance for a singleton type, like this:
     --
-    --   deriving instance (ShowSing a, ShowSing b) => Sing (Sing (z :: Either a b))
+    --   instance (ShowSing a, ShowSing b) => Show (SEither (z :: Either a b)) where
+    --     showsPrec p (SLeft (sl :: Sing l)) =
+    --       showParen (p > 10) $ showString "SLeft " . showsPrec 11 sl
+    --         :: ShowSing' l => ShowS
+    --     showsPrec p (SRight (sr :: Sing r)) =
+    --       showParen (p > 10) $ showString "SRight " . showsPrec 11 sr
+    --         :: ShowSing' r => ShowS
     --
     -- Be careful: we want to generate an instance context that uses ShowSing,
     -- not SShow.
-    show_cxt <- inferConstraintsDef (fmap mkShowSingContext mb_cxt)
-                                    (DConPr showSingName)
-                                    ty cons
-    let show_inst = DStandaloneDerivD Nothing show_cxt
-                      (DConT showName `DAppT` (singFamily `DAppT` DSigT (DVarT z) ty))
-    pure [show_inst]
+    show_sing_inst <- mkShowInstance (ForShowSing ty_tycon) mb_cxt ty data_decl
+    pure [toInstanceD show_sing_inst]
+  where
+    toInstanceD :: UInstDecl -> DDec
+    toInstanceD (InstDecl { id_cxt = cxt, id_name = inst_name
+                          , id_arg_tys = inst_tys, id_meths = ann_meths }) =
+      DInstanceD Nothing Nothing cxt (foldType (DConT inst_name) inst_tys)
+                 (map (DLetDec . toFunD) ann_meths)
 
+    toFunD :: (Name, ULetDecRHS) -> DLetDec
+    toFunD (fun_name, UFunction clauses) = DFunD fun_name clauses
+    toFunD (val_name, UValue rhs)        = DValD (DVarP val_name) rhs
+
 isException :: DExp -> Bool
 isException (DVarE n)             = nameBase n == "sUndefined"
 isException (DConE {})            = False
@@ -872,3 +955,85 @@
 maybeSigT :: DType -> Maybe DKind -> DType
 maybeSigT ty Nothing   = ty
 maybeSigT ty (Just ki) = ty `DSigT` ki
+
+{-
+Note [The id hack; or, how singletons 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. 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` that crucially relies on them to guide type
+inference along (e.g., `sShowParen` in `Data.Singletons.Prelude.Show`).
+
+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 definitons 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/src/Data/Singletons/Single/Data.hs b/src/Data/Singletons/Single/Data.hs
--- a/src/Data/Singletons/Single/Data.hs
+++ b/src/Data/Singletons/Single/Data.hs
@@ -11,6 +11,7 @@
 module Data.Singletons.Single.Data where
 
 import Language.Haskell.TH.Desugar
+import Language.Haskell.TH.Desugar.OSet (OSet)
 import Language.Haskell.TH.Syntax
 import Data.Singletons.Single.Defun
 import Data.Singletons.Single.Monad
@@ -21,8 +22,7 @@
 import Data.Singletons.Names
 import Data.Singletons.Syntax
 import Control.Monad
-import qualified Data.Set as Set
-import Data.Set (Set)
+import Data.Foldable
 
 -- We wish to consider the promotion of "Rep" to be *
 -- not a promoted data constructor.
@@ -30,7 +30,7 @@
 singDataD (DataDecl name tvbs ctors) = do
   let tvbNames = map extractTvbName tvbs
   k <- promoteType (foldType (DConT name) (map DVarT tvbNames))
-  ctors' <- mapM singCtor ctors
+  ctors' <- mapM (singCtor name) ctors
   ctorFixities <-
     -- try to reify the fixity declarations for the constructors and then
     -- singletonize them. In case the reification fails, we default to an
@@ -48,11 +48,11 @@
   toSingClauses       <- mapM mkToSingClause ctors
   emptyToSingClause   <- mkEmptyToSingClause
   let singKindInst =
-        DInstanceD Nothing
+        DInstanceD Nothing Nothing
                    (map (singKindConstraint . DVarT) tvbNames)
                    (DAppT (DConT singKindClassName) k)
-                   [ DTySynInstD demoteName $ DTySynEqn
-                      [k]
+                   [ DTySynInstD $ DTySynEqn Nothing
+                      (DConT demoteName `DAppT` k)
                       (foldType (DConT name)
                         (map (DAppT demote . DVarT) tvbNames))
                    , DLetDec $ DFunD fromSingName
@@ -60,15 +60,17 @@
                    , DLetDec $ DFunD toSingName
                                (toSingClauses   `orIfEmpty` [emptyToSingClause]) ]
 
-  -- e.g. type SNat = (Sing :: Nat -> Type)
-  let kindedSingTy = DArrowT `DAppT` k `DAppT` DConT typeKindName
-      kindedSynInst =
-        DTySynD (singTyConName name)
-                []
-                (singFamily `DSigT` kindedSingTy)
+  let singDataName = singTyConName name
+      -- e.g. type instance Sing @Nat = SNat
+      singSynInst =
+        DTySynInstD $ DTySynEqn Nothing
+                                (DConT singFamilyName `DAppKindT` k)
+                                (DConT singDataName)
+      kindedSingTy = DForallT (map DPlainTV tvbNames) [] $
+                     DArrowT `DAppT` k `DAppT` DConT typeKindName
 
-  return $ (DDataInstD Data [] singFamilyName [] (Just kindedSingTy) ctors' []) :
-           kindedSynInst :
+  return $ (DDataD Data [] singDataName [] (Just kindedSingTy) ctors' []) :
+           singSynInst :
            singKindInst :
            ctorFixities
   where -- in the Rep case, the names of the constructors are in the wrong scope
@@ -83,7 +85,7 @@
           let (cname, numArgs) = extractNameArgs c
           cname' <- mkConName cname
           varNames <- replicateM numArgs (qNewName "b")
-          return $ DClause [DConPa (singDataConName cname) (map DVarPa varNames)]
+          return $ DClause [DConP (singDataConName cname) (map DVarP varNames)]
                            (foldExp
                               (DConE cname')
                               (map (DAppE (DVarE fromSingName) . DVarE) varNames))
@@ -98,9 +100,9 @@
           let varPats        = zipWith mkToSingVarPat varNames promoted
               recursiveCalls = zipWith mkRecursiveCall varNames promoted
           return $
-            DClause [DConPa cname' varPats]
+            DClause [DConP cname' varPats]
                     (multiCase recursiveCalls
-                               (map (DConPa someSingDataName . listify . DVarPa)
+                               (map (DConP someSingDataName . listify . DVarP)
                                     svarNames)
                                (DAppE (DConE someSingDataName)
                                          (foldExp (DConE (singDataConName cname))
@@ -108,7 +110,7 @@
 
         mkToSingVarPat :: Name -> DKind -> DPat
         mkToSingVarPat varName ki =
-          DSigPa (DVarPa varName) (DAppT (DConT demoteName) ki)
+          DSigP (DVarP varName) (DAppT (DConT demoteName) ki)
 
         mkRecursiveCall :: Name -> DKind -> DExp
         mkRecursiveCall var_name ki =
@@ -118,21 +120,21 @@
         mkEmptyFromSingClause :: SgM DClause
         mkEmptyFromSingClause = do
           x <- qNewName "x"
-          pure $ DClause [DVarPa x]
+          pure $ DClause [DVarP x]
                $ DCaseE (DVarE x) []
 
         mkEmptyToSingClause :: SgM DClause
         mkEmptyToSingClause = do
           x <- qNewName "x"
-          pure $ DClause [DVarPa x]
+          pure $ DClause [DVarP x]
                $ DConE someSingDataName `DAppE` DCaseE (DVarE x) []
 
 -- refine a constructor.
-singCtor :: DCon -> SgM DCon
+singCtor :: Name -> DCon -> SgM DCon
  -- polymorphic constructors are handled just
  -- like monomorphic ones -- the polymorphism in
  -- the kind is automatic
-singCtor (DCon _tvbs cxt name fields rty)
+singCtor dataName (DCon _tvbs cxt name fields rty)
   | not (null cxt)
   = fail "Singling of constrained constructors not yet supported"
   | otherwise
@@ -147,16 +149,16 @@
   let bound_kvs = foldMap fvDType kinds
   args <- zipWithM (buildArgType bound_kvs) types indices
   rty' <- promoteType rty
-  let tvbs = map DPlainTV (Set.toList bound_kvs) ++ zipWith DKindedTV indexNames kinds
+  let tvbs = map DPlainTV (toList bound_kvs) ++ zipWith DKindedTV indexNames kinds
       kindedIndices = zipWith DSigT indices kinds
 
   -- SingI instance for data constructor
   emitDecs
-    [DInstanceD Nothing
-                (map (DAppPr (DConPr singIName)) indices)
+    [DInstanceD Nothing Nothing
+                (map (DAppT (DConT singIName)) indices)
                 (DAppT (DConT singIName)
                        (foldType pCon kindedIndices))
-                [DLetDec $ DValD (DVarPa singMethName)
+                [DLetDec $ DValD (DVarP singMethName)
                        (foldExp sCon (map (const $ DVarE singMethName) types))]]
   -- SingI instances for defunctionalization symbols. Note that we don't
   -- support contexts in constructors at the moment, so it's fine for now to
@@ -174,8 +176,8 @@
                 []
                 sName
                 conFields
-                (DConT singFamilyName `DAppT` foldType pCon indices)
-  where buildArgType :: Set Name -> DType -> DType -> SgM DType
+                (DConT (singTyConName dataName) `DAppT` foldType pCon indices)
+  where buildArgType :: OSet Name -> DType -> DType -> SgM DType
         buildArgType bound_kvs ty index = do
           (ty', _, _, _, _, _) <- singType bound_kvs index ty
           return ty'
diff --git a/src/Data/Singletons/Single/Defun.hs b/src/Data/Singletons/Single/Defun.hs
--- a/src/Data/Singletons/Single/Defun.hs
+++ b/src/Data/Singletons/Single/Defun.hs
@@ -45,15 +45,9 @@
 -- Note that singDefuns takes Maybe DKinds for the promoted argument and result
 -- types, in case we have an entity whose type needs to be inferred.
 -- See Note [singDefuns and type inference].
---
--- Note that in the particular case of a data constructor, we actually generate
--- /two/ SingI instances partial application—one for the defunctionalization
--- symbol, and one for the data constructor placed inside TyCon{N}.
--- See Note [SingI instances for partially applied constructors].
 singDefuns :: Name      -- The Name of the thing to promote.
            -> NameSpace -- Whether the above Name is a value, data constructor,
                         -- or a type constructor.
-                        -- See Note [SingI instances for partially applied constructors]
            -> DCxt      -- The type's context.
            -> [Maybe DKind] -- The promoted argument types (if known).
            -> Maybe DKind   -- The promoted result type (if known).
@@ -98,7 +92,7 @@
                  (map extractTvbName tvbs)
 
         singI_ctxt :: DCxt
-        singI_ctxt = map (DAppPr (DConPr singIName) . tvbToType) tvbs
+        singI_ctxt = map (DAppT (DConT singIName) . tvbToType) tvbs
 
         mk_inst_ty :: DType -> DType
         mk_inst_ty inst_head
@@ -119,29 +113,21 @@
         mb_inst_kind = foldr buildTyFunArrow_maybe mb_ty_res mb_tyss
 
         new_insts :: [DDec]
-        new_insts
-          | DataName <- ns
-          = -- See Note [SingI instances for partially applied constructors]
-            let s_data_con = DConE $ singDataConName n in
-            [ mk_inst defun_inst_ty s_data_con
-            , mk_inst tycon_inst_ty s_data_con ]
-          | otherwise
-          = [mk_inst defun_inst_ty $ DVarE $ singValName n]
+        new_insts = [DInstanceD Nothing Nothing
+                                (sty_ctxt ++ singI_ctxt)
+                                (DConT singIName `DAppT` mk_inst_ty defun_inst_ty)
+                                [DLetDec $ DValD (DVarP singMethName)
+                                         $ wrapSingFun sing_fun_num defun_inst_ty
+                                         $ mk_sing_fun_expr sing_exp ]]
           where
-            mk_inst :: DType -> DExp -> DDec
-            mk_inst inst_head sing_exp
-              = DInstanceD Nothing
-                           (sty_ctxt ++ singI_ctxt)
-                           (DConT singIName `DAppT` mk_inst_ty inst_head)
-                           [DLetDec $ DValD (DVarPa singMethName)
-                                    $ wrapSingFun sing_fun_num inst_head
-                                    $ mk_sing_fun_expr sing_exp ]
-
-            defun_inst_ty, tycon_inst_ty :: DType
+            defun_inst_ty :: DType
             defun_inst_ty = foldType (DConT (promoteTySym n sym_num)) tvb_tys
-            tycon_inst_ty = DConT (mkTyConName sing_fun_num) `DAppT`
-                            foldType (DConT n) tvb_tys
 
+            sing_exp :: DExp
+            sing_exp = case ns of
+                         DataName -> DConE $ singDataConName n
+                         _        -> DVarE $ singValName n
+
 {-
 Note [singDefuns and type inference]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -176,38 +162,4 @@
 will /also/ fail to typecheck due to a missing SEq constraint. Therefore, this
 design choice fits within the existing tradition of type inference in
 singletons.
-
-Note [SingI instances for partially applied constructors]
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Unlike normal functions, where we generate one SingI instance for each of its
-partial applications (one per defunctionalization symbol), we generate *two*
-SingI instances for each partial application of a data constructor. That is,
-if we have:
-
-  data D a where
-    K :: a -> D a
-
-K has an partial application, so we will generate the following two SingI
-instances:
-
-  instance SingI KSym0          where sing = singFun1 SK
-  instance SingI (TyCon1 KSym0) where sing = singFun1 SK
-
-The first instance is exactly the same as what we'd generate for a normal,
-partially applied function's defun symbol. The second one, while functionally
-equivalent, is a bit dissatisfying: in general, adopting this approach means
-that we end up generating many instances of the form:
-
-  instance SingI (TyCon1 S1)
-  instance SingI (TyCon1 S2)
-  ...
-
-Ideally, we'd have a single instance SingI (TyCon1 s) to rule them all. But
-doing so would require writing something akin to:
-
-  instance (forall a. SingI a => SingI (f a)) => SingI (TyCon1 f) where
-    sing = SLambda $ \(x :: Sing a) -> withSingI x $ sing @_ @(f a)
-
-But this would require quantified constraints. Until GHC gains these, we
-compensate by generating out several SingI (TyCon1 s) instances.
 -}
diff --git a/src/Data/Singletons/Single/Eq.hs b/src/Data/Singletons/Single/Eq.hs
--- a/src/Data/Singletons/Single/Eq.hs
+++ b/src/Data/Singletons/Single/Eq.hs
@@ -31,29 +31,52 @@
   methClauses <- if null sctors
                  then (:[]) <$> mkEmpty
                  else mapM mkMeth sctorPairs
-  constraints <- inferConstraintsDef mb_ctxt (DConPr className) k ctors
-  return $ DInstanceD Nothing
+  constraints <- inferConstraintsDef mb_ctxt (DConT className) k ctors
+  return $ DInstanceD Nothing Nothing
                      constraints
                      (DAppT (DConT className) k)
                      [DLetDec $ DFunD methName methClauses]
 
+data TestInstance = TestEquality
+                  | TestCoercion
+
+-- Make an instance of TestEquality or TestCoercion by leveraging SDecide.
+mkTestInstance :: DsMonad q => Maybe DCxt -> DKind
+               -> Name   -- ^ The name of the data type
+               -> [DCon] -- ^ The /original/ constructors (for inferring the instance context)
+               -> TestInstance -> q DDec
+mkTestInstance mb_ctxt k data_name ctors ti = do
+  constraints <- inferConstraintsDef mb_ctxt (DConT sDecideClassName) k ctors
+  pure $ DInstanceD Nothing Nothing
+                    constraints
+                    (DAppT (DConT tiClassName)
+                           (DConT (singTyConName data_name)
+                             `DSigT` (DArrowT `DAppT` k `DAppT` DConT typeKindName)))
+                    [DLetDec $ DFunD tiMethName
+                                     [DClause [] (DVarE tiDefaultName)]]
+  where
+    (tiClassName, tiMethName, tiDefaultName) =
+      case ti of
+        TestEquality -> (testEqualityClassName, testEqualityMethName, decideEqualityName)
+        TestCoercion -> (testCoercionClassName, testCoercionMethName, decideCoercionName)
+
 mkEqMethClause :: Quasi q => (DCon, DCon) -> q DClause
 mkEqMethClause (c1, c2)
   | lname == rname = do
     lnames <- replicateM lNumArgs (qNewName "a")
     rnames <- replicateM lNumArgs (qNewName "b")
-    let lpats = map DVarPa lnames
-        rpats = map DVarPa rnames
+    let lpats = map DVarP lnames
+        rpats = map DVarP rnames
         lvars = map DVarE lnames
         rvars = map DVarE rnames
     return $ DClause
-      [DConPa lname lpats, DConPa rname rpats]
+      [DConP lname lpats, DConP rname rpats]
       (allExp (zipWith (\l r -> foldExp (DVarE sEqMethName) [l, r])
                         lvars rvars))
   | otherwise =
     return $ DClause
-      [DConPa lname (replicate lNumArgs DWildPa),
-       DConPa rname (replicate rNumArgs DWildPa)]
+      [DConP lname (replicate lNumArgs DWildP),
+       DConP rname (replicate rNumArgs DWildP)]
       (DConE $ singDataConName falseName)
   where allExp :: [DExp] -> DExp
         allExp [] = DConE $ singDataConName trueName
@@ -65,39 +88,39 @@
 
 mkEmptyEqMethClause :: Applicative q => q DClause
 mkEmptyEqMethClause =
-  pure $ DClause [DWildPa, DWildPa]
+  pure $ DClause [DWildP, DWildP]
        $ DConE strueName
 
 mkDecideMethClause :: Quasi q => (DCon, DCon) -> q DClause
 mkDecideMethClause (c1, c2)
   | lname == rname =
     if lNumArgs == 0
-    then return $ DClause [DConPa lname [], DConPa rname []]
+    then return $ DClause [DConP lname [], DConP rname []]
                           (DAppE (DConE provedName) (DConE reflName))
     else do
       lnames <- replicateM lNumArgs (qNewName "a")
       rnames <- replicateM lNumArgs (qNewName "b")
       contra <- qNewName "contra"
-      let lpats = map DVarPa lnames
-          rpats = map DVarPa rnames
+      let lpats = map DVarP lnames
+          rpats = map DVarP rnames
           lvars = map DVarE lnames
           rvars = map DVarE rnames
       refl <- qNewName "refl"
       return $ DClause
-        [DConPa lname lpats, DConPa rname rpats]
+        [DConP lname lpats, DConP rname rpats]
         (DCaseE (mkTupleDExp $
                  zipWith (\l r -> foldExp (DVarE sDecideMethName) [l, r])
                          lvars rvars)
                 ((DMatch (mkTupleDPat (replicate lNumArgs
-                                        (DConPa provedName [DConPa reflName []])))
+                                        (DConP provedName [DConP reflName []])))
                         (DAppE (DConE provedName) (DConE reflName))) :
-                 [DMatch (mkTupleDPat (replicate i DWildPa ++
-                                       DConPa disprovedName [DVarPa contra] :
-                                       replicate (lNumArgs - i - 1) DWildPa))
+                 [DMatch (mkTupleDPat (replicate i DWildP ++
+                                       DConP disprovedName [DVarP contra] :
+                                       replicate (lNumArgs - i - 1) DWildP))
                          (DAppE (DConE disprovedName)
                                 (DLamE [refl] $
                                  DCaseE (DVarE refl)
-                                        [DMatch (DConPa reflName []) $
+                                        [DMatch (DConP reflName []) $
                                          (DAppE (DVarE contra)
                                                 (DConE reflName))]))
                  | i <- [0..lNumArgs-1] ]))
@@ -105,8 +128,8 @@
   | otherwise = do
     x <- qNewName "x"
     return $ DClause
-      [DConPa lname (replicate lNumArgs DWildPa),
-       DConPa rname (replicate rNumArgs DWildPa)]
+      [DConP lname (replicate lNumArgs DWildP),
+       DConP rname (replicate rNumArgs DWildP)]
       (DAppE (DConE disprovedName) (DLamE [x] (DCaseE (DVarE x) [])))
 
   where
@@ -116,5 +139,5 @@
 mkEmptyDecideMethClause :: Quasi q => q DClause
 mkEmptyDecideMethClause = do
   x <- qNewName "x"
-  pure $ DClause [DVarPa x, DWildPa]
+  pure $ DClause [DVarP x, DWildP]
        $ DConE provedName `DAppE` DCaseE (DVarE x) []
diff --git a/src/Data/Singletons/Single/Monad.hs b/src/Data/Singletons/Single/Monad.hs
--- a/src/Data/Singletons/Single/Monad.hs
+++ b/src/Data/Singletons/Single/Monad.hs
@@ -29,7 +29,6 @@
 import Control.Monad.Reader
 import Control.Monad.Writer
 import Control.Applicative
-import Control.Monad.Fail
 
 -- environment during singling
 data SgEnv =
diff --git a/src/Data/Singletons/Single/Type.hs b/src/Data/Singletons/Single/Type.hs
--- a/src/Data/Singletons/Single/Type.hs
+++ b/src/Data/Singletons/Single/Type.hs
@@ -9,16 +9,17 @@
 module Data.Singletons.Single.Type where
 
 import Language.Haskell.TH.Desugar
+import qualified Language.Haskell.TH.Desugar.OSet as OSet
+import Language.Haskell.TH.Desugar.OSet (OSet)
 import Language.Haskell.TH.Syntax
 import Data.Singletons.Names
 import Data.Singletons.Single.Monad
 import Data.Singletons.Promote.Type
 import Data.Singletons.Util
 import Control.Monad
-import qualified Data.Set as Set
-import Data.Set (Set)
+import Data.Foldable
 
-singType :: Set Name       -- the set of bound kind variables in this scope
+singType :: OSet Name      -- the set of bound kind variables in this scope
                            -- see Note [Explicitly binding kind variables]
                            -- in Data.Singletons.Promote.Monad
          -> DType          -- the promoted version of the thing classified by...
@@ -41,9 +42,9 @@
       tau   = ravel args' res'
       -- Make sure to subtract out the bound variables currently in scope, lest we
       -- accidentally shadow them in this type signature.
-      kv_names_to_bind = foldMap fvDType (prom_args ++ map predToType cxt' ++ [prom_res])
-                             Set.\\ bound_kvs
-      kvs_to_bind      = Set.toList kv_names_to_bind
+      kv_names_to_bind = foldMap fvDType (prom_args ++ cxt' ++ [prom_res])
+                            OSet.\\ bound_kvs
+      kvs_to_bind      = toList kv_names_to_bind
   let ty' = DForallT (map DPlainTV kvs_to_bind ++ zipWith DKindedTV arg_names prom_args)
                      cxt' tau
   return (ty', num_args, arg_names, cxt, prom_args, prom_res)
@@ -51,19 +52,24 @@
 singPred :: DPred -> SgM DPred
 singPred = singPredRec []
 
-singPredRec :: [DType] -> DPred -> SgM DPred
-singPredRec _cxt (DForallPr {}) =
+singPredRec :: [DTypeArg] -> DPred -> SgM DPred
+singPredRec _cxt (DForallT {}) =
   fail "Singling of quantified constraints not yet supported"
-singPredRec ctx (DAppPr pr ty) = singPredRec (ty : ctx) pr
-singPredRec _ctx (DSigPr _pr _ki) =
+singPredRec ctx (DAppT pr ty) = singPredRec (DTANormal ty : ctx) pr
+singPredRec ctx (DAppKindT pr ki) = singPredRec (DTyArg ki : ctx) pr
+singPredRec _ctx (DSigT _pr _ki) =
   fail "Singling of constraints with explicit kinds not yet supported"
-singPredRec _ctx (DVarPr _n) =
+singPredRec _ctx (DVarT _n) =
   fail "Singling of contraint variables not yet supported"
-singPredRec ctx (DConPr n)
+singPredRec ctx (DConT n)
   | n == equalityName
   = fail "Singling of type equality constraints not yet supported"
   | otherwise = do
-    kis <- mapM promoteType ctx
+    kis <- mapM promoteTypeArg ctx
     let sName = singClassName n
-    return $ foldPred (DConPr sName) kis
-singPredRec _ctx DWildCardPr = return DWildCardPr  -- it just might work
+    return $ applyDType (DConT sName) kis
+singPredRec _ctx DWildCardT = return DWildCardT  -- it just might work
+singPredRec _ctx DArrowT =
+  fail "(->) spotted at head of a constraint"
+singPredRec _ctx (DLitT {}) =
+  fail "Type-level literal spotted at head of a constraint"
diff --git a/src/Data/Singletons/Syntax.hs b/src/Data/Singletons/Syntax.hs
--- a/src/Data/Singletons/Syntax.hs
+++ b/src/Data/Singletons/Syntax.hs
@@ -8,7 +8,7 @@
 -}
 
 {-# LANGUAGE DataKinds, TypeFamilies, PolyKinds, DeriveDataTypeable,
-             StandaloneDeriving, FlexibleInstances, ConstraintKinds #-}
+             FlexibleInstances, ConstraintKinds #-}
 
 module Data.Singletons.Syntax where
 
@@ -16,10 +16,9 @@
 import Data.Kind (Constraint, Type)
 import Language.Haskell.TH.Syntax hiding (Type)
 import Language.Haskell.TH.Desugar
-import Data.Map.Strict ( Map )
-import qualified Data.Map.Strict as Map
-import Data.Set ( Set )
-import Data.Semigroup (Semigroup(..))
+import qualified Language.Haskell.TH.Desugar.OMap.Strict as OMap
+import Language.Haskell.TH.Desugar.OMap.Strict (OMap)
+import Language.Haskell.TH.Desugar.OSet (OSet)
 
 type VarPromotions = [(Name, Name)] -- from term-level name to type-level name
 
@@ -27,7 +26,7 @@
 data PromDPatInfos = PromDPatInfos
   { prom_dpat_vars    :: VarPromotions
       -- Maps term-level pattern variables to their promoted, type-level counterparts.
-  , prom_dpat_sig_kvs :: Set Name
+  , prom_dpat_sig_kvs :: OSet Name
       -- Kind variables bound by DSigPas.
       -- See Note [Explicitly binding kind variables] in Data.Singletons.Promote.Monad
   }
@@ -49,7 +48,7 @@
 data DataDecl = DataDecl Name [DTyVarBndr] [DCon]
 
 -- The parts of type synonyms that are relevant to singletons.
-data TySynDecl = TySynDecl Name [DTyVarBndr]
+data TySynDecl = TySynDecl Name [DTyVarBndr] DType
 
 -- The parts of open type families that are relevant to singletons.
 type OpenTypeFamilyDecl = TypeFamilyDecl 'Open
@@ -73,7 +72,7 @@
 data InstDecl  ann = InstDecl { id_cxt     :: DCxt
                               , id_name    :: Name
                               , id_arg_tys :: [DType]
-                              , id_sigs    :: Map Name DType
+                              , id_sigs    :: OMap Name DType
                               , id_meths   :: [(Name, LetDecRHS ann)] }
 
 type UClassDecl = ClassDecl Unannotated
@@ -106,15 +105,15 @@
                     ADExp DType
 
 -- A DPat with a pattern-signature node annotated with its type-level equivalent
-data ADPat = ADLitPa Lit
-           | ADVarPa Name
-           | ADConPa Name [ADPat]
-           | ADTildePa ADPat
-           | ADBangPa ADPat
-           | ADSigPa DType -- The promoted pattern. Will not contain any wildcards,
-                           -- as per Note [Singling pattern signatures]
-                     ADPat DType
-           | ADWildPa
+data ADPat = ADLitP Lit
+           | ADVarP Name
+           | ADConP Name [ADPat]
+           | ADTildeP ADPat
+           | ADBangP ADPat
+           | ADSigP DType -- The promoted pattern. Will not contain any wildcards,
+                          -- as per Note [Singling pattern signatures]
+                    ADPat DType
+           | ADWildP
 
 data ADMatch = ADMatch VarPromotions ADPat ADExp
 data ADClause = ADClause VarPromotions
@@ -145,11 +144,11 @@
 type ULetDecRHS = LetDecRHS Unannotated
 
 data LetDecEnv ann = LetDecEnv
-                   { lde_defns :: Map Name (LetDecRHS ann)
-                   , lde_types :: Map Name DType   -- type signatures
-                   , lde_infix :: Map Name Fixity  -- infix declarations
-                   , lde_proms :: IfAnn ann (Map Name DType) () -- possibly, promotions
-                   , lde_bound_kvs :: IfAnn ann (Map Name (Set Name)) ()
+                   { lde_defns :: OMap Name (LetDecRHS ann)
+                   , lde_types :: OMap Name DType  -- type signatures
+                   , lde_infix :: OMap Name Fixity -- infix declarations
+                   , lde_proms :: IfAnn ann (OMap Name DType) () -- possibly, promotions
+                   , lde_bound_kvs :: IfAnn ann (OMap Name (OSet Name)) ()
                      -- The set of bound variables in scope.
                      -- See Note [Explicitly binding kind variables]
                      -- in Data.Singletons.Promote.Monad
@@ -162,16 +161,16 @@
     LetDecEnv (defns1 <> defns2) (types1 <> types2) (infx1 <> infx2) () ()
 
 instance Monoid ULetDecEnv where
-  mempty = LetDecEnv Map.empty Map.empty Map.empty () ()
+  mempty = LetDecEnv OMap.empty OMap.empty OMap.empty () ()
 
 valueBinding :: Name -> ULetDecRHS -> ULetDecEnv
-valueBinding n v = emptyLetDecEnv { lde_defns = Map.singleton n v }
+valueBinding n v = emptyLetDecEnv { lde_defns = OMap.singleton n v }
 
 typeBinding :: Name -> DType -> ULetDecEnv
-typeBinding n t = emptyLetDecEnv { lde_types = Map.singleton n t }
+typeBinding n t = emptyLetDecEnv { lde_types = OMap.singleton n t }
 
 infixDecl :: Fixity -> Name -> ULetDecEnv
-infixDecl f n = emptyLetDecEnv { lde_infix = Map.singleton n f }
+infixDecl f n = emptyLetDecEnv { lde_infix = OMap.singleton n f }
 
 emptyLetDecEnv :: ULetDecEnv
 emptyLetDecEnv = mempty
@@ -182,7 +181,7 @@
     go acc [] = return acc
     go acc (DFunD name clauses : rest) =
       go (valueBinding name (UFunction clauses) <> acc) rest
-    go acc (DValD (DVarPa name) exp : rest) =
+    go acc (DValD (DVarP name) exp : rest) =
       go (valueBinding name (UValue exp) <> acc) rest
     go acc (dec@(DValD {}) : rest) = do
       flattened <- flattenDValD dec
@@ -195,9 +194,10 @@
 
 -- See Note [DerivedDecl]
 data DerivedDecl (cls :: Type -> Constraint) = DerivedDecl
-  { ded_mb_cxt :: Maybe DCxt
-  , ded_type   :: DType
-  , ded_decl   :: DataDecl
+  { ded_mb_cxt     :: Maybe DCxt
+  , ded_type       :: DType
+  , ded_type_tycon :: Name
+  , ded_decl       :: DataDecl
   }
 
 type DerivedEqDecl   = DerivedDecl Eq
@@ -219,15 +219,16 @@
    a deriving clause (ded_mb_cxt)
 2. The datatype, applied to some number of type arguments, as in the
    instance declaration (ded_type)
-3. The datatype's original information, as provided through DataDecl (ded_decl)
+3. The datatype name (ded_type_tycon), cached for convenience
+4. The datatype's constructors (ded_cons)
 
 Why are these instances handled outside of partitionDecs?
 
 * Deriving Eq in singletons not only derives PEq/SEq instances, but it also
-  derives SDecide instances. This additional complication makes Eq difficult
-  to integrate with the other deriving machinery, so we handle it specially
-  in Data.Singletons.Promote and Data.Singletons.Single (depending on the task
-  at hand).
+  derives SDecide, TestEquality, and TestCoercion instances. This additional
+  complication makes Eq difficult to integrate with the other deriving
+  machinery, so we handle it specially in Data.Singletons.Promote and
+  Data.Singletons.Single (depending on the task at hand).
 * Deriving Show in singletons not only derives PShow/SShow instances, but it
   also derives Show instances for singletons types. To make this work,
   we let partitionDecs handle the PShow/SShow instances, but we also stick the
diff --git a/src/Data/Singletons/TH.hs b/src/Data/Singletons/TH.hs
--- a/src/Data/Singletons/TH.hs
+++ b/src/Data/Singletons/TH.hs
@@ -42,13 +42,15 @@
   -- ** Functions to generate 'Show' instances
   promoteShowInstances, promoteShowInstance,
   singShowInstances, singShowInstance,
+  showSingInstances, showSingInstance,
 
   -- ** Utility functions
+  singITyConInstances, singITyConInstance,
   cases, sCases,
 
   -- * Basic singleton definitions
-  Sing(SFalse, STrue, STuple0, STuple2, STuple3, STuple4, STuple5, STuple6, STuple7,
-       SLT, SEQ, SGT),
+  SBool(..), STuple0(..), STuple2(..), STuple3(..), STuple4(..),
+  STuple5(..), STuple6(..), STuple7(..), SOrdering(..),
   module Data.Singletons,
 
   -- * Auxiliary definitions
@@ -66,7 +68,7 @@
   PFunctor(..), SFunctor(..),
   PFoldable(..), SFoldable(..), PMonoid(..), SMonoid(..),
   PTraversable(..), STraversable(..), PApplicative(..), SApplicative(..),
-  (:.), (%.),
+  type (.), (%.),
   SomeSing(..),
 
   Error, sError, ErrorSym0, ErrorSym1,
@@ -189,4 +191,4 @@
   where
     conToPat :: (Name, Int) -> DPat
     conToPat (name, num_fields) =
-      DConPa name (replicate num_fields DWildPa)
+      DConP name (replicate num_fields DWildP)
diff --git a/src/Data/Singletons/TypeError.hs b/src/Data/Singletons/TypeError.hs
--- a/src/Data/Singletons/TypeError.hs
+++ b/src/Data/Singletons/TypeError.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE AllowAmbiguousTypes #-}
 {-# LANGUAGE DataKinds #-}
 {-# LANGUAGE ExistentialQuantification #-}
 {-# LANGUAGE FlexibleInstances #-}
@@ -29,7 +28,7 @@
 module Data.Singletons.TypeError (
   TypeError, sTypeError, typeError,
   ErrorMessage'(..), ErrorMessage, PErrorMessage,
-  Sing(SText, SShowType, (:%<>:), (:%$$:)), SErrorMessage,
+  Sing, SErrorMessage(..),
   ConvertPErrorMessage, showErrorMessage,
 
   -- * Defunctionalization symbols
@@ -76,18 +75,15 @@
 -- | A type-level `ErrorMessage'` which uses 'Symbol' as its text kind.
 type PErrorMessage = ErrorMessage' Symbol
 
-data instance Sing :: PErrorMessage -> Type where
-  -- It would be lovely to not have to write those (:: PErrorMessage) kind
-  -- ascriptions in the return types of each constructor.
-  -- See Trac #14111.
-  SText     :: Sing t             -> Sing ('Text t      :: PErrorMessage)
-  SShowType :: Sing ty            -> Sing ('ShowType ty :: PErrorMessage)
-  (:%<>:)   :: Sing e1 -> Sing e2 -> Sing (e1 ':<>: e2  :: PErrorMessage)
-  (:%$$:)   :: Sing e1 -> Sing e2 -> Sing (e1 ':$$: e2  :: PErrorMessage)
+data SErrorMessage :: PErrorMessage -> Type where
+  SText     :: Sing t             -> SErrorMessage ('Text t)
+  SShowType :: Sing ty            -> SErrorMessage ('ShowType ty)
+  (:%<>:)   :: Sing e1 -> Sing e2 -> SErrorMessage (e1 ':<>: e2)
+  (:%$$:)   :: Sing e1 -> Sing e2 -> SErrorMessage (e1 ':$$: e2)
 infixl 6 :%<>:
 infixl 5 :%$$:
 
-type SErrorMessage = (Sing :: PErrorMessage -> Type)
+type instance Sing = SErrorMessage
 
 instance SingKind PErrorMessage where
   type Demote PErrorMessage = ErrorMessage
@@ -158,30 +154,18 @@
 
 instance SingI (TextSym0 :: Symbol ~> PErrorMessage) where
   sing = singFun1 SText
-instance SingI (TyCon1 'Text :: Symbol ~> PErrorMessage) where
-  sing = singFun1 SText
 
 instance SingI (ShowTypeSym0 :: t ~> PErrorMessage) where
   sing = singFun1 SShowType
-instance SingI (TyCon1 'ShowType :: t ~> PErrorMessage) where
-  sing = singFun1 SShowType
 
 instance SingI ((:<>:@#@$) :: PErrorMessage ~> PErrorMessage ~> PErrorMessage) where
   sing = singFun2 (:%<>:)
-instance SingI (TyCon2 '(:<>:) :: PErrorMessage ~> PErrorMessage ~> PErrorMessage) where
-  sing = singFun2 (:%<>:)
 instance SingI x => SingI ((:<>:@#@$$) x :: PErrorMessage ~> PErrorMessage) where
   sing = singFun1 (sing @x :%<>:)
-instance SingI x => SingI (TyCon1 ('(:<>:) x) :: PErrorMessage ~> PErrorMessage) where
-  sing = singFun1 (sing @x :%<>:)
 
 instance SingI ((:$$:@#@$) :: PErrorMessage ~> PErrorMessage ~> PErrorMessage) where
   sing = singFun2 (:%$$:)
-instance SingI (TyCon2 '(:$$:) :: PErrorMessage ~> PErrorMessage ~> PErrorMessage) where
-  sing = singFun2 (:%$$:)
 instance SingI x => SingI ((:$$:@#@$$) x :: PErrorMessage ~> PErrorMessage) where
-  sing = singFun1 (sing @x :%$$:)
-instance SingI x => SingI (TyCon1 ('(:$$:) x) :: PErrorMessage ~> PErrorMessage) where
   sing = singFun1 (sing @x :%$$:)
 
 instance SingI TypeErrorSym0 where
diff --git a/src/Data/Singletons/TypeLits.hs b/src/Data/Singletons/TypeLits.hs
--- a/src/Data/Singletons/TypeLits.hs
+++ b/src/Data/Singletons/TypeLits.hs
@@ -19,8 +19,7 @@
 
 module Data.Singletons.TypeLits (
   Nat, Symbol,
-  Sing(SNat, SSym),
-  SNat, SSymbol, withKnownNat, withKnownSymbol,
+  Sing, SNat(..), SSymbol(..), withKnownNat, withKnownSymbol,
   Error, sError,
   ErrorWithoutStackTrace, sErrorWithoutStackTrace,
   Undefined, sUndefined,
diff --git a/src/Data/Singletons/TypeLits/Internal.hs b/src/Data/Singletons/TypeLits/Internal.hs
--- a/src/Data/Singletons/TypeLits/Internal.hs
+++ b/src/Data/Singletons/TypeLits/Internal.hs
@@ -16,15 +16,14 @@
 {-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, FlexibleInstances,
              UndecidableInstances, ScopedTypeVariables, RankNTypes,
              GADTs, FlexibleContexts, TypeOperators, ConstraintKinds,
-             TemplateHaskell, StandaloneDeriving,
-             TypeApplications #-}
+             TemplateHaskell, TypeApplications #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
 
 module Data.Singletons.TypeLits.Internal (
-  Sing(..),
+  Sing,
 
   Nat, Symbol,
-  SNat, SSymbol, withKnownNat, withKnownSymbol,
+  SNat(..), SSymbol(..), withKnownNat, withKnownSymbol,
   Error, sError,
   ErrorWithoutStackTrace, sErrorWithoutStackTrace,
   Undefined, sUndefined,
@@ -49,7 +48,6 @@
 import GHC.Stack (HasCallStack)
 import GHC.TypeLits as TL
 import qualified GHC.TypeNats as TN
-import Data.Proxy ( Proxy(..) )
 import Numeric.Natural (Natural)
 import Unsafe.Coerce
 
@@ -60,7 +58,8 @@
 ---- TypeLits singletons ---------------------------------------------
 ----------------------------------------------------------------------
 
-data instance Sing (n :: Nat) = KnownNat n => SNat
+data SNat (n :: Nat) = KnownNat n => SNat
+type instance Sing = SNat
 
 instance KnownNat n => SingI n where
   sing = SNat
@@ -71,7 +70,8 @@
   toSing n = case TN.someNatVal n of
                SomeNat (_ :: Proxy n) -> SomeSing (SNat :: Sing n)
 
-data instance Sing (n :: Symbol) = KnownSymbol n => SSym
+data SSymbol (n :: Symbol) = KnownSymbol n => SSym
+type instance Sing = SSymbol
 
 instance KnownSymbol n => SingI n where
   sing = SSym
@@ -122,12 +122,6 @@
 
 instance POrd Symbol where
   type (a :: Symbol) `Compare` (b :: Symbol) = a `TL.CmpSymbol` b
-
--- | Kind-restricted synonym for 'Sing' for @Nat@s
-type SNat (x :: Nat) = Sing x
-
--- | Kind-restricted synonym for 'Sing' for @Symbol@s
-type SSymbol (x :: Symbol) = Sing x
 
 -- SOrd instances
 instance SOrd Nat where
diff --git a/src/Data/Singletons/TypeRepTYPE.hs b/src/Data/Singletons/TypeRepTYPE.hs
--- a/src/Data/Singletons/TypeRepTYPE.hs
+++ b/src/Data/Singletons/TypeRepTYPE.hs
@@ -1,6 +1,6 @@
 {-# LANGUAGE RankNTypes, TypeFamilies, FlexibleInstances,
              GADTs, UndecidableInstances, ScopedTypeVariables,
-             MagicHash, TypeOperators, PolyKinds #-}
+             MagicHash, TypeOperators, PolyKinds, TypeApplications #-}
 {-# OPTIONS_GHC -Wno-orphans #-}
 
 -----------------------------------------------------------------------------
@@ -20,11 +20,10 @@
 ----------------------------------------------------------------------------
 
 module Data.Singletons.TypeRepTYPE (
-  Sing(STypeRep),
+  Sing,
   -- | Here is the definition of the singleton for @'TYPE' rep@:
   --
-  -- > newtype instance Sing :: forall (rep :: RuntimeRep). TYPE rep -> Type where
-  -- >   STypeRep :: forall (rep :: RuntimeRep) (a :: TYPE rep). TypeRep a -> Sing a
+  -- > type instance Sing \@(TYPE rep) = TypeRep
   --
   -- Instances for 'SingI', 'SingKind', 'SEq', 'SDecide', and
   -- 'TestCoercion' are also supplied.
@@ -37,7 +36,6 @@
 import Data.Singletons.Internal
 import Data.Singletons.Prelude.Eq
 import Data.Singletons.Decide
-import Data.Type.Equality ((:~:)(..))
 import GHC.Exts (RuntimeRep, TYPE)
 import Type.Reflection
 import Type.Reflection.Unsafe
@@ -46,7 +44,7 @@
 -- | A choice of singleton for the kind @'TYPE' rep@ (for some 'RuntimeRep'
 -- @rep@), an instantiation of which is the famous kind 'Type'.
 --
--- Conceivably, one could generalize this instance to `Sing :: k -> Type` for
+-- Conceivably, one could generalize this instance to `Sing \@k` for
 -- /any/ kind @k@, and remove all other 'Sing' instances. We don't adopt this
 -- design, however, since it is far more convenient in practice to work with
 -- explicit singleton values than 'TypeRep's (for instance, 'TypeRep's are
@@ -55,9 +53,7 @@
 -- We cannot produce explicit singleton values for everything in @'TYPE' rep@,
 -- however, since it is an open kind, so we reach for 'TypeRep' in this one
 -- particular case.
-newtype instance Sing :: forall (rep :: RuntimeRep). TYPE rep -> Type where
-  STypeRep :: forall (rep :: RuntimeRep) (a :: TYPE rep). TypeRep a -> Sing a
-    deriving (Eq, Ord, Show)
+type instance Sing @(TYPE rep) = TypeRep
 
 -- | A variant of 'SomeTypeRep' whose underlying 'TypeRep' is restricted to
 -- kind @'TYPE' rep@ (for some 'RuntimeRep' @rep@).
@@ -78,15 +74,15 @@
   showsPrec p (SomeTypeRepTYPE ty) = showsPrec p ty
 
 instance Typeable a => SingI (a :: TYPE rep) where
-  sing = STypeRep typeRep
+  sing = typeRep
 instance SingKind (TYPE rep) where
   type Demote (TYPE rep) = SomeTypeRepTYPE rep
-  fromSing (STypeRep tr) = SomeTypeRepTYPE tr
-  toSing (SomeTypeRepTYPE tr) = SomeSing $ STypeRep tr
+  fromSing = SomeTypeRepTYPE
+  toSing (SomeTypeRepTYPE tr) = SomeSing tr
 
 instance PEq (TYPE rep)
 instance SEq (TYPE rep) where
-  STypeRep tra %== STypeRep trb =
+  tra %== trb =
     case eqTypeRep tra trb of
       Just HRefl -> STrue
       Nothing    -> unsafeCoerce SFalse
@@ -94,7 +90,7 @@
                     -- to enable us to define this without unsafeCoerce
 
 instance SDecide (TYPE rep) where
-  STypeRep tra %~ STypeRep trb =
+  tra %~ trb =
     case eqTypeRep tra trb of
       Just HRefl -> Proved Refl
       Nothing    -> Disproved (\Refl -> error "Type.Reflection.eqTypeRep failed")
diff --git a/src/Data/Singletons/Util.hs b/src/Data/Singletons/Util.hs
--- a/src/Data/Singletons/Util.hs
+++ b/src/Data/Singletons/Util.hs
@@ -9,8 +9,7 @@
 
 {-# LANGUAGE TypeSynonymInstances, FlexibleInstances, RankNTypes,
              TemplateHaskell, GeneralizedNewtypeDeriving,
-             MultiParamTypeClasses, StandaloneDeriving,
-             UndecidableInstances, MagicHash, UnboxedTuples,
+             MultiParamTypeClasses, UndecidableInstances, MagicHash,
              LambdaCase, NoMonomorphismRestriction #-}
 
 module Data.Singletons.Util where
@@ -33,7 +32,6 @@
 import Data.Generics
 import Data.Maybe
 import Data.Void
-import Control.Monad.Fail ( MonadFail )
 
 -- The list of types that singletons processes by default
 basicTypes :: [Name]
@@ -92,7 +90,7 @@
 qReportError = qReport True
 
 -- | Generate a new Unique
-qNewUnique :: DsMonad q => q Int
+qNewUnique :: DsMonad q => q Uniq
 qNewUnique = do
   Name _ flav <- qNewName "x"
   case flav of
@@ -203,7 +201,7 @@
 -- convert a number into both alphanumeric and symoblic forms
 uniquePrefixes :: String   -- alphanumeric prefix
                -> String   -- symbolic prefix
-               -> Int
+               -> Uniq
                -> (String, String)  -- (alphanum, symbolic)
 uniquePrefixes alpha symb n = (alpha ++ n_str, symb ++ convert n_str)
   where
@@ -253,15 +251,6 @@
 ravel []    res  = res
 ravel (h:t) res = DAppT (DAppT DArrowT h) (ravel t res)
 
--- | Convert a 'DPred' to a 'DType'.
-predToType :: DPred -> DType
-predToType (DForallPr tvbs cxt p) = DForallT tvbs cxt (predToType p)
-predToType (DAppPr p t)           = DAppT (predToType p) t
-predToType (DSigPr p k)           = DSigT (predToType p) k
-predToType (DVarPr n)             = DVarT n
-predToType (DConPr n)             = DConT n
-predToType DWildCardPr            = DWildCardT
-
 -- count the number of arguments in a type
 countArgs :: DType -> Int
 countArgs ty = length args
@@ -298,9 +287,10 @@
   = DForallT tvbs' cxt' inner_ty'
   where
     (subst', tvbs') = mapAccumL subst_tvb subst tvbs
-    cxt'            = map (substPred subst') cxt
+    cxt'            = map (substType subst') cxt
     inner_ty'       = substType subst' inner_ty
 substType subst (DAppT ty1 ty2) = substType subst ty1 `DAppT` substType subst ty2
+substType subst (DAppKindT ty ki) = substType subst ty `DAppKindT` substType subst ki
 substType subst (DSigT ty ki) = substType subst ty `DSigT` substType subst ki
 substType subst (DVarT n) =
   case Map.lookup n subst of
@@ -311,22 +301,6 @@
 substType _ ty@(DLitT {}) = ty
 substType _ ty@DWildCardT = ty
 
-substPred :: Map Name DType -> DPred -> DPred
-substPred subst pred | Map.null subst = pred
-substPred subst (DForallPr tvbs cxt inner_pred)
-  = DForallPr tvbs' cxt' inner_pred'
-  where
-    (subst', tvbs') = mapAccumL subst_tvb subst tvbs
-    cxt'            = map (substPred subst') cxt
-    inner_pred'     = substPred subst' inner_pred
-substPred subst (DAppPr pred ty) =
-  DAppPr (substPred subst pred) (substType subst ty)
-substPred subst (DSigPr pred ki) =
-  DSigPr (substPred subst pred) (substKind subst ki)
-substPred _ pred@(DVarPr {}) = pred
-substPred _ pred@(DConPr {}) = pred
-substPred _ pred@DWildCardPr = pred
-
 subst_tvb :: Map Name DKind -> DTyVarBndr -> (Map Name DKind, DTyVarBndr)
 subst_tvb s tvb@(DPlainTV n) = (Map.delete n s, tvb)
 subst_tvb s (DKindedTV n k)  = (Map.delete n s, DKindedTV n (substKind s k))
@@ -342,34 +316,6 @@
 -- apply a type to a list of type variable binders
 foldTypeTvbs :: DType -> [DTyVarBndr] -> DType
 foldTypeTvbs ty = foldType ty . map tvbToType
-
--- apply a pred to a list of types
-foldPred :: DPred -> [DType] -> DPred
-foldPred = foldl DAppPr
-
--- apply a pred to a list of type variable binders
-foldPredTvbs :: DPred -> [DTyVarBndr] -> DPred
-foldPredTvbs pr = foldPred pr . map tvbToType
-
--- | Decompose an applied type into its individual components. For example, this:
---
--- @
--- Either Int Char
--- @
---
--- would be unfolded to this:
---
--- @
--- Either :| [Int, Char]
--- @
-unfoldType :: DType -> NonEmpty DType
-unfoldType = go []
-  where
-    go :: [DType] -> DType -> NonEmpty DType
-    go acc (DAppT t1 t2)    = go (t2:acc) t1
-    go acc (DSigT t _)      = go acc t
-    go acc (DForallT _ _ t) = go acc t
-    go acc t                = t :| acc
 
 -- Construct a data type's variable binders, possibly using fresh variables
 -- from the data type's kind signature.
diff --git a/tests/ByHand.hs b/tests/ByHand.hs
--- a/tests/ByHand.hs
+++ b/tests/ByHand.hs
@@ -15,7 +15,7 @@
              RankNTypes, TypeOperators, MultiParamTypeClasses,
              FunctionalDependencies, ScopedTypeVariables,
              LambdaCase, TemplateHaskell, EmptyCase,
-             AllowAmbiguousTypes, TypeApplications, EmptyCase
+             TypeApplications, EmptyCase
  #-}
 
 module ByHand where
@@ -88,9 +88,10 @@
 
 -- Nat
 
-data instance Sing :: Nat -> Type where
-  SZero :: Sing Zero
-  SSucc :: Sing n -> Sing (Succ n)
+data SNat :: Nat -> Type where
+  SZero :: SNat Zero
+  SSucc :: SNat n -> SNat (Succ n)
+type instance Sing = SNat
 
 data SuccSym0 :: Nat ~> Nat
 type instance Apply SuccSym0 x = Succ x
@@ -130,9 +131,10 @@
 
 -- Bool
 
-data instance Sing :: Bool -> Type where
-  SFalse :: Sing False
-  STrue :: Sing True
+data SBool :: Bool -> Type where
+  SFalse :: SBool False
+  STrue :: SBool True
+type instance Sing = SBool
 
 (&&) :: Bool -> Bool -> Bool
 False && _ = False
@@ -161,9 +163,10 @@
 
 -- Maybe
 
-data instance Sing :: Maybe k -> Type where
-  SNothing :: Sing Nothing
-  SJust :: forall k (a :: k). Sing a -> Sing (Just a)
+data SMaybe :: forall k. Maybe k -> Type where
+  SNothing :: SMaybe Nothing
+  SJust :: forall k (a :: k). Sing a -> SMaybe (Just a)
+type instance Sing = SMaybe
 
 type family EqualsMaybe (a :: Maybe k) (b :: Maybe k) where
   EqualsMaybe Nothing Nothing = True
@@ -202,9 +205,10 @@
 
 -- List
 
-data instance Sing :: List k -> Type where
-  SNil :: Sing Nil
-  SCons :: forall k (h :: k) (t :: List k). Sing h -> Sing t -> Sing (Cons h t)
+data SList :: forall k. List k -> Type where
+  SNil :: SList Nil
+  SCons :: forall k (h :: k) (t :: List k). Sing h -> SList t -> SList (Cons h t)
+type instance Sing = SList
 
 type NilSym0 = Nil
 
@@ -256,9 +260,10 @@
 
 -- Either
 
-data instance Sing :: Either k1 k2 -> Type where
-  SLeft :: forall k1 (a :: k1). Sing a -> Sing (Left a)
-  SRight :: forall k2 (b :: k2). Sing b -> Sing (Right b)
+data SEither :: forall k1 k2. Either k1 k2 -> Type where
+  SLeft :: forall k1 (a :: k1). Sing a -> SEither (Left a)
+  SRight :: forall k2 (b :: k2). Sing b -> SEither (Right b)
+type instance Sing = SEither
 
 instance (SingI a) => SingI (Left (a :: k)) where
   sing = SLeft sing
@@ -292,8 +297,9 @@
 data Composite :: Type -> Type -> Type where
   MkComp :: Either (Maybe a) b -> Composite a b
 
-data instance Sing :: Composite k1 k2 -> Type where
-  SMkComp :: forall k1 k2 (a :: Either (Maybe k1) k2). Sing a -> Sing (MkComp a)
+data SComposite :: forall k1 k2. Composite k1 k2 -> Type where
+  SMkComp :: forall k1 k2 (a :: Either (Maybe k1) k2). SEither a -> SComposite (MkComp a)
+type instance Sing = SComposite
 
 instance SingI a => SingI (MkComp (a :: Either (Maybe k1) k2)) where
   sing = SMkComp sing
@@ -314,7 +320,8 @@
 -- Empty
 
 data Empty
-data instance Sing :: Empty -> Type
+data SEmpty :: Empty -> Type
+type instance Sing = SEmpty
 instance SingKind Empty where
   type Demote Empty = Empty
   fromSing = \case
@@ -328,10 +335,11 @@
 
 data Rep = Nat | Maybe Rep | Vec Rep Nat
 
-data instance Sing :: Type -> Type where
-  SNat :: Sing Nat
-  SMaybe :: Sing a -> Sing (Maybe a)
-  SVec :: Sing a -> Sing n -> Sing (Vec a n)
+data SRep :: Type -> Type where
+  SNat :: SRep Nat
+  SMaybe :: SRep a -> SRep (Maybe a)
+  SVec :: SRep a -> SNat n -> SRep (Vec a n)
+type instance Sing = SRep
 
 instance SingI Nat where
   sing = SNat
@@ -723,7 +731,7 @@
 callImpNat :: forall n m. Sing n -> Sing m -> Sing (n + m)
 callImpNat sn sm = withSingI sn (impNat (Proxy :: Proxy n) sm)
 
-instance Show (Sing (n :: Nat)) where
+instance Show (SNat n) where
   show SZero = "SZero"
   show (SSucc n) = "SSucc (" ++ (show n) ++ ")"
 
@@ -857,8 +865,9 @@
 
 ------------------------------------------------------------
 
-data G a where
+data G :: Type -> Type where
   MkG :: G Bool
 
-data instance Sing :: G a -> Type where
-  SMkG :: Sing MkG
+data SG :: forall a. G a -> Type where
+  SMkG :: SG MkG
+type instance Sing = SG
diff --git a/tests/ByHand2.hs b/tests/ByHand2.hs
--- a/tests/ByHand2.hs
+++ b/tests/ByHand2.hs
@@ -31,13 +31,15 @@
   Succ _ == Zero = False
   Succ x == Succ y = x == y
 
-data instance Sing :: Bool -> Type where
-  SFalse :: Sing 'False
-  STrue  :: Sing 'True
+data SBool :: Bool -> Type where
+  SFalse :: SBool 'False
+  STrue  :: SBool 'True
+type instance Sing = SBool
 
-data instance Sing :: Nat -> Type where
-  SZero :: Sing 'Zero
-  SSucc :: Sing n -> Sing ('Succ n)
+data SNat :: Nat -> Type where
+  SZero :: SNat 'Zero
+  SSucc :: SNat n -> SNat ('Succ n)
+type instance Sing = SNat
 
 type family Not (x :: Bool) :: Bool where
   Not 'True = 'False
@@ -112,10 +114,11 @@
   type Compare ('Succ x) 'Zero     = 'GT
   type Compare ('Succ x) ('Succ y) = Compare x y
 
-data instance Sing :: Ordering -> Type where
-  SLT :: Sing 'LT
-  SEQ :: Sing 'EQ
-  SGT :: Sing 'GT
+data SOrdering :: Ordering -> Type where
+  SLT :: SOrdering 'LT
+  SEQ :: SOrdering 'EQ
+  SGT :: SOrdering 'GT
+type instance Sing = SOrdering
 
 instance PEq Ordering where
   type 'LT == 'LT = 'True
diff --git a/tests/SingletonsTestSuite.hs b/tests/SingletonsTestSuite.hs
--- a/tests/SingletonsTestSuite.hs
+++ b/tests/SingletonsTestSuite.hs
@@ -2,16 +2,13 @@
     main
  ) where
 
-import Test.Tasty               ( TestTree, defaultMain, testGroup          )
+import Test.Tasty               ( DependencyType(..), TestTree
+                                , after, defaultMain, testGroup )
 import SingletonsTestSuiteUtils ( compileAndDumpStdTest, compileAndDumpTest
-                                , testCompileAndDumpGroup, ghcOpts
-                             --   , cleanFiles
-                                )
+                                , testCompileAndDumpGroup, ghcOpts )
 
 main :: IO ()
-main = do
---  cleanFiles    We really need to parallelize the testsuite.
-  defaultMain tests
+main = defaultMain tests
 
 tests :: TestTree
 tests =
@@ -21,29 +18,44 @@
     , compileAndDumpStdTest "Empty"
     , compileAndDumpStdTest "Maybe"
     , compileAndDumpStdTest "BoxUnBox"
-    , compileAndDumpStdTest "Operators"
-    , compileAndDumpStdTest "HigherOrder"
+    , afterSingletonsNat .
+      compileAndDumpStdTest "Operators"
+    , afterSingletonsNat .
+      compileAndDumpStdTest "HigherOrder"
     , compileAndDumpStdTest "Contains"
-    , compileAndDumpStdTest "AsPattern"
-    , compileAndDumpStdTest "DataValues"
-    , compileAndDumpStdTest "EqInstances"
+    , afterSingletonsNat .
+      compileAndDumpStdTest "AsPattern"
+    , afterSingletonsNat .
+      compileAndDumpStdTest "DataValues"
+    , after AllSucceed "$3 == \"Empty\"" .
+      after AllSucceed "$3 == \"Operators\"" .
+      compileAndDumpStdTest "EqInstances"
     , compileAndDumpStdTest "CaseExpressions"
-    , compileAndDumpStdTest "Star"
-    , compileAndDumpStdTest "ReturnFunc"
+    , afterSingletonsNat .
+      compileAndDumpStdTest "Star"
+    , afterSingletonsNat .
+      compileAndDumpStdTest "ReturnFunc"
     , compileAndDumpStdTest "Lambdas"
-    , compileAndDumpStdTest "LambdasComprehensive"
+    , afterSingletonsNat .
+      compileAndDumpStdTest "LambdasComprehensive"
     , compileAndDumpStdTest "Error"
     , compileAndDumpStdTest "TopLevelPatterns"
-    , compileAndDumpStdTest "LetStatements"
+    , afterSingletonsNat .
+      compileAndDumpStdTest "LetStatements"
     , compileAndDumpStdTest "LambdaCase"
-    , compileAndDumpStdTest "Sections"
-    , compileAndDumpStdTest "PatternMatching"
+    , afterSingletonsNat .
+      compileAndDumpStdTest "Sections"
+    , afterSingletonsNat .
+      compileAndDumpStdTest "PatternMatching"
     , compileAndDumpStdTest "Records"
     , compileAndDumpStdTest "T29"
     , compileAndDumpStdTest "T33"
     , compileAndDumpStdTest "T54"
-    , compileAndDumpStdTest "Classes"
-    , compileAndDumpStdTest "Classes2"
+    , afterSingletonsNat .
+      compileAndDumpStdTest "Classes"
+    , afterSingletonsNat .
+      after AllSucceed "$3 == \"Classes\"" .
+      compileAndDumpStdTest "Classes2"
     , compileAndDumpStdTest "FunDeps"
     , compileAndDumpStdTest "T78"
     , compileAndDumpStdTest "OrdDeriving"
@@ -102,12 +114,16 @@
     , compileAndDumpStdTest "FunctorLikeDeriving"
     , compileAndDumpStdTest "T353"
     , compileAndDumpStdTest "T358"
+    , compileAndDumpStdTest "T367"
     , compileAndDumpStdTest "T371"
+    , compileAndDumpStdTest "T376"
+    , compileAndDumpStdTest "T402"
     ],
     testCompileAndDumpGroup "Promote"
     [ compileAndDumpStdTest "Constructors"
     , compileAndDumpStdTest "GenDefunSymbols"
-    , compileAndDumpStdTest "Newtypes"
+    , afterSingletonsNat .
+      compileAndDumpStdTest "Newtypes"
     , compileAndDumpStdTest "Pragmas"
     , compileAndDumpStdTest "Prelude"
     , compileAndDumpStdTest "T180"
@@ -115,9 +131,13 @@
     ],
     testGroup "Database client"
     [ compileAndDumpTest "GradingClient/Database" ghcOpts
-    , compileAndDumpTest "GradingClient/Main"     ghcOpts
+    , after AllSucceed "$3 == \"Database\"" $
+      compileAndDumpTest "GradingClient/Main"     ghcOpts
     ],
     testCompileAndDumpGroup "InsertionSort"
     [ compileAndDumpStdTest "InsertionSortImp"
     ]
   ]
+
+afterSingletonsNat :: TestTree -> TestTree
+afterSingletonsNat = after AllSucceed "$3 == \"Nat\""
diff --git a/tests/SingletonsTestSuiteUtils.hs b/tests/SingletonsTestSuiteUtils.hs
--- a/tests/SingletonsTestSuiteUtils.hs
+++ b/tests/SingletonsTestSuiteUtils.hs
@@ -2,6 +2,8 @@
 {-# LANGUAGE DeriveAnyClass #-}
 {-# LANGUAGE DerivingStrategies #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE TypeApplications #-}
 module SingletonsTestSuiteUtils (
    compileAndDumpTest
  , compileAndDumpStdTest
@@ -12,7 +14,10 @@
 
 import Build_singletons   ( ghcPath, ghcFlags, rootDir          )
 import Control.Exception  ( Exception, throw                    )
+import Data.Foldable      ( asum )
 import Data.List          ( intercalate                         )
+import Data.Text          ( Text                                )
+import Data.String        ( IsString(fromString)                )
 import System.Exit        ( ExitCode(..)                        )
 import System.FilePath    ( takeBaseName, pathSeparator         )
 import System.IO          ( IOMode(..), hGetContents, openFile  )
@@ -22,6 +27,7 @@
                           , callCommand                         )
 import Test.Tasty         ( TestTree, testGroup                 )
 import Test.Tasty.Golden  ( goldenVsFileDiff                    )
+import qualified Turtle
 
 -- Some infractructure for handling external process errors
 newtype ProcessException = ProcessException String
@@ -33,7 +39,7 @@
 goldenPath = rootDir </> "tests/compile-and-dump/"
 
 ghcVersion :: String
-ghcVersion = ".ghc86"
+ghcVersion = ".ghc88"
 
 -- GHC options used when running the tests
 ghcOpts :: [String]
@@ -71,8 +77,8 @@
   , "-XNoStarIsType"
   ]
 
--- Compile a test using specified GHC options. Save output to file, filter with
--- sed and compare it with golden file. This function also builds golden file
+-- Compile a test using specified GHC options. Save output to file, normalize
+-- and compare it with golden file. This function also builds golden file
 -- from a template file. Putting it here is a bit of a hack but it's easy and it
 -- works.
 --
@@ -100,7 +106,7 @@
                                               , std_err = UseHandle hActualFile
                                               , cwd     = Just goldenPath }
       _ <- waitForProcess pid      -- see Note [Ignore exit code]
-      filterWithSed actualFilePath -- see Note [Normalization with sed]
+      normalizeOutput actualFilePath -- see Note [Output normalization]
       buildGoldenFile templateFilePath goldenFilePath
       return ()
 
@@ -137,10 +143,10 @@
 --  -w - Ignore all white space.
 --  -B - Ignore changes whose lines are all blank.
 
--- Note [Normalization with sed]
+-- Note [Output normalization]
 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 --
--- Output file is normalized with sed. Line numbers generated in splices:
+-- Output file is normalized inplace. Line numbers generated in splices:
 --
 --   Foo:(40,3)-(42,4)
 --   Foo.hs:7:3:
@@ -155,29 +161,27 @@
 -- This allows to insert comments into test file without the need to modify the
 -- golden file to adjust line numbers.
 --
--- Note that GNU sed (on Linux) and BSD sed (on MacOS) are slightly different.
--- We use conditional compilation to deal with this.
 
-filterWithSed :: FilePath -> IO ()
-filterWithSed file = runProcessWithOpts CreatePipe "sed"
-#ifdef darwin_HOST_OS
-  [ "-i", "''"
-#else
-  [ "-i"
-#endif
-  , "-e", "'s/([0-9]*,[0-9]*)-([0-9]*,[0-9]*)/(0,0)-(0,0)/g'"
-  , "-e", "'s/:[0-9][0-9]*:[0-9][0-9]*/:0:0/g'"
-  , "-e", "'s/:[0-9]*:[0-9]*-[0-9]*/:0:0:/g'"
-  , "-e", "'s/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/0123456789/g'"
-  , "-e", "'s/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/0123456789876543210/g'"
-  , "-e", "'s/[!#$%&*+./>]\\{10\\}/%%%%%%%%%%/g'"
-  , "-e", "'s/[!#$%&*+./>]\\{19\\}/%%%%%%%%%%%%%%%%%%%/g'"
-    -- Remove pretty-printed references to the singletons package
-    -- (e.g., turn `singletons-2.4.1:Sing` into `Sing`) to make the output
-    -- more stable.
-  , "-e", "'s/singletons-[0-9]\\+\\(\\.[0-9]\\+\\)*://g'"
-  , file
-  ]
+normalizeOutput :: FilePath -> IO ()
+normalizeOutput file = Turtle.inplace pat (fromString file)
+  where
+    pat :: Turtle.Pattern Text
+    pat = asum
+      [ "(0,0)-(0,0)" <$ numPair <* "-" <* numPair
+      , ":0:0:" <$ ":" <* d <* ":" <* d <* "-" <* d
+      , ":0:0" <$ ":" <* d <* ":" <* d
+      , fromString @Text . numPeriod <$> Turtle.lowerBounded 10 Turtle.digit
+      , fromString @Text . ('%' <$) <$> Turtle.lowerBounded 10 punctSym
+      -- Remove pretty-printed references to the singletons package
+      -- (e.g., turn `singletons-2.4.1:Sing` into `Sing`) to make the output
+      -- more stable.
+      , "" <$ "singletons-" <* verNum <* ":"
+      ]
+    verNum = d `Turtle.sepBy` Turtle.char '.'
+    numPair = () <$ "(" <* d <* "," <* d <* ")"
+    punctSym = Turtle.oneOf "!#$%&*+./>"
+    numPeriod = zipWith const (cycle "0123456789876543210")
+    d = Turtle.some Turtle.digit
 
 buildGoldenFile :: FilePath -> FilePath -> IO ()
 buildGoldenFile templateFilePath goldenFilePath = do
diff --git a/tests/compile-and-dump/GradingClient/Database.ghc86.template b/tests/compile-and-dump/GradingClient/Database.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/GradingClient/Database.ghc86.template
+++ /dev/null
@@ -1,2610 +0,0 @@
-GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| data Nat
-            = Zero | Succ Nat
-            deriving (Eq, Ord) |]
-  ======>
-    data Nat
-      = Zero | Succ Nat
-      deriving (Eq, Ord)
-    type ZeroSym0 = Zero
-    type SuccSym1 (t0123456789876543210 :: Nat) =
-        Succ t0123456789876543210
-    instance SuppressUnusedWarnings SuccSym0 where
-      suppressUnusedWarnings = snd (((,) SuccSym0KindInference) ())
-    data SuccSym0 :: (~>) Nat Nat
-      where
-        SuccSym0KindInference :: forall t0123456789876543210
-                                        arg. SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>
-                                 SuccSym0 t0123456789876543210
-    type instance Apply SuccSym0 t0123456789876543210 = Succ t0123456789876543210
-    type family Compare_0123456789876543210 (a :: Nat) (a :: Nat) :: Ordering where
-      Compare_0123456789876543210 Zero Zero = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
-      Compare_0123456789876543210 (Succ a_0123456789876543210) (Succ b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])
-      Compare_0123456789876543210 Zero (Succ _) = LTSym0
-      Compare_0123456789876543210 (Succ _) Zero = GTSym0
-    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
-        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
-    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Nat Ordering
-      where
-        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
-    data Compare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering)
-      where
-        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
-                                                        Compare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
-    instance POrd Nat where
-      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
-    type family Equals_0123456789876543210 (a :: Nat) (b :: Nat) :: Bool where
-      Equals_0123456789876543210 Zero Zero = TrueSym0
-      Equals_0123456789876543210 (Succ a) (Succ b) = (==) a b
-      Equals_0123456789876543210 (_ :: Nat) (_ :: Nat) = FalseSym0
-    instance PEq Nat where
-      type (==) a b = Equals_0123456789876543210 a b
-    data instance Sing :: Nat -> Type
-      where
-        SZero :: Sing Zero
-        SSucc :: forall (n :: Nat). (Sing (n :: Nat)) -> Sing (Succ n)
-    type SNat = (Sing :: Nat -> Type)
-    instance SingKind Nat where
-      type Demote Nat = Nat
-      fromSing SZero = Zero
-      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) }
-    instance SOrd Nat => SOrd Nat where
-      sCompare ::
-        forall (t1 :: Nat) (t2 :: Nat).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (CompareSym0 :: TyFun Nat ((~>) Nat Ordering)
-                                                 -> Type) t1) t2)
-      sCompare SZero SZero
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            SNil
-      sCompare
-        (SSucc (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        (SSucc (sB_0123456789876543210 :: Sing b_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            ((applySing
-                ((applySing ((singFun2 @(:@#@$)) SCons))
-                   ((applySing
-                       ((applySing ((singFun2 @CompareSym0) sCompare))
-                          sA_0123456789876543210))
-                      sB_0123456789876543210)))
-               SNil)
-      sCompare SZero (SSucc _) = SLT
-      sCompare (SSucc _) SZero = SGT
-    instance SEq Nat => SEq Nat where
-      (%==) SZero SZero = STrue
-      (%==) SZero (SSucc _) = SFalse
-      (%==) (SSucc _) SZero = SFalse
-      (%==) (SSucc a) (SSucc b) = ((%==) a) b
-    instance SDecide Nat => SDecide Nat where
-      (%~) SZero SZero = Proved Refl
-      (%~) SZero (SSucc _) = Disproved (\ x -> case x of)
-      (%~) (SSucc _) SZero = Disproved (\ x -> case x of)
-      (%~) (SSucc a) (SSucc b)
-        = case ((%~) a) b of
-            Proved Refl -> Proved Refl
-            Disproved contra
-              -> Disproved (\ refl -> case refl of { Refl -> contra Refl })
-    instance SingI Zero where
-      sing = SZero
-    instance SingI n => SingI (Succ (n :: Nat)) where
-      sing = SSucc sing
-    instance SingI (SuccSym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @SuccSym0) SSucc
-    instance SingI (TyCon1 Succ :: (~>) Nat Nat) where
-      sing = (singFun1 @(TyCon1 Succ)) SSucc
-GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| append :: Schema -> Schema -> Schema
-          append (Sch s1) (Sch s2) = Sch (s1 ++ s2)
-          attrNotIn :: Attribute -> Schema -> Bool
-          attrNotIn _ (Sch []) = True
-          attrNotIn (Attr name u) (Sch ((Attr name' _) : t))
-            = (name /= name') && (attrNotIn (Attr name u) (Sch t))
-          disjoint :: Schema -> Schema -> Bool
-          disjoint (Sch []) _ = True
-          disjoint (Sch (h : t)) s = (attrNotIn h s) && (disjoint (Sch t) s)
-          occurs :: [AChar] -> Schema -> Bool
-          occurs _ (Sch []) = False
-          occurs name (Sch ((Attr name' _) : attrs))
-            = name == name' || occurs name (Sch attrs)
-          lookup :: [AChar] -> Schema -> U
-          lookup _ (Sch []) = undefined
-          lookup name (Sch ((Attr name' u) : attrs))
-            = if name == name' then u else lookup name (Sch attrs)
-          
-          data U
-            = BOOL | STRING | NAT | VEC U Nat
-            deriving (Read, Eq, Show)
-          data AChar
-            = CA |
-              CB |
-              CC |
-              CD |
-              CE |
-              CF |
-              CG |
-              CH |
-              CI |
-              CJ |
-              CK |
-              CL |
-              CM |
-              CN |
-              CO |
-              CP |
-              CQ |
-              CR |
-              CS |
-              CT |
-              CU |
-              CV |
-              CW |
-              CX |
-              CY |
-              CZ
-            deriving (Read, Show, Eq)
-          data Attribute = Attr [AChar] U
-          data Schema = Sch [Attribute] |]
-  ======>
-    data U
-      = BOOL | STRING | NAT | VEC U Nat
-      deriving (Read, Eq, Show)
-    data AChar
-      = CA |
-        CB |
-        CC |
-        CD |
-        CE |
-        CF |
-        CG |
-        CH |
-        CI |
-        CJ |
-        CK |
-        CL |
-        CM |
-        CN |
-        CO |
-        CP |
-        CQ |
-        CR |
-        CS |
-        CT |
-        CU |
-        CV |
-        CW |
-        CX |
-        CY |
-        CZ
-      deriving (Read, Show, Eq)
-    data Attribute = Attr [AChar] U
-    data Schema = Sch [Attribute]
-    append :: Schema -> Schema -> Schema
-    append (Sch s1) (Sch s2) = Sch (s1 ++ s2)
-    attrNotIn :: Attribute -> Schema -> Bool
-    attrNotIn _ (Sch []) = True
-    attrNotIn (Attr name u) (Sch (Attr name' _ : t))
-      = ((name /= name') && (attrNotIn ((Attr name) u)) (Sch t))
-    disjoint :: Schema -> Schema -> Bool
-    disjoint (Sch []) _ = True
-    disjoint (Sch (h : t)) s
-      = ((attrNotIn h) s && (disjoint (Sch t)) s)
-    occurs :: [AChar] -> Schema -> Bool
-    occurs _ (Sch []) = False
-    occurs name (Sch (Attr name' _ : attrs))
-      = ((name == name') || (occurs name) (Sch attrs))
-    lookup :: [AChar] -> Schema -> U
-    lookup _ (Sch []) = undefined
-    lookup name (Sch (Attr name' u : attrs))
-      = if (name == name') then u else (lookup name) (Sch attrs)
-    type BOOLSym0 = BOOL
-    type STRINGSym0 = STRING
-    type NATSym0 = NAT
-    type VECSym2 (t0123456789876543210 :: U) (t0123456789876543210 :: Nat) =
-        VEC t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (VECSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) VECSym1KindInference) ())
-    data VECSym1 (t0123456789876543210 :: U) :: (~>) Nat U
-      where
-        VECSym1KindInference :: forall t0123456789876543210
-                                       t0123456789876543210
-                                       arg. SameKind (Apply (VECSym1 t0123456789876543210) arg) (VECSym2 t0123456789876543210 arg) =>
-                                VECSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (VECSym1 t0123456789876543210) t0123456789876543210 = VEC t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings VECSym0 where
-      suppressUnusedWarnings = snd (((,) VECSym0KindInference) ())
-    data VECSym0 :: (~>) U ((~>) Nat U)
-      where
-        VECSym0KindInference :: forall t0123456789876543210
-                                       arg. SameKind (Apply VECSym0 arg) (VECSym1 arg) =>
-                                VECSym0 t0123456789876543210
-    type instance Apply VECSym0 t0123456789876543210 = VECSym1 t0123456789876543210
-    type CASym0 = CA
-    type CBSym0 = CB
-    type CCSym0 = CC
-    type CDSym0 = CD
-    type CESym0 = CE
-    type CFSym0 = CF
-    type CGSym0 = CG
-    type CHSym0 = CH
-    type CISym0 = CI
-    type CJSym0 = CJ
-    type CKSym0 = CK
-    type CLSym0 = CL
-    type CMSym0 = CM
-    type CNSym0 = CN
-    type COSym0 = CO
-    type CPSym0 = CP
-    type CQSym0 = CQ
-    type CRSym0 = CR
-    type CSSym0 = CS
-    type CTSym0 = CT
-    type CUSym0 = CU
-    type CVSym0 = CV
-    type CWSym0 = CW
-    type CXSym0 = CX
-    type CYSym0 = CY
-    type CZSym0 = CZ
-    type AttrSym2 (t0123456789876543210 :: [AChar]) (t0123456789876543210 :: U) =
-        Attr t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (AttrSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) AttrSym1KindInference) ())
-    data AttrSym1 (t0123456789876543210 :: [AChar]) :: (~>) U Attribute
-      where
-        AttrSym1KindInference :: forall t0123456789876543210
-                                        t0123456789876543210
-                                        arg. SameKind (Apply (AttrSym1 t0123456789876543210) arg) (AttrSym2 t0123456789876543210 arg) =>
-                                 AttrSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (AttrSym1 t0123456789876543210) t0123456789876543210 = Attr t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings AttrSym0 where
-      suppressUnusedWarnings = snd (((,) AttrSym0KindInference) ())
-    data AttrSym0 :: (~>) [AChar] ((~>) U Attribute)
-      where
-        AttrSym0KindInference :: forall t0123456789876543210
-                                        arg. SameKind (Apply AttrSym0 arg) (AttrSym1 arg) =>
-                                 AttrSym0 t0123456789876543210
-    type instance Apply AttrSym0 t0123456789876543210 = AttrSym1 t0123456789876543210
-    type SchSym1 (t0123456789876543210 :: [Attribute]) =
-        Sch t0123456789876543210
-    instance SuppressUnusedWarnings SchSym0 where
-      suppressUnusedWarnings = snd (((,) SchSym0KindInference) ())
-    data SchSym0 :: (~>) [Attribute] Schema
-      where
-        SchSym0KindInference :: forall t0123456789876543210
-                                       arg. SameKind (Apply SchSym0 arg) (SchSym1 arg) =>
-                                SchSym0 t0123456789876543210
-    type instance Apply SchSym0 t0123456789876543210 = Sch t0123456789876543210
-    type Let0123456789876543210Scrutinee_0123456789876543210Sym4 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 =
-        Let0123456789876543210Scrutinee_0123456789876543210 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym3 u0123456789876543210 name'0123456789876543210 name0123456789876543210) where
-      suppressUnusedWarnings
-        = snd
-            (((,)
-                Let0123456789876543210Scrutinee_0123456789876543210Sym3KindInference)
-               ())
-    data Let0123456789876543210Scrutinee_0123456789876543210Sym3 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210
-      where
-        Let0123456789876543210Scrutinee_0123456789876543210Sym3KindInference :: forall name0123456789876543210
-                                                                                       name'0123456789876543210
-                                                                                       u0123456789876543210
-                                                                                       attrs0123456789876543210
-                                                                                       arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym3 name0123456789876543210 name'0123456789876543210 u0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym4 name0123456789876543210 name'0123456789876543210 u0123456789876543210 arg) =>
-                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym3 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210
-    type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym3 u0123456789876543210 name'0123456789876543210 name0123456789876543210) attrs0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 u0123456789876543210 name'0123456789876543210 name0123456789876543210 attrs0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym2 name'0123456789876543210 name0123456789876543210) where
-      suppressUnusedWarnings
-        = snd
-            (((,)
-                Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference)
-               ())
-    data Let0123456789876543210Scrutinee_0123456789876543210Sym2 name0123456789876543210 name'0123456789876543210 u0123456789876543210
-      where
-        Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference :: forall name0123456789876543210
-                                                                                       name'0123456789876543210
-                                                                                       u0123456789876543210
-                                                                                       arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym2 name0123456789876543210 name'0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym3 name0123456789876543210 name'0123456789876543210 arg) =>
-                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym2 name0123456789876543210 name'0123456789876543210 u0123456789876543210
-    type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym2 name'0123456789876543210 name0123456789876543210) u0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym3 name'0123456789876543210 name0123456789876543210 u0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210) where
-      suppressUnusedWarnings
-        = snd
-            (((,)
-                Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference)
-               ())
-    data Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210 name'0123456789876543210
-      where
-        Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference :: forall name0123456789876543210
-                                                                                       name'0123456789876543210
-                                                                                       arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym2 name0123456789876543210 arg) =>
-                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210 name'0123456789876543210
-    type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210) name'0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym2 name0123456789876543210 name'0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd
-            (((,)
-                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
-               ())
-    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 name0123456789876543210
-      where
-        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall name0123456789876543210
-                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
-                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 name0123456789876543210
-    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 name0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210
-    type family Let0123456789876543210Scrutinee_0123456789876543210 name name' u attrs where
-      Let0123456789876543210Scrutinee_0123456789876543210 name name' u attrs = Apply (Apply (==@#@$) name) name'
-    type family Case_0123456789876543210 name name' u attrs 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 LookupSym2 (a0123456789876543210 :: [AChar]) (a0123456789876543210 :: Schema) =
-        Lookup a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (LookupSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) LookupSym1KindInference) ())
-    data LookupSym1 (a0123456789876543210 :: [AChar]) :: (~>) Schema U
-      where
-        LookupSym1KindInference :: forall a0123456789876543210
-                                          a0123456789876543210
-                                          arg. SameKind (Apply (LookupSym1 a0123456789876543210) arg) (LookupSym2 a0123456789876543210 arg) =>
-                                   LookupSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (LookupSym1 a0123456789876543210) a0123456789876543210 = Lookup a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings LookupSym0 where
-      suppressUnusedWarnings = snd (((,) LookupSym0KindInference) ())
-    data LookupSym0 :: (~>) [AChar] ((~>) Schema U)
-      where
-        LookupSym0KindInference :: forall a0123456789876543210
-                                          arg. SameKind (Apply LookupSym0 arg) (LookupSym1 arg) =>
-                                   LookupSym0 a0123456789876543210
-    type instance Apply LookupSym0 a0123456789876543210 = LookupSym1 a0123456789876543210
-    type OccursSym2 (a0123456789876543210 :: [AChar]) (a0123456789876543210 :: Schema) =
-        Occurs a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (OccursSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) OccursSym1KindInference) ())
-    data OccursSym1 (a0123456789876543210 :: [AChar]) :: (~>) Schema Bool
-      where
-        OccursSym1KindInference :: forall a0123456789876543210
-                                          a0123456789876543210
-                                          arg. SameKind (Apply (OccursSym1 a0123456789876543210) arg) (OccursSym2 a0123456789876543210 arg) =>
-                                   OccursSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (OccursSym1 a0123456789876543210) a0123456789876543210 = Occurs a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings OccursSym0 where
-      suppressUnusedWarnings = snd (((,) OccursSym0KindInference) ())
-    data OccursSym0 :: (~>) [AChar] ((~>) Schema Bool)
-      where
-        OccursSym0KindInference :: forall a0123456789876543210
-                                          arg. SameKind (Apply OccursSym0 arg) (OccursSym1 arg) =>
-                                   OccursSym0 a0123456789876543210
-    type instance Apply OccursSym0 a0123456789876543210 = OccursSym1 a0123456789876543210
-    type AttrNotInSym2 (a0123456789876543210 :: Attribute) (a0123456789876543210 :: Schema) =
-        AttrNotIn a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (AttrNotInSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) AttrNotInSym1KindInference) ())
-    data AttrNotInSym1 (a0123456789876543210 :: Attribute) :: (~>) Schema Bool
-      where
-        AttrNotInSym1KindInference :: forall a0123456789876543210
-                                             a0123456789876543210
-                                             arg. SameKind (Apply (AttrNotInSym1 a0123456789876543210) arg) (AttrNotInSym2 a0123456789876543210 arg) =>
-                                      AttrNotInSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (AttrNotInSym1 a0123456789876543210) a0123456789876543210 = AttrNotIn a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings AttrNotInSym0 where
-      suppressUnusedWarnings = snd (((,) AttrNotInSym0KindInference) ())
-    data AttrNotInSym0 :: (~>) Attribute ((~>) Schema Bool)
-      where
-        AttrNotInSym0KindInference :: forall a0123456789876543210
-                                             arg. SameKind (Apply AttrNotInSym0 arg) (AttrNotInSym1 arg) =>
-                                      AttrNotInSym0 a0123456789876543210
-    type instance Apply AttrNotInSym0 a0123456789876543210 = AttrNotInSym1 a0123456789876543210
-    type DisjointSym2 (a0123456789876543210 :: Schema) (a0123456789876543210 :: Schema) =
-        Disjoint a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (DisjointSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) DisjointSym1KindInference) ())
-    data DisjointSym1 (a0123456789876543210 :: Schema) :: (~>) Schema Bool
-      where
-        DisjointSym1KindInference :: forall a0123456789876543210
-                                            a0123456789876543210
-                                            arg. SameKind (Apply (DisjointSym1 a0123456789876543210) arg) (DisjointSym2 a0123456789876543210 arg) =>
-                                     DisjointSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (DisjointSym1 a0123456789876543210) a0123456789876543210 = Disjoint a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings DisjointSym0 where
-      suppressUnusedWarnings = snd (((,) DisjointSym0KindInference) ())
-    data DisjointSym0 :: (~>) Schema ((~>) Schema Bool)
-      where
-        DisjointSym0KindInference :: forall a0123456789876543210
-                                            arg. SameKind (Apply DisjointSym0 arg) (DisjointSym1 arg) =>
-                                     DisjointSym0 a0123456789876543210
-    type instance Apply DisjointSym0 a0123456789876543210 = DisjointSym1 a0123456789876543210
-    type AppendSym2 (a0123456789876543210 :: Schema) (a0123456789876543210 :: Schema) =
-        Append a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (AppendSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) AppendSym1KindInference) ())
-    data AppendSym1 (a0123456789876543210 :: Schema) :: (~>) Schema Schema
-      where
-        AppendSym1KindInference :: forall a0123456789876543210
-                                          a0123456789876543210
-                                          arg. SameKind (Apply (AppendSym1 a0123456789876543210) arg) (AppendSym2 a0123456789876543210 arg) =>
-                                   AppendSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (AppendSym1 a0123456789876543210) a0123456789876543210 = Append a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings AppendSym0 where
-      suppressUnusedWarnings = snd (((,) AppendSym0KindInference) ())
-    data AppendSym0 :: (~>) Schema ((~>) Schema Schema)
-      where
-        AppendSym0KindInference :: forall a0123456789876543210
-                                          arg. SameKind (Apply AppendSym0 arg) (AppendSym1 arg) =>
-                                   AppendSym0 a0123456789876543210
-    type instance Apply AppendSym0 a0123456789876543210 = AppendSym1 a0123456789876543210
-    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_0123456789876543210Sym4 name name' u attrs)
-    type family Occurs (a :: [AChar]) (a :: Schema) :: Bool where
-      Occurs _ (Sch '[]) = FalseSym0
-      Occurs name (Sch ( '(:) (Attr name' _) attrs)) = Apply (Apply (||@#@$) (Apply (Apply (==@#@$) name) name')) (Apply (Apply OccursSym0 name) (Apply SchSym0 attrs))
-    type family AttrNotIn (a :: Attribute) (a :: Schema) :: Bool where
-      AttrNotIn _ (Sch '[]) = TrueSym0
-      AttrNotIn (Attr name u) (Sch ( '(:) (Attr name' _) t)) = Apply (Apply (&&@#@$) (Apply (Apply (/=@#@$) name) name')) (Apply (Apply AttrNotInSym0 (Apply (Apply AttrSym0 name) u)) (Apply SchSym0 t))
-    type family Disjoint (a :: Schema) (a :: Schema) :: Bool where
-      Disjoint (Sch '[]) _ = TrueSym0
-      Disjoint (Sch ( '(:) h t)) s = Apply (Apply (&&@#@$) (Apply (Apply AttrNotInSym0 h) s)) (Apply (Apply DisjointSym0 (Apply SchSym0 t)) s)
-    type family Append (a :: Schema) (a :: Schema) :: Schema where
-      Append (Sch s1) (Sch s2) = Apply SchSym0 (Apply (Apply (++@#@$) s1) s2)
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: U) (a :: Symbol) :: Symbol where
-      ShowsPrec_0123456789876543210 _ BOOL a_0123456789876543210 = Apply (Apply ShowStringSym0 "BOOL") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ STRING a_0123456789876543210 = Apply (Apply ShowStringSym0 "STRING") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ NAT a_0123456789876543210 = Apply (Apply ShowStringSym0 "NAT") a_0123456789876543210
-      ShowsPrec_0123456789876543210 p_0123456789876543210 (VEC arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "VEC ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: U) (a0123456789876543210 :: Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: U) :: (~>) Symbol Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) U ((~>) Symbol Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) U ((~>) Symbol Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow U where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: AChar) (a :: Symbol) :: Symbol where
-      ShowsPrec_0123456789876543210 _ CA a_0123456789876543210 = Apply (Apply ShowStringSym0 "CA") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CB a_0123456789876543210 = Apply (Apply ShowStringSym0 "CB") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CC a_0123456789876543210 = Apply (Apply ShowStringSym0 "CC") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CD a_0123456789876543210 = Apply (Apply ShowStringSym0 "CD") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CE a_0123456789876543210 = Apply (Apply ShowStringSym0 "CE") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CF a_0123456789876543210 = Apply (Apply ShowStringSym0 "CF") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CG a_0123456789876543210 = Apply (Apply ShowStringSym0 "CG") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CH a_0123456789876543210 = Apply (Apply ShowStringSym0 "CH") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CI a_0123456789876543210 = Apply (Apply ShowStringSym0 "CI") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CJ a_0123456789876543210 = Apply (Apply ShowStringSym0 "CJ") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CK a_0123456789876543210 = Apply (Apply ShowStringSym0 "CK") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CL a_0123456789876543210 = Apply (Apply ShowStringSym0 "CL") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CM a_0123456789876543210 = Apply (Apply ShowStringSym0 "CM") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CN a_0123456789876543210 = Apply (Apply ShowStringSym0 "CN") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CO a_0123456789876543210 = Apply (Apply ShowStringSym0 "CO") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CP a_0123456789876543210 = Apply (Apply ShowStringSym0 "CP") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CQ a_0123456789876543210 = Apply (Apply ShowStringSym0 "CQ") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CR a_0123456789876543210 = Apply (Apply ShowStringSym0 "CR") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CS a_0123456789876543210 = Apply (Apply ShowStringSym0 "CS") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CT a_0123456789876543210 = Apply (Apply ShowStringSym0 "CT") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CU a_0123456789876543210 = Apply (Apply ShowStringSym0 "CU") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CV a_0123456789876543210 = Apply (Apply ShowStringSym0 "CV") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CW a_0123456789876543210 = Apply (Apply ShowStringSym0 "CW") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CX a_0123456789876543210 = Apply (Apply ShowStringSym0 "CX") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CY a_0123456789876543210 = Apply (Apply ShowStringSym0 "CY") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ CZ a_0123456789876543210 = Apply (Apply ShowStringSym0 "CZ") a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: AChar) (a0123456789876543210 :: Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: AChar) :: (~>) Symbol Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) AChar ((~>) Symbol Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) AChar ((~>) Symbol Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow AChar where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    type family Equals_0123456789876543210 (a :: U) (b :: U) :: Bool where
-      Equals_0123456789876543210 BOOL BOOL = TrueSym0
-      Equals_0123456789876543210 STRING STRING = TrueSym0
-      Equals_0123456789876543210 NAT NAT = TrueSym0
-      Equals_0123456789876543210 (VEC a a) (VEC b b) = (&&) ((==) a b) ((==) a b)
-      Equals_0123456789876543210 (_ :: U) (_ :: U) = FalseSym0
-    instance PEq U where
-      type (==) a b = Equals_0123456789876543210 a b
-    type family Equals_0123456789876543210 (a :: AChar) (b :: AChar) :: Bool where
-      Equals_0123456789876543210 CA CA = TrueSym0
-      Equals_0123456789876543210 CB CB = TrueSym0
-      Equals_0123456789876543210 CC CC = TrueSym0
-      Equals_0123456789876543210 CD CD = TrueSym0
-      Equals_0123456789876543210 CE CE = TrueSym0
-      Equals_0123456789876543210 CF CF = TrueSym0
-      Equals_0123456789876543210 CG CG = TrueSym0
-      Equals_0123456789876543210 CH CH = TrueSym0
-      Equals_0123456789876543210 CI CI = TrueSym0
-      Equals_0123456789876543210 CJ CJ = TrueSym0
-      Equals_0123456789876543210 CK CK = TrueSym0
-      Equals_0123456789876543210 CL CL = TrueSym0
-      Equals_0123456789876543210 CM CM = TrueSym0
-      Equals_0123456789876543210 CN CN = TrueSym0
-      Equals_0123456789876543210 CO CO = TrueSym0
-      Equals_0123456789876543210 CP CP = TrueSym0
-      Equals_0123456789876543210 CQ CQ = TrueSym0
-      Equals_0123456789876543210 CR CR = TrueSym0
-      Equals_0123456789876543210 CS CS = TrueSym0
-      Equals_0123456789876543210 CT CT = TrueSym0
-      Equals_0123456789876543210 CU CU = TrueSym0
-      Equals_0123456789876543210 CV CV = TrueSym0
-      Equals_0123456789876543210 CW CW = TrueSym0
-      Equals_0123456789876543210 CX CX = TrueSym0
-      Equals_0123456789876543210 CY CY = TrueSym0
-      Equals_0123456789876543210 CZ CZ = TrueSym0
-      Equals_0123456789876543210 (_ :: AChar) (_ :: AChar) = FalseSym0
-    instance PEq AChar where
-      type (==) a b = Equals_0123456789876543210 a b
-    sLookup ::
-      forall (t :: [AChar]) (t :: Schema).
-      Sing t -> Sing t -> Sing (Apply (Apply LookupSym0 t) t :: U)
-    sOccurs ::
-      forall (t :: [AChar]) (t :: Schema).
-      Sing t -> Sing t -> Sing (Apply (Apply OccursSym0 t) t :: Bool)
-    sAttrNotIn ::
-      forall (t :: Attribute) (t :: Schema).
-      Sing t -> Sing t -> Sing (Apply (Apply AttrNotInSym0 t) t :: Bool)
-    sDisjoint ::
-      forall (t :: Schema) (t :: Schema).
-      Sing t -> Sing t -> Sing (Apply (Apply DisjointSym0 t) t :: Bool)
-    sAppend ::
-      forall (t :: Schema) (t :: Schema).
-      Sing t -> Sing t -> Sing (Apply (Apply AppendSym0 t) t :: Schema)
-    sLookup _ (SSch SNil) = sUndefined
-    sLookup
-      (sName :: Sing name)
-      (SSch (SCons (SAttr (sName' :: Sing name') (sU :: Sing u))
-                   (sAttrs :: Sing attrs)))
-      = let
-          sScrutinee_0123456789876543210 ::
-            Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym4 name name' u attrs)
-          sScrutinee_0123456789876543210
-            = (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sName))
-                sName'
-        in  (case sScrutinee_0123456789876543210 of
-               STrue -> sU
-               SFalse
-                 -> (applySing ((applySing ((singFun2 @LookupSym0) sLookup)) sName))
-                      ((applySing ((singFun1 @SchSym0) SSch)) sAttrs)) ::
-              Sing (Case_0123456789876543210 name name' u attrs (Let0123456789876543210Scrutinee_0123456789876543210Sym4 name name' u attrs) :: U)
-    sOccurs _ (SSch SNil) = SFalse
-    sOccurs
-      (sName :: Sing name)
-      (SSch (SCons (SAttr (sName' :: Sing name') _)
-                   (sAttrs :: Sing attrs)))
-      = (applySing
-           ((applySing ((singFun2 @(||@#@$)) (%||)))
-              ((applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sName))
-                 sName')))
-          ((applySing ((applySing ((singFun2 @OccursSym0) sOccurs)) sName))
-             ((applySing ((singFun1 @SchSym0) SSch)) sAttrs))
-    sAttrNotIn _ (SSch SNil) = STrue
-    sAttrNotIn
-      (SAttr (sName :: Sing name) (sU :: Sing u))
-      (SSch (SCons (SAttr (sName' :: Sing name') _) (sT :: Sing t)))
-      = (applySing
-           ((applySing ((singFun2 @(&&@#@$)) (%&&)))
-              ((applySing ((applySing ((singFun2 @(/=@#@$)) (%/=))) sName))
-                 sName')))
-          ((applySing
-              ((applySing ((singFun2 @AttrNotInSym0) sAttrNotIn))
-                 ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sName)) sU)))
-             ((applySing ((singFun1 @SchSym0) SSch)) sT))
-    sDisjoint (SSch SNil) _ = STrue
-    sDisjoint
-      (SSch (SCons (sH :: Sing h) (sT :: Sing t)))
-      (sS :: Sing s)
-      = (applySing
-           ((applySing ((singFun2 @(&&@#@$)) (%&&)))
-              ((applySing
-                  ((applySing ((singFun2 @AttrNotInSym0) sAttrNotIn)) sH))
-                 sS)))
-          ((applySing
-              ((applySing ((singFun2 @DisjointSym0) sDisjoint))
-                 ((applySing ((singFun1 @SchSym0) SSch)) sT)))
-             sS)
-    sAppend (SSch (sS1 :: Sing s1)) (SSch (sS2 :: Sing s2))
-      = (applySing ((singFun1 @SchSym0) SSch))
-          ((applySing ((applySing ((singFun2 @(++@#@$)) (%++))) sS1)) sS2)
-    instance SingI (LookupSym0 :: (~>) [AChar] ((~>) Schema U)) where
-      sing = (singFun2 @LookupSym0) sLookup
-    instance SingI d =>
-             SingI (LookupSym1 (d :: [AChar]) :: (~>) Schema U) where
-      sing = (singFun1 @(LookupSym1 (d :: [AChar]))) (sLookup (sing @d))
-    instance SingI (OccursSym0 :: (~>) [AChar] ((~>) Schema Bool)) where
-      sing = (singFun2 @OccursSym0) sOccurs
-    instance SingI d =>
-             SingI (OccursSym1 (d :: [AChar]) :: (~>) Schema Bool) where
-      sing = (singFun1 @(OccursSym1 (d :: [AChar]))) (sOccurs (sing @d))
-    instance SingI (AttrNotInSym0 :: (~>) Attribute ((~>) Schema Bool)) where
-      sing = (singFun2 @AttrNotInSym0) sAttrNotIn
-    instance SingI d =>
-             SingI (AttrNotInSym1 (d :: Attribute) :: (~>) Schema Bool) where
-      sing
-        = (singFun1 @(AttrNotInSym1 (d :: Attribute)))
-            (sAttrNotIn (sing @d))
-    instance SingI (DisjointSym0 :: (~>) Schema ((~>) Schema Bool)) where
-      sing = (singFun2 @DisjointSym0) sDisjoint
-    instance SingI d =>
-             SingI (DisjointSym1 (d :: Schema) :: (~>) Schema Bool) where
-      sing
-        = (singFun1 @(DisjointSym1 (d :: Schema))) (sDisjoint (sing @d))
-    instance SingI (AppendSym0 :: (~>) Schema ((~>) Schema Schema)) where
-      sing = (singFun2 @AppendSym0) sAppend
-    instance SingI d =>
-             SingI (AppendSym1 (d :: Schema) :: (~>) Schema Schema) where
-      sing = (singFun1 @(AppendSym1 (d :: Schema))) (sAppend (sing @d))
-    data instance Sing :: U -> Type
-      where
-        SBOOL :: Sing BOOL
-        SSTRING :: Sing STRING
-        SNAT :: Sing NAT
-        SVEC :: forall (n :: U) (n :: Nat).
-                (Sing (n :: U)) -> (Sing (n :: Nat)) -> Sing (VEC n n)
-    type SU = (Sing :: U -> Type)
-    instance SingKind U where
-      type Demote U = U
-      fromSing SBOOL = BOOL
-      fromSing SSTRING = STRING
-      fromSing SNAT = NAT
-      fromSing (SVEC b b) = (VEC (fromSing b)) (fromSing b)
-      toSing BOOL = SomeSing SBOOL
-      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) }
-    data instance Sing :: AChar -> Type
-      where
-        SCA :: Sing CA
-        SCB :: Sing CB
-        SCC :: Sing CC
-        SCD :: Sing CD
-        SCE :: Sing CE
-        SCF :: Sing CF
-        SCG :: Sing CG
-        SCH :: Sing CH
-        SCI :: Sing CI
-        SCJ :: Sing CJ
-        SCK :: Sing CK
-        SCL :: Sing CL
-        SCM :: Sing CM
-        SCN :: Sing CN
-        SCO :: Sing CO
-        SCP :: Sing CP
-        SCQ :: Sing CQ
-        SCR :: Sing CR
-        SCS :: Sing CS
-        SCT :: Sing CT
-        SCU :: Sing CU
-        SCV :: Sing CV
-        SCW :: Sing CW
-        SCX :: Sing CX
-        SCY :: Sing CY
-        SCZ :: Sing CZ
-    type SAChar = (Sing :: AChar -> Type)
-    instance SingKind AChar where
-      type Demote AChar = AChar
-      fromSing SCA = CA
-      fromSing SCB = CB
-      fromSing SCC = CC
-      fromSing SCD = CD
-      fromSing SCE = CE
-      fromSing SCF = CF
-      fromSing SCG = CG
-      fromSing SCH = CH
-      fromSing SCI = CI
-      fromSing SCJ = CJ
-      fromSing SCK = CK
-      fromSing SCL = CL
-      fromSing SCM = CM
-      fromSing SCN = CN
-      fromSing SCO = CO
-      fromSing SCP = CP
-      fromSing SCQ = CQ
-      fromSing SCR = CR
-      fromSing SCS = CS
-      fromSing SCT = CT
-      fromSing SCU = CU
-      fromSing SCV = CV
-      fromSing SCW = CW
-      fromSing SCX = CX
-      fromSing SCY = CY
-      fromSing SCZ = CZ
-      toSing CA = SomeSing SCA
-      toSing CB = SomeSing SCB
-      toSing CC = SomeSing SCC
-      toSing CD = SomeSing SCD
-      toSing CE = SomeSing SCE
-      toSing CF = SomeSing SCF
-      toSing CG = SomeSing SCG
-      toSing CH = SomeSing SCH
-      toSing CI = SomeSing SCI
-      toSing CJ = SomeSing SCJ
-      toSing CK = SomeSing SCK
-      toSing CL = SomeSing SCL
-      toSing CM = SomeSing SCM
-      toSing CN = SomeSing SCN
-      toSing CO = SomeSing SCO
-      toSing CP = SomeSing SCP
-      toSing CQ = SomeSing SCQ
-      toSing CR = SomeSing SCR
-      toSing CS = SomeSing SCS
-      toSing CT = SomeSing SCT
-      toSing CU = SomeSing SCU
-      toSing CV = SomeSing SCV
-      toSing CW = SomeSing SCW
-      toSing CX = SomeSing SCX
-      toSing CY = SomeSing SCY
-      toSing CZ = SomeSing SCZ
-    data instance Sing :: Attribute -> Type
-      where
-        SAttr :: forall (n :: [AChar]) (n :: U).
-                 (Sing (n :: [AChar])) -> (Sing (n :: U)) -> Sing (Attr n n)
-    type SAttribute = (Sing :: Attribute -> Type)
-    instance SingKind Attribute where
-      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) }
-    data instance Sing :: Schema -> Type
-      where
-        SSch :: forall (n :: [Attribute]).
-                (Sing (n :: [Attribute])) -> Sing (Sch n)
-    type SSchema = (Sing :: Schema -> Type)
-    instance SingKind Schema where
-      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) }
-    instance (SShow U, SShow Nat) => SShow U where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: U) (t3 :: Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) U ((~>) Symbol Symbol))
-                                                             -> Type) t1) t2) t3)
-      sShowsPrec
-        _
-        SBOOL
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "BOOL")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SSTRING
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "STRING")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SNAT
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "NAT")))
-            sA_0123456789876543210
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        (SVEC (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
-              (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (sFromInteger (sing :: Sing 10)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                          (sing :: Sing "VEC "))))
-                   ((applySing
-                       ((applySing ((singFun3 @(.@#@$)) (%.)))
-                          ((applySing
-                              ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                                 (sFromInteger (sing :: Sing 11))))
-                             sArg_0123456789876543210)))
-                      ((applySing
-                          ((applySing ((singFun3 @(.@#@$)) (%.)))
-                             ((singFun1 @ShowSpaceSym0) sShowSpace)))
-                         ((applySing
-                             ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                                (sFromInteger (sing :: Sing 11))))
-                            sArg_0123456789876543210))))))
-            sA_0123456789876543210
-    instance SShow AChar where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: AChar) (t3 :: Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) AChar ((~>) Symbol Symbol))
-                                                             -> Type) t1) t2) t3)
-      sShowsPrec
-        _
-        SCA
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CA")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCB
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CB")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCC
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CC")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCD
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CD")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCE
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CE")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCF
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CF")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCG
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CG")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCH
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CH")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCI
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CI")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCJ
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CJ")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCK
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CK")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCL
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CL")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCM
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CM")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCN
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CN")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCO
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CO")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCP
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CP")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCQ
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CQ")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCR
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CR")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCS
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CS")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCT
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CT")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCU
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CU")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCV
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CV")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCW
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CW")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCX
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CX")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCY
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CY")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SCZ
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "CZ")))
-            sA_0123456789876543210
-    instance (SEq U, SEq Nat) => SEq U where
-      (%==) SBOOL SBOOL = STrue
-      (%==) SBOOL SSTRING = SFalse
-      (%==) SBOOL SNAT = SFalse
-      (%==) SBOOL (SVEC _ _) = SFalse
-      (%==) SSTRING SBOOL = SFalse
-      (%==) SSTRING SSTRING = STrue
-      (%==) SSTRING SNAT = SFalse
-      (%==) SSTRING (SVEC _ _) = SFalse
-      (%==) SNAT SBOOL = SFalse
-      (%==) SNAT SSTRING = SFalse
-      (%==) SNAT SNAT = STrue
-      (%==) SNAT (SVEC _ _) = SFalse
-      (%==) (SVEC _ _) SBOOL = SFalse
-      (%==) (SVEC _ _) SSTRING = SFalse
-      (%==) (SVEC _ _) SNAT = SFalse
-      (%==) (SVEC a a) (SVEC b b) = ((%&&) (((%==) a) b)) (((%==) a) b)
-    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)
-      (%~) 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)
-      (%~) 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)
-      (%~) (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 })
-    instance SEq AChar where
-      (%==) SCA SCA = STrue
-      (%==) SCA SCB = SFalse
-      (%==) SCA SCC = SFalse
-      (%==) SCA SCD = SFalse
-      (%==) SCA SCE = SFalse
-      (%==) SCA SCF = SFalse
-      (%==) SCA SCG = SFalse
-      (%==) SCA SCH = SFalse
-      (%==) SCA SCI = SFalse
-      (%==) SCA SCJ = SFalse
-      (%==) SCA SCK = SFalse
-      (%==) SCA SCL = SFalse
-      (%==) SCA SCM = SFalse
-      (%==) SCA SCN = SFalse
-      (%==) SCA SCO = SFalse
-      (%==) SCA SCP = SFalse
-      (%==) SCA SCQ = SFalse
-      (%==) SCA SCR = SFalse
-      (%==) SCA SCS = SFalse
-      (%==) SCA SCT = SFalse
-      (%==) SCA SCU = SFalse
-      (%==) SCA SCV = SFalse
-      (%==) SCA SCW = SFalse
-      (%==) SCA SCX = SFalse
-      (%==) SCA SCY = SFalse
-      (%==) SCA SCZ = SFalse
-      (%==) SCB SCA = SFalse
-      (%==) SCB SCB = STrue
-      (%==) SCB SCC = SFalse
-      (%==) SCB SCD = SFalse
-      (%==) SCB SCE = SFalse
-      (%==) SCB SCF = SFalse
-      (%==) SCB SCG = SFalse
-      (%==) SCB SCH = SFalse
-      (%==) SCB SCI = SFalse
-      (%==) SCB SCJ = SFalse
-      (%==) SCB SCK = SFalse
-      (%==) SCB SCL = SFalse
-      (%==) SCB SCM = SFalse
-      (%==) SCB SCN = SFalse
-      (%==) SCB SCO = SFalse
-      (%==) SCB SCP = SFalse
-      (%==) SCB SCQ = SFalse
-      (%==) SCB SCR = SFalse
-      (%==) SCB SCS = SFalse
-      (%==) SCB SCT = SFalse
-      (%==) SCB SCU = SFalse
-      (%==) SCB SCV = SFalse
-      (%==) SCB SCW = SFalse
-      (%==) SCB SCX = SFalse
-      (%==) SCB SCY = SFalse
-      (%==) SCB SCZ = SFalse
-      (%==) SCC SCA = SFalse
-      (%==) SCC SCB = SFalse
-      (%==) SCC SCC = STrue
-      (%==) SCC SCD = SFalse
-      (%==) SCC SCE = SFalse
-      (%==) SCC SCF = SFalse
-      (%==) SCC SCG = SFalse
-      (%==) SCC SCH = SFalse
-      (%==) SCC SCI = SFalse
-      (%==) SCC SCJ = SFalse
-      (%==) SCC SCK = SFalse
-      (%==) SCC SCL = SFalse
-      (%==) SCC SCM = SFalse
-      (%==) SCC SCN = SFalse
-      (%==) SCC SCO = SFalse
-      (%==) SCC SCP = SFalse
-      (%==) SCC SCQ = SFalse
-      (%==) SCC SCR = SFalse
-      (%==) SCC SCS = SFalse
-      (%==) SCC SCT = SFalse
-      (%==) SCC SCU = SFalse
-      (%==) SCC SCV = SFalse
-      (%==) SCC SCW = SFalse
-      (%==) SCC SCX = SFalse
-      (%==) SCC SCY = SFalse
-      (%==) SCC SCZ = SFalse
-      (%==) SCD SCA = SFalse
-      (%==) SCD SCB = SFalse
-      (%==) SCD SCC = SFalse
-      (%==) SCD SCD = STrue
-      (%==) SCD SCE = SFalse
-      (%==) SCD SCF = SFalse
-      (%==) SCD SCG = SFalse
-      (%==) SCD SCH = SFalse
-      (%==) SCD SCI = SFalse
-      (%==) SCD SCJ = SFalse
-      (%==) SCD SCK = SFalse
-      (%==) SCD SCL = SFalse
-      (%==) SCD SCM = SFalse
-      (%==) SCD SCN = SFalse
-      (%==) SCD SCO = SFalse
-      (%==) SCD SCP = SFalse
-      (%==) SCD SCQ = SFalse
-      (%==) SCD SCR = SFalse
-      (%==) SCD SCS = SFalse
-      (%==) SCD SCT = SFalse
-      (%==) SCD SCU = SFalse
-      (%==) SCD SCV = SFalse
-      (%==) SCD SCW = SFalse
-      (%==) SCD SCX = SFalse
-      (%==) SCD SCY = SFalse
-      (%==) SCD SCZ = SFalse
-      (%==) SCE SCA = SFalse
-      (%==) SCE SCB = SFalse
-      (%==) SCE SCC = SFalse
-      (%==) SCE SCD = SFalse
-      (%==) SCE SCE = STrue
-      (%==) SCE SCF = SFalse
-      (%==) SCE SCG = SFalse
-      (%==) SCE SCH = SFalse
-      (%==) SCE SCI = SFalse
-      (%==) SCE SCJ = SFalse
-      (%==) SCE SCK = SFalse
-      (%==) SCE SCL = SFalse
-      (%==) SCE SCM = SFalse
-      (%==) SCE SCN = SFalse
-      (%==) SCE SCO = SFalse
-      (%==) SCE SCP = SFalse
-      (%==) SCE SCQ = SFalse
-      (%==) SCE SCR = SFalse
-      (%==) SCE SCS = SFalse
-      (%==) SCE SCT = SFalse
-      (%==) SCE SCU = SFalse
-      (%==) SCE SCV = SFalse
-      (%==) SCE SCW = SFalse
-      (%==) SCE SCX = SFalse
-      (%==) SCE SCY = SFalse
-      (%==) SCE SCZ = SFalse
-      (%==) SCF SCA = SFalse
-      (%==) SCF SCB = SFalse
-      (%==) SCF SCC = SFalse
-      (%==) SCF SCD = SFalse
-      (%==) SCF SCE = SFalse
-      (%==) SCF SCF = STrue
-      (%==) SCF SCG = SFalse
-      (%==) SCF SCH = SFalse
-      (%==) SCF SCI = SFalse
-      (%==) SCF SCJ = SFalse
-      (%==) SCF SCK = SFalse
-      (%==) SCF SCL = SFalse
-      (%==) SCF SCM = SFalse
-      (%==) SCF SCN = SFalse
-      (%==) SCF SCO = SFalse
-      (%==) SCF SCP = SFalse
-      (%==) SCF SCQ = SFalse
-      (%==) SCF SCR = SFalse
-      (%==) SCF SCS = SFalse
-      (%==) SCF SCT = SFalse
-      (%==) SCF SCU = SFalse
-      (%==) SCF SCV = SFalse
-      (%==) SCF SCW = SFalse
-      (%==) SCF SCX = SFalse
-      (%==) SCF SCY = SFalse
-      (%==) SCF SCZ = SFalse
-      (%==) SCG SCA = SFalse
-      (%==) SCG SCB = SFalse
-      (%==) SCG SCC = SFalse
-      (%==) SCG SCD = SFalse
-      (%==) SCG SCE = SFalse
-      (%==) SCG SCF = SFalse
-      (%==) SCG SCG = STrue
-      (%==) SCG SCH = SFalse
-      (%==) SCG SCI = SFalse
-      (%==) SCG SCJ = SFalse
-      (%==) SCG SCK = SFalse
-      (%==) SCG SCL = SFalse
-      (%==) SCG SCM = SFalse
-      (%==) SCG SCN = SFalse
-      (%==) SCG SCO = SFalse
-      (%==) SCG SCP = SFalse
-      (%==) SCG SCQ = SFalse
-      (%==) SCG SCR = SFalse
-      (%==) SCG SCS = SFalse
-      (%==) SCG SCT = SFalse
-      (%==) SCG SCU = SFalse
-      (%==) SCG SCV = SFalse
-      (%==) SCG SCW = SFalse
-      (%==) SCG SCX = SFalse
-      (%==) SCG SCY = SFalse
-      (%==) SCG SCZ = SFalse
-      (%==) SCH SCA = SFalse
-      (%==) SCH SCB = SFalse
-      (%==) SCH SCC = SFalse
-      (%==) SCH SCD = SFalse
-      (%==) SCH SCE = SFalse
-      (%==) SCH SCF = SFalse
-      (%==) SCH SCG = SFalse
-      (%==) SCH SCH = STrue
-      (%==) SCH SCI = SFalse
-      (%==) SCH SCJ = SFalse
-      (%==) SCH SCK = SFalse
-      (%==) SCH SCL = SFalse
-      (%==) SCH SCM = SFalse
-      (%==) SCH SCN = SFalse
-      (%==) SCH SCO = SFalse
-      (%==) SCH SCP = SFalse
-      (%==) SCH SCQ = SFalse
-      (%==) SCH SCR = SFalse
-      (%==) SCH SCS = SFalse
-      (%==) SCH SCT = SFalse
-      (%==) SCH SCU = SFalse
-      (%==) SCH SCV = SFalse
-      (%==) SCH SCW = SFalse
-      (%==) SCH SCX = SFalse
-      (%==) SCH SCY = SFalse
-      (%==) SCH SCZ = SFalse
-      (%==) SCI SCA = SFalse
-      (%==) SCI SCB = SFalse
-      (%==) SCI SCC = SFalse
-      (%==) SCI SCD = SFalse
-      (%==) SCI SCE = SFalse
-      (%==) SCI SCF = SFalse
-      (%==) SCI SCG = SFalse
-      (%==) SCI SCH = SFalse
-      (%==) SCI SCI = STrue
-      (%==) SCI SCJ = SFalse
-      (%==) SCI SCK = SFalse
-      (%==) SCI SCL = SFalse
-      (%==) SCI SCM = SFalse
-      (%==) SCI SCN = SFalse
-      (%==) SCI SCO = SFalse
-      (%==) SCI SCP = SFalse
-      (%==) SCI SCQ = SFalse
-      (%==) SCI SCR = SFalse
-      (%==) SCI SCS = SFalse
-      (%==) SCI SCT = SFalse
-      (%==) SCI SCU = SFalse
-      (%==) SCI SCV = SFalse
-      (%==) SCI SCW = SFalse
-      (%==) SCI SCX = SFalse
-      (%==) SCI SCY = SFalse
-      (%==) SCI SCZ = SFalse
-      (%==) SCJ SCA = SFalse
-      (%==) SCJ SCB = SFalse
-      (%==) SCJ SCC = SFalse
-      (%==) SCJ SCD = SFalse
-      (%==) SCJ SCE = SFalse
-      (%==) SCJ SCF = SFalse
-      (%==) SCJ SCG = SFalse
-      (%==) SCJ SCH = SFalse
-      (%==) SCJ SCI = SFalse
-      (%==) SCJ SCJ = STrue
-      (%==) SCJ SCK = SFalse
-      (%==) SCJ SCL = SFalse
-      (%==) SCJ SCM = SFalse
-      (%==) SCJ SCN = SFalse
-      (%==) SCJ SCO = SFalse
-      (%==) SCJ SCP = SFalse
-      (%==) SCJ SCQ = SFalse
-      (%==) SCJ SCR = SFalse
-      (%==) SCJ SCS = SFalse
-      (%==) SCJ SCT = SFalse
-      (%==) SCJ SCU = SFalse
-      (%==) SCJ SCV = SFalse
-      (%==) SCJ SCW = SFalse
-      (%==) SCJ SCX = SFalse
-      (%==) SCJ SCY = SFalse
-      (%==) SCJ SCZ = SFalse
-      (%==) SCK SCA = SFalse
-      (%==) SCK SCB = SFalse
-      (%==) SCK SCC = SFalse
-      (%==) SCK SCD = SFalse
-      (%==) SCK SCE = SFalse
-      (%==) SCK SCF = SFalse
-      (%==) SCK SCG = SFalse
-      (%==) SCK SCH = SFalse
-      (%==) SCK SCI = SFalse
-      (%==) SCK SCJ = SFalse
-      (%==) SCK SCK = STrue
-      (%==) SCK SCL = SFalse
-      (%==) SCK SCM = SFalse
-      (%==) SCK SCN = SFalse
-      (%==) SCK SCO = SFalse
-      (%==) SCK SCP = SFalse
-      (%==) SCK SCQ = SFalse
-      (%==) SCK SCR = SFalse
-      (%==) SCK SCS = SFalse
-      (%==) SCK SCT = SFalse
-      (%==) SCK SCU = SFalse
-      (%==) SCK SCV = SFalse
-      (%==) SCK SCW = SFalse
-      (%==) SCK SCX = SFalse
-      (%==) SCK SCY = SFalse
-      (%==) SCK SCZ = SFalse
-      (%==) SCL SCA = SFalse
-      (%==) SCL SCB = SFalse
-      (%==) SCL SCC = SFalse
-      (%==) SCL SCD = SFalse
-      (%==) SCL SCE = SFalse
-      (%==) SCL SCF = SFalse
-      (%==) SCL SCG = SFalse
-      (%==) SCL SCH = SFalse
-      (%==) SCL SCI = SFalse
-      (%==) SCL SCJ = SFalse
-      (%==) SCL SCK = SFalse
-      (%==) SCL SCL = STrue
-      (%==) SCL SCM = SFalse
-      (%==) SCL SCN = SFalse
-      (%==) SCL SCO = SFalse
-      (%==) SCL SCP = SFalse
-      (%==) SCL SCQ = SFalse
-      (%==) SCL SCR = SFalse
-      (%==) SCL SCS = SFalse
-      (%==) SCL SCT = SFalse
-      (%==) SCL SCU = SFalse
-      (%==) SCL SCV = SFalse
-      (%==) SCL SCW = SFalse
-      (%==) SCL SCX = SFalse
-      (%==) SCL SCY = SFalse
-      (%==) SCL SCZ = SFalse
-      (%==) SCM SCA = SFalse
-      (%==) SCM SCB = SFalse
-      (%==) SCM SCC = SFalse
-      (%==) SCM SCD = SFalse
-      (%==) SCM SCE = SFalse
-      (%==) SCM SCF = SFalse
-      (%==) SCM SCG = SFalse
-      (%==) SCM SCH = SFalse
-      (%==) SCM SCI = SFalse
-      (%==) SCM SCJ = SFalse
-      (%==) SCM SCK = SFalse
-      (%==) SCM SCL = SFalse
-      (%==) SCM SCM = STrue
-      (%==) SCM SCN = SFalse
-      (%==) SCM SCO = SFalse
-      (%==) SCM SCP = SFalse
-      (%==) SCM SCQ = SFalse
-      (%==) SCM SCR = SFalse
-      (%==) SCM SCS = SFalse
-      (%==) SCM SCT = SFalse
-      (%==) SCM SCU = SFalse
-      (%==) SCM SCV = SFalse
-      (%==) SCM SCW = SFalse
-      (%==) SCM SCX = SFalse
-      (%==) SCM SCY = SFalse
-      (%==) SCM SCZ = SFalse
-      (%==) SCN SCA = SFalse
-      (%==) SCN SCB = SFalse
-      (%==) SCN SCC = SFalse
-      (%==) SCN SCD = SFalse
-      (%==) SCN SCE = SFalse
-      (%==) SCN SCF = SFalse
-      (%==) SCN SCG = SFalse
-      (%==) SCN SCH = SFalse
-      (%==) SCN SCI = SFalse
-      (%==) SCN SCJ = SFalse
-      (%==) SCN SCK = SFalse
-      (%==) SCN SCL = SFalse
-      (%==) SCN SCM = SFalse
-      (%==) SCN SCN = STrue
-      (%==) SCN SCO = SFalse
-      (%==) SCN SCP = SFalse
-      (%==) SCN SCQ = SFalse
-      (%==) SCN SCR = SFalse
-      (%==) SCN SCS = SFalse
-      (%==) SCN SCT = SFalse
-      (%==) SCN SCU = SFalse
-      (%==) SCN SCV = SFalse
-      (%==) SCN SCW = SFalse
-      (%==) SCN SCX = SFalse
-      (%==) SCN SCY = SFalse
-      (%==) SCN SCZ = SFalse
-      (%==) SCO SCA = SFalse
-      (%==) SCO SCB = SFalse
-      (%==) SCO SCC = SFalse
-      (%==) SCO SCD = SFalse
-      (%==) SCO SCE = SFalse
-      (%==) SCO SCF = SFalse
-      (%==) SCO SCG = SFalse
-      (%==) SCO SCH = SFalse
-      (%==) SCO SCI = SFalse
-      (%==) SCO SCJ = SFalse
-      (%==) SCO SCK = SFalse
-      (%==) SCO SCL = SFalse
-      (%==) SCO SCM = SFalse
-      (%==) SCO SCN = SFalse
-      (%==) SCO SCO = STrue
-      (%==) SCO SCP = SFalse
-      (%==) SCO SCQ = SFalse
-      (%==) SCO SCR = SFalse
-      (%==) SCO SCS = SFalse
-      (%==) SCO SCT = SFalse
-      (%==) SCO SCU = SFalse
-      (%==) SCO SCV = SFalse
-      (%==) SCO SCW = SFalse
-      (%==) SCO SCX = SFalse
-      (%==) SCO SCY = SFalse
-      (%==) SCO SCZ = SFalse
-      (%==) SCP SCA = SFalse
-      (%==) SCP SCB = SFalse
-      (%==) SCP SCC = SFalse
-      (%==) SCP SCD = SFalse
-      (%==) SCP SCE = SFalse
-      (%==) SCP SCF = SFalse
-      (%==) SCP SCG = SFalse
-      (%==) SCP SCH = SFalse
-      (%==) SCP SCI = SFalse
-      (%==) SCP SCJ = SFalse
-      (%==) SCP SCK = SFalse
-      (%==) SCP SCL = SFalse
-      (%==) SCP SCM = SFalse
-      (%==) SCP SCN = SFalse
-      (%==) SCP SCO = SFalse
-      (%==) SCP SCP = STrue
-      (%==) SCP SCQ = SFalse
-      (%==) SCP SCR = SFalse
-      (%==) SCP SCS = SFalse
-      (%==) SCP SCT = SFalse
-      (%==) SCP SCU = SFalse
-      (%==) SCP SCV = SFalse
-      (%==) SCP SCW = SFalse
-      (%==) SCP SCX = SFalse
-      (%==) SCP SCY = SFalse
-      (%==) SCP SCZ = SFalse
-      (%==) SCQ SCA = SFalse
-      (%==) SCQ SCB = SFalse
-      (%==) SCQ SCC = SFalse
-      (%==) SCQ SCD = SFalse
-      (%==) SCQ SCE = SFalse
-      (%==) SCQ SCF = SFalse
-      (%==) SCQ SCG = SFalse
-      (%==) SCQ SCH = SFalse
-      (%==) SCQ SCI = SFalse
-      (%==) SCQ SCJ = SFalse
-      (%==) SCQ SCK = SFalse
-      (%==) SCQ SCL = SFalse
-      (%==) SCQ SCM = SFalse
-      (%==) SCQ SCN = SFalse
-      (%==) SCQ SCO = SFalse
-      (%==) SCQ SCP = SFalse
-      (%==) SCQ SCQ = STrue
-      (%==) SCQ SCR = SFalse
-      (%==) SCQ SCS = SFalse
-      (%==) SCQ SCT = SFalse
-      (%==) SCQ SCU = SFalse
-      (%==) SCQ SCV = SFalse
-      (%==) SCQ SCW = SFalse
-      (%==) SCQ SCX = SFalse
-      (%==) SCQ SCY = SFalse
-      (%==) SCQ SCZ = SFalse
-      (%==) SCR SCA = SFalse
-      (%==) SCR SCB = SFalse
-      (%==) SCR SCC = SFalse
-      (%==) SCR SCD = SFalse
-      (%==) SCR SCE = SFalse
-      (%==) SCR SCF = SFalse
-      (%==) SCR SCG = SFalse
-      (%==) SCR SCH = SFalse
-      (%==) SCR SCI = SFalse
-      (%==) SCR SCJ = SFalse
-      (%==) SCR SCK = SFalse
-      (%==) SCR SCL = SFalse
-      (%==) SCR SCM = SFalse
-      (%==) SCR SCN = SFalse
-      (%==) SCR SCO = SFalse
-      (%==) SCR SCP = SFalse
-      (%==) SCR SCQ = SFalse
-      (%==) SCR SCR = STrue
-      (%==) SCR SCS = SFalse
-      (%==) SCR SCT = SFalse
-      (%==) SCR SCU = SFalse
-      (%==) SCR SCV = SFalse
-      (%==) SCR SCW = SFalse
-      (%==) SCR SCX = SFalse
-      (%==) SCR SCY = SFalse
-      (%==) SCR SCZ = SFalse
-      (%==) SCS SCA = SFalse
-      (%==) SCS SCB = SFalse
-      (%==) SCS SCC = SFalse
-      (%==) SCS SCD = SFalse
-      (%==) SCS SCE = SFalse
-      (%==) SCS SCF = SFalse
-      (%==) SCS SCG = SFalse
-      (%==) SCS SCH = SFalse
-      (%==) SCS SCI = SFalse
-      (%==) SCS SCJ = SFalse
-      (%==) SCS SCK = SFalse
-      (%==) SCS SCL = SFalse
-      (%==) SCS SCM = SFalse
-      (%==) SCS SCN = SFalse
-      (%==) SCS SCO = SFalse
-      (%==) SCS SCP = SFalse
-      (%==) SCS SCQ = SFalse
-      (%==) SCS SCR = SFalse
-      (%==) SCS SCS = STrue
-      (%==) SCS SCT = SFalse
-      (%==) SCS SCU = SFalse
-      (%==) SCS SCV = SFalse
-      (%==) SCS SCW = SFalse
-      (%==) SCS SCX = SFalse
-      (%==) SCS SCY = SFalse
-      (%==) SCS SCZ = SFalse
-      (%==) SCT SCA = SFalse
-      (%==) SCT SCB = SFalse
-      (%==) SCT SCC = SFalse
-      (%==) SCT SCD = SFalse
-      (%==) SCT SCE = SFalse
-      (%==) SCT SCF = SFalse
-      (%==) SCT SCG = SFalse
-      (%==) SCT SCH = SFalse
-      (%==) SCT SCI = SFalse
-      (%==) SCT SCJ = SFalse
-      (%==) SCT SCK = SFalse
-      (%==) SCT SCL = SFalse
-      (%==) SCT SCM = SFalse
-      (%==) SCT SCN = SFalse
-      (%==) SCT SCO = SFalse
-      (%==) SCT SCP = SFalse
-      (%==) SCT SCQ = SFalse
-      (%==) SCT SCR = SFalse
-      (%==) SCT SCS = SFalse
-      (%==) SCT SCT = STrue
-      (%==) SCT SCU = SFalse
-      (%==) SCT SCV = SFalse
-      (%==) SCT SCW = SFalse
-      (%==) SCT SCX = SFalse
-      (%==) SCT SCY = SFalse
-      (%==) SCT SCZ = SFalse
-      (%==) SCU SCA = SFalse
-      (%==) SCU SCB = SFalse
-      (%==) SCU SCC = SFalse
-      (%==) SCU SCD = SFalse
-      (%==) SCU SCE = SFalse
-      (%==) SCU SCF = SFalse
-      (%==) SCU SCG = SFalse
-      (%==) SCU SCH = SFalse
-      (%==) SCU SCI = SFalse
-      (%==) SCU SCJ = SFalse
-      (%==) SCU SCK = SFalse
-      (%==) SCU SCL = SFalse
-      (%==) SCU SCM = SFalse
-      (%==) SCU SCN = SFalse
-      (%==) SCU SCO = SFalse
-      (%==) SCU SCP = SFalse
-      (%==) SCU SCQ = SFalse
-      (%==) SCU SCR = SFalse
-      (%==) SCU SCS = SFalse
-      (%==) SCU SCT = SFalse
-      (%==) SCU SCU = STrue
-      (%==) SCU SCV = SFalse
-      (%==) SCU SCW = SFalse
-      (%==) SCU SCX = SFalse
-      (%==) SCU SCY = SFalse
-      (%==) SCU SCZ = SFalse
-      (%==) SCV SCA = SFalse
-      (%==) SCV SCB = SFalse
-      (%==) SCV SCC = SFalse
-      (%==) SCV SCD = SFalse
-      (%==) SCV SCE = SFalse
-      (%==) SCV SCF = SFalse
-      (%==) SCV SCG = SFalse
-      (%==) SCV SCH = SFalse
-      (%==) SCV SCI = SFalse
-      (%==) SCV SCJ = SFalse
-      (%==) SCV SCK = SFalse
-      (%==) SCV SCL = SFalse
-      (%==) SCV SCM = SFalse
-      (%==) SCV SCN = SFalse
-      (%==) SCV SCO = SFalse
-      (%==) SCV SCP = SFalse
-      (%==) SCV SCQ = SFalse
-      (%==) SCV SCR = SFalse
-      (%==) SCV SCS = SFalse
-      (%==) SCV SCT = SFalse
-      (%==) SCV SCU = SFalse
-      (%==) SCV SCV = STrue
-      (%==) SCV SCW = SFalse
-      (%==) SCV SCX = SFalse
-      (%==) SCV SCY = SFalse
-      (%==) SCV SCZ = SFalse
-      (%==) SCW SCA = SFalse
-      (%==) SCW SCB = SFalse
-      (%==) SCW SCC = SFalse
-      (%==) SCW SCD = SFalse
-      (%==) SCW SCE = SFalse
-      (%==) SCW SCF = SFalse
-      (%==) SCW SCG = SFalse
-      (%==) SCW SCH = SFalse
-      (%==) SCW SCI = SFalse
-      (%==) SCW SCJ = SFalse
-      (%==) SCW SCK = SFalse
-      (%==) SCW SCL = SFalse
-      (%==) SCW SCM = SFalse
-      (%==) SCW SCN = SFalse
-      (%==) SCW SCO = SFalse
-      (%==) SCW SCP = SFalse
-      (%==) SCW SCQ = SFalse
-      (%==) SCW SCR = SFalse
-      (%==) SCW SCS = SFalse
-      (%==) SCW SCT = SFalse
-      (%==) SCW SCU = SFalse
-      (%==) SCW SCV = SFalse
-      (%==) SCW SCW = STrue
-      (%==) SCW SCX = SFalse
-      (%==) SCW SCY = SFalse
-      (%==) SCW SCZ = SFalse
-      (%==) SCX SCA = SFalse
-      (%==) SCX SCB = SFalse
-      (%==) SCX SCC = SFalse
-      (%==) SCX SCD = SFalse
-      (%==) SCX SCE = SFalse
-      (%==) SCX SCF = SFalse
-      (%==) SCX SCG = SFalse
-      (%==) SCX SCH = SFalse
-      (%==) SCX SCI = SFalse
-      (%==) SCX SCJ = SFalse
-      (%==) SCX SCK = SFalse
-      (%==) SCX SCL = SFalse
-      (%==) SCX SCM = SFalse
-      (%==) SCX SCN = SFalse
-      (%==) SCX SCO = SFalse
-      (%==) SCX SCP = SFalse
-      (%==) SCX SCQ = SFalse
-      (%==) SCX SCR = SFalse
-      (%==) SCX SCS = SFalse
-      (%==) SCX SCT = SFalse
-      (%==) SCX SCU = SFalse
-      (%==) SCX SCV = SFalse
-      (%==) SCX SCW = SFalse
-      (%==) SCX SCX = STrue
-      (%==) SCX SCY = SFalse
-      (%==) SCX SCZ = SFalse
-      (%==) SCY SCA = SFalse
-      (%==) SCY SCB = SFalse
-      (%==) SCY SCC = SFalse
-      (%==) SCY SCD = SFalse
-      (%==) SCY SCE = SFalse
-      (%==) SCY SCF = SFalse
-      (%==) SCY SCG = SFalse
-      (%==) SCY SCH = SFalse
-      (%==) SCY SCI = SFalse
-      (%==) SCY SCJ = SFalse
-      (%==) SCY SCK = SFalse
-      (%==) SCY SCL = SFalse
-      (%==) SCY SCM = SFalse
-      (%==) SCY SCN = SFalse
-      (%==) SCY SCO = SFalse
-      (%==) SCY SCP = SFalse
-      (%==) SCY SCQ = SFalse
-      (%==) SCY SCR = SFalse
-      (%==) SCY SCS = SFalse
-      (%==) SCY SCT = SFalse
-      (%==) SCY SCU = SFalse
-      (%==) SCY SCV = SFalse
-      (%==) SCY SCW = SFalse
-      (%==) SCY SCX = SFalse
-      (%==) SCY SCY = STrue
-      (%==) SCY SCZ = SFalse
-      (%==) SCZ SCA = SFalse
-      (%==) SCZ SCB = SFalse
-      (%==) SCZ SCC = SFalse
-      (%==) SCZ SCD = SFalse
-      (%==) SCZ SCE = SFalse
-      (%==) SCZ SCF = SFalse
-      (%==) SCZ SCG = SFalse
-      (%==) SCZ SCH = SFalse
-      (%==) SCZ SCI = SFalse
-      (%==) SCZ SCJ = SFalse
-      (%==) SCZ SCK = SFalse
-      (%==) SCZ SCL = SFalse
-      (%==) SCZ SCM = SFalse
-      (%==) SCZ SCN = SFalse
-      (%==) SCZ SCO = SFalse
-      (%==) SCZ SCP = SFalse
-      (%==) SCZ SCQ = SFalse
-      (%==) SCZ SCR = SFalse
-      (%==) SCZ SCS = SFalse
-      (%==) SCZ SCT = SFalse
-      (%==) SCZ SCU = SFalse
-      (%==) SCZ SCV = SFalse
-      (%==) SCZ SCW = SFalse
-      (%==) SCZ SCX = SFalse
-      (%==) SCZ SCY = SFalse
-      (%==) SCZ SCZ = STrue
-    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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) 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)
-      (%~) SCZ SCZ = Proved Refl
-    deriving instance (Data.Singletons.ShowSing.ShowSing U,
-                       Data.Singletons.ShowSing.ShowSing Nat) =>
-                      Show (Sing (z :: U))
-    deriving instance Show (Sing (z :: AChar))
-    instance SingI BOOL where
-      sing = SBOOL
-    instance SingI STRING where
-      sing = SSTRING
-    instance SingI NAT where
-      sing = SNAT
-    instance (SingI n, SingI n) =>
-             SingI (VEC (n :: U) (n :: Nat)) where
-      sing = (SVEC sing) sing
-    instance SingI (VECSym0 :: (~>) U ((~>) Nat U)) where
-      sing = (singFun2 @VECSym0) SVEC
-    instance SingI (TyCon2 VEC :: (~>) U ((~>) Nat U)) where
-      sing = (singFun2 @(TyCon2 VEC)) SVEC
-    instance SingI d => SingI (VECSym1 (d :: U) :: (~>) Nat U) where
-      sing = (singFun1 @(VECSym1 (d :: U))) (SVEC (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 (VEC (d :: U)) :: (~>) Nat U) where
-      sing = (singFun1 @(TyCon1 (VEC (d :: U)))) (SVEC (sing @d))
-    instance SingI CA where
-      sing = SCA
-    instance SingI CB where
-      sing = SCB
-    instance SingI CC where
-      sing = SCC
-    instance SingI CD where
-      sing = SCD
-    instance SingI CE where
-      sing = SCE
-    instance SingI CF where
-      sing = SCF
-    instance SingI CG where
-      sing = SCG
-    instance SingI CH where
-      sing = SCH
-    instance SingI CI where
-      sing = SCI
-    instance SingI CJ where
-      sing = SCJ
-    instance SingI CK where
-      sing = SCK
-    instance SingI CL where
-      sing = SCL
-    instance SingI CM where
-      sing = SCM
-    instance SingI CN where
-      sing = SCN
-    instance SingI CO where
-      sing = SCO
-    instance SingI CP where
-      sing = SCP
-    instance SingI CQ where
-      sing = SCQ
-    instance SingI CR where
-      sing = SCR
-    instance SingI CS where
-      sing = SCS
-    instance SingI CT where
-      sing = SCT
-    instance SingI CU where
-      sing = SCU
-    instance SingI CV where
-      sing = SCV
-    instance SingI CW where
-      sing = SCW
-    instance SingI CX where
-      sing = SCX
-    instance SingI CY where
-      sing = SCY
-    instance SingI CZ where
-      sing = SCZ
-    instance (SingI n, SingI n) =>
-             SingI (Attr (n :: [AChar]) (n :: U)) where
-      sing = (SAttr sing) sing
-    instance SingI (AttrSym0 :: (~>) [AChar] ((~>) U Attribute)) where
-      sing = (singFun2 @AttrSym0) SAttr
-    instance SingI (TyCon2 Attr :: (~>) [AChar] ((~>) U Attribute)) where
-      sing = (singFun2 @(TyCon2 Attr)) SAttr
-    instance SingI d =>
-             SingI (AttrSym1 (d :: [AChar]) :: (~>) U Attribute) where
-      sing = (singFun1 @(AttrSym1 (d :: [AChar]))) (SAttr (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 (Attr (d :: [AChar])) :: (~>) U Attribute) where
-      sing = (singFun1 @(TyCon1 (Attr (d :: [AChar])))) (SAttr (sing @d))
-    instance SingI n => SingI (Sch (n :: [Attribute])) where
-      sing = SSch sing
-    instance SingI (SchSym0 :: (~>) [Attribute] Schema) where
-      sing = (singFun1 @SchSym0) SSch
-    instance SingI (TyCon1 Sch :: (~>) [Attribute] Schema) where
-      sing = (singFun1 @(TyCon1 Sch)) SSch
-GradingClient/Database.hs:0:0:: Splicing declarations
-    return [] ======>
-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
diff --git a/tests/compile-and-dump/GradingClient/Database.ghc88.template b/tests/compile-and-dump/GradingClient/Database.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/GradingClient/Database.ghc88.template
@@ -0,0 +1,2663 @@
+GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| data Nat
+            = Zero | Succ Nat
+            deriving (Eq, Ord) |]
+  ======>
+    data Nat
+      = Zero | Succ Nat
+      deriving (Eq, Ord)
+    type ZeroSym0 = Zero
+    type SuccSym1 (t0123456789876543210 :: Nat) =
+        Succ t0123456789876543210
+    instance SuppressUnusedWarnings SuccSym0 where
+      suppressUnusedWarnings = snd (((,) SuccSym0KindInference) ())
+    data SuccSym0 :: (~>) Nat Nat
+      where
+        SuccSym0KindInference :: forall t0123456789876543210
+                                        arg. SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>
+                                 SuccSym0 t0123456789876543210
+    type instance Apply SuccSym0 t0123456789876543210 = Succ t0123456789876543210
+    type family Compare_0123456789876543210 (a :: Nat) (a :: Nat) :: Ordering where
+      Compare_0123456789876543210 Zero Zero = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
+      Compare_0123456789876543210 (Succ a_0123456789876543210) (Succ b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])
+      Compare_0123456789876543210 Zero (Succ _) = LTSym0
+      Compare_0123456789876543210 (Succ _) Zero = GTSym0
+    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
+        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
+    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Nat Ordering
+      where
+        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
+    data Compare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering)
+      where
+        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
+                                                        Compare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
+    instance POrd Nat where
+      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
+    type family Equals_0123456789876543210 (a :: Nat) (b :: Nat) :: Bool where
+      Equals_0123456789876543210 Zero Zero = TrueSym0
+      Equals_0123456789876543210 (Succ a) (Succ b) = (==) a b
+      Equals_0123456789876543210 (_ :: Nat) (_ :: Nat) = FalseSym0
+    instance PEq Nat where
+      type (==) a b = Equals_0123456789876543210 a b
+    data SNat :: Nat -> Type
+      where
+        SZero :: SNat Zero
+        SSucc :: forall (n :: Nat). (Sing (n :: Nat)) -> SNat (Succ n)
+    type instance Sing @Nat = SNat
+    instance SingKind Nat where
+      type Demote Nat = Nat
+      fromSing SZero = Zero
+      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) }
+    instance SOrd Nat => SOrd Nat where
+      sCompare ::
+        forall (t1 :: Nat) (t2 :: Nat).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (CompareSym0 :: TyFun Nat ((~>) Nat Ordering)
+                                                 -> Type) t1) t2)
+      sCompare SZero SZero
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            SNil
+      sCompare
+        (SSucc (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        (SSucc (sB_0123456789876543210 :: Sing b_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            ((applySing
+                ((applySing ((singFun2 @(:@#@$)) SCons))
+                   ((applySing
+                       ((applySing ((singFun2 @CompareSym0) sCompare))
+                          sA_0123456789876543210))
+                      sB_0123456789876543210)))
+               SNil)
+      sCompare SZero (SSucc _) = SLT
+      sCompare (SSucc _) SZero = SGT
+    instance SEq Nat => SEq Nat where
+      (%==) SZero SZero = STrue
+      (%==) SZero (SSucc _) = SFalse
+      (%==) (SSucc _) SZero = SFalse
+      (%==) (SSucc a) (SSucc b) = ((%==) a) b
+    instance SDecide Nat => SDecide Nat where
+      (%~) SZero SZero = Proved Refl
+      (%~) SZero (SSucc _) = Disproved (\ x -> case x of)
+      (%~) (SSucc _) SZero = Disproved (\ x -> case x of)
+      (%~) (SSucc a) (SSucc b)
+        = case ((%~) a) b of
+            Proved Refl -> Proved Refl
+            Disproved contra
+              -> Disproved (\ refl -> case refl of { Refl -> contra Refl })
+    instance SDecide Nat =>
+             Data.Type.Equality.TestEquality (SNat :: Nat -> Type) where
+      Data.Type.Equality.testEquality
+        = Data.Singletons.Decide.decideEquality
+    instance SDecide Nat =>
+             Data.Type.Coercion.TestCoercion (SNat :: Nat -> Type) where
+      Data.Type.Coercion.testCoercion
+        = Data.Singletons.Decide.decideCoercion
+    instance SingI Zero where
+      sing = SZero
+    instance SingI n => SingI (Succ (n :: Nat)) where
+      sing = SSucc sing
+    instance SingI (SuccSym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @SuccSym0) SSucc
+GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| append :: Schema -> Schema -> Schema
+          append (Sch s1) (Sch s2) = Sch (s1 ++ s2)
+          attrNotIn :: Attribute -> Schema -> Bool
+          attrNotIn _ (Sch []) = True
+          attrNotIn (Attr name u) (Sch ((Attr name' _) : t))
+            = (name /= name') && (attrNotIn (Attr name u) (Sch t))
+          disjoint :: Schema -> Schema -> Bool
+          disjoint (Sch []) _ = True
+          disjoint (Sch (h : t)) s = (attrNotIn h s) && (disjoint (Sch t) s)
+          occurs :: [AChar] -> Schema -> Bool
+          occurs _ (Sch []) = False
+          occurs name (Sch ((Attr name' _) : attrs))
+            = name == name' || occurs name (Sch attrs)
+          lookup :: [AChar] -> Schema -> U
+          lookup _ (Sch []) = undefined
+          lookup name (Sch ((Attr name' u) : attrs))
+            = if name == name' then u else lookup name (Sch attrs)
+          
+          data U
+            = BOOL | STRING | NAT | VEC U Nat
+            deriving (Read, Eq, Show)
+          data AChar
+            = CA |
+              CB |
+              CC |
+              CD |
+              CE |
+              CF |
+              CG |
+              CH |
+              CI |
+              CJ |
+              CK |
+              CL |
+              CM |
+              CN |
+              CO |
+              CP |
+              CQ |
+              CR |
+              CS |
+              CT |
+              CU |
+              CV |
+              CW |
+              CX |
+              CY |
+              CZ
+            deriving (Read, Show, Eq)
+          data Attribute = Attr [AChar] U
+          data Schema = Sch [Attribute] |]
+  ======>
+    data U
+      = BOOL | STRING | NAT | VEC U Nat
+      deriving (Read, Eq, Show)
+    data AChar
+      = CA |
+        CB |
+        CC |
+        CD |
+        CE |
+        CF |
+        CG |
+        CH |
+        CI |
+        CJ |
+        CK |
+        CL |
+        CM |
+        CN |
+        CO |
+        CP |
+        CQ |
+        CR |
+        CS |
+        CT |
+        CU |
+        CV |
+        CW |
+        CX |
+        CY |
+        CZ
+      deriving (Read, Show, Eq)
+    data Attribute = Attr [AChar] U
+    data Schema = Sch [Attribute]
+    append :: Schema -> Schema -> Schema
+    append (Sch s1) (Sch s2) = Sch (s1 ++ s2)
+    attrNotIn :: Attribute -> Schema -> Bool
+    attrNotIn _ (Sch []) = True
+    attrNotIn (Attr name u) (Sch (Attr name' _ : t))
+      = ((name /= name') && (attrNotIn ((Attr name) u)) (Sch t))
+    disjoint :: Schema -> Schema -> Bool
+    disjoint (Sch []) _ = True
+    disjoint (Sch (h : t)) s
+      = ((attrNotIn h) s && (disjoint (Sch t)) s)
+    occurs :: [AChar] -> Schema -> Bool
+    occurs _ (Sch []) = False
+    occurs name (Sch (Attr name' _ : attrs))
+      = ((name == name') || (occurs name) (Sch attrs))
+    lookup :: [AChar] -> Schema -> U
+    lookup _ (Sch []) = undefined
+    lookup name (Sch (Attr name' u : attrs))
+      = if (name == name') then u else (lookup name) (Sch attrs)
+    type BOOLSym0 = BOOL
+    type STRINGSym0 = STRING
+    type NATSym0 = NAT
+    type VECSym2 (t0123456789876543210 :: U) (t0123456789876543210 :: Nat) =
+        VEC t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (VECSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) VECSym1KindInference) ())
+    data VECSym1 (t0123456789876543210 :: U) :: (~>) Nat U
+      where
+        VECSym1KindInference :: forall t0123456789876543210
+                                       t0123456789876543210
+                                       arg. SameKind (Apply (VECSym1 t0123456789876543210) arg) (VECSym2 t0123456789876543210 arg) =>
+                                VECSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (VECSym1 t0123456789876543210) t0123456789876543210 = VEC t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings VECSym0 where
+      suppressUnusedWarnings = snd (((,) VECSym0KindInference) ())
+    data VECSym0 :: (~>) U ((~>) Nat U)
+      where
+        VECSym0KindInference :: forall t0123456789876543210
+                                       arg. SameKind (Apply VECSym0 arg) (VECSym1 arg) =>
+                                VECSym0 t0123456789876543210
+    type instance Apply VECSym0 t0123456789876543210 = VECSym1 t0123456789876543210
+    type CASym0 = CA
+    type CBSym0 = CB
+    type CCSym0 = CC
+    type CDSym0 = CD
+    type CESym0 = CE
+    type CFSym0 = CF
+    type CGSym0 = CG
+    type CHSym0 = CH
+    type CISym0 = CI
+    type CJSym0 = CJ
+    type CKSym0 = CK
+    type CLSym0 = CL
+    type CMSym0 = CM
+    type CNSym0 = CN
+    type COSym0 = CO
+    type CPSym0 = CP
+    type CQSym0 = CQ
+    type CRSym0 = CR
+    type CSSym0 = CS
+    type CTSym0 = CT
+    type CUSym0 = CU
+    type CVSym0 = CV
+    type CWSym0 = CW
+    type CXSym0 = CX
+    type CYSym0 = CY
+    type CZSym0 = CZ
+    type AttrSym2 (t0123456789876543210 :: [AChar]) (t0123456789876543210 :: U) =
+        Attr t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (AttrSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) AttrSym1KindInference) ())
+    data AttrSym1 (t0123456789876543210 :: [AChar]) :: (~>) U Attribute
+      where
+        AttrSym1KindInference :: forall t0123456789876543210
+                                        t0123456789876543210
+                                        arg. SameKind (Apply (AttrSym1 t0123456789876543210) arg) (AttrSym2 t0123456789876543210 arg) =>
+                                 AttrSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (AttrSym1 t0123456789876543210) t0123456789876543210 = Attr t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings AttrSym0 where
+      suppressUnusedWarnings = snd (((,) AttrSym0KindInference) ())
+    data AttrSym0 :: (~>) [AChar] ((~>) U Attribute)
+      where
+        AttrSym0KindInference :: forall t0123456789876543210
+                                        arg. SameKind (Apply AttrSym0 arg) (AttrSym1 arg) =>
+                                 AttrSym0 t0123456789876543210
+    type instance Apply AttrSym0 t0123456789876543210 = AttrSym1 t0123456789876543210
+    type SchSym1 (t0123456789876543210 :: [Attribute]) =
+        Sch t0123456789876543210
+    instance SuppressUnusedWarnings SchSym0 where
+      suppressUnusedWarnings = snd (((,) SchSym0KindInference) ())
+    data SchSym0 :: (~>) [Attribute] Schema
+      where
+        SchSym0KindInference :: forall t0123456789876543210
+                                       arg. SameKind (Apply SchSym0 arg) (SchSym1 arg) =>
+                                SchSym0 t0123456789876543210
+    type instance Apply SchSym0 t0123456789876543210 = Sch t0123456789876543210
+    type Let0123456789876543210Scrutinee_0123456789876543210Sym4 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 =
+        Let0123456789876543210Scrutinee_0123456789876543210 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym3 u0123456789876543210 name'0123456789876543210 name0123456789876543210) where
+      suppressUnusedWarnings
+        = snd
+            (((,)
+                Let0123456789876543210Scrutinee_0123456789876543210Sym3KindInference)
+               ())
+    data Let0123456789876543210Scrutinee_0123456789876543210Sym3 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210
+      where
+        Let0123456789876543210Scrutinee_0123456789876543210Sym3KindInference :: forall name0123456789876543210
+                                                                                       name'0123456789876543210
+                                                                                       u0123456789876543210
+                                                                                       attrs0123456789876543210
+                                                                                       arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym3 name0123456789876543210 name'0123456789876543210 u0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym4 name0123456789876543210 name'0123456789876543210 u0123456789876543210 arg) =>
+                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym3 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210
+    type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym3 u0123456789876543210 name'0123456789876543210 name0123456789876543210) attrs0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 u0123456789876543210 name'0123456789876543210 name0123456789876543210 attrs0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym2 name'0123456789876543210 name0123456789876543210) where
+      suppressUnusedWarnings
+        = snd
+            (((,)
+                Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference)
+               ())
+    data Let0123456789876543210Scrutinee_0123456789876543210Sym2 name0123456789876543210 name'0123456789876543210 u0123456789876543210
+      where
+        Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference :: forall name0123456789876543210
+                                                                                       name'0123456789876543210
+                                                                                       u0123456789876543210
+                                                                                       arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym2 name0123456789876543210 name'0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym3 name0123456789876543210 name'0123456789876543210 arg) =>
+                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym2 name0123456789876543210 name'0123456789876543210 u0123456789876543210
+    type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym2 name'0123456789876543210 name0123456789876543210) u0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym3 name'0123456789876543210 name0123456789876543210 u0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210) where
+      suppressUnusedWarnings
+        = snd
+            (((,)
+                Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference)
+               ())
+    data Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210 name'0123456789876543210
+      where
+        Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference :: forall name0123456789876543210
+                                                                                       name'0123456789876543210
+                                                                                       arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym2 name0123456789876543210 arg) =>
+                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210 name'0123456789876543210
+    type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210) name'0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym2 name0123456789876543210 name'0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd
+            (((,)
+                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
+               ())
+    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 name0123456789876543210
+      where
+        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall name0123456789876543210
+                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
+                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 name0123456789876543210
+    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 name0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210
+    type family Let0123456789876543210Scrutinee_0123456789876543210 name name' u attrs where
+      Let0123456789876543210Scrutinee_0123456789876543210 name name' u attrs = Apply (Apply (==@#@$) name) name'
+    type family Case_0123456789876543210 name name' u attrs 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 LookupSym2 (a0123456789876543210 :: [AChar]) (a0123456789876543210 :: Schema) =
+        Lookup a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (LookupSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) LookupSym1KindInference) ())
+    data LookupSym1 (a0123456789876543210 :: [AChar]) :: (~>) Schema U
+      where
+        LookupSym1KindInference :: forall a0123456789876543210
+                                          a0123456789876543210
+                                          arg. SameKind (Apply (LookupSym1 a0123456789876543210) arg) (LookupSym2 a0123456789876543210 arg) =>
+                                   LookupSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (LookupSym1 a0123456789876543210) a0123456789876543210 = Lookup a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings LookupSym0 where
+      suppressUnusedWarnings = snd (((,) LookupSym0KindInference) ())
+    data LookupSym0 :: (~>) [AChar] ((~>) Schema U)
+      where
+        LookupSym0KindInference :: forall a0123456789876543210
+                                          arg. SameKind (Apply LookupSym0 arg) (LookupSym1 arg) =>
+                                   LookupSym0 a0123456789876543210
+    type instance Apply LookupSym0 a0123456789876543210 = LookupSym1 a0123456789876543210
+    type OccursSym2 (a0123456789876543210 :: [AChar]) (a0123456789876543210 :: Schema) =
+        Occurs a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (OccursSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) OccursSym1KindInference) ())
+    data OccursSym1 (a0123456789876543210 :: [AChar]) :: (~>) Schema Bool
+      where
+        OccursSym1KindInference :: forall a0123456789876543210
+                                          a0123456789876543210
+                                          arg. SameKind (Apply (OccursSym1 a0123456789876543210) arg) (OccursSym2 a0123456789876543210 arg) =>
+                                   OccursSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (OccursSym1 a0123456789876543210) a0123456789876543210 = Occurs a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings OccursSym0 where
+      suppressUnusedWarnings = snd (((,) OccursSym0KindInference) ())
+    data OccursSym0 :: (~>) [AChar] ((~>) Schema Bool)
+      where
+        OccursSym0KindInference :: forall a0123456789876543210
+                                          arg. SameKind (Apply OccursSym0 arg) (OccursSym1 arg) =>
+                                   OccursSym0 a0123456789876543210
+    type instance Apply OccursSym0 a0123456789876543210 = OccursSym1 a0123456789876543210
+    type DisjointSym2 (a0123456789876543210 :: Schema) (a0123456789876543210 :: Schema) =
+        Disjoint a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (DisjointSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) DisjointSym1KindInference) ())
+    data DisjointSym1 (a0123456789876543210 :: Schema) :: (~>) Schema Bool
+      where
+        DisjointSym1KindInference :: forall a0123456789876543210
+                                            a0123456789876543210
+                                            arg. SameKind (Apply (DisjointSym1 a0123456789876543210) arg) (DisjointSym2 a0123456789876543210 arg) =>
+                                     DisjointSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (DisjointSym1 a0123456789876543210) a0123456789876543210 = Disjoint a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings DisjointSym0 where
+      suppressUnusedWarnings = snd (((,) DisjointSym0KindInference) ())
+    data DisjointSym0 :: (~>) Schema ((~>) Schema Bool)
+      where
+        DisjointSym0KindInference :: forall a0123456789876543210
+                                            arg. SameKind (Apply DisjointSym0 arg) (DisjointSym1 arg) =>
+                                     DisjointSym0 a0123456789876543210
+    type instance Apply DisjointSym0 a0123456789876543210 = DisjointSym1 a0123456789876543210
+    type AttrNotInSym2 (a0123456789876543210 :: Attribute) (a0123456789876543210 :: Schema) =
+        AttrNotIn a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (AttrNotInSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) AttrNotInSym1KindInference) ())
+    data AttrNotInSym1 (a0123456789876543210 :: Attribute) :: (~>) Schema Bool
+      where
+        AttrNotInSym1KindInference :: forall a0123456789876543210
+                                             a0123456789876543210
+                                             arg. SameKind (Apply (AttrNotInSym1 a0123456789876543210) arg) (AttrNotInSym2 a0123456789876543210 arg) =>
+                                      AttrNotInSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (AttrNotInSym1 a0123456789876543210) a0123456789876543210 = AttrNotIn a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings AttrNotInSym0 where
+      suppressUnusedWarnings = snd (((,) AttrNotInSym0KindInference) ())
+    data AttrNotInSym0 :: (~>) Attribute ((~>) Schema Bool)
+      where
+        AttrNotInSym0KindInference :: forall a0123456789876543210
+                                             arg. SameKind (Apply AttrNotInSym0 arg) (AttrNotInSym1 arg) =>
+                                      AttrNotInSym0 a0123456789876543210
+    type instance Apply AttrNotInSym0 a0123456789876543210 = AttrNotInSym1 a0123456789876543210
+    type AppendSym2 (a0123456789876543210 :: Schema) (a0123456789876543210 :: Schema) =
+        Append a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (AppendSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) AppendSym1KindInference) ())
+    data AppendSym1 (a0123456789876543210 :: Schema) :: (~>) Schema Schema
+      where
+        AppendSym1KindInference :: forall a0123456789876543210
+                                          a0123456789876543210
+                                          arg. SameKind (Apply (AppendSym1 a0123456789876543210) arg) (AppendSym2 a0123456789876543210 arg) =>
+                                   AppendSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (AppendSym1 a0123456789876543210) a0123456789876543210 = Append a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings AppendSym0 where
+      suppressUnusedWarnings = snd (((,) AppendSym0KindInference) ())
+    data AppendSym0 :: (~>) Schema ((~>) Schema Schema)
+      where
+        AppendSym0KindInference :: forall a0123456789876543210
+                                          arg. SameKind (Apply AppendSym0 arg) (AppendSym1 arg) =>
+                                   AppendSym0 a0123456789876543210
+    type instance Apply AppendSym0 a0123456789876543210 = AppendSym1 a0123456789876543210
+    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_0123456789876543210Sym4 name name' u attrs)
+    type family Occurs (a :: [AChar]) (a :: Schema) :: Bool where
+      Occurs _ (Sch '[]) = FalseSym0
+      Occurs name (Sch ('(:) (Attr name' _) attrs)) = Apply (Apply (||@#@$) (Apply (Apply (==@#@$) name) name')) (Apply (Apply OccursSym0 name) (Apply SchSym0 attrs))
+    type family Disjoint (a :: Schema) (a :: Schema) :: Bool where
+      Disjoint (Sch '[]) _ = TrueSym0
+      Disjoint (Sch ('(:) h t)) s = Apply (Apply (&&@#@$) (Apply (Apply AttrNotInSym0 h) s)) (Apply (Apply DisjointSym0 (Apply SchSym0 t)) s)
+    type family AttrNotIn (a :: Attribute) (a :: Schema) :: Bool where
+      AttrNotIn _ (Sch '[]) = TrueSym0
+      AttrNotIn (Attr name u) (Sch ('(:) (Attr name' _) t)) = Apply (Apply (&&@#@$) (Apply (Apply (/=@#@$) name) name')) (Apply (Apply AttrNotInSym0 (Apply (Apply AttrSym0 name) u)) (Apply SchSym0 t))
+    type family Append (a :: Schema) (a :: Schema) :: Schema where
+      Append (Sch s1) (Sch s2) = Apply SchSym0 (Apply (Apply (++@#@$) s1) s2)
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: U) (a :: Symbol) :: Symbol where
+      ShowsPrec_0123456789876543210 _ BOOL a_0123456789876543210 = Apply (Apply ShowStringSym0 "BOOL") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ STRING a_0123456789876543210 = Apply (Apply ShowStringSym0 "STRING") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ NAT a_0123456789876543210 = Apply (Apply ShowStringSym0 "NAT") a_0123456789876543210
+      ShowsPrec_0123456789876543210 p_0123456789876543210 (VEC arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "VEC ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: U) (a0123456789876543210 :: Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: U) :: (~>) Symbol Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) U ((~>) Symbol Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) U ((~>) Symbol Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow U where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: AChar) (a :: Symbol) :: Symbol where
+      ShowsPrec_0123456789876543210 _ CA a_0123456789876543210 = Apply (Apply ShowStringSym0 "CA") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CB a_0123456789876543210 = Apply (Apply ShowStringSym0 "CB") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CC a_0123456789876543210 = Apply (Apply ShowStringSym0 "CC") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CD a_0123456789876543210 = Apply (Apply ShowStringSym0 "CD") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CE a_0123456789876543210 = Apply (Apply ShowStringSym0 "CE") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CF a_0123456789876543210 = Apply (Apply ShowStringSym0 "CF") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CG a_0123456789876543210 = Apply (Apply ShowStringSym0 "CG") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CH a_0123456789876543210 = Apply (Apply ShowStringSym0 "CH") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CI a_0123456789876543210 = Apply (Apply ShowStringSym0 "CI") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CJ a_0123456789876543210 = Apply (Apply ShowStringSym0 "CJ") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CK a_0123456789876543210 = Apply (Apply ShowStringSym0 "CK") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CL a_0123456789876543210 = Apply (Apply ShowStringSym0 "CL") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CM a_0123456789876543210 = Apply (Apply ShowStringSym0 "CM") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CN a_0123456789876543210 = Apply (Apply ShowStringSym0 "CN") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CO a_0123456789876543210 = Apply (Apply ShowStringSym0 "CO") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CP a_0123456789876543210 = Apply (Apply ShowStringSym0 "CP") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CQ a_0123456789876543210 = Apply (Apply ShowStringSym0 "CQ") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CR a_0123456789876543210 = Apply (Apply ShowStringSym0 "CR") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CS a_0123456789876543210 = Apply (Apply ShowStringSym0 "CS") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CT a_0123456789876543210 = Apply (Apply ShowStringSym0 "CT") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CU a_0123456789876543210 = Apply (Apply ShowStringSym0 "CU") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CV a_0123456789876543210 = Apply (Apply ShowStringSym0 "CV") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CW a_0123456789876543210 = Apply (Apply ShowStringSym0 "CW") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CX a_0123456789876543210 = Apply (Apply ShowStringSym0 "CX") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CY a_0123456789876543210 = Apply (Apply ShowStringSym0 "CY") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ CZ a_0123456789876543210 = Apply (Apply ShowStringSym0 "CZ") a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: AChar) (a0123456789876543210 :: Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: AChar) :: (~>) Symbol Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) AChar ((~>) Symbol Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) AChar ((~>) Symbol Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow AChar where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    type family Equals_0123456789876543210 (a :: U) (b :: U) :: Bool where
+      Equals_0123456789876543210 BOOL BOOL = TrueSym0
+      Equals_0123456789876543210 STRING STRING = TrueSym0
+      Equals_0123456789876543210 NAT NAT = TrueSym0
+      Equals_0123456789876543210 (VEC a a) (VEC b b) = (&&) ((==) a b) ((==) a b)
+      Equals_0123456789876543210 (_ :: U) (_ :: U) = FalseSym0
+    instance PEq U where
+      type (==) a b = Equals_0123456789876543210 a b
+    type family Equals_0123456789876543210 (a :: AChar) (b :: AChar) :: Bool where
+      Equals_0123456789876543210 CA CA = TrueSym0
+      Equals_0123456789876543210 CB CB = TrueSym0
+      Equals_0123456789876543210 CC CC = TrueSym0
+      Equals_0123456789876543210 CD CD = TrueSym0
+      Equals_0123456789876543210 CE CE = TrueSym0
+      Equals_0123456789876543210 CF CF = TrueSym0
+      Equals_0123456789876543210 CG CG = TrueSym0
+      Equals_0123456789876543210 CH CH = TrueSym0
+      Equals_0123456789876543210 CI CI = TrueSym0
+      Equals_0123456789876543210 CJ CJ = TrueSym0
+      Equals_0123456789876543210 CK CK = TrueSym0
+      Equals_0123456789876543210 CL CL = TrueSym0
+      Equals_0123456789876543210 CM CM = TrueSym0
+      Equals_0123456789876543210 CN CN = TrueSym0
+      Equals_0123456789876543210 CO CO = TrueSym0
+      Equals_0123456789876543210 CP CP = TrueSym0
+      Equals_0123456789876543210 CQ CQ = TrueSym0
+      Equals_0123456789876543210 CR CR = TrueSym0
+      Equals_0123456789876543210 CS CS = TrueSym0
+      Equals_0123456789876543210 CT CT = TrueSym0
+      Equals_0123456789876543210 CU CU = TrueSym0
+      Equals_0123456789876543210 CV CV = TrueSym0
+      Equals_0123456789876543210 CW CW = TrueSym0
+      Equals_0123456789876543210 CX CX = TrueSym0
+      Equals_0123456789876543210 CY CY = TrueSym0
+      Equals_0123456789876543210 CZ CZ = TrueSym0
+      Equals_0123456789876543210 (_ :: AChar) (_ :: AChar) = FalseSym0
+    instance PEq AChar where
+      type (==) a b = Equals_0123456789876543210 a b
+    sLookup ::
+      forall (t :: [AChar]) (t :: Schema).
+      Sing t -> Sing t -> Sing (Apply (Apply LookupSym0 t) t :: U)
+    sOccurs ::
+      forall (t :: [AChar]) (t :: Schema).
+      Sing t -> Sing t -> Sing (Apply (Apply OccursSym0 t) t :: Bool)
+    sDisjoint ::
+      forall (t :: Schema) (t :: Schema).
+      Sing t -> Sing t -> Sing (Apply (Apply DisjointSym0 t) t :: Bool)
+    sAttrNotIn ::
+      forall (t :: Attribute) (t :: Schema).
+      Sing t -> Sing t -> Sing (Apply (Apply AttrNotInSym0 t) t :: Bool)
+    sAppend ::
+      forall (t :: Schema) (t :: Schema).
+      Sing t -> Sing t -> Sing (Apply (Apply AppendSym0 t) t :: Schema)
+    sLookup _ (SSch SNil) = sUndefined
+    sLookup
+      (sName :: Sing name)
+      (SSch (SCons (SAttr (sName' :: Sing name') (sU :: Sing u))
+                   (sAttrs :: Sing attrs)))
+      = let
+          sScrutinee_0123456789876543210 ::
+            Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym4 name name' u attrs)
+          sScrutinee_0123456789876543210
+            = (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sName))
+                sName'
+        in
+          (GHC.Base.id
+             @(Sing (Case_0123456789876543210 name name' u attrs (Let0123456789876543210Scrutinee_0123456789876543210Sym4 name name' u attrs) :: U)))
+            (case sScrutinee_0123456789876543210 of
+               STrue -> sU
+               SFalse
+                 -> (applySing ((applySing ((singFun2 @LookupSym0) sLookup)) sName))
+                      ((applySing ((singFun1 @SchSym0) SSch)) sAttrs))
+    sOccurs _ (SSch SNil) = SFalse
+    sOccurs
+      (sName :: Sing name)
+      (SSch (SCons (SAttr (sName' :: Sing name') _)
+                   (sAttrs :: Sing attrs)))
+      = (applySing
+           ((applySing ((singFun2 @(||@#@$)) (%||)))
+              ((applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sName))
+                 sName')))
+          ((applySing ((applySing ((singFun2 @OccursSym0) sOccurs)) sName))
+             ((applySing ((singFun1 @SchSym0) SSch)) sAttrs))
+    sDisjoint (SSch SNil) _ = STrue
+    sDisjoint
+      (SSch (SCons (sH :: Sing h) (sT :: Sing t)))
+      (sS :: Sing s)
+      = (applySing
+           ((applySing ((singFun2 @(&&@#@$)) (%&&)))
+              ((applySing
+                  ((applySing ((singFun2 @AttrNotInSym0) sAttrNotIn)) sH))
+                 sS)))
+          ((applySing
+              ((applySing ((singFun2 @DisjointSym0) sDisjoint))
+                 ((applySing ((singFun1 @SchSym0) SSch)) sT)))
+             sS)
+    sAttrNotIn _ (SSch SNil) = STrue
+    sAttrNotIn
+      (SAttr (sName :: Sing name) (sU :: Sing u))
+      (SSch (SCons (SAttr (sName' :: Sing name') _) (sT :: Sing t)))
+      = (applySing
+           ((applySing ((singFun2 @(&&@#@$)) (%&&)))
+              ((applySing ((applySing ((singFun2 @(/=@#@$)) (%/=))) sName))
+                 sName')))
+          ((applySing
+              ((applySing ((singFun2 @AttrNotInSym0) sAttrNotIn))
+                 ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sName)) sU)))
+             ((applySing ((singFun1 @SchSym0) SSch)) sT))
+    sAppend (SSch (sS1 :: Sing s1)) (SSch (sS2 :: Sing s2))
+      = (applySing ((singFun1 @SchSym0) SSch))
+          ((applySing ((applySing ((singFun2 @(++@#@$)) (%++))) sS1)) sS2)
+    instance SingI (LookupSym0 :: (~>) [AChar] ((~>) Schema U)) where
+      sing = (singFun2 @LookupSym0) sLookup
+    instance SingI d =>
+             SingI (LookupSym1 (d :: [AChar]) :: (~>) Schema U) where
+      sing = (singFun1 @(LookupSym1 (d :: [AChar]))) (sLookup (sing @d))
+    instance SingI (OccursSym0 :: (~>) [AChar] ((~>) Schema Bool)) where
+      sing = (singFun2 @OccursSym0) sOccurs
+    instance SingI d =>
+             SingI (OccursSym1 (d :: [AChar]) :: (~>) Schema Bool) where
+      sing = (singFun1 @(OccursSym1 (d :: [AChar]))) (sOccurs (sing @d))
+    instance SingI (DisjointSym0 :: (~>) Schema ((~>) Schema Bool)) where
+      sing = (singFun2 @DisjointSym0) sDisjoint
+    instance SingI d =>
+             SingI (DisjointSym1 (d :: Schema) :: (~>) Schema Bool) where
+      sing
+        = (singFun1 @(DisjointSym1 (d :: Schema))) (sDisjoint (sing @d))
+    instance SingI (AttrNotInSym0 :: (~>) Attribute ((~>) Schema Bool)) where
+      sing = (singFun2 @AttrNotInSym0) sAttrNotIn
+    instance SingI d =>
+             SingI (AttrNotInSym1 (d :: Attribute) :: (~>) Schema Bool) where
+      sing
+        = (singFun1 @(AttrNotInSym1 (d :: Attribute)))
+            (sAttrNotIn (sing @d))
+    instance SingI (AppendSym0 :: (~>) Schema ((~>) Schema Schema)) where
+      sing = (singFun2 @AppendSym0) sAppend
+    instance SingI d =>
+             SingI (AppendSym1 (d :: Schema) :: (~>) Schema Schema) where
+      sing = (singFun1 @(AppendSym1 (d :: Schema))) (sAppend (sing @d))
+    data SU :: U -> Type
+      where
+        SBOOL :: SU BOOL
+        SSTRING :: SU STRING
+        SNAT :: SU NAT
+        SVEC :: forall (n :: U) (n :: Nat).
+                (Sing (n :: U)) -> (Sing (n :: Nat)) -> SU (VEC n n)
+    type instance Sing @U = SU
+    instance SingKind U where
+      type Demote U = U
+      fromSing SBOOL = BOOL
+      fromSing SSTRING = STRING
+      fromSing SNAT = NAT
+      fromSing (SVEC b b) = (VEC (fromSing b)) (fromSing b)
+      toSing BOOL = SomeSing SBOOL
+      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) }
+    data SAChar :: AChar -> Type
+      where
+        SCA :: SAChar CA
+        SCB :: SAChar CB
+        SCC :: SAChar CC
+        SCD :: SAChar CD
+        SCE :: SAChar CE
+        SCF :: SAChar CF
+        SCG :: SAChar CG
+        SCH :: SAChar CH
+        SCI :: SAChar CI
+        SCJ :: SAChar CJ
+        SCK :: SAChar CK
+        SCL :: SAChar CL
+        SCM :: SAChar CM
+        SCN :: SAChar CN
+        SCO :: SAChar CO
+        SCP :: SAChar CP
+        SCQ :: SAChar CQ
+        SCR :: SAChar CR
+        SCS :: SAChar CS
+        SCT :: SAChar CT
+        SCU :: SAChar CU
+        SCV :: SAChar CV
+        SCW :: SAChar CW
+        SCX :: SAChar CX
+        SCY :: SAChar CY
+        SCZ :: SAChar CZ
+    type instance Sing @AChar = SAChar
+    instance SingKind AChar where
+      type Demote AChar = AChar
+      fromSing SCA = CA
+      fromSing SCB = CB
+      fromSing SCC = CC
+      fromSing SCD = CD
+      fromSing SCE = CE
+      fromSing SCF = CF
+      fromSing SCG = CG
+      fromSing SCH = CH
+      fromSing SCI = CI
+      fromSing SCJ = CJ
+      fromSing SCK = CK
+      fromSing SCL = CL
+      fromSing SCM = CM
+      fromSing SCN = CN
+      fromSing SCO = CO
+      fromSing SCP = CP
+      fromSing SCQ = CQ
+      fromSing SCR = CR
+      fromSing SCS = CS
+      fromSing SCT = CT
+      fromSing SCU = CU
+      fromSing SCV = CV
+      fromSing SCW = CW
+      fromSing SCX = CX
+      fromSing SCY = CY
+      fromSing SCZ = CZ
+      toSing CA = SomeSing SCA
+      toSing CB = SomeSing SCB
+      toSing CC = SomeSing SCC
+      toSing CD = SomeSing SCD
+      toSing CE = SomeSing SCE
+      toSing CF = SomeSing SCF
+      toSing CG = SomeSing SCG
+      toSing CH = SomeSing SCH
+      toSing CI = SomeSing SCI
+      toSing CJ = SomeSing SCJ
+      toSing CK = SomeSing SCK
+      toSing CL = SomeSing SCL
+      toSing CM = SomeSing SCM
+      toSing CN = SomeSing SCN
+      toSing CO = SomeSing SCO
+      toSing CP = SomeSing SCP
+      toSing CQ = SomeSing SCQ
+      toSing CR = SomeSing SCR
+      toSing CS = SomeSing SCS
+      toSing CT = SomeSing SCT
+      toSing CU = SomeSing SCU
+      toSing CV = SomeSing SCV
+      toSing CW = SomeSing SCW
+      toSing CX = SomeSing SCX
+      toSing CY = SomeSing SCY
+      toSing CZ = SomeSing SCZ
+    data SAttribute :: Attribute -> Type
+      where
+        SAttr :: forall (n :: [AChar]) (n :: U).
+                 (Sing (n :: [AChar])) -> (Sing (n :: U)) -> SAttribute (Attr n n)
+    type instance Sing @Attribute = SAttribute
+    instance SingKind Attribute where
+      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) }
+    data SSchema :: Schema -> Type
+      where
+        SSch :: forall (n :: [Attribute]).
+                (Sing (n :: [Attribute])) -> SSchema (Sch n)
+    type instance Sing @Schema = SSchema
+    instance SingKind Schema where
+      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) }
+    instance (SShow U, SShow Nat) => SShow U where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: U) (t3 :: Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) U ((~>) Symbol Symbol))
+                                                             -> Type) t1) t2) t3)
+      sShowsPrec
+        _
+        SBOOL
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "BOOL")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SSTRING
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "STRING")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SNAT
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "NAT")))
+            sA_0123456789876543210
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        (SVEC (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
+              (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (sFromInteger (sing :: Sing 10)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                          (sing :: Sing "VEC "))))
+                   ((applySing
+                       ((applySing ((singFun3 @(.@#@$)) (%.)))
+                          ((applySing
+                              ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                                 (sFromInteger (sing :: Sing 11))))
+                             sArg_0123456789876543210)))
+                      ((applySing
+                          ((applySing ((singFun3 @(.@#@$)) (%.)))
+                             ((singFun1 @ShowSpaceSym0) sShowSpace)))
+                         ((applySing
+                             ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                                (sFromInteger (sing :: Sing 11))))
+                            sArg_0123456789876543210))))))
+            sA_0123456789876543210
+    instance SShow AChar where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: AChar) (t3 :: Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) AChar ((~>) Symbol Symbol))
+                                                             -> Type) t1) t2) t3)
+      sShowsPrec
+        _
+        SCA
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CA")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCB
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CB")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCC
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CC")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCD
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CD")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCE
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CE")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCF
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CF")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCG
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CG")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCH
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CH")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCI
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CI")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCJ
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CJ")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCK
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CK")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCL
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CL")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCM
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CM")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCN
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CN")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCO
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CO")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCP
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CP")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCQ
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CQ")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCR
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CR")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCS
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CS")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCT
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CT")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCU
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CU")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCV
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CV")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCW
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CW")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCX
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CX")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCY
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CY")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SCZ
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "CZ")))
+            sA_0123456789876543210
+    instance (SEq U, SEq Nat) => SEq U where
+      (%==) SBOOL SBOOL = STrue
+      (%==) SBOOL SSTRING = SFalse
+      (%==) SBOOL SNAT = SFalse
+      (%==) SBOOL (SVEC _ _) = SFalse
+      (%==) SSTRING SBOOL = SFalse
+      (%==) SSTRING SSTRING = STrue
+      (%==) SSTRING SNAT = SFalse
+      (%==) SSTRING (SVEC _ _) = SFalse
+      (%==) SNAT SBOOL = SFalse
+      (%==) SNAT SSTRING = SFalse
+      (%==) SNAT SNAT = STrue
+      (%==) SNAT (SVEC _ _) = SFalse
+      (%==) (SVEC _ _) SBOOL = SFalse
+      (%==) (SVEC _ _) SSTRING = SFalse
+      (%==) (SVEC _ _) SNAT = SFalse
+      (%==) (SVEC a a) (SVEC b b) = ((%&&) (((%==) a) b)) (((%==) a) b)
+    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)
+      (%~) 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)
+      (%~) 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)
+      (%~) (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 })
+    instance (SDecide U, SDecide Nat) =>
+             Data.Type.Equality.TestEquality (SU :: U -> Type) where
+      Data.Type.Equality.testEquality
+        = Data.Singletons.Decide.decideEquality
+    instance (SDecide U, SDecide Nat) =>
+             Data.Type.Coercion.TestCoercion (SU :: U -> Type) where
+      Data.Type.Coercion.testCoercion
+        = Data.Singletons.Decide.decideCoercion
+    instance SEq AChar where
+      (%==) SCA SCA = STrue
+      (%==) SCA SCB = SFalse
+      (%==) SCA SCC = SFalse
+      (%==) SCA SCD = SFalse
+      (%==) SCA SCE = SFalse
+      (%==) SCA SCF = SFalse
+      (%==) SCA SCG = SFalse
+      (%==) SCA SCH = SFalse
+      (%==) SCA SCI = SFalse
+      (%==) SCA SCJ = SFalse
+      (%==) SCA SCK = SFalse
+      (%==) SCA SCL = SFalse
+      (%==) SCA SCM = SFalse
+      (%==) SCA SCN = SFalse
+      (%==) SCA SCO = SFalse
+      (%==) SCA SCP = SFalse
+      (%==) SCA SCQ = SFalse
+      (%==) SCA SCR = SFalse
+      (%==) SCA SCS = SFalse
+      (%==) SCA SCT = SFalse
+      (%==) SCA SCU = SFalse
+      (%==) SCA SCV = SFalse
+      (%==) SCA SCW = SFalse
+      (%==) SCA SCX = SFalse
+      (%==) SCA SCY = SFalse
+      (%==) SCA SCZ = SFalse
+      (%==) SCB SCA = SFalse
+      (%==) SCB SCB = STrue
+      (%==) SCB SCC = SFalse
+      (%==) SCB SCD = SFalse
+      (%==) SCB SCE = SFalse
+      (%==) SCB SCF = SFalse
+      (%==) SCB SCG = SFalse
+      (%==) SCB SCH = SFalse
+      (%==) SCB SCI = SFalse
+      (%==) SCB SCJ = SFalse
+      (%==) SCB SCK = SFalse
+      (%==) SCB SCL = SFalse
+      (%==) SCB SCM = SFalse
+      (%==) SCB SCN = SFalse
+      (%==) SCB SCO = SFalse
+      (%==) SCB SCP = SFalse
+      (%==) SCB SCQ = SFalse
+      (%==) SCB SCR = SFalse
+      (%==) SCB SCS = SFalse
+      (%==) SCB SCT = SFalse
+      (%==) SCB SCU = SFalse
+      (%==) SCB SCV = SFalse
+      (%==) SCB SCW = SFalse
+      (%==) SCB SCX = SFalse
+      (%==) SCB SCY = SFalse
+      (%==) SCB SCZ = SFalse
+      (%==) SCC SCA = SFalse
+      (%==) SCC SCB = SFalse
+      (%==) SCC SCC = STrue
+      (%==) SCC SCD = SFalse
+      (%==) SCC SCE = SFalse
+      (%==) SCC SCF = SFalse
+      (%==) SCC SCG = SFalse
+      (%==) SCC SCH = SFalse
+      (%==) SCC SCI = SFalse
+      (%==) SCC SCJ = SFalse
+      (%==) SCC SCK = SFalse
+      (%==) SCC SCL = SFalse
+      (%==) SCC SCM = SFalse
+      (%==) SCC SCN = SFalse
+      (%==) SCC SCO = SFalse
+      (%==) SCC SCP = SFalse
+      (%==) SCC SCQ = SFalse
+      (%==) SCC SCR = SFalse
+      (%==) SCC SCS = SFalse
+      (%==) SCC SCT = SFalse
+      (%==) SCC SCU = SFalse
+      (%==) SCC SCV = SFalse
+      (%==) SCC SCW = SFalse
+      (%==) SCC SCX = SFalse
+      (%==) SCC SCY = SFalse
+      (%==) SCC SCZ = SFalse
+      (%==) SCD SCA = SFalse
+      (%==) SCD SCB = SFalse
+      (%==) SCD SCC = SFalse
+      (%==) SCD SCD = STrue
+      (%==) SCD SCE = SFalse
+      (%==) SCD SCF = SFalse
+      (%==) SCD SCG = SFalse
+      (%==) SCD SCH = SFalse
+      (%==) SCD SCI = SFalse
+      (%==) SCD SCJ = SFalse
+      (%==) SCD SCK = SFalse
+      (%==) SCD SCL = SFalse
+      (%==) SCD SCM = SFalse
+      (%==) SCD SCN = SFalse
+      (%==) SCD SCO = SFalse
+      (%==) SCD SCP = SFalse
+      (%==) SCD SCQ = SFalse
+      (%==) SCD SCR = SFalse
+      (%==) SCD SCS = SFalse
+      (%==) SCD SCT = SFalse
+      (%==) SCD SCU = SFalse
+      (%==) SCD SCV = SFalse
+      (%==) SCD SCW = SFalse
+      (%==) SCD SCX = SFalse
+      (%==) SCD SCY = SFalse
+      (%==) SCD SCZ = SFalse
+      (%==) SCE SCA = SFalse
+      (%==) SCE SCB = SFalse
+      (%==) SCE SCC = SFalse
+      (%==) SCE SCD = SFalse
+      (%==) SCE SCE = STrue
+      (%==) SCE SCF = SFalse
+      (%==) SCE SCG = SFalse
+      (%==) SCE SCH = SFalse
+      (%==) SCE SCI = SFalse
+      (%==) SCE SCJ = SFalse
+      (%==) SCE SCK = SFalse
+      (%==) SCE SCL = SFalse
+      (%==) SCE SCM = SFalse
+      (%==) SCE SCN = SFalse
+      (%==) SCE SCO = SFalse
+      (%==) SCE SCP = SFalse
+      (%==) SCE SCQ = SFalse
+      (%==) SCE SCR = SFalse
+      (%==) SCE SCS = SFalse
+      (%==) SCE SCT = SFalse
+      (%==) SCE SCU = SFalse
+      (%==) SCE SCV = SFalse
+      (%==) SCE SCW = SFalse
+      (%==) SCE SCX = SFalse
+      (%==) SCE SCY = SFalse
+      (%==) SCE SCZ = SFalse
+      (%==) SCF SCA = SFalse
+      (%==) SCF SCB = SFalse
+      (%==) SCF SCC = SFalse
+      (%==) SCF SCD = SFalse
+      (%==) SCF SCE = SFalse
+      (%==) SCF SCF = STrue
+      (%==) SCF SCG = SFalse
+      (%==) SCF SCH = SFalse
+      (%==) SCF SCI = SFalse
+      (%==) SCF SCJ = SFalse
+      (%==) SCF SCK = SFalse
+      (%==) SCF SCL = SFalse
+      (%==) SCF SCM = SFalse
+      (%==) SCF SCN = SFalse
+      (%==) SCF SCO = SFalse
+      (%==) SCF SCP = SFalse
+      (%==) SCF SCQ = SFalse
+      (%==) SCF SCR = SFalse
+      (%==) SCF SCS = SFalse
+      (%==) SCF SCT = SFalse
+      (%==) SCF SCU = SFalse
+      (%==) SCF SCV = SFalse
+      (%==) SCF SCW = SFalse
+      (%==) SCF SCX = SFalse
+      (%==) SCF SCY = SFalse
+      (%==) SCF SCZ = SFalse
+      (%==) SCG SCA = SFalse
+      (%==) SCG SCB = SFalse
+      (%==) SCG SCC = SFalse
+      (%==) SCG SCD = SFalse
+      (%==) SCG SCE = SFalse
+      (%==) SCG SCF = SFalse
+      (%==) SCG SCG = STrue
+      (%==) SCG SCH = SFalse
+      (%==) SCG SCI = SFalse
+      (%==) SCG SCJ = SFalse
+      (%==) SCG SCK = SFalse
+      (%==) SCG SCL = SFalse
+      (%==) SCG SCM = SFalse
+      (%==) SCG SCN = SFalse
+      (%==) SCG SCO = SFalse
+      (%==) SCG SCP = SFalse
+      (%==) SCG SCQ = SFalse
+      (%==) SCG SCR = SFalse
+      (%==) SCG SCS = SFalse
+      (%==) SCG SCT = SFalse
+      (%==) SCG SCU = SFalse
+      (%==) SCG SCV = SFalse
+      (%==) SCG SCW = SFalse
+      (%==) SCG SCX = SFalse
+      (%==) SCG SCY = SFalse
+      (%==) SCG SCZ = SFalse
+      (%==) SCH SCA = SFalse
+      (%==) SCH SCB = SFalse
+      (%==) SCH SCC = SFalse
+      (%==) SCH SCD = SFalse
+      (%==) SCH SCE = SFalse
+      (%==) SCH SCF = SFalse
+      (%==) SCH SCG = SFalse
+      (%==) SCH SCH = STrue
+      (%==) SCH SCI = SFalse
+      (%==) SCH SCJ = SFalse
+      (%==) SCH SCK = SFalse
+      (%==) SCH SCL = SFalse
+      (%==) SCH SCM = SFalse
+      (%==) SCH SCN = SFalse
+      (%==) SCH SCO = SFalse
+      (%==) SCH SCP = SFalse
+      (%==) SCH SCQ = SFalse
+      (%==) SCH SCR = SFalse
+      (%==) SCH SCS = SFalse
+      (%==) SCH SCT = SFalse
+      (%==) SCH SCU = SFalse
+      (%==) SCH SCV = SFalse
+      (%==) SCH SCW = SFalse
+      (%==) SCH SCX = SFalse
+      (%==) SCH SCY = SFalse
+      (%==) SCH SCZ = SFalse
+      (%==) SCI SCA = SFalse
+      (%==) SCI SCB = SFalse
+      (%==) SCI SCC = SFalse
+      (%==) SCI SCD = SFalse
+      (%==) SCI SCE = SFalse
+      (%==) SCI SCF = SFalse
+      (%==) SCI SCG = SFalse
+      (%==) SCI SCH = SFalse
+      (%==) SCI SCI = STrue
+      (%==) SCI SCJ = SFalse
+      (%==) SCI SCK = SFalse
+      (%==) SCI SCL = SFalse
+      (%==) SCI SCM = SFalse
+      (%==) SCI SCN = SFalse
+      (%==) SCI SCO = SFalse
+      (%==) SCI SCP = SFalse
+      (%==) SCI SCQ = SFalse
+      (%==) SCI SCR = SFalse
+      (%==) SCI SCS = SFalse
+      (%==) SCI SCT = SFalse
+      (%==) SCI SCU = SFalse
+      (%==) SCI SCV = SFalse
+      (%==) SCI SCW = SFalse
+      (%==) SCI SCX = SFalse
+      (%==) SCI SCY = SFalse
+      (%==) SCI SCZ = SFalse
+      (%==) SCJ SCA = SFalse
+      (%==) SCJ SCB = SFalse
+      (%==) SCJ SCC = SFalse
+      (%==) SCJ SCD = SFalse
+      (%==) SCJ SCE = SFalse
+      (%==) SCJ SCF = SFalse
+      (%==) SCJ SCG = SFalse
+      (%==) SCJ SCH = SFalse
+      (%==) SCJ SCI = SFalse
+      (%==) SCJ SCJ = STrue
+      (%==) SCJ SCK = SFalse
+      (%==) SCJ SCL = SFalse
+      (%==) SCJ SCM = SFalse
+      (%==) SCJ SCN = SFalse
+      (%==) SCJ SCO = SFalse
+      (%==) SCJ SCP = SFalse
+      (%==) SCJ SCQ = SFalse
+      (%==) SCJ SCR = SFalse
+      (%==) SCJ SCS = SFalse
+      (%==) SCJ SCT = SFalse
+      (%==) SCJ SCU = SFalse
+      (%==) SCJ SCV = SFalse
+      (%==) SCJ SCW = SFalse
+      (%==) SCJ SCX = SFalse
+      (%==) SCJ SCY = SFalse
+      (%==) SCJ SCZ = SFalse
+      (%==) SCK SCA = SFalse
+      (%==) SCK SCB = SFalse
+      (%==) SCK SCC = SFalse
+      (%==) SCK SCD = SFalse
+      (%==) SCK SCE = SFalse
+      (%==) SCK SCF = SFalse
+      (%==) SCK SCG = SFalse
+      (%==) SCK SCH = SFalse
+      (%==) SCK SCI = SFalse
+      (%==) SCK SCJ = SFalse
+      (%==) SCK SCK = STrue
+      (%==) SCK SCL = SFalse
+      (%==) SCK SCM = SFalse
+      (%==) SCK SCN = SFalse
+      (%==) SCK SCO = SFalse
+      (%==) SCK SCP = SFalse
+      (%==) SCK SCQ = SFalse
+      (%==) SCK SCR = SFalse
+      (%==) SCK SCS = SFalse
+      (%==) SCK SCT = SFalse
+      (%==) SCK SCU = SFalse
+      (%==) SCK SCV = SFalse
+      (%==) SCK SCW = SFalse
+      (%==) SCK SCX = SFalse
+      (%==) SCK SCY = SFalse
+      (%==) SCK SCZ = SFalse
+      (%==) SCL SCA = SFalse
+      (%==) SCL SCB = SFalse
+      (%==) SCL SCC = SFalse
+      (%==) SCL SCD = SFalse
+      (%==) SCL SCE = SFalse
+      (%==) SCL SCF = SFalse
+      (%==) SCL SCG = SFalse
+      (%==) SCL SCH = SFalse
+      (%==) SCL SCI = SFalse
+      (%==) SCL SCJ = SFalse
+      (%==) SCL SCK = SFalse
+      (%==) SCL SCL = STrue
+      (%==) SCL SCM = SFalse
+      (%==) SCL SCN = SFalse
+      (%==) SCL SCO = SFalse
+      (%==) SCL SCP = SFalse
+      (%==) SCL SCQ = SFalse
+      (%==) SCL SCR = SFalse
+      (%==) SCL SCS = SFalse
+      (%==) SCL SCT = SFalse
+      (%==) SCL SCU = SFalse
+      (%==) SCL SCV = SFalse
+      (%==) SCL SCW = SFalse
+      (%==) SCL SCX = SFalse
+      (%==) SCL SCY = SFalse
+      (%==) SCL SCZ = SFalse
+      (%==) SCM SCA = SFalse
+      (%==) SCM SCB = SFalse
+      (%==) SCM SCC = SFalse
+      (%==) SCM SCD = SFalse
+      (%==) SCM SCE = SFalse
+      (%==) SCM SCF = SFalse
+      (%==) SCM SCG = SFalse
+      (%==) SCM SCH = SFalse
+      (%==) SCM SCI = SFalse
+      (%==) SCM SCJ = SFalse
+      (%==) SCM SCK = SFalse
+      (%==) SCM SCL = SFalse
+      (%==) SCM SCM = STrue
+      (%==) SCM SCN = SFalse
+      (%==) SCM SCO = SFalse
+      (%==) SCM SCP = SFalse
+      (%==) SCM SCQ = SFalse
+      (%==) SCM SCR = SFalse
+      (%==) SCM SCS = SFalse
+      (%==) SCM SCT = SFalse
+      (%==) SCM SCU = SFalse
+      (%==) SCM SCV = SFalse
+      (%==) SCM SCW = SFalse
+      (%==) SCM SCX = SFalse
+      (%==) SCM SCY = SFalse
+      (%==) SCM SCZ = SFalse
+      (%==) SCN SCA = SFalse
+      (%==) SCN SCB = SFalse
+      (%==) SCN SCC = SFalse
+      (%==) SCN SCD = SFalse
+      (%==) SCN SCE = SFalse
+      (%==) SCN SCF = SFalse
+      (%==) SCN SCG = SFalse
+      (%==) SCN SCH = SFalse
+      (%==) SCN SCI = SFalse
+      (%==) SCN SCJ = SFalse
+      (%==) SCN SCK = SFalse
+      (%==) SCN SCL = SFalse
+      (%==) SCN SCM = SFalse
+      (%==) SCN SCN = STrue
+      (%==) SCN SCO = SFalse
+      (%==) SCN SCP = SFalse
+      (%==) SCN SCQ = SFalse
+      (%==) SCN SCR = SFalse
+      (%==) SCN SCS = SFalse
+      (%==) SCN SCT = SFalse
+      (%==) SCN SCU = SFalse
+      (%==) SCN SCV = SFalse
+      (%==) SCN SCW = SFalse
+      (%==) SCN SCX = SFalse
+      (%==) SCN SCY = SFalse
+      (%==) SCN SCZ = SFalse
+      (%==) SCO SCA = SFalse
+      (%==) SCO SCB = SFalse
+      (%==) SCO SCC = SFalse
+      (%==) SCO SCD = SFalse
+      (%==) SCO SCE = SFalse
+      (%==) SCO SCF = SFalse
+      (%==) SCO SCG = SFalse
+      (%==) SCO SCH = SFalse
+      (%==) SCO SCI = SFalse
+      (%==) SCO SCJ = SFalse
+      (%==) SCO SCK = SFalse
+      (%==) SCO SCL = SFalse
+      (%==) SCO SCM = SFalse
+      (%==) SCO SCN = SFalse
+      (%==) SCO SCO = STrue
+      (%==) SCO SCP = SFalse
+      (%==) SCO SCQ = SFalse
+      (%==) SCO SCR = SFalse
+      (%==) SCO SCS = SFalse
+      (%==) SCO SCT = SFalse
+      (%==) SCO SCU = SFalse
+      (%==) SCO SCV = SFalse
+      (%==) SCO SCW = SFalse
+      (%==) SCO SCX = SFalse
+      (%==) SCO SCY = SFalse
+      (%==) SCO SCZ = SFalse
+      (%==) SCP SCA = SFalse
+      (%==) SCP SCB = SFalse
+      (%==) SCP SCC = SFalse
+      (%==) SCP SCD = SFalse
+      (%==) SCP SCE = SFalse
+      (%==) SCP SCF = SFalse
+      (%==) SCP SCG = SFalse
+      (%==) SCP SCH = SFalse
+      (%==) SCP SCI = SFalse
+      (%==) SCP SCJ = SFalse
+      (%==) SCP SCK = SFalse
+      (%==) SCP SCL = SFalse
+      (%==) SCP SCM = SFalse
+      (%==) SCP SCN = SFalse
+      (%==) SCP SCO = SFalse
+      (%==) SCP SCP = STrue
+      (%==) SCP SCQ = SFalse
+      (%==) SCP SCR = SFalse
+      (%==) SCP SCS = SFalse
+      (%==) SCP SCT = SFalse
+      (%==) SCP SCU = SFalse
+      (%==) SCP SCV = SFalse
+      (%==) SCP SCW = SFalse
+      (%==) SCP SCX = SFalse
+      (%==) SCP SCY = SFalse
+      (%==) SCP SCZ = SFalse
+      (%==) SCQ SCA = SFalse
+      (%==) SCQ SCB = SFalse
+      (%==) SCQ SCC = SFalse
+      (%==) SCQ SCD = SFalse
+      (%==) SCQ SCE = SFalse
+      (%==) SCQ SCF = SFalse
+      (%==) SCQ SCG = SFalse
+      (%==) SCQ SCH = SFalse
+      (%==) SCQ SCI = SFalse
+      (%==) SCQ SCJ = SFalse
+      (%==) SCQ SCK = SFalse
+      (%==) SCQ SCL = SFalse
+      (%==) SCQ SCM = SFalse
+      (%==) SCQ SCN = SFalse
+      (%==) SCQ SCO = SFalse
+      (%==) SCQ SCP = SFalse
+      (%==) SCQ SCQ = STrue
+      (%==) SCQ SCR = SFalse
+      (%==) SCQ SCS = SFalse
+      (%==) SCQ SCT = SFalse
+      (%==) SCQ SCU = SFalse
+      (%==) SCQ SCV = SFalse
+      (%==) SCQ SCW = SFalse
+      (%==) SCQ SCX = SFalse
+      (%==) SCQ SCY = SFalse
+      (%==) SCQ SCZ = SFalse
+      (%==) SCR SCA = SFalse
+      (%==) SCR SCB = SFalse
+      (%==) SCR SCC = SFalse
+      (%==) SCR SCD = SFalse
+      (%==) SCR SCE = SFalse
+      (%==) SCR SCF = SFalse
+      (%==) SCR SCG = SFalse
+      (%==) SCR SCH = SFalse
+      (%==) SCR SCI = SFalse
+      (%==) SCR SCJ = SFalse
+      (%==) SCR SCK = SFalse
+      (%==) SCR SCL = SFalse
+      (%==) SCR SCM = SFalse
+      (%==) SCR SCN = SFalse
+      (%==) SCR SCO = SFalse
+      (%==) SCR SCP = SFalse
+      (%==) SCR SCQ = SFalse
+      (%==) SCR SCR = STrue
+      (%==) SCR SCS = SFalse
+      (%==) SCR SCT = SFalse
+      (%==) SCR SCU = SFalse
+      (%==) SCR SCV = SFalse
+      (%==) SCR SCW = SFalse
+      (%==) SCR SCX = SFalse
+      (%==) SCR SCY = SFalse
+      (%==) SCR SCZ = SFalse
+      (%==) SCS SCA = SFalse
+      (%==) SCS SCB = SFalse
+      (%==) SCS SCC = SFalse
+      (%==) SCS SCD = SFalse
+      (%==) SCS SCE = SFalse
+      (%==) SCS SCF = SFalse
+      (%==) SCS SCG = SFalse
+      (%==) SCS SCH = SFalse
+      (%==) SCS SCI = SFalse
+      (%==) SCS SCJ = SFalse
+      (%==) SCS SCK = SFalse
+      (%==) SCS SCL = SFalse
+      (%==) SCS SCM = SFalse
+      (%==) SCS SCN = SFalse
+      (%==) SCS SCO = SFalse
+      (%==) SCS SCP = SFalse
+      (%==) SCS SCQ = SFalse
+      (%==) SCS SCR = SFalse
+      (%==) SCS SCS = STrue
+      (%==) SCS SCT = SFalse
+      (%==) SCS SCU = SFalse
+      (%==) SCS SCV = SFalse
+      (%==) SCS SCW = SFalse
+      (%==) SCS SCX = SFalse
+      (%==) SCS SCY = SFalse
+      (%==) SCS SCZ = SFalse
+      (%==) SCT SCA = SFalse
+      (%==) SCT SCB = SFalse
+      (%==) SCT SCC = SFalse
+      (%==) SCT SCD = SFalse
+      (%==) SCT SCE = SFalse
+      (%==) SCT SCF = SFalse
+      (%==) SCT SCG = SFalse
+      (%==) SCT SCH = SFalse
+      (%==) SCT SCI = SFalse
+      (%==) SCT SCJ = SFalse
+      (%==) SCT SCK = SFalse
+      (%==) SCT SCL = SFalse
+      (%==) SCT SCM = SFalse
+      (%==) SCT SCN = SFalse
+      (%==) SCT SCO = SFalse
+      (%==) SCT SCP = SFalse
+      (%==) SCT SCQ = SFalse
+      (%==) SCT SCR = SFalse
+      (%==) SCT SCS = SFalse
+      (%==) SCT SCT = STrue
+      (%==) SCT SCU = SFalse
+      (%==) SCT SCV = SFalse
+      (%==) SCT SCW = SFalse
+      (%==) SCT SCX = SFalse
+      (%==) SCT SCY = SFalse
+      (%==) SCT SCZ = SFalse
+      (%==) SCU SCA = SFalse
+      (%==) SCU SCB = SFalse
+      (%==) SCU SCC = SFalse
+      (%==) SCU SCD = SFalse
+      (%==) SCU SCE = SFalse
+      (%==) SCU SCF = SFalse
+      (%==) SCU SCG = SFalse
+      (%==) SCU SCH = SFalse
+      (%==) SCU SCI = SFalse
+      (%==) SCU SCJ = SFalse
+      (%==) SCU SCK = SFalse
+      (%==) SCU SCL = SFalse
+      (%==) SCU SCM = SFalse
+      (%==) SCU SCN = SFalse
+      (%==) SCU SCO = SFalse
+      (%==) SCU SCP = SFalse
+      (%==) SCU SCQ = SFalse
+      (%==) SCU SCR = SFalse
+      (%==) SCU SCS = SFalse
+      (%==) SCU SCT = SFalse
+      (%==) SCU SCU = STrue
+      (%==) SCU SCV = SFalse
+      (%==) SCU SCW = SFalse
+      (%==) SCU SCX = SFalse
+      (%==) SCU SCY = SFalse
+      (%==) SCU SCZ = SFalse
+      (%==) SCV SCA = SFalse
+      (%==) SCV SCB = SFalse
+      (%==) SCV SCC = SFalse
+      (%==) SCV SCD = SFalse
+      (%==) SCV SCE = SFalse
+      (%==) SCV SCF = SFalse
+      (%==) SCV SCG = SFalse
+      (%==) SCV SCH = SFalse
+      (%==) SCV SCI = SFalse
+      (%==) SCV SCJ = SFalse
+      (%==) SCV SCK = SFalse
+      (%==) SCV SCL = SFalse
+      (%==) SCV SCM = SFalse
+      (%==) SCV SCN = SFalse
+      (%==) SCV SCO = SFalse
+      (%==) SCV SCP = SFalse
+      (%==) SCV SCQ = SFalse
+      (%==) SCV SCR = SFalse
+      (%==) SCV SCS = SFalse
+      (%==) SCV SCT = SFalse
+      (%==) SCV SCU = SFalse
+      (%==) SCV SCV = STrue
+      (%==) SCV SCW = SFalse
+      (%==) SCV SCX = SFalse
+      (%==) SCV SCY = SFalse
+      (%==) SCV SCZ = SFalse
+      (%==) SCW SCA = SFalse
+      (%==) SCW SCB = SFalse
+      (%==) SCW SCC = SFalse
+      (%==) SCW SCD = SFalse
+      (%==) SCW SCE = SFalse
+      (%==) SCW SCF = SFalse
+      (%==) SCW SCG = SFalse
+      (%==) SCW SCH = SFalse
+      (%==) SCW SCI = SFalse
+      (%==) SCW SCJ = SFalse
+      (%==) SCW SCK = SFalse
+      (%==) SCW SCL = SFalse
+      (%==) SCW SCM = SFalse
+      (%==) SCW SCN = SFalse
+      (%==) SCW SCO = SFalse
+      (%==) SCW SCP = SFalse
+      (%==) SCW SCQ = SFalse
+      (%==) SCW SCR = SFalse
+      (%==) SCW SCS = SFalse
+      (%==) SCW SCT = SFalse
+      (%==) SCW SCU = SFalse
+      (%==) SCW SCV = SFalse
+      (%==) SCW SCW = STrue
+      (%==) SCW SCX = SFalse
+      (%==) SCW SCY = SFalse
+      (%==) SCW SCZ = SFalse
+      (%==) SCX SCA = SFalse
+      (%==) SCX SCB = SFalse
+      (%==) SCX SCC = SFalse
+      (%==) SCX SCD = SFalse
+      (%==) SCX SCE = SFalse
+      (%==) SCX SCF = SFalse
+      (%==) SCX SCG = SFalse
+      (%==) SCX SCH = SFalse
+      (%==) SCX SCI = SFalse
+      (%==) SCX SCJ = SFalse
+      (%==) SCX SCK = SFalse
+      (%==) SCX SCL = SFalse
+      (%==) SCX SCM = SFalse
+      (%==) SCX SCN = SFalse
+      (%==) SCX SCO = SFalse
+      (%==) SCX SCP = SFalse
+      (%==) SCX SCQ = SFalse
+      (%==) SCX SCR = SFalse
+      (%==) SCX SCS = SFalse
+      (%==) SCX SCT = SFalse
+      (%==) SCX SCU = SFalse
+      (%==) SCX SCV = SFalse
+      (%==) SCX SCW = SFalse
+      (%==) SCX SCX = STrue
+      (%==) SCX SCY = SFalse
+      (%==) SCX SCZ = SFalse
+      (%==) SCY SCA = SFalse
+      (%==) SCY SCB = SFalse
+      (%==) SCY SCC = SFalse
+      (%==) SCY SCD = SFalse
+      (%==) SCY SCE = SFalse
+      (%==) SCY SCF = SFalse
+      (%==) SCY SCG = SFalse
+      (%==) SCY SCH = SFalse
+      (%==) SCY SCI = SFalse
+      (%==) SCY SCJ = SFalse
+      (%==) SCY SCK = SFalse
+      (%==) SCY SCL = SFalse
+      (%==) SCY SCM = SFalse
+      (%==) SCY SCN = SFalse
+      (%==) SCY SCO = SFalse
+      (%==) SCY SCP = SFalse
+      (%==) SCY SCQ = SFalse
+      (%==) SCY SCR = SFalse
+      (%==) SCY SCS = SFalse
+      (%==) SCY SCT = SFalse
+      (%==) SCY SCU = SFalse
+      (%==) SCY SCV = SFalse
+      (%==) SCY SCW = SFalse
+      (%==) SCY SCX = SFalse
+      (%==) SCY SCY = STrue
+      (%==) SCY SCZ = SFalse
+      (%==) SCZ SCA = SFalse
+      (%==) SCZ SCB = SFalse
+      (%==) SCZ SCC = SFalse
+      (%==) SCZ SCD = SFalse
+      (%==) SCZ SCE = SFalse
+      (%==) SCZ SCF = SFalse
+      (%==) SCZ SCG = SFalse
+      (%==) SCZ SCH = SFalse
+      (%==) SCZ SCI = SFalse
+      (%==) SCZ SCJ = SFalse
+      (%==) SCZ SCK = SFalse
+      (%==) SCZ SCL = SFalse
+      (%==) SCZ SCM = SFalse
+      (%==) SCZ SCN = SFalse
+      (%==) SCZ SCO = SFalse
+      (%==) SCZ SCP = SFalse
+      (%==) SCZ SCQ = SFalse
+      (%==) SCZ SCR = SFalse
+      (%==) SCZ SCS = SFalse
+      (%==) SCZ SCT = SFalse
+      (%==) SCZ SCU = SFalse
+      (%==) SCZ SCV = SFalse
+      (%==) SCZ SCW = SFalse
+      (%==) SCZ SCX = SFalse
+      (%==) SCZ SCY = SFalse
+      (%==) SCZ SCZ = STrue
+    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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) 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)
+      (%~) SCZ SCZ = Proved Refl
+    instance Data.Type.Equality.TestEquality (SAChar :: AChar
+                                                        -> Type) where
+      Data.Type.Equality.testEquality
+        = Data.Singletons.Decide.decideEquality
+    instance Data.Type.Coercion.TestCoercion (SAChar :: AChar
+                                                        -> Type) where
+      Data.Type.Coercion.testCoercion
+        = Data.Singletons.Decide.decideCoercion
+    instance (Data.Singletons.ShowSing.ShowSing U,
+              Data.Singletons.ShowSing.ShowSing Nat) =>
+             Show (SU (z :: U)) where
+      showsPrec _ SBOOL = showString "SBOOL"
+      showsPrec _ SSTRING = showString "SSTRING"
+      showsPrec _ SNAT = showString "SNAT"
+      showsPrec
+        p_0123456789876543210
+        (SVEC (arg_0123456789876543210 :: Sing argTy_0123456789876543210)
+              (arg_0123456789876543210 :: Sing argTy_0123456789876543210))
+        = (showParen (((>) p_0123456789876543210) 10))
+            (((.) (showString "SVEC "))
+               (((.) ((showsPrec 11) arg_0123456789876543210))
+                  (((.) GHC.Show.showSpace)
+                     ((showsPrec 11) arg_0123456789876543210)))) ::
+            (Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210,
+             Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210) =>
+            ShowS
+    instance Show (SAChar (z :: AChar)) where
+      showsPrec _ SCA = showString "SCA"
+      showsPrec _ SCB = showString "SCB"
+      showsPrec _ SCC = showString "SCC"
+      showsPrec _ SCD = showString "SCD"
+      showsPrec _ SCE = showString "SCE"
+      showsPrec _ SCF = showString "SCF"
+      showsPrec _ SCG = showString "SCG"
+      showsPrec _ SCH = showString "SCH"
+      showsPrec _ SCI = showString "SCI"
+      showsPrec _ SCJ = showString "SCJ"
+      showsPrec _ SCK = showString "SCK"
+      showsPrec _ SCL = showString "SCL"
+      showsPrec _ SCM = showString "SCM"
+      showsPrec _ SCN = showString "SCN"
+      showsPrec _ SCO = showString "SCO"
+      showsPrec _ SCP = showString "SCP"
+      showsPrec _ SCQ = showString "SCQ"
+      showsPrec _ SCR = showString "SCR"
+      showsPrec _ SCS = showString "SCS"
+      showsPrec _ SCT = showString "SCT"
+      showsPrec _ SCU = showString "SCU"
+      showsPrec _ SCV = showString "SCV"
+      showsPrec _ SCW = showString "SCW"
+      showsPrec _ SCX = showString "SCX"
+      showsPrec _ SCY = showString "SCY"
+      showsPrec _ SCZ = showString "SCZ"
+    instance SingI BOOL where
+      sing = SBOOL
+    instance SingI STRING where
+      sing = SSTRING
+    instance SingI NAT where
+      sing = SNAT
+    instance (SingI n, SingI n) =>
+             SingI (VEC (n :: U) (n :: Nat)) where
+      sing = (SVEC sing) sing
+    instance SingI (VECSym0 :: (~>) U ((~>) Nat U)) where
+      sing = (singFun2 @VECSym0) SVEC
+    instance SingI d => SingI (VECSym1 (d :: U) :: (~>) Nat U) where
+      sing = (singFun1 @(VECSym1 (d :: U))) (SVEC (sing @d))
+    instance SingI CA where
+      sing = SCA
+    instance SingI CB where
+      sing = SCB
+    instance SingI CC where
+      sing = SCC
+    instance SingI CD where
+      sing = SCD
+    instance SingI CE where
+      sing = SCE
+    instance SingI CF where
+      sing = SCF
+    instance SingI CG where
+      sing = SCG
+    instance SingI CH where
+      sing = SCH
+    instance SingI CI where
+      sing = SCI
+    instance SingI CJ where
+      sing = SCJ
+    instance SingI CK where
+      sing = SCK
+    instance SingI CL where
+      sing = SCL
+    instance SingI CM where
+      sing = SCM
+    instance SingI CN where
+      sing = SCN
+    instance SingI CO where
+      sing = SCO
+    instance SingI CP where
+      sing = SCP
+    instance SingI CQ where
+      sing = SCQ
+    instance SingI CR where
+      sing = SCR
+    instance SingI CS where
+      sing = SCS
+    instance SingI CT where
+      sing = SCT
+    instance SingI CU where
+      sing = SCU
+    instance SingI CV where
+      sing = SCV
+    instance SingI CW where
+      sing = SCW
+    instance SingI CX where
+      sing = SCX
+    instance SingI CY where
+      sing = SCY
+    instance SingI CZ where
+      sing = SCZ
+    instance (SingI n, SingI n) =>
+             SingI (Attr (n :: [AChar]) (n :: U)) where
+      sing = (SAttr sing) sing
+    instance SingI (AttrSym0 :: (~>) [AChar] ((~>) U Attribute)) where
+      sing = (singFun2 @AttrSym0) SAttr
+    instance SingI d =>
+             SingI (AttrSym1 (d :: [AChar]) :: (~>) U Attribute) where
+      sing = (singFun1 @(AttrSym1 (d :: [AChar]))) (SAttr (sing @d))
+    instance SingI n => SingI (Sch (n :: [Attribute])) where
+      sing = SSch sing
+    instance SingI (SchSym0 :: (~>) [Attribute] Schema) where
+      sing = (singFun1 @SchSym0) SSch
+GradingClient/Database.hs:0:0:: Splicing declarations
+    return [] ======>
+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
diff --git a/tests/compile-and-dump/GradingClient/Main.ghc86.template b/tests/compile-and-dump/GradingClient/Main.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/GradingClient/Main.ghc86.template
+++ /dev/null
@@ -1,123 +0,0 @@
-GradingClient/Main.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| lastName, firstName, yearName, gradeName, majorName :: [AChar]
-          lastName = [CL, CA, CS, CT]
-          firstName = [CF, CI, CR, CS, CT]
-          yearName = [CY, CE, CA, CR]
-          gradeName = [CG, CR, CA, CD, CE]
-          majorName = [CM, CA, CJ, CO, CR]
-          gradingSchema :: Schema
-          gradingSchema
-            = Sch
-                [Attr lastName STRING, Attr firstName STRING, Attr yearName NAT,
-                 Attr gradeName NAT, Attr majorName BOOL]
-          names :: Schema
-          names = Sch [Attr firstName STRING, Attr lastName STRING] |]
-  ======>
-    lastName :: [AChar]
-    firstName :: [AChar]
-    yearName :: [AChar]
-    gradeName :: [AChar]
-    majorName :: [AChar]
-    lastName = [CL, CA, CS, CT]
-    firstName = [CF, CI, CR, CS, CT]
-    yearName = [CY, CE, CA, CR]
-    gradeName = [CG, CR, CA, CD, CE]
-    majorName = [CM, CA, CJ, CO, CR]
-    gradingSchema :: Schema
-    gradingSchema
-      = Sch
-          [(Attr lastName) STRING, (Attr firstName) STRING,
-           (Attr yearName) NAT, (Attr gradeName) NAT, (Attr majorName) BOOL]
-    names :: Schema
-    names = Sch [(Attr firstName) STRING, (Attr lastName) STRING]
-    type MajorNameSym0 = MajorName
-    type GradeNameSym0 = GradeName
-    type YearNameSym0 = YearName
-    type FirstNameSym0 = FirstName
-    type LastNameSym0 = LastName
-    type GradingSchemaSym0 = GradingSchema
-    type NamesSym0 = Names
-    type family MajorName :: [AChar] where
-      MajorName = Apply (Apply (:@#@$) CMSym0) (Apply (Apply (:@#@$) CASym0) (Apply (Apply (:@#@$) CJSym0) (Apply (Apply (:@#@$) COSym0) (Apply (Apply (:@#@$) CRSym0) '[]))))
-    type family GradeName :: [AChar] where
-      GradeName = Apply (Apply (:@#@$) CGSym0) (Apply (Apply (:@#@$) CRSym0) (Apply (Apply (:@#@$) CASym0) (Apply (Apply (:@#@$) CDSym0) (Apply (Apply (:@#@$) CESym0) '[]))))
-    type family YearName :: [AChar] where
-      YearName = Apply (Apply (:@#@$) CYSym0) (Apply (Apply (:@#@$) CESym0) (Apply (Apply (:@#@$) CASym0) (Apply (Apply (:@#@$) CRSym0) '[])))
-    type family FirstName :: [AChar] where
-      FirstName = Apply (Apply (:@#@$) CFSym0) (Apply (Apply (:@#@$) CISym0) (Apply (Apply (:@#@$) CRSym0) (Apply (Apply (:@#@$) CSSym0) (Apply (Apply (:@#@$) CTSym0) '[]))))
-    type family LastName :: [AChar] where
-      LastName = Apply (Apply (:@#@$) CLSym0) (Apply (Apply (:@#@$) CASym0) (Apply (Apply (:@#@$) CSSym0) (Apply (Apply (:@#@$) CTSym0) '[])))
-    type family GradingSchema :: Schema where
-      GradingSchema = Apply SchSym0 (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 LastNameSym0) STRINGSym0)) (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 FirstNameSym0) STRINGSym0)) (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 YearNameSym0) NATSym0)) (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 GradeNameSym0) NATSym0)) (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 MajorNameSym0) BOOLSym0)) '[])))))
-    type family Names :: Schema where
-      Names = Apply SchSym0 (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 FirstNameSym0) STRINGSym0)) (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 LastNameSym0) STRINGSym0)) '[]))
-    sMajorName :: Sing (MajorNameSym0 :: [AChar])
-    sGradeName :: Sing (GradeNameSym0 :: [AChar])
-    sYearName :: Sing (YearNameSym0 :: [AChar])
-    sFirstName :: Sing (FirstNameSym0 :: [AChar])
-    sLastName :: Sing (LastNameSym0 :: [AChar])
-    sGradingSchema :: Sing (GradingSchemaSym0 :: Schema)
-    sNames :: Sing (NamesSym0 :: Schema)
-    sMajorName
-      = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCM))
-          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCA))
-             ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCJ))
-                ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCO))
-                   ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCR)) SNil))))
-    sGradeName
-      = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCG))
-          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCR))
-             ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCA))
-                ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCD))
-                   ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCE)) SNil))))
-    sYearName
-      = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCY))
-          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCE))
-             ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCA))
-                ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCR)) SNil)))
-    sFirstName
-      = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCF))
-          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCI))
-             ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCR))
-                ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCS))
-                   ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCT)) SNil))))
-    sLastName
-      = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCL))
-          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCA))
-             ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCS))
-                ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCT)) SNil)))
-    sGradingSchema
-      = (applySing ((singFun1 @SchSym0) SSch))
-          ((applySing
-              ((applySing ((singFun2 @(:@#@$)) SCons))
-                 ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sLastName))
-                    SSTRING)))
-             ((applySing
-                 ((applySing ((singFun2 @(:@#@$)) SCons))
-                    ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sFirstName))
-                       SSTRING)))
-                ((applySing
-                    ((applySing ((singFun2 @(:@#@$)) SCons))
-                       ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sYearName))
-                          SNAT)))
-                   ((applySing
-                       ((applySing ((singFun2 @(:@#@$)) SCons))
-                          ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sGradeName))
-                             SNAT)))
-                      ((applySing
-                          ((applySing ((singFun2 @(:@#@$)) SCons))
-                             ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sMajorName))
-                                SBOOL)))
-                         SNil)))))
-    sNames
-      = (applySing ((singFun1 @SchSym0) SSch))
-          ((applySing
-              ((applySing ((singFun2 @(:@#@$)) SCons))
-                 ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sFirstName))
-                    SSTRING)))
-             ((applySing
-                 ((applySing ((singFun2 @(:@#@$)) SCons))
-                    ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sLastName))
-                       SSTRING)))
-                SNil))
diff --git a/tests/compile-and-dump/GradingClient/Main.ghc88.template b/tests/compile-and-dump/GradingClient/Main.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/GradingClient/Main.ghc88.template
@@ -0,0 +1,123 @@
+GradingClient/Main.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| lastName, firstName, yearName, gradeName, majorName :: [AChar]
+          lastName = [CL, CA, CS, CT]
+          firstName = [CF, CI, CR, CS, CT]
+          yearName = [CY, CE, CA, CR]
+          gradeName = [CG, CR, CA, CD, CE]
+          majorName = [CM, CA, CJ, CO, CR]
+          gradingSchema :: Schema
+          gradingSchema
+            = Sch
+                [Attr lastName STRING, Attr firstName STRING, Attr yearName NAT,
+                 Attr gradeName NAT, Attr majorName BOOL]
+          names :: Schema
+          names = Sch [Attr firstName STRING, Attr lastName STRING] |]
+  ======>
+    lastName :: [AChar]
+    firstName :: [AChar]
+    yearName :: [AChar]
+    gradeName :: [AChar]
+    majorName :: [AChar]
+    lastName = [CL, CA, CS, CT]
+    firstName = [CF, CI, CR, CS, CT]
+    yearName = [CY, CE, CA, CR]
+    gradeName = [CG, CR, CA, CD, CE]
+    majorName = [CM, CA, CJ, CO, CR]
+    gradingSchema :: Schema
+    gradingSchema
+      = Sch
+          [(Attr lastName) STRING, (Attr firstName) STRING,
+           (Attr yearName) NAT, (Attr gradeName) NAT, (Attr majorName) BOOL]
+    names :: Schema
+    names = Sch [(Attr firstName) STRING, (Attr lastName) STRING]
+    type NamesSym0 = Names
+    type GradingSchemaSym0 = GradingSchema
+    type MajorNameSym0 = MajorName
+    type GradeNameSym0 = GradeName
+    type YearNameSym0 = YearName
+    type FirstNameSym0 = FirstName
+    type LastNameSym0 = LastName
+    type family Names :: Schema where
+      Names = Apply SchSym0 (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 FirstNameSym0) STRINGSym0)) (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 LastNameSym0) STRINGSym0)) '[]))
+    type family GradingSchema :: Schema where
+      GradingSchema = Apply SchSym0 (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 LastNameSym0) STRINGSym0)) (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 FirstNameSym0) STRINGSym0)) (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 YearNameSym0) NATSym0)) (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 GradeNameSym0) NATSym0)) (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 MajorNameSym0) BOOLSym0)) '[])))))
+    type family MajorName :: [AChar] where
+      MajorName = Apply (Apply (:@#@$) CMSym0) (Apply (Apply (:@#@$) CASym0) (Apply (Apply (:@#@$) CJSym0) (Apply (Apply (:@#@$) COSym0) (Apply (Apply (:@#@$) CRSym0) '[]))))
+    type family GradeName :: [AChar] where
+      GradeName = Apply (Apply (:@#@$) CGSym0) (Apply (Apply (:@#@$) CRSym0) (Apply (Apply (:@#@$) CASym0) (Apply (Apply (:@#@$) CDSym0) (Apply (Apply (:@#@$) CESym0) '[]))))
+    type family YearName :: [AChar] where
+      YearName = Apply (Apply (:@#@$) CYSym0) (Apply (Apply (:@#@$) CESym0) (Apply (Apply (:@#@$) CASym0) (Apply (Apply (:@#@$) CRSym0) '[])))
+    type family FirstName :: [AChar] where
+      FirstName = Apply (Apply (:@#@$) CFSym0) (Apply (Apply (:@#@$) CISym0) (Apply (Apply (:@#@$) CRSym0) (Apply (Apply (:@#@$) CSSym0) (Apply (Apply (:@#@$) CTSym0) '[]))))
+    type family LastName :: [AChar] where
+      LastName = Apply (Apply (:@#@$) CLSym0) (Apply (Apply (:@#@$) CASym0) (Apply (Apply (:@#@$) CSSym0) (Apply (Apply (:@#@$) CTSym0) '[])))
+    sNames :: Sing (NamesSym0 :: Schema)
+    sGradingSchema :: Sing (GradingSchemaSym0 :: Schema)
+    sMajorName :: Sing (MajorNameSym0 :: [AChar])
+    sGradeName :: Sing (GradeNameSym0 :: [AChar])
+    sYearName :: Sing (YearNameSym0 :: [AChar])
+    sFirstName :: Sing (FirstNameSym0 :: [AChar])
+    sLastName :: Sing (LastNameSym0 :: [AChar])
+    sNames
+      = (applySing ((singFun1 @SchSym0) SSch))
+          ((applySing
+              ((applySing ((singFun2 @(:@#@$)) SCons))
+                 ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sFirstName))
+                    SSTRING)))
+             ((applySing
+                 ((applySing ((singFun2 @(:@#@$)) SCons))
+                    ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sLastName))
+                       SSTRING)))
+                SNil))
+    sGradingSchema
+      = (applySing ((singFun1 @SchSym0) SSch))
+          ((applySing
+              ((applySing ((singFun2 @(:@#@$)) SCons))
+                 ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sLastName))
+                    SSTRING)))
+             ((applySing
+                 ((applySing ((singFun2 @(:@#@$)) SCons))
+                    ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sFirstName))
+                       SSTRING)))
+                ((applySing
+                    ((applySing ((singFun2 @(:@#@$)) SCons))
+                       ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sYearName))
+                          SNAT)))
+                   ((applySing
+                       ((applySing ((singFun2 @(:@#@$)) SCons))
+                          ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sGradeName))
+                             SNAT)))
+                      ((applySing
+                          ((applySing ((singFun2 @(:@#@$)) SCons))
+                             ((applySing ((applySing ((singFun2 @AttrSym0) SAttr)) sMajorName))
+                                SBOOL)))
+                         SNil)))))
+    sMajorName
+      = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCM))
+          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCA))
+             ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCJ))
+                ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCO))
+                   ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCR)) SNil))))
+    sGradeName
+      = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCG))
+          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCR))
+             ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCA))
+                ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCD))
+                   ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCE)) SNil))))
+    sYearName
+      = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCY))
+          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCE))
+             ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCA))
+                ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCR)) SNil)))
+    sFirstName
+      = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCF))
+          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCI))
+             ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCR))
+                ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCS))
+                   ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCT)) SNil))))
+    sLastName
+      = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCL))
+          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCA))
+             ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCS))
+                ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SCT)) SNil)))
diff --git a/tests/compile-and-dump/InsertionSort/InsertionSortImp.ghc86.template b/tests/compile-and-dump/InsertionSort/InsertionSortImp.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/InsertionSort/InsertionSortImp.ghc86.template
+++ /dev/null
@@ -1,212 +0,0 @@
-InsertionSort/InsertionSortImp.hs:(0,0)-(0,0): Splicing declarations
-    singletons [d| data Nat = Zero | Succ Nat |]
-  ======>
-    data Nat = Zero | Succ Nat
-    type ZeroSym0 = Zero
-    type SuccSym1 (t0123456789876543210 :: Nat) =
-        Succ t0123456789876543210
-    instance SuppressUnusedWarnings SuccSym0 where
-      suppressUnusedWarnings = snd (((,) SuccSym0KindInference) ())
-    data SuccSym0 :: (~>) Nat Nat
-      where
-        SuccSym0KindInference :: forall t0123456789876543210
-                                        arg. SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>
-                                 SuccSym0 t0123456789876543210
-    type instance Apply SuccSym0 t0123456789876543210 = Succ t0123456789876543210
-    data instance Sing :: Nat -> Type
-      where
-        SZero :: Sing Zero
-        SSucc :: forall (n :: Nat). (Sing (n :: Nat)) -> Sing (Succ n)
-    type SNat = (Sing :: Nat -> Type)
-    instance SingKind Nat where
-      type Demote Nat = Nat
-      fromSing SZero = Zero
-      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) }
-    instance SingI Zero where
-      sing = SZero
-    instance SingI n => SingI (Succ (n :: Nat)) where
-      sing = SSucc sing
-    instance SingI (SuccSym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @SuccSym0) SSucc
-    instance SingI (TyCon1 Succ :: (~>) Nat Nat) where
-      sing = (singFun1 @(TyCon1 Succ)) SSucc
-InsertionSort/InsertionSortImp.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| leq :: Nat -> Nat -> Bool
-          leq Zero _ = True
-          leq (Succ _) Zero = False
-          leq (Succ a) (Succ b) = leq a b
-          insert :: Nat -> [Nat] -> [Nat]
-          insert n [] = [n]
-          insert n (h : t)
-            = if leq n h then (n : h : t) else h : (insert n t)
-          insertionSort :: [Nat] -> [Nat]
-          insertionSort [] = []
-          insertionSort (h : t) = insert h (insertionSort t) |]
-  ======>
-    leq :: Nat -> Nat -> Bool
-    leq Zero _ = True
-    leq (Succ _) Zero = False
-    leq (Succ a) (Succ b) = (leq a) b
-    insert :: Nat -> [Nat] -> [Nat]
-    insert n [] = [n]
-    insert n (h : t)
-      = if (leq n) h then (n : (h : t)) else (h : (insert n) t)
-    insertionSort :: [Nat] -> [Nat]
-    insertionSort [] = []
-    insertionSort (h : t) = (insert h) (insertionSort t)
-    type Let0123456789876543210Scrutinee_0123456789876543210Sym3 n0123456789876543210 h0123456789876543210 t0123456789876543210 =
-        Let0123456789876543210Scrutinee_0123456789876543210 n0123456789876543210 h0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym2 h0123456789876543210 n0123456789876543210) where
-      suppressUnusedWarnings
-        = snd
-            (((,)
-                Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference)
-               ())
-    data Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 h0123456789876543210 t0123456789876543210
-      where
-        Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference :: forall n0123456789876543210
-                                                                                       h0123456789876543210
-                                                                                       t0123456789876543210
-                                                                                       arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 h0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym3 n0123456789876543210 h0123456789876543210 arg) =>
-                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 h0123456789876543210 t0123456789876543210
-    type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym2 h0123456789876543210 n0123456789876543210) t0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 h0123456789876543210 n0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210) where
-      suppressUnusedWarnings
-        = snd
-            (((,)
-                Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference)
-               ())
-    data Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210 h0123456789876543210
-      where
-        Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference :: forall n0123456789876543210
-                                                                                       h0123456789876543210
-                                                                                       arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 arg) =>
-                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210 h0123456789876543210
-    type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210) h0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 h0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd
-            (((,)
-                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
-               ())
-    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 n0123456789876543210
-      where
-        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall n0123456789876543210
-                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
-                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 n0123456789876543210
-    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 n0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210
-    type family Let0123456789876543210Scrutinee_0123456789876543210 n h t where
-      Let0123456789876543210Scrutinee_0123456789876543210 n h t = Apply (Apply LeqSym0 n) h
-    type family Case_0123456789876543210 n h t 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 LeqSym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
-        Leq a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (LeqSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) LeqSym1KindInference) ())
-    data LeqSym1 (a0123456789876543210 :: Nat) :: (~>) Nat Bool
-      where
-        LeqSym1KindInference :: forall a0123456789876543210
-                                       a0123456789876543210
-                                       arg. SameKind (Apply (LeqSym1 a0123456789876543210) arg) (LeqSym2 a0123456789876543210 arg) =>
-                                LeqSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (LeqSym1 a0123456789876543210) a0123456789876543210 = Leq a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings LeqSym0 where
-      suppressUnusedWarnings = snd (((,) LeqSym0KindInference) ())
-    data LeqSym0 :: (~>) Nat ((~>) Nat Bool)
-      where
-        LeqSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply LeqSym0 arg) (LeqSym1 arg) =>
-                                LeqSym0 a0123456789876543210
-    type instance Apply LeqSym0 a0123456789876543210 = LeqSym1 a0123456789876543210
-    type InsertSym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: [Nat]) =
-        Insert a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (InsertSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) InsertSym1KindInference) ())
-    data InsertSym1 (a0123456789876543210 :: Nat) :: (~>) [Nat] [Nat]
-      where
-        InsertSym1KindInference :: forall a0123456789876543210
-                                          a0123456789876543210
-                                          arg. SameKind (Apply (InsertSym1 a0123456789876543210) arg) (InsertSym2 a0123456789876543210 arg) =>
-                                   InsertSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (InsertSym1 a0123456789876543210) a0123456789876543210 = Insert a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings InsertSym0 where
-      suppressUnusedWarnings = snd (((,) InsertSym0KindInference) ())
-    data InsertSym0 :: (~>) Nat ((~>) [Nat] [Nat])
-      where
-        InsertSym0KindInference :: forall a0123456789876543210
-                                          arg. SameKind (Apply InsertSym0 arg) (InsertSym1 arg) =>
-                                   InsertSym0 a0123456789876543210
-    type instance Apply InsertSym0 a0123456789876543210 = InsertSym1 a0123456789876543210
-    type InsertionSortSym1 (a0123456789876543210 :: [Nat]) =
-        InsertionSort a0123456789876543210
-    instance SuppressUnusedWarnings InsertionSortSym0 where
-      suppressUnusedWarnings
-        = snd (((,) InsertionSortSym0KindInference) ())
-    data InsertionSortSym0 :: (~>) [Nat] [Nat]
-      where
-        InsertionSortSym0KindInference :: forall a0123456789876543210
-                                                 arg. SameKind (Apply InsertionSortSym0 arg) (InsertionSortSym1 arg) =>
-                                          InsertionSortSym0 a0123456789876543210
-    type instance Apply InsertionSortSym0 a0123456789876543210 = InsertionSort a0123456789876543210
-    type family Leq (a :: Nat) (a :: Nat) :: Bool where
-      Leq  'Zero _ = TrueSym0
-      Leq ( 'Succ _)  'Zero = FalseSym0
-      Leq ( 'Succ a) ( 'Succ b) = Apply (Apply LeqSym0 a) b
-    type family Insert (a :: Nat) (a :: [Nat]) :: [Nat] where
-      Insert n '[] = Apply (Apply (:@#@$) n) '[]
-      Insert n ( '(:) h t) = Case_0123456789876543210 n h t (Let0123456789876543210Scrutinee_0123456789876543210Sym3 n h t)
-    type family InsertionSort (a :: [Nat]) :: [Nat] where
-      InsertionSort '[] = '[]
-      InsertionSort ( '(:) h t) = Apply (Apply InsertSym0 h) (Apply InsertionSortSym0 t)
-    sLeq ::
-      forall (t :: Nat) (t :: Nat).
-      Sing t -> Sing t -> Sing (Apply (Apply LeqSym0 t) t :: Bool)
-    sInsert ::
-      forall (t :: Nat) (t :: [Nat]).
-      Sing t -> Sing t -> Sing (Apply (Apply InsertSym0 t) t :: [Nat])
-    sInsertionSort ::
-      forall (t :: [Nat]).
-      Sing t -> Sing (Apply InsertionSortSym0 t :: [Nat])
-    sLeq SZero _ = STrue
-    sLeq (SSucc _) SZero = SFalse
-    sLeq (SSucc (sA :: Sing a)) (SSucc (sB :: Sing b))
-      = (applySing ((applySing ((singFun2 @LeqSym0) sLeq)) sA)) sB
-    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_0123456789876543210Sym3 n h t)
-          sScrutinee_0123456789876543210
-            = (applySing ((applySing ((singFun2 @LeqSym0) sLeq)) sN)) sH
-        in  (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)) ::
-              Sing (Case_0123456789876543210 n h t (Let0123456789876543210Scrutinee_0123456789876543210Sym3 n h t) :: [Nat])
-    sInsertionSort SNil = SNil
-    sInsertionSort (SCons (sH :: Sing h) (sT :: Sing t))
-      = (applySing ((applySing ((singFun2 @InsertSym0) sInsert)) sH))
-          ((applySing ((singFun1 @InsertionSortSym0) sInsertionSort)) sT)
-    instance SingI (LeqSym0 :: (~>) Nat ((~>) Nat Bool)) where
-      sing = (singFun2 @LeqSym0) sLeq
-    instance SingI d =>
-             SingI (LeqSym1 (d :: Nat) :: (~>) Nat Bool) where
-      sing = (singFun1 @(LeqSym1 (d :: Nat))) (sLeq (sing @d))
-    instance SingI (InsertSym0 :: (~>) Nat ((~>) [Nat] [Nat])) where
-      sing = (singFun2 @InsertSym0) sInsert
-    instance SingI d =>
-             SingI (InsertSym1 (d :: Nat) :: (~>) [Nat] [Nat]) where
-      sing = (singFun1 @(InsertSym1 (d :: Nat))) (sInsert (sing @d))
-    instance SingI (InsertionSortSym0 :: (~>) [Nat] [Nat]) where
-      sing = (singFun1 @InsertionSortSym0) sInsertionSort
diff --git a/tests/compile-and-dump/InsertionSort/InsertionSortImp.ghc88.template b/tests/compile-and-dump/InsertionSort/InsertionSortImp.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/InsertionSort/InsertionSortImp.ghc88.template
@@ -0,0 +1,211 @@
+InsertionSort/InsertionSortImp.hs:(0,0)-(0,0): Splicing declarations
+    singletons [d| data Nat = Zero | Succ Nat |]
+  ======>
+    data Nat = Zero | Succ Nat
+    type ZeroSym0 = Zero
+    type SuccSym1 (t0123456789876543210 :: Nat) =
+        Succ t0123456789876543210
+    instance SuppressUnusedWarnings SuccSym0 where
+      suppressUnusedWarnings = snd (((,) SuccSym0KindInference) ())
+    data SuccSym0 :: (~>) Nat Nat
+      where
+        SuccSym0KindInference :: forall t0123456789876543210
+                                        arg. SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>
+                                 SuccSym0 t0123456789876543210
+    type instance Apply SuccSym0 t0123456789876543210 = Succ t0123456789876543210
+    data SNat :: Nat -> Type
+      where
+        SZero :: SNat Zero
+        SSucc :: forall (n :: Nat). (Sing (n :: Nat)) -> SNat (Succ n)
+    type instance Sing @Nat = SNat
+    instance SingKind Nat where
+      type Demote Nat = Nat
+      fromSing SZero = Zero
+      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) }
+    instance SingI Zero where
+      sing = SZero
+    instance SingI n => SingI (Succ (n :: Nat)) where
+      sing = SSucc sing
+    instance SingI (SuccSym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @SuccSym0) SSucc
+InsertionSort/InsertionSortImp.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| leq :: Nat -> Nat -> Bool
+          leq Zero _ = True
+          leq (Succ _) Zero = False
+          leq (Succ a) (Succ b) = leq a b
+          insert :: Nat -> [Nat] -> [Nat]
+          insert n [] = [n]
+          insert n (h : t)
+            = if leq n h then (n : h : t) else h : (insert n t)
+          insertionSort :: [Nat] -> [Nat]
+          insertionSort [] = []
+          insertionSort (h : t) = insert h (insertionSort t) |]
+  ======>
+    leq :: Nat -> Nat -> Bool
+    leq Zero _ = True
+    leq (Succ _) Zero = False
+    leq (Succ a) (Succ b) = (leq a) b
+    insert :: Nat -> [Nat] -> [Nat]
+    insert n [] = [n]
+    insert n (h : t)
+      = if (leq n) h then (n : (h : t)) else (h : (insert n) t)
+    insertionSort :: [Nat] -> [Nat]
+    insertionSort [] = []
+    insertionSort (h : t) = (insert h) (insertionSort t)
+    type Let0123456789876543210Scrutinee_0123456789876543210Sym3 n0123456789876543210 h0123456789876543210 t0123456789876543210 =
+        Let0123456789876543210Scrutinee_0123456789876543210 n0123456789876543210 h0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym2 h0123456789876543210 n0123456789876543210) where
+      suppressUnusedWarnings
+        = snd
+            (((,)
+                Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference)
+               ())
+    data Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 h0123456789876543210 t0123456789876543210
+      where
+        Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference :: forall n0123456789876543210
+                                                                                       h0123456789876543210
+                                                                                       t0123456789876543210
+                                                                                       arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 h0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym3 n0123456789876543210 h0123456789876543210 arg) =>
+                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 h0123456789876543210 t0123456789876543210
+    type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym2 h0123456789876543210 n0123456789876543210) t0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 h0123456789876543210 n0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210) where
+      suppressUnusedWarnings
+        = snd
+            (((,)
+                Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference)
+               ())
+    data Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210 h0123456789876543210
+      where
+        Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference :: forall n0123456789876543210
+                                                                                       h0123456789876543210
+                                                                                       arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 arg) =>
+                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210 h0123456789876543210
+    type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210) h0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 h0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd
+            (((,)
+                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
+               ())
+    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 n0123456789876543210
+      where
+        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall n0123456789876543210
+                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
+                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 n0123456789876543210
+    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 n0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210
+    type family Let0123456789876543210Scrutinee_0123456789876543210 n h t where
+      Let0123456789876543210Scrutinee_0123456789876543210 n h t = Apply (Apply LeqSym0 n) h
+    type family Case_0123456789876543210 n h t 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 InsertionSortSym1 (a0123456789876543210 :: [Nat]) =
+        InsertionSort a0123456789876543210
+    instance SuppressUnusedWarnings InsertionSortSym0 where
+      suppressUnusedWarnings
+        = snd (((,) InsertionSortSym0KindInference) ())
+    data InsertionSortSym0 :: (~>) [Nat] [Nat]
+      where
+        InsertionSortSym0KindInference :: forall a0123456789876543210
+                                                 arg. SameKind (Apply InsertionSortSym0 arg) (InsertionSortSym1 arg) =>
+                                          InsertionSortSym0 a0123456789876543210
+    type instance Apply InsertionSortSym0 a0123456789876543210 = InsertionSort a0123456789876543210
+    type InsertSym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: [Nat]) =
+        Insert a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (InsertSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) InsertSym1KindInference) ())
+    data InsertSym1 (a0123456789876543210 :: Nat) :: (~>) [Nat] [Nat]
+      where
+        InsertSym1KindInference :: forall a0123456789876543210
+                                          a0123456789876543210
+                                          arg. SameKind (Apply (InsertSym1 a0123456789876543210) arg) (InsertSym2 a0123456789876543210 arg) =>
+                                   InsertSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (InsertSym1 a0123456789876543210) a0123456789876543210 = Insert a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings InsertSym0 where
+      suppressUnusedWarnings = snd (((,) InsertSym0KindInference) ())
+    data InsertSym0 :: (~>) Nat ((~>) [Nat] [Nat])
+      where
+        InsertSym0KindInference :: forall a0123456789876543210
+                                          arg. SameKind (Apply InsertSym0 arg) (InsertSym1 arg) =>
+                                   InsertSym0 a0123456789876543210
+    type instance Apply InsertSym0 a0123456789876543210 = InsertSym1 a0123456789876543210
+    type LeqSym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
+        Leq a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (LeqSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) LeqSym1KindInference) ())
+    data LeqSym1 (a0123456789876543210 :: Nat) :: (~>) Nat Bool
+      where
+        LeqSym1KindInference :: forall a0123456789876543210
+                                       a0123456789876543210
+                                       arg. SameKind (Apply (LeqSym1 a0123456789876543210) arg) (LeqSym2 a0123456789876543210 arg) =>
+                                LeqSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (LeqSym1 a0123456789876543210) a0123456789876543210 = Leq a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings LeqSym0 where
+      suppressUnusedWarnings = snd (((,) LeqSym0KindInference) ())
+    data LeqSym0 :: (~>) Nat ((~>) Nat Bool)
+      where
+        LeqSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply LeqSym0 arg) (LeqSym1 arg) =>
+                                LeqSym0 a0123456789876543210
+    type instance Apply LeqSym0 a0123456789876543210 = LeqSym1 a0123456789876543210
+    type family InsertionSort (a :: [Nat]) :: [Nat] where
+      InsertionSort '[] = '[]
+      InsertionSort ('(:) h t) = Apply (Apply InsertSym0 h) (Apply InsertionSortSym0 t)
+    type family Insert (a :: Nat) (a :: [Nat]) :: [Nat] where
+      Insert n '[] = Apply (Apply (:@#@$) n) '[]
+      Insert n ('(:) h t) = Case_0123456789876543210 n h t (Let0123456789876543210Scrutinee_0123456789876543210Sym3 n h t)
+    type family Leq (a :: Nat) (a :: Nat) :: Bool where
+      Leq 'Zero _ = TrueSym0
+      Leq ('Succ _) 'Zero = FalseSym0
+      Leq ('Succ a) ('Succ b) = Apply (Apply LeqSym0 a) b
+    sInsertionSort ::
+      forall (t :: [Nat]).
+      Sing t -> Sing (Apply InsertionSortSym0 t :: [Nat])
+    sInsert ::
+      forall (t :: Nat) (t :: [Nat]).
+      Sing t -> Sing t -> Sing (Apply (Apply InsertSym0 t) t :: [Nat])
+    sLeq ::
+      forall (t :: Nat) (t :: Nat).
+      Sing t -> Sing t -> Sing (Apply (Apply LeqSym0 t) t :: Bool)
+    sInsertionSort SNil = SNil
+    sInsertionSort (SCons (sH :: Sing h) (sT :: Sing t))
+      = (applySing ((applySing ((singFun2 @InsertSym0) sInsert)) sH))
+          ((applySing ((singFun1 @InsertionSortSym0) sInsertionSort)) sT)
+    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_0123456789876543210Sym3 n h t)
+          sScrutinee_0123456789876543210
+            = (applySing ((applySing ((singFun2 @LeqSym0) sLeq)) sN)) sH
+        in
+          (id
+             @(Sing (Case_0123456789876543210 n h t (Let0123456789876543210Scrutinee_0123456789876543210Sym3 n h t) :: [Nat])))
+            (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))
+    sLeq SZero _ = STrue
+    sLeq (SSucc _) SZero = SFalse
+    sLeq (SSucc (sA :: Sing a)) (SSucc (sB :: Sing b))
+      = (applySing ((applySing ((singFun2 @LeqSym0) sLeq)) sA)) sB
+    instance SingI (InsertionSortSym0 :: (~>) [Nat] [Nat]) where
+      sing = (singFun1 @InsertionSortSym0) sInsertionSort
+    instance SingI (InsertSym0 :: (~>) Nat ((~>) [Nat] [Nat])) where
+      sing = (singFun2 @InsertSym0) sInsert
+    instance SingI d =>
+             SingI (InsertSym1 (d :: Nat) :: (~>) [Nat] [Nat]) where
+      sing = (singFun1 @(InsertSym1 (d :: Nat))) (sInsert (sing @d))
+    instance SingI (LeqSym0 :: (~>) Nat ((~>) Nat Bool)) where
+      sing = (singFun2 @LeqSym0) sLeq
+    instance SingI d =>
+             SingI (LeqSym1 (d :: Nat) :: (~>) Nat Bool) where
+      sing = (singFun1 @(LeqSym1 (d :: Nat))) (sLeq (sing @d))
diff --git a/tests/compile-and-dump/Promote/Constructors.ghc86.template b/tests/compile-and-dump/Promote/Constructors.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Promote/Constructors.ghc86.template
+++ /dev/null
@@ -1,79 +0,0 @@
-Promote/Constructors.hs:(0,0)-(0,0): Splicing declarations
-    promote
-      [d| data Foo = Foo | Foo :+ Foo
-          data Bar = Bar Bar Bar Bar Bar Foo |]
-  ======>
-    data Foo = Foo | Foo :+ Foo
-    data Bar = Bar Bar Bar Bar Bar Foo
-    type FooSym0 = Foo
-    type (:+@#@$$$) (t0123456789876543210 :: Foo) (t0123456789876543210 :: Foo) =
-        (:+) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings ((:+@#@$$) t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (::+@#@$$###)) ())
-    data (:+@#@$$) (t0123456789876543210 :: Foo) :: (~>) Foo Foo
-      where
-        (::+@#@$$###) :: forall t0123456789876543210
-                                t0123456789876543210
-                                arg. SameKind (Apply ((:+@#@$$) t0123456789876543210) arg) ((:+@#@$$$) t0123456789876543210 arg) =>
-                         (:+@#@$$) t0123456789876543210 t0123456789876543210
-    type instance Apply ((:+@#@$$) t0123456789876543210) t0123456789876543210 = (:+) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (:+@#@$) where
-      suppressUnusedWarnings = snd (((,) (::+@#@$###)) ())
-    data (:+@#@$) :: (~>) Foo ((~>) Foo Foo)
-      where
-        (::+@#@$###) :: forall t0123456789876543210
-                               arg. SameKind (Apply (:+@#@$) arg) ((:+@#@$$) arg) =>
-                        (:+@#@$) t0123456789876543210
-    type instance Apply (:+@#@$) t0123456789876543210 = (:+@#@$$) t0123456789876543210
-    type BarSym5 (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Foo) =
-        Bar t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (BarSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) BarSym4KindInference) ())
-    data BarSym4 (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) :: (~>) Foo Bar
-      where
-        BarSym4KindInference :: forall t0123456789876543210
-                                       t0123456789876543210
-                                       t0123456789876543210
-                                       t0123456789876543210
-                                       t0123456789876543210
-                                       arg. SameKind (Apply (BarSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (BarSym5 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
-                                BarSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (BarSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = Bar t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (BarSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) BarSym3KindInference) ())
-    data BarSym3 (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) :: (~>) Bar ((~>) Foo Bar)
-      where
-        BarSym3KindInference :: forall t0123456789876543210
-                                       t0123456789876543210
-                                       t0123456789876543210
-                                       t0123456789876543210
-                                       arg. SameKind (Apply (BarSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (BarSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
-                                BarSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (BarSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = BarSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (BarSym2 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) BarSym2KindInference) ())
-    data BarSym2 (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) :: (~>) Bar ((~>) Bar ((~>) Foo Bar))
-      where
-        BarSym2KindInference :: forall t0123456789876543210
-                                       t0123456789876543210
-                                       t0123456789876543210
-                                       arg. SameKind (Apply (BarSym2 t0123456789876543210 t0123456789876543210) arg) (BarSym3 t0123456789876543210 t0123456789876543210 arg) =>
-                                BarSym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (BarSym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = BarSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (BarSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) BarSym1KindInference) ())
-    data BarSym1 (t0123456789876543210 :: Bar) :: (~>) Bar ((~>) Bar ((~>) Bar ((~>) Foo Bar)))
-      where
-        BarSym1KindInference :: forall t0123456789876543210
-                                       t0123456789876543210
-                                       arg. SameKind (Apply (BarSym1 t0123456789876543210) arg) (BarSym2 t0123456789876543210 arg) =>
-                                BarSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (BarSym1 t0123456789876543210) t0123456789876543210 = BarSym2 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings BarSym0 where
-      suppressUnusedWarnings = snd (((,) BarSym0KindInference) ())
-    data BarSym0 :: (~>) Bar ((~>) Bar ((~>) Bar ((~>) Bar ((~>) Foo Bar))))
-      where
-        BarSym0KindInference :: forall t0123456789876543210
-                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
-                                BarSym0 t0123456789876543210
-    type instance Apply BarSym0 t0123456789876543210 = BarSym1 t0123456789876543210
diff --git a/tests/compile-and-dump/Promote/Constructors.ghc88.template b/tests/compile-and-dump/Promote/Constructors.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Promote/Constructors.ghc88.template
@@ -0,0 +1,79 @@
+Promote/Constructors.hs:(0,0)-(0,0): Splicing declarations
+    promote
+      [d| data Foo = Foo | Foo :+ Foo
+          data Bar = Bar Bar Bar Bar Bar Foo |]
+  ======>
+    data Foo = Foo | Foo :+ Foo
+    data Bar = Bar Bar Bar Bar Bar Foo
+    type FooSym0 = Foo
+    type (:+@#@$$$) (t0123456789876543210 :: Foo) (t0123456789876543210 :: Foo) =
+        (:+) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings ((:+@#@$$) t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (::+@#@$$###)) ())
+    data (:+@#@$$) (t0123456789876543210 :: Foo) :: (~>) Foo Foo
+      where
+        (::+@#@$$###) :: forall t0123456789876543210
+                                t0123456789876543210
+                                arg. SameKind (Apply ((:+@#@$$) t0123456789876543210) arg) ((:+@#@$$$) t0123456789876543210 arg) =>
+                         (:+@#@$$) t0123456789876543210 t0123456789876543210
+    type instance Apply ((:+@#@$$) t0123456789876543210) t0123456789876543210 = (:+) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (:+@#@$) where
+      suppressUnusedWarnings = snd (((,) (::+@#@$###)) ())
+    data (:+@#@$) :: (~>) Foo ((~>) Foo Foo)
+      where
+        (::+@#@$###) :: forall t0123456789876543210
+                               arg. SameKind (Apply (:+@#@$) arg) ((:+@#@$$) arg) =>
+                        (:+@#@$) t0123456789876543210
+    type instance Apply (:+@#@$) t0123456789876543210 = (:+@#@$$) t0123456789876543210
+    type BarSym5 (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Foo) =
+        Bar t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (BarSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) BarSym4KindInference) ())
+    data BarSym4 (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) :: (~>) Foo Bar
+      where
+        BarSym4KindInference :: forall t0123456789876543210
+                                       t0123456789876543210
+                                       t0123456789876543210
+                                       t0123456789876543210
+                                       t0123456789876543210
+                                       arg. SameKind (Apply (BarSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (BarSym5 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
+                                BarSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (BarSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = Bar t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (BarSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) BarSym3KindInference) ())
+    data BarSym3 (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) :: (~>) Bar ((~>) Foo Bar)
+      where
+        BarSym3KindInference :: forall t0123456789876543210
+                                       t0123456789876543210
+                                       t0123456789876543210
+                                       t0123456789876543210
+                                       arg. SameKind (Apply (BarSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (BarSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
+                                BarSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (BarSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = BarSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (BarSym2 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) BarSym2KindInference) ())
+    data BarSym2 (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) :: (~>) Bar ((~>) Bar ((~>) Foo Bar))
+      where
+        BarSym2KindInference :: forall t0123456789876543210
+                                       t0123456789876543210
+                                       t0123456789876543210
+                                       arg. SameKind (Apply (BarSym2 t0123456789876543210 t0123456789876543210) arg) (BarSym3 t0123456789876543210 t0123456789876543210 arg) =>
+                                BarSym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (BarSym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = BarSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (BarSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) BarSym1KindInference) ())
+    data BarSym1 (t0123456789876543210 :: Bar) :: (~>) Bar ((~>) Bar ((~>) Bar ((~>) Foo Bar)))
+      where
+        BarSym1KindInference :: forall t0123456789876543210
+                                       t0123456789876543210
+                                       arg. SameKind (Apply (BarSym1 t0123456789876543210) arg) (BarSym2 t0123456789876543210 arg) =>
+                                BarSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (BarSym1 t0123456789876543210) t0123456789876543210 = BarSym2 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings BarSym0 where
+      suppressUnusedWarnings = snd (((,) BarSym0KindInference) ())
+    data BarSym0 :: (~>) Bar ((~>) Bar ((~>) Bar ((~>) Bar ((~>) Foo Bar))))
+      where
+        BarSym0KindInference :: forall t0123456789876543210
+                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
+                                BarSym0 t0123456789876543210
+    type instance Apply BarSym0 t0123456789876543210 = BarSym1 t0123456789876543210
diff --git a/tests/compile-and-dump/Promote/GenDefunSymbols.ghc86.template b/tests/compile-and-dump/Promote/GenDefunSymbols.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Promote/GenDefunSymbols.ghc86.template
+++ /dev/null
@@ -1,54 +0,0 @@
-Promote/GenDefunSymbols.hs:0:0:: Splicing declarations
-    genDefunSymbols [''LiftMaybe, ''NatT, ''(:+)]
-  ======>
-    type LiftMaybeSym2 (f0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (x0123456789876543210 :: Maybe a0123456789876543210) =
-        LiftMaybe f0123456789876543210 x0123456789876543210
-    instance SuppressUnusedWarnings (LiftMaybeSym1 f0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) LiftMaybeSym1KindInference) ())
-    data LiftMaybeSym1 (f0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) (Maybe a0123456789876543210) (Maybe b0123456789876543210)
-      where
-        LiftMaybeSym1KindInference :: forall f0123456789876543210
-                                             x0123456789876543210
-                                             arg. Data.Singletons.Internal.SameKind (Apply (LiftMaybeSym1 f0123456789876543210) arg) (LiftMaybeSym2 f0123456789876543210 arg) =>
-                                      LiftMaybeSym1 f0123456789876543210 x0123456789876543210
-    type instance Apply (LiftMaybeSym1 f0123456789876543210) x0123456789876543210 = LiftMaybe f0123456789876543210 x0123456789876543210
-    instance SuppressUnusedWarnings LiftMaybeSym0 where
-      suppressUnusedWarnings = snd (((,) LiftMaybeSym0KindInference) ())
-    data LiftMaybeSym0 :: forall a0123456789876543210
-                                 b0123456789876543210.
-                          (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) (Maybe a0123456789876543210) (Maybe b0123456789876543210))
-      where
-        LiftMaybeSym0KindInference :: forall f0123456789876543210
-                                             arg. Data.Singletons.Internal.SameKind (Apply LiftMaybeSym0 arg) (LiftMaybeSym1 arg) =>
-                                      LiftMaybeSym0 f0123456789876543210
-    type instance Apply LiftMaybeSym0 f0123456789876543210 = LiftMaybeSym1 f0123456789876543210
-    type ZeroSym0 =  'Zero
-    type SuccSym1 (t0123456789876543210 :: NatT) =
-         'Succ t0123456789876543210
-    instance SuppressUnusedWarnings SuccSym0 where
-      suppressUnusedWarnings = snd (((,) SuccSym0KindInference) ())
-    data SuccSym0 :: (~>) NatT NatT
-      where
-        SuccSym0KindInference :: forall t0123456789876543210
-                                        arg. Data.Singletons.Internal.SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>
-                                 SuccSym0 t0123456789876543210
-    type instance Apply SuccSym0 t0123456789876543210 =  'Succ t0123456789876543210
-    type (:+@#@$$$) (a0123456789876543210 :: Nat) (b0123456789876543210 :: Nat) =
-        (:+) a0123456789876543210 b0123456789876543210
-    instance SuppressUnusedWarnings ((:+@#@$$) a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (::+@#@$$###)) ())
-    data (:+@#@$$) (a0123456789876543210 :: Nat) b0123456789876543210
-      where
-        (::+@#@$$###) :: forall a0123456789876543210
-                                b0123456789876543210
-                                arg. Data.Singletons.Internal.SameKind (Apply ((:+@#@$$) a0123456789876543210) arg) ((:+@#@$$$) a0123456789876543210 arg) =>
-                         (:+@#@$$) a0123456789876543210 b0123456789876543210
-    type instance Apply ((:+@#@$$) a0123456789876543210) b0123456789876543210 = (:+) a0123456789876543210 b0123456789876543210
-    instance SuppressUnusedWarnings (:+@#@$) where
-      suppressUnusedWarnings = snd (((,) (::+@#@$###)) ())
-    data (:+@#@$) a0123456789876543210
-      where
-        (::+@#@$###) :: forall a0123456789876543210
-                               arg. Data.Singletons.Internal.SameKind (Apply (:+@#@$) arg) ((:+@#@$$) arg) =>
-                        (:+@#@$) a0123456789876543210
-    type instance Apply (:+@#@$) a0123456789876543210 = (:+@#@$$) a0123456789876543210
diff --git a/tests/compile-and-dump/Promote/GenDefunSymbols.ghc88.template b/tests/compile-and-dump/Promote/GenDefunSymbols.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Promote/GenDefunSymbols.ghc88.template
@@ -0,0 +1,54 @@
+Promote/GenDefunSymbols.hs:0:0:: Splicing declarations
+    genDefunSymbols [''LiftMaybe, ''NatT, ''(:+)]
+  ======>
+    type LiftMaybeSym2 (f0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (x0123456789876543210 :: Maybe a0123456789876543210) =
+        LiftMaybe f0123456789876543210 x0123456789876543210
+    instance SuppressUnusedWarnings (LiftMaybeSym1 f0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) LiftMaybeSym1KindInference) ())
+    data LiftMaybeSym1 (f0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) (Maybe a0123456789876543210) (Maybe b0123456789876543210)
+      where
+        LiftMaybeSym1KindInference :: forall f0123456789876543210
+                                             x0123456789876543210
+                                             arg. Data.Singletons.Internal.SameKind (Apply (LiftMaybeSym1 f0123456789876543210) arg) (LiftMaybeSym2 f0123456789876543210 arg) =>
+                                      LiftMaybeSym1 f0123456789876543210 x0123456789876543210
+    type instance Apply (LiftMaybeSym1 f0123456789876543210) x0123456789876543210 = LiftMaybe f0123456789876543210 x0123456789876543210
+    instance SuppressUnusedWarnings LiftMaybeSym0 where
+      suppressUnusedWarnings = snd (((,) LiftMaybeSym0KindInference) ())
+    data LiftMaybeSym0 :: forall a0123456789876543210
+                                 b0123456789876543210.
+                          (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) (Maybe a0123456789876543210) (Maybe b0123456789876543210))
+      where
+        LiftMaybeSym0KindInference :: forall f0123456789876543210
+                                             arg. Data.Singletons.Internal.SameKind (Apply LiftMaybeSym0 arg) (LiftMaybeSym1 arg) =>
+                                      LiftMaybeSym0 f0123456789876543210
+    type instance Apply LiftMaybeSym0 f0123456789876543210 = LiftMaybeSym1 f0123456789876543210
+    type ZeroSym0 = 'Zero
+    type SuccSym1 (t0123456789876543210 :: NatT) =
+        'Succ t0123456789876543210
+    instance SuppressUnusedWarnings SuccSym0 where
+      suppressUnusedWarnings = snd (((,) SuccSym0KindInference) ())
+    data SuccSym0 :: (~>) NatT NatT
+      where
+        SuccSym0KindInference :: forall t0123456789876543210
+                                        arg. Data.Singletons.Internal.SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>
+                                 SuccSym0 t0123456789876543210
+    type instance Apply SuccSym0 t0123456789876543210 = 'Succ t0123456789876543210
+    type (:+@#@$$$) (a0123456789876543210 :: Nat) (b0123456789876543210 :: Nat) =
+        (:+) a0123456789876543210 b0123456789876543210
+    instance SuppressUnusedWarnings ((:+@#@$$) a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (::+@#@$$###)) ())
+    data (:+@#@$$) (a0123456789876543210 :: Nat) b0123456789876543210
+      where
+        (::+@#@$$###) :: forall a0123456789876543210
+                                b0123456789876543210
+                                arg. Data.Singletons.Internal.SameKind (Apply ((:+@#@$$) a0123456789876543210) arg) ((:+@#@$$$) a0123456789876543210 arg) =>
+                         (:+@#@$$) a0123456789876543210 b0123456789876543210
+    type instance Apply ((:+@#@$$) a0123456789876543210) b0123456789876543210 = (:+) a0123456789876543210 b0123456789876543210
+    instance SuppressUnusedWarnings (:+@#@$) where
+      suppressUnusedWarnings = snd (((,) (::+@#@$###)) ())
+    data (:+@#@$) a0123456789876543210
+      where
+        (::+@#@$###) :: forall a0123456789876543210
+                               arg. Data.Singletons.Internal.SameKind (Apply (:+@#@$) arg) ((:+@#@$$) arg) =>
+                        (:+@#@$) a0123456789876543210
+    type instance Apply (:+@#@$) a0123456789876543210 = (:+@#@$$) a0123456789876543210
diff --git a/tests/compile-and-dump/Promote/Newtypes.ghc86.template b/tests/compile-and-dump/Promote/Newtypes.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Promote/Newtypes.ghc86.template
+++ /dev/null
@@ -1,48 +0,0 @@
-Promote/Newtypes.hs:(0,0)-(0,0): Splicing declarations
-    promote
-      [d| newtype Foo
-            = Foo Nat
-            deriving Eq
-          newtype Bar = Bar {unBar :: Nat} |]
-  ======>
-    newtype Foo
-      = Foo Nat
-      deriving Eq
-    newtype Bar = Bar {unBar :: Nat}
-    type family Equals_0123456789876543210 (a :: Foo) (b :: Foo) :: Bool where
-      Equals_0123456789876543210 (Foo a) (Foo b) = (==) a b
-      Equals_0123456789876543210 (_ :: Foo) (_ :: Foo) = FalseSym0
-    instance PEq Foo where
-      type (==) a b = Equals_0123456789876543210 a b
-    type UnBarSym1 (a0123456789876543210 :: Bar) =
-        UnBar a0123456789876543210
-    instance SuppressUnusedWarnings UnBarSym0 where
-      suppressUnusedWarnings = snd (((,) UnBarSym0KindInference) ())
-    data UnBarSym0 :: (~>) Bar Nat
-      where
-        UnBarSym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply UnBarSym0 arg) (UnBarSym1 arg) =>
-                                  UnBarSym0 a0123456789876543210
-    type instance Apply UnBarSym0 a0123456789876543210 = UnBar a0123456789876543210
-    type family UnBar (a :: Bar) :: Nat where
-      UnBar (Bar field) = field
-    type FooSym1 (t0123456789876543210 :: Nat) =
-        Foo t0123456789876543210
-    instance SuppressUnusedWarnings FooSym0 where
-      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
-    data FooSym0 :: (~>) Nat Foo
-      where
-        FooSym0KindInference :: forall t0123456789876543210
-                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
-                                FooSym0 t0123456789876543210
-    type instance Apply FooSym0 t0123456789876543210 = Foo t0123456789876543210
-    type BarSym1 (t0123456789876543210 :: Nat) =
-        Bar t0123456789876543210
-    instance SuppressUnusedWarnings BarSym0 where
-      suppressUnusedWarnings = snd (((,) BarSym0KindInference) ())
-    data BarSym0 :: (~>) Nat Bar
-      where
-        BarSym0KindInference :: forall t0123456789876543210
-                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
-                                BarSym0 t0123456789876543210
-    type instance Apply BarSym0 t0123456789876543210 = Bar t0123456789876543210
diff --git a/tests/compile-and-dump/Promote/Newtypes.ghc88.template b/tests/compile-and-dump/Promote/Newtypes.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Promote/Newtypes.ghc88.template
@@ -0,0 +1,48 @@
+Promote/Newtypes.hs:(0,0)-(0,0): Splicing declarations
+    promote
+      [d| newtype Foo
+            = Foo Nat
+            deriving Eq
+          newtype Bar = Bar {unBar :: Nat} |]
+  ======>
+    newtype Foo
+      = Foo Nat
+      deriving Eq
+    newtype Bar = Bar {unBar :: Nat}
+    type family Equals_0123456789876543210 (a :: Foo) (b :: Foo) :: Bool where
+      Equals_0123456789876543210 (Foo a) (Foo b) = (==) a b
+      Equals_0123456789876543210 (_ :: Foo) (_ :: Foo) = FalseSym0
+    instance PEq Foo where
+      type (==) a b = Equals_0123456789876543210 a b
+    type UnBarSym1 (a0123456789876543210 :: Bar) =
+        UnBar a0123456789876543210
+    instance SuppressUnusedWarnings UnBarSym0 where
+      suppressUnusedWarnings = snd (((,) UnBarSym0KindInference) ())
+    data UnBarSym0 :: (~>) Bar Nat
+      where
+        UnBarSym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply UnBarSym0 arg) (UnBarSym1 arg) =>
+                                  UnBarSym0 a0123456789876543210
+    type instance Apply UnBarSym0 a0123456789876543210 = UnBar a0123456789876543210
+    type family UnBar (a :: Bar) :: Nat where
+      UnBar (Bar field) = field
+    type FooSym1 (t0123456789876543210 :: Nat) =
+        Foo t0123456789876543210
+    instance SuppressUnusedWarnings FooSym0 where
+      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
+    data FooSym0 :: (~>) Nat Foo
+      where
+        FooSym0KindInference :: forall t0123456789876543210
+                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
+                                FooSym0 t0123456789876543210
+    type instance Apply FooSym0 t0123456789876543210 = Foo t0123456789876543210
+    type BarSym1 (t0123456789876543210 :: Nat) =
+        Bar t0123456789876543210
+    instance SuppressUnusedWarnings BarSym0 where
+      suppressUnusedWarnings = snd (((,) BarSym0KindInference) ())
+    data BarSym0 :: (~>) Nat Bar
+      where
+        BarSym0KindInference :: forall t0123456789876543210
+                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
+                                BarSym0 t0123456789876543210
+    type instance Apply BarSym0 t0123456789876543210 = Bar t0123456789876543210
diff --git a/tests/compile-and-dump/Promote/Pragmas.ghc86.template b/tests/compile-and-dump/Promote/Pragmas.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Promote/Pragmas.ghc86.template
+++ /dev/null
@@ -1,12 +0,0 @@
-Promote/Pragmas.hs:(0,0)-(0,0): Splicing declarations
-    promote
-      [d| {-# INLINE foo #-}
-          foo :: Bool
-          foo = True |]
-  ======>
-    {-# INLINE foo #-}
-    foo :: Bool
-    foo = True
-    type FooSym0 = Foo
-    type family Foo :: Bool where
-      Foo = TrueSym0
diff --git a/tests/compile-and-dump/Promote/Pragmas.ghc88.template b/tests/compile-and-dump/Promote/Pragmas.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Promote/Pragmas.ghc88.template
@@ -0,0 +1,12 @@
+Promote/Pragmas.hs:(0,0)-(0,0): Splicing declarations
+    promote
+      [d| {-# INLINE foo #-}
+          foo :: Bool
+          foo = True |]
+  ======>
+    {-# INLINE foo #-}
+    foo :: Bool
+    foo = True
+    type FooSym0 = Foo
+    type family Foo :: Bool where
+      Foo = TrueSym0
diff --git a/tests/compile-and-dump/Promote/Prelude.ghc86.template b/tests/compile-and-dump/Promote/Prelude.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Promote/Prelude.ghc86.template
+++ /dev/null
@@ -1,19 +0,0 @@
-Promote/Prelude.hs:(0,0)-(0,0): Splicing declarations
-    promoteOnly
-      [d| odd :: Nat -> Bool
-          odd 0 = False
-          odd n = not . odd $ n - 1 |]
-  ======>
-    type OddSym1 (a0123456789876543210 :: Nat) =
-        Odd a0123456789876543210
-    instance SuppressUnusedWarnings OddSym0 where
-      suppressUnusedWarnings = snd (((,) OddSym0KindInference) ())
-    data OddSym0 :: (~>) Nat Bool
-      where
-        OddSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply OddSym0 arg) (OddSym1 arg) =>
-                                OddSym0 a0123456789876543210
-    type instance Apply OddSym0 a0123456789876543210 = Odd a0123456789876543210
-    type family Odd (a :: Nat) :: Bool where
-      Odd 0 = FalseSym0
-      Odd n = Apply (Apply ($@#@$) (Apply (Apply (.@#@$) NotSym0) OddSym0)) (Apply (Apply (-@#@$) n) (FromInteger 1))
diff --git a/tests/compile-and-dump/Promote/Prelude.ghc88.template b/tests/compile-and-dump/Promote/Prelude.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Promote/Prelude.ghc88.template
@@ -0,0 +1,19 @@
+Promote/Prelude.hs:(0,0)-(0,0): Splicing declarations
+    promoteOnly
+      [d| odd :: Nat -> Bool
+          odd 0 = False
+          odd n = not . odd $ n - 1 |]
+  ======>
+    type OddSym1 (a0123456789876543210 :: Nat) =
+        Odd a0123456789876543210
+    instance SuppressUnusedWarnings OddSym0 where
+      suppressUnusedWarnings = snd (((,) OddSym0KindInference) ())
+    data OddSym0 :: (~>) Nat Bool
+      where
+        OddSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply OddSym0 arg) (OddSym1 arg) =>
+                                OddSym0 a0123456789876543210
+    type instance Apply OddSym0 a0123456789876543210 = Odd a0123456789876543210
+    type family Odd (a :: Nat) :: Bool where
+      Odd 0 = FalseSym0
+      Odd n = Apply (Apply ($@#@$) (Apply (Apply (.@#@$) NotSym0) OddSym0)) (Apply (Apply (-@#@$) n) (FromInteger 1))
diff --git a/tests/compile-and-dump/Promote/T180.ghc86.template b/tests/compile-and-dump/Promote/T180.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Promote/T180.ghc86.template
+++ /dev/null
@@ -1,54 +0,0 @@
-Promote/T180.hs:(0,0)-(0,0): Splicing declarations
-    promote
-      [d| z (X1 x) = x
-          z (X2 x) = x
-          
-          data X = X1 {y :: Symbol} | X2 {y :: Symbol} |]
-  ======>
-    data X = X1 {y :: Symbol} | X2 {y :: Symbol}
-    z (X1 x) = x
-    z (X2 x) = x
-    type ZSym1 a0123456789876543210 = Z a0123456789876543210
-    instance SuppressUnusedWarnings ZSym0 where
-      suppressUnusedWarnings = snd (((,) ZSym0KindInference) ())
-    data ZSym0 a0123456789876543210
-      where
-        ZSym0KindInference :: forall a0123456789876543210
-                                     arg. SameKind (Apply ZSym0 arg) (ZSym1 arg) =>
-                              ZSym0 a0123456789876543210
-    type instance Apply ZSym0 a0123456789876543210 = Z a0123456789876543210
-    type family Z a where
-      Z (X1 x) = x
-      Z (X2 x) = x
-    type YSym1 (a0123456789876543210 :: X) = Y a0123456789876543210
-    instance SuppressUnusedWarnings YSym0 where
-      suppressUnusedWarnings = snd (((,) YSym0KindInference) ())
-    data YSym0 :: (~>) X Symbol
-      where
-        YSym0KindInference :: forall a0123456789876543210
-                                     arg. SameKind (Apply YSym0 arg) (YSym1 arg) =>
-                              YSym0 a0123456789876543210
-    type instance Apply YSym0 a0123456789876543210 = Y a0123456789876543210
-    type family Y (a :: X) :: Symbol where
-      Y (X1 field) = field
-      Y (X2 field) = field
-    type X1Sym1 (t0123456789876543210 :: Symbol) =
-        X1 t0123456789876543210
-    instance SuppressUnusedWarnings X1Sym0 where
-      suppressUnusedWarnings = snd (((,) X1Sym0KindInference) ())
-    data X1Sym0 :: (~>) Symbol X
-      where
-        X1Sym0KindInference :: forall t0123456789876543210
-                                      arg. SameKind (Apply X1Sym0 arg) (X1Sym1 arg) =>
-                               X1Sym0 t0123456789876543210
-    type instance Apply X1Sym0 t0123456789876543210 = X1 t0123456789876543210
-    type X2Sym1 (t0123456789876543210 :: Symbol) =
-        X2 t0123456789876543210
-    instance SuppressUnusedWarnings X2Sym0 where
-      suppressUnusedWarnings = snd (((,) X2Sym0KindInference) ())
-    data X2Sym0 :: (~>) Symbol X
-      where
-        X2Sym0KindInference :: forall t0123456789876543210
-                                      arg. SameKind (Apply X2Sym0 arg) (X2Sym1 arg) =>
-                               X2Sym0 t0123456789876543210
-    type instance Apply X2Sym0 t0123456789876543210 = X2 t0123456789876543210
diff --git a/tests/compile-and-dump/Promote/T180.ghc88.template b/tests/compile-and-dump/Promote/T180.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Promote/T180.ghc88.template
@@ -0,0 +1,54 @@
+Promote/T180.hs:(0,0)-(0,0): Splicing declarations
+    promote
+      [d| z (X1 x) = x
+          z (X2 x) = x
+          
+          data X = X1 {y :: Symbol} | X2 {y :: Symbol} |]
+  ======>
+    data X = X1 {y :: Symbol} | X2 {y :: Symbol}
+    z (X1 x) = x
+    z (X2 x) = x
+    type ZSym1 a0123456789876543210 = Z a0123456789876543210
+    instance SuppressUnusedWarnings ZSym0 where
+      suppressUnusedWarnings = snd (((,) ZSym0KindInference) ())
+    data ZSym0 a0123456789876543210
+      where
+        ZSym0KindInference :: forall a0123456789876543210
+                                     arg. SameKind (Apply ZSym0 arg) (ZSym1 arg) =>
+                              ZSym0 a0123456789876543210
+    type instance Apply ZSym0 a0123456789876543210 = Z a0123456789876543210
+    type family Z a where
+      Z (X1 x) = x
+      Z (X2 x) = x
+    type YSym1 (a0123456789876543210 :: X) = Y a0123456789876543210
+    instance SuppressUnusedWarnings YSym0 where
+      suppressUnusedWarnings = snd (((,) YSym0KindInference) ())
+    data YSym0 :: (~>) X Symbol
+      where
+        YSym0KindInference :: forall a0123456789876543210
+                                     arg. SameKind (Apply YSym0 arg) (YSym1 arg) =>
+                              YSym0 a0123456789876543210
+    type instance Apply YSym0 a0123456789876543210 = Y a0123456789876543210
+    type family Y (a :: X) :: Symbol where
+      Y (X1 field) = field
+      Y (X2 field) = field
+    type X1Sym1 (t0123456789876543210 :: Symbol) =
+        X1 t0123456789876543210
+    instance SuppressUnusedWarnings X1Sym0 where
+      suppressUnusedWarnings = snd (((,) X1Sym0KindInference) ())
+    data X1Sym0 :: (~>) Symbol X
+      where
+        X1Sym0KindInference :: forall t0123456789876543210
+                                      arg. SameKind (Apply X1Sym0 arg) (X1Sym1 arg) =>
+                               X1Sym0 t0123456789876543210
+    type instance Apply X1Sym0 t0123456789876543210 = X1 t0123456789876543210
+    type X2Sym1 (t0123456789876543210 :: Symbol) =
+        X2 t0123456789876543210
+    instance SuppressUnusedWarnings X2Sym0 where
+      suppressUnusedWarnings = snd (((,) X2Sym0KindInference) ())
+    data X2Sym0 :: (~>) Symbol X
+      where
+        X2Sym0KindInference :: forall t0123456789876543210
+                                      arg. SameKind (Apply X2Sym0 arg) (X2Sym1 arg) =>
+                               X2Sym0 t0123456789876543210
+    type instance Apply X2Sym0 t0123456789876543210 = X2 t0123456789876543210
diff --git a/tests/compile-and-dump/Promote/T361.ghc86.template b/tests/compile-and-dump/Promote/T361.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Promote/T361.ghc86.template
+++ /dev/null
@@ -1,21 +0,0 @@
-Promote/T361.hs:0:0:: Splicing declarations
-    genDefunSymbols [''Proxy] ======> type ProxySym0 =  'Proxy
-Promote/T361.hs:(0,0)-(0,0): Splicing declarations
-    promote
-      [d| f :: Proxy 1 -> Proxy 2
-          f Proxy = Proxy |]
-  ======>
-    f :: Proxy 1 -> Proxy 2
-    f Proxy = Proxy
-    type FSym1 (a0123456789876543210 :: Proxy 1) =
-        F a0123456789876543210
-    instance SuppressUnusedWarnings FSym0 where
-      suppressUnusedWarnings = snd (((,) FSym0KindInference) ())
-    data FSym0 :: (~>) (Proxy 1) (Proxy 2)
-      where
-        FSym0KindInference :: forall a0123456789876543210
-                                     arg. SameKind (Apply FSym0 arg) (FSym1 arg) =>
-                              FSym0 a0123456789876543210
-    type instance Apply FSym0 a0123456789876543210 = F a0123456789876543210
-    type family F (a :: Proxy 1) :: Proxy 2 where
-      F  'Proxy = ProxySym0
diff --git a/tests/compile-and-dump/Promote/T361.ghc88.template b/tests/compile-and-dump/Promote/T361.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Promote/T361.ghc88.template
@@ -0,0 +1,21 @@
+Promote/T361.hs:0:0:: Splicing declarations
+    genDefunSymbols [''Proxy] ======> type ProxySym0 = 'Proxy
+Promote/T361.hs:(0,0)-(0,0): Splicing declarations
+    promote
+      [d| f :: Proxy 1 -> Proxy 2
+          f Proxy = Proxy |]
+  ======>
+    f :: Proxy 1 -> Proxy 2
+    f Proxy = Proxy
+    type FSym1 (a0123456789876543210 :: Proxy 1) =
+        F a0123456789876543210
+    instance SuppressUnusedWarnings FSym0 where
+      suppressUnusedWarnings = snd (((,) FSym0KindInference) ())
+    data FSym0 :: (~>) (Proxy 1) (Proxy 2)
+      where
+        FSym0KindInference :: forall a0123456789876543210
+                                     arg. SameKind (Apply FSym0 arg) (FSym1 arg) =>
+                              FSym0 a0123456789876543210
+    type instance Apply FSym0 a0123456789876543210 = F a0123456789876543210
+    type family F (a :: Proxy 1) :: Proxy 2 where
+      F 'Proxy = ProxySym0
diff --git a/tests/compile-and-dump/Singletons/AsPattern.ghc86.template b/tests/compile-and-dump/Singletons/AsPattern.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/AsPattern.ghc86.template
+++ /dev/null
@@ -1,405 +0,0 @@
-Singletons/AsPattern.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| maybePlus :: Maybe Nat -> Maybe Nat
-          maybePlus (Just n) = Just (plus (Succ Zero) n)
-          maybePlus p@Nothing = p
-          bar :: Maybe Nat -> Maybe Nat
-          bar x@(Just _) = x
-          bar Nothing = Nothing
-          baz_ :: Maybe Baz -> Maybe Baz
-          baz_ p@Nothing = p
-          baz_ p@(Just (Baz _ _ _)) = p
-          tup :: (Nat, Nat) -> (Nat, Nat)
-          tup p@(_, _) = p
-          foo :: [Nat] -> [Nat]
-          foo p@[] = p
-          foo p@[_] = p
-          foo p@(_ : _ : _) = p
-          
-          data Baz = Baz Nat Nat Nat |]
-  ======>
-    maybePlus :: Maybe Nat -> Maybe Nat
-    maybePlus (Just n) = Just ((plus (Succ Zero)) n)
-    maybePlus p@Nothing = p
-    bar :: Maybe Nat -> Maybe Nat
-    bar x@(Just _) = x
-    bar Nothing = Nothing
-    data Baz = Baz Nat Nat Nat
-    baz_ :: Maybe Baz -> Maybe Baz
-    baz_ p@Nothing = p
-    baz_ p@(Just (Baz _ _ _)) = p
-    tup :: (Nat, Nat) -> (Nat, Nat)
-    tup p@(_, _) = p
-    foo :: [Nat] -> [Nat]
-    foo p@[] = p
-    foo p@[_] = p
-    foo p@(_ : (_ : _)) = p
-    type BazSym3 (t0123456789876543210 :: Nat) (t0123456789876543210 :: Nat) (t0123456789876543210 :: Nat) =
-        Baz t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (BazSym2 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) BazSym2KindInference) ())
-    data BazSym2 (t0123456789876543210 :: Nat) (t0123456789876543210 :: Nat) :: (~>) Nat Baz
-      where
-        BazSym2KindInference :: forall t0123456789876543210
-                                       t0123456789876543210
-                                       t0123456789876543210
-                                       arg. SameKind (Apply (BazSym2 t0123456789876543210 t0123456789876543210) arg) (BazSym3 t0123456789876543210 t0123456789876543210 arg) =>
-                                BazSym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (BazSym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = Baz t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (BazSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) BazSym1KindInference) ())
-    data BazSym1 (t0123456789876543210 :: Nat) :: (~>) Nat ((~>) Nat Baz)
-      where
-        BazSym1KindInference :: forall t0123456789876543210
-                                       t0123456789876543210
-                                       arg. SameKind (Apply (BazSym1 t0123456789876543210) arg) (BazSym2 t0123456789876543210 arg) =>
-                                BazSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (BazSym1 t0123456789876543210) t0123456789876543210 = BazSym2 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings BazSym0 where
-      suppressUnusedWarnings = snd (((,) BazSym0KindInference) ())
-    data BazSym0 :: (~>) Nat ((~>) Nat ((~>) Nat Baz))
-      where
-        BazSym0KindInference :: forall t0123456789876543210
-                                       arg. SameKind (Apply BazSym0 arg) (BazSym1 arg) =>
-                                BazSym0 t0123456789876543210
-    type instance Apply BazSym0 t0123456789876543210 = BazSym1 t0123456789876543210
-    type Let0123456789876543210PSym0 = Let0123456789876543210P
-    type family Let0123456789876543210P where
-      Let0123456789876543210P = '[]
-    type Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 =
-        Let0123456789876543210P wild_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210PSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210PSym0KindInference) ())
-    data Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
-      where
-        Let0123456789876543210PSym0KindInference :: forall wild_01234567898765432100123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) =>
-                                                    Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
-    type instance Apply Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210P wild_01234567898765432100123456789876543210
-    type family Let0123456789876543210P wild_0123456789876543210 where
-      Let0123456789876543210P wild_0123456789876543210 = Apply (Apply (:@#@$) wild_0123456789876543210) '[]
-    type Let0123456789876543210PSym3 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 =
-        Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210PSym2KindInference) ())
-    data Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-      where
-        Let0123456789876543210PSym2KindInference :: forall wild_01234567898765432100123456789876543210
-                                                           wild_01234567898765432100123456789876543210
-                                                           wild_01234567898765432100123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) arg) (Let0123456789876543210PSym3 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 arg) =>
-                                                    Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-    type instance Apply (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) wild_01234567898765432100123456789876543210 = Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210PSym1KindInference) ())
-    data Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-      where
-        Let0123456789876543210PSym1KindInference :: forall wild_01234567898765432100123456789876543210
-                                                           wild_01234567898765432100123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) arg) (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 arg) =>
-                                                    Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-    type instance Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) wild_01234567898765432100123456789876543210 = Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210PSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210PSym0KindInference) ())
-    data Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
-      where
-        Let0123456789876543210PSym0KindInference :: forall wild_01234567898765432100123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) =>
-                                                    Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
-    type instance Apply Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210
-    type family Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210 where
-      Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210 = Apply (Apply (:@#@$) wild_0123456789876543210) (Apply (Apply (:@#@$) wild_0123456789876543210) wild_0123456789876543210)
-    type Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 =
-        Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210PSym1KindInference) ())
-    data Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-      where
-        Let0123456789876543210PSym1KindInference :: forall wild_01234567898765432100123456789876543210
-                                                           wild_01234567898765432100123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) arg) (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 arg) =>
-                                                    Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-    type instance Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) wild_01234567898765432100123456789876543210 = Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210PSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210PSym0KindInference) ())
-    data Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
-      where
-        Let0123456789876543210PSym0KindInference :: forall wild_01234567898765432100123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) =>
-                                                    Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
-    type instance Apply Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210
-    type family Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 where
-      Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 = Apply (Apply Tuple2Sym0 wild_0123456789876543210) wild_0123456789876543210
-    type Let0123456789876543210PSym0 = Let0123456789876543210P
-    type family Let0123456789876543210P where
-      Let0123456789876543210P = NothingSym0
-    type Let0123456789876543210PSym3 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 =
-        Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210PSym2KindInference) ())
-    data Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-      where
-        Let0123456789876543210PSym2KindInference :: forall wild_01234567898765432100123456789876543210
-                                                           wild_01234567898765432100123456789876543210
-                                                           wild_01234567898765432100123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) arg) (Let0123456789876543210PSym3 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 arg) =>
-                                                    Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-    type instance Apply (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) wild_01234567898765432100123456789876543210 = Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210PSym1KindInference) ())
-    data Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-      where
-        Let0123456789876543210PSym1KindInference :: forall wild_01234567898765432100123456789876543210
-                                                           wild_01234567898765432100123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) arg) (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 arg) =>
-                                                    Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-    type instance Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) wild_01234567898765432100123456789876543210 = Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210PSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210PSym0KindInference) ())
-    data Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
-      where
-        Let0123456789876543210PSym0KindInference :: forall wild_01234567898765432100123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) =>
-                                                    Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
-    type instance Apply Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210
-    type family Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210 where
-      Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210 = Apply JustSym0 (Apply (Apply (Apply BazSym0 wild_0123456789876543210) wild_0123456789876543210) wild_0123456789876543210)
-    type Let0123456789876543210XSym1 wild_01234567898765432100123456789876543210 =
-        Let0123456789876543210X wild_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210XSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210XSym0KindInference) ())
-    data Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210
-      where
-        Let0123456789876543210XSym0KindInference :: forall wild_01234567898765432100123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210XSym0 arg) (Let0123456789876543210XSym1 arg) =>
-                                                    Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210
-    type instance Apply Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210X wild_01234567898765432100123456789876543210
-    type family Let0123456789876543210X wild_0123456789876543210 where
-      Let0123456789876543210X wild_0123456789876543210 = Apply JustSym0 wild_0123456789876543210
-    type Let0123456789876543210PSym0 = Let0123456789876543210P
-    type family Let0123456789876543210P where
-      Let0123456789876543210P = NothingSym0
-    type FooSym1 (a0123456789876543210 :: [Nat]) =
-        Foo a0123456789876543210
-    instance SuppressUnusedWarnings FooSym0 where
-      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
-    data FooSym0 :: (~>) [Nat] [Nat]
-      where
-        FooSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
-                                FooSym0 a0123456789876543210
-    type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
-    type TupSym1 (a0123456789876543210 :: (Nat, Nat)) =
-        Tup a0123456789876543210
-    instance SuppressUnusedWarnings TupSym0 where
-      suppressUnusedWarnings = snd (((,) TupSym0KindInference) ())
-    data TupSym0 :: (~>) (Nat, Nat) (Nat, Nat)
-      where
-        TupSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply TupSym0 arg) (TupSym1 arg) =>
-                                TupSym0 a0123456789876543210
-    type instance Apply TupSym0 a0123456789876543210 = Tup a0123456789876543210
-    type Baz_Sym1 (a0123456789876543210 :: Maybe Baz) =
-        Baz_ a0123456789876543210
-    instance SuppressUnusedWarnings Baz_Sym0 where
-      suppressUnusedWarnings = snd (((,) Baz_Sym0KindInference) ())
-    data Baz_Sym0 :: (~>) (Maybe Baz) (Maybe Baz)
-      where
-        Baz_Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Baz_Sym0 arg) (Baz_Sym1 arg) =>
-                                 Baz_Sym0 a0123456789876543210
-    type instance Apply Baz_Sym0 a0123456789876543210 = Baz_ a0123456789876543210
-    type BarSym1 (a0123456789876543210 :: Maybe Nat) =
-        Bar a0123456789876543210
-    instance SuppressUnusedWarnings BarSym0 where
-      suppressUnusedWarnings = snd (((,) BarSym0KindInference) ())
-    data BarSym0 :: (~>) (Maybe Nat) (Maybe Nat)
-      where
-        BarSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
-                                BarSym0 a0123456789876543210
-    type instance Apply BarSym0 a0123456789876543210 = Bar a0123456789876543210
-    type MaybePlusSym1 (a0123456789876543210 :: Maybe Nat) =
-        MaybePlus a0123456789876543210
-    instance SuppressUnusedWarnings MaybePlusSym0 where
-      suppressUnusedWarnings = snd (((,) MaybePlusSym0KindInference) ())
-    data MaybePlusSym0 :: (~>) (Maybe Nat) (Maybe Nat)
-      where
-        MaybePlusSym0KindInference :: forall a0123456789876543210
-                                             arg. SameKind (Apply MaybePlusSym0 arg) (MaybePlusSym1 arg) =>
-                                      MaybePlusSym0 a0123456789876543210
-    type instance Apply MaybePlusSym0 a0123456789876543210 = MaybePlus a0123456789876543210
-    type family Foo (a :: [Nat]) :: [Nat] where
-      Foo '[] = Let0123456789876543210PSym0
-      Foo '[wild_0123456789876543210] = Let0123456789876543210PSym1 wild_0123456789876543210
-      Foo ( '(:) wild_0123456789876543210 ( '(:) wild_0123456789876543210 wild_0123456789876543210)) = Let0123456789876543210PSym3 wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210
-    type family Tup (a :: (Nat, Nat)) :: (Nat, Nat) where
-      Tup '(wild_0123456789876543210,
-            wild_0123456789876543210) = Let0123456789876543210PSym2 wild_0123456789876543210 wild_0123456789876543210
-    type family Baz_ (a :: Maybe Baz) :: Maybe Baz where
-      Baz_  'Nothing = Let0123456789876543210PSym0
-      Baz_ ( 'Just (Baz wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210)) = Let0123456789876543210PSym3 wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210
-    type family Bar (a :: Maybe Nat) :: Maybe Nat where
-      Bar ( 'Just wild_0123456789876543210) = Let0123456789876543210XSym1 wild_0123456789876543210
-      Bar  'Nothing = NothingSym0
-    type family MaybePlus (a :: Maybe Nat) :: Maybe Nat where
-      MaybePlus ( 'Just n) = Apply JustSym0 (Apply (Apply PlusSym0 (Apply SuccSym0 ZeroSym0)) n)
-      MaybePlus  'Nothing = Let0123456789876543210PSym0
-    sFoo ::
-      forall (t :: [Nat]). Sing t -> Sing (Apply FooSym0 t :: [Nat])
-    sTup ::
-      forall (t :: (Nat, Nat)).
-      Sing t -> Sing (Apply TupSym0 t :: (Nat, Nat))
-    sBaz_ ::
-      forall (t :: Maybe Baz).
-      Sing t -> Sing (Apply Baz_Sym0 t :: Maybe Baz)
-    sBar ::
-      forall (t :: Maybe Nat).
-      Sing t -> Sing (Apply BarSym0 t :: Maybe Nat)
-    sMaybePlus ::
-      forall (t :: Maybe Nat).
-      Sing t -> Sing (Apply MaybePlusSym0 t :: Maybe Nat)
-    sFoo SNil
-      = let
-          sP :: Sing Let0123456789876543210PSym0
-          sP = SNil
-        in sP
-    sFoo
-      (SCons (sWild_0123456789876543210 :: Sing wild_0123456789876543210)
-             SNil)
-      = let
-          sP :: Sing (Let0123456789876543210PSym1 wild_0123456789876543210)
-          sP
-            = (applySing
-                 ((applySing ((singFun2 @(:@#@$)) SCons))
-                    sWild_0123456789876543210))
-                SNil
-        in sP
-    sFoo
-      (SCons (sWild_0123456789876543210 :: Sing wild_0123456789876543210)
-             (SCons (sWild_0123456789876543210 :: Sing wild_0123456789876543210)
-                    (sWild_0123456789876543210 :: Sing wild_0123456789876543210)))
-      = let
-          sP ::
-            Sing (Let0123456789876543210PSym3 wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210)
-          sP
-            = (applySing
-                 ((applySing ((singFun2 @(:@#@$)) SCons))
-                    sWild_0123456789876543210))
-                ((applySing
-                    ((applySing ((singFun2 @(:@#@$)) SCons))
-                       sWild_0123456789876543210))
-                   sWild_0123456789876543210)
-        in sP
-    sTup
-      (STuple2 (sWild_0123456789876543210 :: Sing wild_0123456789876543210)
-               (sWild_0123456789876543210 :: Sing wild_0123456789876543210))
-      = let
-          sP ::
-            Sing (Let0123456789876543210PSym2 wild_0123456789876543210 wild_0123456789876543210)
-          sP
-            = (applySing
-                 ((applySing ((singFun2 @Tuple2Sym0) STuple2))
-                    sWild_0123456789876543210))
-                sWild_0123456789876543210
-        in sP
-    sBaz_ SNothing
-      = let
-          sP :: Sing Let0123456789876543210PSym0
-          sP = SNothing
-        in sP
-    sBaz_
-      (SJust (SBaz (sWild_0123456789876543210 :: Sing wild_0123456789876543210)
-                   (sWild_0123456789876543210 :: Sing wild_0123456789876543210)
-                   (sWild_0123456789876543210 :: Sing wild_0123456789876543210)))
-      = let
-          sP ::
-            Sing (Let0123456789876543210PSym3 wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210)
-          sP
-            = (applySing ((singFun1 @JustSym0) SJust))
-                ((applySing
-                    ((applySing
-                        ((applySing ((singFun3 @BazSym0) SBaz)) sWild_0123456789876543210))
-                       sWild_0123456789876543210))
-                   sWild_0123456789876543210)
-        in sP
-    sBar
-      (SJust (sWild_0123456789876543210 :: Sing wild_0123456789876543210))
-      = let
-          sX :: Sing (Let0123456789876543210XSym1 wild_0123456789876543210)
-          sX
-            = (applySing ((singFun1 @JustSym0) SJust))
-                sWild_0123456789876543210
-        in sX
-    sBar SNothing = SNothing
-    sMaybePlus (SJust (sN :: Sing n))
-      = (applySing ((singFun1 @JustSym0) SJust))
-          ((applySing
-              ((applySing ((singFun2 @PlusSym0) sPlus))
-                 ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
-             sN)
-    sMaybePlus SNothing
-      = let
-          sP :: Sing Let0123456789876543210PSym0
-          sP = SNothing
-        in sP
-    instance SingI (FooSym0 :: (~>) [Nat] [Nat]) where
-      sing = (singFun1 @FooSym0) sFoo
-    instance SingI (TupSym0 :: (~>) (Nat, Nat) (Nat, Nat)) where
-      sing = (singFun1 @TupSym0) sTup
-    instance SingI (Baz_Sym0 :: (~>) (Maybe Baz) (Maybe Baz)) where
-      sing = (singFun1 @Baz_Sym0) sBaz_
-    instance SingI (BarSym0 :: (~>) (Maybe Nat) (Maybe Nat)) where
-      sing = (singFun1 @BarSym0) sBar
-    instance SingI (MaybePlusSym0 :: (~>) (Maybe Nat) (Maybe Nat)) where
-      sing = (singFun1 @MaybePlusSym0) sMaybePlus
-    data instance Sing :: Baz -> GHC.Types.Type
-      where
-        SBaz :: forall (n :: Nat) (n :: Nat) (n :: Nat).
-                (Sing (n :: Nat))
-                -> (Sing (n :: Nat)) -> (Sing (n :: Nat)) -> Sing (Baz n n n)
-    type SBaz = (Sing :: Baz -> GHC.Types.Type)
-    instance SingKind Baz where
-      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) }
-    instance (SingI n, SingI n, SingI n) =>
-             SingI (Baz (n :: Nat) (n :: Nat) (n :: Nat)) where
-      sing = ((SBaz sing) sing) sing
-    instance SingI (BazSym0 :: (~>) Nat ((~>) Nat ((~>) Nat Baz))) where
-      sing = (singFun3 @BazSym0) SBaz
-    instance SingI (TyCon3 Baz :: (~>) Nat ((~>) Nat ((~>) Nat Baz))) where
-      sing = (singFun3 @(TyCon3 Baz)) SBaz
-    instance SingI d =>
-             SingI (BazSym1 (d :: Nat) :: (~>) Nat ((~>) Nat Baz)) where
-      sing = (singFun2 @(BazSym1 (d :: Nat))) (SBaz (sing @d))
-    instance SingI d =>
-             SingI (TyCon2 (Baz (d :: Nat)) :: (~>) Nat ((~>) Nat Baz)) where
-      sing = (singFun2 @(TyCon2 (Baz (d :: Nat)))) (SBaz (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (BazSym2 (d :: Nat) (d :: Nat) :: (~>) Nat Baz) where
-      sing
-        = (singFun1 @(BazSym2 (d :: Nat) (d :: Nat)))
-            ((SBaz (sing @d)) (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (TyCon1 (Baz (d :: Nat) (d :: Nat)) :: (~>) Nat Baz) where
-      sing
-        = (singFun1 @(TyCon1 (Baz (d :: Nat) (d :: Nat))))
-            ((SBaz (sing @d)) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/AsPattern.ghc88.template b/tests/compile-and-dump/Singletons/AsPattern.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/AsPattern.ghc88.template
@@ -0,0 +1,395 @@
+Singletons/AsPattern.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| maybePlus :: Maybe Nat -> Maybe Nat
+          maybePlus (Just n) = Just (plus (Succ Zero) n)
+          maybePlus p@Nothing = p
+          bar :: Maybe Nat -> Maybe Nat
+          bar x@(Just _) = x
+          bar Nothing = Nothing
+          baz_ :: Maybe Baz -> Maybe Baz
+          baz_ p@Nothing = p
+          baz_ p@(Just (Baz _ _ _)) = p
+          tup :: (Nat, Nat) -> (Nat, Nat)
+          tup p@(_, _) = p
+          foo :: [Nat] -> [Nat]
+          foo p@[] = p
+          foo p@[_] = p
+          foo p@(_ : _ : _) = p
+          
+          data Baz = Baz Nat Nat Nat |]
+  ======>
+    maybePlus :: Maybe Nat -> Maybe Nat
+    maybePlus (Just n) = Just ((plus (Succ Zero)) n)
+    maybePlus p@Nothing = p
+    bar :: Maybe Nat -> Maybe Nat
+    bar x@(Just _) = x
+    bar Nothing = Nothing
+    data Baz = Baz Nat Nat Nat
+    baz_ :: Maybe Baz -> Maybe Baz
+    baz_ p@Nothing = p
+    baz_ p@(Just (Baz _ _ _)) = p
+    tup :: (Nat, Nat) -> (Nat, Nat)
+    tup p@(_, _) = p
+    foo :: [Nat] -> [Nat]
+    foo p@[] = p
+    foo p@[_] = p
+    foo p@(_ : (_ : _)) = p
+    type BazSym3 (t0123456789876543210 :: Nat) (t0123456789876543210 :: Nat) (t0123456789876543210 :: Nat) =
+        Baz t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (BazSym2 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) BazSym2KindInference) ())
+    data BazSym2 (t0123456789876543210 :: Nat) (t0123456789876543210 :: Nat) :: (~>) Nat Baz
+      where
+        BazSym2KindInference :: forall t0123456789876543210
+                                       t0123456789876543210
+                                       t0123456789876543210
+                                       arg. SameKind (Apply (BazSym2 t0123456789876543210 t0123456789876543210) arg) (BazSym3 t0123456789876543210 t0123456789876543210 arg) =>
+                                BazSym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (BazSym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = Baz t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (BazSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) BazSym1KindInference) ())
+    data BazSym1 (t0123456789876543210 :: Nat) :: (~>) Nat ((~>) Nat Baz)
+      where
+        BazSym1KindInference :: forall t0123456789876543210
+                                       t0123456789876543210
+                                       arg. SameKind (Apply (BazSym1 t0123456789876543210) arg) (BazSym2 t0123456789876543210 arg) =>
+                                BazSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (BazSym1 t0123456789876543210) t0123456789876543210 = BazSym2 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings BazSym0 where
+      suppressUnusedWarnings = snd (((,) BazSym0KindInference) ())
+    data BazSym0 :: (~>) Nat ((~>) Nat ((~>) Nat Baz))
+      where
+        BazSym0KindInference :: forall t0123456789876543210
+                                       arg. SameKind (Apply BazSym0 arg) (BazSym1 arg) =>
+                                BazSym0 t0123456789876543210
+    type instance Apply BazSym0 t0123456789876543210 = BazSym1 t0123456789876543210
+    type Let0123456789876543210PSym0 = Let0123456789876543210P
+    type family Let0123456789876543210P where
+      Let0123456789876543210P = '[]
+    type Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 =
+        Let0123456789876543210P wild_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210PSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210PSym0KindInference) ())
+    data Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
+      where
+        Let0123456789876543210PSym0KindInference :: forall wild_01234567898765432100123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) =>
+                                                    Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
+    type instance Apply Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210P wild_01234567898765432100123456789876543210
+    type family Let0123456789876543210P wild_0123456789876543210 where
+      Let0123456789876543210P wild_0123456789876543210 = Apply (Apply (:@#@$) wild_0123456789876543210) '[]
+    type Let0123456789876543210PSym3 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 =
+        Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210PSym2KindInference) ())
+    data Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+      where
+        Let0123456789876543210PSym2KindInference :: forall wild_01234567898765432100123456789876543210
+                                                           wild_01234567898765432100123456789876543210
+                                                           wild_01234567898765432100123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) arg) (Let0123456789876543210PSym3 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 arg) =>
+                                                    Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+    type instance Apply (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) wild_01234567898765432100123456789876543210 = Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210PSym1KindInference) ())
+    data Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+      where
+        Let0123456789876543210PSym1KindInference :: forall wild_01234567898765432100123456789876543210
+                                                           wild_01234567898765432100123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) arg) (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 arg) =>
+                                                    Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+    type instance Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) wild_01234567898765432100123456789876543210 = Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210PSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210PSym0KindInference) ())
+    data Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
+      where
+        Let0123456789876543210PSym0KindInference :: forall wild_01234567898765432100123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) =>
+                                                    Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
+    type instance Apply Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210
+    type family Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210 where
+      Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210 = Apply (Apply (:@#@$) wild_0123456789876543210) (Apply (Apply (:@#@$) wild_0123456789876543210) wild_0123456789876543210)
+    type Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 =
+        Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210PSym1KindInference) ())
+    data Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+      where
+        Let0123456789876543210PSym1KindInference :: forall wild_01234567898765432100123456789876543210
+                                                           wild_01234567898765432100123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) arg) (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 arg) =>
+                                                    Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+    type instance Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) wild_01234567898765432100123456789876543210 = Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210PSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210PSym0KindInference) ())
+    data Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
+      where
+        Let0123456789876543210PSym0KindInference :: forall wild_01234567898765432100123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) =>
+                                                    Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
+    type instance Apply Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210
+    type family Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 where
+      Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 = Apply (Apply Tuple2Sym0 wild_0123456789876543210) wild_0123456789876543210
+    type Let0123456789876543210PSym0 = Let0123456789876543210P
+    type family Let0123456789876543210P where
+      Let0123456789876543210P = NothingSym0
+    type Let0123456789876543210PSym3 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 =
+        Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210PSym2KindInference) ())
+    data Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+      where
+        Let0123456789876543210PSym2KindInference :: forall wild_01234567898765432100123456789876543210
+                                                           wild_01234567898765432100123456789876543210
+                                                           wild_01234567898765432100123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) arg) (Let0123456789876543210PSym3 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 arg) =>
+                                                    Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+    type instance Apply (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) wild_01234567898765432100123456789876543210 = Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210PSym1KindInference) ())
+    data Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+      where
+        Let0123456789876543210PSym1KindInference :: forall wild_01234567898765432100123456789876543210
+                                                           wild_01234567898765432100123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) arg) (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 arg) =>
+                                                    Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+    type instance Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) wild_01234567898765432100123456789876543210 = Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210PSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210PSym0KindInference) ())
+    data Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
+      where
+        Let0123456789876543210PSym0KindInference :: forall wild_01234567898765432100123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) =>
+                                                    Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210
+    type instance Apply Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210
+    type family Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210 where
+      Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210 = Apply JustSym0 (Apply (Apply (Apply BazSym0 wild_0123456789876543210) wild_0123456789876543210) wild_0123456789876543210)
+    type Let0123456789876543210XSym1 wild_01234567898765432100123456789876543210 =
+        Let0123456789876543210X wild_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210XSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210XSym0KindInference) ())
+    data Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210
+      where
+        Let0123456789876543210XSym0KindInference :: forall wild_01234567898765432100123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210XSym0 arg) (Let0123456789876543210XSym1 arg) =>
+                                                    Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210
+    type instance Apply Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210X wild_01234567898765432100123456789876543210
+    type family Let0123456789876543210X wild_0123456789876543210 where
+      Let0123456789876543210X wild_0123456789876543210 = Apply JustSym0 wild_0123456789876543210
+    type Let0123456789876543210PSym0 = Let0123456789876543210P
+    type family Let0123456789876543210P where
+      Let0123456789876543210P = NothingSym0
+    type FooSym1 (a0123456789876543210 :: [Nat]) =
+        Foo a0123456789876543210
+    instance SuppressUnusedWarnings FooSym0 where
+      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
+    data FooSym0 :: (~>) [Nat] [Nat]
+      where
+        FooSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
+                                FooSym0 a0123456789876543210
+    type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
+    type TupSym1 (a0123456789876543210 :: (Nat, Nat)) =
+        Tup a0123456789876543210
+    instance SuppressUnusedWarnings TupSym0 where
+      suppressUnusedWarnings = snd (((,) TupSym0KindInference) ())
+    data TupSym0 :: (~>) (Nat, Nat) (Nat, Nat)
+      where
+        TupSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply TupSym0 arg) (TupSym1 arg) =>
+                                TupSym0 a0123456789876543210
+    type instance Apply TupSym0 a0123456789876543210 = Tup a0123456789876543210
+    type Baz_Sym1 (a0123456789876543210 :: Maybe Baz) =
+        Baz_ a0123456789876543210
+    instance SuppressUnusedWarnings Baz_Sym0 where
+      suppressUnusedWarnings = snd (((,) Baz_Sym0KindInference) ())
+    data Baz_Sym0 :: (~>) (Maybe Baz) (Maybe Baz)
+      where
+        Baz_Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Baz_Sym0 arg) (Baz_Sym1 arg) =>
+                                 Baz_Sym0 a0123456789876543210
+    type instance Apply Baz_Sym0 a0123456789876543210 = Baz_ a0123456789876543210
+    type BarSym1 (a0123456789876543210 :: Maybe Nat) =
+        Bar a0123456789876543210
+    instance SuppressUnusedWarnings BarSym0 where
+      suppressUnusedWarnings = snd (((,) BarSym0KindInference) ())
+    data BarSym0 :: (~>) (Maybe Nat) (Maybe Nat)
+      where
+        BarSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
+                                BarSym0 a0123456789876543210
+    type instance Apply BarSym0 a0123456789876543210 = Bar a0123456789876543210
+    type MaybePlusSym1 (a0123456789876543210 :: Maybe Nat) =
+        MaybePlus a0123456789876543210
+    instance SuppressUnusedWarnings MaybePlusSym0 where
+      suppressUnusedWarnings = snd (((,) MaybePlusSym0KindInference) ())
+    data MaybePlusSym0 :: (~>) (Maybe Nat) (Maybe Nat)
+      where
+        MaybePlusSym0KindInference :: forall a0123456789876543210
+                                             arg. SameKind (Apply MaybePlusSym0 arg) (MaybePlusSym1 arg) =>
+                                      MaybePlusSym0 a0123456789876543210
+    type instance Apply MaybePlusSym0 a0123456789876543210 = MaybePlus a0123456789876543210
+    type family Foo (a :: [Nat]) :: [Nat] where
+      Foo '[] = Let0123456789876543210PSym0
+      Foo '[wild_0123456789876543210] = Let0123456789876543210PSym1 wild_0123456789876543210
+      Foo ('(:) wild_0123456789876543210 ('(:) wild_0123456789876543210 wild_0123456789876543210)) = Let0123456789876543210PSym3 wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210
+    type family Tup (a :: (Nat, Nat)) :: (Nat, Nat) where
+      Tup '(wild_0123456789876543210,
+            wild_0123456789876543210) = Let0123456789876543210PSym2 wild_0123456789876543210 wild_0123456789876543210
+    type family Baz_ (a :: Maybe Baz) :: Maybe Baz where
+      Baz_ 'Nothing = Let0123456789876543210PSym0
+      Baz_ ('Just (Baz wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210)) = Let0123456789876543210PSym3 wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210
+    type family Bar (a :: Maybe Nat) :: Maybe Nat where
+      Bar ('Just wild_0123456789876543210) = Let0123456789876543210XSym1 wild_0123456789876543210
+      Bar 'Nothing = NothingSym0
+    type family MaybePlus (a :: Maybe Nat) :: Maybe Nat where
+      MaybePlus ('Just n) = Apply JustSym0 (Apply (Apply PlusSym0 (Apply SuccSym0 ZeroSym0)) n)
+      MaybePlus 'Nothing = Let0123456789876543210PSym0
+    sFoo ::
+      forall (t :: [Nat]). Sing t -> Sing (Apply FooSym0 t :: [Nat])
+    sTup ::
+      forall (t :: (Nat, Nat)).
+      Sing t -> Sing (Apply TupSym0 t :: (Nat, Nat))
+    sBaz_ ::
+      forall (t :: Maybe Baz).
+      Sing t -> Sing (Apply Baz_Sym0 t :: Maybe Baz)
+    sBar ::
+      forall (t :: Maybe Nat).
+      Sing t -> Sing (Apply BarSym0 t :: Maybe Nat)
+    sMaybePlus ::
+      forall (t :: Maybe Nat).
+      Sing t -> Sing (Apply MaybePlusSym0 t :: Maybe Nat)
+    sFoo SNil
+      = let
+          sP :: Sing Let0123456789876543210PSym0
+          sP = SNil
+        in sP
+    sFoo
+      (SCons (sWild_0123456789876543210 :: Sing wild_0123456789876543210)
+             SNil)
+      = let
+          sP :: Sing (Let0123456789876543210PSym1 wild_0123456789876543210)
+          sP
+            = (applySing
+                 ((applySing ((singFun2 @(:@#@$)) SCons))
+                    sWild_0123456789876543210))
+                SNil
+        in sP
+    sFoo
+      (SCons (sWild_0123456789876543210 :: Sing wild_0123456789876543210)
+             (SCons (sWild_0123456789876543210 :: Sing wild_0123456789876543210)
+                    (sWild_0123456789876543210 :: Sing wild_0123456789876543210)))
+      = let
+          sP ::
+            Sing (Let0123456789876543210PSym3 wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210)
+          sP
+            = (applySing
+                 ((applySing ((singFun2 @(:@#@$)) SCons))
+                    sWild_0123456789876543210))
+                ((applySing
+                    ((applySing ((singFun2 @(:@#@$)) SCons))
+                       sWild_0123456789876543210))
+                   sWild_0123456789876543210)
+        in sP
+    sTup
+      (STuple2 (sWild_0123456789876543210 :: Sing wild_0123456789876543210)
+               (sWild_0123456789876543210 :: Sing wild_0123456789876543210))
+      = let
+          sP ::
+            Sing (Let0123456789876543210PSym2 wild_0123456789876543210 wild_0123456789876543210)
+          sP
+            = (applySing
+                 ((applySing ((singFun2 @Tuple2Sym0) STuple2))
+                    sWild_0123456789876543210))
+                sWild_0123456789876543210
+        in sP
+    sBaz_ SNothing
+      = let
+          sP :: Sing Let0123456789876543210PSym0
+          sP = SNothing
+        in sP
+    sBaz_
+      (SJust (SBaz (sWild_0123456789876543210 :: Sing wild_0123456789876543210)
+                   (sWild_0123456789876543210 :: Sing wild_0123456789876543210)
+                   (sWild_0123456789876543210 :: Sing wild_0123456789876543210)))
+      = let
+          sP ::
+            Sing (Let0123456789876543210PSym3 wild_0123456789876543210 wild_0123456789876543210 wild_0123456789876543210)
+          sP
+            = (applySing ((singFun1 @JustSym0) SJust))
+                ((applySing
+                    ((applySing
+                        ((applySing ((singFun3 @BazSym0) SBaz)) sWild_0123456789876543210))
+                       sWild_0123456789876543210))
+                   sWild_0123456789876543210)
+        in sP
+    sBar
+      (SJust (sWild_0123456789876543210 :: Sing wild_0123456789876543210))
+      = let
+          sX :: Sing (Let0123456789876543210XSym1 wild_0123456789876543210)
+          sX
+            = (applySing ((singFun1 @JustSym0) SJust))
+                sWild_0123456789876543210
+        in sX
+    sBar SNothing = SNothing
+    sMaybePlus (SJust (sN :: Sing n))
+      = (applySing ((singFun1 @JustSym0) SJust))
+          ((applySing
+              ((applySing ((singFun2 @PlusSym0) sPlus))
+                 ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
+             sN)
+    sMaybePlus SNothing
+      = let
+          sP :: Sing Let0123456789876543210PSym0
+          sP = SNothing
+        in sP
+    instance SingI (FooSym0 :: (~>) [Nat] [Nat]) where
+      sing = (singFun1 @FooSym0) sFoo
+    instance SingI (TupSym0 :: (~>) (Nat, Nat) (Nat, Nat)) where
+      sing = (singFun1 @TupSym0) sTup
+    instance SingI (Baz_Sym0 :: (~>) (Maybe Baz) (Maybe Baz)) where
+      sing = (singFun1 @Baz_Sym0) sBaz_
+    instance SingI (BarSym0 :: (~>) (Maybe Nat) (Maybe Nat)) where
+      sing = (singFun1 @BarSym0) sBar
+    instance SingI (MaybePlusSym0 :: (~>) (Maybe Nat) (Maybe Nat)) where
+      sing = (singFun1 @MaybePlusSym0) sMaybePlus
+    data SBaz :: Baz -> GHC.Types.Type
+      where
+        SBaz :: forall (n :: Nat) (n :: Nat) (n :: Nat).
+                (Sing (n :: Nat))
+                -> (Sing (n :: Nat)) -> (Sing (n :: Nat)) -> SBaz (Baz n n n)
+    type instance Sing @Baz = SBaz
+    instance SingKind Baz where
+      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) }
+    instance (SingI n, SingI n, SingI n) =>
+             SingI (Baz (n :: Nat) (n :: Nat) (n :: Nat)) where
+      sing = ((SBaz sing) sing) sing
+    instance SingI (BazSym0 :: (~>) Nat ((~>) Nat ((~>) Nat Baz))) where
+      sing = (singFun3 @BazSym0) SBaz
+    instance SingI d =>
+             SingI (BazSym1 (d :: Nat) :: (~>) Nat ((~>) Nat Baz)) where
+      sing = (singFun2 @(BazSym1 (d :: Nat))) (SBaz (sing @d))
+    instance (SingI d, SingI d) =>
+             SingI (BazSym2 (d :: Nat) (d :: Nat) :: (~>) Nat Baz) where
+      sing
+        = (singFun1 @(BazSym2 (d :: Nat) (d :: Nat)))
+            ((SBaz (sing @d)) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/BadBoundedDeriving.ghc86.template b/tests/compile-and-dump/Singletons/BadBoundedDeriving.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/BadBoundedDeriving.ghc86.template
+++ /dev/null
@@ -1,6 +0,0 @@
-
-Singletons/BadBoundedDeriving.hs:0:0: error:
-    Can't derive Bounded instance for Foo_0 a_1.
-  |
-5 | $(singletons [d|
-  |   ^^^^^^^^^^^^^^...
diff --git a/tests/compile-and-dump/Singletons/BadBoundedDeriving.ghc88.template b/tests/compile-and-dump/Singletons/BadBoundedDeriving.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/BadBoundedDeriving.ghc88.template
@@ -0,0 +1,6 @@
+
+Singletons/BadBoundedDeriving.hs:0:0: error:
+    Can't derive Bounded instance for Foo_0 a_1.
+  |
+5 | $(singletons [d|
+  |   ^^^^^^^^^^^^^^...
diff --git a/tests/compile-and-dump/Singletons/BadEnumDeriving.ghc86.template b/tests/compile-and-dump/Singletons/BadEnumDeriving.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/BadEnumDeriving.ghc86.template
+++ /dev/null
@@ -1,6 +0,0 @@
-
-Singletons/BadEnumDeriving.hs:0:0: error:
-    Can't derive Enum instance for Foo_0 a_1.
-  |
-5 | $(singletons [d|
-  |   ^^^^^^^^^^^^^^...
diff --git a/tests/compile-and-dump/Singletons/BadEnumDeriving.ghc88.template b/tests/compile-and-dump/Singletons/BadEnumDeriving.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/BadEnumDeriving.ghc88.template
@@ -0,0 +1,6 @@
+
+Singletons/BadEnumDeriving.hs:0:0: error:
+    Can't derive Enum instance for Foo_0 a_1.
+  |
+5 | $(singletons [d|
+  |   ^^^^^^^^^^^^^^...
diff --git a/tests/compile-and-dump/Singletons/BoundedDeriving.ghc86.template b/tests/compile-and-dump/Singletons/BoundedDeriving.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/BoundedDeriving.ghc86.template
+++ /dev/null
@@ -1,249 +0,0 @@
-Singletons/BoundedDeriving.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| data Foo1
-            = Foo1
-            deriving Bounded
-          data Foo2
-            = A | B | C | D | E
-            deriving Bounded
-          data Foo3 a
-            = Foo3 a
-            deriving Bounded
-          data Foo4 (a :: Type) (b :: Type)
-            = Foo41 | Foo42
-            deriving Bounded
-          data Pair
-            = Pair Bool Bool
-            deriving Bounded |]
-  ======>
-    data Foo1
-      = Foo1
-      deriving Bounded
-    data Foo2
-      = A | B | C | D | E
-      deriving Bounded
-    data Foo3 a
-      = Foo3 a
-      deriving Bounded
-    data Foo4 (a :: Type) (b :: Type)
-      = Foo41 | Foo42
-      deriving Bounded
-    data Pair
-      = Pair Bool Bool
-      deriving Bounded
-    type Foo1Sym0 = Foo1
-    type ASym0 = A
-    type BSym0 = B
-    type CSym0 = C
-    type DSym0 = D
-    type ESym0 = E
-    type Foo3Sym1 (t0123456789876543210 :: a0123456789876543210) =
-        Foo3 t0123456789876543210
-    instance SuppressUnusedWarnings Foo3Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ())
-    data Foo3Sym0 :: forall a0123456789876543210.
-                     (~>) a0123456789876543210 (Foo3 a0123456789876543210)
-      where
-        Foo3Sym0KindInference :: forall t0123456789876543210
-                                        arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>
-                                 Foo3Sym0 t0123456789876543210
-    type instance Apply Foo3Sym0 t0123456789876543210 = Foo3 t0123456789876543210
-    type Foo41Sym0 = Foo41
-    type Foo42Sym0 = Foo42
-    type PairSym2 (t0123456789876543210 :: Bool) (t0123456789876543210 :: Bool) =
-        Pair t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (PairSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) PairSym1KindInference) ())
-    data PairSym1 (t0123456789876543210 :: Bool) :: (~>) Bool Pair
-      where
-        PairSym1KindInference :: forall t0123456789876543210
-                                        t0123456789876543210
-                                        arg. SameKind (Apply (PairSym1 t0123456789876543210) arg) (PairSym2 t0123456789876543210 arg) =>
-                                 PairSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (PairSym1 t0123456789876543210) t0123456789876543210 = Pair t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings PairSym0 where
-      suppressUnusedWarnings = snd (((,) PairSym0KindInference) ())
-    data PairSym0 :: (~>) Bool ((~>) Bool Pair)
-      where
-        PairSym0KindInference :: forall t0123456789876543210
-                                        arg. SameKind (Apply PairSym0 arg) (PairSym1 arg) =>
-                                 PairSym0 t0123456789876543210
-    type instance Apply PairSym0 t0123456789876543210 = PairSym1 t0123456789876543210
-    type family MinBound_0123456789876543210 :: Foo1 where
-      MinBound_0123456789876543210 = Foo1Sym0
-    type MinBound_0123456789876543210Sym0 =
-        MinBound_0123456789876543210
-    type family MaxBound_0123456789876543210 :: Foo1 where
-      MaxBound_0123456789876543210 = Foo1Sym0
-    type MaxBound_0123456789876543210Sym0 =
-        MaxBound_0123456789876543210
-    instance PBounded Foo1 where
-      type MinBound = MinBound_0123456789876543210Sym0
-      type MaxBound = MaxBound_0123456789876543210Sym0
-    type family MinBound_0123456789876543210 :: Foo2 where
-      MinBound_0123456789876543210 = ASym0
-    type MinBound_0123456789876543210Sym0 =
-        MinBound_0123456789876543210
-    type family MaxBound_0123456789876543210 :: Foo2 where
-      MaxBound_0123456789876543210 = ESym0
-    type MaxBound_0123456789876543210Sym0 =
-        MaxBound_0123456789876543210
-    instance PBounded Foo2 where
-      type MinBound = MinBound_0123456789876543210Sym0
-      type MaxBound = MaxBound_0123456789876543210Sym0
-    type family MinBound_0123456789876543210 :: Foo3 a where
-      MinBound_0123456789876543210 = Apply Foo3Sym0 MinBoundSym0
-    type MinBound_0123456789876543210Sym0 =
-        MinBound_0123456789876543210
-    type family MaxBound_0123456789876543210 :: Foo3 a where
-      MaxBound_0123456789876543210 = Apply Foo3Sym0 MaxBoundSym0
-    type MaxBound_0123456789876543210Sym0 =
-        MaxBound_0123456789876543210
-    instance PBounded (Foo3 a) where
-      type MinBound = MinBound_0123456789876543210Sym0
-      type MaxBound = MaxBound_0123456789876543210Sym0
-    type family MinBound_0123456789876543210 :: Foo4 a b where
-      MinBound_0123456789876543210 = Foo41Sym0
-    type MinBound_0123456789876543210Sym0 =
-        MinBound_0123456789876543210
-    type family MaxBound_0123456789876543210 :: Foo4 a b where
-      MaxBound_0123456789876543210 = Foo42Sym0
-    type MaxBound_0123456789876543210Sym0 =
-        MaxBound_0123456789876543210
-    instance PBounded (Foo4 a b) where
-      type MinBound = MinBound_0123456789876543210Sym0
-      type MaxBound = MaxBound_0123456789876543210Sym0
-    type family MinBound_0123456789876543210 :: Pair where
-      MinBound_0123456789876543210 = Apply (Apply PairSym0 MinBoundSym0) MinBoundSym0
-    type MinBound_0123456789876543210Sym0 =
-        MinBound_0123456789876543210
-    type family MaxBound_0123456789876543210 :: Pair where
-      MaxBound_0123456789876543210 = Apply (Apply PairSym0 MaxBoundSym0) MaxBoundSym0
-    type MaxBound_0123456789876543210Sym0 =
-        MaxBound_0123456789876543210
-    instance PBounded Pair where
-      type MinBound = MinBound_0123456789876543210Sym0
-      type MaxBound = MaxBound_0123456789876543210Sym0
-    data instance Sing :: Foo1 -> Type where SFoo1 :: Sing Foo1
-    type SFoo1 = (Sing :: Foo1 -> Type)
-    instance SingKind Foo1 where
-      type Demote Foo1 = Foo1
-      fromSing SFoo1 = Foo1
-      toSing Foo1 = SomeSing SFoo1
-    data instance Sing :: Foo2 -> Type
-      where
-        SA :: Sing A
-        SB :: Sing B
-        SC :: Sing C
-        SD :: Sing D
-        SE :: Sing E
-    type SFoo2 = (Sing :: Foo2 -> Type)
-    instance SingKind Foo2 where
-      type Demote Foo2 = Foo2
-      fromSing SA = A
-      fromSing SB = B
-      fromSing SC = C
-      fromSing SD = D
-      fromSing SE = E
-      toSing A = SomeSing SA
-      toSing B = SomeSing SB
-      toSing C = SomeSing SC
-      toSing D = SomeSing SD
-      toSing E = SomeSing SE
-    data instance Sing :: Foo3 a -> Type
-      where SFoo3 :: forall a (n :: a). (Sing (n :: a)) -> Sing (Foo3 n)
-    type SFoo3 = (Sing :: Foo3 a -> Type)
-    instance SingKind a => SingKind (Foo3 a) where
-      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) }
-    data instance Sing :: Foo4 a b -> Type
-      where
-        SFoo41 :: Sing Foo41
-        SFoo42 :: Sing Foo42
-    type SFoo4 = (Sing :: Foo4 a b -> Type)
-    instance (SingKind a, SingKind b) => SingKind (Foo4 a b) where
-      type Demote (Foo4 a b) = Foo4 (Demote a) (Demote b)
-      fromSing SFoo41 = Foo41
-      fromSing SFoo42 = Foo42
-      toSing Foo41 = SomeSing SFoo41
-      toSing Foo42 = SomeSing SFoo42
-    data instance Sing :: Pair -> Type
-      where
-        SPair :: forall (n :: Bool) (n :: Bool).
-                 (Sing (n :: Bool)) -> (Sing (n :: Bool)) -> Sing (Pair n n)
-    type SPair = (Sing :: Pair -> Type)
-    instance SingKind Pair where
-      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) }
-    instance SBounded Foo1 where
-      sMinBound :: Sing (MinBoundSym0 :: Foo1)
-      sMaxBound :: Sing (MaxBoundSym0 :: Foo1)
-      sMinBound = SFoo1
-      sMaxBound = SFoo1
-    instance SBounded Foo2 where
-      sMinBound :: Sing (MinBoundSym0 :: Foo2)
-      sMaxBound :: Sing (MaxBoundSym0 :: Foo2)
-      sMinBound = SA
-      sMaxBound = SE
-    instance SBounded a => SBounded (Foo3 a) where
-      sMinBound :: Sing (MinBoundSym0 :: Foo3 a)
-      sMaxBound :: Sing (MaxBoundSym0 :: Foo3 a)
-      sMinBound = (applySing ((singFun1 @Foo3Sym0) SFoo3)) sMinBound
-      sMaxBound = (applySing ((singFun1 @Foo3Sym0) SFoo3)) sMaxBound
-    instance SBounded (Foo4 a b) where
-      sMinBound :: Sing (MinBoundSym0 :: Foo4 a b)
-      sMaxBound :: Sing (MaxBoundSym0 :: Foo4 a b)
-      sMinBound = SFoo41
-      sMaxBound = SFoo42
-    instance SBounded Bool => SBounded Pair where
-      sMinBound :: Sing (MinBoundSym0 :: Pair)
-      sMaxBound :: Sing (MaxBoundSym0 :: Pair)
-      sMinBound
-        = (applySing ((applySing ((singFun2 @PairSym0) SPair)) sMinBound))
-            sMinBound
-      sMaxBound
-        = (applySing ((applySing ((singFun2 @PairSym0) SPair)) sMaxBound))
-            sMaxBound
-    instance SingI Foo1 where
-      sing = SFoo1
-    instance SingI A where
-      sing = SA
-    instance SingI B where
-      sing = SB
-    instance SingI C where
-      sing = SC
-    instance SingI D where
-      sing = SD
-    instance SingI E where
-      sing = SE
-    instance SingI n => SingI (Foo3 (n :: a)) where
-      sing = SFoo3 sing
-    instance SingI (Foo3Sym0 :: (~>) a (Foo3 a)) where
-      sing = (singFun1 @Foo3Sym0) SFoo3
-    instance SingI (TyCon1 Foo3 :: (~>) a (Foo3 a)) where
-      sing = (singFun1 @(TyCon1 Foo3)) SFoo3
-    instance SingI Foo41 where
-      sing = SFoo41
-    instance SingI Foo42 where
-      sing = SFoo42
-    instance (SingI n, SingI n) =>
-             SingI (Pair (n :: Bool) (n :: Bool)) where
-      sing = (SPair sing) sing
-    instance SingI (PairSym0 :: (~>) Bool ((~>) Bool Pair)) where
-      sing = (singFun2 @PairSym0) SPair
-    instance SingI (TyCon2 Pair :: (~>) Bool ((~>) Bool Pair)) where
-      sing = (singFun2 @(TyCon2 Pair)) SPair
-    instance SingI d =>
-             SingI (PairSym1 (d :: Bool) :: (~>) Bool Pair) where
-      sing = (singFun1 @(PairSym1 (d :: Bool))) (SPair (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 (Pair (d :: Bool)) :: (~>) Bool Pair) where
-      sing = (singFun1 @(TyCon1 (Pair (d :: Bool)))) (SPair (sing @d))
diff --git a/tests/compile-and-dump/Singletons/BoundedDeriving.ghc88.template b/tests/compile-and-dump/Singletons/BoundedDeriving.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/BoundedDeriving.ghc88.template
@@ -0,0 +1,242 @@
+Singletons/BoundedDeriving.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| data Foo1
+            = Foo1
+            deriving Bounded
+          data Foo2
+            = A | B | C | D | E
+            deriving Bounded
+          data Foo3 a
+            = Foo3 a
+            deriving Bounded
+          data Foo4 (a :: Type) (b :: Type)
+            = Foo41 | Foo42
+            deriving Bounded
+          data Pair
+            = Pair Bool Bool
+            deriving Bounded |]
+  ======>
+    data Foo1
+      = Foo1
+      deriving Bounded
+    data Foo2
+      = A | B | C | D | E
+      deriving Bounded
+    data Foo3 a
+      = Foo3 a
+      deriving Bounded
+    data Foo4 (a :: Type) (b :: Type)
+      = Foo41 | Foo42
+      deriving Bounded
+    data Pair
+      = Pair Bool Bool
+      deriving Bounded
+    type Foo1Sym0 = Foo1
+    type ASym0 = A
+    type BSym0 = B
+    type CSym0 = C
+    type DSym0 = D
+    type ESym0 = E
+    type Foo3Sym1 (t0123456789876543210 :: a0123456789876543210) =
+        Foo3 t0123456789876543210
+    instance SuppressUnusedWarnings Foo3Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ())
+    data Foo3Sym0 :: forall a0123456789876543210.
+                     (~>) a0123456789876543210 (Foo3 a0123456789876543210)
+      where
+        Foo3Sym0KindInference :: forall t0123456789876543210
+                                        arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>
+                                 Foo3Sym0 t0123456789876543210
+    type instance Apply Foo3Sym0 t0123456789876543210 = Foo3 t0123456789876543210
+    type Foo41Sym0 = Foo41
+    type Foo42Sym0 = Foo42
+    type PairSym2 (t0123456789876543210 :: Bool) (t0123456789876543210 :: Bool) =
+        Pair t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (PairSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) PairSym1KindInference) ())
+    data PairSym1 (t0123456789876543210 :: Bool) :: (~>) Bool Pair
+      where
+        PairSym1KindInference :: forall t0123456789876543210
+                                        t0123456789876543210
+                                        arg. SameKind (Apply (PairSym1 t0123456789876543210) arg) (PairSym2 t0123456789876543210 arg) =>
+                                 PairSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (PairSym1 t0123456789876543210) t0123456789876543210 = Pair t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings PairSym0 where
+      suppressUnusedWarnings = snd (((,) PairSym0KindInference) ())
+    data PairSym0 :: (~>) Bool ((~>) Bool Pair)
+      where
+        PairSym0KindInference :: forall t0123456789876543210
+                                        arg. SameKind (Apply PairSym0 arg) (PairSym1 arg) =>
+                                 PairSym0 t0123456789876543210
+    type instance Apply PairSym0 t0123456789876543210 = PairSym1 t0123456789876543210
+    type family MinBound_0123456789876543210 :: Foo1 where
+      MinBound_0123456789876543210 = Foo1Sym0
+    type MinBound_0123456789876543210Sym0 =
+        MinBound_0123456789876543210
+    type family MaxBound_0123456789876543210 :: Foo1 where
+      MaxBound_0123456789876543210 = Foo1Sym0
+    type MaxBound_0123456789876543210Sym0 =
+        MaxBound_0123456789876543210
+    instance PBounded Foo1 where
+      type MinBound = MinBound_0123456789876543210Sym0
+      type MaxBound = MaxBound_0123456789876543210Sym0
+    type family MinBound_0123456789876543210 :: Foo2 where
+      MinBound_0123456789876543210 = ASym0
+    type MinBound_0123456789876543210Sym0 =
+        MinBound_0123456789876543210
+    type family MaxBound_0123456789876543210 :: Foo2 where
+      MaxBound_0123456789876543210 = ESym0
+    type MaxBound_0123456789876543210Sym0 =
+        MaxBound_0123456789876543210
+    instance PBounded Foo2 where
+      type MinBound = MinBound_0123456789876543210Sym0
+      type MaxBound = MaxBound_0123456789876543210Sym0
+    type family MinBound_0123456789876543210 :: Foo3 a where
+      MinBound_0123456789876543210 = Apply Foo3Sym0 MinBoundSym0
+    type MinBound_0123456789876543210Sym0 =
+        MinBound_0123456789876543210
+    type family MaxBound_0123456789876543210 :: Foo3 a where
+      MaxBound_0123456789876543210 = Apply Foo3Sym0 MaxBoundSym0
+    type MaxBound_0123456789876543210Sym0 =
+        MaxBound_0123456789876543210
+    instance PBounded (Foo3 a) where
+      type MinBound = MinBound_0123456789876543210Sym0
+      type MaxBound = MaxBound_0123456789876543210Sym0
+    type family MinBound_0123456789876543210 :: Foo4 a b where
+      MinBound_0123456789876543210 = Foo41Sym0
+    type MinBound_0123456789876543210Sym0 =
+        MinBound_0123456789876543210
+    type family MaxBound_0123456789876543210 :: Foo4 a b where
+      MaxBound_0123456789876543210 = Foo42Sym0
+    type MaxBound_0123456789876543210Sym0 =
+        MaxBound_0123456789876543210
+    instance PBounded (Foo4 a b) where
+      type MinBound = MinBound_0123456789876543210Sym0
+      type MaxBound = MaxBound_0123456789876543210Sym0
+    type family MinBound_0123456789876543210 :: Pair where
+      MinBound_0123456789876543210 = Apply (Apply PairSym0 MinBoundSym0) MinBoundSym0
+    type MinBound_0123456789876543210Sym0 =
+        MinBound_0123456789876543210
+    type family MaxBound_0123456789876543210 :: Pair where
+      MaxBound_0123456789876543210 = Apply (Apply PairSym0 MaxBoundSym0) MaxBoundSym0
+    type MaxBound_0123456789876543210Sym0 =
+        MaxBound_0123456789876543210
+    instance PBounded Pair where
+      type MinBound = MinBound_0123456789876543210Sym0
+      type MaxBound = MaxBound_0123456789876543210Sym0
+    data SFoo1 :: Foo1 -> Type where SFoo1 :: SFoo1 Foo1
+    type instance Sing @Foo1 = SFoo1
+    instance SingKind Foo1 where
+      type Demote Foo1 = Foo1
+      fromSing SFoo1 = Foo1
+      toSing Foo1 = SomeSing SFoo1
+    data SFoo2 :: Foo2 -> Type
+      where
+        SA :: SFoo2 A
+        SB :: SFoo2 B
+        SC :: SFoo2 C
+        SD :: SFoo2 D
+        SE :: SFoo2 E
+    type instance Sing @Foo2 = SFoo2
+    instance SingKind Foo2 where
+      type Demote Foo2 = Foo2
+      fromSing SA = A
+      fromSing SB = B
+      fromSing SC = C
+      fromSing SD = D
+      fromSing SE = E
+      toSing A = SomeSing SA
+      toSing B = SomeSing SB
+      toSing C = SomeSing SC
+      toSing D = SomeSing SD
+      toSing E = SomeSing SE
+    data SFoo3 :: forall a. Foo3 a -> Type
+      where SFoo3 :: forall a (n :: a). (Sing (n :: a)) -> SFoo3 (Foo3 n)
+    type instance Sing @(Foo3 a) = SFoo3
+    instance SingKind a => SingKind (Foo3 a) where
+      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) }
+    data SFoo4 :: forall a b. Foo4 a b -> Type
+      where
+        SFoo41 :: SFoo4 Foo41
+        SFoo42 :: SFoo4 Foo42
+    type instance Sing @(Foo4 a b) = SFoo4
+    instance (SingKind a, SingKind b) => SingKind (Foo4 a b) where
+      type Demote (Foo4 a b) = Foo4 (Demote a) (Demote b)
+      fromSing SFoo41 = Foo41
+      fromSing SFoo42 = Foo42
+      toSing Foo41 = SomeSing SFoo41
+      toSing Foo42 = SomeSing SFoo42
+    data SPair :: Pair -> Type
+      where
+        SPair :: forall (n :: Bool) (n :: Bool).
+                 (Sing (n :: Bool)) -> (Sing (n :: Bool)) -> SPair (Pair n n)
+    type instance Sing @Pair = SPair
+    instance SingKind Pair where
+      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) }
+    instance SBounded Foo1 where
+      sMinBound :: Sing (MinBoundSym0 :: Foo1)
+      sMaxBound :: Sing (MaxBoundSym0 :: Foo1)
+      sMinBound = SFoo1
+      sMaxBound = SFoo1
+    instance SBounded Foo2 where
+      sMinBound :: Sing (MinBoundSym0 :: Foo2)
+      sMaxBound :: Sing (MaxBoundSym0 :: Foo2)
+      sMinBound = SA
+      sMaxBound = SE
+    instance SBounded a => SBounded (Foo3 a) where
+      sMinBound :: Sing (MinBoundSym0 :: Foo3 a)
+      sMaxBound :: Sing (MaxBoundSym0 :: Foo3 a)
+      sMinBound = (applySing ((singFun1 @Foo3Sym0) SFoo3)) sMinBound
+      sMaxBound = (applySing ((singFun1 @Foo3Sym0) SFoo3)) sMaxBound
+    instance SBounded (Foo4 a b) where
+      sMinBound :: Sing (MinBoundSym0 :: Foo4 a b)
+      sMaxBound :: Sing (MaxBoundSym0 :: Foo4 a b)
+      sMinBound = SFoo41
+      sMaxBound = SFoo42
+    instance SBounded Bool => SBounded Pair where
+      sMinBound :: Sing (MinBoundSym0 :: Pair)
+      sMaxBound :: Sing (MaxBoundSym0 :: Pair)
+      sMinBound
+        = (applySing ((applySing ((singFun2 @PairSym0) SPair)) sMinBound))
+            sMinBound
+      sMaxBound
+        = (applySing ((applySing ((singFun2 @PairSym0) SPair)) sMaxBound))
+            sMaxBound
+    instance SingI Foo1 where
+      sing = SFoo1
+    instance SingI A where
+      sing = SA
+    instance SingI B where
+      sing = SB
+    instance SingI C where
+      sing = SC
+    instance SingI D where
+      sing = SD
+    instance SingI E where
+      sing = SE
+    instance SingI n => SingI (Foo3 (n :: a)) where
+      sing = SFoo3 sing
+    instance SingI (Foo3Sym0 :: (~>) a (Foo3 a)) where
+      sing = (singFun1 @Foo3Sym0) SFoo3
+    instance SingI Foo41 where
+      sing = SFoo41
+    instance SingI Foo42 where
+      sing = SFoo42
+    instance (SingI n, SingI n) =>
+             SingI (Pair (n :: Bool) (n :: Bool)) where
+      sing = (SPair sing) sing
+    instance SingI (PairSym0 :: (~>) Bool ((~>) Bool Pair)) where
+      sing = (singFun2 @PairSym0) SPair
+    instance SingI d =>
+             SingI (PairSym1 (d :: Bool) :: (~>) Bool Pair) where
+      sing = (singFun1 @(PairSym1 (d :: Bool))) (SPair (sing @d))
diff --git a/tests/compile-and-dump/Singletons/BoxUnBox.ghc86.template b/tests/compile-and-dump/Singletons/BoxUnBox.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/BoxUnBox.ghc86.template
+++ /dev/null
@@ -1,54 +0,0 @@
-Singletons/BoxUnBox.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| unBox :: Box a -> a
-          unBox (FBox a) = a
-          
-          data Box a = FBox a |]
-  ======>
-    data Box a = FBox a
-    unBox :: Box a -> a
-    unBox (FBox a) = a
-    type FBoxSym1 (t0123456789876543210 :: a0123456789876543210) =
-        FBox t0123456789876543210
-    instance SuppressUnusedWarnings FBoxSym0 where
-      suppressUnusedWarnings = snd (((,) FBoxSym0KindInference) ())
-    data FBoxSym0 :: forall a0123456789876543210.
-                     (~>) a0123456789876543210 (Box a0123456789876543210)
-      where
-        FBoxSym0KindInference :: forall t0123456789876543210
-                                        arg. SameKind (Apply FBoxSym0 arg) (FBoxSym1 arg) =>
-                                 FBoxSym0 t0123456789876543210
-    type instance Apply FBoxSym0 t0123456789876543210 = FBox t0123456789876543210
-    type UnBoxSym1 (a0123456789876543210 :: Box a0123456789876543210) =
-        UnBox a0123456789876543210
-    instance SuppressUnusedWarnings UnBoxSym0 where
-      suppressUnusedWarnings = snd (((,) UnBoxSym0KindInference) ())
-    data UnBoxSym0 :: forall a0123456789876543210.
-                      (~>) (Box a0123456789876543210) a0123456789876543210
-      where
-        UnBoxSym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply UnBoxSym0 arg) (UnBoxSym1 arg) =>
-                                  UnBoxSym0 a0123456789876543210
-    type instance Apply UnBoxSym0 a0123456789876543210 = UnBox a0123456789876543210
-    type family UnBox (a :: Box a) :: a where
-      UnBox (FBox a) = a
-    sUnBox ::
-      forall a (t :: Box a). Sing t -> Sing (Apply UnBoxSym0 t :: a)
-    sUnBox (SFBox (sA :: Sing a)) = sA
-    instance SingI (UnBoxSym0 :: (~>) (Box a) a) where
-      sing = (singFun1 @UnBoxSym0) sUnBox
-    data instance Sing :: Box a -> GHC.Types.Type
-      where SFBox :: forall a (n :: a). (Sing (n :: a)) -> Sing (FBox n)
-    type SBox = (Sing :: Box a -> GHC.Types.Type)
-    instance SingKind a => SingKind (Box a) where
-      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) }
-    instance SingI n => SingI (FBox (n :: a)) where
-      sing = SFBox sing
-    instance SingI (FBoxSym0 :: (~>) a (Box a)) where
-      sing = (singFun1 @FBoxSym0) SFBox
-    instance SingI (TyCon1 FBox :: (~>) a (Box a)) where
-      sing = (singFun1 @(TyCon1 FBox)) SFBox
diff --git a/tests/compile-and-dump/Singletons/BoxUnBox.ghc88.template b/tests/compile-and-dump/Singletons/BoxUnBox.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/BoxUnBox.ghc88.template
@@ -0,0 +1,52 @@
+Singletons/BoxUnBox.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| unBox :: Box a -> a
+          unBox (FBox a) = a
+          
+          data Box a = FBox a |]
+  ======>
+    data Box a = FBox a
+    unBox :: Box a -> a
+    unBox (FBox a) = a
+    type FBoxSym1 (t0123456789876543210 :: a0123456789876543210) =
+        FBox t0123456789876543210
+    instance SuppressUnusedWarnings FBoxSym0 where
+      suppressUnusedWarnings = snd (((,) FBoxSym0KindInference) ())
+    data FBoxSym0 :: forall a0123456789876543210.
+                     (~>) a0123456789876543210 (Box a0123456789876543210)
+      where
+        FBoxSym0KindInference :: forall t0123456789876543210
+                                        arg. SameKind (Apply FBoxSym0 arg) (FBoxSym1 arg) =>
+                                 FBoxSym0 t0123456789876543210
+    type instance Apply FBoxSym0 t0123456789876543210 = FBox t0123456789876543210
+    type UnBoxSym1 (a0123456789876543210 :: Box a0123456789876543210) =
+        UnBox a0123456789876543210
+    instance SuppressUnusedWarnings UnBoxSym0 where
+      suppressUnusedWarnings = snd (((,) UnBoxSym0KindInference) ())
+    data UnBoxSym0 :: forall a0123456789876543210.
+                      (~>) (Box a0123456789876543210) a0123456789876543210
+      where
+        UnBoxSym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply UnBoxSym0 arg) (UnBoxSym1 arg) =>
+                                  UnBoxSym0 a0123456789876543210
+    type instance Apply UnBoxSym0 a0123456789876543210 = UnBox a0123456789876543210
+    type family UnBox (a :: Box a) :: a where
+      UnBox (FBox a) = a
+    sUnBox ::
+      forall a (t :: Box a). Sing t -> Sing (Apply UnBoxSym0 t :: a)
+    sUnBox (SFBox (sA :: Sing a)) = sA
+    instance SingI (UnBoxSym0 :: (~>) (Box a) a) where
+      sing = (singFun1 @UnBoxSym0) sUnBox
+    data SBox :: forall a. Box a -> GHC.Types.Type
+      where SFBox :: forall a (n :: a). (Sing (n :: a)) -> SBox (FBox n)
+    type instance Sing @(Box a) = SBox
+    instance SingKind a => SingKind (Box a) where
+      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) }
+    instance SingI n => SingI (FBox (n :: a)) where
+      sing = SFBox sing
+    instance SingI (FBoxSym0 :: (~>) a (Box a)) where
+      sing = (singFun1 @FBoxSym0) SFBox
diff --git a/tests/compile-and-dump/Singletons/CaseExpressions.ghc86.template b/tests/compile-and-dump/Singletons/CaseExpressions.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/CaseExpressions.ghc86.template
+++ /dev/null
@@ -1,319 +0,0 @@
-Singletons/CaseExpressions.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| foo1 :: a -> Maybe a -> a
-          foo1 d x
-            = case x of
-                Just y -> y
-                Nothing -> d
-          foo2 :: a -> Maybe a -> a
-          foo2 d _ = case (Just d) of { Just y -> y }
-          foo3 :: a -> b -> a
-          foo3 a b = case (a, b) of { (p, _) -> p }
-          foo4 :: forall a. a -> a
-          foo4 x
-            = case x of {
-                y -> let
-                       z :: a
-                       z = y
-                     in z }
-          foo5 :: a -> a
-          foo5 x = case x of { y -> (\ _ -> x) y } |]
-  ======>
-    foo1 :: a -> Maybe a -> a
-    foo1 d x
-      = case x of
-          Just y -> y
-          Nothing -> d
-    foo2 :: a -> Maybe a -> a
-    foo2 d _ = case Just d of { Just y -> y }
-    foo3 :: a -> b -> a
-    foo3 a b = case (a, b) of { (p, _) -> p }
-    foo4 :: forall a. a -> a
-    foo4 x
-      = case x of {
-          y -> let
-                 z :: a
-                 z = y
-               in z }
-    foo5 :: a -> a
-    foo5 x = case x of { y -> (\ _ -> x) y }
-    type family Case_0123456789876543210 x y arg_0123456789876543210 t where
-      Case_0123456789876543210 x y arg_0123456789876543210 _ = x
-    type family Lambda_0123456789876543210 x y t where
-      Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210
-    type Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
-    type family Case_0123456789876543210 x t where
-      Case_0123456789876543210 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) y
-    type Let0123456789876543210ZSym2 x0123456789876543210 y0123456789876543210 =
-        Let0123456789876543210Z x0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210ZSym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210ZSym1KindInference) ())
-    data Let0123456789876543210ZSym1 x0123456789876543210 y0123456789876543210
-      where
-        Let0123456789876543210ZSym1KindInference :: forall x0123456789876543210
-                                                           y0123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210ZSym1 x0123456789876543210) arg) (Let0123456789876543210ZSym2 x0123456789876543210 arg) =>
-                                                    Let0123456789876543210ZSym1 x0123456789876543210 y0123456789876543210
-    type instance Apply (Let0123456789876543210ZSym1 x0123456789876543210) y0123456789876543210 = Let0123456789876543210Z x0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210ZSym0KindInference) ())
-    data Let0123456789876543210ZSym0 x0123456789876543210
-      where
-        Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>
-                                                    Let0123456789876543210ZSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210ZSym1 x0123456789876543210
-    type family Let0123456789876543210Z x y :: a where
-      Let0123456789876543210Z x y = y
-    type family Case_0123456789876543210 x t where
-      Case_0123456789876543210 x y = Let0123456789876543210ZSym2 x y
-    type Let0123456789876543210Scrutinee_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 =
-        Let0123456789876543210Scrutinee_0123456789876543210 a0123456789876543210 b0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd
-            (((,)
-                Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference)
-               ())
-    data Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
-      where
-        Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                                       b0123456789876543210
-                                                                                       arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
-    type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210) b0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 a0123456789876543210 b0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd
-            (((,)
-                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
-               ())
-    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 a0123456789876543210
-      where
-        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
-                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 a0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210
-    type family Let0123456789876543210Scrutinee_0123456789876543210 a b where
-      Let0123456789876543210Scrutinee_0123456789876543210 a b = Apply (Apply Tuple2Sym0 a) b
-    type family Case_0123456789876543210 a b t where
-      Case_0123456789876543210 a b '(p, _) = p
-    type Let0123456789876543210Scrutinee_0123456789876543210Sym1 d0123456789876543210 =
-        Let0123456789876543210Scrutinee_0123456789876543210 d0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd
-            (((,)
-                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
-               ())
-    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 d0123456789876543210
-      where
-        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall d0123456789876543210
-                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
-                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 d0123456789876543210
-    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 d0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 d0123456789876543210
-    type family Let0123456789876543210Scrutinee_0123456789876543210 d where
-      Let0123456789876543210Scrutinee_0123456789876543210 d = Apply JustSym0 d
-    type family Case_0123456789876543210 d t where
-      Case_0123456789876543210 d ( 'Just y) = y
-    type family Case_0123456789876543210 d x t where
-      Case_0123456789876543210 d x ( 'Just y) = y
-      Case_0123456789876543210 d x  'Nothing = d
-    type Foo5Sym1 (a0123456789876543210 :: a0123456789876543210) =
-        Foo5 a0123456789876543210
-    instance SuppressUnusedWarnings Foo5Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ())
-    data Foo5Sym0 :: forall a0123456789876543210.
-                     (~>) a0123456789876543210 a0123456789876543210
-      where
-        Foo5Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) =>
-                                 Foo5Sym0 a0123456789876543210
-    type instance Apply Foo5Sym0 a0123456789876543210 = Foo5 a0123456789876543210
-    type Foo4Sym1 (a0123456789876543210 :: a0123456789876543210) =
-        Foo4 a0123456789876543210
-    instance SuppressUnusedWarnings Foo4Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ())
-    data Foo4Sym0 :: forall a0123456789876543210.
-                     (~>) a0123456789876543210 a0123456789876543210
-      where
-        Foo4Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) =>
-                                 Foo4Sym0 a0123456789876543210
-    type instance Apply Foo4Sym0 a0123456789876543210 = Foo4 a0123456789876543210
-    type Foo3Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
-        Foo3 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo3Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo3Sym1KindInference) ())
-    data Foo3Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                    (~>) b0123456789876543210 a0123456789876543210
-      where
-        Foo3Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo3Sym1 a0123456789876543210) arg) (Foo3Sym2 a0123456789876543210 arg) =>
-                                 Foo3Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo3Sym1 a0123456789876543210) a0123456789876543210 = Foo3 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo3Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ())
-    data Foo3Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
-      where
-        Foo3Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>
-                                 Foo3Sym0 a0123456789876543210
-    type instance Apply Foo3Sym0 a0123456789876543210 = Foo3Sym1 a0123456789876543210
-    type Foo2Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) =
-        Foo2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo2Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo2Sym1KindInference) ())
-    data Foo2Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) (Maybe a0123456789876543210) a0123456789876543210
-      where
-        Foo2Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo2Sym1 a0123456789876543210) arg) (Foo2Sym2 a0123456789876543210 arg) =>
-                                 Foo2Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo2Sym1 a0123456789876543210) a0123456789876543210 = Foo2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo2Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ())
-    data Foo2Sym0 :: forall a0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) a0123456789876543210)
-      where
-        Foo2Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) =>
-                                 Foo2Sym0 a0123456789876543210
-    type instance Apply Foo2Sym0 a0123456789876543210 = Foo2Sym1 a0123456789876543210
-    type Foo1Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) =
-        Foo1 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo1Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo1Sym1KindInference) ())
-    data Foo1Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) (Maybe a0123456789876543210) a0123456789876543210
-      where
-        Foo1Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo1Sym1 a0123456789876543210) arg) (Foo1Sym2 a0123456789876543210 arg) =>
-                                 Foo1Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo1Sym1 a0123456789876543210) a0123456789876543210 = Foo1 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo1Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ())
-    data Foo1Sym0 :: forall a0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) a0123456789876543210)
-      where
-        Foo1Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>
-                                 Foo1Sym0 a0123456789876543210
-    type instance Apply Foo1Sym0 a0123456789876543210 = Foo1Sym1 a0123456789876543210
-    type family Foo5 (a :: a) :: a where
-      Foo5 x = Case_0123456789876543210 x x
-    type family Foo4 (a :: a) :: a where
-      Foo4 x = Case_0123456789876543210 x x
-    type family Foo3 (a :: a) (a :: b) :: a where
-      Foo3 a b = Case_0123456789876543210 a b (Let0123456789876543210Scrutinee_0123456789876543210Sym2 a b)
-    type family Foo2 (a :: a) (a :: Maybe a) :: a where
-      Foo2 d _ = Case_0123456789876543210 d (Let0123456789876543210Scrutinee_0123456789876543210Sym1 d)
-    type family Foo1 (a :: a) (a :: Maybe a) :: a where
-      Foo1 d x = Case_0123456789876543210 d x x
-    sFoo5 :: forall a (t :: a). Sing t -> Sing (Apply Foo5Sym0 t :: a)
-    sFoo4 :: forall a (t :: a). Sing t -> Sing (Apply Foo4Sym0 t :: a)
-    sFoo3 ::
-      forall a b (t :: a) (t :: b).
-      Sing t -> Sing t -> Sing (Apply (Apply Foo3Sym0 t) t :: a)
-    sFoo2 ::
-      forall a (t :: a) (t :: Maybe a).
-      Sing t -> Sing t -> Sing (Apply (Apply Foo2Sym0 t) t :: a)
-    sFoo1 ::
-      forall a (t :: a) (t :: Maybe a).
-      Sing t -> Sing t -> Sing (Apply (Apply Foo1Sym0 t) t :: a)
-    sFoo5 (sX :: Sing x)
-      = (case sX of {
-           (sY :: Sing y)
-             -> (applySing
-                   ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 x) y))
-                      (\ sArg_0123456789876543210
-                         -> case sArg_0123456789876543210 of {
-                              (_ :: Sing arg_0123456789876543210)
-                                -> (case sArg_0123456789876543210 of { _ -> sX }) ::
-                                     Sing (Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210) })))
-                  sY }) ::
-          Sing (Case_0123456789876543210 x x :: a)
-    sFoo4 (sX :: Sing x)
-      = (case sX of {
-           (sY :: Sing y)
-             -> let
-                  sZ :: Sing (Let0123456789876543210ZSym2 x y :: a)
-                  sZ = sY
-                in sZ }) ::
-          Sing (Case_0123456789876543210 x x :: a)
-    sFoo3 (sA :: Sing a) (sB :: Sing b)
-      = let
-          sScrutinee_0123456789876543210 ::
-            Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym2 a b)
-          sScrutinee_0123456789876543210
-            = (applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sA)) sB
-        in  (case sScrutinee_0123456789876543210 of {
-               STuple2 (sP :: Sing p) _ -> sP }) ::
-              Sing (Case_0123456789876543210 a b (Let0123456789876543210Scrutinee_0123456789876543210Sym2 a b) :: a)
-    sFoo2 (sD :: Sing d) _
-      = let
-          sScrutinee_0123456789876543210 ::
-            Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym1 d)
-          sScrutinee_0123456789876543210
-            = (applySing ((singFun1 @JustSym0) SJust)) sD
-        in  (case sScrutinee_0123456789876543210 of {
-               SJust (sY :: Sing y) -> sY }) ::
-              Sing (Case_0123456789876543210 d (Let0123456789876543210Scrutinee_0123456789876543210Sym1 d) :: a)
-    sFoo1 (sD :: Sing d) (sX :: Sing x)
-      = (case sX of
-           SJust (sY :: Sing y) -> sY
-           SNothing -> sD) ::
-          Sing (Case_0123456789876543210 d x x :: a)
-    instance SingI (Foo5Sym0 :: (~>) a a) where
-      sing = (singFun1 @Foo5Sym0) sFoo5
-    instance SingI (Foo4Sym0 :: (~>) a a) where
-      sing = (singFun1 @Foo4Sym0) sFoo4
-    instance SingI (Foo3Sym0 :: (~>) a ((~>) b a)) where
-      sing = (singFun2 @Foo3Sym0) sFoo3
-    instance SingI d => SingI (Foo3Sym1 (d :: a) :: (~>) b a) where
-      sing = (singFun1 @(Foo3Sym1 (d :: a))) (sFoo3 (sing @d))
-    instance SingI (Foo2Sym0 :: (~>) a ((~>) (Maybe a) a)) where
-      sing = (singFun2 @Foo2Sym0) sFoo2
-    instance SingI d =>
-             SingI (Foo2Sym1 (d :: a) :: (~>) (Maybe a) a) where
-      sing = (singFun1 @(Foo2Sym1 (d :: a))) (sFoo2 (sing @d))
-    instance SingI (Foo1Sym0 :: (~>) a ((~>) (Maybe a) a)) where
-      sing = (singFun2 @Foo1Sym0) sFoo1
-    instance SingI d =>
-             SingI (Foo1Sym1 (d :: a) :: (~>) (Maybe a) a) where
-      sing = (singFun1 @(Foo1Sym1 (d :: a))) (sFoo1 (sing @d))
diff --git a/tests/compile-and-dump/Singletons/CaseExpressions.ghc88.template b/tests/compile-and-dump/Singletons/CaseExpressions.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/CaseExpressions.ghc88.template
@@ -0,0 +1,324 @@
+Singletons/CaseExpressions.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| foo1 :: a -> Maybe a -> a
+          foo1 d x
+            = case x of
+                Just y -> y
+                Nothing -> d
+          foo2 :: a -> Maybe a -> a
+          foo2 d _ = case (Just d) of { Just y -> y }
+          foo3 :: a -> b -> a
+          foo3 a b = case (a, b) of { (p, _) -> p }
+          foo4 :: forall a. a -> a
+          foo4 x
+            = case x of {
+                y -> let
+                       z :: a
+                       z = y
+                     in z }
+          foo5 :: a -> a
+          foo5 x = case x of { y -> (\ _ -> x) y } |]
+  ======>
+    foo1 :: a -> Maybe a -> a
+    foo1 d x
+      = case x of
+          Just y -> y
+          Nothing -> d
+    foo2 :: a -> Maybe a -> a
+    foo2 d _ = case Just d of { Just y -> y }
+    foo3 :: a -> b -> a
+    foo3 a b = case (a, b) of { (p, _) -> p }
+    foo4 :: forall a. a -> a
+    foo4 x
+      = case x of {
+          y -> let
+                 z :: a
+                 z = y
+               in z }
+    foo5 :: a -> a
+    foo5 x = case x of { y -> (\ _ -> x) y }
+    type family Case_0123456789876543210 arg_0123456789876543210 y x t where
+      Case_0123456789876543210 arg_0123456789876543210 y x _ = x
+    type family Lambda_0123456789876543210 y x t where
+      Lambda_0123456789876543210 y x arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 y x arg_0123456789876543210
+    type Lambda_0123456789876543210Sym3 y0123456789876543210 x0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall y0123456789876543210
+                                                              x0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym3 y0123456789876543210 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 y0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 y0123456789876543210 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall y0123456789876543210
+                                                              x0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 y0123456789876543210) arg) (Lambda_0123456789876543210Sym2 y0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 y0123456789876543210 x0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 y0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 y0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall y0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 y0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 y0123456789876543210 = Lambda_0123456789876543210Sym1 y0123456789876543210
+    type family Case_0123456789876543210 x t where
+      Case_0123456789876543210 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 y) x) y
+    type Let0123456789876543210ZSym2 y0123456789876543210 x0123456789876543210 =
+        Let0123456789876543210Z y0123456789876543210 x0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210ZSym1 y0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210ZSym1KindInference) ())
+    data Let0123456789876543210ZSym1 y0123456789876543210 x0123456789876543210
+      where
+        Let0123456789876543210ZSym1KindInference :: forall y0123456789876543210
+                                                           x0123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210ZSym1 y0123456789876543210) arg) (Let0123456789876543210ZSym2 y0123456789876543210 arg) =>
+                                                    Let0123456789876543210ZSym1 y0123456789876543210 x0123456789876543210
+    type instance Apply (Let0123456789876543210ZSym1 y0123456789876543210) x0123456789876543210 = Let0123456789876543210Z y0123456789876543210 x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210ZSym0KindInference) ())
+    data Let0123456789876543210ZSym0 y0123456789876543210
+      where
+        Let0123456789876543210ZSym0KindInference :: forall y0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>
+                                                    Let0123456789876543210ZSym0 y0123456789876543210
+    type instance Apply Let0123456789876543210ZSym0 y0123456789876543210 = Let0123456789876543210ZSym1 y0123456789876543210
+    type family Let0123456789876543210Z y x :: a where
+      Let0123456789876543210Z y x = y
+    type family Case_0123456789876543210 x t where
+      Case_0123456789876543210 x y = Let0123456789876543210ZSym2 y x
+    type Let0123456789876543210Scrutinee_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 =
+        Let0123456789876543210Scrutinee_0123456789876543210 a0123456789876543210 b0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd
+            (((,)
+                Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference)
+               ())
+    data Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
+      where
+        Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                                       b0123456789876543210
+                                                                                       arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
+    type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210) b0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 a0123456789876543210 b0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd
+            (((,)
+                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
+               ())
+    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 a0123456789876543210
+      where
+        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
+                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 a0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210
+    type family Let0123456789876543210Scrutinee_0123456789876543210 a b where
+      Let0123456789876543210Scrutinee_0123456789876543210 a b = Apply (Apply Tuple2Sym0 a) b
+    type family Case_0123456789876543210 a b t where
+      Case_0123456789876543210 a b '(p, _) = p
+    type Let0123456789876543210Scrutinee_0123456789876543210Sym1 d0123456789876543210 =
+        Let0123456789876543210Scrutinee_0123456789876543210 d0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd
+            (((,)
+                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
+               ())
+    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 d0123456789876543210
+      where
+        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall d0123456789876543210
+                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
+                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 d0123456789876543210
+    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 d0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 d0123456789876543210
+    type family Let0123456789876543210Scrutinee_0123456789876543210 d where
+      Let0123456789876543210Scrutinee_0123456789876543210 d = Apply JustSym0 d
+    type family Case_0123456789876543210 d t where
+      Case_0123456789876543210 d ('Just y) = y
+    type family Case_0123456789876543210 d x t where
+      Case_0123456789876543210 d x ('Just y) = y
+      Case_0123456789876543210 d x 'Nothing = d
+    type Foo5Sym1 (a0123456789876543210 :: a0123456789876543210) =
+        Foo5 a0123456789876543210
+    instance SuppressUnusedWarnings Foo5Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ())
+    data Foo5Sym0 :: forall a0123456789876543210.
+                     (~>) a0123456789876543210 a0123456789876543210
+      where
+        Foo5Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) =>
+                                 Foo5Sym0 a0123456789876543210
+    type instance Apply Foo5Sym0 a0123456789876543210 = Foo5 a0123456789876543210
+    type Foo4Sym1 (a0123456789876543210 :: a0123456789876543210) =
+        Foo4 a0123456789876543210
+    instance SuppressUnusedWarnings Foo4Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ())
+    data Foo4Sym0 :: forall a0123456789876543210.
+                     (~>) a0123456789876543210 a0123456789876543210
+      where
+        Foo4Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) =>
+                                 Foo4Sym0 a0123456789876543210
+    type instance Apply Foo4Sym0 a0123456789876543210 = Foo4 a0123456789876543210
+    type Foo3Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
+        Foo3 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo3Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo3Sym1KindInference) ())
+    data Foo3Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                    (~>) b0123456789876543210 a0123456789876543210
+      where
+        Foo3Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo3Sym1 a0123456789876543210) arg) (Foo3Sym2 a0123456789876543210 arg) =>
+                                 Foo3Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo3Sym1 a0123456789876543210) a0123456789876543210 = Foo3 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo3Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ())
+    data Foo3Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
+      where
+        Foo3Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>
+                                 Foo3Sym0 a0123456789876543210
+    type instance Apply Foo3Sym0 a0123456789876543210 = Foo3Sym1 a0123456789876543210
+    type Foo2Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) =
+        Foo2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo2Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo2Sym1KindInference) ())
+    data Foo2Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) (Maybe a0123456789876543210) a0123456789876543210
+      where
+        Foo2Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo2Sym1 a0123456789876543210) arg) (Foo2Sym2 a0123456789876543210 arg) =>
+                                 Foo2Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo2Sym1 a0123456789876543210) a0123456789876543210 = Foo2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo2Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ())
+    data Foo2Sym0 :: forall a0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) a0123456789876543210)
+      where
+        Foo2Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) =>
+                                 Foo2Sym0 a0123456789876543210
+    type instance Apply Foo2Sym0 a0123456789876543210 = Foo2Sym1 a0123456789876543210
+    type Foo1Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) =
+        Foo1 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo1Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo1Sym1KindInference) ())
+    data Foo1Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) (Maybe a0123456789876543210) a0123456789876543210
+      where
+        Foo1Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo1Sym1 a0123456789876543210) arg) (Foo1Sym2 a0123456789876543210 arg) =>
+                                 Foo1Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo1Sym1 a0123456789876543210) a0123456789876543210 = Foo1 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo1Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ())
+    data Foo1Sym0 :: forall a0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) a0123456789876543210)
+      where
+        Foo1Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>
+                                 Foo1Sym0 a0123456789876543210
+    type instance Apply Foo1Sym0 a0123456789876543210 = Foo1Sym1 a0123456789876543210
+    type family Foo5 (a :: a) :: a where
+      Foo5 x = Case_0123456789876543210 x x
+    type family Foo4 (a :: a) :: a where
+      Foo4 x = Case_0123456789876543210 x x
+    type family Foo3 (a :: a) (a :: b) :: a where
+      Foo3 a b = Case_0123456789876543210 a b (Let0123456789876543210Scrutinee_0123456789876543210Sym2 a b)
+    type family Foo2 (a :: a) (a :: Maybe a) :: a where
+      Foo2 d _ = Case_0123456789876543210 d (Let0123456789876543210Scrutinee_0123456789876543210Sym1 d)
+    type family Foo1 (a :: a) (a :: Maybe a) :: a where
+      Foo1 d x = Case_0123456789876543210 d x x
+    sFoo5 :: forall a (t :: a). Sing t -> Sing (Apply Foo5Sym0 t :: a)
+    sFoo4 :: forall a (t :: a). Sing t -> Sing (Apply Foo4Sym0 t :: a)
+    sFoo3 ::
+      forall a b (t :: a) (t :: b).
+      Sing t -> Sing t -> Sing (Apply (Apply Foo3Sym0 t) t :: a)
+    sFoo2 ::
+      forall a (t :: a) (t :: Maybe a).
+      Sing t -> Sing t -> Sing (Apply (Apply Foo2Sym0 t) t :: a)
+    sFoo1 ::
+      forall a (t :: a) (t :: Maybe a).
+      Sing t -> Sing t -> Sing (Apply (Apply Foo1Sym0 t) t :: a)
+    sFoo5 (sX :: Sing x)
+      = (id @(Sing (Case_0123456789876543210 x x :: a)))
+          (case sX of {
+             (sY :: Sing y)
+               -> (applySing
+                     ((singFun1 @(Apply (Apply 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 })
+    sFoo4 (sX :: Sing x)
+      = (id @(Sing (Case_0123456789876543210 x x :: a)))
+          (case sX of {
+             (sY :: Sing y)
+               -> let
+                    sZ :: Sing (Let0123456789876543210ZSym2 y x :: a)
+                    sZ = sY
+                  in sZ })
+    sFoo3 (sA :: Sing a) (sB :: Sing b)
+      = let
+          sScrutinee_0123456789876543210 ::
+            Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym2 a b)
+          sScrutinee_0123456789876543210
+            = (applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sA)) sB
+        in
+          (id
+             @(Sing (Case_0123456789876543210 a b (Let0123456789876543210Scrutinee_0123456789876543210Sym2 a b) :: a)))
+            (case sScrutinee_0123456789876543210 of {
+               STuple2 (sP :: Sing p) _ -> sP })
+    sFoo2 (sD :: Sing d) _
+      = let
+          sScrutinee_0123456789876543210 ::
+            Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym1 d)
+          sScrutinee_0123456789876543210
+            = (applySing ((singFun1 @JustSym0) SJust)) sD
+        in
+          (id
+             @(Sing (Case_0123456789876543210 d (Let0123456789876543210Scrutinee_0123456789876543210Sym1 d) :: a)))
+            (case sScrutinee_0123456789876543210 of {
+               SJust (sY :: Sing y) -> sY })
+    sFoo1 (sD :: Sing d) (sX :: Sing x)
+      = (id @(Sing (Case_0123456789876543210 d x x :: a)))
+          (case sX of
+             SJust (sY :: Sing y) -> sY
+             SNothing -> sD)
+    instance SingI (Foo5Sym0 :: (~>) a a) where
+      sing = (singFun1 @Foo5Sym0) sFoo5
+    instance SingI (Foo4Sym0 :: (~>) a a) where
+      sing = (singFun1 @Foo4Sym0) sFoo4
+    instance SingI (Foo3Sym0 :: (~>) a ((~>) b a)) where
+      sing = (singFun2 @Foo3Sym0) sFoo3
+    instance SingI d => SingI (Foo3Sym1 (d :: a) :: (~>) b a) where
+      sing = (singFun1 @(Foo3Sym1 (d :: a))) (sFoo3 (sing @d))
+    instance SingI (Foo2Sym0 :: (~>) a ((~>) (Maybe a) a)) where
+      sing = (singFun2 @Foo2Sym0) sFoo2
+    instance SingI d =>
+             SingI (Foo2Sym1 (d :: a) :: (~>) (Maybe a) a) where
+      sing = (singFun1 @(Foo2Sym1 (d :: a))) (sFoo2 (sing @d))
+    instance SingI (Foo1Sym0 :: (~>) a ((~>) (Maybe a) a)) where
+      sing = (singFun2 @Foo1Sym0) sFoo1
+    instance SingI d =>
+             SingI (Foo1Sym1 (d :: a) :: (~>) (Maybe a) a) where
+      sing = (singFun1 @(Foo1Sym1 (d :: a))) (sFoo1 (sing @d))
diff --git a/tests/compile-and-dump/Singletons/Classes.ghc86.template b/tests/compile-and-dump/Singletons/Classes.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/Classes.ghc86.template
+++ /dev/null
@@ -1,577 +0,0 @@
-Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| infix 4 <=>
-          
-          const :: a -> b -> a
-          const x _ = x
-          fooCompare :: Foo -> Foo -> Ordering
-          fooCompare A A = EQ
-          fooCompare A B = LT
-          fooCompare B B = GT
-          fooCompare B A = EQ
-          
-          class MyOrd a where
-            mycompare :: a -> a -> Ordering
-            (<=>) :: a -> a -> Ordering
-            (<=>) = mycompare
-            infix 4 <=>
-          data Foo = A | B
-          data Foo2 = F | G
-          
-          instance MyOrd () where
-            mycompare _ = const EQ
-          instance MyOrd Nat where
-            Zero `mycompare` Zero = EQ
-            Zero `mycompare` (Succ _) = LT
-            (Succ _) `mycompare` Zero = GT
-            (Succ n) `mycompare` (Succ m) = m `mycompare` n
-          instance MyOrd Foo where
-            mycompare = fooCompare
-          instance Eq Foo2 where
-            F == F = True
-            G == G = True
-            F == G = False
-            G == F = False |]
-  ======>
-    const :: a -> b -> a
-    const x _ = x
-    class MyOrd a where
-      mycompare :: a -> a -> Ordering
-      (<=>) :: a -> a -> Ordering
-      (<=>) = mycompare
-    infix 4 <=>
-    instance MyOrd Nat where
-      mycompare Zero Zero = EQ
-      mycompare Zero (Succ _) = LT
-      mycompare (Succ _) Zero = GT
-      mycompare (Succ n) (Succ m) = (m `mycompare` n)
-    instance MyOrd () where
-      mycompare _ = const EQ
-    data Foo = A | B
-    fooCompare :: Foo -> Foo -> Ordering
-    fooCompare A A = EQ
-    fooCompare A B = LT
-    fooCompare B B = GT
-    fooCompare B A = EQ
-    instance MyOrd Foo where
-      mycompare = fooCompare
-    data Foo2 = F | G
-    instance Eq Foo2 where
-      (==) F F = True
-      (==) G G = True
-      (==) F G = False
-      (==) G F = False
-    type ASym0 = A
-    type BSym0 = B
-    type FSym0 = F
-    type GSym0 = G
-    type FooCompareSym2 (a0123456789876543210 :: Foo) (a0123456789876543210 :: Foo) =
-        FooCompare a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (FooCompareSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) FooCompareSym1KindInference) ())
-    data FooCompareSym1 (a0123456789876543210 :: Foo) :: (~>) Foo Ordering
-      where
-        FooCompareSym1KindInference :: forall a0123456789876543210
-                                              a0123456789876543210
-                                              arg. SameKind (Apply (FooCompareSym1 a0123456789876543210) arg) (FooCompareSym2 a0123456789876543210 arg) =>
-                                       FooCompareSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (FooCompareSym1 a0123456789876543210) a0123456789876543210 = FooCompare a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings FooCompareSym0 where
-      suppressUnusedWarnings = snd (((,) FooCompareSym0KindInference) ())
-    data FooCompareSym0 :: (~>) Foo ((~>) Foo Ordering)
-      where
-        FooCompareSym0KindInference :: forall a0123456789876543210
-                                              arg. SameKind (Apply FooCompareSym0 arg) (FooCompareSym1 arg) =>
-                                       FooCompareSym0 a0123456789876543210
-    type instance Apply FooCompareSym0 a0123456789876543210 = FooCompareSym1 a0123456789876543210
-    type ConstSym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
-        Const a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ConstSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) ConstSym1KindInference) ())
-    data ConstSym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                     (~>) b0123456789876543210 a0123456789876543210
-      where
-        ConstSym1KindInference :: forall a0123456789876543210
-                                         a0123456789876543210
-                                         arg. SameKind (Apply (ConstSym1 a0123456789876543210) arg) (ConstSym2 a0123456789876543210 arg) =>
-                                  ConstSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ConstSym1 a0123456789876543210) a0123456789876543210 = Const a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ConstSym0 where
-      suppressUnusedWarnings = snd (((,) ConstSym0KindInference) ())
-    data ConstSym0 :: forall a0123456789876543210 b0123456789876543210.
-                      (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
-      where
-        ConstSym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply ConstSym0 arg) (ConstSym1 arg) =>
-                                  ConstSym0 a0123456789876543210
-    type instance Apply ConstSym0 a0123456789876543210 = ConstSym1 a0123456789876543210
-    type family FooCompare (a :: Foo) (a :: Foo) :: Ordering where
-      FooCompare A A = EQSym0
-      FooCompare A B = LTSym0
-      FooCompare B B = GTSym0
-      FooCompare B A = EQSym0
-    type family Const (a :: a) (a :: b) :: a where
-      Const x _ = x
-    type MycompareSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) =
-        Mycompare arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings (MycompareSym1 arg0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MycompareSym1KindInference) ())
-    data MycompareSym1 (arg0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 Ordering
-      where
-        MycompareSym1KindInference :: forall arg0123456789876543210
-                                             arg0123456789876543210
-                                             arg. SameKind (Apply (MycompareSym1 arg0123456789876543210) arg) (MycompareSym2 arg0123456789876543210 arg) =>
-                                      MycompareSym1 arg0123456789876543210 arg0123456789876543210
-    type instance Apply (MycompareSym1 arg0123456789876543210) arg0123456789876543210 = Mycompare arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings MycompareSym0 where
-      suppressUnusedWarnings = snd (((,) MycompareSym0KindInference) ())
-    data MycompareSym0 :: forall a0123456789876543210.
-                          (~>) a0123456789876543210 ((~>) a0123456789876543210 Ordering)
-      where
-        MycompareSym0KindInference :: forall arg0123456789876543210
-                                             arg. SameKind (Apply MycompareSym0 arg) (MycompareSym1 arg) =>
-                                      MycompareSym0 arg0123456789876543210
-    type instance Apply MycompareSym0 arg0123456789876543210 = MycompareSym1 arg0123456789876543210
-    type (<=>@#@$$$) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) =
-        (<=>) arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings ((<=>@#@$$) arg0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (:<=>@#@$$###)) ())
-    data (<=>@#@$$) (arg0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 Ordering
-      where
-        (:<=>@#@$$###) :: forall arg0123456789876543210
-                                 arg0123456789876543210
-                                 arg. SameKind (Apply ((<=>@#@$$) arg0123456789876543210) arg) ((<=>@#@$$$) arg0123456789876543210 arg) =>
-                          (<=>@#@$$) arg0123456789876543210 arg0123456789876543210
-    type instance Apply ((<=>@#@$$) arg0123456789876543210) arg0123456789876543210 = (<=>) arg0123456789876543210 arg0123456789876543210
-    infix 4 <=>@#@$$
-    instance SuppressUnusedWarnings (<=>@#@$) where
-      suppressUnusedWarnings = snd (((,) (:<=>@#@$###)) ())
-    data (<=>@#@$) :: forall a0123456789876543210.
-                      (~>) a0123456789876543210 ((~>) a0123456789876543210 Ordering)
-      where
-        (:<=>@#@$###) :: forall arg0123456789876543210
-                                arg. SameKind (Apply (<=>@#@$) arg) ((<=>@#@$$) arg) =>
-                         (<=>@#@$) arg0123456789876543210
-    type instance Apply (<=>@#@$) arg0123456789876543210 = (<=>@#@$$) arg0123456789876543210
-    infix 4 <=>@#@$
-    type family TFHelper_0123456789876543210 (a :: a) (a :: a) :: Ordering where
-      TFHelper_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply MycompareSym0 a_0123456789876543210) a_0123456789876543210
-    type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: a0123456789876543210) =
-        TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ())
-    data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 Ordering
-      where
-        TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                a0123456789876543210
-                                                                arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                         TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ())
-    data TFHelper_0123456789876543210Sym0 :: forall a0123456789876543210.
-                                             (~>) a0123456789876543210 ((~>) a0123456789876543210 Ordering)
-      where
-        TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) =>
-                                                         TFHelper_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210
-    class PMyOrd (a :: GHC.Types.Type) where
-      type Mycompare (arg :: a) (arg :: a) :: Ordering
-      type (<=>) (arg :: a) (arg :: a) :: Ordering
-      type (<=>) a a = Apply (Apply TFHelper_0123456789876543210Sym0 a) a
-    type family Mycompare_0123456789876543210 (a :: Nat) (a :: Nat) :: Ordering where
-      Mycompare_0123456789876543210  'Zero  'Zero = EQSym0
-      Mycompare_0123456789876543210  'Zero ( 'Succ _) = LTSym0
-      Mycompare_0123456789876543210 ( 'Succ _)  'Zero = GTSym0
-      Mycompare_0123456789876543210 ( 'Succ n) ( 'Succ m) = Apply (Apply MycompareSym0 m) n
-    type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
-        Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ())
-    data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Nat Ordering
-      where
-        Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ())
-    data Mycompare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering)
-      where
-        Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>
-                                                          Mycompare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210
-    instance PMyOrd Nat where
-      type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a
-    type family Mycompare_0123456789876543210 (a :: ()) (a :: ()) :: Ordering where
-      Mycompare_0123456789876543210 _ a_0123456789876543210 = Apply (Apply ConstSym0 EQSym0) a_0123456789876543210
-    type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: ()) (a0123456789876543210 :: ()) =
-        Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ())
-    data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: ()) :: (~>) () Ordering
-      where
-        Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ())
-    data Mycompare_0123456789876543210Sym0 :: (~>) () ((~>) () Ordering)
-      where
-        Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>
-                                                          Mycompare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210
-    instance PMyOrd () where
-      type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a
-    type family Mycompare_0123456789876543210 (a :: Foo) (a :: Foo) :: Ordering where
-      Mycompare_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply FooCompareSym0 a_0123456789876543210) a_0123456789876543210
-    type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: Foo) (a0123456789876543210 :: Foo) =
-        Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ())
-    data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: Foo) :: (~>) Foo Ordering
-      where
-        Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ())
-    data Mycompare_0123456789876543210Sym0 :: (~>) Foo ((~>) Foo Ordering)
-      where
-        Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>
-                                                          Mycompare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210
-    instance PMyOrd Foo where
-      type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a
-    type family TFHelper_0123456789876543210 (a :: Foo2) (a :: Foo2) :: Bool where
-      TFHelper_0123456789876543210 F F = TrueSym0
-      TFHelper_0123456789876543210 G G = TrueSym0
-      TFHelper_0123456789876543210 F G = FalseSym0
-      TFHelper_0123456789876543210 G F = FalseSym0
-    type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: Foo2) (a0123456789876543210 :: Foo2) =
-        TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ())
-    data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: Foo2) :: (~>) Foo2 Bool
-      where
-        TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                a0123456789876543210
-                                                                arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                         TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ())
-    data TFHelper_0123456789876543210Sym0 :: (~>) Foo2 ((~>) Foo2 Bool)
-      where
-        TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) =>
-                                                         TFHelper_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210
-    instance PEq Foo2 where
-      type (==) a a = Apply (Apply TFHelper_0123456789876543210Sym0 a) a
-    infix 4 %<=>
-    sFooCompare ::
-      forall (t :: Foo) (t :: Foo).
-      Sing t
-      -> Sing t -> Sing (Apply (Apply FooCompareSym0 t) t :: Ordering)
-    sConst ::
-      forall a b (t :: a) (t :: b).
-      Sing t -> Sing t -> Sing (Apply (Apply ConstSym0 t) t :: a)
-    sFooCompare SA SA = SEQ
-    sFooCompare SA SB = SLT
-    sFooCompare SB SB = SGT
-    sFooCompare SB SA = SEQ
-    sConst (sX :: Sing x) _ = sX
-    instance SingI (FooCompareSym0 :: (~>) Foo ((~>) Foo Ordering)) where
-      sing = (singFun2 @FooCompareSym0) sFooCompare
-    instance SingI d =>
-             SingI (FooCompareSym1 (d :: Foo) :: (~>) Foo Ordering) where
-      sing
-        = (singFun1 @(FooCompareSym1 (d :: Foo))) (sFooCompare (sing @d))
-    instance SingI (ConstSym0 :: (~>) a ((~>) b a)) where
-      sing = (singFun2 @ConstSym0) sConst
-    instance SingI d => SingI (ConstSym1 (d :: a) :: (~>) b a) where
-      sing = (singFun1 @(ConstSym1 (d :: a))) (sConst (sing @d))
-    data instance Sing :: Foo -> GHC.Types.Type
-      where
-        SA :: Sing A
-        SB :: Sing B
-    type SFoo = (Sing :: Foo -> GHC.Types.Type)
-    instance SingKind Foo where
-      type Demote Foo = Foo
-      fromSing SA = A
-      fromSing SB = B
-      toSing A = SomeSing SA
-      toSing B = SomeSing SB
-    data instance Sing :: Foo2 -> GHC.Types.Type
-      where
-        SF :: Sing F
-        SG :: Sing G
-    type SFoo2 = (Sing :: Foo2 -> GHC.Types.Type)
-    instance SingKind Foo2 where
-      type Demote Foo2 = Foo2
-      fromSing SF = F
-      fromSing SG = G
-      toSing F = SomeSing SF
-      toSing G = SomeSing SG
-    class SMyOrd a where
-      sMycompare ::
-        forall (t :: a) (t :: a).
-        Sing t
-        -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)
-      (%<=>) ::
-        forall (t :: a) (t :: a).
-        Sing t -> Sing t -> Sing (Apply (Apply (<=>@#@$) t) t :: Ordering)
-      default (%<=>) ::
-                forall (t :: a) (t :: a).
-                (Apply (Apply (<=>@#@$) t) t :: Ordering)
-                ~ Apply (Apply TFHelper_0123456789876543210Sym0 t) t =>
-                Sing t -> Sing t -> Sing (Apply (Apply (<=>@#@$) t) t :: Ordering)
-      (%<=>)
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @MycompareSym0) sMycompare))
-                sA_0123456789876543210))
-            sA_0123456789876543210
-    instance SMyOrd Nat where
-      sMycompare ::
-        forall (t :: Nat) (t :: Nat).
-        Sing t
-        -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)
-      sMycompare SZero SZero = SEQ
-      sMycompare SZero (SSucc _) = SLT
-      sMycompare (SSucc _) SZero = SGT
-      sMycompare (SSucc (sN :: Sing n)) (SSucc (sM :: Sing m))
-        = (applySing
-             ((applySing ((singFun2 @MycompareSym0) sMycompare)) sM))
-            sN
-    instance SMyOrd () where
-      sMycompare ::
-        forall (t :: ()) (t :: ()).
-        Sing t
-        -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)
-      sMycompare _ (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing ((applySing ((singFun2 @ConstSym0) sConst)) SEQ))
-            sA_0123456789876543210
-    instance SMyOrd Foo where
-      sMycompare ::
-        forall (t :: Foo) (t :: Foo).
-        Sing t
-        -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)
-      sMycompare
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @FooCompareSym0) sFooCompare))
-                sA_0123456789876543210))
-            sA_0123456789876543210
-    instance SEq Foo2 where
-      (%==) ::
-        forall (a :: Foo2) (b :: Foo2). Sing a -> Sing b -> Sing ((==) a b)
-      (%==) SF SF = STrue
-      (%==) SG SG = STrue
-      (%==) SF SG = SFalse
-      (%==) SG SF = SFalse
-    instance SingI A where
-      sing = SA
-    instance SingI B where
-      sing = SB
-    instance SingI F where
-      sing = SF
-    instance SingI G where
-      sing = SG
-    instance SMyOrd a =>
-             SingI (MycompareSym0 :: (~>) a ((~>) a Ordering)) where
-      sing = (singFun2 @MycompareSym0) sMycompare
-    instance (SMyOrd a, SingI d) =>
-             SingI (MycompareSym1 (d :: a) :: (~>) a Ordering) where
-      sing = (singFun1 @(MycompareSym1 (d :: a))) (sMycompare (sing @d))
-    instance SMyOrd a =>
-             SingI ((<=>@#@$) :: (~>) a ((~>) a Ordering)) where
-      sing = (singFun2 @(<=>@#@$)) (%<=>)
-    instance (SMyOrd a, SingI d) =>
-             SingI ((<=>@#@$$) (d :: a) :: (~>) a Ordering) where
-      sing = (singFun1 @((<=>@#@$$) (d :: a))) ((%<=>) (sing @d))
-Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations
-    promote
-      [d| instance Ord Foo2 where
-            F `compare` F = EQ
-            F `compare` _ = LT
-            _ `compare` _ = GT
-          instance MyOrd Foo2 where
-            F `mycompare` F = EQ
-            F `mycompare` _ = LT
-            _ `mycompare` _ = GT |]
-  ======>
-    instance MyOrd Foo2 where
-      mycompare F F = EQ
-      mycompare F _ = LT
-      mycompare _ _ = GT
-    instance Ord Foo2 where
-      compare F F = EQ
-      compare F _ = LT
-      compare _ _ = GT
-    type family Mycompare_0123456789876543210 (a :: Foo2) (a :: Foo2) :: Ordering where
-      Mycompare_0123456789876543210  'F  'F = EQSym0
-      Mycompare_0123456789876543210  'F _ = LTSym0
-      Mycompare_0123456789876543210 _ _ = GTSym0
-    type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: Foo2) (a0123456789876543210 :: Foo2) =
-        Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ())
-    data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: Foo2) :: (~>) Foo2 Ordering
-      where
-        Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ())
-    data Mycompare_0123456789876543210Sym0 :: (~>) Foo2 ((~>) Foo2 Ordering)
-      where
-        Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>
-                                                          Mycompare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210
-    instance PMyOrd Foo2 where
-      type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a
-    type family Compare_0123456789876543210 (a :: Foo2) (a :: Foo2) :: Ordering where
-      Compare_0123456789876543210  'F  'F = EQSym0
-      Compare_0123456789876543210  'F _ = LTSym0
-      Compare_0123456789876543210 _ _ = GTSym0
-    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Foo2) (a0123456789876543210 :: Foo2) =
-        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
-    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Foo2) :: (~>) Foo2 Ordering
-      where
-        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
-    data Compare_0123456789876543210Sym0 :: (~>) Foo2 ((~>) Foo2 Ordering)
-      where
-        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
-                                                        Compare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
-    instance POrd Foo2 where
-      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
-Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| data Nat' = Zero' | Succ' Nat'
-          
-          instance MyOrd Nat' where
-            Zero' `mycompare` Zero' = EQ
-            Zero' `mycompare` (Succ' _) = LT
-            (Succ' _) `mycompare` Zero' = GT
-            (Succ' n) `mycompare` (Succ' m) = m `mycompare` n |]
-  ======>
-    data Nat' = Zero' | Succ' Nat'
-    instance MyOrd Nat' where
-      mycompare Zero' Zero' = EQ
-      mycompare Zero' (Succ' _) = LT
-      mycompare (Succ' _) Zero' = GT
-      mycompare (Succ' n) (Succ' m) = (m `mycompare` n)
-    type Zero'Sym0 = Zero'
-    type Succ'Sym1 (t0123456789876543210 :: Nat') =
-        Succ' t0123456789876543210
-    instance SuppressUnusedWarnings Succ'Sym0 where
-      suppressUnusedWarnings = snd (((,) Succ'Sym0KindInference) ())
-    data Succ'Sym0 :: (~>) Nat' Nat'
-      where
-        Succ'Sym0KindInference :: forall t0123456789876543210
-                                         arg. SameKind (Apply Succ'Sym0 arg) (Succ'Sym1 arg) =>
-                                  Succ'Sym0 t0123456789876543210
-    type instance Apply Succ'Sym0 t0123456789876543210 = Succ' t0123456789876543210
-    type family Mycompare_0123456789876543210 (a :: Nat') (a :: Nat') :: Ordering where
-      Mycompare_0123456789876543210 Zero' Zero' = EQSym0
-      Mycompare_0123456789876543210 Zero' (Succ' _) = LTSym0
-      Mycompare_0123456789876543210 (Succ' _) Zero' = GTSym0
-      Mycompare_0123456789876543210 (Succ' n) (Succ' m) = Apply (Apply MycompareSym0 m) n
-    type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: Nat') (a0123456789876543210 :: Nat') =
-        Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ())
-    data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: Nat') :: (~>) Nat' Ordering
-      where
-        Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ())
-    data Mycompare_0123456789876543210Sym0 :: (~>) Nat' ((~>) Nat' Ordering)
-      where
-        Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>
-                                                          Mycompare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210
-    instance PMyOrd Nat' where
-      type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a
-    data instance Sing :: Nat' -> GHC.Types.Type
-      where
-        SZero' :: Sing Zero'
-        SSucc' :: forall (n :: Nat'). (Sing (n :: Nat')) -> Sing (Succ' n)
-    type SNat' = (Sing :: Nat' -> GHC.Types.Type)
-    instance SingKind Nat' where
-      type Demote Nat' = Nat'
-      fromSing SZero' = Zero'
-      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) }
-    instance SMyOrd Nat' where
-      sMycompare ::
-        forall (t :: Nat') (t :: Nat').
-        Sing t
-        -> Sing t
-           -> Sing (Apply (Apply (MycompareSym0 :: TyFun Nat' ((~>) Nat' Ordering)
-                                                   -> GHC.Types.Type) t) t)
-      sMycompare SZero' SZero' = SEQ
-      sMycompare SZero' (SSucc' _) = SLT
-      sMycompare (SSucc' _) SZero' = SGT
-      sMycompare (SSucc' (sN :: Sing n)) (SSucc' (sM :: Sing m))
-        = (applySing
-             ((applySing ((singFun2 @MycompareSym0) sMycompare)) sM))
-            sN
-    instance SingI Zero' where
-      sing = SZero'
-    instance SingI n => SingI (Succ' (n :: Nat')) where
-      sing = SSucc' sing
-    instance SingI (Succ'Sym0 :: (~>) Nat' Nat') where
-      sing = (singFun1 @Succ'Sym0) SSucc'
-    instance SingI (TyCon1 Succ' :: (~>) Nat' Nat') where
-      sing = (singFun1 @(TyCon1 Succ')) SSucc'
diff --git a/tests/compile-and-dump/Singletons/Classes.ghc88.template b/tests/compile-and-dump/Singletons/Classes.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/Classes.ghc88.template
@@ -0,0 +1,575 @@
+Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| infix 4 <=>
+          
+          const :: a -> b -> a
+          const x _ = x
+          fooCompare :: Foo -> Foo -> Ordering
+          fooCompare A A = EQ
+          fooCompare A B = LT
+          fooCompare B B = GT
+          fooCompare B A = EQ
+          
+          class MyOrd a where
+            mycompare :: a -> a -> Ordering
+            (<=>) :: a -> a -> Ordering
+            (<=>) = mycompare
+            infix 4 <=>
+          data Foo = A | B
+          data Foo2 = F | G
+          
+          instance MyOrd () where
+            mycompare _ = const EQ
+          instance MyOrd Nat where
+            Zero `mycompare` Zero = EQ
+            Zero `mycompare` (Succ _) = LT
+            (Succ _) `mycompare` Zero = GT
+            (Succ n) `mycompare` (Succ m) = m `mycompare` n
+          instance MyOrd Foo where
+            mycompare = fooCompare
+          instance Eq Foo2 where
+            F == F = True
+            G == G = True
+            F == G = False
+            G == F = False |]
+  ======>
+    const :: a -> b -> a
+    const x _ = x
+    class MyOrd a where
+      mycompare :: a -> a -> Ordering
+      (<=>) :: a -> a -> Ordering
+      (<=>) = mycompare
+    infix 4 <=>
+    instance MyOrd Nat where
+      mycompare Zero Zero = EQ
+      mycompare Zero (Succ _) = LT
+      mycompare (Succ _) Zero = GT
+      mycompare (Succ n) (Succ m) = (m `mycompare` n)
+    instance MyOrd () where
+      mycompare _ = const EQ
+    data Foo = A | B
+    fooCompare :: Foo -> Foo -> Ordering
+    fooCompare A A = EQ
+    fooCompare A B = LT
+    fooCompare B B = GT
+    fooCompare B A = EQ
+    instance MyOrd Foo where
+      mycompare = fooCompare
+    data Foo2 = F | G
+    instance Eq Foo2 where
+      (==) F F = True
+      (==) G G = True
+      (==) F G = False
+      (==) G F = False
+    type ASym0 = A
+    type BSym0 = B
+    type FSym0 = F
+    type GSym0 = G
+    type FooCompareSym2 (a0123456789876543210 :: Foo) (a0123456789876543210 :: Foo) =
+        FooCompare a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (FooCompareSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) FooCompareSym1KindInference) ())
+    data FooCompareSym1 (a0123456789876543210 :: Foo) :: (~>) Foo Ordering
+      where
+        FooCompareSym1KindInference :: forall a0123456789876543210
+                                              a0123456789876543210
+                                              arg. SameKind (Apply (FooCompareSym1 a0123456789876543210) arg) (FooCompareSym2 a0123456789876543210 arg) =>
+                                       FooCompareSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (FooCompareSym1 a0123456789876543210) a0123456789876543210 = FooCompare a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings FooCompareSym0 where
+      suppressUnusedWarnings = snd (((,) FooCompareSym0KindInference) ())
+    data FooCompareSym0 :: (~>) Foo ((~>) Foo Ordering)
+      where
+        FooCompareSym0KindInference :: forall a0123456789876543210
+                                              arg. SameKind (Apply FooCompareSym0 arg) (FooCompareSym1 arg) =>
+                                       FooCompareSym0 a0123456789876543210
+    type instance Apply FooCompareSym0 a0123456789876543210 = FooCompareSym1 a0123456789876543210
+    type ConstSym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
+        Const a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ConstSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) ConstSym1KindInference) ())
+    data ConstSym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                     (~>) b0123456789876543210 a0123456789876543210
+      where
+        ConstSym1KindInference :: forall a0123456789876543210
+                                         a0123456789876543210
+                                         arg. SameKind (Apply (ConstSym1 a0123456789876543210) arg) (ConstSym2 a0123456789876543210 arg) =>
+                                  ConstSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ConstSym1 a0123456789876543210) a0123456789876543210 = Const a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ConstSym0 where
+      suppressUnusedWarnings = snd (((,) ConstSym0KindInference) ())
+    data ConstSym0 :: forall a0123456789876543210 b0123456789876543210.
+                      (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
+      where
+        ConstSym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply ConstSym0 arg) (ConstSym1 arg) =>
+                                  ConstSym0 a0123456789876543210
+    type instance Apply ConstSym0 a0123456789876543210 = ConstSym1 a0123456789876543210
+    type family FooCompare (a :: Foo) (a :: Foo) :: Ordering where
+      FooCompare A A = EQSym0
+      FooCompare A B = LTSym0
+      FooCompare B B = GTSym0
+      FooCompare B A = EQSym0
+    type family Const (a :: a) (a :: b) :: a where
+      Const x _ = x
+    type MycompareSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) =
+        Mycompare arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings (MycompareSym1 arg0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MycompareSym1KindInference) ())
+    data MycompareSym1 (arg0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 Ordering
+      where
+        MycompareSym1KindInference :: forall arg0123456789876543210
+                                             arg0123456789876543210
+                                             arg. SameKind (Apply (MycompareSym1 arg0123456789876543210) arg) (MycompareSym2 arg0123456789876543210 arg) =>
+                                      MycompareSym1 arg0123456789876543210 arg0123456789876543210
+    type instance Apply (MycompareSym1 arg0123456789876543210) arg0123456789876543210 = Mycompare arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings MycompareSym0 where
+      suppressUnusedWarnings = snd (((,) MycompareSym0KindInference) ())
+    data MycompareSym0 :: forall a0123456789876543210.
+                          (~>) a0123456789876543210 ((~>) a0123456789876543210 Ordering)
+      where
+        MycompareSym0KindInference :: forall arg0123456789876543210
+                                             arg. SameKind (Apply MycompareSym0 arg) (MycompareSym1 arg) =>
+                                      MycompareSym0 arg0123456789876543210
+    type instance Apply MycompareSym0 arg0123456789876543210 = MycompareSym1 arg0123456789876543210
+    type (<=>@#@$$$) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) =
+        (<=>) arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings ((<=>@#@$$) arg0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (:<=>@#@$$###)) ())
+    data (<=>@#@$$) (arg0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 Ordering
+      where
+        (:<=>@#@$$###) :: forall arg0123456789876543210
+                                 arg0123456789876543210
+                                 arg. SameKind (Apply ((<=>@#@$$) arg0123456789876543210) arg) ((<=>@#@$$$) arg0123456789876543210 arg) =>
+                          (<=>@#@$$) arg0123456789876543210 arg0123456789876543210
+    type instance Apply ((<=>@#@$$) arg0123456789876543210) arg0123456789876543210 = (<=>) arg0123456789876543210 arg0123456789876543210
+    infix 4 <=>@#@$$
+    instance SuppressUnusedWarnings (<=>@#@$) where
+      suppressUnusedWarnings = snd (((,) (:<=>@#@$###)) ())
+    data (<=>@#@$) :: forall a0123456789876543210.
+                      (~>) a0123456789876543210 ((~>) a0123456789876543210 Ordering)
+      where
+        (:<=>@#@$###) :: forall arg0123456789876543210
+                                arg. SameKind (Apply (<=>@#@$) arg) ((<=>@#@$$) arg) =>
+                         (<=>@#@$) arg0123456789876543210
+    type instance Apply (<=>@#@$) arg0123456789876543210 = (<=>@#@$$) arg0123456789876543210
+    infix 4 <=>@#@$
+    type family TFHelper_0123456789876543210 (a :: a) (a :: a) :: Ordering where
+      TFHelper_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply MycompareSym0 a_0123456789876543210) a_0123456789876543210
+    type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: a0123456789876543210) =
+        TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ())
+    data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 Ordering
+      where
+        TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                a0123456789876543210
+                                                                arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                         TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ())
+    data TFHelper_0123456789876543210Sym0 :: forall a0123456789876543210.
+                                             (~>) a0123456789876543210 ((~>) a0123456789876543210 Ordering)
+      where
+        TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) =>
+                                                         TFHelper_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210
+    class PMyOrd (a :: GHC.Types.Type) where
+      type Mycompare (arg :: a) (arg :: a) :: Ordering
+      type (<=>) (arg :: a) (arg :: a) :: Ordering
+      type (<=>) a a = Apply (Apply TFHelper_0123456789876543210Sym0 a) a
+    type family Mycompare_0123456789876543210 (a :: Nat) (a :: Nat) :: Ordering where
+      Mycompare_0123456789876543210 'Zero 'Zero = EQSym0
+      Mycompare_0123456789876543210 'Zero ('Succ _) = LTSym0
+      Mycompare_0123456789876543210 ('Succ _) 'Zero = GTSym0
+      Mycompare_0123456789876543210 ('Succ n) ('Succ m) = Apply (Apply MycompareSym0 m) n
+    type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
+        Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ())
+    data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Nat Ordering
+      where
+        Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ())
+    data Mycompare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering)
+      where
+        Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>
+                                                          Mycompare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210
+    instance PMyOrd Nat where
+      type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a
+    type family Mycompare_0123456789876543210 (a :: ()) (a :: ()) :: Ordering where
+      Mycompare_0123456789876543210 _ a_0123456789876543210 = Apply (Apply ConstSym0 EQSym0) a_0123456789876543210
+    type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: ()) (a0123456789876543210 :: ()) =
+        Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ())
+    data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: ()) :: (~>) () Ordering
+      where
+        Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ())
+    data Mycompare_0123456789876543210Sym0 :: (~>) () ((~>) () Ordering)
+      where
+        Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>
+                                                          Mycompare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210
+    instance PMyOrd () where
+      type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a
+    type family Mycompare_0123456789876543210 (a :: Foo) (a :: Foo) :: Ordering where
+      Mycompare_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply FooCompareSym0 a_0123456789876543210) a_0123456789876543210
+    type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: Foo) (a0123456789876543210 :: Foo) =
+        Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ())
+    data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: Foo) :: (~>) Foo Ordering
+      where
+        Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ())
+    data Mycompare_0123456789876543210Sym0 :: (~>) Foo ((~>) Foo Ordering)
+      where
+        Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>
+                                                          Mycompare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210
+    instance PMyOrd Foo where
+      type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a
+    type family TFHelper_0123456789876543210 (a :: Foo2) (a :: Foo2) :: Bool where
+      TFHelper_0123456789876543210 F F = TrueSym0
+      TFHelper_0123456789876543210 G G = TrueSym0
+      TFHelper_0123456789876543210 F G = FalseSym0
+      TFHelper_0123456789876543210 G F = FalseSym0
+    type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: Foo2) (a0123456789876543210 :: Foo2) =
+        TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ())
+    data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: Foo2) :: (~>) Foo2 Bool
+      where
+        TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                a0123456789876543210
+                                                                arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                         TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ())
+    data TFHelper_0123456789876543210Sym0 :: (~>) Foo2 ((~>) Foo2 Bool)
+      where
+        TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) =>
+                                                         TFHelper_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210
+    instance PEq Foo2 where
+      type (==) a a = Apply (Apply TFHelper_0123456789876543210Sym0 a) a
+    infix 4 %<=>
+    sFooCompare ::
+      forall (t :: Foo) (t :: Foo).
+      Sing t
+      -> Sing t -> Sing (Apply (Apply FooCompareSym0 t) t :: Ordering)
+    sConst ::
+      forall a b (t :: a) (t :: b).
+      Sing t -> Sing t -> Sing (Apply (Apply ConstSym0 t) t :: a)
+    sFooCompare SA SA = SEQ
+    sFooCompare SA SB = SLT
+    sFooCompare SB SB = SGT
+    sFooCompare SB SA = SEQ
+    sConst (sX :: Sing x) _ = sX
+    instance SingI (FooCompareSym0 :: (~>) Foo ((~>) Foo Ordering)) where
+      sing = (singFun2 @FooCompareSym0) sFooCompare
+    instance SingI d =>
+             SingI (FooCompareSym1 (d :: Foo) :: (~>) Foo Ordering) where
+      sing
+        = (singFun1 @(FooCompareSym1 (d :: Foo))) (sFooCompare (sing @d))
+    instance SingI (ConstSym0 :: (~>) a ((~>) b a)) where
+      sing = (singFun2 @ConstSym0) sConst
+    instance SingI d => SingI (ConstSym1 (d :: a) :: (~>) b a) where
+      sing = (singFun1 @(ConstSym1 (d :: a))) (sConst (sing @d))
+    data SFoo :: Foo -> GHC.Types.Type
+      where
+        SA :: SFoo A
+        SB :: SFoo B
+    type instance Sing @Foo = SFoo
+    instance SingKind Foo where
+      type Demote Foo = Foo
+      fromSing SA = A
+      fromSing SB = B
+      toSing A = SomeSing SA
+      toSing B = SomeSing SB
+    data SFoo2 :: Foo2 -> GHC.Types.Type
+      where
+        SF :: SFoo2 F
+        SG :: SFoo2 G
+    type instance Sing @Foo2 = SFoo2
+    instance SingKind Foo2 where
+      type Demote Foo2 = Foo2
+      fromSing SF = F
+      fromSing SG = G
+      toSing F = SomeSing SF
+      toSing G = SomeSing SG
+    class SMyOrd a where
+      sMycompare ::
+        forall (t :: a) (t :: a).
+        Sing t
+        -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)
+      (%<=>) ::
+        forall (t :: a) (t :: a).
+        Sing t -> Sing t -> Sing (Apply (Apply (<=>@#@$) t) t :: Ordering)
+      default (%<=>) ::
+                forall (t :: a) (t :: a).
+                ((Apply (Apply (<=>@#@$) t) t :: Ordering)
+                 ~ Apply (Apply TFHelper_0123456789876543210Sym0 t) t) =>
+                Sing t -> Sing t -> Sing (Apply (Apply (<=>@#@$) t) t :: Ordering)
+      (%<=>)
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @MycompareSym0) sMycompare))
+                sA_0123456789876543210))
+            sA_0123456789876543210
+    instance SMyOrd Nat where
+      sMycompare ::
+        forall (t :: Nat) (t :: Nat).
+        Sing t
+        -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)
+      sMycompare SZero SZero = SEQ
+      sMycompare SZero (SSucc _) = SLT
+      sMycompare (SSucc _) SZero = SGT
+      sMycompare (SSucc (sN :: Sing n)) (SSucc (sM :: Sing m))
+        = (applySing
+             ((applySing ((singFun2 @MycompareSym0) sMycompare)) sM))
+            sN
+    instance SMyOrd () where
+      sMycompare ::
+        forall (t :: ()) (t :: ()).
+        Sing t
+        -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)
+      sMycompare _ (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing ((applySing ((singFun2 @ConstSym0) sConst)) SEQ))
+            sA_0123456789876543210
+    instance SMyOrd Foo where
+      sMycompare ::
+        forall (t :: Foo) (t :: Foo).
+        Sing t
+        -> Sing t -> Sing (Apply (Apply MycompareSym0 t) t :: Ordering)
+      sMycompare
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @FooCompareSym0) sFooCompare))
+                sA_0123456789876543210))
+            sA_0123456789876543210
+    instance SEq Foo2 where
+      (%==) ::
+        forall (a :: Foo2) (b :: Foo2). Sing a -> Sing b -> Sing ((==) a b)
+      (%==) SF SF = STrue
+      (%==) SG SG = STrue
+      (%==) SF SG = SFalse
+      (%==) SG SF = SFalse
+    instance SingI A where
+      sing = SA
+    instance SingI B where
+      sing = SB
+    instance SingI F where
+      sing = SF
+    instance SingI G where
+      sing = SG
+    instance SMyOrd a =>
+             SingI (MycompareSym0 :: (~>) a ((~>) a Ordering)) where
+      sing = (singFun2 @MycompareSym0) sMycompare
+    instance (SMyOrd a, SingI d) =>
+             SingI (MycompareSym1 (d :: a) :: (~>) a Ordering) where
+      sing = (singFun1 @(MycompareSym1 (d :: a))) (sMycompare (sing @d))
+    instance SMyOrd a =>
+             SingI ((<=>@#@$) :: (~>) a ((~>) a Ordering)) where
+      sing = (singFun2 @(<=>@#@$)) (%<=>)
+    instance (SMyOrd a, SingI d) =>
+             SingI ((<=>@#@$$) (d :: a) :: (~>) a Ordering) where
+      sing = (singFun1 @((<=>@#@$$) (d :: a))) ((%<=>) (sing @d))
+Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations
+    promote
+      [d| instance Ord Foo2 where
+            F `compare` F = EQ
+            F `compare` _ = LT
+            _ `compare` _ = GT
+          instance MyOrd Foo2 where
+            F `mycompare` F = EQ
+            F `mycompare` _ = LT
+            _ `mycompare` _ = GT |]
+  ======>
+    instance MyOrd Foo2 where
+      mycompare F F = EQ
+      mycompare F _ = LT
+      mycompare _ _ = GT
+    instance Ord Foo2 where
+      compare F F = EQ
+      compare F _ = LT
+      compare _ _ = GT
+    type family Mycompare_0123456789876543210 (a :: Foo2) (a :: Foo2) :: Ordering where
+      Mycompare_0123456789876543210 'F 'F = EQSym0
+      Mycompare_0123456789876543210 'F _ = LTSym0
+      Mycompare_0123456789876543210 _ _ = GTSym0
+    type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: Foo2) (a0123456789876543210 :: Foo2) =
+        Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ())
+    data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: Foo2) :: (~>) Foo2 Ordering
+      where
+        Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ())
+    data Mycompare_0123456789876543210Sym0 :: (~>) Foo2 ((~>) Foo2 Ordering)
+      where
+        Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>
+                                                          Mycompare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210
+    instance PMyOrd Foo2 where
+      type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a
+    type family Compare_0123456789876543210 (a :: Foo2) (a :: Foo2) :: Ordering where
+      Compare_0123456789876543210 'F 'F = EQSym0
+      Compare_0123456789876543210 'F _ = LTSym0
+      Compare_0123456789876543210 _ _ = GTSym0
+    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Foo2) (a0123456789876543210 :: Foo2) =
+        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
+    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Foo2) :: (~>) Foo2 Ordering
+      where
+        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
+    data Compare_0123456789876543210Sym0 :: (~>) Foo2 ((~>) Foo2 Ordering)
+      where
+        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
+                                                        Compare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
+    instance POrd Foo2 where
+      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
+Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| data Nat' = Zero' | Succ' Nat'
+          
+          instance MyOrd Nat' where
+            Zero' `mycompare` Zero' = EQ
+            Zero' `mycompare` (Succ' _) = LT
+            (Succ' _) `mycompare` Zero' = GT
+            (Succ' n) `mycompare` (Succ' m) = m `mycompare` n |]
+  ======>
+    data Nat' = Zero' | Succ' Nat'
+    instance MyOrd Nat' where
+      mycompare Zero' Zero' = EQ
+      mycompare Zero' (Succ' _) = LT
+      mycompare (Succ' _) Zero' = GT
+      mycompare (Succ' n) (Succ' m) = (m `mycompare` n)
+    type Zero'Sym0 = Zero'
+    type Succ'Sym1 (t0123456789876543210 :: Nat') =
+        Succ' t0123456789876543210
+    instance SuppressUnusedWarnings Succ'Sym0 where
+      suppressUnusedWarnings = snd (((,) Succ'Sym0KindInference) ())
+    data Succ'Sym0 :: (~>) Nat' Nat'
+      where
+        Succ'Sym0KindInference :: forall t0123456789876543210
+                                         arg. SameKind (Apply Succ'Sym0 arg) (Succ'Sym1 arg) =>
+                                  Succ'Sym0 t0123456789876543210
+    type instance Apply Succ'Sym0 t0123456789876543210 = Succ' t0123456789876543210
+    type family Mycompare_0123456789876543210 (a :: Nat') (a :: Nat') :: Ordering where
+      Mycompare_0123456789876543210 Zero' Zero' = EQSym0
+      Mycompare_0123456789876543210 Zero' (Succ' _) = LTSym0
+      Mycompare_0123456789876543210 (Succ' _) Zero' = GTSym0
+      Mycompare_0123456789876543210 (Succ' n) (Succ' m) = Apply (Apply MycompareSym0 m) n
+    type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: Nat') (a0123456789876543210 :: Nat') =
+        Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ())
+    data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: Nat') :: (~>) Nat' Ordering
+      where
+        Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ())
+    data Mycompare_0123456789876543210Sym0 :: (~>) Nat' ((~>) Nat' Ordering)
+      where
+        Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>
+                                                          Mycompare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210
+    instance PMyOrd Nat' where
+      type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a
+    data SNat' :: Nat' -> GHC.Types.Type
+      where
+        SZero' :: SNat' Zero'
+        SSucc' :: forall (n :: Nat'). (Sing (n :: Nat')) -> SNat' (Succ' n)
+    type instance Sing @Nat' = SNat'
+    instance SingKind Nat' where
+      type Demote Nat' = Nat'
+      fromSing SZero' = Zero'
+      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) }
+    instance SMyOrd Nat' where
+      sMycompare ::
+        forall (t :: Nat') (t :: Nat').
+        Sing t
+        -> Sing t
+           -> Sing (Apply (Apply (MycompareSym0 :: TyFun Nat' ((~>) Nat' Ordering)
+                                                   -> GHC.Types.Type) t) t)
+      sMycompare SZero' SZero' = SEQ
+      sMycompare SZero' (SSucc' _) = SLT
+      sMycompare (SSucc' _) SZero' = SGT
+      sMycompare (SSucc' (sN :: Sing n)) (SSucc' (sM :: Sing m))
+        = (applySing
+             ((applySing ((singFun2 @MycompareSym0) sMycompare)) sM))
+            sN
+    instance SingI Zero' where
+      sing = SZero'
+    instance SingI n => SingI (Succ' (n :: Nat')) where
+      sing = SSucc' sing
+    instance SingI (Succ'Sym0 :: (~>) Nat' Nat') where
+      sing = (singFun1 @Succ'Sym0) SSucc'
diff --git a/tests/compile-and-dump/Singletons/Classes2.ghc86.template b/tests/compile-and-dump/Singletons/Classes2.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/Classes2.ghc86.template
+++ /dev/null
@@ -1,91 +0,0 @@
-Singletons/Classes2.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| data NatFoo = ZeroFoo | SuccFoo NatFoo
-          
-          instance MyOrd NatFoo where
-            ZeroFoo `mycompare` ZeroFoo = EQ
-            ZeroFoo `mycompare` (SuccFoo _) = LT
-            (SuccFoo _) `mycompare` ZeroFoo = GT
-            (SuccFoo n) `mycompare` (SuccFoo m) = m `mycompare` n |]
-  ======>
-    data NatFoo = ZeroFoo | SuccFoo NatFoo
-    instance MyOrd NatFoo where
-      mycompare ZeroFoo ZeroFoo = EQ
-      mycompare ZeroFoo (SuccFoo _) = LT
-      mycompare (SuccFoo _) ZeroFoo = GT
-      mycompare (SuccFoo n) (SuccFoo m) = (m `mycompare` n)
-    type ZeroFooSym0 = ZeroFoo
-    type SuccFooSym1 (t0123456789876543210 :: NatFoo) =
-        SuccFoo t0123456789876543210
-    instance SuppressUnusedWarnings SuccFooSym0 where
-      suppressUnusedWarnings = snd (((,) SuccFooSym0KindInference) ())
-    data SuccFooSym0 :: (~>) NatFoo NatFoo
-      where
-        SuccFooSym0KindInference :: forall t0123456789876543210
-                                           arg. SameKind (Apply SuccFooSym0 arg) (SuccFooSym1 arg) =>
-                                    SuccFooSym0 t0123456789876543210
-    type instance Apply SuccFooSym0 t0123456789876543210 = SuccFoo t0123456789876543210
-    type family Mycompare_0123456789876543210 (a :: NatFoo) (a :: NatFoo) :: Ordering where
-      Mycompare_0123456789876543210 ZeroFoo ZeroFoo = EQSym0
-      Mycompare_0123456789876543210 ZeroFoo (SuccFoo _) = LTSym0
-      Mycompare_0123456789876543210 (SuccFoo _) ZeroFoo = GTSym0
-      Mycompare_0123456789876543210 (SuccFoo n) (SuccFoo m) = Apply (Apply MycompareSym0 m) n
-    type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: NatFoo) (a0123456789876543210 :: NatFoo) =
-        Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ())
-    data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: NatFoo) :: (~>) NatFoo Ordering
-      where
-        Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ())
-    data Mycompare_0123456789876543210Sym0 :: (~>) NatFoo ((~>) NatFoo Ordering)
-      where
-        Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>
-                                                          Mycompare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210
-    instance PMyOrd NatFoo where
-      type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a
-    data instance Sing :: NatFoo -> GHC.Types.Type
-      where
-        SZeroFoo :: Sing ZeroFoo
-        SSuccFoo :: forall (n :: NatFoo).
-                    (Sing (n :: NatFoo)) -> Sing (SuccFoo n)
-    type SNatFoo = (Sing :: NatFoo -> GHC.Types.Type)
-    instance SingKind NatFoo where
-      type Demote NatFoo = NatFoo
-      fromSing SZeroFoo = ZeroFoo
-      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) }
-    instance SMyOrd NatFoo where
-      sMycompare ::
-        forall (t1 :: NatFoo) (t2 :: NatFoo).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (MycompareSym0 :: TyFun NatFoo ((~>) NatFoo Ordering)
-                                                   -> GHC.Types.Type) t1) t2)
-      sMycompare SZeroFoo SZeroFoo = SEQ
-      sMycompare SZeroFoo (SSuccFoo _) = SLT
-      sMycompare (SSuccFoo _) SZeroFoo = SGT
-      sMycompare (SSuccFoo (sN :: Sing n)) (SSuccFoo (sM :: Sing m))
-        = (applySing
-             ((applySing ((singFun2 @MycompareSym0) sMycompare)) sM))
-            sN
-    instance SingI ZeroFoo where
-      sing = SZeroFoo
-    instance SingI n => SingI (SuccFoo (n :: NatFoo)) where
-      sing = SSuccFoo sing
-    instance SingI (SuccFooSym0 :: (~>) NatFoo NatFoo) where
-      sing = (singFun1 @SuccFooSym0) SSuccFoo
-    instance SingI (TyCon1 SuccFoo :: (~>) NatFoo NatFoo) where
-      sing = (singFun1 @(TyCon1 SuccFoo)) SSuccFoo
diff --git a/tests/compile-and-dump/Singletons/Classes2.ghc88.template b/tests/compile-and-dump/Singletons/Classes2.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/Classes2.ghc88.template
@@ -0,0 +1,89 @@
+Singletons/Classes2.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| data NatFoo = ZeroFoo | SuccFoo NatFoo
+          
+          instance MyOrd NatFoo where
+            ZeroFoo `mycompare` ZeroFoo = EQ
+            ZeroFoo `mycompare` (SuccFoo _) = LT
+            (SuccFoo _) `mycompare` ZeroFoo = GT
+            (SuccFoo n) `mycompare` (SuccFoo m) = m `mycompare` n |]
+  ======>
+    data NatFoo = ZeroFoo | SuccFoo NatFoo
+    instance MyOrd NatFoo where
+      mycompare ZeroFoo ZeroFoo = EQ
+      mycompare ZeroFoo (SuccFoo _) = LT
+      mycompare (SuccFoo _) ZeroFoo = GT
+      mycompare (SuccFoo n) (SuccFoo m) = (m `mycompare` n)
+    type ZeroFooSym0 = ZeroFoo
+    type SuccFooSym1 (t0123456789876543210 :: NatFoo) =
+        SuccFoo t0123456789876543210
+    instance SuppressUnusedWarnings SuccFooSym0 where
+      suppressUnusedWarnings = snd (((,) SuccFooSym0KindInference) ())
+    data SuccFooSym0 :: (~>) NatFoo NatFoo
+      where
+        SuccFooSym0KindInference :: forall t0123456789876543210
+                                           arg. SameKind (Apply SuccFooSym0 arg) (SuccFooSym1 arg) =>
+                                    SuccFooSym0 t0123456789876543210
+    type instance Apply SuccFooSym0 t0123456789876543210 = SuccFoo t0123456789876543210
+    type family Mycompare_0123456789876543210 (a :: NatFoo) (a :: NatFoo) :: Ordering where
+      Mycompare_0123456789876543210 ZeroFoo ZeroFoo = EQSym0
+      Mycompare_0123456789876543210 ZeroFoo (SuccFoo _) = LTSym0
+      Mycompare_0123456789876543210 (SuccFoo _) ZeroFoo = GTSym0
+      Mycompare_0123456789876543210 (SuccFoo n) (SuccFoo m) = Apply (Apply MycompareSym0 m) n
+    type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: NatFoo) (a0123456789876543210 :: NatFoo) =
+        Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ())
+    data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: NatFoo) :: (~>) NatFoo Ordering
+      where
+        Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ())
+    data Mycompare_0123456789876543210Sym0 :: (~>) NatFoo ((~>) NatFoo Ordering)
+      where
+        Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) =>
+                                                          Mycompare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210
+    instance PMyOrd NatFoo where
+      type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a
+    data SNatFoo :: NatFoo -> GHC.Types.Type
+      where
+        SZeroFoo :: SNatFoo ZeroFoo
+        SSuccFoo :: forall (n :: NatFoo).
+                    (Sing (n :: NatFoo)) -> SNatFoo (SuccFoo n)
+    type instance Sing @NatFoo = SNatFoo
+    instance SingKind NatFoo where
+      type Demote NatFoo = NatFoo
+      fromSing SZeroFoo = ZeroFoo
+      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) }
+    instance SMyOrd NatFoo where
+      sMycompare ::
+        forall (t1 :: NatFoo) (t2 :: NatFoo).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (MycompareSym0 :: TyFun NatFoo ((~>) NatFoo Ordering)
+                                                   -> GHC.Types.Type) t1) t2)
+      sMycompare SZeroFoo SZeroFoo = SEQ
+      sMycompare SZeroFoo (SSuccFoo _) = SLT
+      sMycompare (SSuccFoo _) SZeroFoo = SGT
+      sMycompare (SSuccFoo (sN :: Sing n)) (SSuccFoo (sM :: Sing m))
+        = (applySing
+             ((applySing ((singFun2 @MycompareSym0) sMycompare)) sM))
+            sN
+    instance SingI ZeroFoo where
+      sing = SZeroFoo
+    instance SingI n => SingI (SuccFoo (n :: NatFoo)) where
+      sing = SSuccFoo sing
+    instance SingI (SuccFooSym0 :: (~>) NatFoo NatFoo) where
+      sing = (singFun1 @SuccFooSym0) SSuccFoo
diff --git a/tests/compile-and-dump/Singletons/Contains.ghc86.template b/tests/compile-and-dump/Singletons/Contains.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/Contains.ghc86.template
+++ /dev/null
@@ -1,50 +0,0 @@
-Singletons/Contains.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| contains :: Eq a => a -> [a] -> Bool
-          contains _ [] = False
-          contains elt (h : t) = (elt == h) || (contains elt t) |]
-  ======>
-    contains :: Eq a => a -> [a] -> Bool
-    contains _ [] = False
-    contains elt (h : t) = ((elt == h) || (contains elt) t)
-    type ContainsSym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: [a0123456789876543210]) =
-        Contains a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ContainsSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) ContainsSym1KindInference) ())
-    data ContainsSym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) [a0123456789876543210] Bool
-      where
-        ContainsSym1KindInference :: forall a0123456789876543210
-                                            a0123456789876543210
-                                            arg. SameKind (Apply (ContainsSym1 a0123456789876543210) arg) (ContainsSym2 a0123456789876543210 arg) =>
-                                     ContainsSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ContainsSym1 a0123456789876543210) a0123456789876543210 = Contains a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ContainsSym0 where
-      suppressUnusedWarnings = snd (((,) ContainsSym0KindInference) ())
-    data ContainsSym0 :: forall a0123456789876543210.
-                         (~>) a0123456789876543210 ((~>) [a0123456789876543210] Bool)
-      where
-        ContainsSym0KindInference :: forall a0123456789876543210
-                                            arg. SameKind (Apply ContainsSym0 arg) (ContainsSym1 arg) =>
-                                     ContainsSym0 a0123456789876543210
-    type instance Apply ContainsSym0 a0123456789876543210 = ContainsSym1 a0123456789876543210
-    type family Contains (a :: a) (a :: [a]) :: Bool where
-      Contains _ '[] = FalseSym0
-      Contains elt ( '(:) h t) = Apply (Apply (||@#@$) (Apply (Apply (==@#@$) elt) h)) (Apply (Apply ContainsSym0 elt) t)
-    sContains ::
-      forall a (t :: a) (t :: [a]).
-      SEq a =>
-      Sing t -> Sing t -> Sing (Apply (Apply ContainsSym0 t) t :: Bool)
-    sContains _ SNil = SFalse
-    sContains (sElt :: Sing elt) (SCons (sH :: Sing h) (sT :: Sing t))
-      = (applySing
-           ((applySing ((singFun2 @(||@#@$)) (%||)))
-              ((applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sElt)) sH)))
-          ((applySing
-              ((applySing ((singFun2 @ContainsSym0) sContains)) sElt))
-             sT)
-    instance SEq a =>
-             SingI (ContainsSym0 :: (~>) a ((~>) [a] Bool)) where
-      sing = (singFun2 @ContainsSym0) sContains
-    instance (SEq a, SingI d) =>
-             SingI (ContainsSym1 (d :: a) :: (~>) [a] Bool) where
-      sing = (singFun1 @(ContainsSym1 (d :: a))) (sContains (sing @d))
diff --git a/tests/compile-and-dump/Singletons/Contains.ghc88.template b/tests/compile-and-dump/Singletons/Contains.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/Contains.ghc88.template
@@ -0,0 +1,50 @@
+Singletons/Contains.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| contains :: Eq a => a -> [a] -> Bool
+          contains _ [] = False
+          contains elt (h : t) = (elt == h) || (contains elt t) |]
+  ======>
+    contains :: Eq a => a -> [a] -> Bool
+    contains _ [] = False
+    contains elt (h : t) = ((elt == h) || (contains elt) t)
+    type ContainsSym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: [a0123456789876543210]) =
+        Contains a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ContainsSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) ContainsSym1KindInference) ())
+    data ContainsSym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) [a0123456789876543210] Bool
+      where
+        ContainsSym1KindInference :: forall a0123456789876543210
+                                            a0123456789876543210
+                                            arg. SameKind (Apply (ContainsSym1 a0123456789876543210) arg) (ContainsSym2 a0123456789876543210 arg) =>
+                                     ContainsSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ContainsSym1 a0123456789876543210) a0123456789876543210 = Contains a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ContainsSym0 where
+      suppressUnusedWarnings = snd (((,) ContainsSym0KindInference) ())
+    data ContainsSym0 :: forall a0123456789876543210.
+                         (~>) a0123456789876543210 ((~>) [a0123456789876543210] Bool)
+      where
+        ContainsSym0KindInference :: forall a0123456789876543210
+                                            arg. SameKind (Apply ContainsSym0 arg) (ContainsSym1 arg) =>
+                                     ContainsSym0 a0123456789876543210
+    type instance Apply ContainsSym0 a0123456789876543210 = ContainsSym1 a0123456789876543210
+    type family Contains (a :: a) (a :: [a]) :: Bool where
+      Contains _ '[] = FalseSym0
+      Contains elt ('(:) h t) = Apply (Apply (||@#@$) (Apply (Apply (==@#@$) elt) h)) (Apply (Apply ContainsSym0 elt) t)
+    sContains ::
+      forall a (t :: a) (t :: [a]).
+      SEq a =>
+      Sing t -> Sing t -> Sing (Apply (Apply ContainsSym0 t) t :: Bool)
+    sContains _ SNil = SFalse
+    sContains (sElt :: Sing elt) (SCons (sH :: Sing h) (sT :: Sing t))
+      = (applySing
+           ((applySing ((singFun2 @(||@#@$)) (%||)))
+              ((applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sElt)) sH)))
+          ((applySing
+              ((applySing ((singFun2 @ContainsSym0) sContains)) sElt))
+             sT)
+    instance SEq a =>
+             SingI (ContainsSym0 :: (~>) a ((~>) [a] Bool)) where
+      sing = (singFun2 @ContainsSym0) sContains
+    instance (SEq a, SingI d) =>
+             SingI (ContainsSym1 (d :: a) :: (~>) [a] Bool) where
+      sing = (singFun1 @(ContainsSym1 (d :: a))) (sContains (sing @d))
diff --git a/tests/compile-and-dump/Singletons/DataValues.ghc86.template b/tests/compile-and-dump/Singletons/DataValues.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/DataValues.ghc86.template
+++ /dev/null
@@ -1,186 +0,0 @@
-Singletons/DataValues.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| pr = Pair (Succ Zero) ([Zero])
-          complex = Pair (Pair (Just Zero) Zero) False
-          tuple = (False, Just Zero, True)
-          aList = [Zero, Succ Zero, Succ (Succ Zero)]
-          
-          data Pair a b
-            = Pair a b
-            deriving Show |]
-  ======>
-    data Pair a b
-      = Pair a b
-      deriving Show
-    pr = (Pair (Succ Zero)) [Zero]
-    complex = (Pair ((Pair (Just Zero)) Zero)) False
-    tuple = (False, Just Zero, True)
-    aList = [Zero, Succ Zero, Succ (Succ Zero)]
-    type PairSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) =
-        Pair t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (PairSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) PairSym1KindInference) ())
-    data PairSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                    (~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210)
-      where
-        PairSym1KindInference :: forall t0123456789876543210
-                                        t0123456789876543210
-                                        arg. SameKind (Apply (PairSym1 t0123456789876543210) arg) (PairSym2 t0123456789876543210 arg) =>
-                                 PairSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (PairSym1 t0123456789876543210) t0123456789876543210 = Pair t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings PairSym0 where
-      suppressUnusedWarnings = snd (((,) PairSym0KindInference) ())
-    data PairSym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210))
-      where
-        PairSym0KindInference :: forall t0123456789876543210
-                                        arg. SameKind (Apply PairSym0 arg) (PairSym1 arg) =>
-                                 PairSym0 t0123456789876543210
-    type instance Apply PairSym0 t0123456789876543210 = PairSym1 t0123456789876543210
-    type AListSym0 = AList
-    type TupleSym0 = Tuple
-    type ComplexSym0 = Complex
-    type PrSym0 = Pr
-    type family AList where
-      AList = Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply SuccSym0 (Apply SuccSym0 ZeroSym0))) '[]))
-    type family Tuple where
-      Tuple = Apply (Apply (Apply Tuple3Sym0 FalseSym0) (Apply JustSym0 ZeroSym0)) TrueSym0
-    type family Complex where
-      Complex = Apply (Apply PairSym0 (Apply (Apply PairSym0 (Apply JustSym0 ZeroSym0)) ZeroSym0)) FalseSym0
-    type family Pr where
-      Pr = Apply (Apply PairSym0 (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:@#@$) ZeroSym0) '[])
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Pair a b) (a :: Symbol) :: Symbol where
-      ShowsPrec_0123456789876543210 p_0123456789876543210 (Pair arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Pair ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Pair a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Pair a0123456789876543210 b0123456789876543210) :: (~>) Symbol Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210
-                                                                                             b0123456789876543210.
-                                                                                      (~>) (Pair a0123456789876543210 b0123456789876543210) ((~>) Symbol Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                     b0123456789876543210.
-                                              (~>) GHC.Types.Nat ((~>) (Pair a0123456789876543210 b0123456789876543210) ((~>) Symbol Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow (Pair a b) where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    sAList :: Sing AListSym0
-    sTuple :: Sing TupleSym0
-    sComplex :: Sing ComplexSym0
-    sPr :: Sing PrSym0
-    sAList
-      = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SZero))
-          ((applySing
-              ((applySing ((singFun2 @(:@#@$)) SCons))
-                 ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
-             ((applySing
-                 ((applySing ((singFun2 @(:@#@$)) SCons))
-                    ((applySing ((singFun1 @SuccSym0) SSucc))
-                       ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))
-                SNil))
-    sTuple
-      = (applySing
-           ((applySing ((applySing ((singFun3 @Tuple3Sym0) STuple3)) SFalse))
-              ((applySing ((singFun1 @JustSym0) SJust)) SZero)))
-          STrue
-    sComplex
-      = (applySing
-           ((applySing ((singFun2 @PairSym0) SPair))
-              ((applySing
-                  ((applySing ((singFun2 @PairSym0) SPair))
-                     ((applySing ((singFun1 @JustSym0) SJust)) SZero)))
-                 SZero)))
-          SFalse
-    sPr
-      = (applySing
-           ((applySing ((singFun2 @PairSym0) SPair))
-              ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
-          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SZero)) SNil)
-    data instance Sing :: Pair a b -> GHC.Types.Type
-      where
-        SPair :: forall a b (n :: a) (n :: b).
-                 (Sing (n :: a)) -> (Sing (n :: b)) -> Sing (Pair n n)
-    type SPair = (Sing :: Pair a b -> GHC.Types.Type)
-    instance (SingKind a, SingKind b) => SingKind (Pair a b) where
-      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) }
-    instance (SShow a, SShow b) => SShow (Pair a b) where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: Pair a b) (t3 :: Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) (Pair a b) ((~>) Symbol Symbol))
-                                                             -> GHC.Types.Type) t1) t2) t3)
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        (SPair (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
-               (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (sFromInteger (sing :: Sing 10)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                          (sing :: Sing "Pair "))))
-                   ((applySing
-                       ((applySing ((singFun3 @(.@#@$)) (%.)))
-                          ((applySing
-                              ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                                 (sFromInteger (sing :: Sing 11))))
-                             sArg_0123456789876543210)))
-                      ((applySing
-                          ((applySing ((singFun3 @(.@#@$)) (%.)))
-                             ((singFun1 @ShowSpaceSym0) sShowSpace)))
-                         ((applySing
-                             ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                                (sFromInteger (sing :: Sing 11))))
-                            sArg_0123456789876543210))))))
-            sA_0123456789876543210
-    deriving instance (Data.Singletons.ShowSing.ShowSing a,
-                       Data.Singletons.ShowSing.ShowSing b) =>
-                      Show (Sing (z :: Pair a b))
-    instance (SingI n, SingI n) => SingI (Pair (n :: a) (n :: b)) where
-      sing = (SPair sing) sing
-    instance SingI (PairSym0 :: (~>) a ((~>) b (Pair a b))) where
-      sing = (singFun2 @PairSym0) SPair
-    instance SingI (TyCon2 Pair :: (~>) a ((~>) b (Pair a b))) where
-      sing = (singFun2 @(TyCon2 Pair)) SPair
-    instance SingI d =>
-             SingI (PairSym1 (d :: a) :: (~>) b (Pair a b)) where
-      sing = (singFun1 @(PairSym1 (d :: a))) (SPair (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 (Pair (d :: a)) :: (~>) b (Pair a b)) where
-      sing = (singFun1 @(TyCon1 (Pair (d :: a)))) (SPair (sing @d))
diff --git a/tests/compile-and-dump/Singletons/DataValues.ghc88.template b/tests/compile-and-dump/Singletons/DataValues.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/DataValues.ghc88.template
@@ -0,0 +1,193 @@
+Singletons/DataValues.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| pr = Pair (Succ Zero) ([Zero])
+          complex = Pair (Pair (Just Zero) Zero) False
+          tuple = (False, Just Zero, True)
+          aList = [Zero, Succ Zero, Succ (Succ Zero)]
+          
+          data Pair a b
+            = Pair a b
+            deriving Show |]
+  ======>
+    data Pair a b
+      = Pair a b
+      deriving Show
+    pr = (Pair (Succ Zero)) [Zero]
+    complex = (Pair ((Pair (Just Zero)) Zero)) False
+    tuple = (False, Just Zero, True)
+    aList = [Zero, Succ Zero, Succ (Succ Zero)]
+    type PairSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) =
+        Pair t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (PairSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) PairSym1KindInference) ())
+    data PairSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                    (~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210)
+      where
+        PairSym1KindInference :: forall t0123456789876543210
+                                        t0123456789876543210
+                                        arg. SameKind (Apply (PairSym1 t0123456789876543210) arg) (PairSym2 t0123456789876543210 arg) =>
+                                 PairSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (PairSym1 t0123456789876543210) t0123456789876543210 = Pair t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings PairSym0 where
+      suppressUnusedWarnings = snd (((,) PairSym0KindInference) ())
+    data PairSym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210))
+      where
+        PairSym0KindInference :: forall t0123456789876543210
+                                        arg. SameKind (Apply PairSym0 arg) (PairSym1 arg) =>
+                                 PairSym0 t0123456789876543210
+    type instance Apply PairSym0 t0123456789876543210 = PairSym1 t0123456789876543210
+    type AListSym0 = AList
+    type TupleSym0 = Tuple
+    type ComplexSym0 = Complex
+    type PrSym0 = Pr
+    type family AList where
+      AList = Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply SuccSym0 (Apply SuccSym0 ZeroSym0))) '[]))
+    type family Tuple where
+      Tuple = Apply (Apply (Apply Tuple3Sym0 FalseSym0) (Apply JustSym0 ZeroSym0)) TrueSym0
+    type family Complex where
+      Complex = Apply (Apply PairSym0 (Apply (Apply PairSym0 (Apply JustSym0 ZeroSym0)) ZeroSym0)) FalseSym0
+    type family Pr where
+      Pr = Apply (Apply PairSym0 (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:@#@$) ZeroSym0) '[])
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Pair a b) (a :: Symbol) :: Symbol where
+      ShowsPrec_0123456789876543210 p_0123456789876543210 (Pair arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Pair ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Pair a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Pair a0123456789876543210 b0123456789876543210) :: (~>) Symbol Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210
+                                                                                             b0123456789876543210.
+                                                                                      (~>) (Pair a0123456789876543210 b0123456789876543210) ((~>) Symbol Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210
+                                                     b0123456789876543210.
+                                              (~>) GHC.Types.Nat ((~>) (Pair a0123456789876543210 b0123456789876543210) ((~>) Symbol Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow (Pair a b) where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    sAList :: Sing AListSym0
+    sTuple :: Sing TupleSym0
+    sComplex :: Sing ComplexSym0
+    sPr :: Sing PrSym0
+    sAList
+      = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SZero))
+          ((applySing
+              ((applySing ((singFun2 @(:@#@$)) SCons))
+                 ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
+             ((applySing
+                 ((applySing ((singFun2 @(:@#@$)) SCons))
+                    ((applySing ((singFun1 @SuccSym0) SSucc))
+                       ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))
+                SNil))
+    sTuple
+      = (applySing
+           ((applySing ((applySing ((singFun3 @Tuple3Sym0) STuple3)) SFalse))
+              ((applySing ((singFun1 @JustSym0) SJust)) SZero)))
+          STrue
+    sComplex
+      = (applySing
+           ((applySing ((singFun2 @PairSym0) SPair))
+              ((applySing
+                  ((applySing ((singFun2 @PairSym0) SPair))
+                     ((applySing ((singFun1 @JustSym0) SJust)) SZero)))
+                 SZero)))
+          SFalse
+    sPr
+      = (applySing
+           ((applySing ((singFun2 @PairSym0) SPair))
+              ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
+          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SZero)) SNil)
+    data SPair :: forall a b. Pair a b -> GHC.Types.Type
+      where
+        SPair :: forall a b (n :: a) (n :: b).
+                 (Sing (n :: a)) -> (Sing (n :: b)) -> SPair (Pair n n)
+    type instance Sing @(Pair a b) = SPair
+    instance (SingKind a, SingKind b) => SingKind (Pair a b) where
+      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) }
+    instance (SShow a, SShow b) => SShow (Pair a b) where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: Pair a b) (t3 :: Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) (Pair a b) ((~>) Symbol Symbol))
+                                                             -> GHC.Types.Type) t1) t2) t3)
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        (SPair (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
+               (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (sFromInteger (sing :: Sing 10)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                          (sing :: Sing "Pair "))))
+                   ((applySing
+                       ((applySing ((singFun3 @(.@#@$)) (%.)))
+                          ((applySing
+                              ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                                 (sFromInteger (sing :: Sing 11))))
+                             sArg_0123456789876543210)))
+                      ((applySing
+                          ((applySing ((singFun3 @(.@#@$)) (%.)))
+                             ((singFun1 @ShowSpaceSym0) sShowSpace)))
+                         ((applySing
+                             ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                                (sFromInteger (sing :: Sing 11))))
+                            sArg_0123456789876543210))))))
+            sA_0123456789876543210
+    instance (Data.Singletons.ShowSing.ShowSing a,
+              Data.Singletons.ShowSing.ShowSing b) =>
+             Show (SPair (z :: Pair a b)) where
+      showsPrec
+        p_0123456789876543210
+        (SPair (arg_0123456789876543210 :: Sing argTy_0123456789876543210)
+               (arg_0123456789876543210 :: Sing argTy_0123456789876543210))
+        = (showParen (((>) p_0123456789876543210) 10))
+            (((.) (showString "SPair "))
+               (((.) ((showsPrec 11) arg_0123456789876543210))
+                  (((.) GHC.Show.showSpace)
+                     ((showsPrec 11) arg_0123456789876543210)))) ::
+            (Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210,
+             Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210) =>
+            ShowS
+    instance (SingI n, SingI n) => SingI (Pair (n :: a) (n :: b)) where
+      sing = (SPair sing) sing
+    instance SingI (PairSym0 :: (~>) a ((~>) b (Pair a b))) where
+      sing = (singFun2 @PairSym0) SPair
+    instance SingI d =>
+             SingI (PairSym1 (d :: a) :: (~>) b (Pair a b)) where
+      sing = (singFun1 @(PairSym1 (d :: a))) (SPair (sing @d))
diff --git a/tests/compile-and-dump/Singletons/Empty.ghc86.template b/tests/compile-and-dump/Singletons/Empty.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/Empty.ghc86.template
+++ /dev/null
@@ -1,10 +0,0 @@
-Singletons/Empty.hs:(0,0)-(0,0): Splicing declarations
-    singletons [d| data Empty |]
-  ======>
-    data Empty
-    data instance Sing :: Empty -> GHC.Types.Type
-    type SEmpty = (Sing :: Empty -> GHC.Types.Type)
-    instance SingKind Empty where
-      type Demote Empty = Empty
-      fromSing x = case x of
-      toSing x = SomeSing (case x of)
diff --git a/tests/compile-and-dump/Singletons/Empty.ghc88.template b/tests/compile-and-dump/Singletons/Empty.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/Empty.ghc88.template
@@ -0,0 +1,10 @@
+Singletons/Empty.hs:(0,0)-(0,0): Splicing declarations
+    singletons [d| data Empty |]
+  ======>
+    data Empty
+    data SEmpty :: Empty -> GHC.Types.Type
+    type instance Sing @Empty = SEmpty
+    instance SingKind Empty where
+      type Demote Empty = Empty
+      fromSing x = case x of
+      toSing x = SomeSing (case x of)
diff --git a/tests/compile-and-dump/Singletons/EmptyShowDeriving.ghc86.template b/tests/compile-and-dump/Singletons/EmptyShowDeriving.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/EmptyShowDeriving.ghc86.template
+++ /dev/null
@@ -1,68 +0,0 @@
-Singletons/EmptyShowDeriving.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| data Foo
-          
-          deriving instance Show Foo |]
-  ======>
-    data Foo
-    deriving instance Show Foo
-    type family Case_0123456789876543210 v_0123456789876543210 a_0123456789876543210 t where
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (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
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo) (a0123456789876543210 :: GHC.Types.Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo) :: (~>) GHC.Types.Symbol GHC.Types.Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Foo ((~>) GHC.Types.Symbol GHC.Types.Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Foo ((~>) GHC.Types.Symbol GHC.Types.Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow Foo where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    data instance Sing :: Foo -> GHC.Types.Type
-    type SFoo = (Sing :: Foo -> GHC.Types.Type)
-    instance SingKind Foo where
-      type Demote Foo = Foo
-      fromSing x = case x of
-      toSing x = SomeSing (case x of)
-    instance SShow Foo where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: Foo) (t3 :: GHC.Types.Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) Foo ((~>) GHC.Types.Symbol GHC.Types.Symbol))
-                                                             -> GHC.Types.Type) t1) t2) t3)
-      sShowsPrec
-        _
-        (sV_0123456789876543210 :: Sing v_0123456789876543210)
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((case sV_0123456789876543210 of) ::
-                Sing (Case_0123456789876543210 v_0123456789876543210 a_0123456789876543210 v_0123456789876543210)))
-            sA_0123456789876543210
-    deriving instance Show (Sing (z :: Foo))
diff --git a/tests/compile-and-dump/Singletons/EmptyShowDeriving.ghc88.template b/tests/compile-and-dump/Singletons/EmptyShowDeriving.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/EmptyShowDeriving.ghc88.template
@@ -0,0 +1,70 @@
+Singletons/EmptyShowDeriving.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| data Foo
+          
+          deriving instance Show Foo |]
+  ======>
+    data Foo
+    deriving instance Show Foo
+    type family Case_0123456789876543210 v_0123456789876543210 a_0123456789876543210 t where
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (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
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo) (a0123456789876543210 :: GHC.Types.Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo) :: (~>) GHC.Types.Symbol GHC.Types.Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Foo ((~>) GHC.Types.Symbol GHC.Types.Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Foo ((~>) GHC.Types.Symbol GHC.Types.Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow Foo where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    data SFoo :: Foo -> GHC.Types.Type
+    type instance Sing @Foo = SFoo
+    instance SingKind Foo where
+      type Demote Foo = Foo
+      fromSing x = case x of
+      toSing x = SomeSing (case x of)
+    instance SShow Foo where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: Foo) (t3 :: GHC.Types.Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) Foo ((~>) GHC.Types.Symbol GHC.Types.Symbol))
+                                                             -> GHC.Types.Type) t1) t2) t3)
+      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)))
+            sA_0123456789876543210
+    instance Show (SFoo (z :: Foo)) where
+      showsPrec _ v_0123456789876543210 = case v_0123456789876543210 of
diff --git a/tests/compile-and-dump/Singletons/EnumDeriving.ghc86.template b/tests/compile-and-dump/Singletons/EnumDeriving.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/EnumDeriving.ghc86.template
+++ /dev/null
@@ -1,199 +0,0 @@
-Singletons/EnumDeriving.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| data Foo
-            = Bar | Baz | Bum
-            deriving Enum
-          data Quux = Q1 | Q2 |]
-  ======>
-    data Foo
-      = Bar | Baz | Bum
-      deriving Enum
-    data Quux = Q1 | Q2
-    type BarSym0 = Bar
-    type BazSym0 = Baz
-    type BumSym0 = Bum
-    type Q1Sym0 = Q1
-    type Q2Sym0 = Q2
-    type family Case_0123456789876543210 n t where
-      Case_0123456789876543210 n  'True = BumSym0
-      Case_0123456789876543210 n  'False = Apply ErrorSym0 "toEnum: bad argument"
-    type family Case_0123456789876543210 n t where
-      Case_0123456789876543210 n  'True = BazSym0
-      Case_0123456789876543210 n  'False = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 2))
-    type family Case_0123456789876543210 n t where
-      Case_0123456789876543210 n  'True = BarSym0
-      Case_0123456789876543210 n  'False = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 1))
-    type family ToEnum_0123456789876543210 (a :: GHC.Types.Nat) :: Foo where
-      ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0))
-    type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) =
-        ToEnum_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ())
-    data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat Foo
-      where
-        ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                              arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) =>
-                                                       ToEnum_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210 a0123456789876543210
-    type family FromEnum_0123456789876543210 (a :: Foo) :: GHC.Types.Nat where
-      FromEnum_0123456789876543210 Bar = Data.Singletons.Prelude.Num.FromInteger 0
-      FromEnum_0123456789876543210 Baz = Data.Singletons.Prelude.Num.FromInteger 1
-      FromEnum_0123456789876543210 Bum = Data.Singletons.Prelude.Num.FromInteger 2
-    type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: Foo) =
-        FromEnum_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ())
-    data FromEnum_0123456789876543210Sym0 :: (~>) Foo GHC.Types.Nat
-      where
-        FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) =>
-                                                         FromEnum_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210 a0123456789876543210
-    instance PEnum Foo where
-      type ToEnum a = Apply ToEnum_0123456789876543210Sym0 a
-      type FromEnum a = Apply FromEnum_0123456789876543210Sym0 a
-    data instance Sing :: Foo -> GHC.Types.Type
-      where
-        SBar :: Sing Bar
-        SBaz :: Sing Baz
-        SBum :: Sing Bum
-    type SFoo = (Sing :: Foo -> GHC.Types.Type)
-    instance SingKind Foo where
-      type Demote Foo = Foo
-      fromSing SBar = Bar
-      fromSing SBaz = Baz
-      fromSing SBum = Bum
-      toSing Bar = SomeSing SBar
-      toSing Baz = SomeSing SBaz
-      toSing Bum = SomeSing SBum
-    data instance Sing :: Quux -> GHC.Types.Type
-      where
-        SQ1 :: Sing Q1
-        SQ2 :: Sing Q2
-    type SQuux = (Sing :: Quux -> GHC.Types.Type)
-    instance SingKind Quux where
-      type Demote Quux = Quux
-      fromSing SQ1 = Q1
-      fromSing SQ2 = Q2
-      toSing Q1 = SomeSing SQ1
-      toSing Q2 = SomeSing SQ2
-    instance SEnum Foo where
-      sToEnum ::
-        forall (t :: GHC.Types.Nat).
-        Sing t
-        -> Sing (Apply (Data.Singletons.Prelude.Enum.ToEnumSym0 :: TyFun GHC.Types.Nat Foo
-                                                                   -> GHC.Types.Type) t)
-      sFromEnum ::
-        forall (t :: Foo).
-        Sing t
-        -> Sing (Apply (Data.Singletons.Prelude.Enum.FromEnumSym0 :: TyFun Foo GHC.Types.Nat
-                                                                     -> GHC.Types.Type) t)
-      sToEnum (sN :: Sing n)
-        = (case
-               (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sN))
-                 (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 0))
-           of
-             STrue -> SBar
-             SFalse
-               -> (case
-                       (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sN))
-                         (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 1))
-                   of
-                     STrue -> SBaz
-                     SFalse
-                       -> (case
-                               (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sN))
-                                 (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 2))
-                           of
-                             STrue -> SBum
-                             SFalse -> sError (sing :: Sing "toEnum: bad argument")) ::
-                            Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 2)))) ::
-                    Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 1)))) ::
-            Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0)))
-      sFromEnum SBar
-        = Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 0)
-      sFromEnum SBaz
-        = Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 1)
-      sFromEnum SBum
-        = Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 2)
-    instance SingI Bar where
-      sing = SBar
-    instance SingI Baz where
-      sing = SBaz
-    instance SingI Bum where
-      sing = SBum
-    instance SingI Q1 where
-      sing = SQ1
-    instance SingI Q2 where
-      sing = SQ2
-Singletons/EnumDeriving.hs:0:0:: Splicing declarations
-    singEnumInstance ''Quux
-  ======>
-    type family Case_0123456789876543210 n t where
-      Case_0123456789876543210 n  'True = Q2Sym0
-      Case_0123456789876543210 n  'False = Apply ErrorSym0 "toEnum: bad argument"
-    type family Case_0123456789876543210 n t where
-      Case_0123456789876543210 n  'True = Q1Sym0
-      Case_0123456789876543210 n  'False = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 1))
-    type family ToEnum_0123456789876543210 (a :: GHC.Types.Nat) :: Quux where
-      ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0))
-    type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) =
-        ToEnum_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ())
-    data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat Quux
-      where
-        ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                              arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) =>
-                                                       ToEnum_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210 a0123456789876543210
-    type family FromEnum_0123456789876543210 (a :: Quux) :: GHC.Types.Nat where
-      FromEnum_0123456789876543210  'Q1 = Data.Singletons.Prelude.Num.FromInteger 0
-      FromEnum_0123456789876543210  'Q2 = Data.Singletons.Prelude.Num.FromInteger 1
-    type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: Quux) =
-        FromEnum_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ())
-    data FromEnum_0123456789876543210Sym0 :: (~>) Quux GHC.Types.Nat
-      where
-        FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) =>
-                                                         FromEnum_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210 a0123456789876543210
-    instance PEnum Quux where
-      type ToEnum a = Apply ToEnum_0123456789876543210Sym0 a
-      type FromEnum a = Apply FromEnum_0123456789876543210Sym0 a
-    instance SEnum Quux where
-      sToEnum ::
-        forall (t :: GHC.Types.Nat).
-        Sing t
-        -> Sing (Apply (Data.Singletons.Prelude.Enum.ToEnumSym0 :: TyFun GHC.Types.Nat Quux
-                                                                   -> GHC.Types.Type) t)
-      sFromEnum ::
-        forall (t :: Quux).
-        Sing t
-        -> Sing (Apply (Data.Singletons.Prelude.Enum.FromEnumSym0 :: TyFun Quux GHC.Types.Nat
-                                                                     -> GHC.Types.Type) t)
-      sToEnum (sN :: Sing n)
-        = (case
-               (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sN))
-                 (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 0))
-           of
-             STrue -> SQ1
-             SFalse
-               -> (case
-                       (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sN))
-                         (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 1))
-                   of
-                     STrue -> SQ2
-                     SFalse -> sError (sing :: Sing "toEnum: bad argument")) ::
-                    Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 1)))) ::
-            Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0)))
-      sFromEnum SQ1
-        = Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 0)
-      sFromEnum SQ2
-        = Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 1)
diff --git a/tests/compile-and-dump/Singletons/EnumDeriving.ghc88.template b/tests/compile-and-dump/Singletons/EnumDeriving.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/EnumDeriving.ghc88.template
@@ -0,0 +1,204 @@
+Singletons/EnumDeriving.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| data Foo
+            = Bar | Baz | Bum
+            deriving Enum
+          data Quux = Q1 | Q2 |]
+  ======>
+    data Foo
+      = Bar | Baz | Bum
+      deriving Enum
+    data Quux = Q1 | Q2
+    type BarSym0 = Bar
+    type BazSym0 = Baz
+    type BumSym0 = Bum
+    type Q1Sym0 = Q1
+    type Q2Sym0 = Q2
+    type family Case_0123456789876543210 n t where
+      Case_0123456789876543210 n 'True = BumSym0
+      Case_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument"
+    type family Case_0123456789876543210 n t where
+      Case_0123456789876543210 n 'True = BazSym0
+      Case_0123456789876543210 n 'False = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 2))
+    type family Case_0123456789876543210 n t where
+      Case_0123456789876543210 n 'True = BarSym0
+      Case_0123456789876543210 n 'False = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 1))
+    type family ToEnum_0123456789876543210 (a :: GHC.Types.Nat) :: Foo where
+      ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0))
+    type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) =
+        ToEnum_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ())
+    data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat Foo
+      where
+        ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                              arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) =>
+                                                       ToEnum_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210 a0123456789876543210
+    type family FromEnum_0123456789876543210 (a :: Foo) :: GHC.Types.Nat where
+      FromEnum_0123456789876543210 Bar = Data.Singletons.Prelude.Num.FromInteger 0
+      FromEnum_0123456789876543210 Baz = Data.Singletons.Prelude.Num.FromInteger 1
+      FromEnum_0123456789876543210 Bum = Data.Singletons.Prelude.Num.FromInteger 2
+    type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: Foo) =
+        FromEnum_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ())
+    data FromEnum_0123456789876543210Sym0 :: (~>) Foo GHC.Types.Nat
+      where
+        FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) =>
+                                                         FromEnum_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210 a0123456789876543210
+    instance PEnum Foo where
+      type ToEnum a = Apply ToEnum_0123456789876543210Sym0 a
+      type FromEnum a = Apply FromEnum_0123456789876543210Sym0 a
+    data SFoo :: Foo -> GHC.Types.Type
+      where
+        SBar :: SFoo Bar
+        SBaz :: SFoo Baz
+        SBum :: SFoo Bum
+    type instance Sing @Foo = SFoo
+    instance SingKind Foo where
+      type Demote Foo = Foo
+      fromSing SBar = Bar
+      fromSing SBaz = Baz
+      fromSing SBum = Bum
+      toSing Bar = SomeSing SBar
+      toSing Baz = SomeSing SBaz
+      toSing Bum = SomeSing SBum
+    data SQuux :: Quux -> GHC.Types.Type
+      where
+        SQ1 :: SQuux Q1
+        SQ2 :: SQuux Q2
+    type instance Sing @Quux = SQuux
+    instance SingKind Quux where
+      type Demote Quux = Quux
+      fromSing SQ1 = Q1
+      fromSing SQ2 = Q2
+      toSing Q1 = SomeSing SQ1
+      toSing Q2 = SomeSing SQ2
+    instance SEnum Foo where
+      sToEnum ::
+        forall (t :: GHC.Types.Nat).
+        Sing t
+        -> Sing (Apply (Data.Singletons.Prelude.Enum.ToEnumSym0 :: TyFun GHC.Types.Nat Foo
+                                                                   -> GHC.Types.Type) t)
+      sFromEnum ::
+        forall (t :: Foo).
+        Sing t
+        -> Sing (Apply (Data.Singletons.Prelude.Enum.FromEnumSym0 :: TyFun Foo GHC.Types.Nat
+                                                                     -> GHC.Types.Type) t)
+      sToEnum (sN :: Sing n)
+        = (id
+             @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0)))))
+            (case
+                 (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sN))
+                   (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 0))
+             of
+               STrue -> SBar
+               SFalse
+                 -> (id
+                       @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 1)))))
+                      (case
+                           (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sN))
+                             (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 1))
+                       of
+                         STrue -> SBaz
+                         SFalse
+                           -> (id
+                                 @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 2)))))
+                                (case
+                                     (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sN))
+                                       (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 2))
+                                 of
+                                   STrue -> SBum
+                                   SFalse -> sError (sing :: Sing "toEnum: bad argument"))))
+      sFromEnum SBar
+        = Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 0)
+      sFromEnum SBaz
+        = Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 1)
+      sFromEnum SBum
+        = Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 2)
+    instance SingI Bar where
+      sing = SBar
+    instance SingI Baz where
+      sing = SBaz
+    instance SingI Bum where
+      sing = SBum
+    instance SingI Q1 where
+      sing = SQ1
+    instance SingI Q2 where
+      sing = SQ2
+Singletons/EnumDeriving.hs:0:0:: Splicing declarations
+    singEnumInstance ''Quux
+  ======>
+    type family Case_0123456789876543210 n t where
+      Case_0123456789876543210 n 'True = Q2Sym0
+      Case_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument"
+    type family Case_0123456789876543210 n t where
+      Case_0123456789876543210 n 'True = Q1Sym0
+      Case_0123456789876543210 n 'False = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 1))
+    type family ToEnum_0123456789876543210 (a :: GHC.Types.Nat) :: Quux where
+      ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0))
+    type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) =
+        ToEnum_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ())
+    data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat Quux
+      where
+        ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                              arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) =>
+                                                       ToEnum_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210 a0123456789876543210
+    type family FromEnum_0123456789876543210 (a :: Quux) :: GHC.Types.Nat where
+      FromEnum_0123456789876543210 'Q1 = Data.Singletons.Prelude.Num.FromInteger 0
+      FromEnum_0123456789876543210 'Q2 = Data.Singletons.Prelude.Num.FromInteger 1
+    type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: Quux) =
+        FromEnum_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ())
+    data FromEnum_0123456789876543210Sym0 :: (~>) Quux GHC.Types.Nat
+      where
+        FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) =>
+                                                         FromEnum_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210 a0123456789876543210
+    instance PEnum Quux where
+      type ToEnum a = Apply ToEnum_0123456789876543210Sym0 a
+      type FromEnum a = Apply FromEnum_0123456789876543210Sym0 a
+    instance SEnum Quux where
+      sToEnum ::
+        forall (t :: GHC.Types.Nat).
+        Sing t
+        -> Sing (Apply (Data.Singletons.Prelude.Enum.ToEnumSym0 :: TyFun GHC.Types.Nat Quux
+                                                                   -> GHC.Types.Type) t)
+      sFromEnum ::
+        forall (t :: Quux).
+        Sing t
+        -> Sing (Apply (Data.Singletons.Prelude.Enum.FromEnumSym0 :: TyFun Quux GHC.Types.Nat
+                                                                     -> GHC.Types.Type) t)
+      sToEnum (sN :: Sing n)
+        = (id
+             @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0)))))
+            (case
+                 (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sN))
+                   (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 0))
+             of
+               STrue -> SQ1
+               SFalse
+                 -> (id
+                       @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 1)))))
+                      (case
+                           (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sN))
+                             (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 1))
+                       of
+                         STrue -> SQ2
+                         SFalse -> sError (sing :: Sing "toEnum: bad argument")))
+      sFromEnum SQ1
+        = Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 0)
+      sFromEnum SQ2
+        = Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 1)
diff --git a/tests/compile-and-dump/Singletons/EqInstances.ghc86.template b/tests/compile-and-dump/Singletons/EqInstances.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/EqInstances.ghc86.template
+++ /dev/null
@@ -1,21 +0,0 @@
-Singletons/EqInstances.hs:0:0:: Splicing declarations
-    singEqInstances [''Foo, ''Empty]
-  ======>
-    instance SEq Foo => SEq Foo where
-      (%==) SFLeaf SFLeaf = STrue
-      (%==) SFLeaf ((:%+:) _ _) = SFalse
-      (%==) ((:%+:) _ _) SFLeaf = SFalse
-      (%==) ((:%+:) a a) ((:%+:) b b)
-        = ((%&&) (((%==) a) b)) (((%==) a) b)
-    type family Equals_0123456789876543210 (a :: Foo) (b :: Foo) :: Bool where
-      Equals_0123456789876543210  'FLeaf  'FLeaf = TrueSym0
-      Equals_0123456789876543210 ( '(:+:) a a) ( '(:+:) b b) = (&&) ((==) a b) ((==) a b)
-      Equals_0123456789876543210 (_ :: Foo) (_ :: Foo) = FalseSym0
-    instance PEq Foo where
-      type (==) a b = Equals_0123456789876543210 a b
-    instance SEq Empty where
-      (%==) _ _ = STrue
-    type family Equals_0123456789876543210 (a :: Empty) (b :: Empty) :: Bool where
-      Equals_0123456789876543210 (_ :: Empty) (_ :: Empty) = TrueSym0
-    instance PEq Empty where
-      type (==) a b = Equals_0123456789876543210 a b
diff --git a/tests/compile-and-dump/Singletons/EqInstances.ghc88.template b/tests/compile-and-dump/Singletons/EqInstances.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/EqInstances.ghc88.template
@@ -0,0 +1,21 @@
+Singletons/EqInstances.hs:0:0:: Splicing declarations
+    singEqInstances [''Foo, ''Empty]
+  ======>
+    instance SEq Foo => SEq Foo where
+      (%==) SFLeaf SFLeaf = STrue
+      (%==) SFLeaf ((:%+:) _ _) = SFalse
+      (%==) ((:%+:) _ _) SFLeaf = SFalse
+      (%==) ((:%+:) a a) ((:%+:) b b)
+        = ((%&&) (((%==) a) b)) (((%==) a) b)
+    type family Equals_0123456789876543210 (a :: Foo) (b :: Foo) :: Bool where
+      Equals_0123456789876543210 'FLeaf 'FLeaf = TrueSym0
+      Equals_0123456789876543210 ('(:+:) a a) ('(:+:) b b) = (&&) ((==) a b) ((==) a b)
+      Equals_0123456789876543210 (_ :: Foo) (_ :: Foo) = FalseSym0
+    instance PEq Foo where
+      type (==) a b = Equals_0123456789876543210 a b
+    instance SEq Empty where
+      (%==) _ _ = STrue
+    type family Equals_0123456789876543210 (a :: Empty) (b :: Empty) :: Bool where
+      Equals_0123456789876543210 (_ :: Empty) (_ :: Empty) = TrueSym0
+    instance PEq Empty where
+      type (==) a b = Equals_0123456789876543210 a b
diff --git a/tests/compile-and-dump/Singletons/Error.ghc86.template b/tests/compile-and-dump/Singletons/Error.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/Error.ghc86.template
+++ /dev/null
@@ -1,30 +0,0 @@
-Singletons/Error.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| head :: [a] -> a
-          head (a : _) = a
-          head [] = error "Data.Singletons.List.head: empty list" |]
-  ======>
-    head :: [a] -> a
-    head (a : _) = a
-    head [] = error "Data.Singletons.List.head: empty list"
-    type HeadSym1 (a0123456789876543210 :: [a0123456789876543210]) =
-        Head a0123456789876543210
-    instance SuppressUnusedWarnings HeadSym0 where
-      suppressUnusedWarnings = snd (((,) HeadSym0KindInference) ())
-    data HeadSym0 :: forall a0123456789876543210.
-                     (~>) [a0123456789876543210] a0123456789876543210
-      where
-        HeadSym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply HeadSym0 arg) (HeadSym1 arg) =>
-                                 HeadSym0 a0123456789876543210
-    type instance Apply HeadSym0 a0123456789876543210 = Head a0123456789876543210
-    type family Head (a :: [a]) :: a where
-      Head ( '(:) a _) = a
-      Head '[] = Apply ErrorSym0 "Data.Singletons.List.head: empty list"
-    sHead ::
-      forall a (t :: [a]). Sing t -> Sing (Apply HeadSym0 t :: a)
-    sHead (SCons (sA :: Sing a) _) = sA
-    sHead SNil
-      = sError (sing :: Sing "Data.Singletons.List.head: empty list")
-    instance SingI (HeadSym0 :: (~>) [a] a) where
-      sing = (singFun1 @HeadSym0) sHead
diff --git a/tests/compile-and-dump/Singletons/Error.ghc88.template b/tests/compile-and-dump/Singletons/Error.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/Error.ghc88.template
@@ -0,0 +1,30 @@
+Singletons/Error.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| head :: [a] -> a
+          head (a : _) = a
+          head [] = error "Data.Singletons.List.head: empty list" |]
+  ======>
+    head :: [a] -> a
+    head (a : _) = a
+    head [] = error "Data.Singletons.List.head: empty list"
+    type HeadSym1 (a0123456789876543210 :: [a0123456789876543210]) =
+        Head a0123456789876543210
+    instance SuppressUnusedWarnings HeadSym0 where
+      suppressUnusedWarnings = snd (((,) HeadSym0KindInference) ())
+    data HeadSym0 :: forall a0123456789876543210.
+                     (~>) [a0123456789876543210] a0123456789876543210
+      where
+        HeadSym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply HeadSym0 arg) (HeadSym1 arg) =>
+                                 HeadSym0 a0123456789876543210
+    type instance Apply HeadSym0 a0123456789876543210 = Head a0123456789876543210
+    type family Head (a :: [a]) :: a where
+      Head ('(:) a _) = a
+      Head '[] = Apply ErrorSym0 "Data.Singletons.List.head: empty list"
+    sHead ::
+      forall a (t :: [a]). Sing t -> Sing (Apply HeadSym0 t :: a)
+    sHead (SCons (sA :: Sing a) _) = sA
+    sHead SNil
+      = sError (sing :: Sing "Data.Singletons.List.head: empty list")
+    instance SingI (HeadSym0 :: (~>) [a] a) where
+      sing = (singFun1 @HeadSym0) sHead
diff --git a/tests/compile-and-dump/Singletons/Fixity.ghc86.template b/tests/compile-and-dump/Singletons/Fixity.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/Fixity.ghc86.template
+++ /dev/null
@@ -1,86 +0,0 @@
-Singletons/Fixity.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| infix 4 ====
-          infix 4 <=>
-          
-          (====) :: a -> a -> a
-          a ==== _ = a
-          
-          class MyOrd a where
-            (<=>) :: a -> a -> Ordering
-            infix 4 <=> |]
-  ======>
-    class MyOrd a where
-      (<=>) :: a -> a -> Ordering
-    infix 4 <=>
-    (====) :: a -> a -> a
-    (====) a _ = a
-    infix 4 ====
-    type (====@#@$$$) (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: a0123456789876543210) =
-        (====) a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ((====@#@$$) a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (:====@#@$$###)) ())
-    data (====@#@$$) (a0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 a0123456789876543210
-      where
-        (:====@#@$$###) :: forall a0123456789876543210
-                                  a0123456789876543210
-                                  arg. SameKind (Apply ((====@#@$$) a0123456789876543210) arg) ((====@#@$$$) a0123456789876543210 arg) =>
-                           (====@#@$$) a0123456789876543210 a0123456789876543210
-    type instance Apply ((====@#@$$) a0123456789876543210) a0123456789876543210 = (====) a0123456789876543210 a0123456789876543210
-    infix 4 ====@#@$$
-    instance SuppressUnusedWarnings (====@#@$) where
-      suppressUnusedWarnings = snd (((,) (:====@#@$###)) ())
-    data (====@#@$) :: forall a0123456789876543210.
-                       (~>) a0123456789876543210 ((~>) a0123456789876543210 a0123456789876543210)
-      where
-        (:====@#@$###) :: forall a0123456789876543210
-                                 arg. SameKind (Apply (====@#@$) arg) ((====@#@$$) arg) =>
-                          (====@#@$) a0123456789876543210
-    type instance Apply (====@#@$) a0123456789876543210 = (====@#@$$) a0123456789876543210
-    infix 4 ====@#@$
-    type family (====) (a :: a) (a :: a) :: a where
-      (====) a _ = a
-    type (<=>@#@$$$) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) =
-        (<=>) arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings ((<=>@#@$$) arg0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (:<=>@#@$$###)) ())
-    data (<=>@#@$$) (arg0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 Ordering
-      where
-        (:<=>@#@$$###) :: forall arg0123456789876543210
-                                 arg0123456789876543210
-                                 arg. SameKind (Apply ((<=>@#@$$) arg0123456789876543210) arg) ((<=>@#@$$$) arg0123456789876543210 arg) =>
-                          (<=>@#@$$) arg0123456789876543210 arg0123456789876543210
-    type instance Apply ((<=>@#@$$) arg0123456789876543210) arg0123456789876543210 = (<=>) arg0123456789876543210 arg0123456789876543210
-    infix 4 <=>@#@$$
-    instance SuppressUnusedWarnings (<=>@#@$) where
-      suppressUnusedWarnings = snd (((,) (:<=>@#@$###)) ())
-    data (<=>@#@$) :: forall a0123456789876543210.
-                      (~>) a0123456789876543210 ((~>) a0123456789876543210 Ordering)
-      where
-        (:<=>@#@$###) :: forall arg0123456789876543210
-                                arg. SameKind (Apply (<=>@#@$) arg) ((<=>@#@$$) arg) =>
-                         (<=>@#@$) arg0123456789876543210
-    type instance Apply (<=>@#@$) arg0123456789876543210 = (<=>@#@$$) arg0123456789876543210
-    infix 4 <=>@#@$
-    class PMyOrd (a :: GHC.Types.Type) where
-      type (<=>) (arg :: a) (arg :: a) :: Ordering
-    infix 4 %====
-    infix 4 %<=>
-    (%====) ::
-      forall a (t :: a) (t :: a).
-      Sing t -> Sing t -> Sing (Apply (Apply (====@#@$) t) t :: a)
-    (%====) (sA :: Sing a) _ = sA
-    instance SingI ((====@#@$) :: (~>) a ((~>) a a)) where
-      sing = (singFun2 @(====@#@$)) (%====)
-    instance SingI d => SingI ((====@#@$$) (d :: a) :: (~>) a a) where
-      sing = (singFun1 @((====@#@$$) (d :: a))) ((%====) (sing @d))
-    class SMyOrd a where
-      (%<=>) ::
-        forall (t :: a) (t :: a).
-        Sing t -> Sing t -> Sing (Apply (Apply (<=>@#@$) t) t :: Ordering)
-    instance SMyOrd a =>
-             SingI ((<=>@#@$) :: (~>) a ((~>) a Ordering)) where
-      sing = (singFun2 @(<=>@#@$)) (%<=>)
-    instance (SMyOrd a, SingI d) =>
-             SingI ((<=>@#@$$) (d :: a) :: (~>) a Ordering) where
-      sing = (singFun1 @((<=>@#@$$) (d :: a))) ((%<=>) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/Fixity.ghc88.template b/tests/compile-and-dump/Singletons/Fixity.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/Fixity.ghc88.template
@@ -0,0 +1,86 @@
+Singletons/Fixity.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| infix 4 ====
+          infix 4 <=>
+          
+          (====) :: a -> a -> a
+          a ==== _ = a
+          
+          class MyOrd a where
+            (<=>) :: a -> a -> Ordering
+            infix 4 <=> |]
+  ======>
+    class MyOrd a where
+      (<=>) :: a -> a -> Ordering
+    infix 4 <=>
+    (====) :: a -> a -> a
+    (====) a _ = a
+    infix 4 ====
+    type (====@#@$$$) (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: a0123456789876543210) =
+        (====) a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ((====@#@$$) a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (:====@#@$$###)) ())
+    data (====@#@$$) (a0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 a0123456789876543210
+      where
+        (:====@#@$$###) :: forall a0123456789876543210
+                                  a0123456789876543210
+                                  arg. SameKind (Apply ((====@#@$$) a0123456789876543210) arg) ((====@#@$$$) a0123456789876543210 arg) =>
+                           (====@#@$$) a0123456789876543210 a0123456789876543210
+    type instance Apply ((====@#@$$) a0123456789876543210) a0123456789876543210 = (====) a0123456789876543210 a0123456789876543210
+    infix 4 ====@#@$$
+    instance SuppressUnusedWarnings (====@#@$) where
+      suppressUnusedWarnings = snd (((,) (:====@#@$###)) ())
+    data (====@#@$) :: forall a0123456789876543210.
+                       (~>) a0123456789876543210 ((~>) a0123456789876543210 a0123456789876543210)
+      where
+        (:====@#@$###) :: forall a0123456789876543210
+                                 arg. SameKind (Apply (====@#@$) arg) ((====@#@$$) arg) =>
+                          (====@#@$) a0123456789876543210
+    type instance Apply (====@#@$) a0123456789876543210 = (====@#@$$) a0123456789876543210
+    infix 4 ====@#@$
+    type family (====) (a :: a) (a :: a) :: a where
+      (====) a _ = a
+    type (<=>@#@$$$) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) =
+        (<=>) arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings ((<=>@#@$$) arg0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (:<=>@#@$$###)) ())
+    data (<=>@#@$$) (arg0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 Ordering
+      where
+        (:<=>@#@$$###) :: forall arg0123456789876543210
+                                 arg0123456789876543210
+                                 arg. SameKind (Apply ((<=>@#@$$) arg0123456789876543210) arg) ((<=>@#@$$$) arg0123456789876543210 arg) =>
+                          (<=>@#@$$) arg0123456789876543210 arg0123456789876543210
+    type instance Apply ((<=>@#@$$) arg0123456789876543210) arg0123456789876543210 = (<=>) arg0123456789876543210 arg0123456789876543210
+    infix 4 <=>@#@$$
+    instance SuppressUnusedWarnings (<=>@#@$) where
+      suppressUnusedWarnings = snd (((,) (:<=>@#@$###)) ())
+    data (<=>@#@$) :: forall a0123456789876543210.
+                      (~>) a0123456789876543210 ((~>) a0123456789876543210 Ordering)
+      where
+        (:<=>@#@$###) :: forall arg0123456789876543210
+                                arg. SameKind (Apply (<=>@#@$) arg) ((<=>@#@$$) arg) =>
+                         (<=>@#@$) arg0123456789876543210
+    type instance Apply (<=>@#@$) arg0123456789876543210 = (<=>@#@$$) arg0123456789876543210
+    infix 4 <=>@#@$
+    class PMyOrd (a :: GHC.Types.Type) where
+      type (<=>) (arg :: a) (arg :: a) :: Ordering
+    infix 4 %====
+    infix 4 %<=>
+    (%====) ::
+      forall a (t :: a) (t :: a).
+      Sing t -> Sing t -> Sing (Apply (Apply (====@#@$) t) t :: a)
+    (%====) (sA :: Sing a) _ = sA
+    instance SingI ((====@#@$) :: (~>) a ((~>) a a)) where
+      sing = (singFun2 @(====@#@$)) (%====)
+    instance SingI d => SingI ((====@#@$$) (d :: a) :: (~>) a a) where
+      sing = (singFun1 @((====@#@$$) (d :: a))) ((%====) (sing @d))
+    class SMyOrd a where
+      (%<=>) ::
+        forall (t :: a) (t :: a).
+        Sing t -> Sing t -> Sing (Apply (Apply (<=>@#@$) t) t :: Ordering)
+    instance SMyOrd a =>
+             SingI ((<=>@#@$) :: (~>) a ((~>) a Ordering)) where
+      sing = (singFun2 @(<=>@#@$)) (%<=>)
+    instance (SMyOrd a, SingI d) =>
+             SingI ((<=>@#@$$) (d :: a) :: (~>) a Ordering) where
+      sing = (singFun1 @((<=>@#@$$) (d :: a))) ((%<=>) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/FunDeps.ghc86.template b/tests/compile-and-dump/Singletons/FunDeps.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/FunDeps.ghc86.template
+++ /dev/null
@@ -1,96 +0,0 @@
-Singletons/FunDeps.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| t1 = meth True
-          
-          class FD a b | a -> b where
-            meth :: a -> a
-            l2r :: a -> b
-          
-          instance FD Bool Nat where
-            meth = not
-            l2r False = 0
-            l2r True = 1 |]
-  ======>
-    class FD a b | a -> b where
-      meth :: a -> a
-      l2r :: a -> b
-    instance FD Bool Nat where
-      meth = not
-      l2r False = 0
-      l2r True = 1
-    t1 = meth True
-    type T1Sym0 = T1
-    type family T1 where
-      T1 = Apply MethSym0 TrueSym0
-    type MethSym1 (arg0123456789876543210 :: a0123456789876543210) =
-        Meth arg0123456789876543210
-    instance SuppressUnusedWarnings MethSym0 where
-      suppressUnusedWarnings = snd (((,) MethSym0KindInference) ())
-    data MethSym0 :: forall a0123456789876543210.
-                     (~>) a0123456789876543210 a0123456789876543210
-      where
-        MethSym0KindInference :: forall arg0123456789876543210
-                                        arg. SameKind (Apply MethSym0 arg) (MethSym1 arg) =>
-                                 MethSym0 arg0123456789876543210
-    type instance Apply MethSym0 arg0123456789876543210 = Meth arg0123456789876543210
-    type L2rSym1 (arg0123456789876543210 :: a0123456789876543210) =
-        L2r arg0123456789876543210
-    instance SuppressUnusedWarnings L2rSym0 where
-      suppressUnusedWarnings = snd (((,) L2rSym0KindInference) ())
-    data L2rSym0 :: forall a0123456789876543210 b0123456789876543210.
-                    (~>) a0123456789876543210 b0123456789876543210
-      where
-        L2rSym0KindInference :: forall arg0123456789876543210
-                                       arg. SameKind (Apply L2rSym0 arg) (L2rSym1 arg) =>
-                                L2rSym0 arg0123456789876543210
-    type instance Apply L2rSym0 arg0123456789876543210 = L2r arg0123456789876543210
-    class PFD (a :: GHC.Types.Type) (b :: GHC.Types.Type) | a -> b where
-      type Meth (arg :: a) :: a
-      type L2r (arg :: a) :: b
-    type family Meth_0123456789876543210 (a :: Bool) :: Bool where
-      Meth_0123456789876543210 a_0123456789876543210 = Apply NotSym0 a_0123456789876543210
-    type Meth_0123456789876543210Sym1 (a0123456789876543210 :: Bool) =
-        Meth_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Meth_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Meth_0123456789876543210Sym0KindInference) ())
-    data Meth_0123456789876543210Sym0 :: (~>) Bool Bool
-      where
-        Meth_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                            arg. SameKind (Apply Meth_0123456789876543210Sym0 arg) (Meth_0123456789876543210Sym1 arg) =>
-                                                     Meth_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Meth_0123456789876543210Sym0 a0123456789876543210 = Meth_0123456789876543210 a0123456789876543210
-    type family L2r_0123456789876543210 (a :: Bool) :: Nat where
-      L2r_0123456789876543210  'False = FromInteger 0
-      L2r_0123456789876543210  'True = FromInteger 1
-    type L2r_0123456789876543210Sym1 (a0123456789876543210 :: Bool) =
-        L2r_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings L2r_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) L2r_0123456789876543210Sym0KindInference) ())
-    data L2r_0123456789876543210Sym0 :: (~>) Bool Nat
-      where
-        L2r_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                           arg. SameKind (Apply L2r_0123456789876543210Sym0 arg) (L2r_0123456789876543210Sym1 arg) =>
-                                                    L2r_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply L2r_0123456789876543210Sym0 a0123456789876543210 = L2r_0123456789876543210 a0123456789876543210
-    instance PFD Bool Nat where
-      type Meth a = Apply Meth_0123456789876543210Sym0 a
-      type L2r a = Apply L2r_0123456789876543210Sym0 a
-    sT1 :: Sing T1Sym0
-    sT1 = (applySing ((singFun1 @MethSym0) sMeth)) STrue
-    class SFD a b | a -> b where
-      sMeth :: forall (t :: a). Sing t -> Sing (Apply MethSym0 t :: a)
-      sL2r :: forall (t :: a). Sing t -> Sing (Apply L2rSym0 t :: b)
-    instance SFD Bool Nat where
-      sMeth ::
-        forall (t :: Bool). Sing t -> Sing (Apply MethSym0 t :: Bool)
-      sL2r :: forall (t :: Bool). Sing t -> Sing (Apply L2rSym0 t :: Nat)
-      sMeth (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing ((singFun1 @NotSym0) sNot)) sA_0123456789876543210
-      sL2r SFalse = sFromInteger (sing :: Sing 0)
-      sL2r STrue = sFromInteger (sing :: Sing 1)
-    instance SFD a b => SingI (MethSym0 :: (~>) a a) where
-      sing = (singFun1 @MethSym0) sMeth
-    instance SFD a b => SingI (L2rSym0 :: (~>) a b) where
-      sing = (singFun1 @L2rSym0) sL2r
diff --git a/tests/compile-and-dump/Singletons/FunDeps.ghc88.template b/tests/compile-and-dump/Singletons/FunDeps.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/FunDeps.ghc88.template
@@ -0,0 +1,96 @@
+Singletons/FunDeps.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| t1 = meth True
+          
+          class FD a b | a -> b where
+            meth :: a -> a
+            l2r :: a -> b
+          
+          instance FD Bool Nat where
+            meth = not
+            l2r False = 0
+            l2r True = 1 |]
+  ======>
+    class FD a b | a -> b where
+      meth :: a -> a
+      l2r :: a -> b
+    instance FD Bool Nat where
+      meth = not
+      l2r False = 0
+      l2r True = 1
+    t1 = meth True
+    type T1Sym0 = T1
+    type family T1 where
+      T1 = Apply MethSym0 TrueSym0
+    type MethSym1 (arg0123456789876543210 :: a0123456789876543210) =
+        Meth arg0123456789876543210
+    instance SuppressUnusedWarnings MethSym0 where
+      suppressUnusedWarnings = snd (((,) MethSym0KindInference) ())
+    data MethSym0 :: forall a0123456789876543210.
+                     (~>) a0123456789876543210 a0123456789876543210
+      where
+        MethSym0KindInference :: forall arg0123456789876543210
+                                        arg. SameKind (Apply MethSym0 arg) (MethSym1 arg) =>
+                                 MethSym0 arg0123456789876543210
+    type instance Apply MethSym0 arg0123456789876543210 = Meth arg0123456789876543210
+    type L2rSym1 (arg0123456789876543210 :: a0123456789876543210) =
+        L2r arg0123456789876543210
+    instance SuppressUnusedWarnings L2rSym0 where
+      suppressUnusedWarnings = snd (((,) L2rSym0KindInference) ())
+    data L2rSym0 :: forall a0123456789876543210 b0123456789876543210.
+                    (~>) a0123456789876543210 b0123456789876543210
+      where
+        L2rSym0KindInference :: forall arg0123456789876543210
+                                       arg. SameKind (Apply L2rSym0 arg) (L2rSym1 arg) =>
+                                L2rSym0 arg0123456789876543210
+    type instance Apply L2rSym0 arg0123456789876543210 = L2r arg0123456789876543210
+    class PFD (a :: GHC.Types.Type) (b :: GHC.Types.Type) | a -> b where
+      type Meth (arg :: a) :: a
+      type L2r (arg :: a) :: b
+    type family Meth_0123456789876543210 (a :: Bool) :: Bool where
+      Meth_0123456789876543210 a_0123456789876543210 = Apply NotSym0 a_0123456789876543210
+    type Meth_0123456789876543210Sym1 (a0123456789876543210 :: Bool) =
+        Meth_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Meth_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Meth_0123456789876543210Sym0KindInference) ())
+    data Meth_0123456789876543210Sym0 :: (~>) Bool Bool
+      where
+        Meth_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                            arg. SameKind (Apply Meth_0123456789876543210Sym0 arg) (Meth_0123456789876543210Sym1 arg) =>
+                                                     Meth_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Meth_0123456789876543210Sym0 a0123456789876543210 = Meth_0123456789876543210 a0123456789876543210
+    type family L2r_0123456789876543210 (a :: Bool) :: Nat where
+      L2r_0123456789876543210 'False = FromInteger 0
+      L2r_0123456789876543210 'True = FromInteger 1
+    type L2r_0123456789876543210Sym1 (a0123456789876543210 :: Bool) =
+        L2r_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings L2r_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) L2r_0123456789876543210Sym0KindInference) ())
+    data L2r_0123456789876543210Sym0 :: (~>) Bool Nat
+      where
+        L2r_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                           arg. SameKind (Apply L2r_0123456789876543210Sym0 arg) (L2r_0123456789876543210Sym1 arg) =>
+                                                    L2r_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply L2r_0123456789876543210Sym0 a0123456789876543210 = L2r_0123456789876543210 a0123456789876543210
+    instance PFD Bool Nat where
+      type Meth a = Apply Meth_0123456789876543210Sym0 a
+      type L2r a = Apply L2r_0123456789876543210Sym0 a
+    sT1 :: Sing T1Sym0
+    sT1 = (applySing ((singFun1 @MethSym0) sMeth)) STrue
+    class SFD a b | a -> b where
+      sMeth :: forall (t :: a). Sing t -> Sing (Apply MethSym0 t :: a)
+      sL2r :: forall (t :: a). Sing t -> Sing (Apply L2rSym0 t :: b)
+    instance SFD Bool Nat where
+      sMeth ::
+        forall (t :: Bool). Sing t -> Sing (Apply MethSym0 t :: Bool)
+      sL2r :: forall (t :: Bool). Sing t -> Sing (Apply L2rSym0 t :: Nat)
+      sMeth (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing ((singFun1 @NotSym0) sNot)) sA_0123456789876543210
+      sL2r SFalse = sFromInteger (sing :: Sing 0)
+      sL2r STrue = sFromInteger (sing :: Sing 1)
+    instance SFD a b => SingI (MethSym0 :: (~>) a a) where
+      sing = (singFun1 @MethSym0) sMeth
+    instance SFD a b => SingI (L2rSym0 :: (~>) a b) where
+      sing = (singFun1 @L2rSym0) sL2r
diff --git a/tests/compile-and-dump/Singletons/FunctorLikeDeriving.ghc86.template b/tests/compile-and-dump/Singletons/FunctorLikeDeriving.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/FunctorLikeDeriving.ghc86.template
+++ /dev/null
@@ -1,1646 +0,0 @@
-Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| data T x a
-            = MkT1 x a (Maybe a) (Maybe (Maybe a)) | MkT2 (Maybe x)
-            deriving (Functor, Foldable, Traversable)
-          data Empty (a :: Type) deriving (Functor, Foldable, Traversable) |]
-  ======>
-    data T x a
-      = MkT1 x a (Maybe a) (Maybe (Maybe a)) | MkT2 (Maybe x)
-      deriving (Functor, Foldable, Traversable)
-    data Empty (a :: Type) deriving (Functor, Foldable, Traversable)
-    type MkT1Sym4 (t0123456789876543210 :: x0123456789876543210) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: Maybe a0123456789876543210) (t0123456789876543210 :: Maybe (Maybe a0123456789876543210)) =
-        MkT1 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (MkT1Sym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MkT1Sym3KindInference) ())
-    data MkT1Sym3 (t0123456789876543210 :: x0123456789876543210) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: Maybe a0123456789876543210) :: (~>) (Maybe (Maybe a0123456789876543210)) (T x0123456789876543210 a0123456789876543210)
-      where
-        MkT1Sym3KindInference :: forall t0123456789876543210
-                                        t0123456789876543210
-                                        t0123456789876543210
-                                        t0123456789876543210
-                                        arg. SameKind (Apply (MkT1Sym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (MkT1Sym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
-                                 MkT1Sym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (MkT1Sym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = MkT1 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (MkT1Sym2 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MkT1Sym2KindInference) ())
-    data MkT1Sym2 (t0123456789876543210 :: x0123456789876543210) (t0123456789876543210 :: a0123456789876543210) :: (~>) (Maybe a0123456789876543210) ((~>) (Maybe (Maybe a0123456789876543210)) (T x0123456789876543210 a0123456789876543210))
-      where
-        MkT1Sym2KindInference :: forall t0123456789876543210
-                                        t0123456789876543210
-                                        t0123456789876543210
-                                        arg. SameKind (Apply (MkT1Sym2 t0123456789876543210 t0123456789876543210) arg) (MkT1Sym3 t0123456789876543210 t0123456789876543210 arg) =>
-                                 MkT1Sym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (MkT1Sym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = MkT1Sym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (MkT1Sym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MkT1Sym1KindInference) ())
-    data MkT1Sym1 (t0123456789876543210 :: x0123456789876543210) :: forall a0123456789876543210.
-                                                                    (~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) ((~>) (Maybe (Maybe a0123456789876543210)) (T x0123456789876543210 a0123456789876543210)))
-      where
-        MkT1Sym1KindInference :: forall t0123456789876543210
-                                        t0123456789876543210
-                                        arg. SameKind (Apply (MkT1Sym1 t0123456789876543210) arg) (MkT1Sym2 t0123456789876543210 arg) =>
-                                 MkT1Sym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (MkT1Sym1 t0123456789876543210) t0123456789876543210 = MkT1Sym2 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings MkT1Sym0 where
-      suppressUnusedWarnings = snd (((,) MkT1Sym0KindInference) ())
-    data MkT1Sym0 :: forall a0123456789876543210 x0123456789876543210.
-                     (~>) x0123456789876543210 ((~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) ((~>) (Maybe (Maybe a0123456789876543210)) (T x0123456789876543210 a0123456789876543210))))
-      where
-        MkT1Sym0KindInference :: forall t0123456789876543210
-                                        arg. SameKind (Apply MkT1Sym0 arg) (MkT1Sym1 arg) =>
-                                 MkT1Sym0 t0123456789876543210
-    type instance Apply MkT1Sym0 t0123456789876543210 = MkT1Sym1 t0123456789876543210
-    type MkT2Sym1 (t0123456789876543210 :: Maybe x0123456789876543210) =
-        MkT2 t0123456789876543210
-    instance SuppressUnusedWarnings MkT2Sym0 where
-      suppressUnusedWarnings = snd (((,) MkT2Sym0KindInference) ())
-    data MkT2Sym0 :: forall a0123456789876543210 x0123456789876543210.
-                     (~>) (Maybe x0123456789876543210) (T x0123456789876543210 a0123456789876543210)
-      where
-        MkT2Sym0KindInference :: forall t0123456789876543210
-                                        arg. SameKind (Apply MkT2Sym0 arg) (MkT2Sym1 arg) =>
-                                 MkT2Sym0 t0123456789876543210
-    type instance Apply MkT2Sym0 t0123456789876543210 = MkT2 t0123456789876543210
-    type family Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t where
-      Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210
-    type Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
-    data Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym5KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
-    data Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym4KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
-    type family Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 t where
-      Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210
-    type Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
-    type family Fmap_0123456789876543210 (a :: (~>) a b) (a :: T x a) :: T x b where
-      Fmap_0123456789876543210 _f_0123456789876543210 (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) = Apply (Apply (Apply (Apply MkT1Sym0 (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _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 _f_0123456789876543210 (MkT2 a_0123456789876543210) = Apply MkT2Sym0 (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) a_0123456789876543210) a_0123456789876543210)
-    type Fmap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: T x0123456789876543210 a0123456789876543210) =
-        Fmap_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Fmap_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Fmap_0123456789876543210Sym1KindInference) ())
-    data Fmap_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: forall x0123456789876543210.
-                                                                                                                  (~>) (T x0123456789876543210 a0123456789876543210) (T x0123456789876543210 b0123456789876543210)
-      where
-        Fmap_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                            a0123456789876543210
-                                                            arg. SameKind (Apply (Fmap_0123456789876543210Sym1 a0123456789876543210) arg) (Fmap_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                     Fmap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Fmap_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Fmap_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Fmap_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Fmap_0123456789876543210Sym0KindInference) ())
-    data Fmap_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                b0123456789876543210
-                                                x0123456789876543210.
-                                         (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) (T x0123456789876543210 a0123456789876543210) (T x0123456789876543210 b0123456789876543210))
-      where
-        Fmap_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                            arg. SameKind (Apply Fmap_0123456789876543210Sym0 arg) (Fmap_0123456789876543210Sym1 arg) =>
-                                                     Fmap_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Fmap_0123456789876543210Sym0 a0123456789876543210 = Fmap_0123456789876543210Sym1 a0123456789876543210
-    type family Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t where
-      Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210
-    type Lambda_0123456789876543210Sym6 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
-    data Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym5KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
-    data Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym4KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210
-    type family Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t where
-      Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = _z_0123456789876543210
-    type Lambda_0123456789876543210Sym6 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
-    data Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym5KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
-    data Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym4KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210
-    type family Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 t where
-      Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210
-    type Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall _z_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210
-    type family TFHelper_0123456789876543210 (a :: a) (a :: T x b) :: T x a where
-      TFHelper_0123456789876543210 _z_0123456789876543210 (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) = Apply (Apply (Apply (Apply MkT1Sym0 (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210)) (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _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 _z_0123456789876543210 (MkT2 a_0123456789876543210) = Apply MkT2Sym0 (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210)
-    type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: T x0123456789876543210 b0123456789876543210) =
-        TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ())
-    data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
-                                                                                                   x0123456789876543210.
-                                                                                            (~>) (T x0123456789876543210 b0123456789876543210) (T x0123456789876543210 a0123456789876543210)
-      where
-        TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                a0123456789876543210
-                                                                arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                         TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ())
-    data TFHelper_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                    b0123456789876543210
-                                                    x0123456789876543210.
-                                             (~>) a0123456789876543210 ((~>) (T x0123456789876543210 b0123456789876543210) (T x0123456789876543210 a0123456789876543210))
-      where
-        TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) =>
-                                                         TFHelper_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210
-    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 _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t where
-      Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = MemptySym0
-    type Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
-    data Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym5KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
-    data Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym4KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
-    type family Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 t where
-      Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = MemptySym0
-    type Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
-    type family FoldMap_0123456789876543210 (a :: (~>) a m) (a :: T x a) :: m where
-      FoldMap_0123456789876543210 _f_0123456789876543210 (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) = Apply (Apply MappendSym0 (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _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 _f_0123456789876543210 (MkT2 a_0123456789876543210) = Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) a_0123456789876543210) a_0123456789876543210
-    type FoldMap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 m0123456789876543210) (a0123456789876543210 :: T x0123456789876543210 a0123456789876543210) =
-        FoldMap_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (FoldMap_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) FoldMap_0123456789876543210Sym1KindInference) ())
-    data FoldMap_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 m0123456789876543210) :: forall x0123456789876543210.
-                                                                                                                     (~>) (T x0123456789876543210 a0123456789876543210) m0123456789876543210
-      where
-        FoldMap_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (FoldMap_0123456789876543210Sym1 a0123456789876543210) arg) (FoldMap_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        FoldMap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (FoldMap_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = FoldMap_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings FoldMap_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) FoldMap_0123456789876543210Sym0KindInference) ())
-    data FoldMap_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                   m0123456789876543210
-                                                   x0123456789876543210.
-                                            (~>) ((~>) a0123456789876543210 m0123456789876543210) ((~>) (T x0123456789876543210 a0123456789876543210) m0123456789876543210)
-      where
-        FoldMap_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply FoldMap_0123456789876543210Sym0 arg) (FoldMap_0123456789876543210Sym1 arg) =>
-                                                        FoldMap_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply FoldMap_0123456789876543210Sym0 a0123456789876543210 = FoldMap_0123456789876543210Sym1 a0123456789876543210
-    type family Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t t where
-      Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = n2_0123456789876543210
-    type Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym7KindInference) ())
-    data Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym7KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym7 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym6KindInference) ())
-    data Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym6KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym7 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
-    data Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym5KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
-    data Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym4KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
-    type family Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t t where
-      Lambda_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
-    type Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym7KindInference) ())
-    data Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym7KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym7 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym6KindInference) ())
-    data Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym6KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym7 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
-    data Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym5KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
-    data Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym4KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
-    type family Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t t where
-      Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = Apply (Apply (Apply FoldrSym0 _f_0123456789876543210) n2_0123456789876543210) n1_0123456789876543210
-    type Lambda_0123456789876543210Sym10 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym9 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym9KindInference) ())
-    data Lambda_0123456789876543210Sym9 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym9KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              n1_01234567898765432100123456789876543210
-                                                              n2_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym9 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym10 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym9 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym9 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym8 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym8KindInference) ())
-    data Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym8KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              n1_01234567898765432100123456789876543210
-                                                              n2_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym9 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym8 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym9 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym7KindInference) ())
-    data Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym7KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              n1_01234567898765432100123456789876543210
-                                                              n2_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym7 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym8 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym6KindInference) ())
-    data Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym6KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              n1_01234567898765432100123456789876543210
-                                                              n2_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym7 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
-    data Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym5KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              n1_01234567898765432100123456789876543210
-                                                              n2_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
-    data Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym4KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              n1_01234567898765432100123456789876543210
-                                                              n2_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym4 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              n1_01234567898765432100123456789876543210
-                                                              n2_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              n1_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) n1_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
-    type family Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t t where
-      Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = Apply (Apply (Apply FoldrSym0 (Apply (Apply (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) _z_0123456789876543210) n1_0123456789876543210) n2_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210)) n2_0123456789876543210) n1_0123456789876543210
-    type Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym7KindInference) ())
-    data Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym7KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym7 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym6KindInference) ())
-    data Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym6KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym7 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
-    data Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym5KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
-    data Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym4KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
-    type family Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 t t where
-      Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = n2_0123456789876543210
-    type Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 t0123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
-    data Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym4KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym4 t0123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              _z_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
-    type family Foldr_0123456789876543210 (a :: (~>) a ((~>) b b)) (a :: b) (a :: T x a) :: b where
-      Foldr_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) = Apply (Apply (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) (Apply (Apply _f_0123456789876543210 a_0123456789876543210) (Apply (Apply (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) (Apply (Apply (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) _z_0123456789876543210)))
-      Foldr_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 (MkT2 a_0123456789876543210) = Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) _z_0123456789876543210
-    type Foldr_0123456789876543210Sym3 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)) (a0123456789876543210 :: b0123456789876543210) (a0123456789876543210 :: T x0123456789876543210 a0123456789876543210) =
-        Foldr_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foldr_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Foldr_0123456789876543210Sym2KindInference) ())
-    data Foldr_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)) (a0123456789876543210 :: b0123456789876543210) :: forall x0123456789876543210.
-                                                                                                                                                                                              (~>) (T x0123456789876543210 a0123456789876543210) b0123456789876543210
-      where
-        Foldr_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                             a0123456789876543210
-                                                             a0123456789876543210
-                                                             arg. SameKind (Apply (Foldr_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (Foldr_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                      Foldr_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foldr_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = Foldr_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foldr_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Foldr_0123456789876543210Sym1KindInference) ())
-    data Foldr_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)) :: forall x0123456789876543210.
-                                                                                                                                               (~>) b0123456789876543210 ((~>) (T x0123456789876543210 a0123456789876543210) b0123456789876543210)
-      where
-        Foldr_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                             a0123456789876543210
-                                                             arg. SameKind (Apply (Foldr_0123456789876543210Sym1 a0123456789876543210) arg) (Foldr_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                      Foldr_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foldr_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Foldr_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foldr_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Foldr_0123456789876543210Sym0KindInference) ())
-    data Foldr_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                 b0123456789876543210
-                                                 x0123456789876543210.
-                                          (~>) ((~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)) ((~>) b0123456789876543210 ((~>) (T x0123456789876543210 a0123456789876543210) b0123456789876543210))
-      where
-        Foldr_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                             arg. SameKind (Apply Foldr_0123456789876543210Sym0 arg) (Foldr_0123456789876543210Sym1 arg) =>
-                                                      Foldr_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Foldr_0123456789876543210Sym0 a0123456789876543210 = Foldr_0123456789876543210Sym1 a0123456789876543210
-    instance PFoldable (T x) where
-      type FoldMap a a = Apply (Apply FoldMap_0123456789876543210Sym0 a) a
-      type Foldr a a a = Apply (Apply (Apply Foldr_0123456789876543210Sym0 a) a) a
-    type family Traverse_0123456789876543210 (a :: (~>) a (f b)) (a :: T x a) :: f (T x b) where
-      Traverse_0123456789876543210 _f_0123456789876543210 (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) = Apply (Apply (<*>@#@$) (Apply (Apply (<*>@#@$) (Apply (Apply (Apply LiftA2Sym0 MkT1Sym0) (Apply PureSym0 a_0123456789876543210)) (Apply _f_0123456789876543210 a_0123456789876543210))) (Apply (Apply TraverseSym0 _f_0123456789876543210) a_0123456789876543210))) (Apply (Apply TraverseSym0 (Apply TraverseSym0 _f_0123456789876543210)) a_0123456789876543210)
-      Traverse_0123456789876543210 _f_0123456789876543210 (MkT2 a_0123456789876543210) = Apply (Apply FmapSym0 MkT2Sym0) (Apply PureSym0 a_0123456789876543210)
-    type Traverse_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 (f0123456789876543210 b0123456789876543210)) (a0123456789876543210 :: T x0123456789876543210 a0123456789876543210) =
-        Traverse_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Traverse_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Traverse_0123456789876543210Sym1KindInference) ())
-    data Traverse_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 (f0123456789876543210 b0123456789876543210)) :: forall x0123456789876543210.
-                                                                                                                                             (~>) (T x0123456789876543210 a0123456789876543210) (f0123456789876543210 (T x0123456789876543210 b0123456789876543210))
-      where
-        Traverse_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                a0123456789876543210
-                                                                arg. SameKind (Apply (Traverse_0123456789876543210Sym1 a0123456789876543210) arg) (Traverse_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                         Traverse_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Traverse_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Traverse_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Traverse_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Traverse_0123456789876543210Sym0KindInference) ())
-    data Traverse_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                    b0123456789876543210
-                                                    f0123456789876543210
-                                                    x0123456789876543210.
-                                             (~>) ((~>) a0123456789876543210 (f0123456789876543210 b0123456789876543210)) ((~>) (T x0123456789876543210 a0123456789876543210) (f0123456789876543210 (T x0123456789876543210 b0123456789876543210)))
-      where
-        Traverse_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply Traverse_0123456789876543210Sym0 arg) (Traverse_0123456789876543210Sym1 arg) =>
-                                                         Traverse_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Traverse_0123456789876543210Sym0 a0123456789876543210 = Traverse_0123456789876543210Sym1 a0123456789876543210
-    instance PTraversable (T x) where
-      type Traverse a a = Apply (Apply Traverse_0123456789876543210Sym0 a) a
-    type family Case_0123456789876543210 v_0123456789876543210 t where
-    type family Fmap_0123456789876543210 (a :: (~>) a b) (a :: Empty a) :: Empty b where
-      Fmap_0123456789876543210 _ v_0123456789876543210 = Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210
-    type Fmap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: Empty a0123456789876543210) =
-        Fmap_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Fmap_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Fmap_0123456789876543210Sym1KindInference) ())
-    data Fmap_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) (Empty a0123456789876543210) (Empty b0123456789876543210)
-      where
-        Fmap_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                            a0123456789876543210
-                                                            arg. SameKind (Apply (Fmap_0123456789876543210Sym1 a0123456789876543210) arg) (Fmap_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                     Fmap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Fmap_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Fmap_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Fmap_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Fmap_0123456789876543210Sym0KindInference) ())
-    data Fmap_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                b0123456789876543210.
-                                         (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) (Empty a0123456789876543210) (Empty b0123456789876543210))
-      where
-        Fmap_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                            arg. SameKind (Apply Fmap_0123456789876543210Sym0 arg) (Fmap_0123456789876543210Sym1 arg) =>
-                                                     Fmap_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Fmap_0123456789876543210Sym0 a0123456789876543210 = Fmap_0123456789876543210Sym1 a0123456789876543210
-    type family Case_0123456789876543210 v_0123456789876543210 t where
-    type family TFHelper_0123456789876543210 (a :: a) (a :: Empty b) :: Empty a where
-      TFHelper_0123456789876543210 _ v_0123456789876543210 = Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210
-    type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: Empty b0123456789876543210) =
-        TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ())
-    data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                                            (~>) (Empty b0123456789876543210) (Empty a0123456789876543210)
-      where
-        TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                a0123456789876543210
-                                                                arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                         TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ())
-    data TFHelper_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                    b0123456789876543210.
-                                             (~>) a0123456789876543210 ((~>) (Empty b0123456789876543210) (Empty a0123456789876543210))
-      where
-        TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) =>
-                                                         TFHelper_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210
-    instance PFunctor Empty where
-      type Fmap a a = Apply (Apply Fmap_0123456789876543210Sym0 a) a
-      type (<$) a a = Apply (Apply TFHelper_0123456789876543210Sym0 a) a
-    type family FoldMap_0123456789876543210 (a :: (~>) a m) (a :: Empty a) :: m where
-      FoldMap_0123456789876543210 _ _ = MemptySym0
-    type FoldMap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 m0123456789876543210) (a0123456789876543210 :: Empty a0123456789876543210) =
-        FoldMap_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (FoldMap_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) FoldMap_0123456789876543210Sym1KindInference) ())
-    data FoldMap_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 m0123456789876543210) :: (~>) (Empty a0123456789876543210) m0123456789876543210
-      where
-        FoldMap_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (FoldMap_0123456789876543210Sym1 a0123456789876543210) arg) (FoldMap_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        FoldMap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (FoldMap_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = FoldMap_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings FoldMap_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) FoldMap_0123456789876543210Sym0KindInference) ())
-    data FoldMap_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                   m0123456789876543210.
-                                            (~>) ((~>) a0123456789876543210 m0123456789876543210) ((~>) (Empty a0123456789876543210) m0123456789876543210)
-      where
-        FoldMap_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply FoldMap_0123456789876543210Sym0 arg) (FoldMap_0123456789876543210Sym1 arg) =>
-                                                        FoldMap_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply FoldMap_0123456789876543210Sym0 a0123456789876543210 = FoldMap_0123456789876543210Sym1 a0123456789876543210
-    instance PFoldable Empty where
-      type FoldMap a a = Apply (Apply FoldMap_0123456789876543210Sym0 a) a
-    type family Case_0123456789876543210 v_0123456789876543210 t where
-    type family Traverse_0123456789876543210 (a :: (~>) a (f b)) (a :: Empty a) :: f (Empty b) where
-      Traverse_0123456789876543210 _ v_0123456789876543210 = Apply PureSym0 (Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210)
-    type Traverse_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 (f0123456789876543210 b0123456789876543210)) (a0123456789876543210 :: Empty a0123456789876543210) =
-        Traverse_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Traverse_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Traverse_0123456789876543210Sym1KindInference) ())
-    data Traverse_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 (f0123456789876543210 b0123456789876543210)) :: (~>) (Empty a0123456789876543210) (f0123456789876543210 (Empty b0123456789876543210))
-      where
-        Traverse_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                a0123456789876543210
-                                                                arg. SameKind (Apply (Traverse_0123456789876543210Sym1 a0123456789876543210) arg) (Traverse_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                         Traverse_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Traverse_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Traverse_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Traverse_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Traverse_0123456789876543210Sym0KindInference) ())
-    data Traverse_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                    b0123456789876543210
-                                                    f0123456789876543210.
-                                             (~>) ((~>) a0123456789876543210 (f0123456789876543210 b0123456789876543210)) ((~>) (Empty a0123456789876543210) (f0123456789876543210 (Empty b0123456789876543210)))
-      where
-        Traverse_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply Traverse_0123456789876543210Sym0 arg) (Traverse_0123456789876543210Sym1 arg) =>
-                                                         Traverse_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Traverse_0123456789876543210Sym0 a0123456789876543210 = Traverse_0123456789876543210Sym1 a0123456789876543210
-    instance PTraversable Empty where
-      type Traverse a a = Apply (Apply Traverse_0123456789876543210Sym0 a) a
-    data instance Sing :: T x a -> Type
-      where
-        SMkT1 :: forall x
-                        a
-                        (n :: x)
-                        (n :: a)
-                        (n :: Maybe a)
-                        (n :: Maybe (Maybe a)).
-                 (Sing (n :: x))
-                 -> (Sing (n :: a))
-                    -> (Sing (n :: Maybe a))
-                       -> (Sing (n :: Maybe (Maybe a))) -> Sing (MkT1 n n n n)
-        SMkT2 :: forall x (n :: Maybe x).
-                 (Sing (n :: Maybe x)) -> Sing (MkT2 n)
-    type ST = (Sing :: T x a -> Type)
-    instance (SingKind x, SingKind a) => SingKind (T x a) where
-      type Demote (T x a) = T (Demote x) (Demote a)
-      fromSing (SMkT1 b b b b)
-        = (((MkT1 (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)
-      fromSing (SMkT2 b) = MkT2 (fromSing b)
-      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) }
-      toSing (MkT2 (b :: Demote (Maybe x)))
-        = case toSing b :: SomeSing (Maybe x) of {
-            SomeSing c -> SomeSing (SMkT2 c) }
-    data instance Sing :: Empty a -> Type
-    type SEmpty = (Sing :: Empty a -> Type)
-    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)
-    instance SFunctor (T x) where
-      sFmap ::
-        forall (a :: Type) (b :: Type) (t1 :: (~>) a b) (t2 :: T x a).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (FmapSym0 :: TyFun ((~>) a b) ((~>) (T x a) (T x b))
-                                              -> Type) t1) t2)
-      (%<$) ::
-        forall (a :: Type) (b :: Type) (t1 :: a) (t2 :: T x b).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply ((<$@#@$) :: TyFun a ((~>) (T x b) (T x a))
-                                              -> Type) t1) t2)
-      sFmap
-        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
-        (SMkT1 (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing
-                     ((applySing ((singFun4 @MkT1Sym0) SMkT1))
-                        ((applySing
-                            ((singFun1
-                                @(Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210))
-                               (\ sN_0123456789876543210
-                                  -> case sN_0123456789876543210 of {
-                                       (_ :: Sing n_0123456789876543210)
-                                         -> sN_0123456789876543210 })))
-                           sA_0123456789876543210)))
-                    ((applySing _sf_0123456789876543210) sA_0123456789876543210)))
-                ((applySing
-                    ((applySing ((singFun2 @FmapSym0) sFmap)) _sf_0123456789876543210))
-                   sA_0123456789876543210)))
-            ((applySing
-                ((applySing ((singFun2 @FmapSym0) sFmap))
-                   ((applySing ((singFun2 @FmapSym0) sFmap))
-                      _sf_0123456789876543210)))
-               sA_0123456789876543210)
-      sFmap
-        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
-        (SMkT2 (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        = (applySing ((singFun1 @MkT2Sym0) SMkT2))
-            ((applySing
-                ((singFun1
-                    @(Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) a_0123456789876543210))
-                   (\ sN_0123456789876543210
-                      -> case sN_0123456789876543210 of {
-                           (_ :: Sing n_0123456789876543210) -> sN_0123456789876543210 })))
-               sA_0123456789876543210)
-      (%<$)
-        (_sz_0123456789876543210 :: Sing _z_0123456789876543210)
-        (SMkT1 (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing
-                     ((applySing ((singFun4 @MkT1Sym0) SMkT1))
-                        ((applySing
-                            ((singFun1
-                                @(Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210))
-                               (\ sN_0123456789876543210
-                                  -> case sN_0123456789876543210 of {
-                                       (_ :: Sing n_0123456789876543210)
-                                         -> sN_0123456789876543210 })))
-                           sA_0123456789876543210)))
-                    ((applySing
-                        ((singFun1
-                            @(Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210))
-                           (\ sN_0123456789876543210
-                              -> case sN_0123456789876543210 of {
-                                   (_ :: Sing n_0123456789876543210) -> _sz_0123456789876543210 })))
-                       sA_0123456789876543210)))
-                ((applySing
-                    ((applySing ((singFun2 @(<$@#@$)) (%<$))) _sz_0123456789876543210))
-                   sA_0123456789876543210)))
-            ((applySing
-                ((applySing ((singFun2 @FmapSym0) sFmap))
-                   ((applySing ((singFun2 @(<$@#@$)) (%<$)))
-                      _sz_0123456789876543210)))
-               sA_0123456789876543210)
-      (%<$)
-        (_sz_0123456789876543210 :: Sing _z_0123456789876543210)
-        (SMkT2 (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        = (applySing ((singFun1 @MkT2Sym0) SMkT2))
-            ((applySing
-                ((singFun1
-                    @(Apply (Apply Lambda_0123456789876543210Sym0 _z_0123456789876543210) a_0123456789876543210))
-                   (\ sN_0123456789876543210
-                      -> case sN_0123456789876543210 of {
-                           (_ :: Sing n_0123456789876543210) -> sN_0123456789876543210 })))
-               sA_0123456789876543210)
-    instance SFoldable (T x) where
-      sFoldMap ::
-        forall (m :: Type) (a :: Type) (t1 :: (~>) a m) (t2 :: T x a).
-        SMonoid m =>
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (FoldMapSym0 :: TyFun ((~>) a m) ((~>) (T x a) m)
-                                                 -> Type) t1) t2)
-      sFoldr ::
-        forall (a :: Type)
-               (b :: Type)
-               (t1 :: (~>) a ((~>) b b))
-               (t2 :: b)
-               (t3 :: T x a).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (FoldrSym0 :: TyFun ((~>) a ((~>) b b)) ((~>) b ((~>) (T x a) b))
-                                                         -> Type) t1) t2) t3)
-      sFoldMap
-        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
-        (SMkT1 (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        = (applySing
-             ((applySing ((singFun2 @MappendSym0) sMappend))
-                ((applySing
-                    ((singFun1
-                        @(Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210))
-                       (\ sN_0123456789876543210
-                          -> case sN_0123456789876543210 of {
-                               (_ :: Sing n_0123456789876543210) -> sMempty })))
-                   sA_0123456789876543210)))
-            ((applySing
-                ((applySing ((singFun2 @MappendSym0) sMappend))
-                   ((applySing _sf_0123456789876543210) sA_0123456789876543210)))
-               ((applySing
-                   ((applySing ((singFun2 @MappendSym0) sMappend))
-                      ((applySing
-                          ((applySing ((singFun2 @FoldMapSym0) sFoldMap))
-                             _sf_0123456789876543210))
-                         sA_0123456789876543210)))
-                  ((applySing
-                      ((applySing ((singFun2 @FoldMapSym0) sFoldMap))
-                         ((applySing ((singFun2 @FoldMapSym0) sFoldMap))
-                            _sf_0123456789876543210)))
-                     sA_0123456789876543210)))
-      sFoldMap
-        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
-        (SMkT2 (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        = (applySing
-             ((singFun1
-                 @(Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) a_0123456789876543210))
-                (\ sN_0123456789876543210
-                   -> case sN_0123456789876543210 of {
-                        (_ :: Sing n_0123456789876543210) -> sMempty })))
-            sA_0123456789876543210
-      sFoldr
-        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
-        (_sz_0123456789876543210 :: Sing _z_0123456789876543210)
-        (SMkT1 (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((singFun2
-                     @(Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _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 })))
-                sA_0123456789876543210))
-            ((applySing
-                ((applySing _sf_0123456789876543210) sA_0123456789876543210))
-               ((applySing
-                   ((applySing
-                       ((singFun2
-                           @(Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _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 })))
-                      sA_0123456789876543210))
-                  ((applySing
-                      ((applySing
-                          ((singFun2
-                              @(Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _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
-                                                        @(Apply (Apply (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) _z_0123456789876543210) n1_0123456789876543210) n2_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 })))
-                         sA_0123456789876543210))
-                     _sz_0123456789876543210)))
-      sFoldr
-        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
-        (_sz_0123456789876543210 :: Sing _z_0123456789876543210)
-        (SMkT2 (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((singFun2
-                     @(Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) _z_0123456789876543210) a_0123456789876543210))
-                    (\ sN1_0123456789876543210 sN2_0123456789876543210
-                       -> case ((,) sN1_0123456789876543210) sN2_0123456789876543210 of {
-                            (,) (_ :: Sing n1_0123456789876543210)
-                                (_ :: Sing n2_0123456789876543210)
-                              -> sN2_0123456789876543210 })))
-                sA_0123456789876543210))
-            _sz_0123456789876543210
-    instance STraversable (T x) where
-      sTraverse ::
-        forall (f :: Type -> Type)
-               (a :: Type)
-               (b :: Type)
-               (t1 :: (~>) a (f b))
-               (t2 :: T x a).
-        SApplicative f =>
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (TraverseSym0 :: TyFun ((~>) a (f b)) ((~>) (T x a) (f (T x b)))
-                                                  -> Type) t1) t2)
-      sTraverse
-        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
-        (SMkT1 (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210)
-               (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        = (applySing
-             ((applySing ((singFun2 @(<*>@#@$)) (%<*>)))
-                ((applySing
-                    ((applySing ((singFun2 @(<*>@#@$)) (%<*>)))
-                       ((applySing
-                           ((applySing
-                               ((applySing ((singFun3 @LiftA2Sym0) sLiftA2))
-                                  ((singFun4 @MkT1Sym0) SMkT1)))
-                              ((applySing ((singFun1 @PureSym0) sPure)) sA_0123456789876543210)))
-                          ((applySing _sf_0123456789876543210) sA_0123456789876543210))))
-                   ((applySing
-                       ((applySing ((singFun2 @TraverseSym0) sTraverse))
-                          _sf_0123456789876543210))
-                      sA_0123456789876543210))))
-            ((applySing
-                ((applySing ((singFun2 @TraverseSym0) sTraverse))
-                   ((applySing ((singFun2 @TraverseSym0) sTraverse))
-                      _sf_0123456789876543210)))
-               sA_0123456789876543210)
-      sTraverse
-        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
-        (SMkT2 (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        = (applySing
-             ((applySing ((singFun2 @FmapSym0) sFmap))
-                ((singFun1 @MkT2Sym0) SMkT2)))
-            ((applySing ((singFun1 @PureSym0) sPure)) sA_0123456789876543210)
-    instance SFunctor Empty where
-      sFmap ::
-        forall (a :: Type) (b :: Type) (t1 :: (~>) a b) (t2 :: Empty a).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (FmapSym0 :: TyFun ((~>) a b) ((~>) (Empty a) (Empty b))
-                                              -> Type) t1) t2)
-      (%<$) ::
-        forall (a :: Type) (b :: Type) (t1 :: a) (t2 :: Empty b).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply ((<$@#@$) :: TyFun a ((~>) (Empty b) (Empty a))
-                                              -> Type) t1) t2)
-      sFmap _ (sV_0123456789876543210 :: Sing v_0123456789876543210)
-        = (case sV_0123456789876543210 of) ::
-            Sing (Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210)
-      (%<$) _ (sV_0123456789876543210 :: Sing v_0123456789876543210)
-        = (case sV_0123456789876543210 of) ::
-            Sing (Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210)
-    instance SFoldable Empty where
-      sFoldMap ::
-        forall (m :: Type) (a :: Type) (t1 :: (~>) a m) (t2 :: Empty a).
-        SMonoid m =>
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (FoldMapSym0 :: TyFun ((~>) a m) ((~>) (Empty a) m)
-                                                 -> Type) t1) t2)
-      sFoldMap _ _ = sMempty
-    instance STraversable Empty where
-      sTraverse ::
-        forall (f :: Type -> Type)
-               (a :: Type)
-               (b :: Type)
-               (t1 :: (~>) a (f b))
-               (t2 :: Empty a).
-        SApplicative f =>
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (TraverseSym0 :: TyFun ((~>) a (f b)) ((~>) (Empty a) (f (Empty b)))
-                                                  -> Type) t1) t2)
-      sTraverse _ (sV_0123456789876543210 :: Sing v_0123456789876543210)
-        = (applySing ((singFun1 @PureSym0) sPure))
-            ((case sV_0123456789876543210 of) ::
-               Sing (Case_0123456789876543210 v_0123456789876543210 v_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
-    instance SingI (MkT1Sym0 :: (~>) x ((~>) a ((~>) (Maybe a) ((~>) (Maybe (Maybe a)) (T x a))))) where
-      sing = (singFun4 @MkT1Sym0) SMkT1
-    instance SingI (TyCon4 MkT1 :: (~>) x ((~>) a ((~>) (Maybe a) ((~>) (Maybe (Maybe a)) (T x a))))) where
-      sing = (singFun4 @(TyCon4 MkT1)) SMkT1
-    instance SingI d =>
-             SingI (MkT1Sym1 (d :: x) :: (~>) a ((~>) (Maybe a) ((~>) (Maybe (Maybe a)) (T x a)))) where
-      sing = (singFun3 @(MkT1Sym1 (d :: x))) (SMkT1 (sing @d))
-    instance SingI d =>
-             SingI (TyCon3 (MkT1 (d :: x)) :: (~>) a ((~>) (Maybe a) ((~>) (Maybe (Maybe a)) (T x a)))) where
-      sing = (singFun3 @(TyCon3 (MkT1 (d :: x)))) (SMkT1 (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (MkT1Sym2 (d :: x) (d :: a) :: (~>) (Maybe a) ((~>) (Maybe (Maybe a)) (T x a))) where
-      sing
-        = (singFun2 @(MkT1Sym2 (d :: x) (d :: a)))
-            ((SMkT1 (sing @d)) (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (TyCon2 (MkT1 (d :: x) (d :: a)) :: (~>) (Maybe a) ((~>) (Maybe (Maybe a)) (T x a))) where
-      sing
-        = (singFun2 @(TyCon2 (MkT1 (d :: x) (d :: a))))
-            ((SMkT1 (sing @d)) (sing @d))
-    instance (SingI d, SingI d, SingI d) =>
-             SingI (MkT1Sym3 (d :: x) (d :: a) (d :: Maybe a) :: (~>) (Maybe (Maybe a)) (T x a)) where
-      sing
-        = (singFun1 @(MkT1Sym3 (d :: x) (d :: a) (d :: Maybe a)))
-            (((SMkT1 (sing @d)) (sing @d)) (sing @d))
-    instance (SingI d, SingI d, SingI d) =>
-             SingI (TyCon1 (MkT1 (d :: x) (d :: a) (d :: Maybe a)) :: (~>) (Maybe (Maybe a)) (T x a)) where
-      sing
-        = (singFun1 @(TyCon1 (MkT1 (d :: x) (d :: a) (d :: Maybe a))))
-            (((SMkT1 (sing @d)) (sing @d)) (sing @d))
-    instance SingI n => SingI (MkT2 (n :: Maybe x)) where
-      sing = SMkT2 sing
-    instance SingI (MkT2Sym0 :: (~>) (Maybe x) (T x a)) where
-      sing = (singFun1 @MkT2Sym0) SMkT2
-    instance SingI (TyCon1 MkT2 :: (~>) (Maybe x) (T x a)) where
-      sing = (singFun1 @(TyCon1 MkT2)) SMkT2
diff --git a/tests/compile-and-dump/Singletons/FunctorLikeDeriving.ghc88.template b/tests/compile-and-dump/Singletons/FunctorLikeDeriving.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/FunctorLikeDeriving.ghc88.template
@@ -0,0 +1,1632 @@
+Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| data T x a
+            = MkT1 x a (Maybe a) (Maybe (Maybe a)) | MkT2 (Maybe x)
+            deriving (Functor, Foldable, Traversable)
+          data Empty (a :: Type) deriving (Functor, Foldable, Traversable) |]
+  ======>
+    data T x a
+      = MkT1 x a (Maybe a) (Maybe (Maybe a)) | MkT2 (Maybe x)
+      deriving (Functor, Foldable, Traversable)
+    data Empty (a :: Type) deriving (Functor, Foldable, Traversable)
+    type MkT1Sym4 (t0123456789876543210 :: x0123456789876543210) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: Maybe a0123456789876543210) (t0123456789876543210 :: Maybe (Maybe a0123456789876543210)) =
+        MkT1 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (MkT1Sym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MkT1Sym3KindInference) ())
+    data MkT1Sym3 (t0123456789876543210 :: x0123456789876543210) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: Maybe a0123456789876543210) :: (~>) (Maybe (Maybe a0123456789876543210)) (T x0123456789876543210 a0123456789876543210)
+      where
+        MkT1Sym3KindInference :: forall t0123456789876543210
+                                        t0123456789876543210
+                                        t0123456789876543210
+                                        t0123456789876543210
+                                        arg. SameKind (Apply (MkT1Sym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (MkT1Sym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
+                                 MkT1Sym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (MkT1Sym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = MkT1 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (MkT1Sym2 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MkT1Sym2KindInference) ())
+    data MkT1Sym2 (t0123456789876543210 :: x0123456789876543210) (t0123456789876543210 :: a0123456789876543210) :: (~>) (Maybe a0123456789876543210) ((~>) (Maybe (Maybe a0123456789876543210)) (T x0123456789876543210 a0123456789876543210))
+      where
+        MkT1Sym2KindInference :: forall t0123456789876543210
+                                        t0123456789876543210
+                                        t0123456789876543210
+                                        arg. SameKind (Apply (MkT1Sym2 t0123456789876543210 t0123456789876543210) arg) (MkT1Sym3 t0123456789876543210 t0123456789876543210 arg) =>
+                                 MkT1Sym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (MkT1Sym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = MkT1Sym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (MkT1Sym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MkT1Sym1KindInference) ())
+    data MkT1Sym1 (t0123456789876543210 :: x0123456789876543210) :: forall a0123456789876543210.
+                                                                    (~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) ((~>) (Maybe (Maybe a0123456789876543210)) (T x0123456789876543210 a0123456789876543210)))
+      where
+        MkT1Sym1KindInference :: forall t0123456789876543210
+                                        t0123456789876543210
+                                        arg. SameKind (Apply (MkT1Sym1 t0123456789876543210) arg) (MkT1Sym2 t0123456789876543210 arg) =>
+                                 MkT1Sym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (MkT1Sym1 t0123456789876543210) t0123456789876543210 = MkT1Sym2 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings MkT1Sym0 where
+      suppressUnusedWarnings = snd (((,) MkT1Sym0KindInference) ())
+    data MkT1Sym0 :: forall x0123456789876543210 a0123456789876543210.
+                     (~>) x0123456789876543210 ((~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) ((~>) (Maybe (Maybe a0123456789876543210)) (T x0123456789876543210 a0123456789876543210))))
+      where
+        MkT1Sym0KindInference :: forall t0123456789876543210
+                                        arg. SameKind (Apply MkT1Sym0 arg) (MkT1Sym1 arg) =>
+                                 MkT1Sym0 t0123456789876543210
+    type instance Apply MkT1Sym0 t0123456789876543210 = MkT1Sym1 t0123456789876543210
+    type MkT2Sym1 (t0123456789876543210 :: Maybe x0123456789876543210) =
+        MkT2 t0123456789876543210
+    instance SuppressUnusedWarnings MkT2Sym0 where
+      suppressUnusedWarnings = snd (((,) MkT2Sym0KindInference) ())
+    data MkT2Sym0 :: forall x0123456789876543210 a0123456789876543210.
+                     (~>) (Maybe x0123456789876543210) (T x0123456789876543210 a0123456789876543210)
+      where
+        MkT2Sym0KindInference :: forall t0123456789876543210
+                                        arg. SameKind (Apply MkT2Sym0 arg) (MkT2Sym1 arg) =>
+                                 MkT2Sym0 t0123456789876543210
+    type instance Apply MkT2Sym0 t0123456789876543210 = MkT2 t0123456789876543210
+    type family Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t where
+      Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210
+    type Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
+    data Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym5KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
+    data Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym4KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
+    type family Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 t where
+      Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210
+    type Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
+    type family Fmap_0123456789876543210 (a :: (~>) a0 b0) (a :: T x a0) :: T x b0 where
+      Fmap_0123456789876543210 _f_0123456789876543210 (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) = Apply (Apply (Apply (Apply MkT1Sym0 (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _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 _f_0123456789876543210 (MkT2 a_0123456789876543210) = Apply MkT2Sym0 (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) a_0123456789876543210) a_0123456789876543210)
+    type Fmap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a01234567898765432100 b01234567898765432100) (a0123456789876543210 :: T x0123456789876543210 a01234567898765432100) =
+        Fmap_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Fmap_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Fmap_0123456789876543210Sym1KindInference) ())
+    data Fmap_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a01234567898765432100 b01234567898765432100) :: forall x0123456789876543210.
+                                                                                                                    (~>) (T x0123456789876543210 a01234567898765432100) (T x0123456789876543210 b01234567898765432100)
+      where
+        Fmap_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                            a0123456789876543210
+                                                            arg. SameKind (Apply (Fmap_0123456789876543210Sym1 a0123456789876543210) arg) (Fmap_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                     Fmap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Fmap_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Fmap_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Fmap_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Fmap_0123456789876543210Sym0KindInference) ())
+    data Fmap_0123456789876543210Sym0 :: forall a01234567898765432100
+                                                b01234567898765432100
+                                                x0123456789876543210.
+                                         (~>) ((~>) a01234567898765432100 b01234567898765432100) ((~>) (T x0123456789876543210 a01234567898765432100) (T x0123456789876543210 b01234567898765432100))
+      where
+        Fmap_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                            arg. SameKind (Apply Fmap_0123456789876543210Sym0 arg) (Fmap_0123456789876543210Sym1 arg) =>
+                                                     Fmap_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Fmap_0123456789876543210Sym0 a0123456789876543210 = Fmap_0123456789876543210Sym1 a0123456789876543210
+    type family Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t where
+      Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210
+    type Lambda_0123456789876543210Sym6 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
+    data Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym5KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
+    data Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym4KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210
+    type family Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t where
+      Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = _z_0123456789876543210
+    type Lambda_0123456789876543210Sym6 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
+    data Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym5KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
+    data Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym4KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210
+    type family Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 t where
+      Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210
+    type Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall _z_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210
+    type family TFHelper_0123456789876543210 (a :: a0) (a :: T x b0) :: T x a0 where
+      TFHelper_0123456789876543210 _z_0123456789876543210 (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) = Apply (Apply (Apply (Apply MkT1Sym0 (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210)) (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _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 _z_0123456789876543210 (MkT2 a_0123456789876543210) = Apply MkT2Sym0 (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210)
+    type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: a01234567898765432100) (a0123456789876543210 :: T x0123456789876543210 b01234567898765432100) =
+        TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ())
+    data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: a01234567898765432100) :: forall x0123456789876543210
+                                                                                                    b01234567898765432100.
+                                                                                             (~>) (T x0123456789876543210 b01234567898765432100) (T x0123456789876543210 a01234567898765432100)
+      where
+        TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                a0123456789876543210
+                                                                arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                         TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ())
+    data TFHelper_0123456789876543210Sym0 :: forall a01234567898765432100
+                                                    x0123456789876543210
+                                                    b01234567898765432100.
+                                             (~>) a01234567898765432100 ((~>) (T x0123456789876543210 b01234567898765432100) (T x0123456789876543210 a01234567898765432100))
+      where
+        TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) =>
+                                                         TFHelper_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210
+    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 _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t where
+      Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = MemptySym0
+    type Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
+    data Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym5KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
+    data Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym4KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
+    type family Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 t where
+      Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = MemptySym0
+    type Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
+    type family FoldMap_0123456789876543210 (a :: (~>) a0 m0) (a :: T x a0) :: m0 where
+      FoldMap_0123456789876543210 _f_0123456789876543210 (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) = Apply (Apply MappendSym0 (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _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 _f_0123456789876543210 (MkT2 a_0123456789876543210) = Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) a_0123456789876543210) a_0123456789876543210
+    type FoldMap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a01234567898765432100 m01234567898765432100) (a0123456789876543210 :: T x0123456789876543210 a01234567898765432100) =
+        FoldMap_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (FoldMap_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) FoldMap_0123456789876543210Sym1KindInference) ())
+    data FoldMap_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a01234567898765432100 m01234567898765432100) :: forall x0123456789876543210.
+                                                                                                                       (~>) (T x0123456789876543210 a01234567898765432100) m01234567898765432100
+      where
+        FoldMap_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (FoldMap_0123456789876543210Sym1 a0123456789876543210) arg) (FoldMap_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        FoldMap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (FoldMap_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = FoldMap_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings FoldMap_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) FoldMap_0123456789876543210Sym0KindInference) ())
+    data FoldMap_0123456789876543210Sym0 :: forall a01234567898765432100
+                                                   m01234567898765432100
+                                                   x0123456789876543210.
+                                            (~>) ((~>) a01234567898765432100 m01234567898765432100) ((~>) (T x0123456789876543210 a01234567898765432100) m01234567898765432100)
+      where
+        FoldMap_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply FoldMap_0123456789876543210Sym0 arg) (FoldMap_0123456789876543210Sym1 arg) =>
+                                                        FoldMap_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply FoldMap_0123456789876543210Sym0 a0123456789876543210 = FoldMap_0123456789876543210Sym1 a0123456789876543210
+    type family Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t t where
+      Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = n2_0123456789876543210
+    type Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym7KindInference) ())
+    data Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym7KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym7 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym6KindInference) ())
+    data Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym6KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym7 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
+    data Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym5KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
+    data Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym4KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
+    type family Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t t where
+      Lambda_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
+    type Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym7KindInference) ())
+    data Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym7KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym7 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym6KindInference) ())
+    data Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym6KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym7 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
+    data Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym5KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
+    data Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym4KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
+    type family Lambda_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t t where
+      Lambda_0123456789876543210 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
+    type Lambda_0123456789876543210Sym10 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym9 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym9KindInference) ())
+    data Lambda_0123456789876543210Sym9 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym9KindInference :: forall n1_01234567898765432100123456789876543210
+                                                              n2_01234567898765432100123456789876543210
+                                                              _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym9 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym10 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym9 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym9 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym8 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym8KindInference) ())
+    data Lambda_0123456789876543210Sym8 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym8KindInference :: forall n1_01234567898765432100123456789876543210
+                                                              n2_01234567898765432100123456789876543210
+                                                              _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym8 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym9 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym8 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym8 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym9 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym7KindInference) ())
+    data Lambda_0123456789876543210Sym7 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym7KindInference :: forall n1_01234567898765432100123456789876543210
+                                                              n2_01234567898765432100123456789876543210
+                                                              _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym7 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym8 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym7 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym7 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym8 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym6KindInference) ())
+    data Lambda_0123456789876543210Sym6 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym6KindInference :: forall n1_01234567898765432100123456789876543210
+                                                              n2_01234567898765432100123456789876543210
+                                                              _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym6 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym7 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym6 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym7 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
+    data Lambda_0123456789876543210Sym5 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym5KindInference :: forall n1_01234567898765432100123456789876543210
+                                                              n2_01234567898765432100123456789876543210
+                                                              _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym5 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
+    data Lambda_0123456789876543210Sym4 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym4KindInference :: forall n1_01234567898765432100123456789876543210
+                                                              n2_01234567898765432100123456789876543210
+                                                              _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym4 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall n1_01234567898765432100123456789876543210
+                                                              n2_01234567898765432100123456789876543210
+                                                              _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall n1_01234567898765432100123456789876543210
+                                                              n2_01234567898765432100123456789876543210
+                                                              _f_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 n2_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 n1_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall n1_01234567898765432100123456789876543210
+                                                              n2_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 n1_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 n1_01234567898765432100123456789876543210) n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 n1_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall n1_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 n1_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 n1_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 n1_01234567898765432100123456789876543210
+    type family Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t t where
+      Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = Apply (Apply (Apply FoldrSym0 (Apply (Apply (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 n1_0123456789876543210) n2_0123456789876543210) _f_0123456789876543210) _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210)) n2_0123456789876543210) n1_0123456789876543210
+    type Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym7KindInference) ())
+    data Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym7KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym7 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym6KindInference) ())
+    data Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym6KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym7 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym5KindInference) ())
+    data Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym5KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
+    data Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym4KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
+    type family Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 t t where
+      Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = n2_0123456789876543210
+    type Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 t0123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
+    data Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym4KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym4 t0123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              _z_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall _f_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210
+    type family Foldr_0123456789876543210 (a :: (~>) a0 ((~>) b0 b0)) (a :: b0) (a :: T x a0) :: b0 where
+      Foldr_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) = Apply (Apply (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) (Apply (Apply _f_0123456789876543210 a_0123456789876543210) (Apply (Apply (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) (Apply (Apply (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) _z_0123456789876543210)))
+      Foldr_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 (MkT2 a_0123456789876543210) = Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) _z_0123456789876543210
+    type Foldr_0123456789876543210Sym3 (a0123456789876543210 :: (~>) a01234567898765432100 ((~>) b01234567898765432100 b01234567898765432100)) (a0123456789876543210 :: b01234567898765432100) (a0123456789876543210 :: T x0123456789876543210 a01234567898765432100) =
+        Foldr_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foldr_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Foldr_0123456789876543210Sym2KindInference) ())
+    data Foldr_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a01234567898765432100 ((~>) b01234567898765432100 b01234567898765432100)) (a0123456789876543210 :: b01234567898765432100) :: forall x0123456789876543210.
+                                                                                                                                                                                                  (~>) (T x0123456789876543210 a01234567898765432100) b01234567898765432100
+      where
+        Foldr_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                             a0123456789876543210
+                                                             a0123456789876543210
+                                                             arg. SameKind (Apply (Foldr_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (Foldr_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                      Foldr_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foldr_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = Foldr_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foldr_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Foldr_0123456789876543210Sym1KindInference) ())
+    data Foldr_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a01234567898765432100 ((~>) b01234567898765432100 b01234567898765432100)) :: forall x0123456789876543210.
+                                                                                                                                                  (~>) b01234567898765432100 ((~>) (T x0123456789876543210 a01234567898765432100) b01234567898765432100)
+      where
+        Foldr_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                             a0123456789876543210
+                                                             arg. SameKind (Apply (Foldr_0123456789876543210Sym1 a0123456789876543210) arg) (Foldr_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                      Foldr_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foldr_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Foldr_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foldr_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Foldr_0123456789876543210Sym0KindInference) ())
+    data Foldr_0123456789876543210Sym0 :: forall a01234567898765432100
+                                                 b01234567898765432100
+                                                 x0123456789876543210.
+                                          (~>) ((~>) a01234567898765432100 ((~>) b01234567898765432100 b01234567898765432100)) ((~>) b01234567898765432100 ((~>) (T x0123456789876543210 a01234567898765432100) b01234567898765432100))
+      where
+        Foldr_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                             arg. SameKind (Apply Foldr_0123456789876543210Sym0 arg) (Foldr_0123456789876543210Sym1 arg) =>
+                                                      Foldr_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Foldr_0123456789876543210Sym0 a0123456789876543210 = Foldr_0123456789876543210Sym1 a0123456789876543210
+    instance PFoldable (T x) where
+      type FoldMap a a = Apply (Apply FoldMap_0123456789876543210Sym0 a) a
+      type Foldr a a a = Apply (Apply (Apply Foldr_0123456789876543210Sym0 a) a) a
+    type family Traverse_0123456789876543210 (a :: (~>) a0 (f0 b0)) (a :: T x a0) :: f0 (T x b0) where
+      Traverse_0123456789876543210 _f_0123456789876543210 (MkT1 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) = Apply (Apply (<*>@#@$) (Apply (Apply (<*>@#@$) (Apply (Apply (Apply LiftA2Sym0 MkT1Sym0) (Apply PureSym0 a_0123456789876543210)) (Apply _f_0123456789876543210 a_0123456789876543210))) (Apply (Apply TraverseSym0 _f_0123456789876543210) a_0123456789876543210))) (Apply (Apply TraverseSym0 (Apply TraverseSym0 _f_0123456789876543210)) a_0123456789876543210)
+      Traverse_0123456789876543210 _f_0123456789876543210 (MkT2 a_0123456789876543210) = Apply (Apply FmapSym0 MkT2Sym0) (Apply PureSym0 a_0123456789876543210)
+    type Traverse_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a01234567898765432100 (f01234567898765432100 b01234567898765432100)) (a0123456789876543210 :: T x0123456789876543210 a01234567898765432100) =
+        Traverse_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Traverse_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Traverse_0123456789876543210Sym1KindInference) ())
+    data Traverse_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a01234567898765432100 (f01234567898765432100 b01234567898765432100)) :: forall x0123456789876543210.
+                                                                                                                                                (~>) (T x0123456789876543210 a01234567898765432100) (f01234567898765432100 (T x0123456789876543210 b01234567898765432100))
+      where
+        Traverse_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                a0123456789876543210
+                                                                arg. SameKind (Apply (Traverse_0123456789876543210Sym1 a0123456789876543210) arg) (Traverse_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                         Traverse_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Traverse_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Traverse_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Traverse_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Traverse_0123456789876543210Sym0KindInference) ())
+    data Traverse_0123456789876543210Sym0 :: forall a01234567898765432100
+                                                    f01234567898765432100
+                                                    b01234567898765432100
+                                                    x0123456789876543210.
+                                             (~>) ((~>) a01234567898765432100 (f01234567898765432100 b01234567898765432100)) ((~>) (T x0123456789876543210 a01234567898765432100) (f01234567898765432100 (T x0123456789876543210 b01234567898765432100)))
+      where
+        Traverse_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply Traverse_0123456789876543210Sym0 arg) (Traverse_0123456789876543210Sym1 arg) =>
+                                                         Traverse_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Traverse_0123456789876543210Sym0 a0123456789876543210 = Traverse_0123456789876543210Sym1 a0123456789876543210
+    instance PTraversable (T x) where
+      type Traverse a a = Apply (Apply Traverse_0123456789876543210Sym0 a) a
+    type family Case_0123456789876543210 v_0123456789876543210 t where
+    type family Fmap_0123456789876543210 (a :: (~>) a0 b0) (a :: Empty a0) :: Empty b0 where
+      Fmap_0123456789876543210 _ v_0123456789876543210 = Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210
+    type Fmap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a01234567898765432100 b01234567898765432100) (a0123456789876543210 :: Empty a01234567898765432100) =
+        Fmap_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Fmap_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Fmap_0123456789876543210Sym1KindInference) ())
+    data Fmap_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a01234567898765432100 b01234567898765432100) :: (~>) (Empty a01234567898765432100) (Empty b01234567898765432100)
+      where
+        Fmap_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                            a0123456789876543210
+                                                            arg. SameKind (Apply (Fmap_0123456789876543210Sym1 a0123456789876543210) arg) (Fmap_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                     Fmap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Fmap_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Fmap_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Fmap_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Fmap_0123456789876543210Sym0KindInference) ())
+    data Fmap_0123456789876543210Sym0 :: forall a01234567898765432100
+                                                b01234567898765432100.
+                                         (~>) ((~>) a01234567898765432100 b01234567898765432100) ((~>) (Empty a01234567898765432100) (Empty b01234567898765432100))
+      where
+        Fmap_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                            arg. SameKind (Apply Fmap_0123456789876543210Sym0 arg) (Fmap_0123456789876543210Sym1 arg) =>
+                                                     Fmap_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Fmap_0123456789876543210Sym0 a0123456789876543210 = Fmap_0123456789876543210Sym1 a0123456789876543210
+    type family Case_0123456789876543210 v_0123456789876543210 t where
+    type family TFHelper_0123456789876543210 (a :: a0) (a :: Empty b0) :: Empty a0 where
+      TFHelper_0123456789876543210 _ v_0123456789876543210 = Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210
+    type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: a01234567898765432100) (a0123456789876543210 :: Empty b01234567898765432100) =
+        TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ())
+    data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: a01234567898765432100) :: forall b01234567898765432100.
+                                                                                             (~>) (Empty b01234567898765432100) (Empty a01234567898765432100)
+      where
+        TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                a0123456789876543210
+                                                                arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                         TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ())
+    data TFHelper_0123456789876543210Sym0 :: forall a01234567898765432100
+                                                    b01234567898765432100.
+                                             (~>) a01234567898765432100 ((~>) (Empty b01234567898765432100) (Empty a01234567898765432100))
+      where
+        TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) =>
+                                                         TFHelper_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210
+    instance PFunctor Empty where
+      type Fmap a a = Apply (Apply Fmap_0123456789876543210Sym0 a) a
+      type (<$) a a = Apply (Apply TFHelper_0123456789876543210Sym0 a) a
+    type family FoldMap_0123456789876543210 (a :: (~>) a0 m0) (a :: Empty a0) :: m0 where
+      FoldMap_0123456789876543210 _ _ = MemptySym0
+    type FoldMap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a01234567898765432100 m01234567898765432100) (a0123456789876543210 :: Empty a01234567898765432100) =
+        FoldMap_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (FoldMap_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) FoldMap_0123456789876543210Sym1KindInference) ())
+    data FoldMap_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a01234567898765432100 m01234567898765432100) :: (~>) (Empty a01234567898765432100) m01234567898765432100
+      where
+        FoldMap_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (FoldMap_0123456789876543210Sym1 a0123456789876543210) arg) (FoldMap_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        FoldMap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (FoldMap_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = FoldMap_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings FoldMap_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) FoldMap_0123456789876543210Sym0KindInference) ())
+    data FoldMap_0123456789876543210Sym0 :: forall a01234567898765432100
+                                                   m01234567898765432100.
+                                            (~>) ((~>) a01234567898765432100 m01234567898765432100) ((~>) (Empty a01234567898765432100) m01234567898765432100)
+      where
+        FoldMap_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply FoldMap_0123456789876543210Sym0 arg) (FoldMap_0123456789876543210Sym1 arg) =>
+                                                        FoldMap_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply FoldMap_0123456789876543210Sym0 a0123456789876543210 = FoldMap_0123456789876543210Sym1 a0123456789876543210
+    instance PFoldable Empty where
+      type FoldMap a a = Apply (Apply FoldMap_0123456789876543210Sym0 a) a
+    type family Case_0123456789876543210 v_0123456789876543210 t where
+    type family Traverse_0123456789876543210 (a :: (~>) a0 (f0 b0)) (a :: Empty a0) :: f0 (Empty b0) where
+      Traverse_0123456789876543210 _ v_0123456789876543210 = Apply PureSym0 (Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210)
+    type Traverse_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a01234567898765432100 (f01234567898765432100 b01234567898765432100)) (a0123456789876543210 :: Empty a01234567898765432100) =
+        Traverse_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Traverse_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Traverse_0123456789876543210Sym1KindInference) ())
+    data Traverse_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a01234567898765432100 (f01234567898765432100 b01234567898765432100)) :: (~>) (Empty a01234567898765432100) (f01234567898765432100 (Empty b01234567898765432100))
+      where
+        Traverse_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                a0123456789876543210
+                                                                arg. SameKind (Apply (Traverse_0123456789876543210Sym1 a0123456789876543210) arg) (Traverse_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                         Traverse_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Traverse_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Traverse_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Traverse_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Traverse_0123456789876543210Sym0KindInference) ())
+    data Traverse_0123456789876543210Sym0 :: forall a01234567898765432100
+                                                    f01234567898765432100
+                                                    b01234567898765432100.
+                                             (~>) ((~>) a01234567898765432100 (f01234567898765432100 b01234567898765432100)) ((~>) (Empty a01234567898765432100) (f01234567898765432100 (Empty b01234567898765432100)))
+      where
+        Traverse_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply Traverse_0123456789876543210Sym0 arg) (Traverse_0123456789876543210Sym1 arg) =>
+                                                         Traverse_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Traverse_0123456789876543210Sym0 a0123456789876543210 = Traverse_0123456789876543210Sym1 a0123456789876543210
+    instance PTraversable Empty where
+      type Traverse a a = Apply (Apply Traverse_0123456789876543210Sym0 a) a
+    data ST :: forall x a. T x a -> Type
+      where
+        SMkT1 :: forall x
+                        a
+                        (n :: x)
+                        (n :: a)
+                        (n :: Maybe a)
+                        (n :: Maybe (Maybe a)).
+                 (Sing (n :: x))
+                 -> (Sing (n :: a))
+                    -> (Sing (n :: Maybe a))
+                       -> (Sing (n :: Maybe (Maybe a))) -> ST (MkT1 n n n n)
+        SMkT2 :: forall x (n :: Maybe x).
+                 (Sing (n :: Maybe x)) -> ST (MkT2 n)
+    type instance Sing @(T x a) = ST
+    instance (SingKind x, SingKind a) => SingKind (T x a) where
+      type Demote (T x a) = T (Demote x) (Demote a)
+      fromSing (SMkT1 b b b b)
+        = (((MkT1 (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)
+      fromSing (SMkT2 b) = MkT2 (fromSing b)
+      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) }
+      toSing (MkT2 (b :: Demote (Maybe x)))
+        = case toSing b :: SomeSing (Maybe x) of {
+            SomeSing c -> SomeSing (SMkT2 c) }
+    data SEmpty :: forall a. 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)
+    instance SFunctor (T x) where
+      sFmap ::
+        forall (a :: Type) (b :: Type) (t1 :: (~>) a b) (t2 :: T x a).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (FmapSym0 :: TyFun ((~>) a b) ((~>) (T x a) (T x b))
+                                              -> Type) t1) t2)
+      (%<$) ::
+        forall (a :: Type) (b :: Type) (t1 :: a) (t2 :: T x b).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply ((<$@#@$) :: TyFun a ((~>) (T x b) (T x a))
+                                              -> Type) t1) t2)
+      sFmap
+        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
+        (SMkT1 (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing
+                     ((applySing ((singFun4 @MkT1Sym0) SMkT1))
+                        ((applySing
+                            ((singFun1
+                                @(Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210))
+                               (\ sN_0123456789876543210
+                                  -> case sN_0123456789876543210 of {
+                                       (_ :: Sing n_0123456789876543210)
+                                         -> sN_0123456789876543210 })))
+                           sA_0123456789876543210)))
+                    ((applySing _sf_0123456789876543210) sA_0123456789876543210)))
+                ((applySing
+                    ((applySing ((singFun2 @FmapSym0) sFmap)) _sf_0123456789876543210))
+                   sA_0123456789876543210)))
+            ((applySing
+                ((applySing ((singFun2 @FmapSym0) sFmap))
+                   ((applySing ((singFun2 @FmapSym0) sFmap))
+                      _sf_0123456789876543210)))
+               sA_0123456789876543210)
+      sFmap
+        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
+        (SMkT2 (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        = (applySing ((singFun1 @MkT2Sym0) SMkT2))
+            ((applySing
+                ((singFun1
+                    @(Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) a_0123456789876543210))
+                   (\ sN_0123456789876543210
+                      -> case sN_0123456789876543210 of {
+                           (_ :: Sing n_0123456789876543210) -> sN_0123456789876543210 })))
+               sA_0123456789876543210)
+      (%<$)
+        (_sz_0123456789876543210 :: Sing _z_0123456789876543210)
+        (SMkT1 (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing
+                     ((applySing ((singFun4 @MkT1Sym0) SMkT1))
+                        ((applySing
+                            ((singFun1
+                                @(Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210))
+                               (\ sN_0123456789876543210
+                                  -> case sN_0123456789876543210 of {
+                                       (_ :: Sing n_0123456789876543210)
+                                         -> sN_0123456789876543210 })))
+                           sA_0123456789876543210)))
+                    ((applySing
+                        ((singFun1
+                            @(Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _z_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210))
+                           (\ sN_0123456789876543210
+                              -> case sN_0123456789876543210 of {
+                                   (_ :: Sing n_0123456789876543210) -> _sz_0123456789876543210 })))
+                       sA_0123456789876543210)))
+                ((applySing
+                    ((applySing ((singFun2 @(<$@#@$)) (%<$))) _sz_0123456789876543210))
+                   sA_0123456789876543210)))
+            ((applySing
+                ((applySing ((singFun2 @FmapSym0) sFmap))
+                   ((applySing ((singFun2 @(<$@#@$)) (%<$)))
+                      _sz_0123456789876543210)))
+               sA_0123456789876543210)
+      (%<$)
+        (_sz_0123456789876543210 :: Sing _z_0123456789876543210)
+        (SMkT2 (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        = (applySing ((singFun1 @MkT2Sym0) SMkT2))
+            ((applySing
+                ((singFun1
+                    @(Apply (Apply Lambda_0123456789876543210Sym0 _z_0123456789876543210) a_0123456789876543210))
+                   (\ sN_0123456789876543210
+                      -> case sN_0123456789876543210 of {
+                           (_ :: Sing n_0123456789876543210) -> sN_0123456789876543210 })))
+               sA_0123456789876543210)
+    instance SFoldable (T x) where
+      sFoldMap ::
+        forall (a :: Type) (m :: Type) (t1 :: (~>) a m) (t2 :: T x a).
+        SMonoid m =>
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (FoldMapSym0 :: TyFun ((~>) a m) ((~>) (T x a) m)
+                                                 -> Type) t1) t2)
+      sFoldr ::
+        forall (a :: Type)
+               (b :: Type)
+               (t1 :: (~>) a ((~>) b b))
+               (t2 :: b)
+               (t3 :: T x a).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (FoldrSym0 :: TyFun ((~>) a ((~>) b b)) ((~>) b ((~>) (T x a) b))
+                                                         -> Type) t1) t2) t3)
+      sFoldMap
+        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
+        (SMkT1 (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        = (applySing
+             ((applySing ((singFun2 @MappendSym0) sMappend))
+                ((applySing
+                    ((singFun1
+                        @(Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210))
+                       (\ sN_0123456789876543210
+                          -> case sN_0123456789876543210 of {
+                               (_ :: Sing n_0123456789876543210) -> sMempty })))
+                   sA_0123456789876543210)))
+            ((applySing
+                ((applySing ((singFun2 @MappendSym0) sMappend))
+                   ((applySing _sf_0123456789876543210) sA_0123456789876543210)))
+               ((applySing
+                   ((applySing ((singFun2 @MappendSym0) sMappend))
+                      ((applySing
+                          ((applySing ((singFun2 @FoldMapSym0) sFoldMap))
+                             _sf_0123456789876543210))
+                         sA_0123456789876543210)))
+                  ((applySing
+                      ((applySing ((singFun2 @FoldMapSym0) sFoldMap))
+                         ((applySing ((singFun2 @FoldMapSym0) sFoldMap))
+                            _sf_0123456789876543210)))
+                     sA_0123456789876543210)))
+      sFoldMap
+        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
+        (SMkT2 (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        = (applySing
+             ((singFun1
+                 @(Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) a_0123456789876543210))
+                (\ sN_0123456789876543210
+                   -> case sN_0123456789876543210 of {
+                        (_ :: Sing n_0123456789876543210) -> sMempty })))
+            sA_0123456789876543210
+      sFoldr
+        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
+        (_sz_0123456789876543210 :: Sing _z_0123456789876543210)
+        (SMkT1 (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((singFun2
+                     @(Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _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 })))
+                sA_0123456789876543210))
+            ((applySing
+                ((applySing _sf_0123456789876543210) sA_0123456789876543210))
+               ((applySing
+                   ((applySing
+                       ((singFun2
+                           @(Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _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 })))
+                      sA_0123456789876543210))
+                  ((applySing
+                      ((applySing
+                          ((singFun2
+                              @(Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 _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
+                                                        @(Apply (Apply (Apply (Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 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 })))
+                         sA_0123456789876543210))
+                     _sz_0123456789876543210)))
+      sFoldr
+        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
+        (_sz_0123456789876543210 :: Sing _z_0123456789876543210)
+        (SMkT2 (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((singFun2
+                     @(Apply (Apply (Apply Lambda_0123456789876543210Sym0 _f_0123456789876543210) _z_0123456789876543210) a_0123456789876543210))
+                    (\ sN1_0123456789876543210 sN2_0123456789876543210
+                       -> case ((,) sN1_0123456789876543210) sN2_0123456789876543210 of {
+                            (,) (_ :: Sing n1_0123456789876543210)
+                                (_ :: Sing n2_0123456789876543210)
+                              -> sN2_0123456789876543210 })))
+                sA_0123456789876543210))
+            _sz_0123456789876543210
+    instance STraversable (T x) where
+      sTraverse ::
+        forall (a :: Type)
+               (f :: Type -> Type)
+               (b :: Type)
+               (t1 :: (~>) a (f b))
+               (t2 :: T x a).
+        SApplicative f =>
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (TraverseSym0 :: TyFun ((~>) a (f b)) ((~>) (T x a) (f (T x b)))
+                                                  -> Type) t1) t2)
+      sTraverse
+        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
+        (SMkT1 (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210)
+               (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        = (applySing
+             ((applySing ((singFun2 @(<*>@#@$)) (%<*>)))
+                ((applySing
+                    ((applySing ((singFun2 @(<*>@#@$)) (%<*>)))
+                       ((applySing
+                           ((applySing
+                               ((applySing ((singFun3 @LiftA2Sym0) sLiftA2))
+                                  ((singFun4 @MkT1Sym0) SMkT1)))
+                              ((applySing ((singFun1 @PureSym0) sPure)) sA_0123456789876543210)))
+                          ((applySing _sf_0123456789876543210) sA_0123456789876543210))))
+                   ((applySing
+                       ((applySing ((singFun2 @TraverseSym0) sTraverse))
+                          _sf_0123456789876543210))
+                      sA_0123456789876543210))))
+            ((applySing
+                ((applySing ((singFun2 @TraverseSym0) sTraverse))
+                   ((applySing ((singFun2 @TraverseSym0) sTraverse))
+                      _sf_0123456789876543210)))
+               sA_0123456789876543210)
+      sTraverse
+        (_sf_0123456789876543210 :: Sing _f_0123456789876543210)
+        (SMkT2 (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        = (applySing
+             ((applySing ((singFun2 @FmapSym0) sFmap))
+                ((singFun1 @MkT2Sym0) SMkT2)))
+            ((applySing ((singFun1 @PureSym0) sPure)) sA_0123456789876543210)
+    instance SFunctor Empty where
+      sFmap ::
+        forall (a :: Type) (b :: Type) (t1 :: (~>) a b) (t2 :: Empty a).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (FmapSym0 :: TyFun ((~>) a b) ((~>) (Empty a) (Empty b))
+                                              -> Type) t1) t2)
+      (%<$) ::
+        forall (a :: Type) (b :: Type) (t1 :: a) (t2 :: Empty b).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply ((<$@#@$) :: TyFun a ((~>) (Empty b) (Empty a))
+                                              -> Type) t1) t2)
+      sFmap _ (sV_0123456789876543210 :: Sing v_0123456789876543210)
+        = (id
+             @(Sing (Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210)))
+            (case sV_0123456789876543210 of)
+      (%<$) _ (sV_0123456789876543210 :: Sing v_0123456789876543210)
+        = (id
+             @(Sing (Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210)))
+            (case sV_0123456789876543210 of)
+    instance SFoldable Empty where
+      sFoldMap ::
+        forall (a :: Type) (m :: Type) (t1 :: (~>) a m) (t2 :: Empty a).
+        SMonoid m =>
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (FoldMapSym0 :: TyFun ((~>) a m) ((~>) (Empty a) m)
+                                                 -> Type) t1) t2)
+      sFoldMap _ _ = sMempty
+    instance STraversable Empty where
+      sTraverse ::
+        forall (a :: Type)
+               (f :: Type -> Type)
+               (b :: Type)
+               (t1 :: (~>) a (f b))
+               (t2 :: Empty a).
+        SApplicative f =>
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (TraverseSym0 :: TyFun ((~>) a (f b)) ((~>) (Empty a) (f (Empty b)))
+                                                  -> Type) t1) t2)
+      sTraverse _ (sV_0123456789876543210 :: Sing v_0123456789876543210)
+        = (applySing ((singFun1 @PureSym0) sPure))
+            ((id
+                @(Sing (Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210)))
+               (case sV_0123456789876543210 of))
+    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
+    instance SingI (MkT1Sym0 :: (~>) x ((~>) a ((~>) (Maybe a) ((~>) (Maybe (Maybe a)) (T x a))))) where
+      sing = (singFun4 @MkT1Sym0) SMkT1
+    instance SingI d =>
+             SingI (MkT1Sym1 (d :: x) :: (~>) a ((~>) (Maybe a) ((~>) (Maybe (Maybe a)) (T x a)))) where
+      sing = (singFun3 @(MkT1Sym1 (d :: x))) (SMkT1 (sing @d))
+    instance (SingI d, SingI d) =>
+             SingI (MkT1Sym2 (d :: x) (d :: a) :: (~>) (Maybe a) ((~>) (Maybe (Maybe a)) (T x a))) where
+      sing
+        = (singFun2 @(MkT1Sym2 (d :: x) (d :: a)))
+            ((SMkT1 (sing @d)) (sing @d))
+    instance (SingI d, SingI d, SingI d) =>
+             SingI (MkT1Sym3 (d :: x) (d :: a) (d :: Maybe a) :: (~>) (Maybe (Maybe a)) (T x a)) where
+      sing
+        = (singFun1 @(MkT1Sym3 (d :: x) (d :: a) (d :: Maybe a)))
+            (((SMkT1 (sing @d)) (sing @d)) (sing @d))
+    instance SingI n => SingI (MkT2 (n :: Maybe x)) where
+      sing = SMkT2 sing
+    instance SingI (MkT2Sym0 :: (~>) (Maybe x) (T x a)) where
+      sing = (singFun1 @MkT2Sym0) SMkT2
diff --git a/tests/compile-and-dump/Singletons/HigherOrder.ghc86.template b/tests/compile-and-dump/Singletons/HigherOrder.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/HigherOrder.ghc86.template
+++ /dev/null
@@ -1,480 +0,0 @@
-Singletons/HigherOrder.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| map :: (a -> b) -> [a] -> [b]
-          map _ [] = []
-          map f (h : t) = (f h) : (map f t)
-          liftMaybe :: (a -> b) -> Maybe a -> Maybe b
-          liftMaybe f (Just x) = Just (f x)
-          liftMaybe _ Nothing = Nothing
-          zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
-          zipWith f (x : xs) (y : ys) = f x y : zipWith f xs ys
-          zipWith _ [] [] = []
-          zipWith _ (_ : _) [] = []
-          zipWith _ [] (_ : _) = []
-          foo :: ((a -> b) -> a -> b) -> (a -> b) -> a -> b
-          foo f g a = f g a
-          splunge :: [Nat] -> [Bool] -> [Nat]
-          splunge ns bs
-            = zipWith (\ n b -> if b then Succ (Succ n) else n) ns bs
-          etad :: [Nat] -> [Bool] -> [Nat]
-          etad = zipWith (\ n b -> if b then Succ (Succ n) else n)
-          
-          data Either a b = Left a | Right b |]
-  ======>
-    data Either a b = Left a | Right b
-    map :: (a -> b) -> [a] -> [b]
-    map _ [] = []
-    map f (h : t) = (f h : (map f) t)
-    liftMaybe :: (a -> b) -> Maybe a -> Maybe b
-    liftMaybe f (Just x) = Just (f x)
-    liftMaybe _ Nothing = Nothing
-    zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
-    zipWith f (x : xs) (y : ys) = ((f x) y : ((zipWith f) xs) ys)
-    zipWith _ [] [] = []
-    zipWith _ (_ : _) [] = []
-    zipWith _ [] (_ : _) = []
-    foo :: ((a -> b) -> a -> b) -> (a -> b) -> a -> b
-    foo f g a = (f g) a
-    splunge :: [Nat] -> [Bool] -> [Nat]
-    splunge ns bs
-      = ((zipWith (\ n b -> if b then Succ (Succ n) else n)) ns) bs
-    etad :: [Nat] -> [Bool] -> [Nat]
-    etad = zipWith (\ n b -> if b then Succ (Succ n) else n)
-    type LeftSym1 (t0123456789876543210 :: a0123456789876543210) =
-        Left t0123456789876543210
-    instance SuppressUnusedWarnings LeftSym0 where
-      suppressUnusedWarnings = snd (((,) LeftSym0KindInference) ())
-    data LeftSym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) a0123456789876543210 (Either a0123456789876543210 b0123456789876543210)
-      where
-        LeftSym0KindInference :: forall t0123456789876543210
-                                        arg. SameKind (Apply LeftSym0 arg) (LeftSym1 arg) =>
-                                 LeftSym0 t0123456789876543210
-    type instance Apply LeftSym0 t0123456789876543210 = Left t0123456789876543210
-    type RightSym1 (t0123456789876543210 :: b0123456789876543210) =
-        Right t0123456789876543210
-    instance SuppressUnusedWarnings RightSym0 where
-      suppressUnusedWarnings = snd (((,) RightSym0KindInference) ())
-    data RightSym0 :: forall a0123456789876543210 b0123456789876543210.
-                      (~>) b0123456789876543210 (Either a0123456789876543210 b0123456789876543210)
-      where
-        RightSym0KindInference :: forall t0123456789876543210
-                                         arg. SameKind (Apply RightSym0 arg) (RightSym1 arg) =>
-                                  RightSym0 t0123456789876543210
-    type instance Apply RightSym0 t0123456789876543210 = Right t0123456789876543210
-    type family Case_0123456789876543210 ns bs n b t where
-      Case_0123456789876543210 ns bs n b  'True = Apply SuccSym0 (Apply SuccSym0 n)
-      Case_0123456789876543210 ns bs n b  'False = n
-    type family Lambda_0123456789876543210 ns bs t t where
-      Lambda_0123456789876543210 ns bs n b = Case_0123456789876543210 ns bs n b b
-    type Lambda_0123456789876543210Sym4 ns0123456789876543210 bs0123456789876543210 t0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 ns0123456789876543210 bs0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 t0123456789876543210 bs0123456789876543210 ns0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 t0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall ns0123456789876543210
-                                                              bs0123456789876543210
-                                                              t0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym4 ns0123456789876543210 bs0123456789876543210 t0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 t0123456789876543210 bs0123456789876543210 ns0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 bs0123456789876543210 ns0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 bs0123456789876543210 ns0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall ns0123456789876543210
-                                                              bs0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210) arg) (Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 bs0123456789876543210 ns0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym3 bs0123456789876543210 ns0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 ns0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall ns0123456789876543210
-                                                              bs0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 ns0123456789876543210) arg) (Lambda_0123456789876543210Sym2 ns0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 ns0123456789876543210) bs0123456789876543210 = Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 ns0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall ns0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 ns0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 ns0123456789876543210 = Lambda_0123456789876543210Sym1 ns0123456789876543210
-    type family Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 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_0123456789876543210 a_0123456789876543210 t t where
-      Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n b = Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 b
-    type Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210
-    type FooSym3 (a0123456789876543210 :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)) (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: a0123456789876543210) =
-        Foo a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (FooSym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) FooSym2KindInference) ())
-    data FooSym2 (a0123456789876543210 :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)) (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) a0123456789876543210 b0123456789876543210
-      where
-        FooSym2KindInference :: forall a0123456789876543210
-                                       a0123456789876543210
-                                       a0123456789876543210
-                                       arg. SameKind (Apply (FooSym2 a0123456789876543210 a0123456789876543210) arg) (FooSym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                FooSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (FooSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = Foo a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (FooSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) FooSym1KindInference) ())
-    data FooSym1 (a0123456789876543210 :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)) :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)
-      where
-        FooSym1KindInference :: forall a0123456789876543210
-                                       a0123456789876543210
-                                       arg. SameKind (Apply (FooSym1 a0123456789876543210) arg) (FooSym2 a0123456789876543210 arg) =>
-                                FooSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (FooSym1 a0123456789876543210) a0123456789876543210 = FooSym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings FooSym0 where
-      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
-    data FooSym0 :: forall a0123456789876543210 b0123456789876543210.
-                    (~>) ((~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)) ((~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210))
-      where
-        FooSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
-                                FooSym0 a0123456789876543210
-    type instance Apply FooSym0 a0123456789876543210 = FooSym1 a0123456789876543210
-    type ZipWithSym3 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) b0123456789876543210 c0123456789876543210)) (a0123456789876543210 :: [a0123456789876543210]) (a0123456789876543210 :: [b0123456789876543210]) =
-        ZipWith a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ZipWithSym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) ZipWithSym2KindInference) ())
-    data ZipWithSym2 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) b0123456789876543210 c0123456789876543210)) (a0123456789876543210 :: [a0123456789876543210]) :: (~>) [b0123456789876543210] [c0123456789876543210]
-      where
-        ZipWithSym2KindInference :: forall a0123456789876543210
-                                           a0123456789876543210
-                                           a0123456789876543210
-                                           arg. SameKind (Apply (ZipWithSym2 a0123456789876543210 a0123456789876543210) arg) (ZipWithSym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                    ZipWithSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ZipWithSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ZipWith a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ZipWithSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) ZipWithSym1KindInference) ())
-    data ZipWithSym1 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) b0123456789876543210 c0123456789876543210)) :: (~>) [a0123456789876543210] ((~>) [b0123456789876543210] [c0123456789876543210])
-      where
-        ZipWithSym1KindInference :: forall a0123456789876543210
-                                           a0123456789876543210
-                                           arg. SameKind (Apply (ZipWithSym1 a0123456789876543210) arg) (ZipWithSym2 a0123456789876543210 arg) =>
-                                    ZipWithSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ZipWithSym1 a0123456789876543210) a0123456789876543210 = ZipWithSym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ZipWithSym0 where
-      suppressUnusedWarnings = snd (((,) ZipWithSym0KindInference) ())
-    data ZipWithSym0 :: forall a0123456789876543210
-                               b0123456789876543210
-                               c0123456789876543210.
-                        (~>) ((~>) a0123456789876543210 ((~>) b0123456789876543210 c0123456789876543210)) ((~>) [a0123456789876543210] ((~>) [b0123456789876543210] [c0123456789876543210]))
-      where
-        ZipWithSym0KindInference :: forall a0123456789876543210
-                                           arg. SameKind (Apply ZipWithSym0 arg) (ZipWithSym1 arg) =>
-                                    ZipWithSym0 a0123456789876543210
-    type instance Apply ZipWithSym0 a0123456789876543210 = ZipWithSym1 a0123456789876543210
-    type SplungeSym2 (a0123456789876543210 :: [Nat]) (a0123456789876543210 :: [Bool]) =
-        Splunge a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (SplungeSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) SplungeSym1KindInference) ())
-    data SplungeSym1 (a0123456789876543210 :: [Nat]) :: (~>) [Bool] [Nat]
-      where
-        SplungeSym1KindInference :: forall a0123456789876543210
-                                           a0123456789876543210
-                                           arg. SameKind (Apply (SplungeSym1 a0123456789876543210) arg) (SplungeSym2 a0123456789876543210 arg) =>
-                                    SplungeSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (SplungeSym1 a0123456789876543210) a0123456789876543210 = Splunge a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings SplungeSym0 where
-      suppressUnusedWarnings = snd (((,) SplungeSym0KindInference) ())
-    data SplungeSym0 :: (~>) [Nat] ((~>) [Bool] [Nat])
-      where
-        SplungeSym0KindInference :: forall a0123456789876543210
-                                           arg. SameKind (Apply SplungeSym0 arg) (SplungeSym1 arg) =>
-                                    SplungeSym0 a0123456789876543210
-    type instance Apply SplungeSym0 a0123456789876543210 = SplungeSym1 a0123456789876543210
-    type EtadSym2 (a0123456789876543210 :: [Nat]) (a0123456789876543210 :: [Bool]) =
-        Etad a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (EtadSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) EtadSym1KindInference) ())
-    data EtadSym1 (a0123456789876543210 :: [Nat]) :: (~>) [Bool] [Nat]
-      where
-        EtadSym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (EtadSym1 a0123456789876543210) arg) (EtadSym2 a0123456789876543210 arg) =>
-                                 EtadSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (EtadSym1 a0123456789876543210) a0123456789876543210 = Etad a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings EtadSym0 where
-      suppressUnusedWarnings = snd (((,) EtadSym0KindInference) ())
-    data EtadSym0 :: (~>) [Nat] ((~>) [Bool] [Nat])
-      where
-        EtadSym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply EtadSym0 arg) (EtadSym1 arg) =>
-                                 EtadSym0 a0123456789876543210
-    type instance Apply EtadSym0 a0123456789876543210 = EtadSym1 a0123456789876543210
-    type LiftMaybeSym2 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) =
-        LiftMaybe a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (LiftMaybeSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) LiftMaybeSym1KindInference) ())
-    data LiftMaybeSym1 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) (Maybe a0123456789876543210) (Maybe b0123456789876543210)
-      where
-        LiftMaybeSym1KindInference :: forall a0123456789876543210
-                                             a0123456789876543210
-                                             arg. SameKind (Apply (LiftMaybeSym1 a0123456789876543210) arg) (LiftMaybeSym2 a0123456789876543210 arg) =>
-                                      LiftMaybeSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (LiftMaybeSym1 a0123456789876543210) a0123456789876543210 = LiftMaybe a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings LiftMaybeSym0 where
-      suppressUnusedWarnings = snd (((,) LiftMaybeSym0KindInference) ())
-    data LiftMaybeSym0 :: forall a0123456789876543210
-                                 b0123456789876543210.
-                          (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) (Maybe a0123456789876543210) (Maybe b0123456789876543210))
-      where
-        LiftMaybeSym0KindInference :: forall a0123456789876543210
-                                             arg. SameKind (Apply LiftMaybeSym0 arg) (LiftMaybeSym1 arg) =>
-                                      LiftMaybeSym0 a0123456789876543210
-    type instance Apply LiftMaybeSym0 a0123456789876543210 = LiftMaybeSym1 a0123456789876543210
-    type MapSym2 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: [a0123456789876543210]) =
-        Map a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (MapSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MapSym1KindInference) ())
-    data MapSym1 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) [a0123456789876543210] [b0123456789876543210]
-      where
-        MapSym1KindInference :: forall a0123456789876543210
-                                       a0123456789876543210
-                                       arg. SameKind (Apply (MapSym1 a0123456789876543210) arg) (MapSym2 a0123456789876543210 arg) =>
-                                MapSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (MapSym1 a0123456789876543210) a0123456789876543210 = Map a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings MapSym0 where
-      suppressUnusedWarnings = snd (((,) MapSym0KindInference) ())
-    data MapSym0 :: forall a0123456789876543210 b0123456789876543210.
-                    (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) [a0123456789876543210] [b0123456789876543210])
-      where
-        MapSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply MapSym0 arg) (MapSym1 arg) =>
-                                MapSym0 a0123456789876543210
-    type instance Apply MapSym0 a0123456789876543210 = MapSym1 a0123456789876543210
-    type family Foo (a :: (~>) ((~>) a b) ((~>) a b)) (a :: (~>) a b) (a :: a) :: b where
-      Foo f g a = Apply (Apply f g) a
-    type family ZipWith (a :: (~>) a ((~>) b c)) (a :: [a]) (a :: [b]) :: [c] where
-      ZipWith f ( '(:) x xs) ( '(:) y ys) = Apply (Apply (:@#@$) (Apply (Apply f x) y)) (Apply (Apply (Apply ZipWithSym0 f) xs) ys)
-      ZipWith _ '[] '[] = '[]
-      ZipWith _ ( '(:) _ _) '[] = '[]
-      ZipWith _ '[] ( '(:) _ _) = '[]
-    type family Splunge (a :: [Nat]) (a :: [Bool]) :: [Nat] where
-      Splunge ns bs = Apply (Apply (Apply ZipWithSym0 (Apply (Apply Lambda_0123456789876543210Sym0 ns) bs)) ns) bs
-    type family Etad (a :: [Nat]) (a :: [Bool]) :: [Nat] where
-      Etad a_0123456789876543210 a_0123456789876543210 = Apply (Apply (Apply ZipWithSym0 (Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210)) a_0123456789876543210) a_0123456789876543210
-    type family LiftMaybe (a :: (~>) a b) (a :: Maybe a) :: Maybe b where
-      LiftMaybe f ( 'Just x) = Apply JustSym0 (Apply f x)
-      LiftMaybe _  'Nothing = NothingSym0
-    type family Map (a :: (~>) a b) (a :: [a]) :: [b] where
-      Map _ '[] = '[]
-      Map f ( '(:) h t) = Apply (Apply (:@#@$) (Apply f h)) (Apply (Apply MapSym0 f) t)
-    sFoo ::
-      forall a
-             b
-             (t :: (~>) ((~>) a b) ((~>) a b))
-             (t :: (~>) a b)
-             (t :: a).
-      Sing t
-      -> Sing t
-         -> Sing t -> Sing (Apply (Apply (Apply FooSym0 t) t) t :: b)
-    sZipWith ::
-      forall a b c (t :: (~>) a ((~>) b c)) (t :: [a]) (t :: [b]).
-      Sing t
-      -> Sing t
-         -> Sing t -> Sing (Apply (Apply (Apply ZipWithSym0 t) t) t :: [c])
-    sSplunge ::
-      forall (t :: [Nat]) (t :: [Bool]).
-      Sing t -> Sing t -> Sing (Apply (Apply SplungeSym0 t) t :: [Nat])
-    sEtad ::
-      forall (t :: [Nat]) (t :: [Bool]).
-      Sing t -> Sing t -> Sing (Apply (Apply EtadSym0 t) t :: [Nat])
-    sLiftMaybe ::
-      forall a b (t :: (~>) a b) (t :: Maybe a).
-      Sing t
-      -> Sing t -> Sing (Apply (Apply LiftMaybeSym0 t) t :: Maybe b)
-    sMap ::
-      forall a b (t :: (~>) a b) (t :: [a]).
-      Sing t -> Sing t -> Sing (Apply (Apply MapSym0 t) t :: [b])
-    sFoo (sF :: Sing f) (sG :: Sing g) (sA :: Sing a)
-      = (applySing ((applySing sF) sG)) sA
-    sZipWith
-      (sF :: Sing f)
-      (SCons (sX :: Sing x) (sXs :: Sing xs))
-      (SCons (sY :: Sing y) (sYs :: Sing ys))
-      = (applySing
-           ((applySing ((singFun2 @(:@#@$)) SCons))
-              ((applySing ((applySing sF) sX)) sY)))
-          ((applySing
-              ((applySing ((applySing ((singFun3 @ZipWithSym0) sZipWith)) sF))
-                 sXs))
-             sYs)
-    sZipWith _ SNil SNil = SNil
-    sZipWith _ (SCons _ _) SNil = SNil
-    sZipWith _ SNil (SCons _ _) = SNil
-    sSplunge (sNs :: Sing ns) (sBs :: Sing bs)
-      = (applySing
-           ((applySing
-               ((applySing ((singFun3 @ZipWithSym0) sZipWith))
-                  ((singFun2 @(Apply (Apply Lambda_0123456789876543210Sym0 ns) bs))
-                     (\ sN sB
-                        -> case ((,) sN) sB of {
-                             (,) (_ :: Sing n) (_ :: Sing b)
-                               -> (case sB of
-                                     STrue
-                                       -> (applySing ((singFun1 @SuccSym0) SSucc))
-                                            ((applySing ((singFun1 @SuccSym0) SSucc)) sN)
-                                     SFalse -> sN) ::
-                                    Sing (Case_0123456789876543210 ns bs n b b) }))))
-              sNs))
-          sBs
-    sEtad
-      (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      = (applySing
-           ((applySing
-               ((applySing ((singFun3 @ZipWithSym0) sZipWith))
-                  ((singFun2
-                      @(Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210))
-                     (\ sN sB
-                        -> case ((,) sN) sB of {
-                             (,) (_ :: Sing n) (_ :: Sing b)
-                               -> (case sB of
-                                     STrue
-                                       -> (applySing ((singFun1 @SuccSym0) SSucc))
-                                            ((applySing ((singFun1 @SuccSym0) SSucc)) sN)
-                                     SFalse -> sN) ::
-                                    Sing (Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 b) }))))
-              sA_0123456789876543210))
-          sA_0123456789876543210
-    sLiftMaybe (sF :: Sing f) (SJust (sX :: Sing x))
-      = (applySing ((singFun1 @JustSym0) SJust)) ((applySing sF) sX)
-    sLiftMaybe _ SNothing = SNothing
-    sMap _ SNil = SNil
-    sMap (sF :: Sing f) (SCons (sH :: Sing h) (sT :: Sing t))
-      = (applySing
-           ((applySing ((singFun2 @(:@#@$)) SCons)) ((applySing sF) sH)))
-          ((applySing ((applySing ((singFun2 @MapSym0) sMap)) sF)) sT)
-    instance SingI (FooSym0 :: (~>) ((~>) ((~>) a b) ((~>) a b)) ((~>) ((~>) a b) ((~>) a b))) where
-      sing = (singFun3 @FooSym0) sFoo
-    instance SingI d =>
-             SingI (FooSym1 (d :: (~>) ((~>) a b) ((~>) a b)) :: (~>) ((~>) a b) ((~>) a b)) where
-      sing
-        = (singFun2 @(FooSym1 (d :: (~>) ((~>) a b) ((~>) a b))))
-            (sFoo (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (FooSym2 (d :: (~>) ((~>) a b) ((~>) a b)) (d :: (~>) a b) :: (~>) a b) where
-      sing
-        = (singFun1
-             @(FooSym2 (d :: (~>) ((~>) a b) ((~>) a b)) (d :: (~>) a b)))
-            ((sFoo (sing @d)) (sing @d))
-    instance SingI (ZipWithSym0 :: (~>) ((~>) a ((~>) b c)) ((~>) [a] ((~>) [b] [c]))) where
-      sing = (singFun3 @ZipWithSym0) sZipWith
-    instance SingI d =>
-             SingI (ZipWithSym1 (d :: (~>) a ((~>) b c)) :: (~>) [a] ((~>) [b] [c])) where
-      sing
-        = (singFun2 @(ZipWithSym1 (d :: (~>) a ((~>) b c))))
-            (sZipWith (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (ZipWithSym2 (d :: (~>) a ((~>) b c)) (d :: [a]) :: (~>) [b] [c]) where
-      sing
-        = (singFun1 @(ZipWithSym2 (d :: (~>) a ((~>) b c)) (d :: [a])))
-            ((sZipWith (sing @d)) (sing @d))
-    instance SingI (SplungeSym0 :: (~>) [Nat] ((~>) [Bool] [Nat])) where
-      sing = (singFun2 @SplungeSym0) sSplunge
-    instance SingI d =>
-             SingI (SplungeSym1 (d :: [Nat]) :: (~>) [Bool] [Nat]) where
-      sing = (singFun1 @(SplungeSym1 (d :: [Nat]))) (sSplunge (sing @d))
-    instance SingI (EtadSym0 :: (~>) [Nat] ((~>) [Bool] [Nat])) where
-      sing = (singFun2 @EtadSym0) sEtad
-    instance SingI d =>
-             SingI (EtadSym1 (d :: [Nat]) :: (~>) [Bool] [Nat]) where
-      sing = (singFun1 @(EtadSym1 (d :: [Nat]))) (sEtad (sing @d))
-    instance SingI (LiftMaybeSym0 :: (~>) ((~>) a b) ((~>) (Maybe a) (Maybe b))) where
-      sing = (singFun2 @LiftMaybeSym0) sLiftMaybe
-    instance SingI d =>
-             SingI (LiftMaybeSym1 (d :: (~>) a b) :: (~>) (Maybe a) (Maybe b)) where
-      sing
-        = (singFun1 @(LiftMaybeSym1 (d :: (~>) a b)))
-            (sLiftMaybe (sing @d))
-    instance SingI (MapSym0 :: (~>) ((~>) a b) ((~>) [a] [b])) where
-      sing = (singFun2 @MapSym0) sMap
-    instance SingI d =>
-             SingI (MapSym1 (d :: (~>) a b) :: (~>) [a] [b]) where
-      sing = (singFun1 @(MapSym1 (d :: (~>) a b))) (sMap (sing @d))
-    data instance Sing :: Either a b -> GHC.Types.Type
-      where
-        SLeft :: forall a (n :: a). (Sing (n :: a)) -> Sing (Left n)
-        SRight :: forall b (n :: b). (Sing (n :: b)) -> Sing (Right n)
-    type SEither = (Sing :: Either a b -> GHC.Types.Type)
-    instance (SingKind a, SingKind b) => SingKind (Either a b) where
-      type Demote (Either a b) = Either (Demote a) (Demote b)
-      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) }
-      toSing (Right (b :: Demote b))
-        = case toSing b :: SomeSing b of {
-            SomeSing c -> SomeSing (SRight c) }
-    instance SingI n => SingI (Left (n :: a)) where
-      sing = SLeft sing
-    instance SingI (LeftSym0 :: (~>) a (Either a b)) where
-      sing = (singFun1 @LeftSym0) SLeft
-    instance SingI (TyCon1 Left :: (~>) a (Either a b)) where
-      sing = (singFun1 @(TyCon1 Left)) SLeft
-    instance SingI n => SingI (Right (n :: b)) where
-      sing = SRight sing
-    instance SingI (RightSym0 :: (~>) b (Either a b)) where
-      sing = (singFun1 @RightSym0) SRight
-    instance SingI (TyCon1 Right :: (~>) b (Either a b)) where
-      sing = (singFun1 @(TyCon1 Right)) SRight
diff --git a/tests/compile-and-dump/Singletons/HigherOrder.ghc88.template b/tests/compile-and-dump/Singletons/HigherOrder.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/HigherOrder.ghc88.template
@@ -0,0 +1,477 @@
+Singletons/HigherOrder.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| map :: (a -> b) -> [a] -> [b]
+          map _ [] = []
+          map f (h : t) = (f h) : (map f t)
+          liftMaybe :: (a -> b) -> Maybe a -> Maybe b
+          liftMaybe f (Just x) = Just (f x)
+          liftMaybe _ Nothing = Nothing
+          zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
+          zipWith f (x : xs) (y : ys) = f x y : zipWith f xs ys
+          zipWith _ [] [] = []
+          zipWith _ (_ : _) [] = []
+          zipWith _ [] (_ : _) = []
+          foo :: ((a -> b) -> a -> b) -> (a -> b) -> a -> b
+          foo f g a = f g a
+          splunge :: [Nat] -> [Bool] -> [Nat]
+          splunge ns bs
+            = zipWith (\ n b -> if b then Succ (Succ n) else n) ns bs
+          etad :: [Nat] -> [Bool] -> [Nat]
+          etad = zipWith (\ n b -> if b then Succ (Succ n) else n)
+          
+          data Either a b = Left a | Right b |]
+  ======>
+    data Either a b = Left a | Right b
+    map :: (a -> b) -> [a] -> [b]
+    map _ [] = []
+    map f (h : t) = (f h : (map f) t)
+    liftMaybe :: (a -> b) -> Maybe a -> Maybe b
+    liftMaybe f (Just x) = Just (f x)
+    liftMaybe _ Nothing = Nothing
+    zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
+    zipWith f (x : xs) (y : ys) = ((f x) y : ((zipWith f) xs) ys)
+    zipWith _ [] [] = []
+    zipWith _ (_ : _) [] = []
+    zipWith _ [] (_ : _) = []
+    foo :: ((a -> b) -> a -> b) -> (a -> b) -> a -> b
+    foo f g a = (f g) a
+    splunge :: [Nat] -> [Bool] -> [Nat]
+    splunge ns bs
+      = ((zipWith (\ n b -> if b then Succ (Succ n) else n)) ns) bs
+    etad :: [Nat] -> [Bool] -> [Nat]
+    etad = zipWith (\ n b -> if b then Succ (Succ n) else n)
+    type LeftSym1 (t0123456789876543210 :: a0123456789876543210) =
+        Left t0123456789876543210
+    instance SuppressUnusedWarnings LeftSym0 where
+      suppressUnusedWarnings = snd (((,) LeftSym0KindInference) ())
+    data LeftSym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) a0123456789876543210 (Either a0123456789876543210 b0123456789876543210)
+      where
+        LeftSym0KindInference :: forall t0123456789876543210
+                                        arg. SameKind (Apply LeftSym0 arg) (LeftSym1 arg) =>
+                                 LeftSym0 t0123456789876543210
+    type instance Apply LeftSym0 t0123456789876543210 = Left t0123456789876543210
+    type RightSym1 (t0123456789876543210 :: b0123456789876543210) =
+        Right t0123456789876543210
+    instance SuppressUnusedWarnings RightSym0 where
+      suppressUnusedWarnings = snd (((,) RightSym0KindInference) ())
+    data RightSym0 :: forall b0123456789876543210 a0123456789876543210.
+                      (~>) b0123456789876543210 (Either a0123456789876543210 b0123456789876543210)
+      where
+        RightSym0KindInference :: forall t0123456789876543210
+                                         arg. SameKind (Apply RightSym0 arg) (RightSym1 arg) =>
+                                  RightSym0 t0123456789876543210
+    type instance Apply RightSym0 t0123456789876543210 = Right t0123456789876543210
+    type family Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 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_0123456789876543210 a_0123456789876543210 t t where
+      Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n b = Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 b
+    type Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210
+    type family Case_0123456789876543210 n b ns bs 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 ns bs t t where
+      Lambda_0123456789876543210 ns bs n b = Case_0123456789876543210 n b ns bs b
+    type Lambda_0123456789876543210Sym4 ns0123456789876543210 bs0123456789876543210 t0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 ns0123456789876543210 bs0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 t0123456789876543210 bs0123456789876543210 ns0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 t0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall ns0123456789876543210
+                                                              bs0123456789876543210
+                                                              t0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym4 ns0123456789876543210 bs0123456789876543210 t0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 t0123456789876543210 bs0123456789876543210 ns0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 bs0123456789876543210 ns0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 bs0123456789876543210 ns0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall ns0123456789876543210
+                                                              bs0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210) arg) (Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 bs0123456789876543210 ns0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym3 bs0123456789876543210 ns0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 ns0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall ns0123456789876543210
+                                                              bs0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 ns0123456789876543210) arg) (Lambda_0123456789876543210Sym2 ns0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 ns0123456789876543210) bs0123456789876543210 = Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 ns0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall ns0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 ns0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 ns0123456789876543210 = Lambda_0123456789876543210Sym1 ns0123456789876543210
+    type EtadSym2 (a0123456789876543210 :: [Nat]) (a0123456789876543210 :: [Bool]) =
+        Etad a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (EtadSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) EtadSym1KindInference) ())
+    data EtadSym1 (a0123456789876543210 :: [Nat]) :: (~>) [Bool] [Nat]
+      where
+        EtadSym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (EtadSym1 a0123456789876543210) arg) (EtadSym2 a0123456789876543210 arg) =>
+                                 EtadSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (EtadSym1 a0123456789876543210) a0123456789876543210 = Etad a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings EtadSym0 where
+      suppressUnusedWarnings = snd (((,) EtadSym0KindInference) ())
+    data EtadSym0 :: (~>) [Nat] ((~>) [Bool] [Nat])
+      where
+        EtadSym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply EtadSym0 arg) (EtadSym1 arg) =>
+                                 EtadSym0 a0123456789876543210
+    type instance Apply EtadSym0 a0123456789876543210 = EtadSym1 a0123456789876543210
+    type SplungeSym2 (a0123456789876543210 :: [Nat]) (a0123456789876543210 :: [Bool]) =
+        Splunge a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (SplungeSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) SplungeSym1KindInference) ())
+    data SplungeSym1 (a0123456789876543210 :: [Nat]) :: (~>) [Bool] [Nat]
+      where
+        SplungeSym1KindInference :: forall a0123456789876543210
+                                           a0123456789876543210
+                                           arg. SameKind (Apply (SplungeSym1 a0123456789876543210) arg) (SplungeSym2 a0123456789876543210 arg) =>
+                                    SplungeSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (SplungeSym1 a0123456789876543210) a0123456789876543210 = Splunge a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings SplungeSym0 where
+      suppressUnusedWarnings = snd (((,) SplungeSym0KindInference) ())
+    data SplungeSym0 :: (~>) [Nat] ((~>) [Bool] [Nat])
+      where
+        SplungeSym0KindInference :: forall a0123456789876543210
+                                           arg. SameKind (Apply SplungeSym0 arg) (SplungeSym1 arg) =>
+                                    SplungeSym0 a0123456789876543210
+    type instance Apply SplungeSym0 a0123456789876543210 = SplungeSym1 a0123456789876543210
+    type FooSym3 (a0123456789876543210 :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)) (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: a0123456789876543210) =
+        Foo a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (FooSym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) FooSym2KindInference) ())
+    data FooSym2 (a0123456789876543210 :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)) (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) a0123456789876543210 b0123456789876543210
+      where
+        FooSym2KindInference :: forall a0123456789876543210
+                                       a0123456789876543210
+                                       a0123456789876543210
+                                       arg. SameKind (Apply (FooSym2 a0123456789876543210 a0123456789876543210) arg) (FooSym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                FooSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (FooSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = Foo a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (FooSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) FooSym1KindInference) ())
+    data FooSym1 (a0123456789876543210 :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)) :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)
+      where
+        FooSym1KindInference :: forall a0123456789876543210
+                                       a0123456789876543210
+                                       arg. SameKind (Apply (FooSym1 a0123456789876543210) arg) (FooSym2 a0123456789876543210 arg) =>
+                                FooSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (FooSym1 a0123456789876543210) a0123456789876543210 = FooSym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings FooSym0 where
+      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
+    data FooSym0 :: forall a0123456789876543210 b0123456789876543210.
+                    (~>) ((~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)) ((~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210))
+      where
+        FooSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
+                                FooSym0 a0123456789876543210
+    type instance Apply FooSym0 a0123456789876543210 = FooSym1 a0123456789876543210
+    type ZipWithSym3 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) b0123456789876543210 c0123456789876543210)) (a0123456789876543210 :: [a0123456789876543210]) (a0123456789876543210 :: [b0123456789876543210]) =
+        ZipWith a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ZipWithSym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) ZipWithSym2KindInference) ())
+    data ZipWithSym2 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) b0123456789876543210 c0123456789876543210)) (a0123456789876543210 :: [a0123456789876543210]) :: (~>) [b0123456789876543210] [c0123456789876543210]
+      where
+        ZipWithSym2KindInference :: forall a0123456789876543210
+                                           a0123456789876543210
+                                           a0123456789876543210
+                                           arg. SameKind (Apply (ZipWithSym2 a0123456789876543210 a0123456789876543210) arg) (ZipWithSym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                    ZipWithSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ZipWithSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ZipWith a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ZipWithSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) ZipWithSym1KindInference) ())
+    data ZipWithSym1 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) b0123456789876543210 c0123456789876543210)) :: (~>) [a0123456789876543210] ((~>) [b0123456789876543210] [c0123456789876543210])
+      where
+        ZipWithSym1KindInference :: forall a0123456789876543210
+                                           a0123456789876543210
+                                           arg. SameKind (Apply (ZipWithSym1 a0123456789876543210) arg) (ZipWithSym2 a0123456789876543210 arg) =>
+                                    ZipWithSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ZipWithSym1 a0123456789876543210) a0123456789876543210 = ZipWithSym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ZipWithSym0 where
+      suppressUnusedWarnings = snd (((,) ZipWithSym0KindInference) ())
+    data ZipWithSym0 :: forall a0123456789876543210
+                               b0123456789876543210
+                               c0123456789876543210.
+                        (~>) ((~>) a0123456789876543210 ((~>) b0123456789876543210 c0123456789876543210)) ((~>) [a0123456789876543210] ((~>) [b0123456789876543210] [c0123456789876543210]))
+      where
+        ZipWithSym0KindInference :: forall a0123456789876543210
+                                           arg. SameKind (Apply ZipWithSym0 arg) (ZipWithSym1 arg) =>
+                                    ZipWithSym0 a0123456789876543210
+    type instance Apply ZipWithSym0 a0123456789876543210 = ZipWithSym1 a0123456789876543210
+    type LiftMaybeSym2 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) =
+        LiftMaybe a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (LiftMaybeSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) LiftMaybeSym1KindInference) ())
+    data LiftMaybeSym1 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) (Maybe a0123456789876543210) (Maybe b0123456789876543210)
+      where
+        LiftMaybeSym1KindInference :: forall a0123456789876543210
+                                             a0123456789876543210
+                                             arg. SameKind (Apply (LiftMaybeSym1 a0123456789876543210) arg) (LiftMaybeSym2 a0123456789876543210 arg) =>
+                                      LiftMaybeSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (LiftMaybeSym1 a0123456789876543210) a0123456789876543210 = LiftMaybe a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings LiftMaybeSym0 where
+      suppressUnusedWarnings = snd (((,) LiftMaybeSym0KindInference) ())
+    data LiftMaybeSym0 :: forall a0123456789876543210
+                                 b0123456789876543210.
+                          (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) (Maybe a0123456789876543210) (Maybe b0123456789876543210))
+      where
+        LiftMaybeSym0KindInference :: forall a0123456789876543210
+                                             arg. SameKind (Apply LiftMaybeSym0 arg) (LiftMaybeSym1 arg) =>
+                                      LiftMaybeSym0 a0123456789876543210
+    type instance Apply LiftMaybeSym0 a0123456789876543210 = LiftMaybeSym1 a0123456789876543210
+    type MapSym2 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: [a0123456789876543210]) =
+        Map a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (MapSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MapSym1KindInference) ())
+    data MapSym1 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) [a0123456789876543210] [b0123456789876543210]
+      where
+        MapSym1KindInference :: forall a0123456789876543210
+                                       a0123456789876543210
+                                       arg. SameKind (Apply (MapSym1 a0123456789876543210) arg) (MapSym2 a0123456789876543210 arg) =>
+                                MapSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (MapSym1 a0123456789876543210) a0123456789876543210 = Map a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings MapSym0 where
+      suppressUnusedWarnings = snd (((,) MapSym0KindInference) ())
+    data MapSym0 :: forall a0123456789876543210 b0123456789876543210.
+                    (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) [a0123456789876543210] [b0123456789876543210])
+      where
+        MapSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply MapSym0 arg) (MapSym1 arg) =>
+                                MapSym0 a0123456789876543210
+    type instance Apply MapSym0 a0123456789876543210 = MapSym1 a0123456789876543210
+    type family Etad (a :: [Nat]) (a :: [Bool]) :: [Nat] where
+      Etad a_0123456789876543210 a_0123456789876543210 = Apply (Apply (Apply ZipWithSym0 (Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210)) a_0123456789876543210) a_0123456789876543210
+    type family Splunge (a :: [Nat]) (a :: [Bool]) :: [Nat] where
+      Splunge ns bs = Apply (Apply (Apply ZipWithSym0 (Apply (Apply Lambda_0123456789876543210Sym0 ns) bs)) ns) bs
+    type family Foo (a :: (~>) ((~>) a b) ((~>) a b)) (a :: (~>) a b) (a :: a) :: b where
+      Foo f g a = Apply (Apply f g) a
+    type family ZipWith (a :: (~>) a ((~>) b c)) (a :: [a]) (a :: [b]) :: [c] where
+      ZipWith f ('(:) x xs) ('(:) y ys) = Apply (Apply (:@#@$) (Apply (Apply f x) y)) (Apply (Apply (Apply ZipWithSym0 f) xs) ys)
+      ZipWith _ '[] '[] = '[]
+      ZipWith _ ('(:) _ _) '[] = '[]
+      ZipWith _ '[] ('(:) _ _) = '[]
+    type family LiftMaybe (a :: (~>) a b) (a :: Maybe a) :: Maybe b where
+      LiftMaybe f ('Just x) = Apply JustSym0 (Apply f x)
+      LiftMaybe _ 'Nothing = NothingSym0
+    type family Map (a :: (~>) a b) (a :: [a]) :: [b] where
+      Map _ '[] = '[]
+      Map f ('(:) h t) = Apply (Apply (:@#@$) (Apply f h)) (Apply (Apply MapSym0 f) t)
+    sEtad ::
+      forall (t :: [Nat]) (t :: [Bool]).
+      Sing t -> Sing t -> Sing (Apply (Apply EtadSym0 t) t :: [Nat])
+    sSplunge ::
+      forall (t :: [Nat]) (t :: [Bool]).
+      Sing t -> Sing t -> Sing (Apply (Apply SplungeSym0 t) t :: [Nat])
+    sFoo ::
+      forall a
+             b
+             (t :: (~>) ((~>) a b) ((~>) a b))
+             (t :: (~>) a b)
+             (t :: a).
+      Sing t
+      -> Sing t
+         -> Sing t -> Sing (Apply (Apply (Apply FooSym0 t) t) t :: b)
+    sZipWith ::
+      forall a b c (t :: (~>) a ((~>) b c)) (t :: [a]) (t :: [b]).
+      Sing t
+      -> Sing t
+         -> Sing t -> Sing (Apply (Apply (Apply ZipWithSym0 t) t) t :: [c])
+    sLiftMaybe ::
+      forall a b (t :: (~>) a b) (t :: Maybe a).
+      Sing t
+      -> Sing t -> Sing (Apply (Apply LiftMaybeSym0 t) t :: Maybe b)
+    sMap ::
+      forall a b (t :: (~>) a b) (t :: [a]).
+      Sing t -> Sing t -> Sing (Apply (Apply MapSym0 t) t :: [b])
+    sEtad
+      (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = (applySing
+           ((applySing
+               ((applySing ((singFun3 @ZipWithSym0) sZipWith))
+                  ((singFun2
+                      @(Apply (Apply 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) }))))
+              sA_0123456789876543210))
+          sA_0123456789876543210
+    sSplunge (sNs :: Sing ns) (sBs :: Sing bs)
+      = (applySing
+           ((applySing
+               ((applySing ((singFun3 @ZipWithSym0) sZipWith))
+                  ((singFun2 @(Apply (Apply 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) }))))
+              sNs))
+          sBs
+    sFoo (sF :: Sing f) (sG :: Sing g) (sA :: Sing a)
+      = (applySing ((applySing sF) sG)) sA
+    sZipWith
+      (sF :: Sing f)
+      (SCons (sX :: Sing x) (sXs :: Sing xs))
+      (SCons (sY :: Sing y) (sYs :: Sing ys))
+      = (applySing
+           ((applySing ((singFun2 @(:@#@$)) SCons))
+              ((applySing ((applySing sF) sX)) sY)))
+          ((applySing
+              ((applySing ((applySing ((singFun3 @ZipWithSym0) sZipWith)) sF))
+                 sXs))
+             sYs)
+    sZipWith _ SNil SNil = SNil
+    sZipWith _ (SCons _ _) SNil = SNil
+    sZipWith _ SNil (SCons _ _) = SNil
+    sLiftMaybe (sF :: Sing f) (SJust (sX :: Sing x))
+      = (applySing ((singFun1 @JustSym0) SJust)) ((applySing sF) sX)
+    sLiftMaybe _ SNothing = SNothing
+    sMap _ SNil = SNil
+    sMap (sF :: Sing f) (SCons (sH :: Sing h) (sT :: Sing t))
+      = (applySing
+           ((applySing ((singFun2 @(:@#@$)) SCons)) ((applySing sF) sH)))
+          ((applySing ((applySing ((singFun2 @MapSym0) sMap)) sF)) sT)
+    instance SingI (EtadSym0 :: (~>) [Nat] ((~>) [Bool] [Nat])) where
+      sing = (singFun2 @EtadSym0) sEtad
+    instance SingI d =>
+             SingI (EtadSym1 (d :: [Nat]) :: (~>) [Bool] [Nat]) where
+      sing = (singFun1 @(EtadSym1 (d :: [Nat]))) (sEtad (sing @d))
+    instance SingI (SplungeSym0 :: (~>) [Nat] ((~>) [Bool] [Nat])) where
+      sing = (singFun2 @SplungeSym0) sSplunge
+    instance SingI d =>
+             SingI (SplungeSym1 (d :: [Nat]) :: (~>) [Bool] [Nat]) where
+      sing = (singFun1 @(SplungeSym1 (d :: [Nat]))) (sSplunge (sing @d))
+    instance SingI (FooSym0 :: (~>) ((~>) ((~>) a b) ((~>) a b)) ((~>) ((~>) a b) ((~>) a b))) where
+      sing = (singFun3 @FooSym0) sFoo
+    instance SingI d =>
+             SingI (FooSym1 (d :: (~>) ((~>) a b) ((~>) a b)) :: (~>) ((~>) a b) ((~>) a b)) where
+      sing
+        = (singFun2 @(FooSym1 (d :: (~>) ((~>) a b) ((~>) a b))))
+            (sFoo (sing @d))
+    instance (SingI d, SingI d) =>
+             SingI (FooSym2 (d :: (~>) ((~>) a b) ((~>) a b)) (d :: (~>) a b) :: (~>) a b) where
+      sing
+        = (singFun1
+             @(FooSym2 (d :: (~>) ((~>) a b) ((~>) a b)) (d :: (~>) a b)))
+            ((sFoo (sing @d)) (sing @d))
+    instance SingI (ZipWithSym0 :: (~>) ((~>) a ((~>) b c)) ((~>) [a] ((~>) [b] [c]))) where
+      sing = (singFun3 @ZipWithSym0) sZipWith
+    instance SingI d =>
+             SingI (ZipWithSym1 (d :: (~>) a ((~>) b c)) :: (~>) [a] ((~>) [b] [c])) where
+      sing
+        = (singFun2 @(ZipWithSym1 (d :: (~>) a ((~>) b c))))
+            (sZipWith (sing @d))
+    instance (SingI d, SingI d) =>
+             SingI (ZipWithSym2 (d :: (~>) a ((~>) b c)) (d :: [a]) :: (~>) [b] [c]) where
+      sing
+        = (singFun1 @(ZipWithSym2 (d :: (~>) a ((~>) b c)) (d :: [a])))
+            ((sZipWith (sing @d)) (sing @d))
+    instance SingI (LiftMaybeSym0 :: (~>) ((~>) a b) ((~>) (Maybe a) (Maybe b))) where
+      sing = (singFun2 @LiftMaybeSym0) sLiftMaybe
+    instance SingI d =>
+             SingI (LiftMaybeSym1 (d :: (~>) a b) :: (~>) (Maybe a) (Maybe b)) where
+      sing
+        = (singFun1 @(LiftMaybeSym1 (d :: (~>) a b)))
+            (sLiftMaybe (sing @d))
+    instance SingI (MapSym0 :: (~>) ((~>) a b) ((~>) [a] [b])) where
+      sing = (singFun2 @MapSym0) sMap
+    instance SingI d =>
+             SingI (MapSym1 (d :: (~>) a b) :: (~>) [a] [b]) where
+      sing = (singFun1 @(MapSym1 (d :: (~>) a b))) (sMap (sing @d))
+    data SEither :: forall a b. Either a b -> GHC.Types.Type
+      where
+        SLeft :: forall a (n :: a). (Sing (n :: a)) -> SEither (Left n)
+        SRight :: forall b (n :: b). (Sing (n :: b)) -> SEither (Right n)
+    type instance Sing @(Either a b) = SEither
+    instance (SingKind a, SingKind b) => SingKind (Either a b) where
+      type Demote (Either a b) = Either (Demote a) (Demote b)
+      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) }
+      toSing (Right (b :: Demote b))
+        = case toSing b :: SomeSing b of {
+            SomeSing c -> SomeSing (SRight c) }
+    instance SingI n => SingI (Left (n :: a)) where
+      sing = SLeft sing
+    instance SingI (LeftSym0 :: (~>) a (Either a b)) where
+      sing = (singFun1 @LeftSym0) SLeft
+    instance SingI n => SingI (Right (n :: b)) where
+      sing = SRight sing
+    instance SingI (RightSym0 :: (~>) b (Either a b)) where
+      sing = (singFun1 @RightSym0) SRight
diff --git a/tests/compile-and-dump/Singletons/LambdaCase.ghc86.template b/tests/compile-and-dump/Singletons/LambdaCase.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/LambdaCase.ghc86.template
+++ /dev/null
@@ -1,252 +0,0 @@
-Singletons/LambdaCase.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| foo1 :: a -> Maybe a -> a
-          foo1 d x
-            = (\case
-                 Just y -> y
-                 Nothing -> d)
-                x
-          foo2 :: a -> Maybe a -> a
-          foo2 d _
-            = (\case
-                 Just y -> y
-                 Nothing -> d)
-                (Just d)
-          foo3 :: a -> b -> a
-          foo3 a b = (\case (p, _) -> p) (a, b) |]
-  ======>
-    foo1 :: a -> Maybe a -> a
-    foo1 d x
-      = (\case
-           Just y -> y
-           Nothing -> d)
-          x
-    foo2 :: a -> Maybe a -> a
-    foo2 d _
-      = (\case
-           Just y -> y
-           Nothing -> d)
-          (Just d)
-    foo3 :: a -> b -> a
-    foo3 a b = (\case (p, _) -> p) (a, b)
-    type family Case_0123456789876543210 a b x_0123456789876543210 t where
-      Case_0123456789876543210 a b x_0123456789876543210 '(p, _) = p
-    type family Lambda_0123456789876543210 a b t where
-      Lambda_0123456789876543210 a b x_0123456789876543210 = Case_0123456789876543210 a b x_0123456789876543210 x_0123456789876543210
-    type Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 b0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                              b0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 b0123456789876543210 a0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 b0123456789876543210 a0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                              b0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) arg) (Lambda_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 a0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 a0123456789876543210 = Lambda_0123456789876543210Sym1 a0123456789876543210
-    type family Case_0123456789876543210 d x_0123456789876543210 t where
-      Case_0123456789876543210 d x_0123456789876543210 ( 'Just y) = y
-      Case_0123456789876543210 d x_0123456789876543210  'Nothing = d
-    type family Lambda_0123456789876543210 d t where
-      Lambda_0123456789876543210 d x_0123456789876543210 = Case_0123456789876543210 d x_0123456789876543210 x_0123456789876543210
-    type Lambda_0123456789876543210Sym2 d0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 d0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 d0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 d0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall d0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 d0123456789876543210) arg) (Lambda_0123456789876543210Sym2 d0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 d0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 d0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 d0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 d0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall d0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 d0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 d0123456789876543210 = Lambda_0123456789876543210Sym1 d0123456789876543210
-    type family Case_0123456789876543210 d x x_0123456789876543210 t where
-      Case_0123456789876543210 d x x_0123456789876543210 ( 'Just y) = y
-      Case_0123456789876543210 d x x_0123456789876543210  'Nothing = d
-    type family Lambda_0123456789876543210 d x t where
-      Lambda_0123456789876543210 d x x_0123456789876543210 = Case_0123456789876543210 d x x_0123456789876543210 x_0123456789876543210
-    type Lambda_0123456789876543210Sym3 d0123456789876543210 x0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 d0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 x0123456789876543210 d0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall d0123456789876543210
-                                                              x0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym3 d0123456789876543210 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 d0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 d0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 d0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 d0123456789876543210 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall d0123456789876543210
-                                                              x0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 d0123456789876543210) arg) (Lambda_0123456789876543210Sym2 d0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 d0123456789876543210 x0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 d0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 d0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall d0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 d0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 d0123456789876543210 = Lambda_0123456789876543210Sym1 d0123456789876543210
-    type Foo3Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
-        Foo3 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo3Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo3Sym1KindInference) ())
-    data Foo3Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                    (~>) b0123456789876543210 a0123456789876543210
-      where
-        Foo3Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo3Sym1 a0123456789876543210) arg) (Foo3Sym2 a0123456789876543210 arg) =>
-                                 Foo3Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo3Sym1 a0123456789876543210) a0123456789876543210 = Foo3 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo3Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ())
-    data Foo3Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
-      where
-        Foo3Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>
-                                 Foo3Sym0 a0123456789876543210
-    type instance Apply Foo3Sym0 a0123456789876543210 = Foo3Sym1 a0123456789876543210
-    type Foo2Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) =
-        Foo2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo2Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo2Sym1KindInference) ())
-    data Foo2Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) (Maybe a0123456789876543210) a0123456789876543210
-      where
-        Foo2Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo2Sym1 a0123456789876543210) arg) (Foo2Sym2 a0123456789876543210 arg) =>
-                                 Foo2Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo2Sym1 a0123456789876543210) a0123456789876543210 = Foo2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo2Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ())
-    data Foo2Sym0 :: forall a0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) a0123456789876543210)
-      where
-        Foo2Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) =>
-                                 Foo2Sym0 a0123456789876543210
-    type instance Apply Foo2Sym0 a0123456789876543210 = Foo2Sym1 a0123456789876543210
-    type Foo1Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) =
-        Foo1 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo1Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo1Sym1KindInference) ())
-    data Foo1Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) (Maybe a0123456789876543210) a0123456789876543210
-      where
-        Foo1Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo1Sym1 a0123456789876543210) arg) (Foo1Sym2 a0123456789876543210 arg) =>
-                                 Foo1Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo1Sym1 a0123456789876543210) a0123456789876543210 = Foo1 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo1Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ())
-    data Foo1Sym0 :: forall a0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) a0123456789876543210)
-      where
-        Foo1Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>
-                                 Foo1Sym0 a0123456789876543210
-    type instance Apply Foo1Sym0 a0123456789876543210 = Foo1Sym1 a0123456789876543210
-    type family Foo3 (a :: a) (a :: b) :: a where
-      Foo3 a b = Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) b) (Apply (Apply Tuple2Sym0 a) b)
-    type family Foo2 (a :: a) (a :: Maybe a) :: a where
-      Foo2 d _ = Apply (Apply Lambda_0123456789876543210Sym0 d) (Apply JustSym0 d)
-    type family Foo1 (a :: a) (a :: Maybe a) :: a where
-      Foo1 d x = Apply (Apply (Apply Lambda_0123456789876543210Sym0 d) x) x
-    sFoo3 ::
-      forall a b (t :: a) (t :: b).
-      Sing t -> Sing t -> Sing (Apply (Apply Foo3Sym0 t) t :: a)
-    sFoo2 ::
-      forall a (t :: a) (t :: Maybe a).
-      Sing t -> Sing t -> Sing (Apply (Apply Foo2Sym0 t) t :: a)
-    sFoo1 ::
-      forall a (t :: a) (t :: Maybe a).
-      Sing t -> Sing t -> Sing (Apply (Apply Foo1Sym0 t) t :: a)
-    sFoo3 (sA :: Sing a) (sB :: Sing b)
-      = (applySing
-           ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 a) b))
-              (\ sX_0123456789876543210
-                 -> case sX_0123456789876543210 of {
-                      (_ :: Sing x_0123456789876543210)
-                        -> (case sX_0123456789876543210 of {
-                              STuple2 (sP :: Sing p) _ -> sP }) ::
-                             Sing (Case_0123456789876543210 a b x_0123456789876543210 x_0123456789876543210) })))
-          ((applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sA)) sB)
-    sFoo2 (sD :: Sing d) _
-      = (applySing
-           ((singFun1 @(Apply Lambda_0123456789876543210Sym0 d))
-              (\ sX_0123456789876543210
-                 -> case sX_0123456789876543210 of {
-                      (_ :: Sing x_0123456789876543210)
-                        -> (case sX_0123456789876543210 of
-                              SJust (sY :: Sing y) -> sY
-                              SNothing -> sD) ::
-                             Sing (Case_0123456789876543210 d x_0123456789876543210 x_0123456789876543210) })))
-          ((applySing ((singFun1 @JustSym0) SJust)) sD)
-    sFoo1 (sD :: Sing d) (sX :: Sing x)
-      = (applySing
-           ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 d) x))
-              (\ sX_0123456789876543210
-                 -> case sX_0123456789876543210 of {
-                      (_ :: Sing x_0123456789876543210)
-                        -> (case sX_0123456789876543210 of
-                              SJust (sY :: Sing y) -> sY
-                              SNothing -> sD) ::
-                             Sing (Case_0123456789876543210 d x x_0123456789876543210 x_0123456789876543210) })))
-          sX
-    instance SingI (Foo3Sym0 :: (~>) a ((~>) b a)) where
-      sing = (singFun2 @Foo3Sym0) sFoo3
-    instance SingI d => SingI (Foo3Sym1 (d :: a) :: (~>) b a) where
-      sing = (singFun1 @(Foo3Sym1 (d :: a))) (sFoo3 (sing @d))
-    instance SingI (Foo2Sym0 :: (~>) a ((~>) (Maybe a) a)) where
-      sing = (singFun2 @Foo2Sym0) sFoo2
-    instance SingI d =>
-             SingI (Foo2Sym1 (d :: a) :: (~>) (Maybe a) a) where
-      sing = (singFun1 @(Foo2Sym1 (d :: a))) (sFoo2 (sing @d))
-    instance SingI (Foo1Sym0 :: (~>) a ((~>) (Maybe a) a)) where
-      sing = (singFun2 @Foo1Sym0) sFoo1
-    instance SingI d =>
-             SingI (Foo1Sym1 (d :: a) :: (~>) (Maybe a) a) where
-      sing = (singFun1 @(Foo1Sym1 (d :: a))) (sFoo1 (sing @d))
diff --git a/tests/compile-and-dump/Singletons/LambdaCase.ghc88.template b/tests/compile-and-dump/Singletons/LambdaCase.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/LambdaCase.ghc88.template
@@ -0,0 +1,255 @@
+Singletons/LambdaCase.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| foo1 :: a -> Maybe a -> a
+          foo1 d x
+            = (\case
+                 Just y -> y
+                 Nothing -> d)
+                x
+          foo2 :: a -> Maybe a -> a
+          foo2 d _
+            = (\case
+                 Just y -> y
+                 Nothing -> d)
+                (Just d)
+          foo3 :: a -> b -> a
+          foo3 a b = (\case (p, _) -> p) (a, b) |]
+  ======>
+    foo1 :: a -> Maybe a -> a
+    foo1 d x
+      = (\case
+           Just y -> y
+           Nothing -> d)
+          x
+    foo2 :: a -> Maybe a -> a
+    foo2 d _
+      = (\case
+           Just y -> y
+           Nothing -> d)
+          (Just d)
+    foo3 :: a -> b -> a
+    foo3 a b = (\case (p, _) -> p) (a, b)
+    type family Case_0123456789876543210 x_0123456789876543210 a b t where
+      Case_0123456789876543210 x_0123456789876543210 a b '(p, _) = p
+    type family Lambda_0123456789876543210 a b t where
+      Lambda_0123456789876543210 a b x_0123456789876543210 = Case_0123456789876543210 x_0123456789876543210 a b x_0123456789876543210
+    type Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 b0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                              b0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 b0123456789876543210 a0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 b0123456789876543210 a0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                              b0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) arg) (Lambda_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 a0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 a0123456789876543210 = Lambda_0123456789876543210Sym1 a0123456789876543210
+    type family Case_0123456789876543210 x_0123456789876543210 d t where
+      Case_0123456789876543210 x_0123456789876543210 d ('Just y) = y
+      Case_0123456789876543210 x_0123456789876543210 d 'Nothing = d
+    type family Lambda_0123456789876543210 d t where
+      Lambda_0123456789876543210 d x_0123456789876543210 = Case_0123456789876543210 x_0123456789876543210 d x_0123456789876543210
+    type Lambda_0123456789876543210Sym2 d0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 d0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 d0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 d0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall d0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 d0123456789876543210) arg) (Lambda_0123456789876543210Sym2 d0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 d0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 d0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 d0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 d0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall d0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 d0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 d0123456789876543210 = Lambda_0123456789876543210Sym1 d0123456789876543210
+    type family Case_0123456789876543210 x_0123456789876543210 d x t where
+      Case_0123456789876543210 x_0123456789876543210 d x ('Just y) = y
+      Case_0123456789876543210 x_0123456789876543210 d x 'Nothing = d
+    type family Lambda_0123456789876543210 d x t where
+      Lambda_0123456789876543210 d x x_0123456789876543210 = Case_0123456789876543210 x_0123456789876543210 d x x_0123456789876543210
+    type Lambda_0123456789876543210Sym3 d0123456789876543210 x0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 d0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 x0123456789876543210 d0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall d0123456789876543210
+                                                              x0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym3 d0123456789876543210 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 d0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 d0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 d0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 d0123456789876543210 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall d0123456789876543210
+                                                              x0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 d0123456789876543210) arg) (Lambda_0123456789876543210Sym2 d0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 d0123456789876543210 x0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 d0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 d0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall d0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 d0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 d0123456789876543210 = Lambda_0123456789876543210Sym1 d0123456789876543210
+    type Foo3Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
+        Foo3 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo3Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo3Sym1KindInference) ())
+    data Foo3Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                    (~>) b0123456789876543210 a0123456789876543210
+      where
+        Foo3Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo3Sym1 a0123456789876543210) arg) (Foo3Sym2 a0123456789876543210 arg) =>
+                                 Foo3Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo3Sym1 a0123456789876543210) a0123456789876543210 = Foo3 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo3Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ())
+    data Foo3Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
+      where
+        Foo3Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>
+                                 Foo3Sym0 a0123456789876543210
+    type instance Apply Foo3Sym0 a0123456789876543210 = Foo3Sym1 a0123456789876543210
+    type Foo2Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) =
+        Foo2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo2Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo2Sym1KindInference) ())
+    data Foo2Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) (Maybe a0123456789876543210) a0123456789876543210
+      where
+        Foo2Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo2Sym1 a0123456789876543210) arg) (Foo2Sym2 a0123456789876543210 arg) =>
+                                 Foo2Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo2Sym1 a0123456789876543210) a0123456789876543210 = Foo2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo2Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ())
+    data Foo2Sym0 :: forall a0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) a0123456789876543210)
+      where
+        Foo2Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) =>
+                                 Foo2Sym0 a0123456789876543210
+    type instance Apply Foo2Sym0 a0123456789876543210 = Foo2Sym1 a0123456789876543210
+    type Foo1Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) =
+        Foo1 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo1Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo1Sym1KindInference) ())
+    data Foo1Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) (Maybe a0123456789876543210) a0123456789876543210
+      where
+        Foo1Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo1Sym1 a0123456789876543210) arg) (Foo1Sym2 a0123456789876543210 arg) =>
+                                 Foo1Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo1Sym1 a0123456789876543210) a0123456789876543210 = Foo1 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo1Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ())
+    data Foo1Sym0 :: forall a0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) a0123456789876543210)
+      where
+        Foo1Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>
+                                 Foo1Sym0 a0123456789876543210
+    type instance Apply Foo1Sym0 a0123456789876543210 = Foo1Sym1 a0123456789876543210
+    type family Foo3 (a :: a) (a :: b) :: a where
+      Foo3 a b = Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) b) (Apply (Apply Tuple2Sym0 a) b)
+    type family Foo2 (a :: a) (a :: Maybe a) :: a where
+      Foo2 d _ = Apply (Apply Lambda_0123456789876543210Sym0 d) (Apply JustSym0 d)
+    type family Foo1 (a :: a) (a :: Maybe a) :: a where
+      Foo1 d x = Apply (Apply (Apply Lambda_0123456789876543210Sym0 d) x) x
+    sFoo3 ::
+      forall a b (t :: a) (t :: b).
+      Sing t -> Sing t -> Sing (Apply (Apply Foo3Sym0 t) t :: a)
+    sFoo2 ::
+      forall a (t :: a) (t :: Maybe a).
+      Sing t -> Sing t -> Sing (Apply (Apply Foo2Sym0 t) t :: a)
+    sFoo1 ::
+      forall a (t :: a) (t :: Maybe a).
+      Sing t -> Sing t -> Sing (Apply (Apply Foo1Sym0 t) t :: a)
+    sFoo3 (sA :: Sing a) (sB :: Sing b)
+      = (applySing
+           ((singFun1 @(Apply (Apply 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 }) })))
+          ((applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sA)) sB)
+    sFoo2 (sD :: Sing d) _
+      = (applySing
+           ((singFun1 @(Apply 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) })))
+          ((applySing ((singFun1 @JustSym0) SJust)) sD)
+    sFoo1 (sD :: Sing d) (sX :: Sing x)
+      = (applySing
+           ((singFun1 @(Apply (Apply 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) })))
+          sX
+    instance SingI (Foo3Sym0 :: (~>) a ((~>) b a)) where
+      sing = (singFun2 @Foo3Sym0) sFoo3
+    instance SingI d => SingI (Foo3Sym1 (d :: a) :: (~>) b a) where
+      sing = (singFun1 @(Foo3Sym1 (d :: a))) (sFoo3 (sing @d))
+    instance SingI (Foo2Sym0 :: (~>) a ((~>) (Maybe a) a)) where
+      sing = (singFun2 @Foo2Sym0) sFoo2
+    instance SingI d =>
+             SingI (Foo2Sym1 (d :: a) :: (~>) (Maybe a) a) where
+      sing = (singFun1 @(Foo2Sym1 (d :: a))) (sFoo2 (sing @d))
+    instance SingI (Foo1Sym0 :: (~>) a ((~>) (Maybe a) a)) where
+      sing = (singFun2 @Foo1Sym0) sFoo1
+    instance SingI d =>
+             SingI (Foo1Sym1 (d :: a) :: (~>) (Maybe a) a) where
+      sing = (singFun1 @(Foo1Sym1 (d :: a))) (sFoo1 (sing @d))
diff --git a/tests/compile-and-dump/Singletons/Lambdas.ghc86.template b/tests/compile-and-dump/Singletons/Lambdas.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/Lambdas.ghc86.template
+++ /dev/null
@@ -1,830 +0,0 @@
-Singletons/Lambdas.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| foo0 :: a -> b -> a
-          foo0 = (\ x y -> x)
-          foo1 :: a -> b -> a
-          foo1 x = (\ _ -> x)
-          foo2 :: a -> b -> a
-          foo2 x y = (\ _ -> x) y
-          foo3 :: a -> a
-          foo3 x = (\ y -> y) x
-          foo4 :: a -> b -> c -> a
-          foo4 x y z = (\ _ _ -> x) y z
-          foo5 :: a -> b -> b
-          foo5 x y = (\ x -> x) y
-          foo6 :: a -> b -> a
-          foo6 a b = (\ x -> \ _ -> x) a b
-          foo7 :: a -> b -> b
-          foo7 x y = (\ (_, b) -> b) (x, y)
-          foo8 :: Foo a b -> a
-          foo8 x = (\ (Foo a _) -> a) x
-          
-          data Foo a b = Foo a b |]
-  ======>
-    foo0 :: a -> b -> a
-    foo0 = \ x y -> x
-    foo1 :: a -> b -> a
-    foo1 x = \ _ -> x
-    foo2 :: a -> b -> a
-    foo2 x y = (\ _ -> x) y
-    foo3 :: a -> a
-    foo3 x = (\ y -> y) x
-    foo4 :: a -> b -> c -> a
-    foo4 x y z = ((\ _ _ -> x) y) z
-    foo5 :: a -> b -> b
-    foo5 x y = (\ x -> x) y
-    foo6 :: a -> b -> a
-    foo6 a b = ((\ x -> \ _ -> x) a) b
-    foo7 :: a -> b -> b
-    foo7 x y = (\ (_, b) -> b) (x, y)
-    data Foo a b = Foo a b
-    foo8 :: Foo a b -> a
-    foo8 x = (\ (Foo a _) -> a) x
-    type FooSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) =
-        Foo t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (FooSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) FooSym1KindInference) ())
-    data FooSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                   (~>) b0123456789876543210 (Foo a0123456789876543210 b0123456789876543210)
-      where
-        FooSym1KindInference :: forall t0123456789876543210
-                                       t0123456789876543210
-                                       arg. SameKind (Apply (FooSym1 t0123456789876543210) arg) (FooSym2 t0123456789876543210 arg) =>
-                                FooSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (FooSym1 t0123456789876543210) t0123456789876543210 = Foo t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings FooSym0 where
-      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
-    data FooSym0 :: forall a0123456789876543210 b0123456789876543210.
-                    (~>) a0123456789876543210 ((~>) b0123456789876543210 (Foo a0123456789876543210 b0123456789876543210))
-      where
-        FooSym0KindInference :: forall t0123456789876543210
-                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
-                                FooSym0 t0123456789876543210
-    type instance Apply FooSym0 t0123456789876543210 = FooSym1 t0123456789876543210
-    type family Case_0123456789876543210 x arg_0123456789876543210 t where
-      Case_0123456789876543210 x arg_0123456789876543210 (Foo a _) = a
-    type family Lambda_0123456789876543210 x t where
-      Lambda_0123456789876543210 x arg_0123456789876543210 = Case_0123456789876543210 x arg_0123456789876543210 arg_0123456789876543210
-    type Lambda_0123456789876543210Sym2 x0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
-    type family Case_0123456789876543210 x y arg_0123456789876543210 t where
-      Case_0123456789876543210 x y arg_0123456789876543210 '(_, b) = b
-    type family Lambda_0123456789876543210 x y t where
-      Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210
-    type Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
-    type family Case_0123456789876543210 a b x arg_0123456789876543210 t where
-      Case_0123456789876543210 a b x arg_0123456789876543210 _ = x
-    type family Lambda_0123456789876543210 a b x t where
-      Lambda_0123456789876543210 a b x arg_0123456789876543210 = Case_0123456789876543210 a b x arg_0123456789876543210 arg_0123456789876543210
-    type Lambda_0123456789876543210Sym4 a0123456789876543210 b0123456789876543210 x0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 x0123456789876543210 b0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 x0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall a0123456789876543210
-                                                              b0123456789876543210
-                                                              x0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym4 a0123456789876543210 b0123456789876543210 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 x0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 b0123456789876543210 a0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 b0123456789876543210 a0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 b0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                              b0123456789876543210
-                                                              x0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 x0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 b0123456789876543210 a0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym3 b0123456789876543210 a0123456789876543210 x0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                              b0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) arg) (Lambda_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 a0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 a0123456789876543210 = Lambda_0123456789876543210Sym1 a0123456789876543210
-    type family Lambda_0123456789876543210 a b t where
-      Lambda_0123456789876543210 a b x = Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) b) x
-    type Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 b0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                              b0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 b0123456789876543210 a0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 b0123456789876543210 a0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                              b0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) arg) (Lambda_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 a0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 a0123456789876543210 = Lambda_0123456789876543210Sym1 a0123456789876543210
-    type family Lambda_0123456789876543210 x y t where
-      Lambda_0123456789876543210 x y x = x
-    type Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
-    type family Case_0123456789876543210 x y z arg_0123456789876543210 arg_0123456789876543210 t where
-      Case_0123456789876543210 x y z arg_0123456789876543210 arg_0123456789876543210 '(_,
-                                                                                       _) = x
-    type family Lambda_0123456789876543210 x y z t t where
-      Lambda_0123456789876543210 x y z arg_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 x y z arg_0123456789876543210 arg_0123456789876543210 (Apply (Apply Tuple2Sym0 arg_0123456789876543210) arg_0123456789876543210)
-    type Lambda_0123456789876543210Sym5 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 t0123456789876543210 z0123456789876543210 y0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
-    data Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym4KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              z0123456789876543210
-                                                              t0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym5 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym4 t0123456789876543210 z0123456789876543210 y0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 z0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 z0123456789876543210 y0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              z0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 z0123456789876543210) arg) (Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 z0123456789876543210 y0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym4 z0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 z0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              z0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 z0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) z0123456789876543210 = Lambda_0123456789876543210Sym3 y0123456789876543210 x0123456789876543210 z0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
-    type family Lambda_0123456789876543210 x t where
-      Lambda_0123456789876543210 x y = y
-    type Lambda_0123456789876543210Sym2 x0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
-    type family Case_0123456789876543210 x y arg_0123456789876543210 t where
-      Case_0123456789876543210 x y arg_0123456789876543210 _ = x
-    type family Lambda_0123456789876543210 x y t where
-      Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210
-    type Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
-    type family Case_0123456789876543210 x arg_0123456789876543210 a_0123456789876543210 t where
-      Case_0123456789876543210 x arg_0123456789876543210 a_0123456789876543210 _ = x
-    type family Lambda_0123456789876543210 x a_0123456789876543210 t where
-      Lambda_0123456789876543210 x a_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 x arg_0123456789876543210 a_0123456789876543210 arg_0123456789876543210
-    type Lambda_0123456789876543210Sym3 x0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
-    type family Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t t where
-      Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 x y = x
-    type Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall a_01234567898765432100123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210
-    type Foo8Sym1 (a0123456789876543210 :: Foo a0123456789876543210 b0123456789876543210) =
-        Foo8 a0123456789876543210
-    instance SuppressUnusedWarnings Foo8Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo8Sym0KindInference) ())
-    data Foo8Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) (Foo a0123456789876543210 b0123456789876543210) a0123456789876543210
-      where
-        Foo8Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo8Sym0 arg) (Foo8Sym1 arg) =>
-                                 Foo8Sym0 a0123456789876543210
-    type instance Apply Foo8Sym0 a0123456789876543210 = Foo8 a0123456789876543210
-    type Foo7Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
-        Foo7 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo7Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo7Sym1KindInference) ())
-    data Foo7Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                    (~>) b0123456789876543210 b0123456789876543210
-      where
-        Foo7Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo7Sym1 a0123456789876543210) arg) (Foo7Sym2 a0123456789876543210 arg) =>
-                                 Foo7Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo7Sym1 a0123456789876543210) a0123456789876543210 = Foo7 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo7Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo7Sym0KindInference) ())
-    data Foo7Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
-      where
-        Foo7Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo7Sym0 arg) (Foo7Sym1 arg) =>
-                                 Foo7Sym0 a0123456789876543210
-    type instance Apply Foo7Sym0 a0123456789876543210 = Foo7Sym1 a0123456789876543210
-    type Foo6Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
-        Foo6 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo6Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo6Sym1KindInference) ())
-    data Foo6Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                    (~>) b0123456789876543210 a0123456789876543210
-      where
-        Foo6Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo6Sym1 a0123456789876543210) arg) (Foo6Sym2 a0123456789876543210 arg) =>
-                                 Foo6Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo6Sym1 a0123456789876543210) a0123456789876543210 = Foo6 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo6Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo6Sym0KindInference) ())
-    data Foo6Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
-      where
-        Foo6Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo6Sym0 arg) (Foo6Sym1 arg) =>
-                                 Foo6Sym0 a0123456789876543210
-    type instance Apply Foo6Sym0 a0123456789876543210 = Foo6Sym1 a0123456789876543210
-    type Foo5Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
-        Foo5 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo5Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo5Sym1KindInference) ())
-    data Foo5Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                    (~>) b0123456789876543210 b0123456789876543210
-      where
-        Foo5Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo5Sym1 a0123456789876543210) arg) (Foo5Sym2 a0123456789876543210 arg) =>
-                                 Foo5Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo5Sym1 a0123456789876543210) a0123456789876543210 = Foo5 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo5Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ())
-    data Foo5Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
-      where
-        Foo5Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) =>
-                                 Foo5Sym0 a0123456789876543210
-    type instance Apply Foo5Sym0 a0123456789876543210 = Foo5Sym1 a0123456789876543210
-    type Foo4Sym3 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) (a0123456789876543210 :: c0123456789876543210) =
-        Foo4 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo4Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo4Sym2KindInference) ())
-    data Foo4Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210.
-                                                                                                                   (~>) c0123456789876543210 a0123456789876543210
-      where
-        Foo4Sym2KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo4Sym2 a0123456789876543210 a0123456789876543210) arg) (Foo4Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                 Foo4Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo4Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = Foo4 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo4Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo4Sym1KindInference) ())
-    data Foo4Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
-                                                                           c0123456789876543210.
-                                                                    (~>) b0123456789876543210 ((~>) c0123456789876543210 a0123456789876543210)
-      where
-        Foo4Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo4Sym1 a0123456789876543210) arg) (Foo4Sym2 a0123456789876543210 arg) =>
-                                 Foo4Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo4Sym1 a0123456789876543210) a0123456789876543210 = Foo4Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo4Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ())
-    data Foo4Sym0 :: forall a0123456789876543210
-                            b0123456789876543210
-                            c0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 a0123456789876543210))
-      where
-        Foo4Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) =>
-                                 Foo4Sym0 a0123456789876543210
-    type instance Apply Foo4Sym0 a0123456789876543210 = Foo4Sym1 a0123456789876543210
-    type Foo3Sym1 (a0123456789876543210 :: a0123456789876543210) =
-        Foo3 a0123456789876543210
-    instance SuppressUnusedWarnings Foo3Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ())
-    data Foo3Sym0 :: forall a0123456789876543210.
-                     (~>) a0123456789876543210 a0123456789876543210
-      where
-        Foo3Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>
-                                 Foo3Sym0 a0123456789876543210
-    type instance Apply Foo3Sym0 a0123456789876543210 = Foo3 a0123456789876543210
-    type Foo2Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
-        Foo2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo2Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo2Sym1KindInference) ())
-    data Foo2Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                    (~>) b0123456789876543210 a0123456789876543210
-      where
-        Foo2Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo2Sym1 a0123456789876543210) arg) (Foo2Sym2 a0123456789876543210 arg) =>
-                                 Foo2Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo2Sym1 a0123456789876543210) a0123456789876543210 = Foo2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo2Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ())
-    data Foo2Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
-      where
-        Foo2Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) =>
-                                 Foo2Sym0 a0123456789876543210
-    type instance Apply Foo2Sym0 a0123456789876543210 = Foo2Sym1 a0123456789876543210
-    type Foo1Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
-        Foo1 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo1Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo1Sym1KindInference) ())
-    data Foo1Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                    (~>) b0123456789876543210 a0123456789876543210
-      where
-        Foo1Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo1Sym1 a0123456789876543210) arg) (Foo1Sym2 a0123456789876543210 arg) =>
-                                 Foo1Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo1Sym1 a0123456789876543210) a0123456789876543210 = Foo1 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo1Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ())
-    data Foo1Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
-      where
-        Foo1Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>
-                                 Foo1Sym0 a0123456789876543210
-    type instance Apply Foo1Sym0 a0123456789876543210 = Foo1Sym1 a0123456789876543210
-    type Foo0Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
-        Foo0 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo0Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo0Sym1KindInference) ())
-    data Foo0Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                    (~>) b0123456789876543210 a0123456789876543210
-      where
-        Foo0Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo0Sym1 a0123456789876543210) arg) (Foo0Sym2 a0123456789876543210 arg) =>
-                                 Foo0Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo0Sym1 a0123456789876543210) a0123456789876543210 = Foo0 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo0Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo0Sym0KindInference) ())
-    data Foo0Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
-      where
-        Foo0Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo0Sym0 arg) (Foo0Sym1 arg) =>
-                                 Foo0Sym0 a0123456789876543210
-    type instance Apply Foo0Sym0 a0123456789876543210 = Foo0Sym1 a0123456789876543210
-    type family Foo8 (a :: Foo a b) :: a where
-      Foo8 x = Apply (Apply Lambda_0123456789876543210Sym0 x) x
-    type family Foo7 (a :: a) (a :: b) :: b where
-      Foo7 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) (Apply (Apply Tuple2Sym0 x) y)
-    type family Foo6 (a :: a) (a :: b) :: a where
-      Foo6 a b = Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) b) a) b
-    type family Foo5 (a :: a) (a :: b) :: b where
-      Foo5 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) y
-    type family Foo4 (a :: a) (a :: b) (a :: c) :: a where
-      Foo4 x y z = Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) z) y) z
-    type family Foo3 (a :: a) :: a where
-      Foo3 x = Apply (Apply Lambda_0123456789876543210Sym0 x) x
-    type family Foo2 (a :: a) (a :: b) :: a where
-      Foo2 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) y
-    type family Foo1 (a :: a) (a :: b) :: a where
-      Foo1 x a_0123456789876543210 = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) a_0123456789876543210) a_0123456789876543210
-    type family Foo0 (a :: a) (a :: b) :: a where
-      Foo0 a_0123456789876543210 a_0123456789876543210 = Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210
-    sFoo8 ::
-      forall a b (t :: Foo a b). Sing t -> Sing (Apply Foo8Sym0 t :: a)
-    sFoo7 ::
-      forall a b (t :: a) (t :: b).
-      Sing t -> Sing t -> Sing (Apply (Apply Foo7Sym0 t) t :: b)
-    sFoo6 ::
-      forall a b (t :: a) (t :: b).
-      Sing t -> Sing t -> Sing (Apply (Apply Foo6Sym0 t) t :: a)
-    sFoo5 ::
-      forall a b (t :: a) (t :: b).
-      Sing t -> Sing t -> Sing (Apply (Apply Foo5Sym0 t) t :: b)
-    sFoo4 ::
-      forall a b c (t :: a) (t :: b) (t :: c).
-      Sing t
-      -> Sing t
-         -> Sing t -> Sing (Apply (Apply (Apply Foo4Sym0 t) t) t :: a)
-    sFoo3 :: forall a (t :: a). Sing t -> Sing (Apply Foo3Sym0 t :: a)
-    sFoo2 ::
-      forall a b (t :: a) (t :: b).
-      Sing t -> Sing t -> Sing (Apply (Apply Foo2Sym0 t) t :: a)
-    sFoo1 ::
-      forall a b (t :: a) (t :: b).
-      Sing t -> Sing t -> Sing (Apply (Apply Foo1Sym0 t) t :: a)
-    sFoo0 ::
-      forall a b (t :: a) (t :: b).
-      Sing t -> Sing t -> Sing (Apply (Apply Foo0Sym0 t) t :: a)
-    sFoo8 (sX :: Sing x)
-      = (applySing
-           ((singFun1 @(Apply Lambda_0123456789876543210Sym0 x))
-              (\ sArg_0123456789876543210
-                 -> case sArg_0123456789876543210 of {
-                      (_ :: Sing arg_0123456789876543210)
-                        -> (case sArg_0123456789876543210 of {
-                              SFoo (sA :: Sing a) _ -> sA }) ::
-                             Sing (Case_0123456789876543210 x arg_0123456789876543210 arg_0123456789876543210) })))
-          sX
-    sFoo7 (sX :: Sing x) (sY :: Sing y)
-      = (applySing
-           ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 x) y))
-              (\ sArg_0123456789876543210
-                 -> case sArg_0123456789876543210 of {
-                      (_ :: Sing arg_0123456789876543210)
-                        -> (case sArg_0123456789876543210 of {
-                              STuple2 _ (sB :: Sing b) -> sB }) ::
-                             Sing (Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210) })))
-          ((applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sX)) sY)
-    sFoo6 (sA :: Sing a) (sB :: Sing b)
-      = (applySing
-           ((applySing
-               ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 a) b))
-                  (\ sX
-                     -> case sX of {
-                          (_ :: Sing x)
-                            -> (singFun1
-                                  @(Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) b) x))
-                                 (\ sArg_0123456789876543210
-                                    -> case sArg_0123456789876543210 of {
-                                         (_ :: Sing arg_0123456789876543210)
-                                           -> (case sArg_0123456789876543210 of { _ -> sX }) ::
-                                                Sing (Case_0123456789876543210 a b x arg_0123456789876543210 arg_0123456789876543210) }) })))
-              sA))
-          sB
-    sFoo5 (sX :: Sing x) (sY :: Sing y)
-      = (applySing
-           ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 x) y))
-              (\ sX -> case sX of { (_ :: Sing x) -> sX })))
-          sY
-    sFoo4 (sX :: Sing x) (sY :: Sing y) (sZ :: Sing z)
-      = (applySing
-           ((applySing
-               ((singFun2
-                   @(Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) z))
-                  (\ sArg_0123456789876543210 sArg_0123456789876543210
-                     -> case
-                            ((,) sArg_0123456789876543210) sArg_0123456789876543210
-                        of {
-                          (,) (_ :: Sing arg_0123456789876543210)
-                              (_ :: Sing arg_0123456789876543210)
-                            -> (case
-                                    (applySing
-                                       ((applySing ((singFun2 @Tuple2Sym0) STuple2))
-                                          sArg_0123456789876543210))
-                                      sArg_0123456789876543210
-                                of {
-                                  STuple2 _ _ -> sX }) ::
-                                 Sing (Case_0123456789876543210 x y z arg_0123456789876543210 arg_0123456789876543210 (Apply (Apply Tuple2Sym0 arg_0123456789876543210) arg_0123456789876543210)) })))
-              sY))
-          sZ
-    sFoo3 (sX :: Sing x)
-      = (applySing
-           ((singFun1 @(Apply Lambda_0123456789876543210Sym0 x))
-              (\ sY -> case sY of { (_ :: Sing y) -> sY })))
-          sX
-    sFoo2 (sX :: Sing x) (sY :: Sing y)
-      = (applySing
-           ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 x) y))
-              (\ sArg_0123456789876543210
-                 -> case sArg_0123456789876543210 of {
-                      (_ :: Sing arg_0123456789876543210)
-                        -> (case sArg_0123456789876543210 of { _ -> sX }) ::
-                             Sing (Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210) })))
-          sY
-    sFoo1
-      (sX :: Sing x)
-      (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      = (applySing
-           ((singFun1
-               @(Apply (Apply Lambda_0123456789876543210Sym0 x) a_0123456789876543210))
-              (\ sArg_0123456789876543210
-                 -> case sArg_0123456789876543210 of {
-                      (_ :: Sing arg_0123456789876543210)
-                        -> (case sArg_0123456789876543210 of { _ -> sX }) ::
-                             Sing (Case_0123456789876543210 x arg_0123456789876543210 a_0123456789876543210 arg_0123456789876543210) })))
-          sA_0123456789876543210
-    sFoo0
-      (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      = (applySing
-           ((applySing
-               ((singFun2
-                   @(Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210))
-                  (\ sX sY
-                     -> case ((,) sX) sY of { (,) (_ :: Sing x) (_ :: Sing y) -> sX })))
-              sA_0123456789876543210))
-          sA_0123456789876543210
-    instance SingI (Foo8Sym0 :: (~>) (Foo a b) a) where
-      sing = (singFun1 @Foo8Sym0) sFoo8
-    instance SingI (Foo7Sym0 :: (~>) a ((~>) b b)) where
-      sing = (singFun2 @Foo7Sym0) sFoo7
-    instance SingI d => SingI (Foo7Sym1 (d :: a) :: (~>) b b) where
-      sing = (singFun1 @(Foo7Sym1 (d :: a))) (sFoo7 (sing @d))
-    instance SingI (Foo6Sym0 :: (~>) a ((~>) b a)) where
-      sing = (singFun2 @Foo6Sym0) sFoo6
-    instance SingI d => SingI (Foo6Sym1 (d :: a) :: (~>) b a) where
-      sing = (singFun1 @(Foo6Sym1 (d :: a))) (sFoo6 (sing @d))
-    instance SingI (Foo5Sym0 :: (~>) a ((~>) b b)) where
-      sing = (singFun2 @Foo5Sym0) sFoo5
-    instance SingI d => SingI (Foo5Sym1 (d :: a) :: (~>) b b) where
-      sing = (singFun1 @(Foo5Sym1 (d :: a))) (sFoo5 (sing @d))
-    instance SingI (Foo4Sym0 :: (~>) a ((~>) b ((~>) c a))) where
-      sing = (singFun3 @Foo4Sym0) sFoo4
-    instance SingI d =>
-             SingI (Foo4Sym1 (d :: a) :: (~>) b ((~>) c a)) where
-      sing = (singFun2 @(Foo4Sym1 (d :: a))) (sFoo4 (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (Foo4Sym2 (d :: a) (d :: b) :: (~>) c a) where
-      sing
-        = (singFun1 @(Foo4Sym2 (d :: a) (d :: b)))
-            ((sFoo4 (sing @d)) (sing @d))
-    instance SingI (Foo3Sym0 :: (~>) a a) where
-      sing = (singFun1 @Foo3Sym0) sFoo3
-    instance SingI (Foo2Sym0 :: (~>) a ((~>) b a)) where
-      sing = (singFun2 @Foo2Sym0) sFoo2
-    instance SingI d => SingI (Foo2Sym1 (d :: a) :: (~>) b a) where
-      sing = (singFun1 @(Foo2Sym1 (d :: a))) (sFoo2 (sing @d))
-    instance SingI (Foo1Sym0 :: (~>) a ((~>) b a)) where
-      sing = (singFun2 @Foo1Sym0) sFoo1
-    instance SingI d => SingI (Foo1Sym1 (d :: a) :: (~>) b a) where
-      sing = (singFun1 @(Foo1Sym1 (d :: a))) (sFoo1 (sing @d))
-    instance SingI (Foo0Sym0 :: (~>) a ((~>) b a)) where
-      sing = (singFun2 @Foo0Sym0) sFoo0
-    instance SingI d => SingI (Foo0Sym1 (d :: a) :: (~>) b a) where
-      sing = (singFun1 @(Foo0Sym1 (d :: a))) (sFoo0 (sing @d))
-    data instance Sing :: Foo a b -> GHC.Types.Type
-      where
-        SFoo :: forall a b (n :: a) (n :: b).
-                (Sing (n :: a)) -> (Sing (n :: b)) -> Sing (Foo n n)
-    type SFoo = (Sing :: Foo a b -> GHC.Types.Type)
-    instance (SingKind a, SingKind b) => SingKind (Foo a b) where
-      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) }
-    instance (SingI n, SingI n) => SingI (Foo (n :: a) (n :: b)) where
-      sing = (SFoo sing) sing
-    instance SingI (FooSym0 :: (~>) a ((~>) b (Foo a b))) where
-      sing = (singFun2 @FooSym0) SFoo
-    instance SingI (TyCon2 Foo :: (~>) a ((~>) b (Foo a b))) where
-      sing = (singFun2 @(TyCon2 Foo)) SFoo
-    instance SingI d =>
-             SingI (FooSym1 (d :: a) :: (~>) b (Foo a b)) where
-      sing = (singFun1 @(FooSym1 (d :: a))) (SFoo (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 (Foo (d :: a)) :: (~>) b (Foo a b)) where
-      sing = (singFun1 @(TyCon1 (Foo (d :: a)))) (SFoo (sing @d))
diff --git a/tests/compile-and-dump/Singletons/Lambdas.ghc88.template b/tests/compile-and-dump/Singletons/Lambdas.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/Lambdas.ghc88.template
@@ -0,0 +1,832 @@
+Singletons/Lambdas.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| foo0 :: a -> b -> a
+          foo0 = (\ x y -> x)
+          foo1 :: a -> b -> a
+          foo1 x = (\ _ -> x)
+          foo2 :: a -> b -> a
+          foo2 x y = (\ _ -> x) y
+          foo3 :: a -> a
+          foo3 x = (\ y -> y) x
+          foo4 :: a -> b -> c -> a
+          foo4 x y z = (\ _ _ -> x) y z
+          foo5 :: a -> b -> b
+          foo5 x y = (\ x -> x) y
+          foo6 :: a -> b -> a
+          foo6 a b = (\ x -> \ _ -> x) a b
+          foo7 :: a -> b -> b
+          foo7 x y = (\ (_, b) -> b) (x, y)
+          foo8 :: Foo a b -> a
+          foo8 x = (\ (Foo a _) -> a) x
+          
+          data Foo a b = Foo a b |]
+  ======>
+    foo0 :: a -> b -> a
+    foo0 = \ x y -> x
+    foo1 :: a -> b -> a
+    foo1 x = \ _ -> x
+    foo2 :: a -> b -> a
+    foo2 x y = (\ _ -> x) y
+    foo3 :: a -> a
+    foo3 x = (\ y -> y) x
+    foo4 :: a -> b -> c -> a
+    foo4 x y z = ((\ _ _ -> x) y) z
+    foo5 :: a -> b -> b
+    foo5 x y = (\ x -> x) y
+    foo6 :: a -> b -> a
+    foo6 a b = ((\ x -> \ _ -> x) a) b
+    foo7 :: a -> b -> b
+    foo7 x y = (\ (_, b) -> b) (x, y)
+    data Foo a b = Foo a b
+    foo8 :: Foo a b -> a
+    foo8 x = (\ (Foo a _) -> a) x
+    type FooSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) =
+        Foo t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (FooSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) FooSym1KindInference) ())
+    data FooSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                   (~>) b0123456789876543210 (Foo a0123456789876543210 b0123456789876543210)
+      where
+        FooSym1KindInference :: forall t0123456789876543210
+                                       t0123456789876543210
+                                       arg. SameKind (Apply (FooSym1 t0123456789876543210) arg) (FooSym2 t0123456789876543210 arg) =>
+                                FooSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (FooSym1 t0123456789876543210) t0123456789876543210 = Foo t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings FooSym0 where
+      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
+    data FooSym0 :: forall a0123456789876543210 b0123456789876543210.
+                    (~>) a0123456789876543210 ((~>) b0123456789876543210 (Foo a0123456789876543210 b0123456789876543210))
+      where
+        FooSym0KindInference :: forall t0123456789876543210
+                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
+                                FooSym0 t0123456789876543210
+    type instance Apply FooSym0 t0123456789876543210 = FooSym1 t0123456789876543210
+    type family Case_0123456789876543210 arg_0123456789876543210 x t where
+      Case_0123456789876543210 arg_0123456789876543210 x (Foo a _) = a
+    type family Lambda_0123456789876543210 x t where
+      Lambda_0123456789876543210 x arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x arg_0123456789876543210
+    type Lambda_0123456789876543210Sym2 x0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
+    type family Case_0123456789876543210 arg_0123456789876543210 x y t where
+      Case_0123456789876543210 arg_0123456789876543210 x y '(_, b) = b
+    type family Lambda_0123456789876543210 x y t where
+      Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x y arg_0123456789876543210
+    type Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
+                                                              y0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
+                                                              y0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
+    type family Case_0123456789876543210 arg_0123456789876543210 x a b t where
+      Case_0123456789876543210 arg_0123456789876543210 x a b _ = x
+    type family Lambda_0123456789876543210 x a b t where
+      Lambda_0123456789876543210 x a b arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x a b arg_0123456789876543210
+    type Lambda_0123456789876543210Sym4 x0123456789876543210 a0123456789876543210 b0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 x0123456789876543210 a0123456789876543210 b0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 b0123456789876543210 a0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 x0123456789876543210 a0123456789876543210 b0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall x0123456789876543210
+                                                              a0123456789876543210
+                                                              b0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym4 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 x0123456789876543210 a0123456789876543210 b0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 b0123456789876543210 a0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 b0123456789876543210 a0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 x0123456789876543210 a0123456789876543210 b0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
+                                                              a0123456789876543210
+                                                              b0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 a0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 a0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 a0123456789876543210 b0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 x0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210Sym3 a0123456789876543210 x0123456789876543210 b0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 x0123456789876543210 a0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
+                                                              a0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 a0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) a0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
+    type family Lambda_0123456789876543210 a b t where
+      Lambda_0123456789876543210 a b x = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) a) b
+    type Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 b0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                              b0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 b0123456789876543210 a0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 b0123456789876543210 a0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                              b0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) arg) (Lambda_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 a0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 a0123456789876543210 = Lambda_0123456789876543210Sym1 a0123456789876543210
+    type family Lambda_0123456789876543210 x y t where
+      Lambda_0123456789876543210 x y x = x
+    type Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
+                                                              y0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
+                                                              y0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
+    type family Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210 x y z t where
+      Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210 x y z '(_,
+                                                                                       _) = x
+    type family Lambda_0123456789876543210 x y z t t 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)
+    type Lambda_0123456789876543210Sym5 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 t0123456789876543210 z0123456789876543210 y0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
+    data Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym4KindInference :: forall x0123456789876543210
+                                                              y0123456789876543210
+                                                              z0123456789876543210
+                                                              t0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym5 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym4 t0123456789876543210 z0123456789876543210 y0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 z0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 z0123456789876543210 y0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall x0123456789876543210
+                                                              y0123456789876543210
+                                                              z0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 z0123456789876543210) arg) (Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 z0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 z0123456789876543210 y0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym4 z0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 z0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
+                                                              y0123456789876543210
+                                                              z0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 z0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) z0123456789876543210 = Lambda_0123456789876543210Sym3 y0123456789876543210 x0123456789876543210 z0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
+                                                              y0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
+    type family Lambda_0123456789876543210 x t where
+      Lambda_0123456789876543210 x y = y
+    type Lambda_0123456789876543210Sym2 x0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
+    type family Case_0123456789876543210 arg_0123456789876543210 x y t where
+      Case_0123456789876543210 arg_0123456789876543210 x y _ = x
+    type family Lambda_0123456789876543210 x y t where
+      Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x y arg_0123456789876543210
+    type Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
+                                                              y0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
+                                                              y0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
+    type family Case_0123456789876543210 arg_0123456789876543210 x a_0123456789876543210 t where
+      Case_0123456789876543210 arg_0123456789876543210 x a_0123456789876543210 _ = x
+    type family Lambda_0123456789876543210 x a_0123456789876543210 t where
+      Lambda_0123456789876543210 x a_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x a_0123456789876543210 arg_0123456789876543210
+    type Lambda_0123456789876543210Sym3 x0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
+    type family Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 t t where
+      Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 x y = x
+    type Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210) arg) (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall a_01234567898765432100123456789876543210
+                                                              a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210
+    type Foo8Sym1 (a0123456789876543210 :: Foo a0123456789876543210 b0123456789876543210) =
+        Foo8 a0123456789876543210
+    instance SuppressUnusedWarnings Foo8Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo8Sym0KindInference) ())
+    data Foo8Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) (Foo a0123456789876543210 b0123456789876543210) a0123456789876543210
+      where
+        Foo8Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo8Sym0 arg) (Foo8Sym1 arg) =>
+                                 Foo8Sym0 a0123456789876543210
+    type instance Apply Foo8Sym0 a0123456789876543210 = Foo8 a0123456789876543210
+    type Foo7Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
+        Foo7 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo7Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo7Sym1KindInference) ())
+    data Foo7Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                    (~>) b0123456789876543210 b0123456789876543210
+      where
+        Foo7Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo7Sym1 a0123456789876543210) arg) (Foo7Sym2 a0123456789876543210 arg) =>
+                                 Foo7Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo7Sym1 a0123456789876543210) a0123456789876543210 = Foo7 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo7Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo7Sym0KindInference) ())
+    data Foo7Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
+      where
+        Foo7Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo7Sym0 arg) (Foo7Sym1 arg) =>
+                                 Foo7Sym0 a0123456789876543210
+    type instance Apply Foo7Sym0 a0123456789876543210 = Foo7Sym1 a0123456789876543210
+    type Foo6Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
+        Foo6 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo6Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo6Sym1KindInference) ())
+    data Foo6Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                    (~>) b0123456789876543210 a0123456789876543210
+      where
+        Foo6Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo6Sym1 a0123456789876543210) arg) (Foo6Sym2 a0123456789876543210 arg) =>
+                                 Foo6Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo6Sym1 a0123456789876543210) a0123456789876543210 = Foo6 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo6Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo6Sym0KindInference) ())
+    data Foo6Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
+      where
+        Foo6Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo6Sym0 arg) (Foo6Sym1 arg) =>
+                                 Foo6Sym0 a0123456789876543210
+    type instance Apply Foo6Sym0 a0123456789876543210 = Foo6Sym1 a0123456789876543210
+    type Foo5Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
+        Foo5 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo5Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo5Sym1KindInference) ())
+    data Foo5Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                    (~>) b0123456789876543210 b0123456789876543210
+      where
+        Foo5Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo5Sym1 a0123456789876543210) arg) (Foo5Sym2 a0123456789876543210 arg) =>
+                                 Foo5Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo5Sym1 a0123456789876543210) a0123456789876543210 = Foo5 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo5Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ())
+    data Foo5Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
+      where
+        Foo5Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) =>
+                                 Foo5Sym0 a0123456789876543210
+    type instance Apply Foo5Sym0 a0123456789876543210 = Foo5Sym1 a0123456789876543210
+    type Foo4Sym3 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) (a0123456789876543210 :: c0123456789876543210) =
+        Foo4 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo4Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo4Sym2KindInference) ())
+    data Foo4Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210.
+                                                                                                                   (~>) c0123456789876543210 a0123456789876543210
+      where
+        Foo4Sym2KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo4Sym2 a0123456789876543210 a0123456789876543210) arg) (Foo4Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                 Foo4Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo4Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = Foo4 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo4Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo4Sym1KindInference) ())
+    data Foo4Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
+                                                                           c0123456789876543210.
+                                                                    (~>) b0123456789876543210 ((~>) c0123456789876543210 a0123456789876543210)
+      where
+        Foo4Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo4Sym1 a0123456789876543210) arg) (Foo4Sym2 a0123456789876543210 arg) =>
+                                 Foo4Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo4Sym1 a0123456789876543210) a0123456789876543210 = Foo4Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo4Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ())
+    data Foo4Sym0 :: forall a0123456789876543210
+                            b0123456789876543210
+                            c0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 a0123456789876543210))
+      where
+        Foo4Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) =>
+                                 Foo4Sym0 a0123456789876543210
+    type instance Apply Foo4Sym0 a0123456789876543210 = Foo4Sym1 a0123456789876543210
+    type Foo3Sym1 (a0123456789876543210 :: a0123456789876543210) =
+        Foo3 a0123456789876543210
+    instance SuppressUnusedWarnings Foo3Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ())
+    data Foo3Sym0 :: forall a0123456789876543210.
+                     (~>) a0123456789876543210 a0123456789876543210
+      where
+        Foo3Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>
+                                 Foo3Sym0 a0123456789876543210
+    type instance Apply Foo3Sym0 a0123456789876543210 = Foo3 a0123456789876543210
+    type Foo2Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
+        Foo2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo2Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo2Sym1KindInference) ())
+    data Foo2Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                    (~>) b0123456789876543210 a0123456789876543210
+      where
+        Foo2Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo2Sym1 a0123456789876543210) arg) (Foo2Sym2 a0123456789876543210 arg) =>
+                                 Foo2Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo2Sym1 a0123456789876543210) a0123456789876543210 = Foo2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo2Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ())
+    data Foo2Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
+      where
+        Foo2Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) =>
+                                 Foo2Sym0 a0123456789876543210
+    type instance Apply Foo2Sym0 a0123456789876543210 = Foo2Sym1 a0123456789876543210
+    type Foo1Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
+        Foo1 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo1Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo1Sym1KindInference) ())
+    data Foo1Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                    (~>) b0123456789876543210 a0123456789876543210
+      where
+        Foo1Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo1Sym1 a0123456789876543210) arg) (Foo1Sym2 a0123456789876543210 arg) =>
+                                 Foo1Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo1Sym1 a0123456789876543210) a0123456789876543210 = Foo1 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo1Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ())
+    data Foo1Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
+      where
+        Foo1Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>
+                                 Foo1Sym0 a0123456789876543210
+    type instance Apply Foo1Sym0 a0123456789876543210 = Foo1Sym1 a0123456789876543210
+    type Foo0Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
+        Foo0 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo0Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo0Sym1KindInference) ())
+    data Foo0Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                    (~>) b0123456789876543210 a0123456789876543210
+      where
+        Foo0Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo0Sym1 a0123456789876543210) arg) (Foo0Sym2 a0123456789876543210 arg) =>
+                                 Foo0Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo0Sym1 a0123456789876543210) a0123456789876543210 = Foo0 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo0Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo0Sym0KindInference) ())
+    data Foo0Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
+      where
+        Foo0Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo0Sym0 arg) (Foo0Sym1 arg) =>
+                                 Foo0Sym0 a0123456789876543210
+    type instance Apply Foo0Sym0 a0123456789876543210 = Foo0Sym1 a0123456789876543210
+    type family Foo8 (a :: Foo a b) :: a where
+      Foo8 x = Apply (Apply Lambda_0123456789876543210Sym0 x) x
+    type family Foo7 (a :: a) (a :: b) :: b where
+      Foo7 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) (Apply (Apply Tuple2Sym0 x) y)
+    type family Foo6 (a :: a) (a :: b) :: a where
+      Foo6 a b = Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) b) a) b
+    type family Foo5 (a :: a) (a :: b) :: b where
+      Foo5 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) y
+    type family Foo4 (a :: a) (a :: b) (a :: c) :: a where
+      Foo4 x y z = Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) z) y) z
+    type family Foo3 (a :: a) :: a where
+      Foo3 x = Apply (Apply Lambda_0123456789876543210Sym0 x) x
+    type family Foo2 (a :: a) (a :: b) :: a where
+      Foo2 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) y
+    type family Foo1 (a :: a) (a :: b) :: a where
+      Foo1 x a_0123456789876543210 = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) a_0123456789876543210) a_0123456789876543210
+    type family Foo0 (a :: a) (a :: b) :: a where
+      Foo0 a_0123456789876543210 a_0123456789876543210 = Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210) a_0123456789876543210) a_0123456789876543210
+    sFoo8 ::
+      forall a b (t :: Foo a b). Sing t -> Sing (Apply Foo8Sym0 t :: a)
+    sFoo7 ::
+      forall a b (t :: a) (t :: b).
+      Sing t -> Sing t -> Sing (Apply (Apply Foo7Sym0 t) t :: b)
+    sFoo6 ::
+      forall a b (t :: a) (t :: b).
+      Sing t -> Sing t -> Sing (Apply (Apply Foo6Sym0 t) t :: a)
+    sFoo5 ::
+      forall a b (t :: a) (t :: b).
+      Sing t -> Sing t -> Sing (Apply (Apply Foo5Sym0 t) t :: b)
+    sFoo4 ::
+      forall a b c (t :: a) (t :: b) (t :: c).
+      Sing t
+      -> Sing t
+         -> Sing t -> Sing (Apply (Apply (Apply Foo4Sym0 t) t) t :: a)
+    sFoo3 :: forall a (t :: a). Sing t -> Sing (Apply Foo3Sym0 t :: a)
+    sFoo2 ::
+      forall a b (t :: a) (t :: b).
+      Sing t -> Sing t -> Sing (Apply (Apply Foo2Sym0 t) t :: a)
+    sFoo1 ::
+      forall a b (t :: a) (t :: b).
+      Sing t -> Sing t -> Sing (Apply (Apply Foo1Sym0 t) t :: a)
+    sFoo0 ::
+      forall a b (t :: a) (t :: b).
+      Sing t -> Sing t -> Sing (Apply (Apply Foo0Sym0 t) t :: a)
+    sFoo8 (sX :: Sing x)
+      = (applySing
+           ((singFun1 @(Apply 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 }) })))
+          sX
+    sFoo7 (sX :: Sing x) (sY :: Sing y)
+      = (applySing
+           ((singFun1 @(Apply (Apply 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 }) })))
+          ((applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sX)) sY)
+    sFoo6 (sA :: Sing a) (sB :: Sing b)
+      = (applySing
+           ((applySing
+               ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 a) b))
+                  (\ sX
+                     -> case sX of {
+                          (_ :: Sing x)
+                            -> (singFun1
+                                  @(Apply (Apply (Apply 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 }) }) })))
+              sA))
+          sB
+    sFoo5 (sX :: Sing x) (sY :: Sing y)
+      = (applySing
+           ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 x) y))
+              (\ sX -> case sX of { (_ :: Sing x) -> sX })))
+          sY
+    sFoo4 (sX :: Sing x) (sY :: Sing y) (sZ :: Sing z)
+      = (applySing
+           ((applySing
+               ((singFun2
+                   @(Apply (Apply (Apply 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 }) })))
+              sY))
+          sZ
+    sFoo3 (sX :: Sing x)
+      = (applySing
+           ((singFun1 @(Apply Lambda_0123456789876543210Sym0 x))
+              (\ sY -> case sY of { (_ :: Sing y) -> sY })))
+          sX
+    sFoo2 (sX :: Sing x) (sY :: Sing y)
+      = (applySing
+           ((singFun1 @(Apply (Apply 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 }) })))
+          sY
+    sFoo1
+      (sX :: Sing x)
+      (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = (applySing
+           ((singFun1
+               @(Apply (Apply 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 }) })))
+          sA_0123456789876543210
+    sFoo0
+      (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = (applySing
+           ((applySing
+               ((singFun2
+                   @(Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210))
+                  (\ sX sY
+                     -> case ((,) sX) sY of { (,) (_ :: Sing x) (_ :: Sing y) -> sX })))
+              sA_0123456789876543210))
+          sA_0123456789876543210
+    instance SingI (Foo8Sym0 :: (~>) (Foo a b) a) where
+      sing = (singFun1 @Foo8Sym0) sFoo8
+    instance SingI (Foo7Sym0 :: (~>) a ((~>) b b)) where
+      sing = (singFun2 @Foo7Sym0) sFoo7
+    instance SingI d => SingI (Foo7Sym1 (d :: a) :: (~>) b b) where
+      sing = (singFun1 @(Foo7Sym1 (d :: a))) (sFoo7 (sing @d))
+    instance SingI (Foo6Sym0 :: (~>) a ((~>) b a)) where
+      sing = (singFun2 @Foo6Sym0) sFoo6
+    instance SingI d => SingI (Foo6Sym1 (d :: a) :: (~>) b a) where
+      sing = (singFun1 @(Foo6Sym1 (d :: a))) (sFoo6 (sing @d))
+    instance SingI (Foo5Sym0 :: (~>) a ((~>) b b)) where
+      sing = (singFun2 @Foo5Sym0) sFoo5
+    instance SingI d => SingI (Foo5Sym1 (d :: a) :: (~>) b b) where
+      sing = (singFun1 @(Foo5Sym1 (d :: a))) (sFoo5 (sing @d))
+    instance SingI (Foo4Sym0 :: (~>) a ((~>) b ((~>) c a))) where
+      sing = (singFun3 @Foo4Sym0) sFoo4
+    instance SingI d =>
+             SingI (Foo4Sym1 (d :: a) :: (~>) b ((~>) c a)) where
+      sing = (singFun2 @(Foo4Sym1 (d :: a))) (sFoo4 (sing @d))
+    instance (SingI d, SingI d) =>
+             SingI (Foo4Sym2 (d :: a) (d :: b) :: (~>) c a) where
+      sing
+        = (singFun1 @(Foo4Sym2 (d :: a) (d :: b)))
+            ((sFoo4 (sing @d)) (sing @d))
+    instance SingI (Foo3Sym0 :: (~>) a a) where
+      sing = (singFun1 @Foo3Sym0) sFoo3
+    instance SingI (Foo2Sym0 :: (~>) a ((~>) b a)) where
+      sing = (singFun2 @Foo2Sym0) sFoo2
+    instance SingI d => SingI (Foo2Sym1 (d :: a) :: (~>) b a) where
+      sing = (singFun1 @(Foo2Sym1 (d :: a))) (sFoo2 (sing @d))
+    instance SingI (Foo1Sym0 :: (~>) a ((~>) b a)) where
+      sing = (singFun2 @Foo1Sym0) sFoo1
+    instance SingI d => SingI (Foo1Sym1 (d :: a) :: (~>) b a) where
+      sing = (singFun1 @(Foo1Sym1 (d :: a))) (sFoo1 (sing @d))
+    instance SingI (Foo0Sym0 :: (~>) a ((~>) b a)) where
+      sing = (singFun2 @Foo0Sym0) sFoo0
+    instance SingI d => SingI (Foo0Sym1 (d :: a) :: (~>) b a) where
+      sing = (singFun1 @(Foo0Sym1 (d :: a))) (sFoo0 (sing @d))
+    data SFoo :: forall a b. Foo a b -> GHC.Types.Type
+      where
+        SFoo :: forall a b (n :: a) (n :: b).
+                (Sing (n :: a)) -> (Sing (n :: b)) -> SFoo (Foo n n)
+    type instance Sing @(Foo a b) = SFoo
+    instance (SingKind a, SingKind b) => SingKind (Foo a b) where
+      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) }
+    instance (SingI n, SingI n) => SingI (Foo (n :: a) (n :: b)) where
+      sing = (SFoo sing) sing
+    instance SingI (FooSym0 :: (~>) a ((~>) b (Foo a b))) where
+      sing = (singFun2 @FooSym0) SFoo
+    instance SingI d =>
+             SingI (FooSym1 (d :: a) :: (~>) b (Foo a b)) where
+      sing = (singFun1 @(FooSym1 (d :: a))) (SFoo (sing @d))
diff --git a/tests/compile-and-dump/Singletons/LambdasComprehensive.ghc86.template b/tests/compile-and-dump/Singletons/LambdasComprehensive.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/LambdasComprehensive.ghc86.template
+++ /dev/null
@@ -1,71 +0,0 @@
-Singletons/LambdasComprehensive.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| foo :: [Nat]
-          foo
-            = map (\ x -> either_ pred Succ x) [Left Zero, Right (Succ Zero)]
-          bar :: [Nat]
-          bar = map (either_ pred Succ) [Left Zero, Right (Succ Zero)] |]
-  ======>
-    foo :: [Nat]
-    foo
-      = (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 t where
-      Lambda_0123456789876543210 x = Apply (Apply (Apply Either_Sym0 PredSym0) SuccSym0) x
-    type Lambda_0123456789876543210Sym1 t0123456789876543210 =
-        Lambda_0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall t0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 t0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210
-    type BarSym0 = Bar
-    type FooSym0 = Foo
-    type family Bar :: [Nat] where
-      Bar = Apply (Apply MapSym0 (Apply (Apply Either_Sym0 PredSym0) SuccSym0)) (Apply (Apply (:@#@$) (Apply LeftSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply RightSym0 (Apply SuccSym0 ZeroSym0))) '[]))
-    type family Foo :: [Nat] where
-      Foo = Apply (Apply MapSym0 Lambda_0123456789876543210Sym0) (Apply (Apply (:@#@$) (Apply LeftSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply RightSym0 (Apply SuccSym0 ZeroSym0))) '[]))
-    sBar :: Sing (BarSym0 :: [Nat])
-    sFoo :: Sing (FooSym0 :: [Nat])
-    sBar
-      = (applySing
-           ((applySing ((singFun2 @MapSym0) sMap))
-              ((applySing
-                  ((applySing ((singFun3 @Either_Sym0) sEither_))
-                     ((singFun1 @PredSym0) sPred)))
-                 ((singFun1 @SuccSym0) SSucc))))
-          ((applySing
-              ((applySing ((singFun2 @(:@#@$)) SCons))
-                 ((applySing ((singFun1 @LeftSym0) SLeft)) SZero)))
-             ((applySing
-                 ((applySing ((singFun2 @(:@#@$)) SCons))
-                    ((applySing ((singFun1 @RightSym0) SRight))
-                       ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))
-                SNil))
-    sFoo
-      = (applySing
-           ((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 }))))
-          ((applySing
-              ((applySing ((singFun2 @(:@#@$)) SCons))
-                 ((applySing ((singFun1 @LeftSym0) SLeft)) SZero)))
-             ((applySing
-                 ((applySing ((singFun2 @(:@#@$)) SCons))
-                    ((applySing ((singFun1 @RightSym0) SRight))
-                       ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))
-                SNil))
diff --git a/tests/compile-and-dump/Singletons/LambdasComprehensive.ghc88.template b/tests/compile-and-dump/Singletons/LambdasComprehensive.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/LambdasComprehensive.ghc88.template
@@ -0,0 +1,71 @@
+Singletons/LambdasComprehensive.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| foo :: [Nat]
+          foo
+            = map (\ x -> either_ pred Succ x) [Left Zero, Right (Succ Zero)]
+          bar :: [Nat]
+          bar = map (either_ pred Succ) [Left Zero, Right (Succ Zero)] |]
+  ======>
+    foo :: [Nat]
+    foo
+      = (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 t where
+      Lambda_0123456789876543210 x = Apply (Apply (Apply Either_Sym0 PredSym0) SuccSym0) x
+    type Lambda_0123456789876543210Sym1 t0123456789876543210 =
+        Lambda_0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall t0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 t0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210
+    type BarSym0 = Bar
+    type FooSym0 = Foo
+    type family Bar :: [Nat] where
+      Bar = Apply (Apply MapSym0 (Apply (Apply Either_Sym0 PredSym0) SuccSym0)) (Apply (Apply (:@#@$) (Apply LeftSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply RightSym0 (Apply SuccSym0 ZeroSym0))) '[]))
+    type family Foo :: [Nat] where
+      Foo = Apply (Apply MapSym0 Lambda_0123456789876543210Sym0) (Apply (Apply (:@#@$) (Apply LeftSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply RightSym0 (Apply SuccSym0 ZeroSym0))) '[]))
+    sBar :: Sing (BarSym0 :: [Nat])
+    sFoo :: Sing (FooSym0 :: [Nat])
+    sBar
+      = (applySing
+           ((applySing ((singFun2 @MapSym0) sMap))
+              ((applySing
+                  ((applySing ((singFun3 @Either_Sym0) sEither_))
+                     ((singFun1 @PredSym0) sPred)))
+                 ((singFun1 @SuccSym0) SSucc))))
+          ((applySing
+              ((applySing ((singFun2 @(:@#@$)) SCons))
+                 ((applySing ((singFun1 @LeftSym0) SLeft)) SZero)))
+             ((applySing
+                 ((applySing ((singFun2 @(:@#@$)) SCons))
+                    ((applySing ((singFun1 @RightSym0) SRight))
+                       ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))
+                SNil))
+    sFoo
+      = (applySing
+           ((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 }))))
+          ((applySing
+              ((applySing ((singFun2 @(:@#@$)) SCons))
+                 ((applySing ((singFun1 @LeftSym0) SLeft)) SZero)))
+             ((applySing
+                 ((applySing ((singFun2 @(:@#@$)) SCons))
+                    ((applySing ((singFun1 @RightSym0) SRight))
+                       ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))
+                SNil))
diff --git a/tests/compile-and-dump/Singletons/LetStatements.ghc86.template b/tests/compile-and-dump/Singletons/LetStatements.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/LetStatements.ghc86.template
+++ /dev/null
@@ -1,1002 +0,0 @@
-Singletons/LetStatements.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| foo1 :: Nat -> Nat
-          foo1 x
-            = let
-                y :: Nat
-                y = Succ Zero
-              in y
-          foo2 :: Nat
-          foo2
-            = let
-                y = Succ Zero
-                z = Succ y
-              in z
-          foo3 :: Nat -> Nat
-          foo3 x
-            = let
-                y :: Nat
-                y = Succ x
-              in y
-          foo4 :: Nat -> Nat
-          foo4 x
-            = let
-                f :: Nat -> Nat
-                f y = Succ y
-              in f x
-          foo5 :: Nat -> Nat
-          foo5 x
-            = let
-                f :: Nat -> Nat
-                f y
-                  = let
-                      z :: Nat
-                      z = Succ y
-                    in Succ z
-              in f x
-          foo6 :: Nat -> Nat
-          foo6 x
-            = let
-                f :: Nat -> Nat
-                f y = Succ y in
-              let
-                z :: Nat
-                z = f x
-              in z
-          foo7 :: Nat -> Nat
-          foo7 x
-            = let
-                x :: Nat
-                x = Zero
-              in x
-          foo8 :: Nat -> Nat
-          foo8 x
-            = let
-                z :: Nat
-                z = (\ x -> x) Zero
-              in z
-          foo9 :: Nat -> Nat
-          foo9 x
-            = let
-                z :: Nat -> Nat
-                z = (\ x -> x)
-              in z x
-          foo10 :: Nat -> Nat
-          foo10 x
-            = let
-                (+) :: Nat -> Nat -> Nat
-                Zero + m = m
-                (Succ n) + m = Succ (n + m)
-              in (Succ Zero) + x
-          foo11 :: Nat -> Nat
-          foo11 x
-            = let
-                (+) :: Nat -> Nat -> Nat
-                Zero + m = m
-                (Succ n) + m = Succ (n + m)
-                z :: Nat
-                z = x
-              in (Succ Zero) + z
-          foo12 :: Nat -> Nat
-          foo12 x
-            = let
-                (+) :: Nat -> Nat -> Nat
-                Zero + m = m
-                (Succ n) + m = Succ (n + x)
-              in x + (Succ (Succ Zero))
-          foo13 :: forall a. a -> a
-          foo13 x
-            = let
-                bar :: a
-                bar = x
-              in foo13_ bar
-          foo13_ :: a -> a
-          foo13_ y = y
-          foo14 :: Nat -> (Nat, Nat)
-          foo14 x = let (y, z) = (Succ x, x) in (z, y) |]
-  ======>
-    foo1 :: Nat -> Nat
-    foo1 x
-      = let
-          y :: Nat
-          y = Succ Zero
-        in y
-    foo2 :: Nat
-    foo2
-      = let
-          y = Succ Zero
-          z = Succ y
-        in z
-    foo3 :: Nat -> Nat
-    foo3 x
-      = let
-          y :: Nat
-          y = Succ x
-        in y
-    foo4 :: Nat -> Nat
-    foo4 x
-      = let
-          f :: Nat -> Nat
-          f y = Succ y
-        in f x
-    foo5 :: Nat -> Nat
-    foo5 x
-      = let
-          f :: Nat -> Nat
-          f y
-            = let
-                z :: Nat
-                z = Succ y
-              in Succ z
-        in f x
-    foo6 :: Nat -> Nat
-    foo6 x
-      = let
-          f :: Nat -> Nat
-          f y = Succ y in
-        let
-          z :: Nat
-          z = f x
-        in z
-    foo7 :: Nat -> Nat
-    foo7 x
-      = let
-          x :: Nat
-          x = Zero
-        in x
-    foo8 :: Nat -> Nat
-    foo8 x
-      = let
-          z :: Nat
-          z = (\ x -> x) Zero
-        in z
-    foo9 :: Nat -> Nat
-    foo9 x
-      = let
-          z :: Nat -> Nat
-          z = \ x -> x
-        in z x
-    foo10 :: Nat -> Nat
-    foo10 x
-      = let
-          (+) :: Nat -> Nat -> Nat
-          (+) Zero m = m
-          (+) (Succ n) m = Succ (n + m)
-        in (Succ Zero + x)
-    foo11 :: Nat -> Nat
-    foo11 x
-      = let
-          (+) :: Nat -> Nat -> Nat
-          z :: Nat
-          (+) Zero m = m
-          (+) (Succ n) m = Succ (n + m)
-          z = x
-        in (Succ Zero + z)
-    foo12 :: Nat -> Nat
-    foo12 x
-      = let
-          (+) :: Nat -> Nat -> Nat
-          (+) Zero m = m
-          (+) (Succ n) m = Succ (n + x)
-        in (x + Succ (Succ Zero))
-    foo13 :: forall a. a -> a
-    foo13 x
-      = let
-          bar :: a
-          bar = x
-        in foo13_ bar
-    foo13_ :: a -> a
-    foo13_ y = y
-    foo14 :: Nat -> (Nat, Nat)
-    foo14 x = let (y, z) = (Succ x, x) in (z, y)
-    type family Case_0123456789876543210 x t where
-      Case_0123456789876543210 x '(y_0123456789876543210,
-                                   _) = y_0123456789876543210
-    type family Case_0123456789876543210 x t where
-      Case_0123456789876543210 x '(_,
-                                   y_0123456789876543210) = y_0123456789876543210
-    type Let0123456789876543210YSym1 x0123456789876543210 =
-        Let0123456789876543210Y x0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210YSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210YSym0KindInference) ())
-    data Let0123456789876543210YSym0 x0123456789876543210
-      where
-        Let0123456789876543210YSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) =>
-                                                    Let0123456789876543210YSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210YSym0 x0123456789876543210 = Let0123456789876543210Y x0123456789876543210
-    type Let0123456789876543210ZSym1 x0123456789876543210 =
-        Let0123456789876543210Z x0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210ZSym0KindInference) ())
-    data Let0123456789876543210ZSym0 x0123456789876543210
-      where
-        Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>
-                                                    Let0123456789876543210ZSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210Z x0123456789876543210
-    type Let0123456789876543210X_0123456789876543210Sym1 x0123456789876543210 =
-        Let0123456789876543210X_0123456789876543210 x0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210X_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd
-            (((,) Let0123456789876543210X_0123456789876543210Sym0KindInference)
-               ())
-    data Let0123456789876543210X_0123456789876543210Sym0 x0123456789876543210
-      where
-        Let0123456789876543210X_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                                               arg. SameKind (Apply Let0123456789876543210X_0123456789876543210Sym0 arg) (Let0123456789876543210X_0123456789876543210Sym1 arg) =>
-                                                                        Let0123456789876543210X_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Let0123456789876543210X_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210X_0123456789876543210 x0123456789876543210
-    type family Let0123456789876543210Y x where
-      Let0123456789876543210Y x = Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym1 x)
-    type family Let0123456789876543210Z x where
-      Let0123456789876543210Z x = Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym1 x)
-    type family Let0123456789876543210X_0123456789876543210 x where
-      Let0123456789876543210X_0123456789876543210 x = Apply (Apply Tuple2Sym0 (Apply SuccSym0 x)) x
-    type Let0123456789876543210BarSym1 x0123456789876543210 =
-        Let0123456789876543210Bar x0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210BarSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210BarSym0KindInference) ())
-    data Let0123456789876543210BarSym0 x0123456789876543210
-      where
-        Let0123456789876543210BarSym0KindInference :: forall x0123456789876543210
-                                                             arg. SameKind (Apply Let0123456789876543210BarSym0 arg) (Let0123456789876543210BarSym1 arg) =>
-                                                      Let0123456789876543210BarSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210BarSym0 x0123456789876543210 = Let0123456789876543210Bar x0123456789876543210
-    type family Let0123456789876543210Bar x :: a where
-      Let0123456789876543210Bar x = x
-    type (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
-        (<<<%%%%%%%%%%%%%%%%%%%%) x0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) a0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###)) ())
-    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 (a0123456789876543210 :: Nat) :: (~>) Nat Nat
-      where
-        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###) :: forall x0123456789876543210
-                                                      a0123456789876543210
-                                                      a0123456789876543210
-                                                      arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 arg) =>
-                                               (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) a0123456789876543210 x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%) a0123456789876543210 x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###)) ())
-    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 :: (~>) Nat ((~>) Nat Nat)
-      where
-        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###) :: forall x0123456789876543210
-                                                     a0123456789876543210
-                                                     arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 arg) =>
-                                              (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 a0123456789876543210
-    type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (<<<%%%%%%%%%%%%%%%%%%%%@#@$) where
-      suppressUnusedWarnings
-        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###)) ())
-    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210
-      where
-        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###) :: forall x0123456789876543210
-                                                    arg. SameKind (Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) arg) =>
-                                             (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210
-    type instance Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210
-    type family (<<<%%%%%%%%%%%%%%%%%%%%) x (a :: Nat) (a :: Nat) :: Nat where
-      (<<<%%%%%%%%%%%%%%%%%%%%) x  'Zero m = m
-      (<<<%%%%%%%%%%%%%%%%%%%%) x ( 'Succ n) m = Apply SuccSym0 (Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) n) x)
-    type Let0123456789876543210ZSym1 x0123456789876543210 =
-        Let0123456789876543210Z x0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210ZSym0KindInference) ())
-    data Let0123456789876543210ZSym0 x0123456789876543210
-      where
-        Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>
-                                                    Let0123456789876543210ZSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210Z x0123456789876543210
-    type (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
-        (<<<%%%%%%%%%%%%%%%%%%%%) x0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) a0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###)) ())
-    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 (a0123456789876543210 :: Nat) :: (~>) Nat Nat
-      where
-        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###) :: forall x0123456789876543210
-                                                      a0123456789876543210
-                                                      a0123456789876543210
-                                                      arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 arg) =>
-                                               (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) a0123456789876543210 x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%) a0123456789876543210 x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###)) ())
-    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 :: (~>) Nat ((~>) Nat Nat)
-      where
-        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###) :: forall x0123456789876543210
-                                                     a0123456789876543210
-                                                     arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 arg) =>
-                                              (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 a0123456789876543210
-    type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (<<<%%%%%%%%%%%%%%%%%%%%@#@$) where
-      suppressUnusedWarnings
-        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###)) ())
-    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210
-      where
-        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###) :: forall x0123456789876543210
-                                                    arg. SameKind (Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) arg) =>
-                                             (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210
-    type instance Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210
-    type family Let0123456789876543210Z x :: Nat where
-      Let0123456789876543210Z x = x
-    type family (<<<%%%%%%%%%%%%%%%%%%%%) x (a :: Nat) (a :: Nat) :: Nat where
-      (<<<%%%%%%%%%%%%%%%%%%%%) x  'Zero m = m
-      (<<<%%%%%%%%%%%%%%%%%%%%) x ( 'Succ n) m = Apply SuccSym0 (Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) n) m)
-    type (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
-        (<<<%%%%%%%%%%%%%%%%%%%%) x0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) a0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###)) ())
-    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 (a0123456789876543210 :: Nat) :: (~>) Nat Nat
-      where
-        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###) :: forall x0123456789876543210
-                                                      a0123456789876543210
-                                                      a0123456789876543210
-                                                      arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 arg) =>
-                                               (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) a0123456789876543210 x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%) a0123456789876543210 x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###)) ())
-    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 :: (~>) Nat ((~>) Nat Nat)
-      where
-        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###) :: forall x0123456789876543210
-                                                     a0123456789876543210
-                                                     arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 arg) =>
-                                              (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 a0123456789876543210
-    type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (<<<%%%%%%%%%%%%%%%%%%%%@#@$) where
-      suppressUnusedWarnings
-        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###)) ())
-    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210
-      where
-        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###) :: forall x0123456789876543210
-                                                    arg. SameKind (Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) arg) =>
-                                             (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210
-    type instance Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210
-    type family (<<<%%%%%%%%%%%%%%%%%%%%) x (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 x a_0123456789876543210 t where
-      Lambda_0123456789876543210 x a_0123456789876543210 x = x
-    type Lambda_0123456789876543210Sym3 x0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
-                                                              a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
-    type Let0123456789876543210ZSym2 x0123456789876543210 (a0123456789876543210 :: Nat) =
-        Let0123456789876543210Z x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210ZSym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210ZSym1KindInference) ())
-    data Let0123456789876543210ZSym1 x0123456789876543210 :: (~>) Nat Nat
-      where
-        Let0123456789876543210ZSym1KindInference :: forall x0123456789876543210
-                                                           a0123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210ZSym1 x0123456789876543210) arg) (Let0123456789876543210ZSym2 x0123456789876543210 arg) =>
-                                                    Let0123456789876543210ZSym1 x0123456789876543210 a0123456789876543210
-    type instance Apply (Let0123456789876543210ZSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210Z x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210ZSym0KindInference) ())
-    data Let0123456789876543210ZSym0 x0123456789876543210
-      where
-        Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>
-                                                    Let0123456789876543210ZSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210ZSym1 x0123456789876543210
-    type family Let0123456789876543210Z x (a :: Nat) :: Nat where
-      Let0123456789876543210Z x a_0123456789876543210 = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) a_0123456789876543210) a_0123456789876543210
-    type family Lambda_0123456789876543210 x t where
-      Lambda_0123456789876543210 x x = x
-    type Lambda_0123456789876543210Sym2 x0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
-    type Let0123456789876543210ZSym1 x0123456789876543210 =
-        Let0123456789876543210Z x0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210ZSym0KindInference) ())
-    data Let0123456789876543210ZSym0 x0123456789876543210
-      where
-        Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>
-                                                    Let0123456789876543210ZSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210Z x0123456789876543210
-    type family Let0123456789876543210Z x :: Nat where
-      Let0123456789876543210Z x = Apply (Apply Lambda_0123456789876543210Sym0 x) ZeroSym0
-    type Let0123456789876543210XSym1 x0123456789876543210 =
-        Let0123456789876543210X x0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210XSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210XSym0KindInference) ())
-    data Let0123456789876543210XSym0 x0123456789876543210
-      where
-        Let0123456789876543210XSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210XSym0 arg) (Let0123456789876543210XSym1 arg) =>
-                                                    Let0123456789876543210XSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210XSym0 x0123456789876543210 = Let0123456789876543210X x0123456789876543210
-    type family Let0123456789876543210X x :: Nat where
-      Let0123456789876543210X x = ZeroSym0
-    type Let0123456789876543210FSym2 x0123456789876543210 (a0123456789876543210 :: Nat) =
-        Let0123456789876543210F x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210FSym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210FSym1KindInference) ())
-    data Let0123456789876543210FSym1 x0123456789876543210 :: (~>) Nat Nat
-      where
-        Let0123456789876543210FSym1KindInference :: forall x0123456789876543210
-                                                           a0123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210FSym1 x0123456789876543210) arg) (Let0123456789876543210FSym2 x0123456789876543210 arg) =>
-                                                    Let0123456789876543210FSym1 x0123456789876543210 a0123456789876543210
-    type instance Apply (Let0123456789876543210FSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210F x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210FSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210FSym0KindInference) ())
-    data Let0123456789876543210FSym0 x0123456789876543210
-      where
-        Let0123456789876543210FSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) =>
-                                                    Let0123456789876543210FSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210FSym0 x0123456789876543210 = Let0123456789876543210FSym1 x0123456789876543210
-    type family Let0123456789876543210F x (a :: Nat) :: Nat where
-      Let0123456789876543210F x y = Apply SuccSym0 y
-    type Let0123456789876543210ZSym1 x0123456789876543210 =
-        Let0123456789876543210Z x0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210ZSym0KindInference) ())
-    data Let0123456789876543210ZSym0 x0123456789876543210
-      where
-        Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>
-                                                    Let0123456789876543210ZSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210Z x0123456789876543210
-    type family Let0123456789876543210Z x :: Nat where
-      Let0123456789876543210Z x = Apply (Let0123456789876543210FSym1 x) x
-    type Let0123456789876543210ZSym2 x0123456789876543210 y0123456789876543210 =
-        Let0123456789876543210Z x0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210ZSym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210ZSym1KindInference) ())
-    data Let0123456789876543210ZSym1 x0123456789876543210 y0123456789876543210
-      where
-        Let0123456789876543210ZSym1KindInference :: forall x0123456789876543210
-                                                           y0123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210ZSym1 x0123456789876543210) arg) (Let0123456789876543210ZSym2 x0123456789876543210 arg) =>
-                                                    Let0123456789876543210ZSym1 x0123456789876543210 y0123456789876543210
-    type instance Apply (Let0123456789876543210ZSym1 x0123456789876543210) y0123456789876543210 = Let0123456789876543210Z x0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210ZSym0KindInference) ())
-    data Let0123456789876543210ZSym0 x0123456789876543210
-      where
-        Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>
-                                                    Let0123456789876543210ZSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210ZSym1 x0123456789876543210
-    type family Let0123456789876543210Z x y :: Nat where
-      Let0123456789876543210Z x y = Apply SuccSym0 y
-    type Let0123456789876543210FSym2 x0123456789876543210 (a0123456789876543210 :: Nat) =
-        Let0123456789876543210F x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210FSym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210FSym1KindInference) ())
-    data Let0123456789876543210FSym1 x0123456789876543210 :: (~>) Nat Nat
-      where
-        Let0123456789876543210FSym1KindInference :: forall x0123456789876543210
-                                                           a0123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210FSym1 x0123456789876543210) arg) (Let0123456789876543210FSym2 x0123456789876543210 arg) =>
-                                                    Let0123456789876543210FSym1 x0123456789876543210 a0123456789876543210
-    type instance Apply (Let0123456789876543210FSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210F x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210FSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210FSym0KindInference) ())
-    data Let0123456789876543210FSym0 x0123456789876543210
-      where
-        Let0123456789876543210FSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) =>
-                                                    Let0123456789876543210FSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210FSym0 x0123456789876543210 = Let0123456789876543210FSym1 x0123456789876543210
-    type family Let0123456789876543210F x (a :: Nat) :: Nat where
-      Let0123456789876543210F x y = Apply SuccSym0 (Let0123456789876543210ZSym2 x y)
-    type Let0123456789876543210FSym2 x0123456789876543210 (a0123456789876543210 :: Nat) =
-        Let0123456789876543210F x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210FSym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210FSym1KindInference) ())
-    data Let0123456789876543210FSym1 x0123456789876543210 :: (~>) Nat Nat
-      where
-        Let0123456789876543210FSym1KindInference :: forall x0123456789876543210
-                                                           a0123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210FSym1 x0123456789876543210) arg) (Let0123456789876543210FSym2 x0123456789876543210 arg) =>
-                                                    Let0123456789876543210FSym1 x0123456789876543210 a0123456789876543210
-    type instance Apply (Let0123456789876543210FSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210F x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210FSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210FSym0KindInference) ())
-    data Let0123456789876543210FSym0 x0123456789876543210
-      where
-        Let0123456789876543210FSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) =>
-                                                    Let0123456789876543210FSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210FSym0 x0123456789876543210 = Let0123456789876543210FSym1 x0123456789876543210
-    type family Let0123456789876543210F x (a :: Nat) :: Nat where
-      Let0123456789876543210F x y = Apply SuccSym0 y
-    type Let0123456789876543210YSym1 x0123456789876543210 =
-        Let0123456789876543210Y x0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210YSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210YSym0KindInference) ())
-    data Let0123456789876543210YSym0 x0123456789876543210
-      where
-        Let0123456789876543210YSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) =>
-                                                    Let0123456789876543210YSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210YSym0 x0123456789876543210 = Let0123456789876543210Y x0123456789876543210
-    type family Let0123456789876543210Y x :: Nat where
-      Let0123456789876543210Y x = Apply SuccSym0 x
-    type Let0123456789876543210YSym0 = Let0123456789876543210Y
-    type Let0123456789876543210ZSym0 = Let0123456789876543210Z
-    type family Let0123456789876543210Y where
-      Let0123456789876543210Y = Apply SuccSym0 ZeroSym0
-    type family Let0123456789876543210Z where
-      Let0123456789876543210Z = Apply SuccSym0 Let0123456789876543210YSym0
-    type Let0123456789876543210YSym1 x0123456789876543210 =
-        Let0123456789876543210Y x0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210YSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210YSym0KindInference) ())
-    data Let0123456789876543210YSym0 x0123456789876543210
-      where
-        Let0123456789876543210YSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) =>
-                                                    Let0123456789876543210YSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210YSym0 x0123456789876543210 = Let0123456789876543210Y x0123456789876543210
-    type family Let0123456789876543210Y x :: Nat where
-      Let0123456789876543210Y x = Apply SuccSym0 ZeroSym0
-    type Foo14Sym1 (a0123456789876543210 :: Nat) =
-        Foo14 a0123456789876543210
-    instance SuppressUnusedWarnings Foo14Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo14Sym0KindInference) ())
-    data Foo14Sym0 :: (~>) Nat (Nat, Nat)
-      where
-        Foo14Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply Foo14Sym0 arg) (Foo14Sym1 arg) =>
-                                  Foo14Sym0 a0123456789876543210
-    type instance Apply Foo14Sym0 a0123456789876543210 = Foo14 a0123456789876543210
-    type Foo13_Sym1 (a0123456789876543210 :: a0123456789876543210) =
-        Foo13_ a0123456789876543210
-    instance SuppressUnusedWarnings Foo13_Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo13_Sym0KindInference) ())
-    data Foo13_Sym0 :: forall a0123456789876543210.
-                       (~>) a0123456789876543210 a0123456789876543210
-      where
-        Foo13_Sym0KindInference :: forall a0123456789876543210
-                                          arg. SameKind (Apply Foo13_Sym0 arg) (Foo13_Sym1 arg) =>
-                                   Foo13_Sym0 a0123456789876543210
-    type instance Apply Foo13_Sym0 a0123456789876543210 = Foo13_ a0123456789876543210
-    type Foo13Sym1 (a0123456789876543210 :: a0123456789876543210) =
-        Foo13 a0123456789876543210
-    instance SuppressUnusedWarnings Foo13Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo13Sym0KindInference) ())
-    data Foo13Sym0 :: forall a0123456789876543210.
-                      (~>) a0123456789876543210 a0123456789876543210
-      where
-        Foo13Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply Foo13Sym0 arg) (Foo13Sym1 arg) =>
-                                  Foo13Sym0 a0123456789876543210
-    type instance Apply Foo13Sym0 a0123456789876543210 = Foo13 a0123456789876543210
-    type Foo12Sym1 (a0123456789876543210 :: Nat) =
-        Foo12 a0123456789876543210
-    instance SuppressUnusedWarnings Foo12Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo12Sym0KindInference) ())
-    data Foo12Sym0 :: (~>) Nat Nat
-      where
-        Foo12Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply Foo12Sym0 arg) (Foo12Sym1 arg) =>
-                                  Foo12Sym0 a0123456789876543210
-    type instance Apply Foo12Sym0 a0123456789876543210 = Foo12 a0123456789876543210
-    type Foo11Sym1 (a0123456789876543210 :: Nat) =
-        Foo11 a0123456789876543210
-    instance SuppressUnusedWarnings Foo11Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo11Sym0KindInference) ())
-    data Foo11Sym0 :: (~>) Nat Nat
-      where
-        Foo11Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply Foo11Sym0 arg) (Foo11Sym1 arg) =>
-                                  Foo11Sym0 a0123456789876543210
-    type instance Apply Foo11Sym0 a0123456789876543210 = Foo11 a0123456789876543210
-    type Foo10Sym1 (a0123456789876543210 :: Nat) =
-        Foo10 a0123456789876543210
-    instance SuppressUnusedWarnings Foo10Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo10Sym0KindInference) ())
-    data Foo10Sym0 :: (~>) Nat Nat
-      where
-        Foo10Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply Foo10Sym0 arg) (Foo10Sym1 arg) =>
-                                  Foo10Sym0 a0123456789876543210
-    type instance Apply Foo10Sym0 a0123456789876543210 = Foo10 a0123456789876543210
-    type Foo9Sym1 (a0123456789876543210 :: Nat) =
-        Foo9 a0123456789876543210
-    instance SuppressUnusedWarnings Foo9Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo9Sym0KindInference) ())
-    data Foo9Sym0 :: (~>) Nat Nat
-      where
-        Foo9Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo9Sym0 arg) (Foo9Sym1 arg) =>
-                                 Foo9Sym0 a0123456789876543210
-    type instance Apply Foo9Sym0 a0123456789876543210 = Foo9 a0123456789876543210
-    type Foo8Sym1 (a0123456789876543210 :: Nat) =
-        Foo8 a0123456789876543210
-    instance SuppressUnusedWarnings Foo8Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo8Sym0KindInference) ())
-    data Foo8Sym0 :: (~>) Nat Nat
-      where
-        Foo8Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo8Sym0 arg) (Foo8Sym1 arg) =>
-                                 Foo8Sym0 a0123456789876543210
-    type instance Apply Foo8Sym0 a0123456789876543210 = Foo8 a0123456789876543210
-    type Foo7Sym1 (a0123456789876543210 :: Nat) =
-        Foo7 a0123456789876543210
-    instance SuppressUnusedWarnings Foo7Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo7Sym0KindInference) ())
-    data Foo7Sym0 :: (~>) Nat Nat
-      where
-        Foo7Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo7Sym0 arg) (Foo7Sym1 arg) =>
-                                 Foo7Sym0 a0123456789876543210
-    type instance Apply Foo7Sym0 a0123456789876543210 = Foo7 a0123456789876543210
-    type Foo6Sym1 (a0123456789876543210 :: Nat) =
-        Foo6 a0123456789876543210
-    instance SuppressUnusedWarnings Foo6Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo6Sym0KindInference) ())
-    data Foo6Sym0 :: (~>) Nat Nat
-      where
-        Foo6Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo6Sym0 arg) (Foo6Sym1 arg) =>
-                                 Foo6Sym0 a0123456789876543210
-    type instance Apply Foo6Sym0 a0123456789876543210 = Foo6 a0123456789876543210
-    type Foo5Sym1 (a0123456789876543210 :: Nat) =
-        Foo5 a0123456789876543210
-    instance SuppressUnusedWarnings Foo5Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ())
-    data Foo5Sym0 :: (~>) Nat Nat
-      where
-        Foo5Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) =>
-                                 Foo5Sym0 a0123456789876543210
-    type instance Apply Foo5Sym0 a0123456789876543210 = Foo5 a0123456789876543210
-    type Foo4Sym1 (a0123456789876543210 :: Nat) =
-        Foo4 a0123456789876543210
-    instance SuppressUnusedWarnings Foo4Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ())
-    data Foo4Sym0 :: (~>) Nat Nat
-      where
-        Foo4Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) =>
-                                 Foo4Sym0 a0123456789876543210
-    type instance Apply Foo4Sym0 a0123456789876543210 = Foo4 a0123456789876543210
-    type Foo3Sym1 (a0123456789876543210 :: Nat) =
-        Foo3 a0123456789876543210
-    instance SuppressUnusedWarnings Foo3Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ())
-    data Foo3Sym0 :: (~>) Nat Nat
-      where
-        Foo3Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>
-                                 Foo3Sym0 a0123456789876543210
-    type instance Apply Foo3Sym0 a0123456789876543210 = Foo3 a0123456789876543210
-    type Foo2Sym0 = Foo2
-    type Foo1Sym1 (a0123456789876543210 :: Nat) =
-        Foo1 a0123456789876543210
-    instance SuppressUnusedWarnings Foo1Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ())
-    data Foo1Sym0 :: (~>) Nat Nat
-      where
-        Foo1Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>
-                                 Foo1Sym0 a0123456789876543210
-    type instance Apply Foo1Sym0 a0123456789876543210 = Foo1 a0123456789876543210
-    type family Foo14 (a :: Nat) :: (Nat, Nat) where
-      Foo14 x = Apply (Apply Tuple2Sym0 (Let0123456789876543210ZSym1 x)) (Let0123456789876543210YSym1 x)
-    type family Foo13_ (a :: a) :: a where
-      Foo13_ y = y
-    type family Foo13 (a :: a) :: a where
-      Foo13 x = Apply Foo13_Sym0 (Let0123456789876543210BarSym1 x)
-    type family Foo12 (a :: Nat) :: Nat where
-      Foo12 x = Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) x) (Apply SuccSym0 (Apply SuccSym0 ZeroSym0))
-    type family Foo11 (a :: Nat) :: Nat where
-      Foo11 x = Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) (Apply SuccSym0 ZeroSym0)) (Let0123456789876543210ZSym1 x)
-    type family Foo10 (a :: Nat) :: Nat where
-      Foo10 x = Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) (Apply SuccSym0 ZeroSym0)) x
-    type family Foo9 (a :: Nat) :: Nat where
-      Foo9 x = Apply (Let0123456789876543210ZSym1 x) x
-    type family Foo8 (a :: Nat) :: Nat where
-      Foo8 x = Let0123456789876543210ZSym1 x
-    type family Foo7 (a :: Nat) :: Nat where
-      Foo7 x = Let0123456789876543210XSym1 x
-    type family Foo6 (a :: Nat) :: Nat where
-      Foo6 x = Let0123456789876543210ZSym1 x
-    type family Foo5 (a :: Nat) :: Nat where
-      Foo5 x = Apply (Let0123456789876543210FSym1 x) x
-    type family Foo4 (a :: Nat) :: Nat where
-      Foo4 x = Apply (Let0123456789876543210FSym1 x) x
-    type family Foo3 (a :: Nat) :: Nat where
-      Foo3 x = Let0123456789876543210YSym1 x
-    type family Foo2 :: Nat where
-      Foo2 = Let0123456789876543210ZSym0
-    type family Foo1 (a :: Nat) :: Nat where
-      Foo1 x = Let0123456789876543210YSym1 x
-    sFoo14 ::
-      forall (t :: Nat). Sing t -> Sing (Apply Foo14Sym0 t :: (Nat, Nat))
-    sFoo13_ ::
-      forall a (t :: a). Sing t -> Sing (Apply Foo13_Sym0 t :: a)
-    sFoo13 ::
-      forall a (t :: a). Sing t -> Sing (Apply Foo13Sym0 t :: a)
-    sFoo12 ::
-      forall (t :: Nat). Sing t -> Sing (Apply Foo12Sym0 t :: Nat)
-    sFoo11 ::
-      forall (t :: Nat). Sing t -> Sing (Apply Foo11Sym0 t :: Nat)
-    sFoo10 ::
-      forall (t :: Nat). Sing t -> Sing (Apply Foo10Sym0 t :: Nat)
-    sFoo9 ::
-      forall (t :: Nat). Sing t -> Sing (Apply Foo9Sym0 t :: Nat)
-    sFoo8 ::
-      forall (t :: Nat). Sing t -> Sing (Apply Foo8Sym0 t :: Nat)
-    sFoo7 ::
-      forall (t :: Nat). Sing t -> Sing (Apply Foo7Sym0 t :: Nat)
-    sFoo6 ::
-      forall (t :: Nat). Sing t -> Sing (Apply Foo6Sym0 t :: Nat)
-    sFoo5 ::
-      forall (t :: Nat). Sing t -> Sing (Apply Foo5Sym0 t :: Nat)
-    sFoo4 ::
-      forall (t :: Nat). Sing t -> Sing (Apply Foo4Sym0 t :: Nat)
-    sFoo3 ::
-      forall (t :: Nat). Sing t -> Sing (Apply Foo3Sym0 t :: Nat)
-    sFoo2 :: Sing (Foo2Sym0 :: Nat)
-    sFoo1 ::
-      forall (t :: Nat). Sing t -> Sing (Apply Foo1Sym0 t :: Nat)
-    sFoo14 (sX :: Sing x)
-      = let
-          sY :: Sing (Let0123456789876543210YSym1 x)
-          sZ :: Sing (Let0123456789876543210ZSym1 x)
-          sX_0123456789876543210 ::
-            Sing (Let0123456789876543210X_0123456789876543210Sym1 x)
-          sY
-            = (case sX_0123456789876543210 of {
-                 STuple2 (sY_0123456789876543210 :: Sing y_0123456789876543210) _
-                   -> sY_0123456789876543210 }) ::
-                Sing (Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym1 x))
-          sZ
-            = (case sX_0123456789876543210 of {
-                 STuple2 _ (sY_0123456789876543210 :: Sing y_0123456789876543210)
-                   -> sY_0123456789876543210 }) ::
-                Sing (Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym1 x))
-          sX_0123456789876543210
-            = (applySing
-                 ((applySing ((singFun2 @Tuple2Sym0) STuple2))
-                    ((applySing ((singFun1 @SuccSym0) SSucc)) sX)))
-                sX
-        in (applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sZ)) sY
-    sFoo13_ (sY :: Sing y) = sY
-    sFoo13 (sX :: Sing x)
-      = let
-          sBar :: Sing (Let0123456789876543210BarSym1 x :: a)
-          sBar = sX
-        in (applySing ((singFun1 @Foo13_Sym0) sFoo13_)) sBar
-    sFoo12 (sX :: Sing x)
-      = let
-          (%+) ::
-            forall (t :: Nat) (t :: Nat).
-            Sing t
-            -> Sing t
-               -> Sing (Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) t) t :: Nat)
-          (%+) SZero (sM :: Sing m) = sM
-          (%+) (SSucc (sN :: Sing n)) (sM :: Sing m)
-            = (applySing ((singFun1 @SuccSym0) SSucc))
-                ((applySing
-                    ((applySing ((singFun2 @((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x)) (%+)))
-                       sN))
-                   sX)
-        in
-          (applySing
-             ((applySing ((singFun2 @((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x)) (%+)))
-                sX))
-            ((applySing ((singFun1 @SuccSym0) SSucc))
-               ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))
-    sFoo11 (sX :: Sing x)
-      = let
-          sZ :: Sing (Let0123456789876543210ZSym1 x :: Nat)
-          (%+) ::
-            forall (t :: Nat) (t :: Nat).
-            Sing t
-            -> Sing t
-               -> Sing (Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) t) t :: Nat)
-          sZ = sX
-          (%+) SZero (sM :: Sing m) = sM
-          (%+) (SSucc (sN :: Sing n)) (sM :: Sing m)
-            = (applySing ((singFun1 @SuccSym0) SSucc))
-                ((applySing
-                    ((applySing ((singFun2 @((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x)) (%+)))
-                       sN))
-                   sM)
-        in
-          (applySing
-             ((applySing ((singFun2 @((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x)) (%+)))
-                ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
-            sZ
-    sFoo10 (sX :: Sing x)
-      = let
-          (%+) ::
-            forall (t :: Nat) (t :: Nat).
-            Sing t
-            -> Sing t
-               -> Sing (Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) t) t :: Nat)
-          (%+) SZero (sM :: Sing m) = sM
-          (%+) (SSucc (sN :: Sing n)) (sM :: Sing m)
-            = (applySing ((singFun1 @SuccSym0) SSucc))
-                ((applySing
-                    ((applySing ((singFun2 @((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x)) (%+)))
-                       sN))
-                   sM)
-        in
-          (applySing
-             ((applySing ((singFun2 @((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x)) (%+)))
-                ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
-            sX
-    sFoo9 (sX :: Sing x)
-      = let
-          sZ ::
-            forall (t :: Nat).
-            Sing t -> Sing (Apply (Let0123456789876543210ZSym1 x) t :: Nat)
-          sZ (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            = (applySing
-                 ((singFun1
-                     @(Apply (Apply Lambda_0123456789876543210Sym0 x) a_0123456789876543210))
-                    (\ sX -> case sX of { (_ :: Sing x) -> sX })))
-                sA_0123456789876543210
-        in (applySing ((singFun1 @(Let0123456789876543210ZSym1 x)) sZ)) sX
-    sFoo8 (sX :: Sing x)
-      = let
-          sZ :: Sing (Let0123456789876543210ZSym1 x :: Nat)
-          sZ
-            = (applySing
-                 ((singFun1 @(Apply Lambda_0123456789876543210Sym0 x))
-                    (\ sX -> case sX of { (_ :: Sing x) -> sX })))
-                SZero
-        in sZ
-    sFoo7 (sX :: Sing x)
-      = let
-          sX :: Sing (Let0123456789876543210XSym1 x :: Nat)
-          sX = SZero
-        in sX
-    sFoo6 (sX :: Sing x)
-      = let
-          sF ::
-            forall (t :: Nat).
-            Sing t -> Sing (Apply (Let0123456789876543210FSym1 x) t :: Nat)
-          sF (sY :: Sing y) = (applySing ((singFun1 @SuccSym0) SSucc)) sY in
-        let
-          sZ :: Sing (Let0123456789876543210ZSym1 x :: Nat)
-          sZ
-            = (applySing ((singFun1 @(Let0123456789876543210FSym1 x)) sF)) sX
-        in sZ
-    sFoo5 (sX :: Sing x)
-      = let
-          sF ::
-            forall (t :: Nat).
-            Sing t -> Sing (Apply (Let0123456789876543210FSym1 x) t :: Nat)
-          sF (sY :: Sing y)
-            = let
-                sZ :: Sing (Let0123456789876543210ZSym2 x y :: Nat)
-                sZ = (applySing ((singFun1 @SuccSym0) SSucc)) sY
-              in (applySing ((singFun1 @SuccSym0) SSucc)) sZ
-        in (applySing ((singFun1 @(Let0123456789876543210FSym1 x)) sF)) sX
-    sFoo4 (sX :: Sing x)
-      = let
-          sF ::
-            forall (t :: Nat).
-            Sing t -> Sing (Apply (Let0123456789876543210FSym1 x) t :: Nat)
-          sF (sY :: Sing y) = (applySing ((singFun1 @SuccSym0) SSucc)) sY
-        in (applySing ((singFun1 @(Let0123456789876543210FSym1 x)) sF)) sX
-    sFoo3 (sX :: Sing x)
-      = let
-          sY :: Sing (Let0123456789876543210YSym1 x :: Nat)
-          sY = (applySing ((singFun1 @SuccSym0) SSucc)) sX
-        in sY
-    sFoo2
-      = let
-          sY :: Sing Let0123456789876543210YSym0
-          sZ :: Sing Let0123456789876543210ZSym0
-          sY = (applySing ((singFun1 @SuccSym0) SSucc)) SZero
-          sZ = (applySing ((singFun1 @SuccSym0) SSucc)) sY
-        in sZ
-    sFoo1 (sX :: Sing x)
-      = let
-          sY :: Sing (Let0123456789876543210YSym1 x :: Nat)
-          sY = (applySing ((singFun1 @SuccSym0) SSucc)) SZero
-        in sY
-    instance SingI (Foo14Sym0 :: (~>) Nat (Nat, Nat)) where
-      sing = (singFun1 @Foo14Sym0) sFoo14
-    instance SingI (Foo13_Sym0 :: (~>) a a) where
-      sing = (singFun1 @Foo13_Sym0) sFoo13_
-    instance SingI (Foo13Sym0 :: (~>) a a) where
-      sing = (singFun1 @Foo13Sym0) sFoo13
-    instance SingI (Foo12Sym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @Foo12Sym0) sFoo12
-    instance SingI (Foo11Sym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @Foo11Sym0) sFoo11
-    instance SingI (Foo10Sym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @Foo10Sym0) sFoo10
-    instance SingI (Foo9Sym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @Foo9Sym0) sFoo9
-    instance SingI (Foo8Sym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @Foo8Sym0) sFoo8
-    instance SingI (Foo7Sym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @Foo7Sym0) sFoo7
-    instance SingI (Foo6Sym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @Foo6Sym0) sFoo6
-    instance SingI (Foo5Sym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @Foo5Sym0) sFoo5
-    instance SingI (Foo4Sym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @Foo4Sym0) sFoo4
-    instance SingI (Foo3Sym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @Foo3Sym0) sFoo3
-    instance SingI (Foo1Sym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @Foo1Sym0) sFoo1
diff --git a/tests/compile-and-dump/Singletons/LetStatements.ghc88.template b/tests/compile-and-dump/Singletons/LetStatements.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/LetStatements.ghc88.template
@@ -0,0 +1,1004 @@
+Singletons/LetStatements.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| foo1 :: Nat -> Nat
+          foo1 x
+            = let
+                y :: Nat
+                y = Succ Zero
+              in y
+          foo2 :: Nat
+          foo2
+            = let
+                y = Succ Zero
+                z = Succ y
+              in z
+          foo3 :: Nat -> Nat
+          foo3 x
+            = let
+                y :: Nat
+                y = Succ x
+              in y
+          foo4 :: Nat -> Nat
+          foo4 x
+            = let
+                f :: Nat -> Nat
+                f y = Succ y
+              in f x
+          foo5 :: Nat -> Nat
+          foo5 x
+            = let
+                f :: Nat -> Nat
+                f y
+                  = let
+                      z :: Nat
+                      z = Succ y
+                    in Succ z
+              in f x
+          foo6 :: Nat -> Nat
+          foo6 x
+            = let
+                f :: Nat -> Nat
+                f y = Succ y in
+              let
+                z :: Nat
+                z = f x
+              in z
+          foo7 :: Nat -> Nat
+          foo7 x
+            = let
+                x :: Nat
+                x = Zero
+              in x
+          foo8 :: Nat -> Nat
+          foo8 x
+            = let
+                z :: Nat
+                z = (\ x -> x) Zero
+              in z
+          foo9 :: Nat -> Nat
+          foo9 x
+            = let
+                z :: Nat -> Nat
+                z = (\ x -> x)
+              in z x
+          foo10 :: Nat -> Nat
+          foo10 x
+            = let
+                (+) :: Nat -> Nat -> Nat
+                Zero + m = m
+                (Succ n) + m = Succ (n + m)
+              in (Succ Zero) + x
+          foo11 :: Nat -> Nat
+          foo11 x
+            = let
+                (+) :: Nat -> Nat -> Nat
+                Zero + m = m
+                (Succ n) + m = Succ (n + m)
+                z :: Nat
+                z = x
+              in (Succ Zero) + z
+          foo12 :: Nat -> Nat
+          foo12 x
+            = let
+                (+) :: Nat -> Nat -> Nat
+                Zero + m = m
+                (Succ n) + m = Succ (n + x)
+              in x + (Succ (Succ Zero))
+          foo13 :: forall a. a -> a
+          foo13 x
+            = let
+                bar :: a
+                bar = x
+              in foo13_ bar
+          foo13_ :: a -> a
+          foo13_ y = y
+          foo14 :: Nat -> (Nat, Nat)
+          foo14 x = let (y, z) = (Succ x, x) in (z, y) |]
+  ======>
+    foo1 :: Nat -> Nat
+    foo1 x
+      = let
+          y :: Nat
+          y = Succ Zero
+        in y
+    foo2 :: Nat
+    foo2
+      = let
+          y = Succ Zero
+          z = Succ y
+        in z
+    foo3 :: Nat -> Nat
+    foo3 x
+      = let
+          y :: Nat
+          y = Succ x
+        in y
+    foo4 :: Nat -> Nat
+    foo4 x
+      = let
+          f :: Nat -> Nat
+          f y = Succ y
+        in f x
+    foo5 :: Nat -> Nat
+    foo5 x
+      = let
+          f :: Nat -> Nat
+          f y
+            = let
+                z :: Nat
+                z = Succ y
+              in Succ z
+        in f x
+    foo6 :: Nat -> Nat
+    foo6 x
+      = let
+          f :: Nat -> Nat
+          f y = Succ y in
+        let
+          z :: Nat
+          z = f x
+        in z
+    foo7 :: Nat -> Nat
+    foo7 x
+      = let
+          x :: Nat
+          x = Zero
+        in x
+    foo8 :: Nat -> Nat
+    foo8 x
+      = let
+          z :: Nat
+          z = (\ x -> x) Zero
+        in z
+    foo9 :: Nat -> Nat
+    foo9 x
+      = let
+          z :: Nat -> Nat
+          z = \ x -> x
+        in z x
+    foo10 :: Nat -> Nat
+    foo10 x
+      = let
+          (+) :: Nat -> Nat -> Nat
+          (+) Zero m = m
+          (+) (Succ n) m = Succ (n + m)
+        in (Succ Zero + x)
+    foo11 :: Nat -> Nat
+    foo11 x
+      = let
+          (+) :: Nat -> Nat -> Nat
+          z :: Nat
+          (+) Zero m = m
+          (+) (Succ n) m = Succ (n + m)
+          z = x
+        in (Succ Zero + z)
+    foo12 :: Nat -> Nat
+    foo12 x
+      = let
+          (+) :: Nat -> Nat -> Nat
+          (+) Zero m = m
+          (+) (Succ n) m = Succ (n + x)
+        in (x + Succ (Succ Zero))
+    foo13 :: forall a. a -> a
+    foo13 x
+      = let
+          bar :: a
+          bar = x
+        in foo13_ bar
+    foo13_ :: a -> a
+    foo13_ y = y
+    foo14 :: Nat -> (Nat, Nat)
+    foo14 x = let (y, z) = (Succ x, x) in (z, y)
+    type family Case_0123456789876543210 x t where
+      Case_0123456789876543210 x '(_,
+                                   y_0123456789876543210) = y_0123456789876543210
+    type family Case_0123456789876543210 x t where
+      Case_0123456789876543210 x '(y_0123456789876543210,
+                                   _) = y_0123456789876543210
+    type Let0123456789876543210ZSym1 x0123456789876543210 =
+        Let0123456789876543210Z x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210ZSym0KindInference) ())
+    data Let0123456789876543210ZSym0 x0123456789876543210
+      where
+        Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>
+                                                    Let0123456789876543210ZSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210Z x0123456789876543210
+    type Let0123456789876543210YSym1 x0123456789876543210 =
+        Let0123456789876543210Y x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210YSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210YSym0KindInference) ())
+    data Let0123456789876543210YSym0 x0123456789876543210
+      where
+        Let0123456789876543210YSym0KindInference :: forall x0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) =>
+                                                    Let0123456789876543210YSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210YSym0 x0123456789876543210 = Let0123456789876543210Y x0123456789876543210
+    type Let0123456789876543210X_0123456789876543210Sym1 x0123456789876543210 =
+        Let0123456789876543210X_0123456789876543210 x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210X_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd
+            (((,) Let0123456789876543210X_0123456789876543210Sym0KindInference)
+               ())
+    data Let0123456789876543210X_0123456789876543210Sym0 x0123456789876543210
+      where
+        Let0123456789876543210X_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                                               arg. SameKind (Apply Let0123456789876543210X_0123456789876543210Sym0 arg) (Let0123456789876543210X_0123456789876543210Sym1 arg) =>
+                                                                        Let0123456789876543210X_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Let0123456789876543210X_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210X_0123456789876543210 x0123456789876543210
+    type family Let0123456789876543210Z x where
+      Let0123456789876543210Z x = Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym1 x)
+    type family Let0123456789876543210Y x where
+      Let0123456789876543210Y x = Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym1 x)
+    type family Let0123456789876543210X_0123456789876543210 x where
+      Let0123456789876543210X_0123456789876543210 x = Apply (Apply Tuple2Sym0 (Apply SuccSym0 x)) x
+    type Let0123456789876543210BarSym1 x0123456789876543210 =
+        Let0123456789876543210Bar x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210BarSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210BarSym0KindInference) ())
+    data Let0123456789876543210BarSym0 x0123456789876543210
+      where
+        Let0123456789876543210BarSym0KindInference :: forall x0123456789876543210
+                                                             arg. SameKind (Apply Let0123456789876543210BarSym0 arg) (Let0123456789876543210BarSym1 arg) =>
+                                                      Let0123456789876543210BarSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210BarSym0 x0123456789876543210 = Let0123456789876543210Bar x0123456789876543210
+    type family Let0123456789876543210Bar x :: a where
+      Let0123456789876543210Bar x = x
+    type (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
+        (<<<%%%%%%%%%%%%%%%%%%%%) x0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) a0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###)) ())
+    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 (a0123456789876543210 :: Nat) :: (~>) Nat Nat
+      where
+        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###) :: forall x0123456789876543210
+                                                      a0123456789876543210
+                                                      a0123456789876543210
+                                                      arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 arg) =>
+                                               (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) a0123456789876543210 x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%) a0123456789876543210 x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###)) ())
+    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 :: (~>) Nat ((~>) Nat Nat)
+      where
+        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###) :: forall x0123456789876543210
+                                                     a0123456789876543210
+                                                     arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 arg) =>
+                                              (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 a0123456789876543210
+    type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (<<<%%%%%%%%%%%%%%%%%%%%@#@$) where
+      suppressUnusedWarnings
+        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###)) ())
+    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210
+      where
+        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###) :: forall x0123456789876543210
+                                                    arg. SameKind (Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) arg) =>
+                                             (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210
+    type instance Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210
+    type family (<<<%%%%%%%%%%%%%%%%%%%%) x (a :: Nat) (a :: Nat) :: Nat where
+      (<<<%%%%%%%%%%%%%%%%%%%%) x 'Zero m = m
+      (<<<%%%%%%%%%%%%%%%%%%%%) x ('Succ n) m = Apply SuccSym0 (Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) n) x)
+    type Let0123456789876543210ZSym1 x0123456789876543210 =
+        Let0123456789876543210Z x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210ZSym0KindInference) ())
+    data Let0123456789876543210ZSym0 x0123456789876543210
+      where
+        Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>
+                                                    Let0123456789876543210ZSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210Z x0123456789876543210
+    type (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
+        (<<<%%%%%%%%%%%%%%%%%%%%) x0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) a0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###)) ())
+    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 (a0123456789876543210 :: Nat) :: (~>) Nat Nat
+      where
+        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###) :: forall x0123456789876543210
+                                                      a0123456789876543210
+                                                      a0123456789876543210
+                                                      arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 arg) =>
+                                               (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) a0123456789876543210 x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%) a0123456789876543210 x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###)) ())
+    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 :: (~>) Nat ((~>) Nat Nat)
+      where
+        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###) :: forall x0123456789876543210
+                                                     a0123456789876543210
+                                                     arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 arg) =>
+                                              (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 a0123456789876543210
+    type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (<<<%%%%%%%%%%%%%%%%%%%%@#@$) where
+      suppressUnusedWarnings
+        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###)) ())
+    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210
+      where
+        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###) :: forall x0123456789876543210
+                                                    arg. SameKind (Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) arg) =>
+                                             (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210
+    type instance Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210
+    type family Let0123456789876543210Z x :: Nat where
+      Let0123456789876543210Z x = x
+    type family (<<<%%%%%%%%%%%%%%%%%%%%) x (a :: Nat) (a :: Nat) :: Nat where
+      (<<<%%%%%%%%%%%%%%%%%%%%) x 'Zero m = m
+      (<<<%%%%%%%%%%%%%%%%%%%%) x ('Succ n) m = Apply SuccSym0 (Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) n) m)
+    type (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
+        (<<<%%%%%%%%%%%%%%%%%%%%) x0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) a0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###)) ())
+    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 (a0123456789876543210 :: Nat) :: (~>) Nat Nat
+      where
+        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###) :: forall x0123456789876543210
+                                                      a0123456789876543210
+                                                      a0123456789876543210
+                                                      arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 arg) =>
+                                               (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) a0123456789876543210 x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%) a0123456789876543210 x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###)) ())
+    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 :: (~>) Nat ((~>) Nat Nat)
+      where
+        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###) :: forall x0123456789876543210
+                                                     a0123456789876543210
+                                                     arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 arg) =>
+                                              (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 a0123456789876543210
+    type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (<<<%%%%%%%%%%%%%%%%%%%%@#@$) where
+      suppressUnusedWarnings
+        = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###)) ())
+    data (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210
+      where
+        (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###) :: forall x0123456789876543210
+                                                    arg. SameKind (Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) arg) =>
+                                             (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210
+    type instance Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210
+    type family (<<<%%%%%%%%%%%%%%%%%%%%) x (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_0123456789876543210 x t where
+      Lambda_0123456789876543210 a_0123456789876543210 x x = x
+    type Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 x0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall a_01234567898765432100123456789876543210
+                                                              x0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall a_01234567898765432100123456789876543210
+                                                              x0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 x0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210
+    type Let0123456789876543210ZSym2 x0123456789876543210 (a0123456789876543210 :: Nat) =
+        Let0123456789876543210Z x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210ZSym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210ZSym1KindInference) ())
+    data Let0123456789876543210ZSym1 x0123456789876543210 :: (~>) Nat Nat
+      where
+        Let0123456789876543210ZSym1KindInference :: forall x0123456789876543210
+                                                           a0123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210ZSym1 x0123456789876543210) arg) (Let0123456789876543210ZSym2 x0123456789876543210 arg) =>
+                                                    Let0123456789876543210ZSym1 x0123456789876543210 a0123456789876543210
+    type instance Apply (Let0123456789876543210ZSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210Z x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210ZSym0KindInference) ())
+    data Let0123456789876543210ZSym0 x0123456789876543210
+      where
+        Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>
+                                                    Let0123456789876543210ZSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210ZSym1 x0123456789876543210
+    type family Let0123456789876543210Z x (a :: Nat) :: Nat where
+      Let0123456789876543210Z x a_0123456789876543210 = Apply (Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) x) a_0123456789876543210
+    type family Lambda_0123456789876543210 x t where
+      Lambda_0123456789876543210 x x = x
+    type Lambda_0123456789876543210Sym2 x0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
+    type Let0123456789876543210ZSym1 x0123456789876543210 =
+        Let0123456789876543210Z x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210ZSym0KindInference) ())
+    data Let0123456789876543210ZSym0 x0123456789876543210
+      where
+        Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>
+                                                    Let0123456789876543210ZSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210Z x0123456789876543210
+    type family Let0123456789876543210Z x :: Nat where
+      Let0123456789876543210Z x = Apply (Apply Lambda_0123456789876543210Sym0 x) ZeroSym0
+    type Let0123456789876543210XSym1 x0123456789876543210 =
+        Let0123456789876543210X x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210XSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210XSym0KindInference) ())
+    data Let0123456789876543210XSym0 x0123456789876543210
+      where
+        Let0123456789876543210XSym0KindInference :: forall x0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210XSym0 arg) (Let0123456789876543210XSym1 arg) =>
+                                                    Let0123456789876543210XSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210XSym0 x0123456789876543210 = Let0123456789876543210X x0123456789876543210
+    type family Let0123456789876543210X x :: Nat where
+      Let0123456789876543210X x = ZeroSym0
+    type Let0123456789876543210FSym2 x0123456789876543210 (a0123456789876543210 :: Nat) =
+        Let0123456789876543210F x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210FSym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210FSym1KindInference) ())
+    data Let0123456789876543210FSym1 x0123456789876543210 :: (~>) Nat Nat
+      where
+        Let0123456789876543210FSym1KindInference :: forall x0123456789876543210
+                                                           a0123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210FSym1 x0123456789876543210) arg) (Let0123456789876543210FSym2 x0123456789876543210 arg) =>
+                                                    Let0123456789876543210FSym1 x0123456789876543210 a0123456789876543210
+    type instance Apply (Let0123456789876543210FSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210F x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210FSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210FSym0KindInference) ())
+    data Let0123456789876543210FSym0 x0123456789876543210
+      where
+        Let0123456789876543210FSym0KindInference :: forall x0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) =>
+                                                    Let0123456789876543210FSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210FSym0 x0123456789876543210 = Let0123456789876543210FSym1 x0123456789876543210
+    type family Let0123456789876543210F x (a :: Nat) :: Nat where
+      Let0123456789876543210F x y = Apply SuccSym0 y
+    type Let0123456789876543210ZSym1 x0123456789876543210 =
+        Let0123456789876543210Z x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210ZSym0KindInference) ())
+    data Let0123456789876543210ZSym0 x0123456789876543210
+      where
+        Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>
+                                                    Let0123456789876543210ZSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210Z x0123456789876543210
+    type family Let0123456789876543210Z x :: Nat where
+      Let0123456789876543210Z x = Apply (Let0123456789876543210FSym1 x) x
+    type Let0123456789876543210ZSym2 y0123456789876543210 x0123456789876543210 =
+        Let0123456789876543210Z y0123456789876543210 x0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210ZSym1 y0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210ZSym1KindInference) ())
+    data Let0123456789876543210ZSym1 y0123456789876543210 x0123456789876543210
+      where
+        Let0123456789876543210ZSym1KindInference :: forall y0123456789876543210
+                                                           x0123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210ZSym1 y0123456789876543210) arg) (Let0123456789876543210ZSym2 y0123456789876543210 arg) =>
+                                                    Let0123456789876543210ZSym1 y0123456789876543210 x0123456789876543210
+    type instance Apply (Let0123456789876543210ZSym1 y0123456789876543210) x0123456789876543210 = Let0123456789876543210Z y0123456789876543210 x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210ZSym0KindInference) ())
+    data Let0123456789876543210ZSym0 y0123456789876543210
+      where
+        Let0123456789876543210ZSym0KindInference :: forall y0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) =>
+                                                    Let0123456789876543210ZSym0 y0123456789876543210
+    type instance Apply Let0123456789876543210ZSym0 y0123456789876543210 = Let0123456789876543210ZSym1 y0123456789876543210
+    type family Let0123456789876543210Z y x :: Nat where
+      Let0123456789876543210Z y x = Apply SuccSym0 y
+    type Let0123456789876543210FSym2 x0123456789876543210 (a0123456789876543210 :: Nat) =
+        Let0123456789876543210F x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210FSym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210FSym1KindInference) ())
+    data Let0123456789876543210FSym1 x0123456789876543210 :: (~>) Nat Nat
+      where
+        Let0123456789876543210FSym1KindInference :: forall x0123456789876543210
+                                                           a0123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210FSym1 x0123456789876543210) arg) (Let0123456789876543210FSym2 x0123456789876543210 arg) =>
+                                                    Let0123456789876543210FSym1 x0123456789876543210 a0123456789876543210
+    type instance Apply (Let0123456789876543210FSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210F x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210FSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210FSym0KindInference) ())
+    data Let0123456789876543210FSym0 x0123456789876543210
+      where
+        Let0123456789876543210FSym0KindInference :: forall x0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) =>
+                                                    Let0123456789876543210FSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210FSym0 x0123456789876543210 = Let0123456789876543210FSym1 x0123456789876543210
+    type family Let0123456789876543210F x (a :: Nat) :: Nat where
+      Let0123456789876543210F x y = Apply SuccSym0 (Let0123456789876543210ZSym2 y x)
+    type Let0123456789876543210FSym2 x0123456789876543210 (a0123456789876543210 :: Nat) =
+        Let0123456789876543210F x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210FSym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210FSym1KindInference) ())
+    data Let0123456789876543210FSym1 x0123456789876543210 :: (~>) Nat Nat
+      where
+        Let0123456789876543210FSym1KindInference :: forall x0123456789876543210
+                                                           a0123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210FSym1 x0123456789876543210) arg) (Let0123456789876543210FSym2 x0123456789876543210 arg) =>
+                                                    Let0123456789876543210FSym1 x0123456789876543210 a0123456789876543210
+    type instance Apply (Let0123456789876543210FSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210F x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210FSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210FSym0KindInference) ())
+    data Let0123456789876543210FSym0 x0123456789876543210
+      where
+        Let0123456789876543210FSym0KindInference :: forall x0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) =>
+                                                    Let0123456789876543210FSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210FSym0 x0123456789876543210 = Let0123456789876543210FSym1 x0123456789876543210
+    type family Let0123456789876543210F x (a :: Nat) :: Nat where
+      Let0123456789876543210F x y = Apply SuccSym0 y
+    type Let0123456789876543210YSym1 x0123456789876543210 =
+        Let0123456789876543210Y x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210YSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210YSym0KindInference) ())
+    data Let0123456789876543210YSym0 x0123456789876543210
+      where
+        Let0123456789876543210YSym0KindInference :: forall x0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) =>
+                                                    Let0123456789876543210YSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210YSym0 x0123456789876543210 = Let0123456789876543210Y x0123456789876543210
+    type family Let0123456789876543210Y x :: Nat where
+      Let0123456789876543210Y x = Apply SuccSym0 x
+    type Let0123456789876543210ZSym0 = Let0123456789876543210Z
+    type Let0123456789876543210YSym0 = Let0123456789876543210Y
+    type family Let0123456789876543210Z where
+      Let0123456789876543210Z = Apply SuccSym0 Let0123456789876543210YSym0
+    type family Let0123456789876543210Y where
+      Let0123456789876543210Y = Apply SuccSym0 ZeroSym0
+    type Let0123456789876543210YSym1 x0123456789876543210 =
+        Let0123456789876543210Y x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210YSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210YSym0KindInference) ())
+    data Let0123456789876543210YSym0 x0123456789876543210
+      where
+        Let0123456789876543210YSym0KindInference :: forall x0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) =>
+                                                    Let0123456789876543210YSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210YSym0 x0123456789876543210 = Let0123456789876543210Y x0123456789876543210
+    type family Let0123456789876543210Y x :: Nat where
+      Let0123456789876543210Y x = Apply SuccSym0 ZeroSym0
+    type Foo14Sym1 (a0123456789876543210 :: Nat) =
+        Foo14 a0123456789876543210
+    instance SuppressUnusedWarnings Foo14Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo14Sym0KindInference) ())
+    data Foo14Sym0 :: (~>) Nat (Nat, Nat)
+      where
+        Foo14Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply Foo14Sym0 arg) (Foo14Sym1 arg) =>
+                                  Foo14Sym0 a0123456789876543210
+    type instance Apply Foo14Sym0 a0123456789876543210 = Foo14 a0123456789876543210
+    type Foo13_Sym1 (a0123456789876543210 :: a0123456789876543210) =
+        Foo13_ a0123456789876543210
+    instance SuppressUnusedWarnings Foo13_Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo13_Sym0KindInference) ())
+    data Foo13_Sym0 :: forall a0123456789876543210.
+                       (~>) a0123456789876543210 a0123456789876543210
+      where
+        Foo13_Sym0KindInference :: forall a0123456789876543210
+                                          arg. SameKind (Apply Foo13_Sym0 arg) (Foo13_Sym1 arg) =>
+                                   Foo13_Sym0 a0123456789876543210
+    type instance Apply Foo13_Sym0 a0123456789876543210 = Foo13_ a0123456789876543210
+    type Foo13Sym1 (a0123456789876543210 :: a0123456789876543210) =
+        Foo13 a0123456789876543210
+    instance SuppressUnusedWarnings Foo13Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo13Sym0KindInference) ())
+    data Foo13Sym0 :: forall a0123456789876543210.
+                      (~>) a0123456789876543210 a0123456789876543210
+      where
+        Foo13Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply Foo13Sym0 arg) (Foo13Sym1 arg) =>
+                                  Foo13Sym0 a0123456789876543210
+    type instance Apply Foo13Sym0 a0123456789876543210 = Foo13 a0123456789876543210
+    type Foo12Sym1 (a0123456789876543210 :: Nat) =
+        Foo12 a0123456789876543210
+    instance SuppressUnusedWarnings Foo12Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo12Sym0KindInference) ())
+    data Foo12Sym0 :: (~>) Nat Nat
+      where
+        Foo12Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply Foo12Sym0 arg) (Foo12Sym1 arg) =>
+                                  Foo12Sym0 a0123456789876543210
+    type instance Apply Foo12Sym0 a0123456789876543210 = Foo12 a0123456789876543210
+    type Foo11Sym1 (a0123456789876543210 :: Nat) =
+        Foo11 a0123456789876543210
+    instance SuppressUnusedWarnings Foo11Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo11Sym0KindInference) ())
+    data Foo11Sym0 :: (~>) Nat Nat
+      where
+        Foo11Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply Foo11Sym0 arg) (Foo11Sym1 arg) =>
+                                  Foo11Sym0 a0123456789876543210
+    type instance Apply Foo11Sym0 a0123456789876543210 = Foo11 a0123456789876543210
+    type Foo10Sym1 (a0123456789876543210 :: Nat) =
+        Foo10 a0123456789876543210
+    instance SuppressUnusedWarnings Foo10Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo10Sym0KindInference) ())
+    data Foo10Sym0 :: (~>) Nat Nat
+      where
+        Foo10Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply Foo10Sym0 arg) (Foo10Sym1 arg) =>
+                                  Foo10Sym0 a0123456789876543210
+    type instance Apply Foo10Sym0 a0123456789876543210 = Foo10 a0123456789876543210
+    type Foo9Sym1 (a0123456789876543210 :: Nat) =
+        Foo9 a0123456789876543210
+    instance SuppressUnusedWarnings Foo9Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo9Sym0KindInference) ())
+    data Foo9Sym0 :: (~>) Nat Nat
+      where
+        Foo9Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo9Sym0 arg) (Foo9Sym1 arg) =>
+                                 Foo9Sym0 a0123456789876543210
+    type instance Apply Foo9Sym0 a0123456789876543210 = Foo9 a0123456789876543210
+    type Foo8Sym1 (a0123456789876543210 :: Nat) =
+        Foo8 a0123456789876543210
+    instance SuppressUnusedWarnings Foo8Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo8Sym0KindInference) ())
+    data Foo8Sym0 :: (~>) Nat Nat
+      where
+        Foo8Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo8Sym0 arg) (Foo8Sym1 arg) =>
+                                 Foo8Sym0 a0123456789876543210
+    type instance Apply Foo8Sym0 a0123456789876543210 = Foo8 a0123456789876543210
+    type Foo7Sym1 (a0123456789876543210 :: Nat) =
+        Foo7 a0123456789876543210
+    instance SuppressUnusedWarnings Foo7Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo7Sym0KindInference) ())
+    data Foo7Sym0 :: (~>) Nat Nat
+      where
+        Foo7Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo7Sym0 arg) (Foo7Sym1 arg) =>
+                                 Foo7Sym0 a0123456789876543210
+    type instance Apply Foo7Sym0 a0123456789876543210 = Foo7 a0123456789876543210
+    type Foo6Sym1 (a0123456789876543210 :: Nat) =
+        Foo6 a0123456789876543210
+    instance SuppressUnusedWarnings Foo6Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo6Sym0KindInference) ())
+    data Foo6Sym0 :: (~>) Nat Nat
+      where
+        Foo6Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo6Sym0 arg) (Foo6Sym1 arg) =>
+                                 Foo6Sym0 a0123456789876543210
+    type instance Apply Foo6Sym0 a0123456789876543210 = Foo6 a0123456789876543210
+    type Foo5Sym1 (a0123456789876543210 :: Nat) =
+        Foo5 a0123456789876543210
+    instance SuppressUnusedWarnings Foo5Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ())
+    data Foo5Sym0 :: (~>) Nat Nat
+      where
+        Foo5Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) =>
+                                 Foo5Sym0 a0123456789876543210
+    type instance Apply Foo5Sym0 a0123456789876543210 = Foo5 a0123456789876543210
+    type Foo4Sym1 (a0123456789876543210 :: Nat) =
+        Foo4 a0123456789876543210
+    instance SuppressUnusedWarnings Foo4Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ())
+    data Foo4Sym0 :: (~>) Nat Nat
+      where
+        Foo4Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) =>
+                                 Foo4Sym0 a0123456789876543210
+    type instance Apply Foo4Sym0 a0123456789876543210 = Foo4 a0123456789876543210
+    type Foo3Sym1 (a0123456789876543210 :: Nat) =
+        Foo3 a0123456789876543210
+    instance SuppressUnusedWarnings Foo3Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ())
+    data Foo3Sym0 :: (~>) Nat Nat
+      where
+        Foo3Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>
+                                 Foo3Sym0 a0123456789876543210
+    type instance Apply Foo3Sym0 a0123456789876543210 = Foo3 a0123456789876543210
+    type Foo2Sym0 = Foo2
+    type Foo1Sym1 (a0123456789876543210 :: Nat) =
+        Foo1 a0123456789876543210
+    instance SuppressUnusedWarnings Foo1Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ())
+    data Foo1Sym0 :: (~>) Nat Nat
+      where
+        Foo1Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>
+                                 Foo1Sym0 a0123456789876543210
+    type instance Apply Foo1Sym0 a0123456789876543210 = Foo1 a0123456789876543210
+    type family Foo14 (a :: Nat) :: (Nat, Nat) where
+      Foo14 x = Apply (Apply Tuple2Sym0 (Let0123456789876543210ZSym1 x)) (Let0123456789876543210YSym1 x)
+    type family Foo13_ (a :: a) :: a where
+      Foo13_ y = y
+    type family Foo13 (a :: a) :: a where
+      Foo13 x = Apply Foo13_Sym0 (Let0123456789876543210BarSym1 x)
+    type family Foo12 (a :: Nat) :: Nat where
+      Foo12 x = Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) x) (Apply SuccSym0 (Apply SuccSym0 ZeroSym0))
+    type family Foo11 (a :: Nat) :: Nat where
+      Foo11 x = Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) (Apply SuccSym0 ZeroSym0)) (Let0123456789876543210ZSym1 x)
+    type family Foo10 (a :: Nat) :: Nat where
+      Foo10 x = Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) (Apply SuccSym0 ZeroSym0)) x
+    type family Foo9 (a :: Nat) :: Nat where
+      Foo9 x = Apply (Let0123456789876543210ZSym1 x) x
+    type family Foo8 (a :: Nat) :: Nat where
+      Foo8 x = Let0123456789876543210ZSym1 x
+    type family Foo7 (a :: Nat) :: Nat where
+      Foo7 x = Let0123456789876543210XSym1 x
+    type family Foo6 (a :: Nat) :: Nat where
+      Foo6 x = Let0123456789876543210ZSym1 x
+    type family Foo5 (a :: Nat) :: Nat where
+      Foo5 x = Apply (Let0123456789876543210FSym1 x) x
+    type family Foo4 (a :: Nat) :: Nat where
+      Foo4 x = Apply (Let0123456789876543210FSym1 x) x
+    type family Foo3 (a :: Nat) :: Nat where
+      Foo3 x = Let0123456789876543210YSym1 x
+    type family Foo2 :: Nat where
+      Foo2 = Let0123456789876543210ZSym0
+    type family Foo1 (a :: Nat) :: Nat where
+      Foo1 x = Let0123456789876543210YSym1 x
+    sFoo14 ::
+      forall (t :: Nat). Sing t -> Sing (Apply Foo14Sym0 t :: (Nat, Nat))
+    sFoo13_ ::
+      forall a (t :: a). Sing t -> Sing (Apply Foo13_Sym0 t :: a)
+    sFoo13 ::
+      forall a (t :: a). Sing t -> Sing (Apply Foo13Sym0 t :: a)
+    sFoo12 ::
+      forall (t :: Nat). Sing t -> Sing (Apply Foo12Sym0 t :: Nat)
+    sFoo11 ::
+      forall (t :: Nat). Sing t -> Sing (Apply Foo11Sym0 t :: Nat)
+    sFoo10 ::
+      forall (t :: Nat). Sing t -> Sing (Apply Foo10Sym0 t :: Nat)
+    sFoo9 ::
+      forall (t :: Nat). Sing t -> Sing (Apply Foo9Sym0 t :: Nat)
+    sFoo8 ::
+      forall (t :: Nat). Sing t -> Sing (Apply Foo8Sym0 t :: Nat)
+    sFoo7 ::
+      forall (t :: Nat). Sing t -> Sing (Apply Foo7Sym0 t :: Nat)
+    sFoo6 ::
+      forall (t :: Nat). Sing t -> Sing (Apply Foo6Sym0 t :: Nat)
+    sFoo5 ::
+      forall (t :: Nat). Sing t -> Sing (Apply Foo5Sym0 t :: Nat)
+    sFoo4 ::
+      forall (t :: Nat). Sing t -> Sing (Apply Foo4Sym0 t :: Nat)
+    sFoo3 ::
+      forall (t :: Nat). Sing t -> Sing (Apply Foo3Sym0 t :: Nat)
+    sFoo2 :: Sing (Foo2Sym0 :: Nat)
+    sFoo1 ::
+      forall (t :: Nat). Sing t -> Sing (Apply Foo1Sym0 t :: Nat)
+    sFoo14 (sX :: Sing x)
+      = let
+          sZ :: Sing (Let0123456789876543210ZSym1 x)
+          sY :: Sing (Let0123456789876543210YSym1 x)
+          sX_0123456789876543210 ::
+            Sing (Let0123456789876543210X_0123456789876543210Sym1 x)
+          sZ
+            = (id
+                 @(Sing (Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym1 x))))
+                (case sX_0123456789876543210 of {
+                   STuple2 _ (sY_0123456789876543210 :: Sing y_0123456789876543210)
+                     -> sY_0123456789876543210 })
+          sY
+            = (id
+                 @(Sing (Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym1 x))))
+                (case sX_0123456789876543210 of {
+                   STuple2 (sY_0123456789876543210 :: Sing y_0123456789876543210) _
+                     -> sY_0123456789876543210 })
+          sX_0123456789876543210
+            = (applySing
+                 ((applySing ((singFun2 @Tuple2Sym0) STuple2))
+                    ((applySing ((singFun1 @SuccSym0) SSucc)) sX)))
+                sX
+        in (applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sZ)) sY
+    sFoo13_ (sY :: Sing y) = sY
+    sFoo13 (sX :: Sing x)
+      = let
+          sBar :: Sing (Let0123456789876543210BarSym1 x :: a)
+          sBar = sX
+        in (applySing ((singFun1 @Foo13_Sym0) sFoo13_)) sBar
+    sFoo12 (sX :: Sing x)
+      = let
+          (%+) ::
+            forall (t :: Nat) (t :: Nat).
+            Sing t
+            -> Sing t
+               -> Sing (Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) t) t :: Nat)
+          (%+) SZero (sM :: Sing m) = sM
+          (%+) (SSucc (sN :: Sing n)) (sM :: Sing m)
+            = (applySing ((singFun1 @SuccSym0) SSucc))
+                ((applySing
+                    ((applySing ((singFun2 @((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x)) (%+)))
+                       sN))
+                   sX)
+        in
+          (applySing
+             ((applySing ((singFun2 @((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x)) (%+)))
+                sX))
+            ((applySing ((singFun1 @SuccSym0) SSucc))
+               ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))
+    sFoo11 (sX :: Sing x)
+      = let
+          sZ :: Sing (Let0123456789876543210ZSym1 x :: Nat)
+          (%+) ::
+            forall (t :: Nat) (t :: Nat).
+            Sing t
+            -> Sing t
+               -> Sing (Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) t) t :: Nat)
+          sZ = sX
+          (%+) SZero (sM :: Sing m) = sM
+          (%+) (SSucc (sN :: Sing n)) (sM :: Sing m)
+            = (applySing ((singFun1 @SuccSym0) SSucc))
+                ((applySing
+                    ((applySing ((singFun2 @((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x)) (%+)))
+                       sN))
+                   sM)
+        in
+          (applySing
+             ((applySing ((singFun2 @((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x)) (%+)))
+                ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
+            sZ
+    sFoo10 (sX :: Sing x)
+      = let
+          (%+) ::
+            forall (t :: Nat) (t :: Nat).
+            Sing t
+            -> Sing t
+               -> Sing (Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) t) t :: Nat)
+          (%+) SZero (sM :: Sing m) = sM
+          (%+) (SSucc (sN :: Sing n)) (sM :: Sing m)
+            = (applySing ((singFun1 @SuccSym0) SSucc))
+                ((applySing
+                    ((applySing ((singFun2 @((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x)) (%+)))
+                       sN))
+                   sM)
+        in
+          (applySing
+             ((applySing ((singFun2 @((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x)) (%+)))
+                ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
+            sX
+    sFoo9 (sX :: Sing x)
+      = let
+          sZ ::
+            forall (t :: Nat).
+            Sing t -> Sing (Apply (Let0123456789876543210ZSym1 x) t :: Nat)
+          sZ (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            = (applySing
+                 ((singFun1
+                     @(Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) x))
+                    (\ sX -> case sX of { (_ :: Sing x) -> sX })))
+                sA_0123456789876543210
+        in (applySing ((singFun1 @(Let0123456789876543210ZSym1 x)) sZ)) sX
+    sFoo8 (sX :: Sing x)
+      = let
+          sZ :: Sing (Let0123456789876543210ZSym1 x :: Nat)
+          sZ
+            = (applySing
+                 ((singFun1 @(Apply Lambda_0123456789876543210Sym0 x))
+                    (\ sX -> case sX of { (_ :: Sing x) -> sX })))
+                SZero
+        in sZ
+    sFoo7 (sX :: Sing x)
+      = let
+          sX :: Sing (Let0123456789876543210XSym1 x :: Nat)
+          sX = SZero
+        in sX
+    sFoo6 (sX :: Sing x)
+      = let
+          sF ::
+            forall (t :: Nat).
+            Sing t -> Sing (Apply (Let0123456789876543210FSym1 x) t :: Nat)
+          sF (sY :: Sing y) = (applySing ((singFun1 @SuccSym0) SSucc)) sY in
+        let
+          sZ :: Sing (Let0123456789876543210ZSym1 x :: Nat)
+          sZ
+            = (applySing ((singFun1 @(Let0123456789876543210FSym1 x)) sF)) sX
+        in sZ
+    sFoo5 (sX :: Sing x)
+      = let
+          sF ::
+            forall (t :: Nat).
+            Sing t -> Sing (Apply (Let0123456789876543210FSym1 x) t :: Nat)
+          sF (sY :: Sing y)
+            = let
+                sZ :: Sing (Let0123456789876543210ZSym2 y x :: Nat)
+                sZ = (applySing ((singFun1 @SuccSym0) SSucc)) sY
+              in (applySing ((singFun1 @SuccSym0) SSucc)) sZ
+        in (applySing ((singFun1 @(Let0123456789876543210FSym1 x)) sF)) sX
+    sFoo4 (sX :: Sing x)
+      = let
+          sF ::
+            forall (t :: Nat).
+            Sing t -> Sing (Apply (Let0123456789876543210FSym1 x) t :: Nat)
+          sF (sY :: Sing y) = (applySing ((singFun1 @SuccSym0) SSucc)) sY
+        in (applySing ((singFun1 @(Let0123456789876543210FSym1 x)) sF)) sX
+    sFoo3 (sX :: Sing x)
+      = let
+          sY :: Sing (Let0123456789876543210YSym1 x :: Nat)
+          sY = (applySing ((singFun1 @SuccSym0) SSucc)) sX
+        in sY
+    sFoo2
+      = let
+          sZ :: Sing Let0123456789876543210ZSym0
+          sY :: Sing Let0123456789876543210YSym0
+          sZ = (applySing ((singFun1 @SuccSym0) SSucc)) sY
+          sY = (applySing ((singFun1 @SuccSym0) SSucc)) SZero
+        in sZ
+    sFoo1 (sX :: Sing x)
+      = let
+          sY :: Sing (Let0123456789876543210YSym1 x :: Nat)
+          sY = (applySing ((singFun1 @SuccSym0) SSucc)) SZero
+        in sY
+    instance SingI (Foo14Sym0 :: (~>) Nat (Nat, Nat)) where
+      sing = (singFun1 @Foo14Sym0) sFoo14
+    instance SingI (Foo13_Sym0 :: (~>) a a) where
+      sing = (singFun1 @Foo13_Sym0) sFoo13_
+    instance SingI (Foo13Sym0 :: (~>) a a) where
+      sing = (singFun1 @Foo13Sym0) sFoo13
+    instance SingI (Foo12Sym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @Foo12Sym0) sFoo12
+    instance SingI (Foo11Sym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @Foo11Sym0) sFoo11
+    instance SingI (Foo10Sym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @Foo10Sym0) sFoo10
+    instance SingI (Foo9Sym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @Foo9Sym0) sFoo9
+    instance SingI (Foo8Sym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @Foo8Sym0) sFoo8
+    instance SingI (Foo7Sym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @Foo7Sym0) sFoo7
+    instance SingI (Foo6Sym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @Foo6Sym0) sFoo6
+    instance SingI (Foo5Sym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @Foo5Sym0) sFoo5
+    instance SingI (Foo4Sym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @Foo4Sym0) sFoo4
+    instance SingI (Foo3Sym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @Foo3Sym0) sFoo3
+    instance SingI (Foo1Sym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @Foo1Sym0) sFoo1
diff --git a/tests/compile-and-dump/Singletons/Maybe.ghc86.template b/tests/compile-and-dump/Singletons/Maybe.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/Maybe.ghc86.template
+++ /dev/null
@@ -1,140 +0,0 @@
-Singletons/Maybe.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| data Maybe a
-            = Nothing | Just a
-            deriving (Eq, Show) |]
-  ======>
-    data Maybe a
-      = Nothing | Just a
-      deriving (Eq, Show)
-    type NothingSym0 = Nothing
-    type JustSym1 (t0123456789876543210 :: a0123456789876543210) =
-        Just t0123456789876543210
-    instance SuppressUnusedWarnings JustSym0 where
-      suppressUnusedWarnings = snd (((,) JustSym0KindInference) ())
-    data JustSym0 :: forall a0123456789876543210.
-                     (~>) a0123456789876543210 (Maybe a0123456789876543210)
-      where
-        JustSym0KindInference :: forall t0123456789876543210
-                                        arg. SameKind (Apply JustSym0 arg) (JustSym1 arg) =>
-                                 JustSym0 t0123456789876543210
-    type instance Apply JustSym0 t0123456789876543210 = Just t0123456789876543210
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Maybe a) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where
-      ShowsPrec_0123456789876543210 _ Nothing a_0123456789876543210 = Apply (Apply ShowStringSym0 "Nothing") a_0123456789876543210
-      ShowsPrec_0123456789876543210 p_0123456789876543210 (Just arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (Data.Singletons.Prelude.Num.FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Just ")) (Apply (Apply ShowsPrecSym0 (Data.Singletons.Prelude.Num.FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Maybe a0123456789876543210) (a0123456789876543210 :: GHC.Types.Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Maybe a0123456789876543210) :: (~>) GHC.Types.Symbol GHC.Types.Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210.
-                                                                                      (~>) (Maybe a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210.
-                                              (~>) GHC.Types.Nat ((~>) (Maybe a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow (Maybe a) where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    type family Equals_0123456789876543210 (a :: Maybe a) (b :: Maybe a) :: Bool where
-      Equals_0123456789876543210 Nothing Nothing = TrueSym0
-      Equals_0123456789876543210 (Just a) (Just b) = (==) a b
-      Equals_0123456789876543210 (_ :: Maybe a) (_ :: Maybe a) = FalseSym0
-    instance PEq (Maybe a) where
-      type (==) a b = Equals_0123456789876543210 a b
-    data instance Sing :: Maybe a -> GHC.Types.Type
-      where
-        SNothing :: Sing Nothing
-        SJust :: forall a (n :: a). (Sing (n :: a)) -> Sing (Just n)
-    type SMaybe = (Sing :: Maybe a -> GHC.Types.Type)
-    instance SingKind a => SingKind (Maybe a) where
-      type Demote (Maybe a) = Maybe (Demote a)
-      fromSing SNothing = Nothing
-      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) }
-    instance SShow a => SShow (Maybe a) where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat)
-               (t2 :: Maybe a)
-               (t3 :: GHC.Types.Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) (Maybe a) ((~>) GHC.Types.Symbol GHC.Types.Symbol))
-                                                             -> GHC.Types.Type) t1) t2) t3)
-      sShowsPrec
-        _
-        SNothing
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "Nothing")))
-            sA_0123456789876543210
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        (SJust (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 10)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                          (sing :: Sing "Just "))))
-                   ((applySing
-                       ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                          (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 11))))
-                      sArg_0123456789876543210))))
-            sA_0123456789876543210
-    instance SEq a => SEq (Maybe a) where
-      (%==) SNothing SNothing = STrue
-      (%==) SNothing (SJust _) = SFalse
-      (%==) (SJust _) SNothing = SFalse
-      (%==) (SJust a) (SJust b) = ((%==) a) b
-    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)
-      (%~) (SJust a) (SJust b)
-        = case ((%~) a) b of
-            Proved Refl -> Proved Refl
-            Disproved contra
-              -> Disproved (\ refl -> case refl of { Refl -> contra Refl })
-    deriving instance Data.Singletons.ShowSing.ShowSing a =>
-                      Show (Sing (z :: Maybe a))
-    instance SingI Nothing where
-      sing = SNothing
-    instance SingI n => SingI (Just (n :: a)) where
-      sing = SJust sing
-    instance SingI (JustSym0 :: (~>) a (Maybe a)) where
-      sing = (singFun1 @JustSym0) SJust
-    instance SingI (TyCon1 Just :: (~>) a (Maybe a)) where
-      sing = (singFun1 @(TyCon1 Just)) SJust
diff --git a/tests/compile-and-dump/Singletons/Maybe.ghc88.template b/tests/compile-and-dump/Singletons/Maybe.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/Maybe.ghc88.template
@@ -0,0 +1,157 @@
+Singletons/Maybe.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| data Maybe a
+            = Nothing | Just a
+            deriving (Eq, Show) |]
+  ======>
+    data Maybe a
+      = Nothing | Just a
+      deriving (Eq, Show)
+    type NothingSym0 = Nothing
+    type JustSym1 (t0123456789876543210 :: a0123456789876543210) =
+        Just t0123456789876543210
+    instance SuppressUnusedWarnings JustSym0 where
+      suppressUnusedWarnings = snd (((,) JustSym0KindInference) ())
+    data JustSym0 :: forall a0123456789876543210.
+                     (~>) a0123456789876543210 (Maybe a0123456789876543210)
+      where
+        JustSym0KindInference :: forall t0123456789876543210
+                                        arg. SameKind (Apply JustSym0 arg) (JustSym1 arg) =>
+                                 JustSym0 t0123456789876543210
+    type instance Apply JustSym0 t0123456789876543210 = Just t0123456789876543210
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Maybe a) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where
+      ShowsPrec_0123456789876543210 _ Nothing a_0123456789876543210 = Apply (Apply ShowStringSym0 "Nothing") a_0123456789876543210
+      ShowsPrec_0123456789876543210 p_0123456789876543210 (Just arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (Data.Singletons.Prelude.Num.FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Just ")) (Apply (Apply ShowsPrecSym0 (Data.Singletons.Prelude.Num.FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Maybe a0123456789876543210) (a0123456789876543210 :: GHC.Types.Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Maybe a0123456789876543210) :: (~>) GHC.Types.Symbol GHC.Types.Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210.
+                                                                                      (~>) (Maybe a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210.
+                                              (~>) GHC.Types.Nat ((~>) (Maybe a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow (Maybe a) where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    type family Equals_0123456789876543210 (a :: Maybe a) (b :: Maybe a) :: Bool where
+      Equals_0123456789876543210 Nothing Nothing = TrueSym0
+      Equals_0123456789876543210 (Just a) (Just b) = (==) a b
+      Equals_0123456789876543210 (_ :: Maybe a) (_ :: Maybe a) = FalseSym0
+    instance PEq (Maybe a) where
+      type (==) a b = Equals_0123456789876543210 a b
+    data SMaybe :: forall a. Maybe a -> GHC.Types.Type
+      where
+        SNothing :: SMaybe Nothing
+        SJust :: forall a (n :: a). (Sing (n :: a)) -> SMaybe (Just n)
+    type instance Sing @(Maybe a) = SMaybe
+    instance SingKind a => SingKind (Maybe a) where
+      type Demote (Maybe a) = Maybe (Demote a)
+      fromSing SNothing = Nothing
+      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) }
+    instance SShow a => SShow (Maybe a) where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat)
+               (t2 :: Maybe a)
+               (t3 :: GHC.Types.Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) (Maybe a) ((~>) GHC.Types.Symbol GHC.Types.Symbol))
+                                                             -> GHC.Types.Type) t1) t2) t3)
+      sShowsPrec
+        _
+        SNothing
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "Nothing")))
+            sA_0123456789876543210
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        (SJust (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 10)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                          (sing :: Sing "Just "))))
+                   ((applySing
+                       ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                          (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 11))))
+                      sArg_0123456789876543210))))
+            sA_0123456789876543210
+    instance SEq a => SEq (Maybe a) where
+      (%==) SNothing SNothing = STrue
+      (%==) SNothing (SJust _) = SFalse
+      (%==) (SJust _) SNothing = SFalse
+      (%==) (SJust a) (SJust b) = ((%==) a) b
+    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)
+      (%~) (SJust a) (SJust b)
+        = case ((%~) a) b of
+            Proved Refl -> Proved Refl
+            Disproved contra
+              -> Disproved (\ refl -> case refl of { Refl -> contra Refl })
+    instance SDecide a =>
+             Data.Type.Equality.TestEquality (SMaybe :: Maybe a
+                                                        -> GHC.Types.Type) where
+      Data.Type.Equality.testEquality
+        = Data.Singletons.Decide.decideEquality
+    instance SDecide a =>
+             Data.Type.Coercion.TestCoercion (SMaybe :: Maybe a
+                                                        -> GHC.Types.Type) where
+      Data.Type.Coercion.testCoercion
+        = Data.Singletons.Decide.decideCoercion
+    instance Data.Singletons.ShowSing.ShowSing a =>
+             Show (SMaybe (z :: Maybe a)) where
+      showsPrec _ SNothing = showString "SNothing"
+      showsPrec
+        p_0123456789876543210
+        (SJust (arg_0123456789876543210 :: Sing argTy_0123456789876543210))
+        = (showParen (((>) p_0123456789876543210) 10))
+            (((.) (showString "SJust "))
+               ((showsPrec 11) arg_0123456789876543210)) ::
+            Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210 =>
+            ShowS
+    instance SingI Nothing where
+      sing = SNothing
+    instance SingI n => SingI (Just (n :: a)) where
+      sing = SJust sing
+    instance SingI (JustSym0 :: (~>) a (Maybe a)) where
+      sing = (singFun1 @JustSym0) SJust
diff --git a/tests/compile-and-dump/Singletons/Nat.ghc86.template b/tests/compile-and-dump/Singletons/Nat.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/Nat.ghc86.template
+++ /dev/null
@@ -1,266 +0,0 @@
-Singletons/Nat.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| plus :: Nat -> Nat -> Nat
-          plus Zero m = m
-          plus (Succ n) m = Succ (plus n m)
-          pred :: Nat -> Nat
-          pred Zero = Zero
-          pred (Succ n) = n
-          
-          data Nat
-            where
-              Zero :: Nat
-              Succ :: Nat -> Nat
-            deriving (Eq, Show, Read, Ord) |]
-  ======>
-    data Nat
-      where
-        Zero :: Nat
-        Succ :: Nat -> Nat
-      deriving (Eq, Show, Read, Ord)
-    plus :: Nat -> Nat -> Nat
-    plus Zero m = m
-    plus (Succ n) m = Succ ((plus n) m)
-    pred :: Nat -> Nat
-    pred Zero = Zero
-    pred (Succ n) = n
-    type ZeroSym0 = Zero
-    type SuccSym1 (t0123456789876543210 :: Nat) =
-        Succ t0123456789876543210
-    instance SuppressUnusedWarnings SuccSym0 where
-      suppressUnusedWarnings = snd (((,) SuccSym0KindInference) ())
-    data SuccSym0 :: (~>) Nat Nat
-      where
-        SuccSym0KindInference :: forall t0123456789876543210
-                                        arg. SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>
-                                 SuccSym0 t0123456789876543210
-    type instance Apply SuccSym0 t0123456789876543210 = Succ t0123456789876543210
-    type PredSym1 (a0123456789876543210 :: Nat) =
-        Pred a0123456789876543210
-    instance SuppressUnusedWarnings PredSym0 where
-      suppressUnusedWarnings = snd (((,) PredSym0KindInference) ())
-    data PredSym0 :: (~>) Nat Nat
-      where
-        PredSym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply PredSym0 arg) (PredSym1 arg) =>
-                                 PredSym0 a0123456789876543210
-    type instance Apply PredSym0 a0123456789876543210 = Pred a0123456789876543210
-    type PlusSym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
-        Plus a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (PlusSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) PlusSym1KindInference) ())
-    data PlusSym1 (a0123456789876543210 :: Nat) :: (~>) Nat Nat
-      where
-        PlusSym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (PlusSym1 a0123456789876543210) arg) (PlusSym2 a0123456789876543210 arg) =>
-                                 PlusSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (PlusSym1 a0123456789876543210) a0123456789876543210 = Plus a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings PlusSym0 where
-      suppressUnusedWarnings = snd (((,) PlusSym0KindInference) ())
-    data PlusSym0 :: (~>) Nat ((~>) Nat Nat)
-      where
-        PlusSym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply PlusSym0 arg) (PlusSym1 arg) =>
-                                 PlusSym0 a0123456789876543210
-    type instance Apply PlusSym0 a0123456789876543210 = PlusSym1 a0123456789876543210
-    type family Pred (a :: Nat) :: Nat where
-      Pred Zero = ZeroSym0
-      Pred (Succ n) = n
-    type family Plus (a :: Nat) (a :: Nat) :: Nat where
-      Plus Zero m = m
-      Plus (Succ n) m = Apply SuccSym0 (Apply (Apply PlusSym0 n) m)
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Nat) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where
-      ShowsPrec_0123456789876543210 _ Zero a_0123456789876543210 = Apply (Apply ShowStringSym0 "Zero") a_0123456789876543210
-      ShowsPrec_0123456789876543210 p_0123456789876543210 (Succ arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (Data.Singletons.Prelude.Num.FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Succ ")) (Apply (Apply ShowsPrecSym0 (Data.Singletons.Prelude.Num.FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Nat) (a0123456789876543210 :: GHC.Types.Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Nat) :: (~>) GHC.Types.Symbol GHC.Types.Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Nat ((~>) GHC.Types.Symbol GHC.Types.Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Nat ((~>) GHC.Types.Symbol GHC.Types.Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow Nat where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    type family Compare_0123456789876543210 (a :: Nat) (a :: Nat) :: Ordering where
-      Compare_0123456789876543210 Zero Zero = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
-      Compare_0123456789876543210 (Succ a_0123456789876543210) (Succ b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])
-      Compare_0123456789876543210 Zero (Succ _) = LTSym0
-      Compare_0123456789876543210 (Succ _) Zero = GTSym0
-    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
-        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
-    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Nat Ordering
-      where
-        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
-    data Compare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering)
-      where
-        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
-                                                        Compare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
-    instance POrd Nat where
-      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
-    type family Equals_0123456789876543210 (a :: Nat) (b :: Nat) :: Bool where
-      Equals_0123456789876543210 Zero Zero = TrueSym0
-      Equals_0123456789876543210 (Succ a) (Succ b) = (==) a b
-      Equals_0123456789876543210 (_ :: Nat) (_ :: Nat) = FalseSym0
-    instance PEq Nat where
-      type (==) a b = Equals_0123456789876543210 a b
-    sPred ::
-      forall (t :: Nat). Sing t -> Sing (Apply PredSym0 t :: Nat)
-    sPlus ::
-      forall (t :: Nat) (t :: Nat).
-      Sing t -> Sing t -> Sing (Apply (Apply PlusSym0 t) t :: Nat)
-    sPred SZero = SZero
-    sPred (SSucc (sN :: Sing n)) = sN
-    sPlus SZero (sM :: Sing m) = sM
-    sPlus (SSucc (sN :: Sing n)) (sM :: Sing m)
-      = (applySing ((singFun1 @SuccSym0) SSucc))
-          ((applySing ((applySing ((singFun2 @PlusSym0) sPlus)) sN)) sM)
-    instance SingI (PredSym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @PredSym0) sPred
-    instance SingI (PlusSym0 :: (~>) Nat ((~>) Nat Nat)) where
-      sing = (singFun2 @PlusSym0) sPlus
-    instance SingI d =>
-             SingI (PlusSym1 (d :: Nat) :: (~>) Nat Nat) where
-      sing = (singFun1 @(PlusSym1 (d :: Nat))) (sPlus (sing @d))
-    data instance Sing :: Nat -> GHC.Types.Type
-      where
-        SZero :: Sing Zero
-        SSucc :: forall (n :: Nat). (Sing (n :: Nat)) -> Sing (Succ n)
-    type SNat = (Sing :: Nat -> GHC.Types.Type)
-    instance SingKind Nat where
-      type Demote Nat = Nat
-      fromSing SZero = Zero
-      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) }
-    instance SShow Nat => SShow Nat where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: Nat) (t3 :: GHC.Types.Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) Nat ((~>) GHC.Types.Symbol GHC.Types.Symbol))
-                                                             -> GHC.Types.Type) t1) t2) t3)
-      sShowsPrec
-        _
-        SZero
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "Zero")))
-            sA_0123456789876543210
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        (SSucc (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 10)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                          (sing :: Sing "Succ "))))
-                   ((applySing
-                       ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                          (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 11))))
-                      sArg_0123456789876543210))))
-            sA_0123456789876543210
-    instance SOrd Nat => SOrd Nat where
-      sCompare ::
-        forall (t1 :: Nat) (t2 :: Nat).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (CompareSym0 :: TyFun Nat ((~>) Nat Ordering)
-                                                 -> GHC.Types.Type) t1) t2)
-      sCompare SZero SZero
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            Data.Singletons.Prelude.Instances.SNil
-      sCompare
-        (SSucc (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        (SSucc (sB_0123456789876543210 :: Sing b_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            ((applySing
-                ((applySing
-                    ((singFun2 @(:@#@$))
-                       Data.Singletons.Prelude.Instances.SCons))
-                   ((applySing
-                       ((applySing ((singFun2 @CompareSym0) sCompare))
-                          sA_0123456789876543210))
-                      sB_0123456789876543210)))
-               Data.Singletons.Prelude.Instances.SNil)
-      sCompare SZero (SSucc _) = SLT
-      sCompare (SSucc _) SZero = SGT
-    instance SEq Nat => SEq Nat where
-      (%==) SZero SZero = STrue
-      (%==) SZero (SSucc _) = SFalse
-      (%==) (SSucc _) SZero = SFalse
-      (%==) (SSucc a) (SSucc b) = ((%==) a) b
-    instance SDecide Nat => SDecide Nat where
-      (%~) SZero SZero = Proved Refl
-      (%~) SZero (SSucc _) = Disproved (\ x -> case x of)
-      (%~) (SSucc _) SZero = Disproved (\ x -> case x of)
-      (%~) (SSucc a) (SSucc b)
-        = case ((%~) a) b of
-            Proved Refl -> Proved Refl
-            Disproved contra
-              -> Disproved (\ refl -> case refl of { Refl -> contra Refl })
-    deriving instance Data.Singletons.ShowSing.ShowSing Nat =>
-                      Show (Sing (z :: Nat))
-    instance SingI Zero where
-      sing = SZero
-    instance SingI n => SingI (Succ (n :: Nat)) where
-      sing = SSucc sing
-    instance SingI (SuccSym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @SuccSym0) SSucc
-    instance SingI (TyCon1 Succ :: (~>) Nat Nat) where
-      sing = (singFun1 @(TyCon1 Succ)) SSucc
diff --git a/tests/compile-and-dump/Singletons/Nat.ghc88.template b/tests/compile-and-dump/Singletons/Nat.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/Nat.ghc88.template
@@ -0,0 +1,283 @@
+Singletons/Nat.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| plus :: Nat -> Nat -> Nat
+          plus Zero m = m
+          plus (Succ n) m = Succ (plus n m)
+          pred :: Nat -> Nat
+          pred Zero = Zero
+          pred (Succ n) = n
+          
+          data Nat
+            where
+              Zero :: Nat
+              Succ :: Nat -> Nat
+            deriving (Eq, Show, Read, Ord) |]
+  ======>
+    data Nat
+      where
+        Zero :: Nat
+        Succ :: Nat -> Nat
+      deriving (Eq, Show, Read, Ord)
+    plus :: Nat -> Nat -> Nat
+    plus Zero m = m
+    plus (Succ n) m = Succ ((plus n) m)
+    pred :: Nat -> Nat
+    pred Zero = Zero
+    pred (Succ n) = n
+    type ZeroSym0 = Zero
+    type SuccSym1 (t0123456789876543210 :: Nat) =
+        Succ t0123456789876543210
+    instance SuppressUnusedWarnings SuccSym0 where
+      suppressUnusedWarnings = snd (((,) SuccSym0KindInference) ())
+    data SuccSym0 :: (~>) Nat Nat
+      where
+        SuccSym0KindInference :: forall t0123456789876543210
+                                        arg. SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>
+                                 SuccSym0 t0123456789876543210
+    type instance Apply SuccSym0 t0123456789876543210 = Succ t0123456789876543210
+    type PredSym1 (a0123456789876543210 :: Nat) =
+        Pred a0123456789876543210
+    instance SuppressUnusedWarnings PredSym0 where
+      suppressUnusedWarnings = snd (((,) PredSym0KindInference) ())
+    data PredSym0 :: (~>) Nat Nat
+      where
+        PredSym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply PredSym0 arg) (PredSym1 arg) =>
+                                 PredSym0 a0123456789876543210
+    type instance Apply PredSym0 a0123456789876543210 = Pred a0123456789876543210
+    type PlusSym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
+        Plus a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (PlusSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) PlusSym1KindInference) ())
+    data PlusSym1 (a0123456789876543210 :: Nat) :: (~>) Nat Nat
+      where
+        PlusSym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (PlusSym1 a0123456789876543210) arg) (PlusSym2 a0123456789876543210 arg) =>
+                                 PlusSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (PlusSym1 a0123456789876543210) a0123456789876543210 = Plus a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings PlusSym0 where
+      suppressUnusedWarnings = snd (((,) PlusSym0KindInference) ())
+    data PlusSym0 :: (~>) Nat ((~>) Nat Nat)
+      where
+        PlusSym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply PlusSym0 arg) (PlusSym1 arg) =>
+                                 PlusSym0 a0123456789876543210
+    type instance Apply PlusSym0 a0123456789876543210 = PlusSym1 a0123456789876543210
+    type family Pred (a :: Nat) :: Nat where
+      Pred Zero = ZeroSym0
+      Pred (Succ n) = n
+    type family Plus (a :: Nat) (a :: Nat) :: Nat where
+      Plus Zero m = m
+      Plus (Succ n) m = Apply SuccSym0 (Apply (Apply PlusSym0 n) m)
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Nat) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where
+      ShowsPrec_0123456789876543210 _ Zero a_0123456789876543210 = Apply (Apply ShowStringSym0 "Zero") a_0123456789876543210
+      ShowsPrec_0123456789876543210 p_0123456789876543210 (Succ arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (Data.Singletons.Prelude.Num.FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Succ ")) (Apply (Apply ShowsPrecSym0 (Data.Singletons.Prelude.Num.FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Nat) (a0123456789876543210 :: GHC.Types.Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Nat) :: (~>) GHC.Types.Symbol GHC.Types.Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Nat ((~>) GHC.Types.Symbol GHC.Types.Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Nat ((~>) GHC.Types.Symbol GHC.Types.Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow Nat where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    type family Compare_0123456789876543210 (a :: Nat) (a :: Nat) :: Ordering where
+      Compare_0123456789876543210 Zero Zero = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
+      Compare_0123456789876543210 (Succ a_0123456789876543210) (Succ b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])
+      Compare_0123456789876543210 Zero (Succ _) = LTSym0
+      Compare_0123456789876543210 (Succ _) Zero = GTSym0
+    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
+        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
+    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Nat Ordering
+      where
+        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
+    data Compare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering)
+      where
+        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
+                                                        Compare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
+    instance POrd Nat where
+      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
+    type family Equals_0123456789876543210 (a :: Nat) (b :: Nat) :: Bool where
+      Equals_0123456789876543210 Zero Zero = TrueSym0
+      Equals_0123456789876543210 (Succ a) (Succ b) = (==) a b
+      Equals_0123456789876543210 (_ :: Nat) (_ :: Nat) = FalseSym0
+    instance PEq Nat where
+      type (==) a b = Equals_0123456789876543210 a b
+    sPred ::
+      forall (t :: Nat). Sing t -> Sing (Apply PredSym0 t :: Nat)
+    sPlus ::
+      forall (t :: Nat) (t :: Nat).
+      Sing t -> Sing t -> Sing (Apply (Apply PlusSym0 t) t :: Nat)
+    sPred SZero = SZero
+    sPred (SSucc (sN :: Sing n)) = sN
+    sPlus SZero (sM :: Sing m) = sM
+    sPlus (SSucc (sN :: Sing n)) (sM :: Sing m)
+      = (applySing ((singFun1 @SuccSym0) SSucc))
+          ((applySing ((applySing ((singFun2 @PlusSym0) sPlus)) sN)) sM)
+    instance SingI (PredSym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @PredSym0) sPred
+    instance SingI (PlusSym0 :: (~>) Nat ((~>) Nat Nat)) where
+      sing = (singFun2 @PlusSym0) sPlus
+    instance SingI d =>
+             SingI (PlusSym1 (d :: Nat) :: (~>) Nat Nat) where
+      sing = (singFun1 @(PlusSym1 (d :: Nat))) (sPlus (sing @d))
+    data SNat :: Nat -> GHC.Types.Type
+      where
+        SZero :: SNat Zero
+        SSucc :: forall (n :: Nat). (Sing (n :: Nat)) -> SNat (Succ n)
+    type instance Sing @Nat = SNat
+    instance SingKind Nat where
+      type Demote Nat = Nat
+      fromSing SZero = Zero
+      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) }
+    instance SShow Nat => SShow Nat where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: Nat) (t3 :: GHC.Types.Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) Nat ((~>) GHC.Types.Symbol GHC.Types.Symbol))
+                                                             -> GHC.Types.Type) t1) t2) t3)
+      sShowsPrec
+        _
+        SZero
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "Zero")))
+            sA_0123456789876543210
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        (SSucc (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 10)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                          (sing :: Sing "Succ "))))
+                   ((applySing
+                       ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                          (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 11))))
+                      sArg_0123456789876543210))))
+            sA_0123456789876543210
+    instance SOrd Nat => SOrd Nat where
+      sCompare ::
+        forall (t1 :: Nat) (t2 :: Nat).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (CompareSym0 :: TyFun Nat ((~>) Nat Ordering)
+                                                 -> GHC.Types.Type) t1) t2)
+      sCompare SZero SZero
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            Data.Singletons.Prelude.Instances.SNil
+      sCompare
+        (SSucc (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        (SSucc (sB_0123456789876543210 :: Sing b_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            ((applySing
+                ((applySing
+                    ((singFun2 @(:@#@$))
+                       Data.Singletons.Prelude.Instances.SCons))
+                   ((applySing
+                       ((applySing ((singFun2 @CompareSym0) sCompare))
+                          sA_0123456789876543210))
+                      sB_0123456789876543210)))
+               Data.Singletons.Prelude.Instances.SNil)
+      sCompare SZero (SSucc _) = SLT
+      sCompare (SSucc _) SZero = SGT
+    instance SEq Nat => SEq Nat where
+      (%==) SZero SZero = STrue
+      (%==) SZero (SSucc _) = SFalse
+      (%==) (SSucc _) SZero = SFalse
+      (%==) (SSucc a) (SSucc b) = ((%==) a) b
+    instance SDecide Nat => SDecide Nat where
+      (%~) SZero SZero = Proved Refl
+      (%~) SZero (SSucc _) = Disproved (\ x -> case x of)
+      (%~) (SSucc _) SZero = Disproved (\ x -> case x of)
+      (%~) (SSucc a) (SSucc b)
+        = case ((%~) a) b of
+            Proved Refl -> Proved Refl
+            Disproved contra
+              -> Disproved (\ refl -> case refl of { Refl -> contra Refl })
+    instance SDecide Nat =>
+             Data.Type.Equality.TestEquality (SNat :: Nat
+                                                      -> GHC.Types.Type) where
+      Data.Type.Equality.testEquality
+        = Data.Singletons.Decide.decideEquality
+    instance SDecide Nat =>
+             Data.Type.Coercion.TestCoercion (SNat :: Nat
+                                                      -> GHC.Types.Type) where
+      Data.Type.Coercion.testCoercion
+        = Data.Singletons.Decide.decideCoercion
+    instance Data.Singletons.ShowSing.ShowSing Nat =>
+             Show (SNat (z :: Nat)) where
+      showsPrec _ SZero = showString "SZero"
+      showsPrec
+        p_0123456789876543210
+        (SSucc (arg_0123456789876543210 :: Sing argTy_0123456789876543210))
+        = (showParen (((>) p_0123456789876543210) 10))
+            (((.) (showString "SSucc "))
+               ((showsPrec 11) arg_0123456789876543210)) ::
+            Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210 =>
+            ShowS
+    instance SingI Zero where
+      sing = SZero
+    instance SingI n => SingI (Succ (n :: Nat)) where
+      sing = SSucc sing
+    instance SingI (SuccSym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @SuccSym0) SSucc
diff --git a/tests/compile-and-dump/Singletons/NatSymbolReflexive.ghc86.template b/tests/compile-and-dump/Singletons/NatSymbolReflexive.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/NatSymbolReflexive.ghc86.template
+++ /dev/null
diff --git a/tests/compile-and-dump/Singletons/NatSymbolReflexive.ghc88.template b/tests/compile-and-dump/Singletons/NatSymbolReflexive.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/NatSymbolReflexive.ghc88.template
diff --git a/tests/compile-and-dump/Singletons/Operators.ghc86.template b/tests/compile-and-dump/Singletons/Operators.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/Operators.ghc86.template
+++ /dev/null
@@ -1,128 +0,0 @@
-Singletons/Operators.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| child :: Foo -> Foo
-          child FLeaf = FLeaf
-          child (a :+: _) = a
-          (+) :: Nat -> Nat -> Nat
-          Zero + m = m
-          (Succ n) + m = Succ (n + m)
-          
-          data Foo
-            where
-              FLeaf :: Foo
-              (:+:) :: Foo -> Foo -> Foo |]
-  ======>
-    data Foo
-      where
-        FLeaf :: Foo
-        (:+:) :: Foo -> Foo -> Foo
-    child :: Foo -> Foo
-    child FLeaf = FLeaf
-    child (a :+: _) = a
-    (+) :: Nat -> Nat -> Nat
-    (+) Zero m = m
-    (+) (Succ n) m = Succ (n + m)
-    type FLeafSym0 = FLeaf
-    type (:+:@#@$$$) (t0123456789876543210 :: Foo) (t0123456789876543210 :: Foo) =
-        (:+:) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings ((:+:@#@$$) t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (::+:@#@$$###)) ())
-    data (:+:@#@$$) (t0123456789876543210 :: Foo) :: (~>) Foo Foo
-      where
-        (::+:@#@$$###) :: forall t0123456789876543210
-                                 t0123456789876543210
-                                 arg. SameKind (Apply ((:+:@#@$$) t0123456789876543210) arg) ((:+:@#@$$$) t0123456789876543210 arg) =>
-                          (:+:@#@$$) t0123456789876543210 t0123456789876543210
-    type instance Apply ((:+:@#@$$) t0123456789876543210) t0123456789876543210 = (:+:) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (:+:@#@$) where
-      suppressUnusedWarnings = snd (((,) (::+:@#@$###)) ())
-    data (:+:@#@$) :: (~>) Foo ((~>) Foo Foo)
-      where
-        (::+:@#@$###) :: forall t0123456789876543210
-                                arg. SameKind (Apply (:+:@#@$) arg) ((:+:@#@$$) arg) =>
-                         (:+:@#@$) t0123456789876543210
-    type instance Apply (:+:@#@$) t0123456789876543210 = (:+:@#@$$) t0123456789876543210
-    type (+@#@$$$) (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
-        (+) a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ((+@#@$$) a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (:+@#@$$###)) ())
-    data (+@#@$$) (a0123456789876543210 :: Nat) :: (~>) Nat Nat
-      where
-        (:+@#@$$###) :: forall a0123456789876543210
-                               a0123456789876543210
-                               arg. SameKind (Apply ((+@#@$$) a0123456789876543210) arg) ((+@#@$$$) a0123456789876543210 arg) =>
-                        (+@#@$$) a0123456789876543210 a0123456789876543210
-    type instance Apply ((+@#@$$) a0123456789876543210) a0123456789876543210 = (+) a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (+@#@$) where
-      suppressUnusedWarnings = snd (((,) (:+@#@$###)) ())
-    data (+@#@$) :: (~>) Nat ((~>) Nat Nat)
-      where
-        (:+@#@$###) :: forall a0123456789876543210
-                              arg. SameKind (Apply (+@#@$) arg) ((+@#@$$) arg) =>
-                       (+@#@$) a0123456789876543210
-    type instance Apply (+@#@$) a0123456789876543210 = (+@#@$$) a0123456789876543210
-    type ChildSym1 (a0123456789876543210 :: Foo) =
-        Child a0123456789876543210
-    instance SuppressUnusedWarnings ChildSym0 where
-      suppressUnusedWarnings = snd (((,) ChildSym0KindInference) ())
-    data ChildSym0 :: (~>) Foo Foo
-      where
-        ChildSym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply ChildSym0 arg) (ChildSym1 arg) =>
-                                  ChildSym0 a0123456789876543210
-    type instance Apply ChildSym0 a0123456789876543210 = Child a0123456789876543210
-    type family (+) (a :: Nat) (a :: Nat) :: Nat where
-      (+)  'Zero m = m
-      (+) ( 'Succ n) m = Apply SuccSym0 (Apply (Apply (+@#@$) n) m)
-    type family Child (a :: Foo) :: Foo where
-      Child FLeaf = FLeafSym0
-      Child ((:+:) a _) = a
-    (%+) ::
-      forall (t :: Nat) (t :: Nat).
-      Sing t -> Sing t -> Sing (Apply (Apply (+@#@$) t) t :: Nat)
-    sChild ::
-      forall (t :: Foo). Sing t -> Sing (Apply ChildSym0 t :: Foo)
-    (%+) SZero (sM :: Sing m) = sM
-    (%+) (SSucc (sN :: Sing n)) (sM :: Sing m)
-      = (applySing ((singFun1 @SuccSym0) SSucc))
-          ((applySing ((applySing ((singFun2 @(+@#@$)) (%+))) sN)) sM)
-    sChild SFLeaf = SFLeaf
-    sChild ((:%+:) (sA :: Sing a) _) = sA
-    instance SingI ((+@#@$) :: (~>) Nat ((~>) Nat Nat)) where
-      sing = (singFun2 @(+@#@$)) (%+)
-    instance SingI d =>
-             SingI ((+@#@$$) (d :: Nat) :: (~>) Nat Nat) where
-      sing = (singFun1 @((+@#@$$) (d :: Nat))) ((%+) (sing @d))
-    instance SingI (ChildSym0 :: (~>) Foo Foo) where
-      sing = (singFun1 @ChildSym0) sChild
-    data instance Sing :: Foo -> GHC.Types.Type
-      where
-        SFLeaf :: Sing FLeaf
-        (:%+:) :: forall (n :: Foo) (n :: Foo).
-                  (Sing (n :: Foo)) -> (Sing (n :: Foo)) -> Sing ((:+:) n n)
-    type SFoo = (Sing :: Foo -> GHC.Types.Type)
-    instance SingKind Foo where
-      type Demote Foo = Foo
-      fromSing SFLeaf = FLeaf
-      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) }
-    instance SingI FLeaf where
-      sing = SFLeaf
-    instance (SingI n, SingI n) =>
-             SingI ((:+:) (n :: Foo) (n :: Foo)) where
-      sing = ((:%+:) sing) sing
-    instance SingI ((:+:@#@$) :: (~>) Foo ((~>) Foo Foo)) where
-      sing = (singFun2 @(:+:@#@$)) (:%+:)
-    instance SingI (TyCon2 (:+:) :: (~>) Foo ((~>) Foo Foo)) where
-      sing = (singFun2 @(TyCon2 (:+:))) (:%+:)
-    instance SingI d =>
-             SingI ((:+:@#@$$) (d :: Foo) :: (~>) Foo Foo) where
-      sing = (singFun1 @((:+:@#@$$) (d :: Foo))) ((:%+:) (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 ((:+:) (d :: Foo)) :: (~>) Foo Foo) where
-      sing = (singFun1 @(TyCon1 ((:+:) (d :: Foo)))) ((:%+:) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/Operators.ghc88.template b/tests/compile-and-dump/Singletons/Operators.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/Operators.ghc88.template
@@ -0,0 +1,123 @@
+Singletons/Operators.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| child :: Foo -> Foo
+          child FLeaf = FLeaf
+          child (a :+: _) = a
+          (+) :: Nat -> Nat -> Nat
+          Zero + m = m
+          (Succ n) + m = Succ (n + m)
+          
+          data Foo
+            where
+              FLeaf :: Foo
+              (:+:) :: Foo -> Foo -> Foo |]
+  ======>
+    data Foo
+      where
+        FLeaf :: Foo
+        (:+:) :: Foo -> Foo -> Foo
+    child :: Foo -> Foo
+    child FLeaf = FLeaf
+    child (a :+: _) = a
+    (+) :: Nat -> Nat -> Nat
+    (+) Zero m = m
+    (+) (Succ n) m = Succ (n + m)
+    type FLeafSym0 = FLeaf
+    type (:+:@#@$$$) (t0123456789876543210 :: Foo) (t0123456789876543210 :: Foo) =
+        (:+:) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings ((:+:@#@$$) t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (::+:@#@$$###)) ())
+    data (:+:@#@$$) (t0123456789876543210 :: Foo) :: (~>) Foo Foo
+      where
+        (::+:@#@$$###) :: forall t0123456789876543210
+                                 t0123456789876543210
+                                 arg. SameKind (Apply ((:+:@#@$$) t0123456789876543210) arg) ((:+:@#@$$$) t0123456789876543210 arg) =>
+                          (:+:@#@$$) t0123456789876543210 t0123456789876543210
+    type instance Apply ((:+:@#@$$) t0123456789876543210) t0123456789876543210 = (:+:) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (:+:@#@$) where
+      suppressUnusedWarnings = snd (((,) (::+:@#@$###)) ())
+    data (:+:@#@$) :: (~>) Foo ((~>) Foo Foo)
+      where
+        (::+:@#@$###) :: forall t0123456789876543210
+                                arg. SameKind (Apply (:+:@#@$) arg) ((:+:@#@$$) arg) =>
+                         (:+:@#@$) t0123456789876543210
+    type instance Apply (:+:@#@$) t0123456789876543210 = (:+:@#@$$) t0123456789876543210
+    type (+@#@$$$) (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
+        (+) a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ((+@#@$$) a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (:+@#@$$###)) ())
+    data (+@#@$$) (a0123456789876543210 :: Nat) :: (~>) Nat Nat
+      where
+        (:+@#@$$###) :: forall a0123456789876543210
+                               a0123456789876543210
+                               arg. SameKind (Apply ((+@#@$$) a0123456789876543210) arg) ((+@#@$$$) a0123456789876543210 arg) =>
+                        (+@#@$$) a0123456789876543210 a0123456789876543210
+    type instance Apply ((+@#@$$) a0123456789876543210) a0123456789876543210 = (+) a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (+@#@$) where
+      suppressUnusedWarnings = snd (((,) (:+@#@$###)) ())
+    data (+@#@$) :: (~>) Nat ((~>) Nat Nat)
+      where
+        (:+@#@$###) :: forall a0123456789876543210
+                              arg. SameKind (Apply (+@#@$) arg) ((+@#@$$) arg) =>
+                       (+@#@$) a0123456789876543210
+    type instance Apply (+@#@$) a0123456789876543210 = (+@#@$$) a0123456789876543210
+    type ChildSym1 (a0123456789876543210 :: Foo) =
+        Child a0123456789876543210
+    instance SuppressUnusedWarnings ChildSym0 where
+      suppressUnusedWarnings = snd (((,) ChildSym0KindInference) ())
+    data ChildSym0 :: (~>) Foo Foo
+      where
+        ChildSym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply ChildSym0 arg) (ChildSym1 arg) =>
+                                  ChildSym0 a0123456789876543210
+    type instance Apply ChildSym0 a0123456789876543210 = Child a0123456789876543210
+    type family (+) (a :: Nat) (a :: Nat) :: Nat where
+      (+) 'Zero m = m
+      (+) ('Succ n) m = Apply SuccSym0 (Apply (Apply (+@#@$) n) m)
+    type family Child (a :: Foo) :: Foo where
+      Child FLeaf = FLeafSym0
+      Child ((:+:) a _) = a
+    (%+) ::
+      forall (t :: Nat) (t :: Nat).
+      Sing t -> Sing t -> Sing (Apply (Apply (+@#@$) t) t :: Nat)
+    sChild ::
+      forall (t :: Foo). Sing t -> Sing (Apply ChildSym0 t :: Foo)
+    (%+) SZero (sM :: Sing m) = sM
+    (%+) (SSucc (sN :: Sing n)) (sM :: Sing m)
+      = (applySing ((singFun1 @SuccSym0) SSucc))
+          ((applySing ((applySing ((singFun2 @(+@#@$)) (%+))) sN)) sM)
+    sChild SFLeaf = SFLeaf
+    sChild ((:%+:) (sA :: Sing a) _) = sA
+    instance SingI ((+@#@$) :: (~>) Nat ((~>) Nat Nat)) where
+      sing = (singFun2 @(+@#@$)) (%+)
+    instance SingI d =>
+             SingI ((+@#@$$) (d :: Nat) :: (~>) Nat Nat) where
+      sing = (singFun1 @((+@#@$$) (d :: Nat))) ((%+) (sing @d))
+    instance SingI (ChildSym0 :: (~>) Foo Foo) where
+      sing = (singFun1 @ChildSym0) sChild
+    data SFoo :: Foo -> GHC.Types.Type
+      where
+        SFLeaf :: SFoo FLeaf
+        (:%+:) :: forall (n :: Foo) (n :: Foo).
+                  (Sing (n :: Foo)) -> (Sing (n :: Foo)) -> SFoo ((:+:) n n)
+    type instance Sing @Foo = SFoo
+    instance SingKind Foo where
+      type Demote Foo = Foo
+      fromSing SFLeaf = FLeaf
+      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) }
+    instance SingI FLeaf where
+      sing = SFLeaf
+    instance (SingI n, SingI n) =>
+             SingI ((:+:) (n :: Foo) (n :: Foo)) where
+      sing = ((:%+:) sing) sing
+    instance SingI ((:+:@#@$) :: (~>) Foo ((~>) Foo Foo)) where
+      sing = (singFun2 @(:+:@#@$)) (:%+:)
+    instance SingI d =>
+             SingI ((:+:@#@$$) (d :: Foo) :: (~>) Foo Foo) where
+      sing = (singFun1 @((:+:@#@$$) (d :: Foo))) ((:%+:) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/OrdDeriving.ghc86.template b/tests/compile-and-dump/Singletons/OrdDeriving.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/OrdDeriving.ghc86.template
+++ /dev/null
@@ -1,1235 +0,0 @@
-Singletons/OrdDeriving.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| data Nat
-            = Zero | Succ Nat
-            deriving (Eq, Ord)
-          data Foo a b c d
-            = A a b c d |
-              B a b c d |
-              C a b c d |
-              D a b c d |
-              E a b c d |
-              F a b c d
-            deriving (Eq, Ord) |]
-  ======>
-    data Nat
-      = Zero | Succ Nat
-      deriving (Eq, Ord)
-    data Foo a b c d
-      = A a b c d |
-        B a b c d |
-        C a b c d |
-        D a b c d |
-        E a b c d |
-        F a b c d
-      deriving (Eq, Ord)
-    type ZeroSym0 = Zero
-    type SuccSym1 (t0123456789876543210 :: Nat) =
-        Succ t0123456789876543210
-    instance SuppressUnusedWarnings SuccSym0 where
-      suppressUnusedWarnings = snd (((,) SuccSym0KindInference) ())
-    data SuccSym0 :: (~>) Nat Nat
-      where
-        SuccSym0KindInference :: forall t0123456789876543210
-                                        arg. SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>
-                                 SuccSym0 t0123456789876543210
-    type instance Apply SuccSym0 t0123456789876543210 = Succ t0123456789876543210
-    type ASym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) =
-        A t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (ASym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) ASym3KindInference) ())
-    data ASym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210.
-                                                                                                                                                               (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)
-      where
-        ASym3KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (ASym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (ASym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
-                              ASym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (ASym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = A t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (ASym2 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) ASym2KindInference) ())
-    data ASym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210
-                                                                                                                       d0123456789876543210.
-                                                                                                                (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))
-      where
-        ASym2KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (ASym2 t0123456789876543210 t0123456789876543210) arg) (ASym3 t0123456789876543210 t0123456789876543210 arg) =>
-                              ASym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (ASym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = ASym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (ASym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) ASym1KindInference) ())
-    data ASym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
-                                                                        c0123456789876543210
-                                                                        d0123456789876543210.
-                                                                 (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))
-      where
-        ASym1KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (ASym1 t0123456789876543210) arg) (ASym2 t0123456789876543210 arg) =>
-                              ASym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (ASym1 t0123456789876543210) t0123456789876543210 = ASym2 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings ASym0 where
-      suppressUnusedWarnings = snd (((,) ASym0KindInference) ())
-    data ASym0 :: forall a0123456789876543210
-                         b0123456789876543210
-                         c0123456789876543210
-                         d0123456789876543210.
-                  (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))))
-      where
-        ASym0KindInference :: forall t0123456789876543210
-                                     arg. SameKind (Apply ASym0 arg) (ASym1 arg) =>
-                              ASym0 t0123456789876543210
-    type instance Apply ASym0 t0123456789876543210 = ASym1 t0123456789876543210
-    type BSym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) =
-        B t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (BSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) BSym3KindInference) ())
-    data BSym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210.
-                                                                                                                                                               (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)
-      where
-        BSym3KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (BSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (BSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
-                              BSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (BSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = B t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (BSym2 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) BSym2KindInference) ())
-    data BSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210
-                                                                                                                       d0123456789876543210.
-                                                                                                                (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))
-      where
-        BSym2KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (BSym2 t0123456789876543210 t0123456789876543210) arg) (BSym3 t0123456789876543210 t0123456789876543210 arg) =>
-                              BSym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (BSym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = BSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (BSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) BSym1KindInference) ())
-    data BSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
-                                                                        c0123456789876543210
-                                                                        d0123456789876543210.
-                                                                 (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))
-      where
-        BSym1KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (BSym1 t0123456789876543210) arg) (BSym2 t0123456789876543210 arg) =>
-                              BSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (BSym1 t0123456789876543210) t0123456789876543210 = BSym2 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings BSym0 where
-      suppressUnusedWarnings = snd (((,) BSym0KindInference) ())
-    data BSym0 :: forall a0123456789876543210
-                         b0123456789876543210
-                         c0123456789876543210
-                         d0123456789876543210.
-                  (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))))
-      where
-        BSym0KindInference :: forall t0123456789876543210
-                                     arg. SameKind (Apply BSym0 arg) (BSym1 arg) =>
-                              BSym0 t0123456789876543210
-    type instance Apply BSym0 t0123456789876543210 = BSym1 t0123456789876543210
-    type CSym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) =
-        C t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (CSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) CSym3KindInference) ())
-    data CSym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210.
-                                                                                                                                                               (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)
-      where
-        CSym3KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (CSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (CSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
-                              CSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (CSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = C t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (CSym2 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) CSym2KindInference) ())
-    data CSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210
-                                                                                                                       d0123456789876543210.
-                                                                                                                (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))
-      where
-        CSym2KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (CSym2 t0123456789876543210 t0123456789876543210) arg) (CSym3 t0123456789876543210 t0123456789876543210 arg) =>
-                              CSym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (CSym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = CSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (CSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) CSym1KindInference) ())
-    data CSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
-                                                                        c0123456789876543210
-                                                                        d0123456789876543210.
-                                                                 (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))
-      where
-        CSym1KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (CSym1 t0123456789876543210) arg) (CSym2 t0123456789876543210 arg) =>
-                              CSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (CSym1 t0123456789876543210) t0123456789876543210 = CSym2 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings CSym0 where
-      suppressUnusedWarnings = snd (((,) CSym0KindInference) ())
-    data CSym0 :: forall a0123456789876543210
-                         b0123456789876543210
-                         c0123456789876543210
-                         d0123456789876543210.
-                  (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))))
-      where
-        CSym0KindInference :: forall t0123456789876543210
-                                     arg. SameKind (Apply CSym0 arg) (CSym1 arg) =>
-                              CSym0 t0123456789876543210
-    type instance Apply CSym0 t0123456789876543210 = CSym1 t0123456789876543210
-    type DSym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) =
-        D t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (DSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) DSym3KindInference) ())
-    data DSym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210.
-                                                                                                                                                               (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)
-      where
-        DSym3KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (DSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (DSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
-                              DSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (DSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = D t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (DSym2 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) DSym2KindInference) ())
-    data DSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210
-                                                                                                                       d0123456789876543210.
-                                                                                                                (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))
-      where
-        DSym2KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (DSym2 t0123456789876543210 t0123456789876543210) arg) (DSym3 t0123456789876543210 t0123456789876543210 arg) =>
-                              DSym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (DSym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = DSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (DSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) DSym1KindInference) ())
-    data DSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
-                                                                        c0123456789876543210
-                                                                        d0123456789876543210.
-                                                                 (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))
-      where
-        DSym1KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (DSym1 t0123456789876543210) arg) (DSym2 t0123456789876543210 arg) =>
-                              DSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (DSym1 t0123456789876543210) t0123456789876543210 = DSym2 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings DSym0 where
-      suppressUnusedWarnings = snd (((,) DSym0KindInference) ())
-    data DSym0 :: forall a0123456789876543210
-                         b0123456789876543210
-                         c0123456789876543210
-                         d0123456789876543210.
-                  (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))))
-      where
-        DSym0KindInference :: forall t0123456789876543210
-                                     arg. SameKind (Apply DSym0 arg) (DSym1 arg) =>
-                              DSym0 t0123456789876543210
-    type instance Apply DSym0 t0123456789876543210 = DSym1 t0123456789876543210
-    type ESym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) =
-        E t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (ESym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) ESym3KindInference) ())
-    data ESym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210.
-                                                                                                                                                               (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)
-      where
-        ESym3KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (ESym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (ESym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
-                              ESym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (ESym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = E t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (ESym2 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) ESym2KindInference) ())
-    data ESym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210
-                                                                                                                       d0123456789876543210.
-                                                                                                                (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))
-      where
-        ESym2KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (ESym2 t0123456789876543210 t0123456789876543210) arg) (ESym3 t0123456789876543210 t0123456789876543210 arg) =>
-                              ESym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (ESym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = ESym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (ESym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) ESym1KindInference) ())
-    data ESym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
-                                                                        c0123456789876543210
-                                                                        d0123456789876543210.
-                                                                 (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))
-      where
-        ESym1KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (ESym1 t0123456789876543210) arg) (ESym2 t0123456789876543210 arg) =>
-                              ESym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (ESym1 t0123456789876543210) t0123456789876543210 = ESym2 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings ESym0 where
-      suppressUnusedWarnings = snd (((,) ESym0KindInference) ())
-    data ESym0 :: forall a0123456789876543210
-                         b0123456789876543210
-                         c0123456789876543210
-                         d0123456789876543210.
-                  (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))))
-      where
-        ESym0KindInference :: forall t0123456789876543210
-                                     arg. SameKind (Apply ESym0 arg) (ESym1 arg) =>
-                              ESym0 t0123456789876543210
-    type instance Apply ESym0 t0123456789876543210 = ESym1 t0123456789876543210
-    type FSym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) =
-        F t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (FSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) FSym3KindInference) ())
-    data FSym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210.
-                                                                                                                                                               (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)
-      where
-        FSym3KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (FSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (FSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
-                              FSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (FSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = F t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (FSym2 t0123456789876543210 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) FSym2KindInference) ())
-    data FSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210
-                                                                                                                       d0123456789876543210.
-                                                                                                                (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))
-      where
-        FSym2KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (FSym2 t0123456789876543210 t0123456789876543210) arg) (FSym3 t0123456789876543210 t0123456789876543210 arg) =>
-                              FSym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    type instance Apply (FSym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = FSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (FSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) FSym1KindInference) ())
-    data FSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
-                                                                        c0123456789876543210
-                                                                        d0123456789876543210.
-                                                                 (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))
-      where
-        FSym1KindInference :: forall t0123456789876543210
-                                     t0123456789876543210
-                                     arg. SameKind (Apply (FSym1 t0123456789876543210) arg) (FSym2 t0123456789876543210 arg) =>
-                              FSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (FSym1 t0123456789876543210) t0123456789876543210 = FSym2 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings FSym0 where
-      suppressUnusedWarnings = snd (((,) FSym0KindInference) ())
-    data FSym0 :: forall a0123456789876543210
-                         b0123456789876543210
-                         c0123456789876543210
-                         d0123456789876543210.
-                  (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))))
-      where
-        FSym0KindInference :: forall t0123456789876543210
-                                     arg. SameKind (Apply FSym0 arg) (FSym1 arg) =>
-                              FSym0 t0123456789876543210
-    type instance Apply FSym0 t0123456789876543210 = FSym1 t0123456789876543210
-    type family Compare_0123456789876543210 (a :: Nat) (a :: Nat) :: Ordering where
-      Compare_0123456789876543210 Zero Zero = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
-      Compare_0123456789876543210 (Succ a_0123456789876543210) (Succ b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])
-      Compare_0123456789876543210 Zero (Succ _) = LTSym0
-      Compare_0123456789876543210 (Succ _) Zero = GTSym0
-    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
-        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
-    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Nat Ordering
-      where
-        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
-    data Compare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering)
-      where
-        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
-                                                        Compare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
-    instance POrd Nat where
-      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
-    type family Compare_0123456789876543210 (a :: Foo a b c d) (a :: Foo a b c d) :: Ordering where
-      Compare_0123456789876543210 (A a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (A b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))
-      Compare_0123456789876543210 (B a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (B b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))
-      Compare_0123456789876543210 (C a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (C b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))
-      Compare_0123456789876543210 (D a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (D b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))
-      Compare_0123456789876543210 (E a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (E b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))
-      Compare_0123456789876543210 (F a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (F b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))
-      Compare_0123456789876543210 (A _ _ _ _) (B _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (A _ _ _ _) (C _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (A _ _ _ _) (D _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (A _ _ _ _) (E _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (A _ _ _ _) (F _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (B _ _ _ _) (A _ _ _ _) = GTSym0
-      Compare_0123456789876543210 (B _ _ _ _) (C _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (B _ _ _ _) (D _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (B _ _ _ _) (E _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (B _ _ _ _) (F _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (C _ _ _ _) (A _ _ _ _) = GTSym0
-      Compare_0123456789876543210 (C _ _ _ _) (B _ _ _ _) = GTSym0
-      Compare_0123456789876543210 (C _ _ _ _) (D _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (C _ _ _ _) (E _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (C _ _ _ _) (F _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (D _ _ _ _) (A _ _ _ _) = GTSym0
-      Compare_0123456789876543210 (D _ _ _ _) (B _ _ _ _) = GTSym0
-      Compare_0123456789876543210 (D _ _ _ _) (C _ _ _ _) = GTSym0
-      Compare_0123456789876543210 (D _ _ _ _) (E _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (D _ _ _ _) (F _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (E _ _ _ _) (A _ _ _ _) = GTSym0
-      Compare_0123456789876543210 (E _ _ _ _) (B _ _ _ _) = GTSym0
-      Compare_0123456789876543210 (E _ _ _ _) (C _ _ _ _) = GTSym0
-      Compare_0123456789876543210 (E _ _ _ _) (D _ _ _ _) = GTSym0
-      Compare_0123456789876543210 (E _ _ _ _) (F _ _ _ _) = LTSym0
-      Compare_0123456789876543210 (F _ _ _ _) (A _ _ _ _) = GTSym0
-      Compare_0123456789876543210 (F _ _ _ _) (B _ _ _ _) = GTSym0
-      Compare_0123456789876543210 (F _ _ _ _) (C _ _ _ _) = GTSym0
-      Compare_0123456789876543210 (F _ _ _ _) (D _ _ _ _) = GTSym0
-      Compare_0123456789876543210 (F _ _ _ _) (E _ _ _ _) = GTSym0
-    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) (a0123456789876543210 :: Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) =
-        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
-    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) :: (~>) (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) Ordering
-      where
-        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
-    data Compare_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                   b0123456789876543210
-                                                   c0123456789876543210
-                                                   d0123456789876543210.
-                                            (~>) (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) ((~>) (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) Ordering)
-      where
-        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
-                                                        Compare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
-    instance POrd (Foo a b c d) where
-      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
-    type family Equals_0123456789876543210 (a :: Nat) (b :: Nat) :: Bool where
-      Equals_0123456789876543210 Zero Zero = TrueSym0
-      Equals_0123456789876543210 (Succ a) (Succ b) = (==) a b
-      Equals_0123456789876543210 (_ :: Nat) (_ :: Nat) = FalseSym0
-    instance PEq Nat where
-      type (==) a b = Equals_0123456789876543210 a b
-    type family Equals_0123456789876543210 (a :: Foo a b c d) (b :: Foo a b c d) :: Bool where
-      Equals_0123456789876543210 (A a a a a) (A b b b b) = (&&) ((==) a b) ((&&) ((==) a b) ((&&) ((==) a b) ((==) a b)))
-      Equals_0123456789876543210 (B a a a a) (B b b b b) = (&&) ((==) a b) ((&&) ((==) a b) ((&&) ((==) a b) ((==) a b)))
-      Equals_0123456789876543210 (C a a a a) (C b b b b) = (&&) ((==) a b) ((&&) ((==) a b) ((&&) ((==) a b) ((==) a b)))
-      Equals_0123456789876543210 (D a a a a) (D b b b b) = (&&) ((==) a b) ((&&) ((==) a b) ((&&) ((==) a b) ((==) a b)))
-      Equals_0123456789876543210 (E a a a a) (E b b b b) = (&&) ((==) a b) ((&&) ((==) a b) ((&&) ((==) a b) ((==) a b)))
-      Equals_0123456789876543210 (F a a a a) (F b b b b) = (&&) ((==) a b) ((&&) ((==) a b) ((&&) ((==) a b) ((==) a b)))
-      Equals_0123456789876543210 (_ :: Foo a b c d) (_ :: Foo a b c d) = FalseSym0
-    instance PEq (Foo a b c d) where
-      type (==) a b = Equals_0123456789876543210 a b
-    data instance Sing :: Nat -> GHC.Types.Type
-      where
-        SZero :: Sing Zero
-        SSucc :: forall (n :: Nat). (Sing (n :: Nat)) -> Sing (Succ n)
-    type SNat = (Sing :: Nat -> GHC.Types.Type)
-    instance SingKind Nat where
-      type Demote Nat = Nat
-      fromSing SZero = Zero
-      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) }
-    data instance Sing :: Foo a b c d -> GHC.Types.Type
-      where
-        SA :: forall a b c d (n :: a) (n :: b) (n :: c) (n :: d).
-              (Sing (n :: a))
-              -> (Sing (n :: b))
-                 -> (Sing (n :: c)) -> (Sing (n :: d)) -> Sing (A n n n n)
-        SB :: forall a b c d (n :: a) (n :: b) (n :: c) (n :: d).
-              (Sing (n :: a))
-              -> (Sing (n :: b))
-                 -> (Sing (n :: c)) -> (Sing (n :: d)) -> Sing (B n n n n)
-        SC :: forall a b c d (n :: a) (n :: b) (n :: c) (n :: d).
-              (Sing (n :: a))
-              -> (Sing (n :: b))
-                 -> (Sing (n :: c)) -> (Sing (n :: d)) -> Sing (C n n n n)
-        SD :: forall a b c d (n :: a) (n :: b) (n :: c) (n :: d).
-              (Sing (n :: a))
-              -> (Sing (n :: b))
-                 -> (Sing (n :: c)) -> (Sing (n :: d)) -> Sing (D n n n n)
-        SE :: forall a b c d (n :: a) (n :: b) (n :: c) (n :: d).
-              (Sing (n :: a))
-              -> (Sing (n :: b))
-                 -> (Sing (n :: c)) -> (Sing (n :: d)) -> Sing (E n n n n)
-        SF :: forall a b c d (n :: a) (n :: b) (n :: c) (n :: d).
-              (Sing (n :: a))
-              -> (Sing (n :: b))
-                 -> (Sing (n :: c)) -> (Sing (n :: d)) -> Sing (F n n n n)
-    type SFoo = (Sing :: Foo a b c d -> GHC.Types.Type)
-    instance (SingKind a, SingKind b, SingKind c, SingKind d) =>
-             SingKind (Foo a b c d) where
-      type Demote (Foo a b c d) = Foo (Demote a) (Demote b) (Demote c) (Demote d)
-      fromSing (SA b b b b)
-        = (((A (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)
-      fromSing (SB b b b b)
-        = (((B (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)
-      fromSing (SC b b b b)
-        = (((C (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)
-      fromSing (SD b b b b)
-        = (((D (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)
-      fromSing (SE b b b b)
-        = (((E (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)
-      fromSing (SF b b b b)
-        = (((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) }
-      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) }
-      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) }
-      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) }
-      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) }
-      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) }
-    instance SOrd Nat => SOrd Nat where
-      sCompare ::
-        forall (t1 :: Nat) (t2 :: Nat).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (CompareSym0 :: TyFun Nat ((~>) Nat Ordering)
-                                                 -> GHC.Types.Type) t1) t2)
-      sCompare SZero SZero
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            SNil
-      sCompare
-        (SSucc (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        (SSucc (sB_0123456789876543210 :: Sing b_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            ((applySing
-                ((applySing ((singFun2 @(:@#@$)) SCons))
-                   ((applySing
-                       ((applySing ((singFun2 @CompareSym0) sCompare))
-                          sA_0123456789876543210))
-                      sB_0123456789876543210)))
-               SNil)
-      sCompare SZero (SSucc _) = SLT
-      sCompare (SSucc _) SZero = SGT
-    instance (SOrd a, SOrd b, SOrd c, SOrd d) =>
-             SOrd (Foo a b c d) where
-      sCompare ::
-        forall (t1 :: Foo a b c d) (t2 :: Foo a b c d).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (CompareSym0 :: TyFun (Foo a b c d) ((~>) (Foo a b c d) Ordering)
-                                                 -> GHC.Types.Type) t1) t2)
-      sCompare
-        (SA (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        (SA (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            ((applySing
-                ((applySing ((singFun2 @(:@#@$)) SCons))
-                   ((applySing
-                       ((applySing ((singFun2 @CompareSym0) sCompare))
-                          sA_0123456789876543210))
-                      sB_0123456789876543210)))
-               ((applySing
-                   ((applySing ((singFun2 @(:@#@$)) SCons))
-                      ((applySing
-                          ((applySing ((singFun2 @CompareSym0) sCompare))
-                             sA_0123456789876543210))
-                         sB_0123456789876543210)))
-                  ((applySing
-                      ((applySing ((singFun2 @(:@#@$)) SCons))
-                         ((applySing
-                             ((applySing ((singFun2 @CompareSym0) sCompare))
-                                sA_0123456789876543210))
-                            sB_0123456789876543210)))
-                     ((applySing
-                         ((applySing ((singFun2 @(:@#@$)) SCons))
-                            ((applySing
-                                ((applySing ((singFun2 @CompareSym0) sCompare))
-                                   sA_0123456789876543210))
-                               sB_0123456789876543210)))
-                        SNil))))
-      sCompare
-        (SB (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        (SB (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            ((applySing
-                ((applySing ((singFun2 @(:@#@$)) SCons))
-                   ((applySing
-                       ((applySing ((singFun2 @CompareSym0) sCompare))
-                          sA_0123456789876543210))
-                      sB_0123456789876543210)))
-               ((applySing
-                   ((applySing ((singFun2 @(:@#@$)) SCons))
-                      ((applySing
-                          ((applySing ((singFun2 @CompareSym0) sCompare))
-                             sA_0123456789876543210))
-                         sB_0123456789876543210)))
-                  ((applySing
-                      ((applySing ((singFun2 @(:@#@$)) SCons))
-                         ((applySing
-                             ((applySing ((singFun2 @CompareSym0) sCompare))
-                                sA_0123456789876543210))
-                            sB_0123456789876543210)))
-                     ((applySing
-                         ((applySing ((singFun2 @(:@#@$)) SCons))
-                            ((applySing
-                                ((applySing ((singFun2 @CompareSym0) sCompare))
-                                   sA_0123456789876543210))
-                               sB_0123456789876543210)))
-                        SNil))))
-      sCompare
-        (SC (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        (SC (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            ((applySing
-                ((applySing ((singFun2 @(:@#@$)) SCons))
-                   ((applySing
-                       ((applySing ((singFun2 @CompareSym0) sCompare))
-                          sA_0123456789876543210))
-                      sB_0123456789876543210)))
-               ((applySing
-                   ((applySing ((singFun2 @(:@#@$)) SCons))
-                      ((applySing
-                          ((applySing ((singFun2 @CompareSym0) sCompare))
-                             sA_0123456789876543210))
-                         sB_0123456789876543210)))
-                  ((applySing
-                      ((applySing ((singFun2 @(:@#@$)) SCons))
-                         ((applySing
-                             ((applySing ((singFun2 @CompareSym0) sCompare))
-                                sA_0123456789876543210))
-                            sB_0123456789876543210)))
-                     ((applySing
-                         ((applySing ((singFun2 @(:@#@$)) SCons))
-                            ((applySing
-                                ((applySing ((singFun2 @CompareSym0) sCompare))
-                                   sA_0123456789876543210))
-                               sB_0123456789876543210)))
-                        SNil))))
-      sCompare
-        (SD (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        (SD (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            ((applySing
-                ((applySing ((singFun2 @(:@#@$)) SCons))
-                   ((applySing
-                       ((applySing ((singFun2 @CompareSym0) sCompare))
-                          sA_0123456789876543210))
-                      sB_0123456789876543210)))
-               ((applySing
-                   ((applySing ((singFun2 @(:@#@$)) SCons))
-                      ((applySing
-                          ((applySing ((singFun2 @CompareSym0) sCompare))
-                             sA_0123456789876543210))
-                         sB_0123456789876543210)))
-                  ((applySing
-                      ((applySing ((singFun2 @(:@#@$)) SCons))
-                         ((applySing
-                             ((applySing ((singFun2 @CompareSym0) sCompare))
-                                sA_0123456789876543210))
-                            sB_0123456789876543210)))
-                     ((applySing
-                         ((applySing ((singFun2 @(:@#@$)) SCons))
-                            ((applySing
-                                ((applySing ((singFun2 @CompareSym0) sCompare))
-                                   sA_0123456789876543210))
-                               sB_0123456789876543210)))
-                        SNil))))
-      sCompare
-        (SE (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        (SE (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            ((applySing
-                ((applySing ((singFun2 @(:@#@$)) SCons))
-                   ((applySing
-                       ((applySing ((singFun2 @CompareSym0) sCompare))
-                          sA_0123456789876543210))
-                      sB_0123456789876543210)))
-               ((applySing
-                   ((applySing ((singFun2 @(:@#@$)) SCons))
-                      ((applySing
-                          ((applySing ((singFun2 @CompareSym0) sCompare))
-                             sA_0123456789876543210))
-                         sB_0123456789876543210)))
-                  ((applySing
-                      ((applySing ((singFun2 @(:@#@$)) SCons))
-                         ((applySing
-                             ((applySing ((singFun2 @CompareSym0) sCompare))
-                                sA_0123456789876543210))
-                            sB_0123456789876543210)))
-                     ((applySing
-                         ((applySing ((singFun2 @(:@#@$)) SCons))
-                            ((applySing
-                                ((applySing ((singFun2 @CompareSym0) sCompare))
-                                   sA_0123456789876543210))
-                               sB_0123456789876543210)))
-                        SNil))))
-      sCompare
-        (SF (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210)
-            (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        (SF (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210)
-            (sB_0123456789876543210 :: Sing b_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            ((applySing
-                ((applySing ((singFun2 @(:@#@$)) SCons))
-                   ((applySing
-                       ((applySing ((singFun2 @CompareSym0) sCompare))
-                          sA_0123456789876543210))
-                      sB_0123456789876543210)))
-               ((applySing
-                   ((applySing ((singFun2 @(:@#@$)) SCons))
-                      ((applySing
-                          ((applySing ((singFun2 @CompareSym0) sCompare))
-                             sA_0123456789876543210))
-                         sB_0123456789876543210)))
-                  ((applySing
-                      ((applySing ((singFun2 @(:@#@$)) SCons))
-                         ((applySing
-                             ((applySing ((singFun2 @CompareSym0) sCompare))
-                                sA_0123456789876543210))
-                            sB_0123456789876543210)))
-                     ((applySing
-                         ((applySing ((singFun2 @(:@#@$)) SCons))
-                            ((applySing
-                                ((applySing ((singFun2 @CompareSym0) sCompare))
-                                   sA_0123456789876543210))
-                               sB_0123456789876543210)))
-                        SNil))))
-      sCompare (SA _ _ _ _) (SB _ _ _ _) = SLT
-      sCompare (SA _ _ _ _) (SC _ _ _ _) = SLT
-      sCompare (SA _ _ _ _) (SD _ _ _ _) = SLT
-      sCompare (SA _ _ _ _) (SE _ _ _ _) = SLT
-      sCompare (SA _ _ _ _) (SF _ _ _ _) = SLT
-      sCompare (SB _ _ _ _) (SA _ _ _ _) = SGT
-      sCompare (SB _ _ _ _) (SC _ _ _ _) = SLT
-      sCompare (SB _ _ _ _) (SD _ _ _ _) = SLT
-      sCompare (SB _ _ _ _) (SE _ _ _ _) = SLT
-      sCompare (SB _ _ _ _) (SF _ _ _ _) = SLT
-      sCompare (SC _ _ _ _) (SA _ _ _ _) = SGT
-      sCompare (SC _ _ _ _) (SB _ _ _ _) = SGT
-      sCompare (SC _ _ _ _) (SD _ _ _ _) = SLT
-      sCompare (SC _ _ _ _) (SE _ _ _ _) = SLT
-      sCompare (SC _ _ _ _) (SF _ _ _ _) = SLT
-      sCompare (SD _ _ _ _) (SA _ _ _ _) = SGT
-      sCompare (SD _ _ _ _) (SB _ _ _ _) = SGT
-      sCompare (SD _ _ _ _) (SC _ _ _ _) = SGT
-      sCompare (SD _ _ _ _) (SE _ _ _ _) = SLT
-      sCompare (SD _ _ _ _) (SF _ _ _ _) = SLT
-      sCompare (SE _ _ _ _) (SA _ _ _ _) = SGT
-      sCompare (SE _ _ _ _) (SB _ _ _ _) = SGT
-      sCompare (SE _ _ _ _) (SC _ _ _ _) = SGT
-      sCompare (SE _ _ _ _) (SD _ _ _ _) = SGT
-      sCompare (SE _ _ _ _) (SF _ _ _ _) = SLT
-      sCompare (SF _ _ _ _) (SA _ _ _ _) = SGT
-      sCompare (SF _ _ _ _) (SB _ _ _ _) = SGT
-      sCompare (SF _ _ _ _) (SC _ _ _ _) = SGT
-      sCompare (SF _ _ _ _) (SD _ _ _ _) = SGT
-      sCompare (SF _ _ _ _) (SE _ _ _ _) = SGT
-    instance SEq Nat => SEq Nat where
-      (%==) SZero SZero = STrue
-      (%==) SZero (SSucc _) = SFalse
-      (%==) (SSucc _) SZero = SFalse
-      (%==) (SSucc a) (SSucc b) = ((%==) a) b
-    instance SDecide Nat => SDecide Nat where
-      (%~) SZero SZero = Proved Refl
-      (%~) SZero (SSucc _) = Disproved (\ x -> case x of)
-      (%~) (SSucc _) SZero = Disproved (\ x -> case x of)
-      (%~) (SSucc a) (SSucc b)
-        = case ((%~) a) b of
-            Proved Refl -> Proved Refl
-            Disproved contra
-              -> Disproved (\ refl -> case refl of { Refl -> contra Refl })
-    instance (SEq a, SEq b, SEq c, SEq d) => SEq (Foo a b c d) where
-      (%==) (SA a a a a) (SA b b b b)
-        = ((%&&) (((%==) a) b))
-            (((%&&) (((%==) a) b)) (((%&&) (((%==) a) b)) (((%==) a) b)))
-      (%==) (SA _ _ _ _) (SB _ _ _ _) = SFalse
-      (%==) (SA _ _ _ _) (SC _ _ _ _) = SFalse
-      (%==) (SA _ _ _ _) (SD _ _ _ _) = SFalse
-      (%==) (SA _ _ _ _) (SE _ _ _ _) = SFalse
-      (%==) (SA _ _ _ _) (SF _ _ _ _) = SFalse
-      (%==) (SB _ _ _ _) (SA _ _ _ _) = SFalse
-      (%==) (SB a a a a) (SB b b b b)
-        = ((%&&) (((%==) a) b))
-            (((%&&) (((%==) a) b)) (((%&&) (((%==) a) b)) (((%==) a) b)))
-      (%==) (SB _ _ _ _) (SC _ _ _ _) = SFalse
-      (%==) (SB _ _ _ _) (SD _ _ _ _) = SFalse
-      (%==) (SB _ _ _ _) (SE _ _ _ _) = SFalse
-      (%==) (SB _ _ _ _) (SF _ _ _ _) = SFalse
-      (%==) (SC _ _ _ _) (SA _ _ _ _) = SFalse
-      (%==) (SC _ _ _ _) (SB _ _ _ _) = SFalse
-      (%==) (SC a a a a) (SC b b b b)
-        = ((%&&) (((%==) a) b))
-            (((%&&) (((%==) a) b)) (((%&&) (((%==) a) b)) (((%==) a) b)))
-      (%==) (SC _ _ _ _) (SD _ _ _ _) = SFalse
-      (%==) (SC _ _ _ _) (SE _ _ _ _) = SFalse
-      (%==) (SC _ _ _ _) (SF _ _ _ _) = SFalse
-      (%==) (SD _ _ _ _) (SA _ _ _ _) = SFalse
-      (%==) (SD _ _ _ _) (SB _ _ _ _) = SFalse
-      (%==) (SD _ _ _ _) (SC _ _ _ _) = SFalse
-      (%==) (SD a a a a) (SD b b b b)
-        = ((%&&) (((%==) a) b))
-            (((%&&) (((%==) a) b)) (((%&&) (((%==) a) b)) (((%==) a) b)))
-      (%==) (SD _ _ _ _) (SE _ _ _ _) = SFalse
-      (%==) (SD _ _ _ _) (SF _ _ _ _) = SFalse
-      (%==) (SE _ _ _ _) (SA _ _ _ _) = SFalse
-      (%==) (SE _ _ _ _) (SB _ _ _ _) = SFalse
-      (%==) (SE _ _ _ _) (SC _ _ _ _) = SFalse
-      (%==) (SE _ _ _ _) (SD _ _ _ _) = SFalse
-      (%==) (SE a a a a) (SE b b b b)
-        = ((%&&) (((%==) a) b))
-            (((%&&) (((%==) a) b)) (((%&&) (((%==) a) b)) (((%==) a) b)))
-      (%==) (SE _ _ _ _) (SF _ _ _ _) = SFalse
-      (%==) (SF _ _ _ _) (SA _ _ _ _) = SFalse
-      (%==) (SF _ _ _ _) (SB _ _ _ _) = SFalse
-      (%==) (SF _ _ _ _) (SC _ _ _ _) = SFalse
-      (%==) (SF _ _ _ _) (SD _ _ _ _) = SFalse
-      (%==) (SF _ _ _ _) (SE _ _ _ _) = SFalse
-      (%==) (SF a a a a) (SF b b b b)
-        = ((%&&) (((%==) a) b))
-            (((%&&) (((%==) a) b)) (((%&&) (((%==) a) b)) (((%==) a) b)))
-    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)
-      (%~) (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)
-      (%~) (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)
-      (%~) (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)
-      (%~) (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)
-      (%~) (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 })
-    instance SingI Zero where
-      sing = SZero
-    instance SingI n => SingI (Succ (n :: Nat)) where
-      sing = SSucc sing
-    instance SingI (SuccSym0 :: (~>) Nat Nat) where
-      sing = (singFun1 @SuccSym0) SSucc
-    instance SingI (TyCon1 Succ :: (~>) Nat Nat) where
-      sing = (singFun1 @(TyCon1 Succ)) SSucc
-    instance (SingI n, SingI n, SingI n, SingI n) =>
-             SingI (A (n :: a) (n :: b) (n :: c) (n :: d)) where
-      sing = (((SA sing) sing) sing) sing
-    instance SingI (ASym0 :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
-      sing = (singFun4 @ASym0) SA
-    instance SingI (TyCon4 A :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
-      sing = (singFun4 @(TyCon4 A)) SA
-    instance SingI d =>
-             SingI (ASym1 (d :: a) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
-      sing = (singFun3 @(ASym1 (d :: a))) (SA (sing @d))
-    instance SingI d =>
-             SingI (TyCon3 (A (d :: a)) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
-      sing = (singFun3 @(TyCon3 (A (d :: a)))) (SA (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (ASym2 (d :: a) (d :: b) :: (~>) c ((~>) d (Foo a b c d))) where
-      sing
-        = (singFun2 @(ASym2 (d :: a) (d :: b))) ((SA (sing @d)) (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (TyCon2 (A (d :: a) (d :: b)) :: (~>) c ((~>) d (Foo a b c d))) where
-      sing
-        = (singFun2 @(TyCon2 (A (d :: a) (d :: b))))
-            ((SA (sing @d)) (sing @d))
-    instance (SingI d, SingI d, SingI d) =>
-             SingI (ASym3 (d :: a) (d :: b) (d :: c) :: (~>) d (Foo a b c d)) where
-      sing
-        = (singFun1 @(ASym3 (d :: a) (d :: b) (d :: c)))
-            (((SA (sing @d)) (sing @d)) (sing @d))
-    instance (SingI d, SingI d, SingI d) =>
-             SingI (TyCon1 (A (d :: a) (d :: b) (d :: c)) :: (~>) d (Foo a b c d)) where
-      sing
-        = (singFun1 @(TyCon1 (A (d :: a) (d :: b) (d :: c))))
-            (((SA (sing @d)) (sing @d)) (sing @d))
-    instance (SingI n, SingI n, SingI n, SingI n) =>
-             SingI (B (n :: a) (n :: b) (n :: c) (n :: d)) where
-      sing = (((SB sing) sing) sing) sing
-    instance SingI (BSym0 :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
-      sing = (singFun4 @BSym0) SB
-    instance SingI (TyCon4 B :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
-      sing = (singFun4 @(TyCon4 B)) SB
-    instance SingI d =>
-             SingI (BSym1 (d :: a) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
-      sing = (singFun3 @(BSym1 (d :: a))) (SB (sing @d))
-    instance SingI d =>
-             SingI (TyCon3 (B (d :: a)) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
-      sing = (singFun3 @(TyCon3 (B (d :: a)))) (SB (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (BSym2 (d :: a) (d :: b) :: (~>) c ((~>) d (Foo a b c d))) where
-      sing
-        = (singFun2 @(BSym2 (d :: a) (d :: b))) ((SB (sing @d)) (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (TyCon2 (B (d :: a) (d :: b)) :: (~>) c ((~>) d (Foo a b c d))) where
-      sing
-        = (singFun2 @(TyCon2 (B (d :: a) (d :: b))))
-            ((SB (sing @d)) (sing @d))
-    instance (SingI d, SingI d, SingI d) =>
-             SingI (BSym3 (d :: a) (d :: b) (d :: c) :: (~>) d (Foo a b c d)) where
-      sing
-        = (singFun1 @(BSym3 (d :: a) (d :: b) (d :: c)))
-            (((SB (sing @d)) (sing @d)) (sing @d))
-    instance (SingI d, SingI d, SingI d) =>
-             SingI (TyCon1 (B (d :: a) (d :: b) (d :: c)) :: (~>) d (Foo a b c d)) where
-      sing
-        = (singFun1 @(TyCon1 (B (d :: a) (d :: b) (d :: c))))
-            (((SB (sing @d)) (sing @d)) (sing @d))
-    instance (SingI n, SingI n, SingI n, SingI n) =>
-             SingI (C (n :: a) (n :: b) (n :: c) (n :: d)) where
-      sing = (((SC sing) sing) sing) sing
-    instance SingI (CSym0 :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
-      sing = (singFun4 @CSym0) SC
-    instance SingI (TyCon4 C :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
-      sing = (singFun4 @(TyCon4 C)) SC
-    instance SingI d =>
-             SingI (CSym1 (d :: a) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
-      sing = (singFun3 @(CSym1 (d :: a))) (SC (sing @d))
-    instance SingI d =>
-             SingI (TyCon3 (C (d :: a)) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
-      sing = (singFun3 @(TyCon3 (C (d :: a)))) (SC (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (CSym2 (d :: a) (d :: b) :: (~>) c ((~>) d (Foo a b c d))) where
-      sing
-        = (singFun2 @(CSym2 (d :: a) (d :: b))) ((SC (sing @d)) (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (TyCon2 (C (d :: a) (d :: b)) :: (~>) c ((~>) d (Foo a b c d))) where
-      sing
-        = (singFun2 @(TyCon2 (C (d :: a) (d :: b))))
-            ((SC (sing @d)) (sing @d))
-    instance (SingI d, SingI d, SingI d) =>
-             SingI (CSym3 (d :: a) (d :: b) (d :: c) :: (~>) d (Foo a b c d)) where
-      sing
-        = (singFun1 @(CSym3 (d :: a) (d :: b) (d :: c)))
-            (((SC (sing @d)) (sing @d)) (sing @d))
-    instance (SingI d, SingI d, SingI d) =>
-             SingI (TyCon1 (C (d :: a) (d :: b) (d :: c)) :: (~>) d (Foo a b c d)) where
-      sing
-        = (singFun1 @(TyCon1 (C (d :: a) (d :: b) (d :: c))))
-            (((SC (sing @d)) (sing @d)) (sing @d))
-    instance (SingI n, SingI n, SingI n, SingI n) =>
-             SingI (D (n :: a) (n :: b) (n :: c) (n :: d)) where
-      sing = (((SD sing) sing) sing) sing
-    instance SingI (DSym0 :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
-      sing = (singFun4 @DSym0) SD
-    instance SingI (TyCon4 D :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
-      sing = (singFun4 @(TyCon4 D)) SD
-    instance SingI d =>
-             SingI (DSym1 (d :: a) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
-      sing = (singFun3 @(DSym1 (d :: a))) (SD (sing @d))
-    instance SingI d =>
-             SingI (TyCon3 (D (d :: a)) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
-      sing = (singFun3 @(TyCon3 (D (d :: a)))) (SD (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (DSym2 (d :: a) (d :: b) :: (~>) c ((~>) d (Foo a b c d))) where
-      sing
-        = (singFun2 @(DSym2 (d :: a) (d :: b))) ((SD (sing @d)) (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (TyCon2 (D (d :: a) (d :: b)) :: (~>) c ((~>) d (Foo a b c d))) where
-      sing
-        = (singFun2 @(TyCon2 (D (d :: a) (d :: b))))
-            ((SD (sing @d)) (sing @d))
-    instance (SingI d, SingI d, SingI d) =>
-             SingI (DSym3 (d :: a) (d :: b) (d :: c) :: (~>) d (Foo a b c d)) where
-      sing
-        = (singFun1 @(DSym3 (d :: a) (d :: b) (d :: c)))
-            (((SD (sing @d)) (sing @d)) (sing @d))
-    instance (SingI d, SingI d, SingI d) =>
-             SingI (TyCon1 (D (d :: a) (d :: b) (d :: c)) :: (~>) d (Foo a b c d)) where
-      sing
-        = (singFun1 @(TyCon1 (D (d :: a) (d :: b) (d :: c))))
-            (((SD (sing @d)) (sing @d)) (sing @d))
-    instance (SingI n, SingI n, SingI n, SingI n) =>
-             SingI (E (n :: a) (n :: b) (n :: c) (n :: d)) where
-      sing = (((SE sing) sing) sing) sing
-    instance SingI (ESym0 :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
-      sing = (singFun4 @ESym0) SE
-    instance SingI (TyCon4 E :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
-      sing = (singFun4 @(TyCon4 E)) SE
-    instance SingI d =>
-             SingI (ESym1 (d :: a) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
-      sing = (singFun3 @(ESym1 (d :: a))) (SE (sing @d))
-    instance SingI d =>
-             SingI (TyCon3 (E (d :: a)) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
-      sing = (singFun3 @(TyCon3 (E (d :: a)))) (SE (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (ESym2 (d :: a) (d :: b) :: (~>) c ((~>) d (Foo a b c d))) where
-      sing
-        = (singFun2 @(ESym2 (d :: a) (d :: b))) ((SE (sing @d)) (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (TyCon2 (E (d :: a) (d :: b)) :: (~>) c ((~>) d (Foo a b c d))) where
-      sing
-        = (singFun2 @(TyCon2 (E (d :: a) (d :: b))))
-            ((SE (sing @d)) (sing @d))
-    instance (SingI d, SingI d, SingI d) =>
-             SingI (ESym3 (d :: a) (d :: b) (d :: c) :: (~>) d (Foo a b c d)) where
-      sing
-        = (singFun1 @(ESym3 (d :: a) (d :: b) (d :: c)))
-            (((SE (sing @d)) (sing @d)) (sing @d))
-    instance (SingI d, SingI d, SingI d) =>
-             SingI (TyCon1 (E (d :: a) (d :: b) (d :: c)) :: (~>) d (Foo a b c d)) where
-      sing
-        = (singFun1 @(TyCon1 (E (d :: a) (d :: b) (d :: c))))
-            (((SE (sing @d)) (sing @d)) (sing @d))
-    instance (SingI n, SingI n, SingI n, SingI n) =>
-             SingI (F (n :: a) (n :: b) (n :: c) (n :: d)) where
-      sing = (((SF sing) sing) sing) sing
-    instance SingI (FSym0 :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
-      sing = (singFun4 @FSym0) SF
-    instance SingI (TyCon4 F :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
-      sing = (singFun4 @(TyCon4 F)) SF
-    instance SingI d =>
-             SingI (FSym1 (d :: a) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
-      sing = (singFun3 @(FSym1 (d :: a))) (SF (sing @d))
-    instance SingI d =>
-             SingI (TyCon3 (F (d :: a)) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
-      sing = (singFun3 @(TyCon3 (F (d :: a)))) (SF (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (FSym2 (d :: a) (d :: b) :: (~>) c ((~>) d (Foo a b c d))) where
-      sing
-        = (singFun2 @(FSym2 (d :: a) (d :: b))) ((SF (sing @d)) (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (TyCon2 (F (d :: a) (d :: b)) :: (~>) c ((~>) d (Foo a b c d))) where
-      sing
-        = (singFun2 @(TyCon2 (F (d :: a) (d :: b))))
-            ((SF (sing @d)) (sing @d))
-    instance (SingI d, SingI d, SingI d) =>
-             SingI (FSym3 (d :: a) (d :: b) (d :: c) :: (~>) d (Foo a b c d)) where
-      sing
-        = (singFun1 @(FSym3 (d :: a) (d :: b) (d :: c)))
-            (((SF (sing @d)) (sing @d)) (sing @d))
-    instance (SingI d, SingI d, SingI d) =>
-             SingI (TyCon1 (F (d :: a) (d :: b) (d :: c)) :: (~>) d (Foo a b c d)) where
-      sing
-        = (singFun1 @(TyCon1 (F (d :: a) (d :: b) (d :: c))))
-            (((SF (sing @d)) (sing @d)) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/OrdDeriving.ghc88.template b/tests/compile-and-dump/Singletons/OrdDeriving.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/OrdDeriving.ghc88.template
@@ -0,0 +1,1163 @@
+Singletons/OrdDeriving.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| data Nat
+            = Zero | Succ Nat
+            deriving (Eq, Ord)
+          data Foo a b c d
+            = A a b c d |
+              B a b c d |
+              C a b c d |
+              D a b c d |
+              E a b c d |
+              F a b c d
+            deriving (Eq, Ord) |]
+  ======>
+    data Nat
+      = Zero | Succ Nat
+      deriving (Eq, Ord)
+    data Foo a b c d
+      = A a b c d |
+        B a b c d |
+        C a b c d |
+        D a b c d |
+        E a b c d |
+        F a b c d
+      deriving (Eq, Ord)
+    type ZeroSym0 = Zero
+    type SuccSym1 (t0123456789876543210 :: Nat) =
+        Succ t0123456789876543210
+    instance SuppressUnusedWarnings SuccSym0 where
+      suppressUnusedWarnings = snd (((,) SuccSym0KindInference) ())
+    data SuccSym0 :: (~>) Nat Nat
+      where
+        SuccSym0KindInference :: forall t0123456789876543210
+                                        arg. SameKind (Apply SuccSym0 arg) (SuccSym1 arg) =>
+                                 SuccSym0 t0123456789876543210
+    type instance Apply SuccSym0 t0123456789876543210 = Succ t0123456789876543210
+    type ASym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) =
+        A t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (ASym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) ASym3KindInference) ())
+    data ASym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210.
+                                                                                                                                                               (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)
+      where
+        ASym3KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (ASym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (ASym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
+                              ASym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (ASym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = A t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (ASym2 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) ASym2KindInference) ())
+    data ASym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210
+                                                                                                                       d0123456789876543210.
+                                                                                                                (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))
+      where
+        ASym2KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (ASym2 t0123456789876543210 t0123456789876543210) arg) (ASym3 t0123456789876543210 t0123456789876543210 arg) =>
+                              ASym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (ASym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = ASym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (ASym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) ASym1KindInference) ())
+    data ASym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
+                                                                        c0123456789876543210
+                                                                        d0123456789876543210.
+                                                                 (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))
+      where
+        ASym1KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (ASym1 t0123456789876543210) arg) (ASym2 t0123456789876543210 arg) =>
+                              ASym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (ASym1 t0123456789876543210) t0123456789876543210 = ASym2 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings ASym0 where
+      suppressUnusedWarnings = snd (((,) ASym0KindInference) ())
+    data ASym0 :: forall a0123456789876543210
+                         b0123456789876543210
+                         c0123456789876543210
+                         d0123456789876543210.
+                  (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))))
+      where
+        ASym0KindInference :: forall t0123456789876543210
+                                     arg. SameKind (Apply ASym0 arg) (ASym1 arg) =>
+                              ASym0 t0123456789876543210
+    type instance Apply ASym0 t0123456789876543210 = ASym1 t0123456789876543210
+    type BSym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) =
+        B t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (BSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) BSym3KindInference) ())
+    data BSym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210.
+                                                                                                                                                               (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)
+      where
+        BSym3KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (BSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (BSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
+                              BSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (BSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = B t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (BSym2 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) BSym2KindInference) ())
+    data BSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210
+                                                                                                                       d0123456789876543210.
+                                                                                                                (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))
+      where
+        BSym2KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (BSym2 t0123456789876543210 t0123456789876543210) arg) (BSym3 t0123456789876543210 t0123456789876543210 arg) =>
+                              BSym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (BSym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = BSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (BSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) BSym1KindInference) ())
+    data BSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
+                                                                        c0123456789876543210
+                                                                        d0123456789876543210.
+                                                                 (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))
+      where
+        BSym1KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (BSym1 t0123456789876543210) arg) (BSym2 t0123456789876543210 arg) =>
+                              BSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (BSym1 t0123456789876543210) t0123456789876543210 = BSym2 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings BSym0 where
+      suppressUnusedWarnings = snd (((,) BSym0KindInference) ())
+    data BSym0 :: forall a0123456789876543210
+                         b0123456789876543210
+                         c0123456789876543210
+                         d0123456789876543210.
+                  (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))))
+      where
+        BSym0KindInference :: forall t0123456789876543210
+                                     arg. SameKind (Apply BSym0 arg) (BSym1 arg) =>
+                              BSym0 t0123456789876543210
+    type instance Apply BSym0 t0123456789876543210 = BSym1 t0123456789876543210
+    type CSym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) =
+        C t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (CSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) CSym3KindInference) ())
+    data CSym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210.
+                                                                                                                                                               (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)
+      where
+        CSym3KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (CSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (CSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
+                              CSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (CSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = C t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (CSym2 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) CSym2KindInference) ())
+    data CSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210
+                                                                                                                       d0123456789876543210.
+                                                                                                                (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))
+      where
+        CSym2KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (CSym2 t0123456789876543210 t0123456789876543210) arg) (CSym3 t0123456789876543210 t0123456789876543210 arg) =>
+                              CSym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (CSym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = CSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (CSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) CSym1KindInference) ())
+    data CSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
+                                                                        c0123456789876543210
+                                                                        d0123456789876543210.
+                                                                 (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))
+      where
+        CSym1KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (CSym1 t0123456789876543210) arg) (CSym2 t0123456789876543210 arg) =>
+                              CSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (CSym1 t0123456789876543210) t0123456789876543210 = CSym2 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings CSym0 where
+      suppressUnusedWarnings = snd (((,) CSym0KindInference) ())
+    data CSym0 :: forall a0123456789876543210
+                         b0123456789876543210
+                         c0123456789876543210
+                         d0123456789876543210.
+                  (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))))
+      where
+        CSym0KindInference :: forall t0123456789876543210
+                                     arg. SameKind (Apply CSym0 arg) (CSym1 arg) =>
+                              CSym0 t0123456789876543210
+    type instance Apply CSym0 t0123456789876543210 = CSym1 t0123456789876543210
+    type DSym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) =
+        D t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (DSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) DSym3KindInference) ())
+    data DSym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210.
+                                                                                                                                                               (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)
+      where
+        DSym3KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (DSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (DSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
+                              DSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (DSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = D t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (DSym2 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) DSym2KindInference) ())
+    data DSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210
+                                                                                                                       d0123456789876543210.
+                                                                                                                (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))
+      where
+        DSym2KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (DSym2 t0123456789876543210 t0123456789876543210) arg) (DSym3 t0123456789876543210 t0123456789876543210 arg) =>
+                              DSym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (DSym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = DSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (DSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) DSym1KindInference) ())
+    data DSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
+                                                                        c0123456789876543210
+                                                                        d0123456789876543210.
+                                                                 (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))
+      where
+        DSym1KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (DSym1 t0123456789876543210) arg) (DSym2 t0123456789876543210 arg) =>
+                              DSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (DSym1 t0123456789876543210) t0123456789876543210 = DSym2 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings DSym0 where
+      suppressUnusedWarnings = snd (((,) DSym0KindInference) ())
+    data DSym0 :: forall a0123456789876543210
+                         b0123456789876543210
+                         c0123456789876543210
+                         d0123456789876543210.
+                  (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))))
+      where
+        DSym0KindInference :: forall t0123456789876543210
+                                     arg. SameKind (Apply DSym0 arg) (DSym1 arg) =>
+                              DSym0 t0123456789876543210
+    type instance Apply DSym0 t0123456789876543210 = DSym1 t0123456789876543210
+    type ESym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) =
+        E t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (ESym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) ESym3KindInference) ())
+    data ESym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210.
+                                                                                                                                                               (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)
+      where
+        ESym3KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (ESym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (ESym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
+                              ESym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (ESym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = E t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (ESym2 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) ESym2KindInference) ())
+    data ESym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210
+                                                                                                                       d0123456789876543210.
+                                                                                                                (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))
+      where
+        ESym2KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (ESym2 t0123456789876543210 t0123456789876543210) arg) (ESym3 t0123456789876543210 t0123456789876543210 arg) =>
+                              ESym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (ESym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = ESym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (ESym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) ESym1KindInference) ())
+    data ESym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
+                                                                        c0123456789876543210
+                                                                        d0123456789876543210.
+                                                                 (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))
+      where
+        ESym1KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (ESym1 t0123456789876543210) arg) (ESym2 t0123456789876543210 arg) =>
+                              ESym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (ESym1 t0123456789876543210) t0123456789876543210 = ESym2 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings ESym0 where
+      suppressUnusedWarnings = snd (((,) ESym0KindInference) ())
+    data ESym0 :: forall a0123456789876543210
+                         b0123456789876543210
+                         c0123456789876543210
+                         d0123456789876543210.
+                  (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))))
+      where
+        ESym0KindInference :: forall t0123456789876543210
+                                     arg. SameKind (Apply ESym0 arg) (ESym1 arg) =>
+                              ESym0 t0123456789876543210
+    type instance Apply ESym0 t0123456789876543210 = ESym1 t0123456789876543210
+    type FSym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) =
+        F t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (FSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) FSym3KindInference) ())
+    data FSym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210.
+                                                                                                                                                               (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)
+      where
+        FSym3KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (FSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) arg) (FSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 arg) =>
+                              FSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (FSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) t0123456789876543210 = F t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (FSym2 t0123456789876543210 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) FSym2KindInference) ())
+    data FSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210
+                                                                                                                       d0123456789876543210.
+                                                                                                                (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))
+      where
+        FSym2KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (FSym2 t0123456789876543210 t0123456789876543210) arg) (FSym3 t0123456789876543210 t0123456789876543210 arg) =>
+                              FSym2 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    type instance Apply (FSym2 t0123456789876543210 t0123456789876543210) t0123456789876543210 = FSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (FSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) FSym1KindInference) ())
+    data FSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210
+                                                                        c0123456789876543210
+                                                                        d0123456789876543210.
+                                                                 (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))
+      where
+        FSym1KindInference :: forall t0123456789876543210
+                                     t0123456789876543210
+                                     arg. SameKind (Apply (FSym1 t0123456789876543210) arg) (FSym2 t0123456789876543210 arg) =>
+                              FSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (FSym1 t0123456789876543210) t0123456789876543210 = FSym2 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings FSym0 where
+      suppressUnusedWarnings = snd (((,) FSym0KindInference) ())
+    data FSym0 :: forall a0123456789876543210
+                         b0123456789876543210
+                         c0123456789876543210
+                         d0123456789876543210.
+                  (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))))
+      where
+        FSym0KindInference :: forall t0123456789876543210
+                                     arg. SameKind (Apply FSym0 arg) (FSym1 arg) =>
+                              FSym0 t0123456789876543210
+    type instance Apply FSym0 t0123456789876543210 = FSym1 t0123456789876543210
+    type family Compare_0123456789876543210 (a :: Nat) (a :: Nat) :: Ordering where
+      Compare_0123456789876543210 Zero Zero = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
+      Compare_0123456789876543210 (Succ a_0123456789876543210) (Succ b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])
+      Compare_0123456789876543210 Zero (Succ _) = LTSym0
+      Compare_0123456789876543210 (Succ _) Zero = GTSym0
+    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
+        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
+    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Nat Ordering
+      where
+        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
+    data Compare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering)
+      where
+        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
+                                                        Compare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
+    instance POrd Nat where
+      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
+    type family Compare_0123456789876543210 (a :: Foo a b c d) (a :: Foo a b c d) :: Ordering where
+      Compare_0123456789876543210 (A a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (A b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))
+      Compare_0123456789876543210 (B a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (B b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))
+      Compare_0123456789876543210 (C a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (C b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))
+      Compare_0123456789876543210 (D a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (D b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))
+      Compare_0123456789876543210 (E a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (E b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))
+      Compare_0123456789876543210 (F a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210) (F b_0123456789876543210 b_0123456789876543210 b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))))
+      Compare_0123456789876543210 (A _ _ _ _) (B _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (A _ _ _ _) (C _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (A _ _ _ _) (D _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (A _ _ _ _) (E _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (A _ _ _ _) (F _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (B _ _ _ _) (A _ _ _ _) = GTSym0
+      Compare_0123456789876543210 (B _ _ _ _) (C _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (B _ _ _ _) (D _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (B _ _ _ _) (E _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (B _ _ _ _) (F _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (C _ _ _ _) (A _ _ _ _) = GTSym0
+      Compare_0123456789876543210 (C _ _ _ _) (B _ _ _ _) = GTSym0
+      Compare_0123456789876543210 (C _ _ _ _) (D _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (C _ _ _ _) (E _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (C _ _ _ _) (F _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (D _ _ _ _) (A _ _ _ _) = GTSym0
+      Compare_0123456789876543210 (D _ _ _ _) (B _ _ _ _) = GTSym0
+      Compare_0123456789876543210 (D _ _ _ _) (C _ _ _ _) = GTSym0
+      Compare_0123456789876543210 (D _ _ _ _) (E _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (D _ _ _ _) (F _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (E _ _ _ _) (A _ _ _ _) = GTSym0
+      Compare_0123456789876543210 (E _ _ _ _) (B _ _ _ _) = GTSym0
+      Compare_0123456789876543210 (E _ _ _ _) (C _ _ _ _) = GTSym0
+      Compare_0123456789876543210 (E _ _ _ _) (D _ _ _ _) = GTSym0
+      Compare_0123456789876543210 (E _ _ _ _) (F _ _ _ _) = LTSym0
+      Compare_0123456789876543210 (F _ _ _ _) (A _ _ _ _) = GTSym0
+      Compare_0123456789876543210 (F _ _ _ _) (B _ _ _ _) = GTSym0
+      Compare_0123456789876543210 (F _ _ _ _) (C _ _ _ _) = GTSym0
+      Compare_0123456789876543210 (F _ _ _ _) (D _ _ _ _) = GTSym0
+      Compare_0123456789876543210 (F _ _ _ _) (E _ _ _ _) = GTSym0
+    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) (a0123456789876543210 :: Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) =
+        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
+    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) :: (~>) (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) Ordering
+      where
+        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
+    data Compare_0123456789876543210Sym0 :: forall a0123456789876543210
+                                                   b0123456789876543210
+                                                   c0123456789876543210
+                                                   d0123456789876543210.
+                                            (~>) (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) ((~>) (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) Ordering)
+      where
+        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
+                                                        Compare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
+    instance POrd (Foo a b c d) where
+      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
+    type family Equals_0123456789876543210 (a :: Nat) (b :: Nat) :: Bool where
+      Equals_0123456789876543210 Zero Zero = TrueSym0
+      Equals_0123456789876543210 (Succ a) (Succ b) = (==) a b
+      Equals_0123456789876543210 (_ :: Nat) (_ :: Nat) = FalseSym0
+    instance PEq Nat where
+      type (==) a b = Equals_0123456789876543210 a b
+    type family Equals_0123456789876543210 (a :: Foo a b c d) (b :: Foo a b c d) :: Bool where
+      Equals_0123456789876543210 (A a a a a) (A b b b b) = (&&) ((==) a b) ((&&) ((==) a b) ((&&) ((==) a b) ((==) a b)))
+      Equals_0123456789876543210 (B a a a a) (B b b b b) = (&&) ((==) a b) ((&&) ((==) a b) ((&&) ((==) a b) ((==) a b)))
+      Equals_0123456789876543210 (C a a a a) (C b b b b) = (&&) ((==) a b) ((&&) ((==) a b) ((&&) ((==) a b) ((==) a b)))
+      Equals_0123456789876543210 (D a a a a) (D b b b b) = (&&) ((==) a b) ((&&) ((==) a b) ((&&) ((==) a b) ((==) a b)))
+      Equals_0123456789876543210 (E a a a a) (E b b b b) = (&&) ((==) a b) ((&&) ((==) a b) ((&&) ((==) a b) ((==) a b)))
+      Equals_0123456789876543210 (F a a a a) (F b b b b) = (&&) ((==) a b) ((&&) ((==) a b) ((&&) ((==) a b) ((==) a b)))
+      Equals_0123456789876543210 (_ :: Foo a b c d) (_ :: Foo a b c d) = FalseSym0
+    instance PEq (Foo a b c d) where
+      type (==) a b = Equals_0123456789876543210 a b
+    data SNat :: Nat -> GHC.Types.Type
+      where
+        SZero :: SNat Zero
+        SSucc :: forall (n :: Nat). (Sing (n :: Nat)) -> SNat (Succ n)
+    type instance Sing @Nat = SNat
+    instance SingKind Nat where
+      type Demote Nat = Nat
+      fromSing SZero = Zero
+      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) }
+    data SFoo :: forall a b c d. Foo a b c d -> GHC.Types.Type
+      where
+        SA :: forall a b c d (n :: a) (n :: b) (n :: c) (n :: d).
+              (Sing (n :: a))
+              -> (Sing (n :: b))
+                 -> (Sing (n :: c)) -> (Sing (n :: d)) -> SFoo (A n n n n)
+        SB :: forall a b c d (n :: a) (n :: b) (n :: c) (n :: d).
+              (Sing (n :: a))
+              -> (Sing (n :: b))
+                 -> (Sing (n :: c)) -> (Sing (n :: d)) -> SFoo (B n n n n)
+        SC :: forall a b c d (n :: a) (n :: b) (n :: c) (n :: d).
+              (Sing (n :: a))
+              -> (Sing (n :: b))
+                 -> (Sing (n :: c)) -> (Sing (n :: d)) -> SFoo (C n n n n)
+        SD :: forall a b c d (n :: a) (n :: b) (n :: c) (n :: d).
+              (Sing (n :: a))
+              -> (Sing (n :: b))
+                 -> (Sing (n :: c)) -> (Sing (n :: d)) -> SFoo (D n n n n)
+        SE :: forall a b c d (n :: a) (n :: b) (n :: c) (n :: d).
+              (Sing (n :: a))
+              -> (Sing (n :: b))
+                 -> (Sing (n :: c)) -> (Sing (n :: d)) -> SFoo (E n n n n)
+        SF :: forall a b c d (n :: a) (n :: b) (n :: c) (n :: d).
+              (Sing (n :: a))
+              -> (Sing (n :: b))
+                 -> (Sing (n :: c)) -> (Sing (n :: d)) -> SFoo (F n n n n)
+    type instance Sing @(Foo a b c d) = SFoo
+    instance (SingKind a, SingKind b, SingKind c, SingKind d) =>
+             SingKind (Foo a b c d) where
+      type Demote (Foo a b c d) = Foo (Demote a) (Demote b) (Demote c) (Demote d)
+      fromSing (SA b b b b)
+        = (((A (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)
+      fromSing (SB b b b b)
+        = (((B (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)
+      fromSing (SC b b b b)
+        = (((C (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)
+      fromSing (SD b b b b)
+        = (((D (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)
+      fromSing (SE b b b b)
+        = (((E (fromSing b)) (fromSing b)) (fromSing b)) (fromSing b)
+      fromSing (SF b b b b)
+        = (((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) }
+      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) }
+      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) }
+      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) }
+      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) }
+      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) }
+    instance SOrd Nat => SOrd Nat where
+      sCompare ::
+        forall (t1 :: Nat) (t2 :: Nat).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (CompareSym0 :: TyFun Nat ((~>) Nat Ordering)
+                                                 -> GHC.Types.Type) t1) t2)
+      sCompare SZero SZero
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            SNil
+      sCompare
+        (SSucc (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        (SSucc (sB_0123456789876543210 :: Sing b_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            ((applySing
+                ((applySing ((singFun2 @(:@#@$)) SCons))
+                   ((applySing
+                       ((applySing ((singFun2 @CompareSym0) sCompare))
+                          sA_0123456789876543210))
+                      sB_0123456789876543210)))
+               SNil)
+      sCompare SZero (SSucc _) = SLT
+      sCompare (SSucc _) SZero = SGT
+    instance (SOrd a, SOrd b, SOrd c, SOrd d) =>
+             SOrd (Foo a b c d) where
+      sCompare ::
+        forall (t1 :: Foo a b c d) (t2 :: Foo a b c d).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (CompareSym0 :: TyFun (Foo a b c d) ((~>) (Foo a b c d) Ordering)
+                                                 -> GHC.Types.Type) t1) t2)
+      sCompare
+        (SA (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        (SA (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            ((applySing
+                ((applySing ((singFun2 @(:@#@$)) SCons))
+                   ((applySing
+                       ((applySing ((singFun2 @CompareSym0) sCompare))
+                          sA_0123456789876543210))
+                      sB_0123456789876543210)))
+               ((applySing
+                   ((applySing ((singFun2 @(:@#@$)) SCons))
+                      ((applySing
+                          ((applySing ((singFun2 @CompareSym0) sCompare))
+                             sA_0123456789876543210))
+                         sB_0123456789876543210)))
+                  ((applySing
+                      ((applySing ((singFun2 @(:@#@$)) SCons))
+                         ((applySing
+                             ((applySing ((singFun2 @CompareSym0) sCompare))
+                                sA_0123456789876543210))
+                            sB_0123456789876543210)))
+                     ((applySing
+                         ((applySing ((singFun2 @(:@#@$)) SCons))
+                            ((applySing
+                                ((applySing ((singFun2 @CompareSym0) sCompare))
+                                   sA_0123456789876543210))
+                               sB_0123456789876543210)))
+                        SNil))))
+      sCompare
+        (SB (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        (SB (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            ((applySing
+                ((applySing ((singFun2 @(:@#@$)) SCons))
+                   ((applySing
+                       ((applySing ((singFun2 @CompareSym0) sCompare))
+                          sA_0123456789876543210))
+                      sB_0123456789876543210)))
+               ((applySing
+                   ((applySing ((singFun2 @(:@#@$)) SCons))
+                      ((applySing
+                          ((applySing ((singFun2 @CompareSym0) sCompare))
+                             sA_0123456789876543210))
+                         sB_0123456789876543210)))
+                  ((applySing
+                      ((applySing ((singFun2 @(:@#@$)) SCons))
+                         ((applySing
+                             ((applySing ((singFun2 @CompareSym0) sCompare))
+                                sA_0123456789876543210))
+                            sB_0123456789876543210)))
+                     ((applySing
+                         ((applySing ((singFun2 @(:@#@$)) SCons))
+                            ((applySing
+                                ((applySing ((singFun2 @CompareSym0) sCompare))
+                                   sA_0123456789876543210))
+                               sB_0123456789876543210)))
+                        SNil))))
+      sCompare
+        (SC (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        (SC (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            ((applySing
+                ((applySing ((singFun2 @(:@#@$)) SCons))
+                   ((applySing
+                       ((applySing ((singFun2 @CompareSym0) sCompare))
+                          sA_0123456789876543210))
+                      sB_0123456789876543210)))
+               ((applySing
+                   ((applySing ((singFun2 @(:@#@$)) SCons))
+                      ((applySing
+                          ((applySing ((singFun2 @CompareSym0) sCompare))
+                             sA_0123456789876543210))
+                         sB_0123456789876543210)))
+                  ((applySing
+                      ((applySing ((singFun2 @(:@#@$)) SCons))
+                         ((applySing
+                             ((applySing ((singFun2 @CompareSym0) sCompare))
+                                sA_0123456789876543210))
+                            sB_0123456789876543210)))
+                     ((applySing
+                         ((applySing ((singFun2 @(:@#@$)) SCons))
+                            ((applySing
+                                ((applySing ((singFun2 @CompareSym0) sCompare))
+                                   sA_0123456789876543210))
+                               sB_0123456789876543210)))
+                        SNil))))
+      sCompare
+        (SD (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        (SD (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            ((applySing
+                ((applySing ((singFun2 @(:@#@$)) SCons))
+                   ((applySing
+                       ((applySing ((singFun2 @CompareSym0) sCompare))
+                          sA_0123456789876543210))
+                      sB_0123456789876543210)))
+               ((applySing
+                   ((applySing ((singFun2 @(:@#@$)) SCons))
+                      ((applySing
+                          ((applySing ((singFun2 @CompareSym0) sCompare))
+                             sA_0123456789876543210))
+                         sB_0123456789876543210)))
+                  ((applySing
+                      ((applySing ((singFun2 @(:@#@$)) SCons))
+                         ((applySing
+                             ((applySing ((singFun2 @CompareSym0) sCompare))
+                                sA_0123456789876543210))
+                            sB_0123456789876543210)))
+                     ((applySing
+                         ((applySing ((singFun2 @(:@#@$)) SCons))
+                            ((applySing
+                                ((applySing ((singFun2 @CompareSym0) sCompare))
+                                   sA_0123456789876543210))
+                               sB_0123456789876543210)))
+                        SNil))))
+      sCompare
+        (SE (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        (SE (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            ((applySing
+                ((applySing ((singFun2 @(:@#@$)) SCons))
+                   ((applySing
+                       ((applySing ((singFun2 @CompareSym0) sCompare))
+                          sA_0123456789876543210))
+                      sB_0123456789876543210)))
+               ((applySing
+                   ((applySing ((singFun2 @(:@#@$)) SCons))
+                      ((applySing
+                          ((applySing ((singFun2 @CompareSym0) sCompare))
+                             sA_0123456789876543210))
+                         sB_0123456789876543210)))
+                  ((applySing
+                      ((applySing ((singFun2 @(:@#@$)) SCons))
+                         ((applySing
+                             ((applySing ((singFun2 @CompareSym0) sCompare))
+                                sA_0123456789876543210))
+                            sB_0123456789876543210)))
+                     ((applySing
+                         ((applySing ((singFun2 @(:@#@$)) SCons))
+                            ((applySing
+                                ((applySing ((singFun2 @CompareSym0) sCompare))
+                                   sA_0123456789876543210))
+                               sB_0123456789876543210)))
+                        SNil))))
+      sCompare
+        (SF (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210)
+            (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        (SF (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210)
+            (sB_0123456789876543210 :: Sing b_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            ((applySing
+                ((applySing ((singFun2 @(:@#@$)) SCons))
+                   ((applySing
+                       ((applySing ((singFun2 @CompareSym0) sCompare))
+                          sA_0123456789876543210))
+                      sB_0123456789876543210)))
+               ((applySing
+                   ((applySing ((singFun2 @(:@#@$)) SCons))
+                      ((applySing
+                          ((applySing ((singFun2 @CompareSym0) sCompare))
+                             sA_0123456789876543210))
+                         sB_0123456789876543210)))
+                  ((applySing
+                      ((applySing ((singFun2 @(:@#@$)) SCons))
+                         ((applySing
+                             ((applySing ((singFun2 @CompareSym0) sCompare))
+                                sA_0123456789876543210))
+                            sB_0123456789876543210)))
+                     ((applySing
+                         ((applySing ((singFun2 @(:@#@$)) SCons))
+                            ((applySing
+                                ((applySing ((singFun2 @CompareSym0) sCompare))
+                                   sA_0123456789876543210))
+                               sB_0123456789876543210)))
+                        SNil))))
+      sCompare (SA _ _ _ _) (SB _ _ _ _) = SLT
+      sCompare (SA _ _ _ _) (SC _ _ _ _) = SLT
+      sCompare (SA _ _ _ _) (SD _ _ _ _) = SLT
+      sCompare (SA _ _ _ _) (SE _ _ _ _) = SLT
+      sCompare (SA _ _ _ _) (SF _ _ _ _) = SLT
+      sCompare (SB _ _ _ _) (SA _ _ _ _) = SGT
+      sCompare (SB _ _ _ _) (SC _ _ _ _) = SLT
+      sCompare (SB _ _ _ _) (SD _ _ _ _) = SLT
+      sCompare (SB _ _ _ _) (SE _ _ _ _) = SLT
+      sCompare (SB _ _ _ _) (SF _ _ _ _) = SLT
+      sCompare (SC _ _ _ _) (SA _ _ _ _) = SGT
+      sCompare (SC _ _ _ _) (SB _ _ _ _) = SGT
+      sCompare (SC _ _ _ _) (SD _ _ _ _) = SLT
+      sCompare (SC _ _ _ _) (SE _ _ _ _) = SLT
+      sCompare (SC _ _ _ _) (SF _ _ _ _) = SLT
+      sCompare (SD _ _ _ _) (SA _ _ _ _) = SGT
+      sCompare (SD _ _ _ _) (SB _ _ _ _) = SGT
+      sCompare (SD _ _ _ _) (SC _ _ _ _) = SGT
+      sCompare (SD _ _ _ _) (SE _ _ _ _) = SLT
+      sCompare (SD _ _ _ _) (SF _ _ _ _) = SLT
+      sCompare (SE _ _ _ _) (SA _ _ _ _) = SGT
+      sCompare (SE _ _ _ _) (SB _ _ _ _) = SGT
+      sCompare (SE _ _ _ _) (SC _ _ _ _) = SGT
+      sCompare (SE _ _ _ _) (SD _ _ _ _) = SGT
+      sCompare (SE _ _ _ _) (SF _ _ _ _) = SLT
+      sCompare (SF _ _ _ _) (SA _ _ _ _) = SGT
+      sCompare (SF _ _ _ _) (SB _ _ _ _) = SGT
+      sCompare (SF _ _ _ _) (SC _ _ _ _) = SGT
+      sCompare (SF _ _ _ _) (SD _ _ _ _) = SGT
+      sCompare (SF _ _ _ _) (SE _ _ _ _) = SGT
+    instance SEq Nat => SEq Nat where
+      (%==) SZero SZero = STrue
+      (%==) SZero (SSucc _) = SFalse
+      (%==) (SSucc _) SZero = SFalse
+      (%==) (SSucc a) (SSucc b) = ((%==) a) b
+    instance SDecide Nat => SDecide Nat where
+      (%~) SZero SZero = Proved Refl
+      (%~) SZero (SSucc _) = Disproved (\ x -> case x of)
+      (%~) (SSucc _) SZero = Disproved (\ x -> case x of)
+      (%~) (SSucc a) (SSucc b)
+        = case ((%~) a) b of
+            Proved Refl -> Proved Refl
+            Disproved contra
+              -> Disproved (\ refl -> case refl of { Refl -> contra Refl })
+    instance SDecide Nat =>
+             Data.Type.Equality.TestEquality (SNat :: Nat
+                                                      -> GHC.Types.Type) where
+      Data.Type.Equality.testEquality
+        = Data.Singletons.Decide.decideEquality
+    instance SDecide Nat =>
+             Data.Type.Coercion.TestCoercion (SNat :: Nat
+                                                      -> GHC.Types.Type) where
+      Data.Type.Coercion.testCoercion
+        = Data.Singletons.Decide.decideCoercion
+    instance (SEq a, SEq b, SEq c, SEq d) => SEq (Foo a b c d) where
+      (%==) (SA a a a a) (SA b b b b)
+        = ((%&&) (((%==) a) b))
+            (((%&&) (((%==) a) b)) (((%&&) (((%==) a) b)) (((%==) a) b)))
+      (%==) (SA _ _ _ _) (SB _ _ _ _) = SFalse
+      (%==) (SA _ _ _ _) (SC _ _ _ _) = SFalse
+      (%==) (SA _ _ _ _) (SD _ _ _ _) = SFalse
+      (%==) (SA _ _ _ _) (SE _ _ _ _) = SFalse
+      (%==) (SA _ _ _ _) (SF _ _ _ _) = SFalse
+      (%==) (SB _ _ _ _) (SA _ _ _ _) = SFalse
+      (%==) (SB a a a a) (SB b b b b)
+        = ((%&&) (((%==) a) b))
+            (((%&&) (((%==) a) b)) (((%&&) (((%==) a) b)) (((%==) a) b)))
+      (%==) (SB _ _ _ _) (SC _ _ _ _) = SFalse
+      (%==) (SB _ _ _ _) (SD _ _ _ _) = SFalse
+      (%==) (SB _ _ _ _) (SE _ _ _ _) = SFalse
+      (%==) (SB _ _ _ _) (SF _ _ _ _) = SFalse
+      (%==) (SC _ _ _ _) (SA _ _ _ _) = SFalse
+      (%==) (SC _ _ _ _) (SB _ _ _ _) = SFalse
+      (%==) (SC a a a a) (SC b b b b)
+        = ((%&&) (((%==) a) b))
+            (((%&&) (((%==) a) b)) (((%&&) (((%==) a) b)) (((%==) a) b)))
+      (%==) (SC _ _ _ _) (SD _ _ _ _) = SFalse
+      (%==) (SC _ _ _ _) (SE _ _ _ _) = SFalse
+      (%==) (SC _ _ _ _) (SF _ _ _ _) = SFalse
+      (%==) (SD _ _ _ _) (SA _ _ _ _) = SFalse
+      (%==) (SD _ _ _ _) (SB _ _ _ _) = SFalse
+      (%==) (SD _ _ _ _) (SC _ _ _ _) = SFalse
+      (%==) (SD a a a a) (SD b b b b)
+        = ((%&&) (((%==) a) b))
+            (((%&&) (((%==) a) b)) (((%&&) (((%==) a) b)) (((%==) a) b)))
+      (%==) (SD _ _ _ _) (SE _ _ _ _) = SFalse
+      (%==) (SD _ _ _ _) (SF _ _ _ _) = SFalse
+      (%==) (SE _ _ _ _) (SA _ _ _ _) = SFalse
+      (%==) (SE _ _ _ _) (SB _ _ _ _) = SFalse
+      (%==) (SE _ _ _ _) (SC _ _ _ _) = SFalse
+      (%==) (SE _ _ _ _) (SD _ _ _ _) = SFalse
+      (%==) (SE a a a a) (SE b b b b)
+        = ((%&&) (((%==) a) b))
+            (((%&&) (((%==) a) b)) (((%&&) (((%==) a) b)) (((%==) a) b)))
+      (%==) (SE _ _ _ _) (SF _ _ _ _) = SFalse
+      (%==) (SF _ _ _ _) (SA _ _ _ _) = SFalse
+      (%==) (SF _ _ _ _) (SB _ _ _ _) = SFalse
+      (%==) (SF _ _ _ _) (SC _ _ _ _) = SFalse
+      (%==) (SF _ _ _ _) (SD _ _ _ _) = SFalse
+      (%==) (SF _ _ _ _) (SE _ _ _ _) = SFalse
+      (%==) (SF a a a a) (SF b b b b)
+        = ((%&&) (((%==) a) b))
+            (((%&&) (((%==) a) b)) (((%&&) (((%==) a) b)) (((%==) a) b)))
+    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)
+      (%~) (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)
+      (%~) (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)
+      (%~) (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)
+      (%~) (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)
+      (%~) (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 })
+    instance (SDecide a, SDecide b, SDecide c, SDecide d) =>
+             Data.Type.Equality.TestEquality (SFoo :: Foo a b c d
+                                                      -> GHC.Types.Type) where
+      Data.Type.Equality.testEquality
+        = Data.Singletons.Decide.decideEquality
+    instance (SDecide a, SDecide b, SDecide c, SDecide d) =>
+             Data.Type.Coercion.TestCoercion (SFoo :: Foo a b c d
+                                                      -> GHC.Types.Type) where
+      Data.Type.Coercion.testCoercion
+        = Data.Singletons.Decide.decideCoercion
+    instance SingI Zero where
+      sing = SZero
+    instance SingI n => SingI (Succ (n :: Nat)) where
+      sing = SSucc sing
+    instance SingI (SuccSym0 :: (~>) Nat Nat) where
+      sing = (singFun1 @SuccSym0) SSucc
+    instance (SingI n, SingI n, SingI n, SingI n) =>
+             SingI (A (n :: a) (n :: b) (n :: c) (n :: d)) where
+      sing = (((SA sing) sing) sing) sing
+    instance SingI (ASym0 :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
+      sing = (singFun4 @ASym0) SA
+    instance SingI d =>
+             SingI (ASym1 (d :: a) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
+      sing = (singFun3 @(ASym1 (d :: a))) (SA (sing @d))
+    instance (SingI d, SingI d) =>
+             SingI (ASym2 (d :: a) (d :: b) :: (~>) c ((~>) d (Foo a b c d))) where
+      sing
+        = (singFun2 @(ASym2 (d :: a) (d :: b))) ((SA (sing @d)) (sing @d))
+    instance (SingI d, SingI d, SingI d) =>
+             SingI (ASym3 (d :: a) (d :: b) (d :: c) :: (~>) d (Foo a b c d)) where
+      sing
+        = (singFun1 @(ASym3 (d :: a) (d :: b) (d :: c)))
+            (((SA (sing @d)) (sing @d)) (sing @d))
+    instance (SingI n, SingI n, SingI n, SingI n) =>
+             SingI (B (n :: a) (n :: b) (n :: c) (n :: d)) where
+      sing = (((SB sing) sing) sing) sing
+    instance SingI (BSym0 :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
+      sing = (singFun4 @BSym0) SB
+    instance SingI d =>
+             SingI (BSym1 (d :: a) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
+      sing = (singFun3 @(BSym1 (d :: a))) (SB (sing @d))
+    instance (SingI d, SingI d) =>
+             SingI (BSym2 (d :: a) (d :: b) :: (~>) c ((~>) d (Foo a b c d))) where
+      sing
+        = (singFun2 @(BSym2 (d :: a) (d :: b))) ((SB (sing @d)) (sing @d))
+    instance (SingI d, SingI d, SingI d) =>
+             SingI (BSym3 (d :: a) (d :: b) (d :: c) :: (~>) d (Foo a b c d)) where
+      sing
+        = (singFun1 @(BSym3 (d :: a) (d :: b) (d :: c)))
+            (((SB (sing @d)) (sing @d)) (sing @d))
+    instance (SingI n, SingI n, SingI n, SingI n) =>
+             SingI (C (n :: a) (n :: b) (n :: c) (n :: d)) where
+      sing = (((SC sing) sing) sing) sing
+    instance SingI (CSym0 :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
+      sing = (singFun4 @CSym0) SC
+    instance SingI d =>
+             SingI (CSym1 (d :: a) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
+      sing = (singFun3 @(CSym1 (d :: a))) (SC (sing @d))
+    instance (SingI d, SingI d) =>
+             SingI (CSym2 (d :: a) (d :: b) :: (~>) c ((~>) d (Foo a b c d))) where
+      sing
+        = (singFun2 @(CSym2 (d :: a) (d :: b))) ((SC (sing @d)) (sing @d))
+    instance (SingI d, SingI d, SingI d) =>
+             SingI (CSym3 (d :: a) (d :: b) (d :: c) :: (~>) d (Foo a b c d)) where
+      sing
+        = (singFun1 @(CSym3 (d :: a) (d :: b) (d :: c)))
+            (((SC (sing @d)) (sing @d)) (sing @d))
+    instance (SingI n, SingI n, SingI n, SingI n) =>
+             SingI (D (n :: a) (n :: b) (n :: c) (n :: d)) where
+      sing = (((SD sing) sing) sing) sing
+    instance SingI (DSym0 :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
+      sing = (singFun4 @DSym0) SD
+    instance SingI d =>
+             SingI (DSym1 (d :: a) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
+      sing = (singFun3 @(DSym1 (d :: a))) (SD (sing @d))
+    instance (SingI d, SingI d) =>
+             SingI (DSym2 (d :: a) (d :: b) :: (~>) c ((~>) d (Foo a b c d))) where
+      sing
+        = (singFun2 @(DSym2 (d :: a) (d :: b))) ((SD (sing @d)) (sing @d))
+    instance (SingI d, SingI d, SingI d) =>
+             SingI (DSym3 (d :: a) (d :: b) (d :: c) :: (~>) d (Foo a b c d)) where
+      sing
+        = (singFun1 @(DSym3 (d :: a) (d :: b) (d :: c)))
+            (((SD (sing @d)) (sing @d)) (sing @d))
+    instance (SingI n, SingI n, SingI n, SingI n) =>
+             SingI (E (n :: a) (n :: b) (n :: c) (n :: d)) where
+      sing = (((SE sing) sing) sing) sing
+    instance SingI (ESym0 :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
+      sing = (singFun4 @ESym0) SE
+    instance SingI d =>
+             SingI (ESym1 (d :: a) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
+      sing = (singFun3 @(ESym1 (d :: a))) (SE (sing @d))
+    instance (SingI d, SingI d) =>
+             SingI (ESym2 (d :: a) (d :: b) :: (~>) c ((~>) d (Foo a b c d))) where
+      sing
+        = (singFun2 @(ESym2 (d :: a) (d :: b))) ((SE (sing @d)) (sing @d))
+    instance (SingI d, SingI d, SingI d) =>
+             SingI (ESym3 (d :: a) (d :: b) (d :: c) :: (~>) d (Foo a b c d)) where
+      sing
+        = (singFun1 @(ESym3 (d :: a) (d :: b) (d :: c)))
+            (((SE (sing @d)) (sing @d)) (sing @d))
+    instance (SingI n, SingI n, SingI n, SingI n) =>
+             SingI (F (n :: a) (n :: b) (n :: c) (n :: d)) where
+      sing = (((SF sing) sing) sing) sing
+    instance SingI (FSym0 :: (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d))))) where
+      sing = (singFun4 @FSym0) SF
+    instance SingI d =>
+             SingI (FSym1 (d :: a) :: (~>) b ((~>) c ((~>) d (Foo a b c d)))) where
+      sing = (singFun3 @(FSym1 (d :: a))) (SF (sing @d))
+    instance (SingI d, SingI d) =>
+             SingI (FSym2 (d :: a) (d :: b) :: (~>) c ((~>) d (Foo a b c d))) where
+      sing
+        = (singFun2 @(FSym2 (d :: a) (d :: b))) ((SF (sing @d)) (sing @d))
+    instance (SingI d, SingI d, SingI d) =>
+             SingI (FSym3 (d :: a) (d :: b) (d :: c) :: (~>) d (Foo a b c d)) where
+      sing
+        = (singFun1 @(FSym3 (d :: a) (d :: b) (d :: c)))
+            (((SF (sing @d)) (sing @d)) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/OverloadedStrings.ghc86.template b/tests/compile-and-dump/Singletons/OverloadedStrings.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/OverloadedStrings.ghc86.template
+++ /dev/null
@@ -1,35 +0,0 @@
-Singletons/OverloadedStrings.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| symId :: Symbol -> Symbol
-          symId x = x
-          foo :: Symbol
-          foo = symId "foo" |]
-  ======>
-    symId :: Symbol -> Symbol
-    symId x = x
-    foo :: Symbol
-    foo = symId "foo"
-    type SymIdSym1 (a0123456789876543210 :: Symbol) =
-        SymId a0123456789876543210
-    instance SuppressUnusedWarnings SymIdSym0 where
-      suppressUnusedWarnings = snd (((,) SymIdSym0KindInference) ())
-    data SymIdSym0 :: (~>) Symbol Symbol
-      where
-        SymIdSym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply SymIdSym0 arg) (SymIdSym1 arg) =>
-                                  SymIdSym0 a0123456789876543210
-    type instance Apply SymIdSym0 a0123456789876543210 = SymId a0123456789876543210
-    type FooSym0 = Foo
-    type family SymId (a :: Symbol) :: Symbol where
-      SymId x = x
-    type family Foo :: Symbol where
-      Foo = Apply SymIdSym0 (Data.Singletons.Prelude.IsString.FromString "foo")
-    sSymId ::
-      forall (t :: Symbol). Sing t -> Sing (Apply SymIdSym0 t :: Symbol)
-    sFoo :: Sing (FooSym0 :: Symbol)
-    sSymId (sX :: Sing x) = sX
-    sFoo
-      = (applySing ((singFun1 @SymIdSym0) sSymId))
-          (Data.Singletons.Prelude.IsString.sFromString (sing :: Sing "foo"))
-    instance SingI (SymIdSym0 :: (~>) Symbol Symbol) where
-      sing = (singFun1 @SymIdSym0) sSymId
diff --git a/tests/compile-and-dump/Singletons/OverloadedStrings.ghc88.template b/tests/compile-and-dump/Singletons/OverloadedStrings.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/OverloadedStrings.ghc88.template
@@ -0,0 +1,35 @@
+Singletons/OverloadedStrings.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| symId :: Symbol -> Symbol
+          symId x = x
+          foo :: Symbol
+          foo = symId "foo" |]
+  ======>
+    symId :: Symbol -> Symbol
+    symId x = x
+    foo :: Symbol
+    foo = symId "foo"
+    type FooSym0 = Foo
+    type SymIdSym1 (a0123456789876543210 :: Symbol) =
+        SymId a0123456789876543210
+    instance SuppressUnusedWarnings SymIdSym0 where
+      suppressUnusedWarnings = snd (((,) SymIdSym0KindInference) ())
+    data SymIdSym0 :: (~>) Symbol Symbol
+      where
+        SymIdSym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply SymIdSym0 arg) (SymIdSym1 arg) =>
+                                  SymIdSym0 a0123456789876543210
+    type instance Apply SymIdSym0 a0123456789876543210 = SymId a0123456789876543210
+    type family Foo :: Symbol where
+      Foo = Apply SymIdSym0 (Data.Singletons.Prelude.IsString.FromString "foo")
+    type family SymId (a :: Symbol) :: Symbol where
+      SymId x = x
+    sFoo :: Sing (FooSym0 :: Symbol)
+    sSymId ::
+      forall (t :: Symbol). Sing t -> Sing (Apply SymIdSym0 t :: Symbol)
+    sFoo
+      = (applySing ((singFun1 @SymIdSym0) sSymId))
+          (Data.Singletons.Prelude.IsString.sFromString (sing :: Sing "foo"))
+    sSymId (sX :: Sing x) = sX
+    instance SingI (SymIdSym0 :: (~>) Symbol Symbol) where
+      sing = (singFun1 @SymIdSym0) sSymId
diff --git a/tests/compile-and-dump/Singletons/PatternMatching.ghc86.template b/tests/compile-and-dump/Singletons/PatternMatching.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/PatternMatching.ghc86.template
+++ /dev/null
@@ -1,574 +0,0 @@
-Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| pr = Pair (Succ Zero) ([Zero])
-          complex = Pair (Pair (Just Zero) Zero) False
-          tuple = (False, Just Zero, True)
-          aList = [Zero, Succ Zero, Succ (Succ Zero)]
-          
-          data Pair a b
-            = Pair a b
-            deriving Show |]
-  ======>
-    data Pair a b
-      = Pair a b
-      deriving Show
-    pr = (Pair (Succ Zero)) [Zero]
-    complex = (Pair ((Pair (Just Zero)) Zero)) False
-    tuple = (False, Just Zero, True)
-    aList = [Zero, Succ Zero, Succ (Succ Zero)]
-    type PairSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) =
-        Pair t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (PairSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) PairSym1KindInference) ())
-    data PairSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                    (~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210)
-      where
-        PairSym1KindInference :: forall t0123456789876543210
-                                        t0123456789876543210
-                                        arg. SameKind (Apply (PairSym1 t0123456789876543210) arg) (PairSym2 t0123456789876543210 arg) =>
-                                 PairSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (PairSym1 t0123456789876543210) t0123456789876543210 = Pair t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings PairSym0 where
-      suppressUnusedWarnings = snd (((,) PairSym0KindInference) ())
-    data PairSym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210))
-      where
-        PairSym0KindInference :: forall t0123456789876543210
-                                        arg. SameKind (Apply PairSym0 arg) (PairSym1 arg) =>
-                                 PairSym0 t0123456789876543210
-    type instance Apply PairSym0 t0123456789876543210 = PairSym1 t0123456789876543210
-    type AListSym0 = AList
-    type TupleSym0 = Tuple
-    type ComplexSym0 = Complex
-    type PrSym0 = Pr
-    type family AList where
-      AList = Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply SuccSym0 (Apply SuccSym0 ZeroSym0))) '[]))
-    type family Tuple where
-      Tuple = Apply (Apply (Apply Tuple3Sym0 FalseSym0) (Apply JustSym0 ZeroSym0)) TrueSym0
-    type family Complex where
-      Complex = Apply (Apply PairSym0 (Apply (Apply PairSym0 (Apply JustSym0 ZeroSym0)) ZeroSym0)) FalseSym0
-    type family Pr where
-      Pr = Apply (Apply PairSym0 (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:@#@$) ZeroSym0) '[])
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Pair a b) (a :: Symbol) :: Symbol where
-      ShowsPrec_0123456789876543210 p_0123456789876543210 (Pair arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Pair ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Pair a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Pair a0123456789876543210 b0123456789876543210) :: (~>) Symbol Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210
-                                                                                             b0123456789876543210.
-                                                                                      (~>) (Pair a0123456789876543210 b0123456789876543210) ((~>) Symbol Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                     b0123456789876543210.
-                                              (~>) GHC.Types.Nat ((~>) (Pair a0123456789876543210 b0123456789876543210) ((~>) Symbol Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow (Pair a b) where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    sAList :: Sing AListSym0
-    sTuple :: Sing TupleSym0
-    sComplex :: Sing ComplexSym0
-    sPr :: Sing PrSym0
-    sAList
-      = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SZero))
-          ((applySing
-              ((applySing ((singFun2 @(:@#@$)) SCons))
-                 ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
-             ((applySing
-                 ((applySing ((singFun2 @(:@#@$)) SCons))
-                    ((applySing ((singFun1 @SuccSym0) SSucc))
-                       ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))
-                SNil))
-    sTuple
-      = (applySing
-           ((applySing ((applySing ((singFun3 @Tuple3Sym0) STuple3)) SFalse))
-              ((applySing ((singFun1 @JustSym0) SJust)) SZero)))
-          STrue
-    sComplex
-      = (applySing
-           ((applySing ((singFun2 @PairSym0) SPair))
-              ((applySing
-                  ((applySing ((singFun2 @PairSym0) SPair))
-                     ((applySing ((singFun1 @JustSym0) SJust)) SZero)))
-                 SZero)))
-          SFalse
-    sPr
-      = (applySing
-           ((applySing ((singFun2 @PairSym0) SPair))
-              ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
-          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SZero)) SNil)
-    data instance Sing :: Pair a b -> GHC.Types.Type
-      where
-        SPair :: forall a b (n :: a) (n :: b).
-                 (Sing (n :: a)) -> (Sing (n :: b)) -> Sing (Pair n n)
-    type SPair = (Sing :: Pair a b -> GHC.Types.Type)
-    instance (SingKind a, SingKind b) => SingKind (Pair a b) where
-      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) }
-    instance (SShow a, SShow b) => SShow (Pair a b) where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: Pair a b) (t3 :: Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) (Pair a b) ((~>) Symbol Symbol))
-                                                             -> GHC.Types.Type) t1) t2) t3)
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        (SPair (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
-               (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (sFromInteger (sing :: Sing 10)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                          (sing :: Sing "Pair "))))
-                   ((applySing
-                       ((applySing ((singFun3 @(.@#@$)) (%.)))
-                          ((applySing
-                              ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                                 (sFromInteger (sing :: Sing 11))))
-                             sArg_0123456789876543210)))
-                      ((applySing
-                          ((applySing ((singFun3 @(.@#@$)) (%.)))
-                             ((singFun1 @ShowSpaceSym0) sShowSpace)))
-                         ((applySing
-                             ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                                (sFromInteger (sing :: Sing 11))))
-                            sArg_0123456789876543210))))))
-            sA_0123456789876543210
-    deriving instance (Data.Singletons.ShowSing.ShowSing a,
-                       Data.Singletons.ShowSing.ShowSing b) =>
-                      Show (Sing (z :: Pair a b))
-    instance (SingI n, SingI n) => SingI (Pair (n :: a) (n :: b)) where
-      sing = (SPair sing) sing
-    instance SingI (PairSym0 :: (~>) a ((~>) b (Pair a b))) where
-      sing = (singFun2 @PairSym0) SPair
-    instance SingI (TyCon2 Pair :: (~>) a ((~>) b (Pair a b))) where
-      sing = (singFun2 @(TyCon2 Pair)) SPair
-    instance SingI d =>
-             SingI (PairSym1 (d :: a) :: (~>) b (Pair a b)) where
-      sing = (singFun1 @(PairSym1 (d :: a))) (SPair (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 (Pair (d :: a)) :: (~>) b (Pair a b)) where
-      sing = (singFun1 @(TyCon1 (Pair (d :: a)))) (SPair (sing @d))
-Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| Pair sz lz = pr
-          Pair (Pair jz zz) fls = complex
-          (tf, tjz, tt) = tuple
-          [_, lsz, (Succ blimy)] = aList
-          lsz :: Nat
-          fls :: Bool
-          foo1 :: (a, b) -> a
-          foo1 (x, y) = (\ _ -> x) y
-          foo2 :: (# a, b #) -> a
-          foo2 t@(# x, y #) = case t of { (# a, b #) -> (\ _ -> a) b }
-          silly :: a -> ()
-          silly x = case x of { _ -> () } |]
-  ======>
-    Pair sz lz = pr
-    Pair (Pair jz zz) fls = complex
-    (tf, tjz, tt) = tuple
-    [_, lsz, Succ blimy] = aList
-    lsz :: Nat
-    fls :: Bool
-    foo1 :: (a, b) -> a
-    foo1 (x, y) = (\ _ -> x) y
-    foo2 :: (# a, b #) -> a
-    foo2 t@(# x, y #) = case t of { (# a, b #) -> (\ _ -> a) b }
-    silly :: a -> ()
-    silly x = case x of { _ -> () }
-    type family Case_0123456789876543210 x t where
-      Case_0123456789876543210 x _ = Tuple0Sym0
-    type Let0123456789876543210TSym2 x0123456789876543210 y0123456789876543210 =
-        Let0123456789876543210T x0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210TSym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210TSym1KindInference) ())
-    data Let0123456789876543210TSym1 x0123456789876543210 y0123456789876543210
-      where
-        Let0123456789876543210TSym1KindInference :: forall x0123456789876543210
-                                                           y0123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210TSym1 x0123456789876543210) arg) (Let0123456789876543210TSym2 x0123456789876543210 arg) =>
-                                                    Let0123456789876543210TSym1 x0123456789876543210 y0123456789876543210
-    type instance Apply (Let0123456789876543210TSym1 x0123456789876543210) y0123456789876543210 = Let0123456789876543210T x0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210TSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210TSym0KindInference) ())
-    data Let0123456789876543210TSym0 x0123456789876543210
-      where
-        Let0123456789876543210TSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210TSym0 arg) (Let0123456789876543210TSym1 arg) =>
-                                                    Let0123456789876543210TSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210TSym0 x0123456789876543210 = Let0123456789876543210TSym1 x0123456789876543210
-    type family Let0123456789876543210T x y where
-      Let0123456789876543210T x y = Apply (Apply Tuple2Sym0 x) y
-    type family Case_0123456789876543210 x y a b arg_0123456789876543210 t where
-      Case_0123456789876543210 x y a b arg_0123456789876543210 _ = a
-    type family Lambda_0123456789876543210 x y a b t where
-      Lambda_0123456789876543210 x y a b arg_0123456789876543210 = Case_0123456789876543210 x y a b arg_0123456789876543210 arg_0123456789876543210
-    type Lambda_0123456789876543210Sym5 x0123456789876543210 y0123456789876543210 a0123456789876543210 b0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 a0123456789876543210 b0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 b0123456789876543210 a0123456789876543210 y0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
-    data Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 a0123456789876543210 b0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym4KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              a0123456789876543210
-                                                              b0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym5 x0123456789876543210 y0123456789876543210 a0123456789876543210 b0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 a0123456789876543210 b0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym4 b0123456789876543210 a0123456789876543210 y0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 b0123456789876543210 a0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a0123456789876543210 y0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 a0123456789876543210 b0123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              a0123456789876543210
-                                                              b0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 a0123456789876543210) arg) (Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 a0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 a0123456789876543210 b0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 a0123456789876543210 y0123456789876543210 x0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210Sym4 a0123456789876543210 y0123456789876543210 x0123456789876543210 b0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 a0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              a0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 a0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) a0123456789876543210 = Lambda_0123456789876543210Sym3 y0123456789876543210 x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
-    type family Case_0123456789876543210 x y t where
-      Case_0123456789876543210 x y '(a,
-                                     b) = Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) a) b) b
-    type family Case_0123456789876543210 x y arg_0123456789876543210 t where
-      Case_0123456789876543210 x y arg_0123456789876543210 _ = x
-    type family Lambda_0123456789876543210 x y t where
-      Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210
-    type Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
-                                                              y0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
-    type family Case_0123456789876543210 t where
-      Case_0123456789876543210 '[_,
-                                 y_0123456789876543210,
-                                  'Succ _] = y_0123456789876543210
-    type family Case_0123456789876543210 t where
-      Case_0123456789876543210 '[_,
-                                 _,
-                                  'Succ 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 '(_,
-                                 _,
-                                 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
-    type SillySym1 (a0123456789876543210 :: a0123456789876543210) =
-        Silly a0123456789876543210
-    instance SuppressUnusedWarnings SillySym0 where
-      suppressUnusedWarnings = snd (((,) SillySym0KindInference) ())
-    data SillySym0 :: forall a0123456789876543210.
-                      (~>) a0123456789876543210 ()
-      where
-        SillySym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply SillySym0 arg) (SillySym1 arg) =>
-                                  SillySym0 a0123456789876543210
-    type instance Apply SillySym0 a0123456789876543210 = Silly a0123456789876543210
-    type Foo2Sym1 (a0123456789876543210 :: (a0123456789876543210,
-                                            b0123456789876543210)) =
-        Foo2 a0123456789876543210
-    instance SuppressUnusedWarnings Foo2Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ())
-    data Foo2Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) (a0123456789876543210,
-                           b0123456789876543210) a0123456789876543210
-      where
-        Foo2Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) =>
-                                 Foo2Sym0 a0123456789876543210
-    type instance Apply Foo2Sym0 a0123456789876543210 = Foo2 a0123456789876543210
-    type Foo1Sym1 (a0123456789876543210 :: (a0123456789876543210,
-                                            b0123456789876543210)) =
-        Foo1 a0123456789876543210
-    instance SuppressUnusedWarnings Foo1Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ())
-    data Foo1Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) (a0123456789876543210,
-                           b0123456789876543210) a0123456789876543210
-      where
-        Foo1Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>
-                                 Foo1Sym0 a0123456789876543210
-    type instance Apply Foo1Sym0 a0123456789876543210 = Foo1 a0123456789876543210
-    type LszSym0 = Lsz
-    type BlimySym0 = Blimy
-    type TfSym0 = Tf
-    type TjzSym0 = Tjz
-    type TtSym0 = Tt
-    type JzSym0 = Jz
-    type ZzSym0 = Zz
-    type FlsSym0 = Fls
-    type SzSym0 = Sz
-    type LzSym0 = Lz
-    type X_0123456789876543210Sym0 = X_0123456789876543210
-    type X_0123456789876543210Sym0 = X_0123456789876543210
-    type X_0123456789876543210Sym0 = X_0123456789876543210
-    type X_0123456789876543210Sym0 = X_0123456789876543210
-    type family Silly (a :: a) :: () where
-      Silly x = Case_0123456789876543210 x x
-    type family Foo2 (a :: (a, b)) :: a where
-      Foo2 '(x,
-             y) = Case_0123456789876543210 x y (Let0123456789876543210TSym2 x y)
-    type family Foo1 (a :: (a, b)) :: a where
-      Foo1 '(x,
-             y) = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) y
-    type family Lsz :: Nat where
-      Lsz = Case_0123456789876543210 X_0123456789876543210Sym0
-    type family Blimy where
-      Blimy = Case_0123456789876543210 X_0123456789876543210Sym0
-    type family Tf where
-      Tf = Case_0123456789876543210 X_0123456789876543210Sym0
-    type family Tjz where
-      Tjz = Case_0123456789876543210 X_0123456789876543210Sym0
-    type family Tt where
-      Tt = Case_0123456789876543210 X_0123456789876543210Sym0
-    type family Jz where
-      Jz = Case_0123456789876543210 X_0123456789876543210Sym0
-    type family Zz where
-      Zz = Case_0123456789876543210 X_0123456789876543210Sym0
-    type family Fls :: Bool where
-      Fls = Case_0123456789876543210 X_0123456789876543210Sym0
-    type family Sz where
-      Sz = Case_0123456789876543210 X_0123456789876543210Sym0
-    type family Lz where
-      Lz = Case_0123456789876543210 X_0123456789876543210Sym0
-    type family X_0123456789876543210 where
-      X_0123456789876543210 = PrSym0
-    type family X_0123456789876543210 where
-      X_0123456789876543210 = ComplexSym0
-    type family X_0123456789876543210 where
-      X_0123456789876543210 = TupleSym0
-    type family X_0123456789876543210 where
-      X_0123456789876543210 = AListSym0
-    sSilly ::
-      forall a (t :: a). Sing t -> Sing (Apply SillySym0 t :: ())
-    sFoo2 ::
-      forall a b (t :: (a, b)). Sing t -> Sing (Apply Foo2Sym0 t :: a)
-    sFoo1 ::
-      forall a b (t :: (a, b)). Sing t -> Sing (Apply Foo1Sym0 t :: a)
-    sLsz :: Sing (LszSym0 :: Nat)
-    sBlimy :: Sing BlimySym0
-    sTf :: Sing TfSym0
-    sTjz :: Sing TjzSym0
-    sTt :: Sing TtSym0
-    sJz :: Sing JzSym0
-    sZz :: Sing ZzSym0
-    sFls :: Sing (FlsSym0 :: Bool)
-    sSz :: Sing SzSym0
-    sLz :: Sing LzSym0
-    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
-    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
-    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
-    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
-    sSilly (sX :: Sing x)
-      = (case sX of { _ -> STuple0 }) ::
-          Sing (Case_0123456789876543210 x x :: ())
-    sFoo2 (STuple2 (sX :: Sing x) (sY :: Sing y))
-      = let
-          sT :: Sing (Let0123456789876543210TSym2 x y)
-          sT
-            = (applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sX)) sY
-        in  (case sT of {
-               STuple2 (sA :: Sing a) (sB :: Sing b)
-                 -> (applySing
-                       ((singFun1
-                           @(Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) a) b))
-                          (\ sArg_0123456789876543210
-                             -> case sArg_0123456789876543210 of {
-                                  (_ :: Sing arg_0123456789876543210)
-                                    -> (case sArg_0123456789876543210 of { _ -> sA }) ::
-                                         Sing (Case_0123456789876543210 x y a b arg_0123456789876543210 arg_0123456789876543210) })))
-                      sB }) ::
-              Sing (Case_0123456789876543210 x y (Let0123456789876543210TSym2 x y) :: a)
-    sFoo1 (STuple2 (sX :: Sing x) (sY :: Sing y))
-      = (applySing
-           ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 x) y))
-              (\ sArg_0123456789876543210
-                 -> case sArg_0123456789876543210 of {
-                      (_ :: Sing arg_0123456789876543210)
-                        -> (case sArg_0123456789876543210 of { _ -> sX }) ::
-                             Sing (Case_0123456789876543210 x y arg_0123456789876543210 arg_0123456789876543210) })))
-          sY
-    sLsz
-      = (case sX_0123456789876543210 of {
-           SCons _
-                 (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210)
-                        (SCons (SSucc _) SNil))
-             -> sY_0123456789876543210 }) ::
-          Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Nat)
-    sBlimy
-      = (case sX_0123456789876543210 of {
-           SCons _
-                 (SCons _
-                        (SCons (SSucc (sY_0123456789876543210 :: Sing y_0123456789876543210))
-                               SNil))
-             -> sY_0123456789876543210 }) ::
-          Sing (Case_0123456789876543210 X_0123456789876543210Sym0)
-    sTf
-      = (case sX_0123456789876543210 of {
-           STuple3 (sY_0123456789876543210 :: Sing y_0123456789876543210) _ _
-             -> sY_0123456789876543210 }) ::
-          Sing (Case_0123456789876543210 X_0123456789876543210Sym0)
-    sTjz
-      = (case sX_0123456789876543210 of {
-           STuple3 _ (sY_0123456789876543210 :: Sing y_0123456789876543210) _
-             -> sY_0123456789876543210 }) ::
-          Sing (Case_0123456789876543210 X_0123456789876543210Sym0)
-    sTt
-      = (case sX_0123456789876543210 of {
-           STuple3 _ _ (sY_0123456789876543210 :: Sing y_0123456789876543210)
-             -> sY_0123456789876543210 }) ::
-          Sing (Case_0123456789876543210 X_0123456789876543210Sym0)
-    sJz
-      = (case sX_0123456789876543210 of {
-           SPair (SPair (sY_0123456789876543210 :: Sing y_0123456789876543210)
-                        _)
-                 _
-             -> sY_0123456789876543210 }) ::
-          Sing (Case_0123456789876543210 X_0123456789876543210Sym0)
-    sZz
-      = (case sX_0123456789876543210 of {
-           SPair (SPair _
-                        (sY_0123456789876543210 :: Sing y_0123456789876543210))
-                 _
-             -> sY_0123456789876543210 }) ::
-          Sing (Case_0123456789876543210 X_0123456789876543210Sym0)
-    sFls
-      = (case sX_0123456789876543210 of {
-           SPair (SPair _ _)
-                 (sY_0123456789876543210 :: Sing y_0123456789876543210)
-             -> sY_0123456789876543210 }) ::
-          Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)
-    sSz
-      = (case sX_0123456789876543210 of {
-           SPair (sY_0123456789876543210 :: Sing y_0123456789876543210) _
-             -> sY_0123456789876543210 }) ::
-          Sing (Case_0123456789876543210 X_0123456789876543210Sym0)
-    sLz
-      = (case sX_0123456789876543210 of {
-           SPair _ (sY_0123456789876543210 :: Sing y_0123456789876543210)
-             -> sY_0123456789876543210 }) ::
-          Sing (Case_0123456789876543210 X_0123456789876543210Sym0)
-    sX_0123456789876543210 = sPr
-    sX_0123456789876543210 = sComplex
-    sX_0123456789876543210 = sTuple
-    sX_0123456789876543210 = sAList
-    instance SingI (SillySym0 :: (~>) a ()) where
-      sing = (singFun1 @SillySym0) sSilly
-    instance SingI (Foo2Sym0 :: (~>) (a, b) a) where
-      sing = (singFun1 @Foo2Sym0) sFoo2
-    instance SingI (Foo1Sym0 :: (~>) (a, b) a) where
-      sing = (singFun1 @Foo1Sym0) sFoo1
diff --git a/tests/compile-and-dump/Singletons/PatternMatching.ghc88.template b/tests/compile-and-dump/Singletons/PatternMatching.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/PatternMatching.ghc88.template
@@ -0,0 +1,587 @@
+Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| pr = Pair (Succ Zero) ([Zero])
+          complex = Pair (Pair (Just Zero) Zero) False
+          tuple = (False, Just Zero, True)
+          aList = [Zero, Succ Zero, Succ (Succ Zero)]
+          
+          data Pair a b
+            = Pair a b
+            deriving Show |]
+  ======>
+    data Pair a b
+      = Pair a b
+      deriving Show
+    pr = (Pair (Succ Zero)) [Zero]
+    complex = (Pair ((Pair (Just Zero)) Zero)) False
+    tuple = (False, Just Zero, True)
+    aList = [Zero, Succ Zero, Succ (Succ Zero)]
+    type PairSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) =
+        Pair t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (PairSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) PairSym1KindInference) ())
+    data PairSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                    (~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210)
+      where
+        PairSym1KindInference :: forall t0123456789876543210
+                                        t0123456789876543210
+                                        arg. SameKind (Apply (PairSym1 t0123456789876543210) arg) (PairSym2 t0123456789876543210 arg) =>
+                                 PairSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (PairSym1 t0123456789876543210) t0123456789876543210 = Pair t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings PairSym0 where
+      suppressUnusedWarnings = snd (((,) PairSym0KindInference) ())
+    data PairSym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210))
+      where
+        PairSym0KindInference :: forall t0123456789876543210
+                                        arg. SameKind (Apply PairSym0 arg) (PairSym1 arg) =>
+                                 PairSym0 t0123456789876543210
+    type instance Apply PairSym0 t0123456789876543210 = PairSym1 t0123456789876543210
+    type AListSym0 = AList
+    type TupleSym0 = Tuple
+    type ComplexSym0 = Complex
+    type PrSym0 = Pr
+    type family AList where
+      AList = Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply SuccSym0 (Apply SuccSym0 ZeroSym0))) '[]))
+    type family Tuple where
+      Tuple = Apply (Apply (Apply Tuple3Sym0 FalseSym0) (Apply JustSym0 ZeroSym0)) TrueSym0
+    type family Complex where
+      Complex = Apply (Apply PairSym0 (Apply (Apply PairSym0 (Apply JustSym0 ZeroSym0)) ZeroSym0)) FalseSym0
+    type family Pr where
+      Pr = Apply (Apply PairSym0 (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:@#@$) ZeroSym0) '[])
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Pair a b) (a :: Symbol) :: Symbol where
+      ShowsPrec_0123456789876543210 p_0123456789876543210 (Pair arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Pair ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Pair a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Pair a0123456789876543210 b0123456789876543210) :: (~>) Symbol Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210
+                                                                                             b0123456789876543210.
+                                                                                      (~>) (Pair a0123456789876543210 b0123456789876543210) ((~>) Symbol Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210
+                                                     b0123456789876543210.
+                                              (~>) GHC.Types.Nat ((~>) (Pair a0123456789876543210 b0123456789876543210) ((~>) Symbol Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow (Pair a b) where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    sAList :: Sing AListSym0
+    sTuple :: Sing TupleSym0
+    sComplex :: Sing ComplexSym0
+    sPr :: Sing PrSym0
+    sAList
+      = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SZero))
+          ((applySing
+              ((applySing ((singFun2 @(:@#@$)) SCons))
+                 ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
+             ((applySing
+                 ((applySing ((singFun2 @(:@#@$)) SCons))
+                    ((applySing ((singFun1 @SuccSym0) SSucc))
+                       ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))
+                SNil))
+    sTuple
+      = (applySing
+           ((applySing ((applySing ((singFun3 @Tuple3Sym0) STuple3)) SFalse))
+              ((applySing ((singFun1 @JustSym0) SJust)) SZero)))
+          STrue
+    sComplex
+      = (applySing
+           ((applySing ((singFun2 @PairSym0) SPair))
+              ((applySing
+                  ((applySing ((singFun2 @PairSym0) SPair))
+                     ((applySing ((singFun1 @JustSym0) SJust)) SZero)))
+                 SZero)))
+          SFalse
+    sPr
+      = (applySing
+           ((applySing ((singFun2 @PairSym0) SPair))
+              ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
+          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SZero)) SNil)
+    data SPair :: forall a b. Pair a b -> GHC.Types.Type
+      where
+        SPair :: forall a b (n :: a) (n :: b).
+                 (Sing (n :: a)) -> (Sing (n :: b)) -> SPair (Pair n n)
+    type instance Sing @(Pair a b) = SPair
+    instance (SingKind a, SingKind b) => SingKind (Pair a b) where
+      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) }
+    instance (SShow a, SShow b) => SShow (Pair a b) where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: Pair a b) (t3 :: Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) (Pair a b) ((~>) Symbol Symbol))
+                                                             -> GHC.Types.Type) t1) t2) t3)
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        (SPair (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
+               (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (sFromInteger (sing :: Sing 10)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                          (sing :: Sing "Pair "))))
+                   ((applySing
+                       ((applySing ((singFun3 @(.@#@$)) (%.)))
+                          ((applySing
+                              ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                                 (sFromInteger (sing :: Sing 11))))
+                             sArg_0123456789876543210)))
+                      ((applySing
+                          ((applySing ((singFun3 @(.@#@$)) (%.)))
+                             ((singFun1 @ShowSpaceSym0) sShowSpace)))
+                         ((applySing
+                             ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                                (sFromInteger (sing :: Sing 11))))
+                            sArg_0123456789876543210))))))
+            sA_0123456789876543210
+    instance (Data.Singletons.ShowSing.ShowSing a,
+              Data.Singletons.ShowSing.ShowSing b) =>
+             Show (SPair (z :: Pair a b)) where
+      showsPrec
+        p_0123456789876543210
+        (SPair (arg_0123456789876543210 :: Sing argTy_0123456789876543210)
+               (arg_0123456789876543210 :: Sing argTy_0123456789876543210))
+        = (showParen (((>) p_0123456789876543210) 10))
+            (((.) (showString "SPair "))
+               (((.) ((showsPrec 11) arg_0123456789876543210))
+                  (((.) GHC.Show.showSpace)
+                     ((showsPrec 11) arg_0123456789876543210)))) ::
+            (Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210,
+             Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210) =>
+            ShowS
+    instance (SingI n, SingI n) => SingI (Pair (n :: a) (n :: b)) where
+      sing = (SPair sing) sing
+    instance SingI (PairSym0 :: (~>) a ((~>) b (Pair a b))) where
+      sing = (singFun2 @PairSym0) SPair
+    instance SingI d =>
+             SingI (PairSym1 (d :: a) :: (~>) b (Pair a b)) where
+      sing = (singFun1 @(PairSym1 (d :: a))) (SPair (sing @d))
+Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| Pair sz lz = pr
+          Pair (Pair jz zz) fls = complex
+          (tf, tjz, tt) = tuple
+          [_, lsz, (Succ blimy)] = aList
+          lsz :: Nat
+          fls :: Bool
+          foo1 :: (a, b) -> a
+          foo1 (x, y) = (\ _ -> x) y
+          foo2 :: (# a, b #) -> a
+          foo2 t@(# x, y #) = case t of { (# a, b #) -> (\ _ -> a) b }
+          silly :: a -> ()
+          silly x = case x of { _ -> () } |]
+  ======>
+    Pair sz lz = pr
+    Pair (Pair jz zz) fls = complex
+    (tf, tjz, tt) = tuple
+    [_, lsz, Succ blimy] = aList
+    lsz :: Nat
+    fls :: Bool
+    foo1 :: (a, b) -> a
+    foo1 (x, y) = (\ _ -> x) y
+    foo2 :: (# a, b #) -> a
+    foo2 t@(# x, y #) = case t of { (# a, b #) -> (\ _ -> a) b }
+    silly :: a -> ()
+    silly x = case x of { _ -> () }
+    type family Case_0123456789876543210 x t where
+      Case_0123456789876543210 x _ = Tuple0Sym0
+    type Let0123456789876543210TSym2 x0123456789876543210 y0123456789876543210 =
+        Let0123456789876543210T x0123456789876543210 y0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210TSym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210TSym1KindInference) ())
+    data Let0123456789876543210TSym1 x0123456789876543210 y0123456789876543210
+      where
+        Let0123456789876543210TSym1KindInference :: forall x0123456789876543210
+                                                           y0123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210TSym1 x0123456789876543210) arg) (Let0123456789876543210TSym2 x0123456789876543210 arg) =>
+                                                    Let0123456789876543210TSym1 x0123456789876543210 y0123456789876543210
+    type instance Apply (Let0123456789876543210TSym1 x0123456789876543210) y0123456789876543210 = Let0123456789876543210T x0123456789876543210 y0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210TSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210TSym0KindInference) ())
+    data Let0123456789876543210TSym0 x0123456789876543210
+      where
+        Let0123456789876543210TSym0KindInference :: forall x0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210TSym0 arg) (Let0123456789876543210TSym1 arg) =>
+                                                    Let0123456789876543210TSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210TSym0 x0123456789876543210 = Let0123456789876543210TSym1 x0123456789876543210
+    type family Let0123456789876543210T x y where
+      Let0123456789876543210T x y = Apply (Apply Tuple2Sym0 x) y
+    type family Case_0123456789876543210 arg_0123456789876543210 a b x y t where
+      Case_0123456789876543210 arg_0123456789876543210 a b x y _ = a
+    type family Lambda_0123456789876543210 a b x y t where
+      Lambda_0123456789876543210 a b x y arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 a b x y arg_0123456789876543210
+    type Lambda_0123456789876543210Sym5 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 y0123456789876543210 x0123456789876543210 b0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym4KindInference) ())
+    data Lambda_0123456789876543210Sym4 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym4KindInference :: forall a0123456789876543210
+                                                              b0123456789876543210
+                                                              x0123456789876543210
+                                                              y0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym4 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym5 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym4 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym4 y0123456789876543210 x0123456789876543210 b0123456789876543210 a0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 b0123456789876543210 a0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 x0123456789876543210 b0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall a0123456789876543210
+                                                              b0123456789876543210
+                                                              x0123456789876543210
+                                                              y0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym4 a0123456789876543210 b0123456789876543210 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 b0123456789876543210 a0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym4 x0123456789876543210 b0123456789876543210 a0123456789876543210 y0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 b0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                              b0123456789876543210
+                                                              x0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 x0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 b0123456789876543210 a0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym3 b0123456789876543210 a0123456789876543210 x0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                              b0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) arg) (Lambda_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 a0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 a0123456789876543210 = Lambda_0123456789876543210Sym1 a0123456789876543210
+    type family Case_0123456789876543210 x y t where
+      Case_0123456789876543210 x y '(a,
+                                     b) = Apply (Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) b) x) y) b
+    type family Case_0123456789876543210 arg_0123456789876543210 x y t where
+      Case_0123456789876543210 arg_0123456789876543210 x y _ = x
+    type family Lambda_0123456789876543210 x y t where
+      Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x y arg_0123456789876543210
+    type Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
+                                                              y0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
+                                                              y0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
+    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
+    type SillySym1 (a0123456789876543210 :: a0123456789876543210) =
+        Silly a0123456789876543210
+    instance SuppressUnusedWarnings SillySym0 where
+      suppressUnusedWarnings = snd (((,) SillySym0KindInference) ())
+    data SillySym0 :: forall a0123456789876543210.
+                      (~>) a0123456789876543210 ()
+      where
+        SillySym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply SillySym0 arg) (SillySym1 arg) =>
+                                  SillySym0 a0123456789876543210
+    type instance Apply SillySym0 a0123456789876543210 = Silly a0123456789876543210
+    type Foo2Sym1 (a0123456789876543210 :: (a0123456789876543210,
+                                            b0123456789876543210)) =
+        Foo2 a0123456789876543210
+    instance SuppressUnusedWarnings Foo2Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ())
+    data Foo2Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) (a0123456789876543210,
+                           b0123456789876543210) a0123456789876543210
+      where
+        Foo2Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) =>
+                                 Foo2Sym0 a0123456789876543210
+    type instance Apply Foo2Sym0 a0123456789876543210 = Foo2 a0123456789876543210
+    type Foo1Sym1 (a0123456789876543210 :: (a0123456789876543210,
+                                            b0123456789876543210)) =
+        Foo1 a0123456789876543210
+    instance SuppressUnusedWarnings Foo1Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ())
+    data Foo1Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) (a0123456789876543210,
+                           b0123456789876543210) a0123456789876543210
+      where
+        Foo1Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>
+                                 Foo1Sym0 a0123456789876543210
+    type instance Apply Foo1Sym0 a0123456789876543210 = Foo1 a0123456789876543210
+    type BlimySym0 = Blimy
+    type LszSym0 = Lsz
+    type X_0123456789876543210Sym0 = X_0123456789876543210
+    type TtSym0 = Tt
+    type TjzSym0 = Tjz
+    type TfSym0 = Tf
+    type X_0123456789876543210Sym0 = X_0123456789876543210
+    type FlsSym0 = Fls
+    type ZzSym0 = Zz
+    type JzSym0 = Jz
+    type X_0123456789876543210Sym0 = X_0123456789876543210
+    type LzSym0 = Lz
+    type SzSym0 = Sz
+    type X_0123456789876543210Sym0 = X_0123456789876543210
+    type family Silly (a :: a) :: () where
+      Silly x = Case_0123456789876543210 x x
+    type family Foo2 (a :: (a, b)) :: a where
+      Foo2 '(x,
+             y) = Case_0123456789876543210 x y (Let0123456789876543210TSym2 x y)
+    type family Foo1 (a :: (a, b)) :: a where
+      Foo1 '(x,
+             y) = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) y
+    type family Blimy where
+      Blimy = Case_0123456789876543210 X_0123456789876543210Sym0
+    type family Lsz :: Nat where
+      Lsz = Case_0123456789876543210 X_0123456789876543210Sym0
+    type family X_0123456789876543210 where
+      X_0123456789876543210 = AListSym0
+    type family Tt where
+      Tt = Case_0123456789876543210 X_0123456789876543210Sym0
+    type family Tjz where
+      Tjz = Case_0123456789876543210 X_0123456789876543210Sym0
+    type family Tf where
+      Tf = Case_0123456789876543210 X_0123456789876543210Sym0
+    type family X_0123456789876543210 where
+      X_0123456789876543210 = TupleSym0
+    type family Fls :: Bool where
+      Fls = Case_0123456789876543210 X_0123456789876543210Sym0
+    type family Zz where
+      Zz = Case_0123456789876543210 X_0123456789876543210Sym0
+    type family Jz where
+      Jz = Case_0123456789876543210 X_0123456789876543210Sym0
+    type family X_0123456789876543210 where
+      X_0123456789876543210 = ComplexSym0
+    type family Lz where
+      Lz = Case_0123456789876543210 X_0123456789876543210Sym0
+    type family Sz where
+      Sz = Case_0123456789876543210 X_0123456789876543210Sym0
+    type family X_0123456789876543210 where
+      X_0123456789876543210 = PrSym0
+    sSilly ::
+      forall a (t :: a). Sing t -> Sing (Apply SillySym0 t :: ())
+    sFoo2 ::
+      forall a b (t :: (a, b)). Sing t -> Sing (Apply Foo2Sym0 t :: a)
+    sFoo1 ::
+      forall a b (t :: (a, b)). Sing t -> Sing (Apply Foo1Sym0 t :: a)
+    sBlimy :: Sing BlimySym0
+    sLsz :: Sing (LszSym0 :: Nat)
+    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
+    sTt :: Sing TtSym0
+    sTjz :: Sing TjzSym0
+    sTf :: Sing TfSym0
+    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
+    sFls :: Sing (FlsSym0 :: Bool)
+    sZz :: Sing ZzSym0
+    sJz :: Sing JzSym0
+    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
+    sLz :: Sing LzSym0
+    sSz :: Sing SzSym0
+    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
+    sSilly (sX :: Sing x)
+      = (id @(Sing (Case_0123456789876543210 x x :: ())))
+          (case sX of { _ -> STuple0 })
+    sFoo2 (STuple2 (sX :: Sing x) (sY :: Sing y))
+      = let
+          sT :: Sing (Let0123456789876543210TSym2 x y)
+          sT
+            = (applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sX)) sY
+        in
+          (id
+             @(Sing (Case_0123456789876543210 x y (Let0123456789876543210TSym2 x y) :: a)))
+            (case sT of {
+               STuple2 (sA :: Sing a) (sB :: Sing b)
+                 -> (applySing
+                       ((singFun1
+                           @(Apply (Apply (Apply (Apply 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 })
+    sFoo1 (STuple2 (sX :: Sing x) (sY :: Sing y))
+      = (applySing
+           ((singFun1 @(Apply (Apply 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 }) })))
+          sY
+    sBlimy
+      = (id @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)))
+          (case sX_0123456789876543210 of {
+             SCons _
+                   (SCons _
+                          (SCons (SSucc (sY_0123456789876543210 :: Sing y_0123456789876543210))
+                                 SNil))
+               -> sY_0123456789876543210 })
+    sLsz
+      = (id
+           @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Nat)))
+          (case sX_0123456789876543210 of {
+             SCons _
+                   (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210)
+                          (SCons (SSucc _) SNil))
+               -> sY_0123456789876543210 })
+    sX_0123456789876543210 = sAList
+    sTt
+      = (id @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)))
+          (case sX_0123456789876543210 of {
+             STuple3 _ _ (sY_0123456789876543210 :: Sing y_0123456789876543210)
+               -> sY_0123456789876543210 })
+    sTjz
+      = (id @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)))
+          (case sX_0123456789876543210 of {
+             STuple3 _ (sY_0123456789876543210 :: Sing y_0123456789876543210) _
+               -> sY_0123456789876543210 })
+    sTf
+      = (id @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)))
+          (case sX_0123456789876543210 of {
+             STuple3 (sY_0123456789876543210 :: Sing y_0123456789876543210) _ _
+               -> sY_0123456789876543210 })
+    sX_0123456789876543210 = sTuple
+    sFls
+      = (id
+           @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)))
+          (case sX_0123456789876543210 of {
+             SPair (SPair _ _)
+                   (sY_0123456789876543210 :: Sing y_0123456789876543210)
+               -> sY_0123456789876543210 })
+    sZz
+      = (id @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)))
+          (case sX_0123456789876543210 of {
+             SPair (SPair _
+                          (sY_0123456789876543210 :: Sing y_0123456789876543210))
+                   _
+               -> sY_0123456789876543210 })
+    sJz
+      = (id @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)))
+          (case sX_0123456789876543210 of {
+             SPair (SPair (sY_0123456789876543210 :: Sing y_0123456789876543210)
+                          _)
+                   _
+               -> sY_0123456789876543210 })
+    sX_0123456789876543210 = sComplex
+    sLz
+      = (id @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)))
+          (case sX_0123456789876543210 of {
+             SPair _ (sY_0123456789876543210 :: Sing y_0123456789876543210)
+               -> sY_0123456789876543210 })
+    sSz
+      = (id @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0)))
+          (case sX_0123456789876543210 of {
+             SPair (sY_0123456789876543210 :: Sing y_0123456789876543210) _
+               -> sY_0123456789876543210 })
+    sX_0123456789876543210 = sPr
+    instance SingI (SillySym0 :: (~>) a ()) where
+      sing = (singFun1 @SillySym0) sSilly
+    instance SingI (Foo2Sym0 :: (~>) (a, b) a) where
+      sing = (singFun1 @Foo2Sym0) sFoo2
+    instance SingI (Foo1Sym0 :: (~>) (a, b) a) where
+      sing = (singFun1 @Foo1Sym0) sFoo1
diff --git a/tests/compile-and-dump/Singletons/PolyKinds.ghc86.template b/tests/compile-and-dump/Singletons/PolyKinds.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/PolyKinds.ghc86.template
+++ /dev/null
@@ -1,28 +0,0 @@
-Singletons/PolyKinds.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| class Cls (a :: k) where
-            fff :: Proxy (a :: k) -> () |]
-  ======>
-    class Cls (a :: k) where
-      fff :: Proxy (a :: k) -> ()
-    type FffSym1 (arg0123456789876543210 :: Proxy (a0123456789876543210 :: k0123456789876543210)) =
-        Fff arg0123456789876543210
-    instance SuppressUnusedWarnings FffSym0 where
-      suppressUnusedWarnings = snd (((,) FffSym0KindInference) ())
-    data FffSym0 :: forall k0123456789876543210
-                           (a0123456789876543210 :: k0123456789876543210).
-                    (~>) (Proxy (a0123456789876543210 :: k0123456789876543210)) ()
-      where
-        FffSym0KindInference :: forall arg0123456789876543210
-                                       arg. SameKind (Apply FffSym0 arg) (FffSym1 arg) =>
-                                FffSym0 arg0123456789876543210
-    type instance Apply FffSym0 arg0123456789876543210 = Fff arg0123456789876543210
-    class PCls (a :: k) where
-      type Fff (arg :: Proxy (a :: k)) :: ()
-    class SCls (a :: k) where
-      sFff ::
-        forall (t :: Proxy (a :: k)).
-        Sing t -> Sing (Apply FffSym0 t :: ())
-    instance SCls a =>
-             SingI (FffSym0 :: (~>) (Proxy (a :: k)) ()) where
-      sing = (singFun1 @FffSym0) sFff
diff --git a/tests/compile-and-dump/Singletons/PolyKinds.ghc88.template b/tests/compile-and-dump/Singletons/PolyKinds.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/PolyKinds.ghc88.template
@@ -0,0 +1,28 @@
+Singletons/PolyKinds.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| class Cls (a :: k) where
+            fff :: Proxy (a :: k) -> () |]
+  ======>
+    class Cls (a :: k) where
+      fff :: Proxy (a :: k) -> ()
+    type FffSym1 (arg0123456789876543210 :: Proxy (a0123456789876543210 :: k0123456789876543210)) =
+        Fff arg0123456789876543210
+    instance SuppressUnusedWarnings FffSym0 where
+      suppressUnusedWarnings = snd (((,) FffSym0KindInference) ())
+    data FffSym0 :: forall k0123456789876543210
+                           (a0123456789876543210 :: k0123456789876543210).
+                    (~>) (Proxy (a0123456789876543210 :: k0123456789876543210)) ()
+      where
+        FffSym0KindInference :: forall arg0123456789876543210
+                                       arg. SameKind (Apply FffSym0 arg) (FffSym1 arg) =>
+                                FffSym0 arg0123456789876543210
+    type instance Apply FffSym0 arg0123456789876543210 = Fff arg0123456789876543210
+    class PCls (a :: k) where
+      type Fff (arg :: Proxy (a :: k)) :: ()
+    class SCls (a :: k) where
+      sFff ::
+        forall (t :: Proxy (a :: k)).
+        Sing t -> Sing (Apply FffSym0 t :: ())
+    instance SCls a =>
+             SingI (FffSym0 :: (~>) (Proxy (a :: k)) ()) where
+      sing = (singFun1 @FffSym0) sFff
diff --git a/tests/compile-and-dump/Singletons/PolyKindsApp.ghc86.template b/tests/compile-and-dump/Singletons/PolyKindsApp.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/PolyKindsApp.ghc86.template
+++ /dev/null
@@ -1,12 +0,0 @@
-Singletons/PolyKindsApp.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| class Cls (a :: k -> Type) where
-            fff :: (a :: k -> Type) (b :: k) |]
-  ======>
-    class Cls (a :: k -> Type) where
-      fff :: (a :: k -> Type) (b :: k)
-    type FffSym0 = Fff
-    class PCls (a :: k -> Type) where
-      type Fff :: (a :: k -> Type) (b :: k)
-    class SCls (a :: k -> Type) where
-      sFff :: forall b. Sing (FffSym0 :: (a :: k -> Type) (b :: k))
diff --git a/tests/compile-and-dump/Singletons/PolyKindsApp.ghc88.template b/tests/compile-and-dump/Singletons/PolyKindsApp.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/PolyKindsApp.ghc88.template
@@ -0,0 +1,12 @@
+Singletons/PolyKindsApp.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| class Cls (a :: k -> Type) where
+            fff :: (a :: k -> Type) (b :: k) |]
+  ======>
+    class Cls (a :: k -> Type) where
+      fff :: (a :: k -> Type) (b :: k)
+    type FffSym0 = Fff
+    class PCls (a :: k -> Type) where
+      type Fff :: (a :: k -> Type) (b :: k)
+    class SCls (a :: k -> Type) where
+      sFff :: forall b. Sing (FffSym0 :: (a :: k -> Type) (b :: k))
diff --git a/tests/compile-and-dump/Singletons/Records.ghc86.template b/tests/compile-and-dump/Singletons/Records.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/Records.ghc86.template
+++ /dev/null
@@ -1,79 +0,0 @@
-Singletons/Records.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| data Record a = MkRecord {field1 :: a, field2 :: Bool} |]
-  ======>
-    data Record a = MkRecord {field1 :: a, field2 :: Bool}
-    type Field1Sym1 (a0123456789876543210 :: Record a0123456789876543210) =
-        Field1 a0123456789876543210
-    instance SuppressUnusedWarnings Field1Sym0 where
-      suppressUnusedWarnings = snd (((,) Field1Sym0KindInference) ())
-    data Field1Sym0 :: forall a0123456789876543210.
-                       (~>) (Record a0123456789876543210) a0123456789876543210
-      where
-        Field1Sym0KindInference :: forall a0123456789876543210
-                                          arg. SameKind (Apply Field1Sym0 arg) (Field1Sym1 arg) =>
-                                   Field1Sym0 a0123456789876543210
-    type instance Apply Field1Sym0 a0123456789876543210 = Field1 a0123456789876543210
-    type Field2Sym1 (a0123456789876543210 :: Record a0123456789876543210) =
-        Field2 a0123456789876543210
-    instance SuppressUnusedWarnings Field2Sym0 where
-      suppressUnusedWarnings = snd (((,) Field2Sym0KindInference) ())
-    data Field2Sym0 :: forall a0123456789876543210.
-                       (~>) (Record a0123456789876543210) Bool
-      where
-        Field2Sym0KindInference :: forall a0123456789876543210
-                                          arg. SameKind (Apply Field2Sym0 arg) (Field2Sym1 arg) =>
-                                   Field2Sym0 a0123456789876543210
-    type instance Apply Field2Sym0 a0123456789876543210 = Field2 a0123456789876543210
-    type family Field1 (a :: Record a) :: a where
-      Field1 (MkRecord field _) = field
-    type family Field2 (a :: Record a) :: Bool where
-      Field2 (MkRecord _ field) = field
-    type MkRecordSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: Bool) =
-        MkRecord t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (MkRecordSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MkRecordSym1KindInference) ())
-    data MkRecordSym1 (t0123456789876543210 :: a0123456789876543210) :: (~>) Bool (Record a0123456789876543210)
-      where
-        MkRecordSym1KindInference :: forall t0123456789876543210
-                                            t0123456789876543210
-                                            arg. SameKind (Apply (MkRecordSym1 t0123456789876543210) arg) (MkRecordSym2 t0123456789876543210 arg) =>
-                                     MkRecordSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (MkRecordSym1 t0123456789876543210) t0123456789876543210 = MkRecord t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings MkRecordSym0 where
-      suppressUnusedWarnings = snd (((,) MkRecordSym0KindInference) ())
-    data MkRecordSym0 :: forall a0123456789876543210.
-                         (~>) a0123456789876543210 ((~>) Bool (Record a0123456789876543210))
-      where
-        MkRecordSym0KindInference :: forall t0123456789876543210
-                                            arg. SameKind (Apply MkRecordSym0 arg) (MkRecordSym1 arg) =>
-                                     MkRecordSym0 t0123456789876543210
-    type instance Apply MkRecordSym0 t0123456789876543210 = MkRecordSym1 t0123456789876543210
-    data instance Sing :: Record a -> GHC.Types.Type
-      where
-        SMkRecord :: forall a (n :: a) (n :: Bool).
-                     {sField1 :: (Sing (n :: a)), sField2 :: (Sing (n :: Bool))}
-                     -> Sing (MkRecord n n)
-    type SRecord = (Sing :: Record a -> GHC.Types.Type)
-    instance SingKind a => SingKind (Record a) where
-      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) }
-    instance (SingI n, SingI n) =>
-             SingI (MkRecord (n :: a) (n :: Bool)) where
-      sing = (SMkRecord sing) sing
-    instance SingI (MkRecordSym0 :: (~>) a ((~>) Bool (Record a))) where
-      sing = (singFun2 @MkRecordSym0) SMkRecord
-    instance SingI (TyCon2 MkRecord :: (~>) a ((~>) Bool (Record a))) where
-      sing = (singFun2 @(TyCon2 MkRecord)) SMkRecord
-    instance SingI d =>
-             SingI (MkRecordSym1 (d :: a) :: (~>) Bool (Record a)) where
-      sing = (singFun1 @(MkRecordSym1 (d :: a))) (SMkRecord (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 (MkRecord (d :: a)) :: (~>) Bool (Record a)) where
-      sing
-        = (singFun1 @(TyCon1 (MkRecord (d :: a)))) (SMkRecord (sing @d))
diff --git a/tests/compile-and-dump/Singletons/Records.ghc88.template b/tests/compile-and-dump/Singletons/Records.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/Records.ghc88.template
@@ -0,0 +1,73 @@
+Singletons/Records.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| data Record a = MkRecord {field1 :: a, field2 :: Bool} |]
+  ======>
+    data Record a = MkRecord {field1 :: a, field2 :: Bool}
+    type Field2Sym1 (a0123456789876543210 :: Record a0123456789876543210) =
+        Field2 a0123456789876543210
+    instance SuppressUnusedWarnings Field2Sym0 where
+      suppressUnusedWarnings = snd (((,) Field2Sym0KindInference) ())
+    data Field2Sym0 :: forall a0123456789876543210.
+                       (~>) (Record a0123456789876543210) Bool
+      where
+        Field2Sym0KindInference :: forall a0123456789876543210
+                                          arg. SameKind (Apply Field2Sym0 arg) (Field2Sym1 arg) =>
+                                   Field2Sym0 a0123456789876543210
+    type instance Apply Field2Sym0 a0123456789876543210 = Field2 a0123456789876543210
+    type Field1Sym1 (a0123456789876543210 :: Record a0123456789876543210) =
+        Field1 a0123456789876543210
+    instance SuppressUnusedWarnings Field1Sym0 where
+      suppressUnusedWarnings = snd (((,) Field1Sym0KindInference) ())
+    data Field1Sym0 :: forall a0123456789876543210.
+                       (~>) (Record a0123456789876543210) a0123456789876543210
+      where
+        Field1Sym0KindInference :: forall a0123456789876543210
+                                          arg. SameKind (Apply Field1Sym0 arg) (Field1Sym1 arg) =>
+                                   Field1Sym0 a0123456789876543210
+    type instance Apply Field1Sym0 a0123456789876543210 = Field1 a0123456789876543210
+    type family Field2 (a :: Record a) :: Bool where
+      Field2 (MkRecord _ field) = field
+    type family Field1 (a :: Record a) :: a where
+      Field1 (MkRecord field _) = field
+    type MkRecordSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: Bool) =
+        MkRecord t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (MkRecordSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MkRecordSym1KindInference) ())
+    data MkRecordSym1 (t0123456789876543210 :: a0123456789876543210) :: (~>) Bool (Record a0123456789876543210)
+      where
+        MkRecordSym1KindInference :: forall t0123456789876543210
+                                            t0123456789876543210
+                                            arg. SameKind (Apply (MkRecordSym1 t0123456789876543210) arg) (MkRecordSym2 t0123456789876543210 arg) =>
+                                     MkRecordSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (MkRecordSym1 t0123456789876543210) t0123456789876543210 = MkRecord t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings MkRecordSym0 where
+      suppressUnusedWarnings = snd (((,) MkRecordSym0KindInference) ())
+    data MkRecordSym0 :: forall a0123456789876543210.
+                         (~>) a0123456789876543210 ((~>) Bool (Record a0123456789876543210))
+      where
+        MkRecordSym0KindInference :: forall t0123456789876543210
+                                            arg. SameKind (Apply MkRecordSym0 arg) (MkRecordSym1 arg) =>
+                                     MkRecordSym0 t0123456789876543210
+    type instance Apply MkRecordSym0 t0123456789876543210 = MkRecordSym1 t0123456789876543210
+    data SRecord :: forall a. Record a -> GHC.Types.Type
+      where
+        SMkRecord :: forall a (n :: a) (n :: Bool).
+                     {sField1 :: (Sing (n :: a)), sField2 :: (Sing (n :: Bool))}
+                     -> SRecord (MkRecord n n)
+    type instance Sing @(Record a) = SRecord
+    instance SingKind a => SingKind (Record a) where
+      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) }
+    instance (SingI n, SingI n) =>
+             SingI (MkRecord (n :: a) (n :: Bool)) where
+      sing = (SMkRecord sing) sing
+    instance SingI (MkRecordSym0 :: (~>) a ((~>) Bool (Record a))) where
+      sing = (singFun2 @MkRecordSym0) SMkRecord
+    instance SingI d =>
+             SingI (MkRecordSym1 (d :: a) :: (~>) Bool (Record a)) where
+      sing = (singFun1 @(MkRecordSym1 (d :: a))) (SMkRecord (sing @d))
diff --git a/tests/compile-and-dump/Singletons/ReturnFunc.ghc86.template b/tests/compile-and-dump/Singletons/ReturnFunc.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/ReturnFunc.ghc86.template
+++ /dev/null
@@ -1,98 +0,0 @@
-Singletons/ReturnFunc.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| returnFunc :: Nat -> Nat -> Nat
-          returnFunc _ = Succ
-          id :: a -> a
-          id x = x
-          idFoo :: c -> a -> a
-          idFoo _ = id |]
-  ======>
-    returnFunc :: Nat -> Nat -> Nat
-    returnFunc _ = Succ
-    id :: a -> a
-    id x = x
-    idFoo :: c -> a -> a
-    idFoo _ = id
-    type IdSym1 (a0123456789876543210 :: a0123456789876543210) =
-        Id a0123456789876543210
-    instance SuppressUnusedWarnings IdSym0 where
-      suppressUnusedWarnings = snd (((,) IdSym0KindInference) ())
-    data IdSym0 :: forall a0123456789876543210.
-                   (~>) a0123456789876543210 a0123456789876543210
-      where
-        IdSym0KindInference :: forall a0123456789876543210
-                                      arg. SameKind (Apply IdSym0 arg) (IdSym1 arg) =>
-                               IdSym0 a0123456789876543210
-    type instance Apply IdSym0 a0123456789876543210 = Id a0123456789876543210
-    type IdFooSym2 (a0123456789876543210 :: c0123456789876543210) (a0123456789876543210 :: a0123456789876543210) =
-        IdFoo a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (IdFooSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) IdFooSym1KindInference) ())
-    data IdFooSym1 (a0123456789876543210 :: c0123456789876543210) :: forall a0123456789876543210.
-                                                                     (~>) a0123456789876543210 a0123456789876543210
-      where
-        IdFooSym1KindInference :: forall a0123456789876543210
-                                         a0123456789876543210
-                                         arg. SameKind (Apply (IdFooSym1 a0123456789876543210) arg) (IdFooSym2 a0123456789876543210 arg) =>
-                                  IdFooSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (IdFooSym1 a0123456789876543210) a0123456789876543210 = IdFoo a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings IdFooSym0 where
-      suppressUnusedWarnings = snd (((,) IdFooSym0KindInference) ())
-    data IdFooSym0 :: forall a0123456789876543210 c0123456789876543210.
-                      (~>) c0123456789876543210 ((~>) a0123456789876543210 a0123456789876543210)
-      where
-        IdFooSym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply IdFooSym0 arg) (IdFooSym1 arg) =>
-                                  IdFooSym0 a0123456789876543210
-    type instance Apply IdFooSym0 a0123456789876543210 = IdFooSym1 a0123456789876543210
-    type ReturnFuncSym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
-        ReturnFunc a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ReturnFuncSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) ReturnFuncSym1KindInference) ())
-    data ReturnFuncSym1 (a0123456789876543210 :: Nat) :: (~>) Nat Nat
-      where
-        ReturnFuncSym1KindInference :: forall a0123456789876543210
-                                              a0123456789876543210
-                                              arg. SameKind (Apply (ReturnFuncSym1 a0123456789876543210) arg) (ReturnFuncSym2 a0123456789876543210 arg) =>
-                                       ReturnFuncSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ReturnFuncSym1 a0123456789876543210) a0123456789876543210 = ReturnFunc a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ReturnFuncSym0 where
-      suppressUnusedWarnings = snd (((,) ReturnFuncSym0KindInference) ())
-    data ReturnFuncSym0 :: (~>) Nat ((~>) Nat Nat)
-      where
-        ReturnFuncSym0KindInference :: forall a0123456789876543210
-                                              arg. SameKind (Apply ReturnFuncSym0 arg) (ReturnFuncSym1 arg) =>
-                                       ReturnFuncSym0 a0123456789876543210
-    type instance Apply ReturnFuncSym0 a0123456789876543210 = ReturnFuncSym1 a0123456789876543210
-    type family Id (a :: a) :: a where
-      Id x = x
-    type family IdFoo (a :: c) (a :: a) :: a where
-      IdFoo _ a_0123456789876543210 = Apply IdSym0 a_0123456789876543210
-    type family ReturnFunc (a :: Nat) (a :: Nat) :: Nat where
-      ReturnFunc _ a_0123456789876543210 = Apply SuccSym0 a_0123456789876543210
-    sId :: forall a (t :: a). Sing t -> Sing (Apply IdSym0 t :: a)
-    sIdFoo ::
-      forall c a (t :: c) (t :: a).
-      Sing t -> Sing t -> Sing (Apply (Apply IdFooSym0 t) t :: a)
-    sReturnFunc ::
-      forall (t :: Nat) (t :: Nat).
-      Sing t -> Sing t -> Sing (Apply (Apply ReturnFuncSym0 t) t :: Nat)
-    sId (sX :: Sing x) = sX
-    sIdFoo _ (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      = (applySing ((singFun1 @IdSym0) sId)) sA_0123456789876543210
-    sReturnFunc
-      _
-      (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      = (applySing ((singFun1 @SuccSym0) SSucc)) sA_0123456789876543210
-    instance SingI (IdSym0 :: (~>) a a) where
-      sing = (singFun1 @IdSym0) sId
-    instance SingI (IdFooSym0 :: (~>) c ((~>) a a)) where
-      sing = (singFun2 @IdFooSym0) sIdFoo
-    instance SingI d => SingI (IdFooSym1 (d :: c) :: (~>) a a) where
-      sing = (singFun1 @(IdFooSym1 (d :: c))) (sIdFoo (sing @d))
-    instance SingI (ReturnFuncSym0 :: (~>) Nat ((~>) Nat Nat)) where
-      sing = (singFun2 @ReturnFuncSym0) sReturnFunc
-    instance SingI d =>
-             SingI (ReturnFuncSym1 (d :: Nat) :: (~>) Nat Nat) where
-      sing
-        = (singFun1 @(ReturnFuncSym1 (d :: Nat))) (sReturnFunc (sing @d))
diff --git a/tests/compile-and-dump/Singletons/ReturnFunc.ghc88.template b/tests/compile-and-dump/Singletons/ReturnFunc.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/ReturnFunc.ghc88.template
@@ -0,0 +1,98 @@
+Singletons/ReturnFunc.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| returnFunc :: Nat -> Nat -> Nat
+          returnFunc _ = Succ
+          id :: a -> a
+          id x = x
+          idFoo :: c -> a -> a
+          idFoo _ = id |]
+  ======>
+    returnFunc :: Nat -> Nat -> Nat
+    returnFunc _ = Succ
+    id :: a -> a
+    id x = x
+    idFoo :: c -> a -> a
+    idFoo _ = id
+    type IdFooSym2 (a0123456789876543210 :: c0123456789876543210) (a0123456789876543210 :: a0123456789876543210) =
+        IdFoo a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (IdFooSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) IdFooSym1KindInference) ())
+    data IdFooSym1 (a0123456789876543210 :: c0123456789876543210) :: forall a0123456789876543210.
+                                                                     (~>) a0123456789876543210 a0123456789876543210
+      where
+        IdFooSym1KindInference :: forall a0123456789876543210
+                                         a0123456789876543210
+                                         arg. SameKind (Apply (IdFooSym1 a0123456789876543210) arg) (IdFooSym2 a0123456789876543210 arg) =>
+                                  IdFooSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (IdFooSym1 a0123456789876543210) a0123456789876543210 = IdFoo a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings IdFooSym0 where
+      suppressUnusedWarnings = snd (((,) IdFooSym0KindInference) ())
+    data IdFooSym0 :: forall c0123456789876543210 a0123456789876543210.
+                      (~>) c0123456789876543210 ((~>) a0123456789876543210 a0123456789876543210)
+      where
+        IdFooSym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply IdFooSym0 arg) (IdFooSym1 arg) =>
+                                  IdFooSym0 a0123456789876543210
+    type instance Apply IdFooSym0 a0123456789876543210 = IdFooSym1 a0123456789876543210
+    type IdSym1 (a0123456789876543210 :: a0123456789876543210) =
+        Id a0123456789876543210
+    instance SuppressUnusedWarnings IdSym0 where
+      suppressUnusedWarnings = snd (((,) IdSym0KindInference) ())
+    data IdSym0 :: forall a0123456789876543210.
+                   (~>) a0123456789876543210 a0123456789876543210
+      where
+        IdSym0KindInference :: forall a0123456789876543210
+                                      arg. SameKind (Apply IdSym0 arg) (IdSym1 arg) =>
+                               IdSym0 a0123456789876543210
+    type instance Apply IdSym0 a0123456789876543210 = Id a0123456789876543210
+    type ReturnFuncSym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
+        ReturnFunc a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ReturnFuncSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) ReturnFuncSym1KindInference) ())
+    data ReturnFuncSym1 (a0123456789876543210 :: Nat) :: (~>) Nat Nat
+      where
+        ReturnFuncSym1KindInference :: forall a0123456789876543210
+                                              a0123456789876543210
+                                              arg. SameKind (Apply (ReturnFuncSym1 a0123456789876543210) arg) (ReturnFuncSym2 a0123456789876543210 arg) =>
+                                       ReturnFuncSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ReturnFuncSym1 a0123456789876543210) a0123456789876543210 = ReturnFunc a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ReturnFuncSym0 where
+      suppressUnusedWarnings = snd (((,) ReturnFuncSym0KindInference) ())
+    data ReturnFuncSym0 :: (~>) Nat ((~>) Nat Nat)
+      where
+        ReturnFuncSym0KindInference :: forall a0123456789876543210
+                                              arg. SameKind (Apply ReturnFuncSym0 arg) (ReturnFuncSym1 arg) =>
+                                       ReturnFuncSym0 a0123456789876543210
+    type instance Apply ReturnFuncSym0 a0123456789876543210 = ReturnFuncSym1 a0123456789876543210
+    type family IdFoo (a :: c) (a :: a) :: a where
+      IdFoo _ a_0123456789876543210 = Apply IdSym0 a_0123456789876543210
+    type family Id (a :: a) :: a where
+      Id x = x
+    type family ReturnFunc (a :: Nat) (a :: Nat) :: Nat where
+      ReturnFunc _ a_0123456789876543210 = Apply SuccSym0 a_0123456789876543210
+    sIdFoo ::
+      forall c a (t :: c) (t :: a).
+      Sing t -> Sing t -> Sing (Apply (Apply IdFooSym0 t) t :: a)
+    sId :: forall a (t :: a). Sing t -> Sing (Apply IdSym0 t :: a)
+    sReturnFunc ::
+      forall (t :: Nat) (t :: Nat).
+      Sing t -> Sing t -> Sing (Apply (Apply ReturnFuncSym0 t) t :: Nat)
+    sIdFoo _ (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = (applySing ((singFun1 @IdSym0) sId)) sA_0123456789876543210
+    sId (sX :: Sing x) = sX
+    sReturnFunc
+      _
+      (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = (applySing ((singFun1 @SuccSym0) SSucc)) sA_0123456789876543210
+    instance SingI (IdFooSym0 :: (~>) c ((~>) a a)) where
+      sing = (singFun2 @IdFooSym0) sIdFoo
+    instance SingI d => SingI (IdFooSym1 (d :: c) :: (~>) a a) where
+      sing = (singFun1 @(IdFooSym1 (d :: c))) (sIdFoo (sing @d))
+    instance SingI (IdSym0 :: (~>) a a) where
+      sing = (singFun1 @IdSym0) sId
+    instance SingI (ReturnFuncSym0 :: (~>) Nat ((~>) Nat Nat)) where
+      sing = (singFun2 @ReturnFuncSym0) sReturnFunc
+    instance SingI d =>
+             SingI (ReturnFuncSym1 (d :: Nat) :: (~>) Nat Nat) where
+      sing
+        = (singFun1 @(ReturnFuncSym1 (d :: Nat))) (sReturnFunc (sing @d))
diff --git a/tests/compile-and-dump/Singletons/Sections.ghc86.template b/tests/compile-and-dump/Singletons/Sections.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/Sections.ghc86.template
+++ /dev/null
@@ -1,122 +0,0 @@
-Singletons/Sections.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| (+) :: Nat -> Nat -> Nat
-          Zero + m = m
-          (Succ n) + m = Succ (n + m)
-          foo1 :: [Nat]
-          foo1 = map ((Succ Zero) +) [Zero, Succ Zero]
-          foo2 :: [Nat]
-          foo2 = map (+ (Succ Zero)) [Zero, Succ Zero]
-          foo3 :: [Nat]
-          foo3 = zipWith (+) [Succ Zero, Succ Zero] [Zero, Succ Zero] |]
-  ======>
-    (+) :: Nat -> Nat -> Nat
-    (+) Zero m = m
-    (+) (Succ n) m = Succ (n + m)
-    foo1 :: [Nat]
-    foo1 = (map (Succ Zero +)) [Zero, Succ Zero]
-    foo2 :: [Nat]
-    foo2 = (map (+ Succ Zero)) [Zero, Succ Zero]
-    foo3 :: [Nat]
-    foo3 = ((zipWith (+)) [Succ Zero, Succ Zero]) [Zero, Succ Zero]
-    type family Lambda_0123456789876543210 t where
-      Lambda_0123456789876543210 lhs_0123456789876543210 = Apply (Apply (+@#@$) lhs_0123456789876543210) (Apply SuccSym0 ZeroSym0)
-    type Lambda_0123456789876543210Sym1 t0123456789876543210 =
-        Lambda_0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall t0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 t0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210
-    type (+@#@$$$) (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
-        (+) a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ((+@#@$$) a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (:+@#@$$###)) ())
-    data (+@#@$$) (a0123456789876543210 :: Nat) :: (~>) Nat Nat
-      where
-        (:+@#@$$###) :: forall a0123456789876543210
-                               a0123456789876543210
-                               arg. SameKind (Apply ((+@#@$$) a0123456789876543210) arg) ((+@#@$$$) a0123456789876543210 arg) =>
-                        (+@#@$$) a0123456789876543210 a0123456789876543210
-    type instance Apply ((+@#@$$) a0123456789876543210) a0123456789876543210 = (+) a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (+@#@$) where
-      suppressUnusedWarnings = snd (((,) (:+@#@$###)) ())
-    data (+@#@$) :: (~>) Nat ((~>) Nat Nat)
-      where
-        (:+@#@$###) :: forall a0123456789876543210
-                              arg. SameKind (Apply (+@#@$) arg) ((+@#@$$) arg) =>
-                       (+@#@$) a0123456789876543210
-    type instance Apply (+@#@$) a0123456789876543210 = (+@#@$$) a0123456789876543210
-    type Foo1Sym0 = Foo1
-    type Foo2Sym0 = Foo2
-    type Foo3Sym0 = Foo3
-    type family (+) (a :: Nat) (a :: Nat) :: Nat where
-      (+)  'Zero m = m
-      (+) ( 'Succ n) m = Apply SuccSym0 (Apply (Apply (+@#@$) n) m)
-    type family Foo1 :: [Nat] where
-      Foo1 = Apply (Apply MapSym0 (Apply (+@#@$) (Apply SuccSym0 ZeroSym0))) (Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) '[]))
-    type family Foo2 :: [Nat] where
-      Foo2 = Apply (Apply MapSym0 Lambda_0123456789876543210Sym0) (Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) '[]))
-    type family Foo3 :: [Nat] where
-      Foo3 = Apply (Apply (Apply ZipWithSym0 (+@#@$)) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) '[]))) (Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) '[]))
-    (%+) ::
-      forall (t :: Nat) (t :: Nat).
-      Sing t -> Sing t -> Sing (Apply (Apply (+@#@$) t) t :: Nat)
-    sFoo1 :: Sing (Foo1Sym0 :: [Nat])
-    sFoo2 :: Sing (Foo2Sym0 :: [Nat])
-    sFoo3 :: Sing (Foo3Sym0 :: [Nat])
-    (%+) SZero (sM :: Sing m) = sM
-    (%+) (SSucc (sN :: Sing n)) (sM :: Sing m)
-      = (applySing ((singFun1 @SuccSym0) SSucc))
-          ((applySing ((applySing ((singFun2 @(+@#@$)) (%+))) sN)) sM)
-    sFoo1
-      = (applySing
-           ((applySing ((singFun2 @MapSym0) sMap))
-              ((applySing ((singFun2 @(+@#@$)) (%+)))
-                 ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))
-          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SZero))
-             ((applySing
-                 ((applySing ((singFun2 @(:@#@$)) SCons))
-                    ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
-                SNil))
-    sFoo2
-      = (applySing
-           ((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) }))))
-          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SZero))
-             ((applySing
-                 ((applySing ((singFun2 @(:@#@$)) SCons))
-                    ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
-                SNil))
-    sFoo3
-      = (applySing
-           ((applySing
-               ((applySing ((singFun3 @ZipWithSym0) sZipWith))
-                  ((singFun2 @(+@#@$)) (%+))))
-              ((applySing
-                  ((applySing ((singFun2 @(:@#@$)) SCons))
-                     ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
-                 ((applySing
-                     ((applySing ((singFun2 @(:@#@$)) SCons))
-                        ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
-                    SNil))))
-          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SZero))
-             ((applySing
-                 ((applySing ((singFun2 @(:@#@$)) SCons))
-                    ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
-                SNil))
-    instance SingI ((+@#@$) :: (~>) Nat ((~>) Nat Nat)) where
-      sing = (singFun2 @(+@#@$)) (%+)
-    instance SingI d =>
-             SingI ((+@#@$$) (d :: Nat) :: (~>) Nat Nat) where
-      sing = (singFun1 @((+@#@$$) (d :: Nat))) ((%+) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/Sections.ghc88.template b/tests/compile-and-dump/Singletons/Sections.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/Sections.ghc88.template
@@ -0,0 +1,122 @@
+Singletons/Sections.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| (+) :: Nat -> Nat -> Nat
+          Zero + m = m
+          (Succ n) + m = Succ (n + m)
+          foo1 :: [Nat]
+          foo1 = map ((Succ Zero) +) [Zero, Succ Zero]
+          foo2 :: [Nat]
+          foo2 = map (+ (Succ Zero)) [Zero, Succ Zero]
+          foo3 :: [Nat]
+          foo3 = zipWith (+) [Succ Zero, Succ Zero] [Zero, Succ Zero] |]
+  ======>
+    (+) :: Nat -> Nat -> Nat
+    (+) Zero m = m
+    (+) (Succ n) m = Succ (n + m)
+    foo1 :: [Nat]
+    foo1 = (map (Succ Zero +)) [Zero, Succ Zero]
+    foo2 :: [Nat]
+    foo2 = (map (+ Succ Zero)) [Zero, Succ Zero]
+    foo3 :: [Nat]
+    foo3 = ((zipWith (+)) [Succ Zero, Succ Zero]) [Zero, Succ Zero]
+    type family Lambda_0123456789876543210 t where
+      Lambda_0123456789876543210 lhs_0123456789876543210 = Apply (Apply (+@#@$) lhs_0123456789876543210) (Apply SuccSym0 ZeroSym0)
+    type Lambda_0123456789876543210Sym1 t0123456789876543210 =
+        Lambda_0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall t0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 t0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 t0123456789876543210 = Lambda_0123456789876543210 t0123456789876543210
+    type Foo3Sym0 = Foo3
+    type Foo2Sym0 = Foo2
+    type Foo1Sym0 = Foo1
+    type (+@#@$$$) (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
+        (+) a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ((+@#@$$) a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (:+@#@$$###)) ())
+    data (+@#@$$) (a0123456789876543210 :: Nat) :: (~>) Nat Nat
+      where
+        (:+@#@$$###) :: forall a0123456789876543210
+                               a0123456789876543210
+                               arg. SameKind (Apply ((+@#@$$) a0123456789876543210) arg) ((+@#@$$$) a0123456789876543210 arg) =>
+                        (+@#@$$) a0123456789876543210 a0123456789876543210
+    type instance Apply ((+@#@$$) a0123456789876543210) a0123456789876543210 = (+) a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (+@#@$) where
+      suppressUnusedWarnings = snd (((,) (:+@#@$###)) ())
+    data (+@#@$) :: (~>) Nat ((~>) Nat Nat)
+      where
+        (:+@#@$###) :: forall a0123456789876543210
+                              arg. SameKind (Apply (+@#@$) arg) ((+@#@$$) arg) =>
+                       (+@#@$) a0123456789876543210
+    type instance Apply (+@#@$) a0123456789876543210 = (+@#@$$) a0123456789876543210
+    type family Foo3 :: [Nat] where
+      Foo3 = Apply (Apply (Apply ZipWithSym0 (+@#@$)) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) '[]))) (Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) '[]))
+    type family Foo2 :: [Nat] where
+      Foo2 = Apply (Apply MapSym0 Lambda_0123456789876543210Sym0) (Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) '[]))
+    type family Foo1 :: [Nat] where
+      Foo1 = Apply (Apply MapSym0 (Apply (+@#@$) (Apply SuccSym0 ZeroSym0))) (Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) '[]))
+    type family (+) (a :: Nat) (a :: Nat) :: Nat where
+      (+) 'Zero m = m
+      (+) ('Succ n) m = Apply SuccSym0 (Apply (Apply (+@#@$) n) m)
+    sFoo3 :: Sing (Foo3Sym0 :: [Nat])
+    sFoo2 :: Sing (Foo2Sym0 :: [Nat])
+    sFoo1 :: Sing (Foo1Sym0 :: [Nat])
+    (%+) ::
+      forall (t :: Nat) (t :: Nat).
+      Sing t -> Sing t -> Sing (Apply (Apply (+@#@$) t) t :: Nat)
+    sFoo3
+      = (applySing
+           ((applySing
+               ((applySing ((singFun3 @ZipWithSym0) sZipWith))
+                  ((singFun2 @(+@#@$)) (%+))))
+              ((applySing
+                  ((applySing ((singFun2 @(:@#@$)) SCons))
+                     ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
+                 ((applySing
+                     ((applySing ((singFun2 @(:@#@$)) SCons))
+                        ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
+                    SNil))))
+          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SZero))
+             ((applySing
+                 ((applySing ((singFun2 @(:@#@$)) SCons))
+                    ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
+                SNil))
+    sFoo2
+      = (applySing
+           ((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) }))))
+          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SZero))
+             ((applySing
+                 ((applySing ((singFun2 @(:@#@$)) SCons))
+                    ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
+                SNil))
+    sFoo1
+      = (applySing
+           ((applySing ((singFun2 @MapSym0) sMap))
+              ((applySing ((singFun2 @(+@#@$)) (%+)))
+                 ((applySing ((singFun1 @SuccSym0) SSucc)) SZero))))
+          ((applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SZero))
+             ((applySing
+                 ((applySing ((singFun2 @(:@#@$)) SCons))
+                    ((applySing ((singFun1 @SuccSym0) SSucc)) SZero)))
+                SNil))
+    (%+) SZero (sM :: Sing m) = sM
+    (%+) (SSucc (sN :: Sing n)) (sM :: Sing m)
+      = (applySing ((singFun1 @SuccSym0) SSucc))
+          ((applySing ((applySing ((singFun2 @(+@#@$)) (%+))) sN)) sM)
+    instance SingI ((+@#@$) :: (~>) Nat ((~>) Nat Nat)) where
+      sing = (singFun2 @(+@#@$)) (%+)
+    instance SingI d =>
+             SingI ((+@#@$$) (d :: Nat) :: (~>) Nat Nat) where
+      sing = (singFun1 @((+@#@$$) (d :: Nat))) ((%+) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/ShowDeriving.ghc86.template b/tests/compile-and-dump/Singletons/ShowDeriving.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/ShowDeriving.ghc86.template
+++ /dev/null
@@ -1,582 +0,0 @@
-Singletons/ShowDeriving.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| infixl 5 `MkFoo2b`, :*:, :&:
-          
-          data Foo1
-            = MkFoo1
-            deriving Show
-          data Foo2 a
-            = MkFoo2a a a | a `MkFoo2b` a | (:*:) a a | a :&: a
-            deriving Show
-          data Foo3
-            = MkFoo3 {getFoo3a :: Bool, *** :: Bool}
-            deriving Show |]
-  ======>
-    data Foo1
-      = MkFoo1
-      deriving Show
-    infixl 5 `MkFoo2b`
-    infixl 5 :*:
-    infixl 5 :&:
-    data Foo2 a
-      = MkFoo2a a a | a `MkFoo2b` a | (:*:) a a | a :&: a
-      deriving Show
-    data Foo3
-      = MkFoo3 {getFoo3a :: Bool, *** :: Bool}
-      deriving Show
-    type GetFoo3aSym1 (a0123456789876543210 :: Foo3) =
-        GetFoo3a a0123456789876543210
-    instance SuppressUnusedWarnings GetFoo3aSym0 where
-      suppressUnusedWarnings = snd (((,) GetFoo3aSym0KindInference) ())
-    data GetFoo3aSym0 :: (~>) Foo3 Bool
-      where
-        GetFoo3aSym0KindInference :: forall a0123456789876543210
-                                            arg. SameKind (Apply GetFoo3aSym0 arg) (GetFoo3aSym1 arg) =>
-                                     GetFoo3aSym0 a0123456789876543210
-    type instance Apply GetFoo3aSym0 a0123456789876543210 = GetFoo3a a0123456789876543210
-    type (***@#@$$) (a0123456789876543210 :: Foo3) =
-        (***) a0123456789876543210
-    instance SuppressUnusedWarnings (***@#@$) where
-      suppressUnusedWarnings = snd (((,) (:***@#@$###)) ())
-    data (***@#@$) :: (~>) Foo3 Bool
-      where
-        (:***@#@$###) :: forall a0123456789876543210
-                                arg. SameKind (Apply (***@#@$) arg) ((***@#@$$) arg) =>
-                         (***@#@$) a0123456789876543210
-    type instance Apply (***@#@$) a0123456789876543210 = (***) a0123456789876543210
-    type family GetFoo3a (a :: Foo3) :: Bool where
-      GetFoo3a (MkFoo3 field _) = field
-    type family (***) (a :: Foo3) :: Bool where
-      (***) (MkFoo3 _ field) = field
-    type MkFoo1Sym0 = MkFoo1
-    type MkFoo2aSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: a0123456789876543210) =
-        MkFoo2a t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (MkFoo2aSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MkFoo2aSym1KindInference) ())
-    data MkFoo2aSym1 (t0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 (Foo2 a0123456789876543210)
-      where
-        MkFoo2aSym1KindInference :: forall t0123456789876543210
-                                           t0123456789876543210
-                                           arg. SameKind (Apply (MkFoo2aSym1 t0123456789876543210) arg) (MkFoo2aSym2 t0123456789876543210 arg) =>
-                                    MkFoo2aSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (MkFoo2aSym1 t0123456789876543210) t0123456789876543210 = MkFoo2a t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings MkFoo2aSym0 where
-      suppressUnusedWarnings = snd (((,) MkFoo2aSym0KindInference) ())
-    data MkFoo2aSym0 :: forall a0123456789876543210.
-                        (~>) a0123456789876543210 ((~>) a0123456789876543210 (Foo2 a0123456789876543210))
-      where
-        MkFoo2aSym0KindInference :: forall t0123456789876543210
-                                           arg. SameKind (Apply MkFoo2aSym0 arg) (MkFoo2aSym1 arg) =>
-                                    MkFoo2aSym0 t0123456789876543210
-    type instance Apply MkFoo2aSym0 t0123456789876543210 = MkFoo2aSym1 t0123456789876543210
-    type MkFoo2bSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: a0123456789876543210) =
-        MkFoo2b t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (MkFoo2bSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MkFoo2bSym1KindInference) ())
-    data MkFoo2bSym1 (t0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 (Foo2 a0123456789876543210)
-      where
-        MkFoo2bSym1KindInference :: forall t0123456789876543210
-                                           t0123456789876543210
-                                           arg. SameKind (Apply (MkFoo2bSym1 t0123456789876543210) arg) (MkFoo2bSym2 t0123456789876543210 arg) =>
-                                    MkFoo2bSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (MkFoo2bSym1 t0123456789876543210) t0123456789876543210 = MkFoo2b t0123456789876543210 t0123456789876543210
-    infixl 5 `MkFoo2bSym1`
-    instance SuppressUnusedWarnings MkFoo2bSym0 where
-      suppressUnusedWarnings = snd (((,) MkFoo2bSym0KindInference) ())
-    data MkFoo2bSym0 :: forall a0123456789876543210.
-                        (~>) a0123456789876543210 ((~>) a0123456789876543210 (Foo2 a0123456789876543210))
-      where
-        MkFoo2bSym0KindInference :: forall t0123456789876543210
-                                           arg. SameKind (Apply MkFoo2bSym0 arg) (MkFoo2bSym1 arg) =>
-                                    MkFoo2bSym0 t0123456789876543210
-    type instance Apply MkFoo2bSym0 t0123456789876543210 = MkFoo2bSym1 t0123456789876543210
-    infixl 5 `MkFoo2bSym0`
-    type (:*:@#@$$$) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: a0123456789876543210) =
-        (:*:) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings ((:*:@#@$$) t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (::*:@#@$$###)) ())
-    data (:*:@#@$$) (t0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 (Foo2 a0123456789876543210)
-      where
-        (::*:@#@$$###) :: forall t0123456789876543210
-                                 t0123456789876543210
-                                 arg. SameKind (Apply ((:*:@#@$$) t0123456789876543210) arg) ((:*:@#@$$$) t0123456789876543210 arg) =>
-                          (:*:@#@$$) t0123456789876543210 t0123456789876543210
-    type instance Apply ((:*:@#@$$) t0123456789876543210) t0123456789876543210 = (:*:) t0123456789876543210 t0123456789876543210
-    infixl 5 :*:@#@$$
-    instance SuppressUnusedWarnings (:*:@#@$) where
-      suppressUnusedWarnings = snd (((,) (::*:@#@$###)) ())
-    data (:*:@#@$) :: forall a0123456789876543210.
-                      (~>) a0123456789876543210 ((~>) a0123456789876543210 (Foo2 a0123456789876543210))
-      where
-        (::*:@#@$###) :: forall t0123456789876543210
-                                arg. SameKind (Apply (:*:@#@$) arg) ((:*:@#@$$) arg) =>
-                         (:*:@#@$) t0123456789876543210
-    type instance Apply (:*:@#@$) t0123456789876543210 = (:*:@#@$$) t0123456789876543210
-    infixl 5 :*:@#@$
-    type (:&:@#@$$$) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: a0123456789876543210) =
-        (:&:) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings ((:&:@#@$$) t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (::&:@#@$$###)) ())
-    data (:&:@#@$$) (t0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 (Foo2 a0123456789876543210)
-      where
-        (::&:@#@$$###) :: forall t0123456789876543210
-                                 t0123456789876543210
-                                 arg. SameKind (Apply ((:&:@#@$$) t0123456789876543210) arg) ((:&:@#@$$$) t0123456789876543210 arg) =>
-                          (:&:@#@$$) t0123456789876543210 t0123456789876543210
-    type instance Apply ((:&:@#@$$) t0123456789876543210) t0123456789876543210 = (:&:) t0123456789876543210 t0123456789876543210
-    infixl 5 :&:@#@$$
-    instance SuppressUnusedWarnings (:&:@#@$) where
-      suppressUnusedWarnings = snd (((,) (::&:@#@$###)) ())
-    data (:&:@#@$) :: forall a0123456789876543210.
-                      (~>) a0123456789876543210 ((~>) a0123456789876543210 (Foo2 a0123456789876543210))
-      where
-        (::&:@#@$###) :: forall t0123456789876543210
-                                arg. SameKind (Apply (:&:@#@$) arg) ((:&:@#@$$) arg) =>
-                         (:&:@#@$) t0123456789876543210
-    type instance Apply (:&:@#@$) t0123456789876543210 = (:&:@#@$$) t0123456789876543210
-    infixl 5 :&:@#@$
-    type MkFoo3Sym2 (t0123456789876543210 :: Bool) (t0123456789876543210 :: Bool) =
-        MkFoo3 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (MkFoo3Sym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MkFoo3Sym1KindInference) ())
-    data MkFoo3Sym1 (t0123456789876543210 :: Bool) :: (~>) Bool Foo3
-      where
-        MkFoo3Sym1KindInference :: forall t0123456789876543210
-                                          t0123456789876543210
-                                          arg. SameKind (Apply (MkFoo3Sym1 t0123456789876543210) arg) (MkFoo3Sym2 t0123456789876543210 arg) =>
-                                   MkFoo3Sym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (MkFoo3Sym1 t0123456789876543210) t0123456789876543210 = MkFoo3 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings MkFoo3Sym0 where
-      suppressUnusedWarnings = snd (((,) MkFoo3Sym0KindInference) ())
-    data MkFoo3Sym0 :: (~>) Bool ((~>) Bool Foo3)
-      where
-        MkFoo3Sym0KindInference :: forall t0123456789876543210
-                                          arg. SameKind (Apply MkFoo3Sym0 arg) (MkFoo3Sym1 arg) =>
-                                   MkFoo3Sym0 t0123456789876543210
-    type instance Apply MkFoo3Sym0 t0123456789876543210 = MkFoo3Sym1 t0123456789876543210
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Foo1) (a :: Symbol) :: Symbol where
-      ShowsPrec_0123456789876543210 _ MkFoo1 a_0123456789876543210 = Apply (Apply ShowStringSym0 "MkFoo1") a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo1) (a0123456789876543210 :: Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo1) :: (~>) Symbol Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Foo1 ((~>) Symbol Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Foo1 ((~>) Symbol Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow Foo1 where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Foo2 a) (a :: Symbol) :: Symbol where
-      ShowsPrec_0123456789876543210 p_0123456789876543210 (MkFoo2a arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "MkFoo2a ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210
-      ShowsPrec_0123456789876543210 p_0123456789876543210 (MkFoo2b argL_0123456789876543210 argR_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 5))) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argL_0123456789876543210)) (Apply (Apply (.@#@$) (Apply ShowStringSym0 " `MkFoo2b` ")) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argR_0123456789876543210)))) a_0123456789876543210
-      ShowsPrec_0123456789876543210 p_0123456789876543210 ((:*:) arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "(:*:) ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210
-      ShowsPrec_0123456789876543210 p_0123456789876543210 ((:&:) argL_0123456789876543210 argR_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 5))) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argL_0123456789876543210)) (Apply (Apply (.@#@$) (Apply ShowStringSym0 " :&: ")) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argR_0123456789876543210)))) a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo2 a0123456789876543210) (a0123456789876543210 :: Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo2 a0123456789876543210) :: (~>) Symbol Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210.
-                                                                                      (~>) (Foo2 a0123456789876543210) ((~>) Symbol Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210.
-                                              (~>) GHC.Types.Nat ((~>) (Foo2 a0123456789876543210) ((~>) Symbol Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow (Foo2 a) where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Foo3) (a :: Symbol) :: Symbol where
-      ShowsPrec_0123456789876543210 p_0123456789876543210 (MkFoo3 arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "MkFoo3 ")) (Apply (Apply (.@#@$) (Apply ShowCharSym0 "{")) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "getFoo3a = ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 0)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowCommaSpaceSym0) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "(***) = ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 0)) arg_0123456789876543210)) (Apply ShowCharSym0 "}"))))))))) a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo3) (a0123456789876543210 :: Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo3) :: (~>) Symbol Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Foo3 ((~>) Symbol Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Foo3 ((~>) Symbol Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow Foo3 where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    infixl 5 `SMkFoo2b`
-    infixl 5 :%*:
-    infixl 5 :%&:
-    data instance Sing :: Foo1 -> GHC.Types.Type
-      where SMkFoo1 :: Sing MkFoo1
-    type SFoo1 = (Sing :: Foo1 -> GHC.Types.Type)
-    instance SingKind Foo1 where
-      type Demote Foo1 = Foo1
-      fromSing SMkFoo1 = MkFoo1
-      toSing MkFoo1 = SomeSing SMkFoo1
-    data instance Sing :: Foo2 a -> GHC.Types.Type
-      where
-        SMkFoo2a :: forall a (n :: a) (n :: a).
-                    (Sing (n :: a)) -> (Sing (n :: a)) -> Sing (MkFoo2a n n)
-        SMkFoo2b :: forall a (n :: a) (n :: a).
-                    (Sing (n :: a)) -> (Sing (n :: a)) -> Sing (MkFoo2b n n)
-        (:%*:) :: forall a (n :: a) (n :: a).
-                  (Sing (n :: a)) -> (Sing (n :: a)) -> Sing ((:*:) n n)
-        (:%&:) :: forall a (n :: a) (n :: a).
-                  (Sing (n :: a)) -> (Sing (n :: a)) -> Sing ((:&:) n n)
-    type SFoo2 = (Sing :: Foo2 a -> GHC.Types.Type)
-    instance SingKind a => SingKind (Foo2 a) where
-      type Demote (Foo2 a) = Foo2 (Demote a)
-      fromSing (SMkFoo2a b b) = (MkFoo2a (fromSing b)) (fromSing b)
-      fromSing (SMkFoo2b b b) = (MkFoo2b (fromSing b)) (fromSing b)
-      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) }
-      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) }
-      toSing ((:*:) (b :: Demote a) (b :: Demote a))
-        = case ((,) (toSing b :: SomeSing a)) (toSing b :: SomeSing a) of {
-            (,) (SomeSing c) (SomeSing c) -> SomeSing (((:%*:) c) c) }
-      toSing ((:&:) (b :: Demote a) (b :: Demote a))
-        = case ((,) (toSing b :: SomeSing a)) (toSing b :: SomeSing a) of {
-            (,) (SomeSing c) (SomeSing c) -> SomeSing (((:%&:) c) c) }
-    data instance Sing :: Foo3 -> GHC.Types.Type
-      where
-        SMkFoo3 :: forall (n :: Bool) (n :: Bool).
-                   {sGetFoo3a :: (Sing (n :: Bool)), %*** :: (Sing (n :: Bool))}
-                   -> Sing (MkFoo3 n n)
-    type SFoo3 = (Sing :: Foo3 -> GHC.Types.Type)
-    instance SingKind Foo3 where
-      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) }
-    instance SShow Foo1 where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: Foo1) (t3 :: Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) Foo1 ((~>) Symbol Symbol))
-                                                             -> GHC.Types.Type) t1) t2) t3)
-      sShowsPrec
-        _
-        SMkFoo1
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "MkFoo1")))
-            sA_0123456789876543210
-    instance SShow a => SShow (Foo2 a) where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: Foo2 a) (t3 :: Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) (Foo2 a) ((~>) Symbol Symbol))
-                                                             -> GHC.Types.Type) t1) t2) t3)
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        (SMkFoo2a (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
-                  (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (sFromInteger (sing :: Sing 10)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                          (sing :: Sing "MkFoo2a "))))
-                   ((applySing
-                       ((applySing ((singFun3 @(.@#@$)) (%.)))
-                          ((applySing
-                              ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                                 (sFromInteger (sing :: Sing 11))))
-                             sArg_0123456789876543210)))
-                      ((applySing
-                          ((applySing ((singFun3 @(.@#@$)) (%.)))
-                             ((singFun1 @ShowSpaceSym0) sShowSpace)))
-                         ((applySing
-                             ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                                (sFromInteger (sing :: Sing 11))))
-                            sArg_0123456789876543210))))))
-            sA_0123456789876543210
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        (SMkFoo2b (sArgL_0123456789876543210 :: Sing argL_0123456789876543210)
-                  (sArgR_0123456789876543210 :: Sing argR_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (sFromInteger (sing :: Sing 5)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing
-                           ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                              (sFromInteger (sing :: Sing 6))))
-                          sArgL_0123456789876543210)))
-                   ((applySing
-                       ((applySing ((singFun3 @(.@#@$)) (%.)))
-                          ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                             (sing :: Sing " `MkFoo2b` "))))
-                      ((applySing
-                          ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                             (sFromInteger (sing :: Sing 6))))
-                         sArgR_0123456789876543210)))))
-            sA_0123456789876543210
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        ((:%*:) (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
-                (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (sFromInteger (sing :: Sing 10)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                          (sing :: Sing "(:*:) "))))
-                   ((applySing
-                       ((applySing ((singFun3 @(.@#@$)) (%.)))
-                          ((applySing
-                              ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                                 (sFromInteger (sing :: Sing 11))))
-                             sArg_0123456789876543210)))
-                      ((applySing
-                          ((applySing ((singFun3 @(.@#@$)) (%.)))
-                             ((singFun1 @ShowSpaceSym0) sShowSpace)))
-                         ((applySing
-                             ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                                (sFromInteger (sing :: Sing 11))))
-                            sArg_0123456789876543210))))))
-            sA_0123456789876543210
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        ((:%&:) (sArgL_0123456789876543210 :: Sing argL_0123456789876543210)
-                (sArgR_0123456789876543210 :: Sing argR_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (sFromInteger (sing :: Sing 5)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing
-                           ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                              (sFromInteger (sing :: Sing 6))))
-                          sArgL_0123456789876543210)))
-                   ((applySing
-                       ((applySing ((singFun3 @(.@#@$)) (%.)))
-                          ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                             (sing :: Sing " :&: "))))
-                      ((applySing
-                          ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                             (sFromInteger (sing :: Sing 6))))
-                         sArgR_0123456789876543210)))))
-            sA_0123456789876543210
-    instance SShow Bool => SShow Foo3 where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: Foo3) (t3 :: Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) Foo3 ((~>) Symbol Symbol))
-                                                             -> GHC.Types.Type) t1) t2) t3)
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        (SMkFoo3 (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
-                 (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (sFromInteger (sing :: Sing 10)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                          (sing :: Sing "MkFoo3 "))))
-                   ((applySing
-                       ((applySing ((singFun3 @(.@#@$)) (%.)))
-                          ((applySing ((singFun2 @ShowCharSym0) sShowChar))
-                             (sing :: Sing "{"))))
-                      ((applySing
-                          ((applySing ((singFun3 @(.@#@$)) (%.)))
-                             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                                (sing :: Sing "getFoo3a = "))))
-                         ((applySing
-                             ((applySing ((singFun3 @(.@#@$)) (%.)))
-                                ((applySing
-                                    ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                                       (sFromInteger (sing :: Sing 0))))
-                                   sArg_0123456789876543210)))
-                            ((applySing
-                                ((applySing ((singFun3 @(.@#@$)) (%.)))
-                                   ((singFun1 @ShowCommaSpaceSym0) sShowCommaSpace)))
-                               ((applySing
-                                   ((applySing ((singFun3 @(.@#@$)) (%.)))
-                                      ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                                         (sing :: Sing "(***) = "))))
-                                  ((applySing
-                                      ((applySing ((singFun3 @(.@#@$)) (%.)))
-                                         ((applySing
-                                             ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                                                (sFromInteger (sing :: Sing 0))))
-                                            sArg_0123456789876543210)))
-                                     ((applySing ((singFun2 @ShowCharSym0) sShowChar))
-                                        (sing :: Sing "}")))))))))))
-            sA_0123456789876543210
-    deriving instance Show (Sing (z :: Foo1))
-    deriving instance Data.Singletons.ShowSing.ShowSing a =>
-                      Show (Sing (z :: Foo2 a))
-    deriving instance Data.Singletons.ShowSing.ShowSing Bool =>
-                      Show (Sing (z :: Foo3))
-    instance SingI MkFoo1 where
-      sing = SMkFoo1
-    instance (SingI n, SingI n) =>
-             SingI (MkFoo2a (n :: a) (n :: a)) where
-      sing = (SMkFoo2a sing) sing
-    instance SingI (MkFoo2aSym0 :: (~>) a ((~>) a (Foo2 a))) where
-      sing = (singFun2 @MkFoo2aSym0) SMkFoo2a
-    instance SingI (TyCon2 MkFoo2a :: (~>) a ((~>) a (Foo2 a))) where
-      sing = (singFun2 @(TyCon2 MkFoo2a)) SMkFoo2a
-    instance SingI d =>
-             SingI (MkFoo2aSym1 (d :: a) :: (~>) a (Foo2 a)) where
-      sing = (singFun1 @(MkFoo2aSym1 (d :: a))) (SMkFoo2a (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 (MkFoo2a (d :: a)) :: (~>) a (Foo2 a)) where
-      sing = (singFun1 @(TyCon1 (MkFoo2a (d :: a)))) (SMkFoo2a (sing @d))
-    instance (SingI n, SingI n) =>
-             SingI (MkFoo2b (n :: a) (n :: a)) where
-      sing = (SMkFoo2b sing) sing
-    instance SingI (MkFoo2bSym0 :: (~>) a ((~>) a (Foo2 a))) where
-      sing = (singFun2 @MkFoo2bSym0) SMkFoo2b
-    instance SingI (TyCon2 MkFoo2b :: (~>) a ((~>) a (Foo2 a))) where
-      sing = (singFun2 @(TyCon2 MkFoo2b)) SMkFoo2b
-    instance SingI d =>
-             SingI (MkFoo2bSym1 (d :: a) :: (~>) a (Foo2 a)) where
-      sing = (singFun1 @(MkFoo2bSym1 (d :: a))) (SMkFoo2b (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 (MkFoo2b (d :: a)) :: (~>) a (Foo2 a)) where
-      sing = (singFun1 @(TyCon1 (MkFoo2b (d :: a)))) (SMkFoo2b (sing @d))
-    instance (SingI n, SingI n) =>
-             SingI ((:*:) (n :: a) (n :: a)) where
-      sing = ((:%*:) sing) sing
-    instance SingI ((:*:@#@$) :: (~>) a ((~>) a (Foo2 a))) where
-      sing = (singFun2 @(:*:@#@$)) (:%*:)
-    instance SingI (TyCon2 (:*:) :: (~>) a ((~>) a (Foo2 a))) where
-      sing = (singFun2 @(TyCon2 (:*:))) (:%*:)
-    instance SingI d =>
-             SingI ((:*:@#@$$) (d :: a) :: (~>) a (Foo2 a)) where
-      sing = (singFun1 @((:*:@#@$$) (d :: a))) ((:%*:) (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 ((:*:) (d :: a)) :: (~>) a (Foo2 a)) where
-      sing = (singFun1 @(TyCon1 ((:*:) (d :: a)))) ((:%*:) (sing @d))
-    instance (SingI n, SingI n) =>
-             SingI ((:&:) (n :: a) (n :: a)) where
-      sing = ((:%&:) sing) sing
-    instance SingI ((:&:@#@$) :: (~>) a ((~>) a (Foo2 a))) where
-      sing = (singFun2 @(:&:@#@$)) (:%&:)
-    instance SingI (TyCon2 (:&:) :: (~>) a ((~>) a (Foo2 a))) where
-      sing = (singFun2 @(TyCon2 (:&:))) (:%&:)
-    instance SingI d =>
-             SingI ((:&:@#@$$) (d :: a) :: (~>) a (Foo2 a)) where
-      sing = (singFun1 @((:&:@#@$$) (d :: a))) ((:%&:) (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 ((:&:) (d :: a)) :: (~>) a (Foo2 a)) where
-      sing = (singFun1 @(TyCon1 ((:&:) (d :: a)))) ((:%&:) (sing @d))
-    instance (SingI n, SingI n) =>
-             SingI (MkFoo3 (n :: Bool) (n :: Bool)) where
-      sing = (SMkFoo3 sing) sing
-    instance SingI (MkFoo3Sym0 :: (~>) Bool ((~>) Bool Foo3)) where
-      sing = (singFun2 @MkFoo3Sym0) SMkFoo3
-    instance SingI (TyCon2 MkFoo3 :: (~>) Bool ((~>) Bool Foo3)) where
-      sing = (singFun2 @(TyCon2 MkFoo3)) SMkFoo3
-    instance SingI d =>
-             SingI (MkFoo3Sym1 (d :: Bool) :: (~>) Bool Foo3) where
-      sing = (singFun1 @(MkFoo3Sym1 (d :: Bool))) (SMkFoo3 (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 (MkFoo3 (d :: Bool)) :: (~>) Bool Foo3) where
-      sing
-        = (singFun1 @(TyCon1 (MkFoo3 (d :: Bool)))) (SMkFoo3 (sing @d))
diff --git a/tests/compile-and-dump/Singletons/ShowDeriving.ghc88.template b/tests/compile-and-dump/Singletons/ShowDeriving.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/ShowDeriving.ghc88.template
@@ -0,0 +1,618 @@
+Singletons/ShowDeriving.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| infixl 5 `MkFoo2b`, :*:, :&:
+          
+          data Foo1
+            = MkFoo1
+            deriving Show
+          data Foo2 a
+            = MkFoo2a a a | a `MkFoo2b` a | (:*:) a a | a :&: a
+            deriving Show
+          data Foo3
+            = MkFoo3 {getFoo3a :: Bool, *** :: Bool}
+            deriving Show |]
+  ======>
+    data Foo1
+      = MkFoo1
+      deriving Show
+    infixl 5 `MkFoo2b`
+    infixl 5 :*:
+    infixl 5 :&:
+    data Foo2 a
+      = MkFoo2a a a | a `MkFoo2b` a | (:*:) a a | a :&: a
+      deriving Show
+    data Foo3
+      = MkFoo3 {getFoo3a :: Bool, *** :: Bool}
+      deriving Show
+    type (***@#@$$) (a0123456789876543210 :: Foo3) =
+        (***) a0123456789876543210
+    instance SuppressUnusedWarnings (***@#@$) where
+      suppressUnusedWarnings = snd (((,) (:***@#@$###)) ())
+    data (***@#@$) :: (~>) Foo3 Bool
+      where
+        (:***@#@$###) :: forall a0123456789876543210
+                                arg. SameKind (Apply (***@#@$) arg) ((***@#@$$) arg) =>
+                         (***@#@$) a0123456789876543210
+    type instance Apply (***@#@$) a0123456789876543210 = (***) a0123456789876543210
+    type GetFoo3aSym1 (a0123456789876543210 :: Foo3) =
+        GetFoo3a a0123456789876543210
+    instance SuppressUnusedWarnings GetFoo3aSym0 where
+      suppressUnusedWarnings = snd (((,) GetFoo3aSym0KindInference) ())
+    data GetFoo3aSym0 :: (~>) Foo3 Bool
+      where
+        GetFoo3aSym0KindInference :: forall a0123456789876543210
+                                            arg. SameKind (Apply GetFoo3aSym0 arg) (GetFoo3aSym1 arg) =>
+                                     GetFoo3aSym0 a0123456789876543210
+    type instance Apply GetFoo3aSym0 a0123456789876543210 = GetFoo3a a0123456789876543210
+    type family (***) (a :: Foo3) :: Bool where
+      (***) (MkFoo3 _ field) = field
+    type family GetFoo3a (a :: Foo3) :: Bool where
+      GetFoo3a (MkFoo3 field _) = field
+    type MkFoo1Sym0 = MkFoo1
+    type MkFoo2aSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: a0123456789876543210) =
+        MkFoo2a t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (MkFoo2aSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MkFoo2aSym1KindInference) ())
+    data MkFoo2aSym1 (t0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 (Foo2 a0123456789876543210)
+      where
+        MkFoo2aSym1KindInference :: forall t0123456789876543210
+                                           t0123456789876543210
+                                           arg. SameKind (Apply (MkFoo2aSym1 t0123456789876543210) arg) (MkFoo2aSym2 t0123456789876543210 arg) =>
+                                    MkFoo2aSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (MkFoo2aSym1 t0123456789876543210) t0123456789876543210 = MkFoo2a t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings MkFoo2aSym0 where
+      suppressUnusedWarnings = snd (((,) MkFoo2aSym0KindInference) ())
+    data MkFoo2aSym0 :: forall a0123456789876543210.
+                        (~>) a0123456789876543210 ((~>) a0123456789876543210 (Foo2 a0123456789876543210))
+      where
+        MkFoo2aSym0KindInference :: forall t0123456789876543210
+                                           arg. SameKind (Apply MkFoo2aSym0 arg) (MkFoo2aSym1 arg) =>
+                                    MkFoo2aSym0 t0123456789876543210
+    type instance Apply MkFoo2aSym0 t0123456789876543210 = MkFoo2aSym1 t0123456789876543210
+    type MkFoo2bSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: a0123456789876543210) =
+        MkFoo2b t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (MkFoo2bSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MkFoo2bSym1KindInference) ())
+    data MkFoo2bSym1 (t0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 (Foo2 a0123456789876543210)
+      where
+        MkFoo2bSym1KindInference :: forall t0123456789876543210
+                                           t0123456789876543210
+                                           arg. SameKind (Apply (MkFoo2bSym1 t0123456789876543210) arg) (MkFoo2bSym2 t0123456789876543210 arg) =>
+                                    MkFoo2bSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (MkFoo2bSym1 t0123456789876543210) t0123456789876543210 = MkFoo2b t0123456789876543210 t0123456789876543210
+    infixl 5 `MkFoo2bSym1`
+    instance SuppressUnusedWarnings MkFoo2bSym0 where
+      suppressUnusedWarnings = snd (((,) MkFoo2bSym0KindInference) ())
+    data MkFoo2bSym0 :: forall a0123456789876543210.
+                        (~>) a0123456789876543210 ((~>) a0123456789876543210 (Foo2 a0123456789876543210))
+      where
+        MkFoo2bSym0KindInference :: forall t0123456789876543210
+                                           arg. SameKind (Apply MkFoo2bSym0 arg) (MkFoo2bSym1 arg) =>
+                                    MkFoo2bSym0 t0123456789876543210
+    type instance Apply MkFoo2bSym0 t0123456789876543210 = MkFoo2bSym1 t0123456789876543210
+    infixl 5 `MkFoo2bSym0`
+    type (:*:@#@$$$) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: a0123456789876543210) =
+        (:*:) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings ((:*:@#@$$) t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (::*:@#@$$###)) ())
+    data (:*:@#@$$) (t0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 (Foo2 a0123456789876543210)
+      where
+        (::*:@#@$$###) :: forall t0123456789876543210
+                                 t0123456789876543210
+                                 arg. SameKind (Apply ((:*:@#@$$) t0123456789876543210) arg) ((:*:@#@$$$) t0123456789876543210 arg) =>
+                          (:*:@#@$$) t0123456789876543210 t0123456789876543210
+    type instance Apply ((:*:@#@$$) t0123456789876543210) t0123456789876543210 = (:*:) t0123456789876543210 t0123456789876543210
+    infixl 5 :*:@#@$$
+    instance SuppressUnusedWarnings (:*:@#@$) where
+      suppressUnusedWarnings = snd (((,) (::*:@#@$###)) ())
+    data (:*:@#@$) :: forall a0123456789876543210.
+                      (~>) a0123456789876543210 ((~>) a0123456789876543210 (Foo2 a0123456789876543210))
+      where
+        (::*:@#@$###) :: forall t0123456789876543210
+                                arg. SameKind (Apply (:*:@#@$) arg) ((:*:@#@$$) arg) =>
+                         (:*:@#@$) t0123456789876543210
+    type instance Apply (:*:@#@$) t0123456789876543210 = (:*:@#@$$) t0123456789876543210
+    infixl 5 :*:@#@$
+    type (:&:@#@$$$) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: a0123456789876543210) =
+        (:&:) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings ((:&:@#@$$) t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (::&:@#@$$###)) ())
+    data (:&:@#@$$) (t0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 (Foo2 a0123456789876543210)
+      where
+        (::&:@#@$$###) :: forall t0123456789876543210
+                                 t0123456789876543210
+                                 arg. SameKind (Apply ((:&:@#@$$) t0123456789876543210) arg) ((:&:@#@$$$) t0123456789876543210 arg) =>
+                          (:&:@#@$$) t0123456789876543210 t0123456789876543210
+    type instance Apply ((:&:@#@$$) t0123456789876543210) t0123456789876543210 = (:&:) t0123456789876543210 t0123456789876543210
+    infixl 5 :&:@#@$$
+    instance SuppressUnusedWarnings (:&:@#@$) where
+      suppressUnusedWarnings = snd (((,) (::&:@#@$###)) ())
+    data (:&:@#@$) :: forall a0123456789876543210.
+                      (~>) a0123456789876543210 ((~>) a0123456789876543210 (Foo2 a0123456789876543210))
+      where
+        (::&:@#@$###) :: forall t0123456789876543210
+                                arg. SameKind (Apply (:&:@#@$) arg) ((:&:@#@$$) arg) =>
+                         (:&:@#@$) t0123456789876543210
+    type instance Apply (:&:@#@$) t0123456789876543210 = (:&:@#@$$) t0123456789876543210
+    infixl 5 :&:@#@$
+    type MkFoo3Sym2 (t0123456789876543210 :: Bool) (t0123456789876543210 :: Bool) =
+        MkFoo3 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (MkFoo3Sym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MkFoo3Sym1KindInference) ())
+    data MkFoo3Sym1 (t0123456789876543210 :: Bool) :: (~>) Bool Foo3
+      where
+        MkFoo3Sym1KindInference :: forall t0123456789876543210
+                                          t0123456789876543210
+                                          arg. SameKind (Apply (MkFoo3Sym1 t0123456789876543210) arg) (MkFoo3Sym2 t0123456789876543210 arg) =>
+                                   MkFoo3Sym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (MkFoo3Sym1 t0123456789876543210) t0123456789876543210 = MkFoo3 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings MkFoo3Sym0 where
+      suppressUnusedWarnings = snd (((,) MkFoo3Sym0KindInference) ())
+    data MkFoo3Sym0 :: (~>) Bool ((~>) Bool Foo3)
+      where
+        MkFoo3Sym0KindInference :: forall t0123456789876543210
+                                          arg. SameKind (Apply MkFoo3Sym0 arg) (MkFoo3Sym1 arg) =>
+                                   MkFoo3Sym0 t0123456789876543210
+    type instance Apply MkFoo3Sym0 t0123456789876543210 = MkFoo3Sym1 t0123456789876543210
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Foo1) (a :: Symbol) :: Symbol where
+      ShowsPrec_0123456789876543210 _ MkFoo1 a_0123456789876543210 = Apply (Apply ShowStringSym0 "MkFoo1") a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo1) (a0123456789876543210 :: Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo1) :: (~>) Symbol Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Foo1 ((~>) Symbol Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Foo1 ((~>) Symbol Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow Foo1 where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Foo2 a) (a :: Symbol) :: Symbol where
+      ShowsPrec_0123456789876543210 p_0123456789876543210 (MkFoo2a arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "MkFoo2a ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210
+      ShowsPrec_0123456789876543210 p_0123456789876543210 (MkFoo2b argL_0123456789876543210 argR_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 5))) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argL_0123456789876543210)) (Apply (Apply (.@#@$) (Apply ShowStringSym0 " `MkFoo2b` ")) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argR_0123456789876543210)))) a_0123456789876543210
+      ShowsPrec_0123456789876543210 p_0123456789876543210 ((:*:) arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "(:*:) ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210
+      ShowsPrec_0123456789876543210 p_0123456789876543210 ((:&:) argL_0123456789876543210 argR_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 5))) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argL_0123456789876543210)) (Apply (Apply (.@#@$) (Apply ShowStringSym0 " :&: ")) (Apply (Apply ShowsPrecSym0 (FromInteger 6)) argR_0123456789876543210)))) a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo2 a0123456789876543210) (a0123456789876543210 :: Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo2 a0123456789876543210) :: (~>) Symbol Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210.
+                                                                                      (~>) (Foo2 a0123456789876543210) ((~>) Symbol Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210.
+                                              (~>) GHC.Types.Nat ((~>) (Foo2 a0123456789876543210) ((~>) Symbol Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow (Foo2 a) where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Foo3) (a :: Symbol) :: Symbol where
+      ShowsPrec_0123456789876543210 p_0123456789876543210 (MkFoo3 arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "MkFoo3 ")) (Apply (Apply (.@#@$) (Apply ShowCharSym0 "{")) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "getFoo3a = ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 0)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowCommaSpaceSym0) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "(***) = ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 0)) arg_0123456789876543210)) (Apply ShowCharSym0 "}"))))))))) a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo3) (a0123456789876543210 :: Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo3) :: (~>) Symbol Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Foo3 ((~>) Symbol Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Foo3 ((~>) Symbol Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow Foo3 where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    infixl 5 :%&:
+    infixl 5 :%*:
+    infixl 5 `SMkFoo2b`
+    data SFoo1 :: Foo1 -> GHC.Types.Type where SMkFoo1 :: SFoo1 MkFoo1
+    type instance Sing @Foo1 = SFoo1
+    instance SingKind Foo1 where
+      type Demote Foo1 = Foo1
+      fromSing SMkFoo1 = MkFoo1
+      toSing MkFoo1 = SomeSing SMkFoo1
+    data SFoo2 :: forall a. Foo2 a -> GHC.Types.Type
+      where
+        SMkFoo2a :: forall a (n :: a) (n :: a).
+                    (Sing (n :: a)) -> (Sing (n :: a)) -> SFoo2 (MkFoo2a n n)
+        SMkFoo2b :: forall a (n :: a) (n :: a).
+                    (Sing (n :: a)) -> (Sing (n :: a)) -> SFoo2 (MkFoo2b n n)
+        (:%*:) :: forall a (n :: a) (n :: a).
+                  (Sing (n :: a)) -> (Sing (n :: a)) -> SFoo2 ((:*:) n n)
+        (:%&:) :: forall a (n :: a) (n :: a).
+                  (Sing (n :: a)) -> (Sing (n :: a)) -> SFoo2 ((:&:) n n)
+    type instance Sing @(Foo2 a) = SFoo2
+    instance SingKind a => SingKind (Foo2 a) where
+      type Demote (Foo2 a) = Foo2 (Demote a)
+      fromSing (SMkFoo2a b b) = (MkFoo2a (fromSing b)) (fromSing b)
+      fromSing (SMkFoo2b b b) = (MkFoo2b (fromSing b)) (fromSing b)
+      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) }
+      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) }
+      toSing ((:*:) (b :: Demote a) (b :: Demote a))
+        = case ((,) (toSing b :: SomeSing a)) (toSing b :: SomeSing a) of {
+            (,) (SomeSing c) (SomeSing c) -> SomeSing (((:%*:) c) c) }
+      toSing ((:&:) (b :: Demote a) (b :: Demote a))
+        = case ((,) (toSing b :: SomeSing a)) (toSing b :: SomeSing a) of {
+            (,) (SomeSing c) (SomeSing c) -> SomeSing (((:%&:) c) c) }
+    data SFoo3 :: Foo3 -> GHC.Types.Type
+      where
+        SMkFoo3 :: forall (n :: Bool) (n :: Bool).
+                   {sGetFoo3a :: (Sing (n :: Bool)), %*** :: (Sing (n :: Bool))}
+                   -> SFoo3 (MkFoo3 n n)
+    type instance Sing @Foo3 = SFoo3
+    instance SingKind Foo3 where
+      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) }
+    instance SShow Foo1 where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: Foo1) (t3 :: Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) Foo1 ((~>) Symbol Symbol))
+                                                             -> GHC.Types.Type) t1) t2) t3)
+      sShowsPrec
+        _
+        SMkFoo1
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "MkFoo1")))
+            sA_0123456789876543210
+    instance SShow a => SShow (Foo2 a) where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: Foo2 a) (t3 :: Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) (Foo2 a) ((~>) Symbol Symbol))
+                                                             -> GHC.Types.Type) t1) t2) t3)
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        (SMkFoo2a (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
+                  (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (sFromInteger (sing :: Sing 10)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                          (sing :: Sing "MkFoo2a "))))
+                   ((applySing
+                       ((applySing ((singFun3 @(.@#@$)) (%.)))
+                          ((applySing
+                              ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                                 (sFromInteger (sing :: Sing 11))))
+                             sArg_0123456789876543210)))
+                      ((applySing
+                          ((applySing ((singFun3 @(.@#@$)) (%.)))
+                             ((singFun1 @ShowSpaceSym0) sShowSpace)))
+                         ((applySing
+                             ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                                (sFromInteger (sing :: Sing 11))))
+                            sArg_0123456789876543210))))))
+            sA_0123456789876543210
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        (SMkFoo2b (sArgL_0123456789876543210 :: Sing argL_0123456789876543210)
+                  (sArgR_0123456789876543210 :: Sing argR_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (sFromInteger (sing :: Sing 5)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing
+                           ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                              (sFromInteger (sing :: Sing 6))))
+                          sArgL_0123456789876543210)))
+                   ((applySing
+                       ((applySing ((singFun3 @(.@#@$)) (%.)))
+                          ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                             (sing :: Sing " `MkFoo2b` "))))
+                      ((applySing
+                          ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                             (sFromInteger (sing :: Sing 6))))
+                         sArgR_0123456789876543210)))))
+            sA_0123456789876543210
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        ((:%*:) (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
+                (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (sFromInteger (sing :: Sing 10)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                          (sing :: Sing "(:*:) "))))
+                   ((applySing
+                       ((applySing ((singFun3 @(.@#@$)) (%.)))
+                          ((applySing
+                              ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                                 (sFromInteger (sing :: Sing 11))))
+                             sArg_0123456789876543210)))
+                      ((applySing
+                          ((applySing ((singFun3 @(.@#@$)) (%.)))
+                             ((singFun1 @ShowSpaceSym0) sShowSpace)))
+                         ((applySing
+                             ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                                (sFromInteger (sing :: Sing 11))))
+                            sArg_0123456789876543210))))))
+            sA_0123456789876543210
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        ((:%&:) (sArgL_0123456789876543210 :: Sing argL_0123456789876543210)
+                (sArgR_0123456789876543210 :: Sing argR_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (sFromInteger (sing :: Sing 5)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing
+                           ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                              (sFromInteger (sing :: Sing 6))))
+                          sArgL_0123456789876543210)))
+                   ((applySing
+                       ((applySing ((singFun3 @(.@#@$)) (%.)))
+                          ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                             (sing :: Sing " :&: "))))
+                      ((applySing
+                          ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                             (sFromInteger (sing :: Sing 6))))
+                         sArgR_0123456789876543210)))))
+            sA_0123456789876543210
+    instance SShow Bool => SShow Foo3 where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: Foo3) (t3 :: Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) Foo3 ((~>) Symbol Symbol))
+                                                             -> GHC.Types.Type) t1) t2) t3)
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        (SMkFoo3 (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
+                 (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (sFromInteger (sing :: Sing 10)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                          (sing :: Sing "MkFoo3 "))))
+                   ((applySing
+                       ((applySing ((singFun3 @(.@#@$)) (%.)))
+                          ((applySing ((singFun2 @ShowCharSym0) sShowChar))
+                             (sing :: Sing "{"))))
+                      ((applySing
+                          ((applySing ((singFun3 @(.@#@$)) (%.)))
+                             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                                (sing :: Sing "getFoo3a = "))))
+                         ((applySing
+                             ((applySing ((singFun3 @(.@#@$)) (%.)))
+                                ((applySing
+                                    ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                                       (sFromInteger (sing :: Sing 0))))
+                                   sArg_0123456789876543210)))
+                            ((applySing
+                                ((applySing ((singFun3 @(.@#@$)) (%.)))
+                                   ((singFun1 @ShowCommaSpaceSym0) sShowCommaSpace)))
+                               ((applySing
+                                   ((applySing ((singFun3 @(.@#@$)) (%.)))
+                                      ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                                         (sing :: Sing "(***) = "))))
+                                  ((applySing
+                                      ((applySing ((singFun3 @(.@#@$)) (%.)))
+                                         ((applySing
+                                             ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                                                (sFromInteger (sing :: Sing 0))))
+                                            sArg_0123456789876543210)))
+                                     ((applySing ((singFun2 @ShowCharSym0) sShowChar))
+                                        (sing :: Sing "}")))))))))))
+            sA_0123456789876543210
+    instance Show (SFoo1 (z :: Foo1)) where
+      showsPrec _ SMkFoo1 = showString "SMkFoo1"
+    instance Data.Singletons.ShowSing.ShowSing a =>
+             Show (SFoo2 (z :: Foo2 a)) where
+      showsPrec
+        p_0123456789876543210
+        (SMkFoo2a (arg_0123456789876543210 :: Sing argTy_0123456789876543210)
+                  (arg_0123456789876543210 :: Sing argTy_0123456789876543210))
+        = (showParen (((>) p_0123456789876543210) 10))
+            (((.) (showString "SMkFoo2a "))
+               (((.) ((showsPrec 11) arg_0123456789876543210))
+                  (((.) GHC.Show.showSpace)
+                     ((showsPrec 11) arg_0123456789876543210)))) ::
+            (Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210,
+             Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210) =>
+            ShowS
+      showsPrec
+        p_0123456789876543210
+        (SMkFoo2b (argL_0123456789876543210 :: Sing argTyL_0123456789876543210)
+                  (argR_0123456789876543210 :: Sing argTyR_0123456789876543210))
+        = (showParen (((>) p_0123456789876543210) 9))
+            (((.) ((showsPrec 10) argL_0123456789876543210))
+               (((.) (showString " `SMkFoo2b` "))
+                  ((showsPrec 10) argR_0123456789876543210))) ::
+            (Data.Singletons.ShowSing.ShowSing' argTyL_0123456789876543210,
+             Data.Singletons.ShowSing.ShowSing' argTyR_0123456789876543210) =>
+            ShowS
+      showsPrec
+        p_0123456789876543210
+        ((:%*:) (arg_0123456789876543210 :: Sing argTy_0123456789876543210)
+                (arg_0123456789876543210 :: Sing argTy_0123456789876543210))
+        = (showParen (((>) p_0123456789876543210) 10))
+            (((.) (showString "(:%*:) "))
+               (((.) ((showsPrec 11) arg_0123456789876543210))
+                  (((.) GHC.Show.showSpace)
+                     ((showsPrec 11) arg_0123456789876543210)))) ::
+            (Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210,
+             Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210) =>
+            ShowS
+      showsPrec
+        p_0123456789876543210
+        ((:%&:) (argL_0123456789876543210 :: Sing argTyL_0123456789876543210)
+                (argR_0123456789876543210 :: Sing argTyR_0123456789876543210))
+        = (showParen (((>) p_0123456789876543210) 9))
+            (((.) ((showsPrec 10) argL_0123456789876543210))
+               (((.) (showString " :%&: "))
+                  ((showsPrec 10) argR_0123456789876543210))) ::
+            (Data.Singletons.ShowSing.ShowSing' argTyL_0123456789876543210,
+             Data.Singletons.ShowSing.ShowSing' argTyR_0123456789876543210) =>
+            ShowS
+    instance Data.Singletons.ShowSing.ShowSing Bool =>
+             Show (SFoo3 (z :: Foo3)) where
+      showsPrec
+        p_0123456789876543210
+        (SMkFoo3 (arg_0123456789876543210 :: Sing argTy_0123456789876543210)
+                 (arg_0123456789876543210 :: Sing argTy_0123456789876543210))
+        = (showParen (((>) p_0123456789876543210) 10))
+            (((.) (showString "SMkFoo3 "))
+               (((.) (showChar '{'))
+                  (((.) (showString "sGetFoo3a = "))
+                     (((.) ((showsPrec 0) arg_0123456789876543210))
+                        (((.) GHC.Show.showCommaSpace)
+                           (((.) (showString "(%***) = "))
+                              (((.) ((showsPrec 0) arg_0123456789876543210))
+                                 (showChar '}')))))))) ::
+            (Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210,
+             Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210) =>
+            ShowS
+    instance SingI MkFoo1 where
+      sing = SMkFoo1
+    instance (SingI n, SingI n) =>
+             SingI (MkFoo2a (n :: a) (n :: a)) where
+      sing = (SMkFoo2a sing) sing
+    instance SingI (MkFoo2aSym0 :: (~>) a ((~>) a (Foo2 a))) where
+      sing = (singFun2 @MkFoo2aSym0) SMkFoo2a
+    instance SingI d =>
+             SingI (MkFoo2aSym1 (d :: a) :: (~>) a (Foo2 a)) where
+      sing = (singFun1 @(MkFoo2aSym1 (d :: a))) (SMkFoo2a (sing @d))
+    instance (SingI n, SingI n) =>
+             SingI (MkFoo2b (n :: a) (n :: a)) where
+      sing = (SMkFoo2b sing) sing
+    instance SingI (MkFoo2bSym0 :: (~>) a ((~>) a (Foo2 a))) where
+      sing = (singFun2 @MkFoo2bSym0) SMkFoo2b
+    instance SingI d =>
+             SingI (MkFoo2bSym1 (d :: a) :: (~>) a (Foo2 a)) where
+      sing = (singFun1 @(MkFoo2bSym1 (d :: a))) (SMkFoo2b (sing @d))
+    instance (SingI n, SingI n) =>
+             SingI ((:*:) (n :: a) (n :: a)) where
+      sing = ((:%*:) sing) sing
+    instance SingI ((:*:@#@$) :: (~>) a ((~>) a (Foo2 a))) where
+      sing = (singFun2 @(:*:@#@$)) (:%*:)
+    instance SingI d =>
+             SingI ((:*:@#@$$) (d :: a) :: (~>) a (Foo2 a)) where
+      sing = (singFun1 @((:*:@#@$$) (d :: a))) ((:%*:) (sing @d))
+    instance (SingI n, SingI n) =>
+             SingI ((:&:) (n :: a) (n :: a)) where
+      sing = ((:%&:) sing) sing
+    instance SingI ((:&:@#@$) :: (~>) a ((~>) a (Foo2 a))) where
+      sing = (singFun2 @(:&:@#@$)) (:%&:)
+    instance SingI d =>
+             SingI ((:&:@#@$$) (d :: a) :: (~>) a (Foo2 a)) where
+      sing = (singFun1 @((:&:@#@$$) (d :: a))) ((:%&:) (sing @d))
+    instance (SingI n, SingI n) =>
+             SingI (MkFoo3 (n :: Bool) (n :: Bool)) where
+      sing = (SMkFoo3 sing) sing
+    instance SingI (MkFoo3Sym0 :: (~>) Bool ((~>) Bool Foo3)) where
+      sing = (singFun2 @MkFoo3Sym0) SMkFoo3
+    instance SingI d =>
+             SingI (MkFoo3Sym1 (d :: Bool) :: (~>) Bool Foo3) where
+      sing = (singFun1 @(MkFoo3Sym1 (d :: Bool))) (SMkFoo3 (sing @d))
diff --git a/tests/compile-and-dump/Singletons/StandaloneDeriving.ghc86.template b/tests/compile-and-dump/Singletons/StandaloneDeriving.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/StandaloneDeriving.ghc86.template
+++ /dev/null
@@ -1,447 +0,0 @@
-Singletons/StandaloneDeriving.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| infixl 6 :*:
-          
-          data T a b = a :*: b
-          data S = S1 | S2
-          
-          deriving instance Enum S
-          deriving instance Bounded S
-          deriving instance Show S
-          deriving instance Ord S
-          deriving instance Eq S
-          deriving instance Show a => Show (T a ())
-          deriving instance Ord a => Ord (T a ())
-          deriving instance Eq a => Eq (T a ()) |]
-  ======>
-    infixl 6 :*:
-    data T a b = a :*: b
-    data S = S1 | S2
-    deriving instance Eq a => Eq (T a ())
-    deriving instance Ord a => Ord (T a ())
-    deriving instance Show a => Show (T a ())
-    deriving instance Eq S
-    deriving instance Ord S
-    deriving instance Show S
-    deriving instance Bounded S
-    deriving instance Enum S
-    type (:*:@#@$$$) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) =
-        (:*:) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings ((:*:@#@$$) t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (::*:@#@$$###)) ())
-    data (:*:@#@$$) (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                      (~>) b0123456789876543210 (T a0123456789876543210 b0123456789876543210)
-      where
-        (::*:@#@$$###) :: forall t0123456789876543210
-                                 t0123456789876543210
-                                 arg. SameKind (Apply ((:*:@#@$$) t0123456789876543210) arg) ((:*:@#@$$$) t0123456789876543210 arg) =>
-                          (:*:@#@$$) t0123456789876543210 t0123456789876543210
-    type instance Apply ((:*:@#@$$) t0123456789876543210) t0123456789876543210 = (:*:) t0123456789876543210 t0123456789876543210
-    infixl 6 :*:@#@$$
-    instance SuppressUnusedWarnings (:*:@#@$) where
-      suppressUnusedWarnings = snd (((,) (::*:@#@$###)) ())
-    data (:*:@#@$) :: forall a0123456789876543210 b0123456789876543210.
-                      (~>) a0123456789876543210 ((~>) b0123456789876543210 (T a0123456789876543210 b0123456789876543210))
-      where
-        (::*:@#@$###) :: forall t0123456789876543210
-                                arg. SameKind (Apply (:*:@#@$) arg) ((:*:@#@$$) arg) =>
-                         (:*:@#@$) t0123456789876543210
-    type instance Apply (:*:@#@$) t0123456789876543210 = (:*:@#@$$) t0123456789876543210
-    infixl 6 :*:@#@$
-    type S1Sym0 = S1
-    type S2Sym0 = S2
-    type family Compare_0123456789876543210 (a :: T a ()) (a :: T a ()) :: Ordering where
-      Compare_0123456789876543210 ((:*:) a_0123456789876543210 a_0123456789876543210) ((:*:) b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))
-    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: T a0123456789876543210 ()) (a0123456789876543210 :: T a0123456789876543210 ()) =
-        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
-    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: T a0123456789876543210 ()) :: (~>) (T a0123456789876543210 ()) Ordering
-      where
-        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
-    data Compare_0123456789876543210Sym0 :: forall a0123456789876543210.
-                                            (~>) (T a0123456789876543210 ()) ((~>) (T a0123456789876543210 ()) Ordering)
-      where
-        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
-                                                        Compare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
-    instance POrd (T a ()) where
-      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: T a ()) (a :: Symbol) :: Symbol where
-      ShowsPrec_0123456789876543210 p_0123456789876543210 ((:*:) argL_0123456789876543210 argR_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 6))) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 7)) argL_0123456789876543210)) (Apply (Apply (.@#@$) (Apply ShowStringSym0 " :*: ")) (Apply (Apply ShowsPrecSym0 (FromInteger 7)) argR_0123456789876543210)))) a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: T a0123456789876543210 ()) (a0123456789876543210 :: Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: T a0123456789876543210 ()) :: (~>) Symbol Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210.
-                                                                                      (~>) (T a0123456789876543210 ()) ((~>) Symbol Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210.
-                                              (~>) GHC.Types.Nat ((~>) (T a0123456789876543210 ()) ((~>) Symbol Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow (T a ()) where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    type family Compare_0123456789876543210 (a :: S) (a :: S) :: Ordering where
-      Compare_0123456789876543210 S1 S1 = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
-      Compare_0123456789876543210 S2 S2 = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
-      Compare_0123456789876543210 S1 S2 = LTSym0
-      Compare_0123456789876543210 S2 S1 = GTSym0
-    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: S) (a0123456789876543210 :: S) =
-        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
-    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: S) :: (~>) S Ordering
-      where
-        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
-    data Compare_0123456789876543210Sym0 :: (~>) S ((~>) S Ordering)
-      where
-        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
-                                                        Compare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
-    instance POrd S where
-      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: S) (a :: Symbol) :: Symbol where
-      ShowsPrec_0123456789876543210 _ S1 a_0123456789876543210 = Apply (Apply ShowStringSym0 "S1") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ S2 a_0123456789876543210 = Apply (Apply ShowStringSym0 "S2") a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: S) (a0123456789876543210 :: Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: S) :: (~>) Symbol Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) S ((~>) Symbol Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) S ((~>) Symbol Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow S where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    type family MinBound_0123456789876543210 :: S where
-      MinBound_0123456789876543210 = S1Sym0
-    type MinBound_0123456789876543210Sym0 =
-        MinBound_0123456789876543210
-    type family MaxBound_0123456789876543210 :: S where
-      MaxBound_0123456789876543210 = S2Sym0
-    type MaxBound_0123456789876543210Sym0 =
-        MaxBound_0123456789876543210
-    instance PBounded S where
-      type MinBound = MinBound_0123456789876543210Sym0
-      type MaxBound = MaxBound_0123456789876543210Sym0
-    type family Case_0123456789876543210 n t where
-      Case_0123456789876543210 n  'True = S2Sym0
-      Case_0123456789876543210 n  'False = Apply ErrorSym0 "toEnum: bad argument"
-    type family Case_0123456789876543210 n t where
-      Case_0123456789876543210 n  'True = S1Sym0
-      Case_0123456789876543210 n  'False = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 1))
-    type family ToEnum_0123456789876543210 (a :: GHC.Types.Nat) :: S where
-      ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 0))
-    type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) =
-        ToEnum_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ())
-    data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat S
-      where
-        ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                              arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) =>
-                                                       ToEnum_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210 a0123456789876543210
-    type family FromEnum_0123456789876543210 (a :: S) :: GHC.Types.Nat where
-      FromEnum_0123456789876543210 S1 = FromInteger 0
-      FromEnum_0123456789876543210 S2 = FromInteger 1
-    type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: S) =
-        FromEnum_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ())
-    data FromEnum_0123456789876543210Sym0 :: (~>) S GHC.Types.Nat
-      where
-        FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) =>
-                                                         FromEnum_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210 a0123456789876543210
-    instance PEnum S where
-      type ToEnum a = Apply ToEnum_0123456789876543210Sym0 a
-      type FromEnum a = Apply FromEnum_0123456789876543210Sym0 a
-    type family Equals_0123456789876543210 (a :: T a ()) (b :: T a ()) :: Bool where
-      Equals_0123456789876543210 ((:*:) a a) ((:*:) b b) = (&&) ((==) a b) ((==) a b)
-      Equals_0123456789876543210 (_ :: T a ()) (_ :: T a ()) = FalseSym0
-    instance PEq (T a ()) where
-      type (==) a b = Equals_0123456789876543210 a b
-    type family Equals_0123456789876543210 (a :: S) (b :: S) :: Bool where
-      Equals_0123456789876543210 S1 S1 = TrueSym0
-      Equals_0123456789876543210 S2 S2 = TrueSym0
-      Equals_0123456789876543210 (_ :: S) (_ :: S) = FalseSym0
-    instance PEq S where
-      type (==) a b = Equals_0123456789876543210 a b
-    infixl 6 :%*:
-    data instance Sing :: T a b -> GHC.Types.Type
-      where
-        (:%*:) :: forall a b (n :: a) (n :: b).
-                  (Sing (n :: a)) -> (Sing (n :: b)) -> Sing ((:*:) n n)
-    type ST = (Sing :: T a b -> GHC.Types.Type)
-    instance (SingKind a, SingKind b) => SingKind (T a b) where
-      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) }
-    data instance Sing :: S -> GHC.Types.Type
-      where
-        SS1 :: Sing S1
-        SS2 :: Sing S2
-    type SS = (Sing :: S -> GHC.Types.Type)
-    instance SingKind S where
-      type Demote S = S
-      fromSing SS1 = S1
-      fromSing SS2 = S2
-      toSing S1 = SomeSing SS1
-      toSing S2 = SomeSing SS2
-    instance SOrd a => SOrd (T a ()) where
-      sCompare ::
-        forall (t1 :: T a ()) (t2 :: T a ()).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (CompareSym0 :: TyFun (T a ()) ((~>) (T a ()) Ordering)
-                                                 -> GHC.Types.Type) t1) t2)
-      sCompare
-        ((:%*:) (sA_0123456789876543210 :: Sing a_0123456789876543210)
-                (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        ((:%*:) (sB_0123456789876543210 :: Sing b_0123456789876543210)
-                (sB_0123456789876543210 :: Sing b_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            ((applySing
-                ((applySing ((singFun2 @(:@#@$)) SCons))
-                   ((applySing
-                       ((applySing ((singFun2 @CompareSym0) sCompare))
-                          sA_0123456789876543210))
-                      sB_0123456789876543210)))
-               ((applySing
-                   ((applySing ((singFun2 @(:@#@$)) SCons))
-                      ((applySing
-                          ((applySing ((singFun2 @CompareSym0) sCompare))
-                             sA_0123456789876543210))
-                         sB_0123456789876543210)))
-                  SNil))
-    instance SShow a => SShow (T a ()) where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: T a ()) (t3 :: Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) (T a ()) ((~>) Symbol Symbol))
-                                                             -> GHC.Types.Type) t1) t2) t3)
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        ((:%*:) (sArgL_0123456789876543210 :: Sing argL_0123456789876543210)
-                (sArgR_0123456789876543210 :: Sing argR_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (sFromInteger (sing :: Sing 6)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing
-                           ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                              (sFromInteger (sing :: Sing 7))))
-                          sArgL_0123456789876543210)))
-                   ((applySing
-                       ((applySing ((singFun3 @(.@#@$)) (%.)))
-                          ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                             (sing :: Sing " :*: "))))
-                      ((applySing
-                          ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                             (sFromInteger (sing :: Sing 7))))
-                         sArgR_0123456789876543210)))))
-            sA_0123456789876543210
-    instance SOrd S where
-      sCompare ::
-        forall (t1 :: S) (t2 :: S).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (CompareSym0 :: TyFun S ((~>) S Ordering)
-                                                 -> GHC.Types.Type) t1) t2)
-      sCompare SS1 SS1
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            SNil
-      sCompare SS2 SS2
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            SNil
-      sCompare SS1 SS2 = SLT
-      sCompare SS2 SS1 = SGT
-    instance SShow S where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: S) (t3 :: Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) S ((~>) Symbol Symbol))
-                                                             -> GHC.Types.Type) t1) t2) t3)
-      sShowsPrec
-        _
-        SS1
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "S1")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SS2
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "S2")))
-            sA_0123456789876543210
-    instance SBounded S where
-      sMinBound :: Sing (MinBoundSym0 :: S)
-      sMaxBound :: Sing (MaxBoundSym0 :: S)
-      sMinBound = SS1
-      sMaxBound = SS2
-    instance SEnum S where
-      sToEnum ::
-        forall (t :: GHC.Types.Nat).
-        Sing t
-        -> Sing (Apply (ToEnumSym0 :: TyFun GHC.Types.Nat S
-                                      -> GHC.Types.Type) t)
-      sFromEnum ::
-        forall (t :: S).
-        Sing t
-        -> Sing (Apply (FromEnumSym0 :: TyFun S GHC.Types.Nat
-                                        -> GHC.Types.Type) t)
-      sToEnum (sN :: Sing n)
-        = (case
-               (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sN))
-                 (sFromInteger (sing :: Sing 0))
-           of
-             STrue -> SS1
-             SFalse
-               -> (case
-                       (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sN))
-                         (sFromInteger (sing :: Sing 1))
-                   of
-                     STrue -> SS2
-                     SFalse -> sError (sing :: Sing "toEnum: bad argument")) ::
-                    Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 1)))) ::
-            Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 0)))
-      sFromEnum SS1 = sFromInteger (sing :: Sing 0)
-      sFromEnum SS2 = sFromInteger (sing :: Sing 1)
-    instance SEq a => SEq (T a ()) where
-      (%==) ((:%*:) a a) ((:%*:) b b)
-        = ((%&&) (((%==) a) b)) (((%==) a) b)
-    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 })
-    instance SEq S where
-      (%==) SS1 SS1 = STrue
-      (%==) SS1 SS2 = SFalse
-      (%==) SS2 SS1 = SFalse
-      (%==) SS2 SS2 = STrue
-    instance SDecide S where
-      (%~) SS1 SS1 = Proved Refl
-      (%~) SS1 SS2 = Disproved (\ x -> case x of)
-      (%~) SS2 SS1 = Disproved (\ x -> case x of)
-      (%~) SS2 SS2 = Proved Refl
-    deriving instance Data.Singletons.ShowSing.ShowSing a =>
-                      Show (Sing (z :: T a ()))
-    deriving instance Show (Sing (z :: S))
-    instance (SingI n, SingI n) =>
-             SingI ((:*:) (n :: a) (n :: b)) where
-      sing = ((:%*:) sing) sing
-    instance SingI ((:*:@#@$) :: (~>) a ((~>) b (T a b))) where
-      sing = (singFun2 @(:*:@#@$)) (:%*:)
-    instance SingI (TyCon2 (:*:) :: (~>) a ((~>) b (T a b))) where
-      sing = (singFun2 @(TyCon2 (:*:))) (:%*:)
-    instance SingI d =>
-             SingI ((:*:@#@$$) (d :: a) :: (~>) b (T a b)) where
-      sing = (singFun1 @((:*:@#@$$) (d :: a))) ((:%*:) (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 ((:*:) (d :: a)) :: (~>) b (T a b)) where
-      sing = (singFun1 @(TyCon1 ((:*:) (d :: a)))) ((:%*:) (sing @d))
-    instance SingI S1 where
-      sing = SS1
-    instance SingI S2 where
-      sing = SS2
diff --git a/tests/compile-and-dump/Singletons/StandaloneDeriving.ghc88.template b/tests/compile-and-dump/Singletons/StandaloneDeriving.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/StandaloneDeriving.ghc88.template
@@ -0,0 +1,475 @@
+Singletons/StandaloneDeriving.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| infixl 6 :*:
+          
+          data T a b = a :*: b
+          data S = S1 | S2
+          
+          deriving instance Enum S
+          deriving instance Bounded S
+          deriving instance Show S
+          deriving instance Ord S
+          deriving instance Eq S
+          deriving instance Show a => Show (T a ())
+          deriving instance Ord a => Ord (T a ())
+          deriving instance Eq a => Eq (T a ()) |]
+  ======>
+    infixl 6 :*:
+    data T a b = a :*: b
+    data S = S1 | S2
+    deriving instance Eq a => Eq (T a ())
+    deriving instance Ord a => Ord (T a ())
+    deriving instance Show a => Show (T a ())
+    deriving instance Eq S
+    deriving instance Ord S
+    deriving instance Show S
+    deriving instance Bounded S
+    deriving instance Enum S
+    type (:*:@#@$$$) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) =
+        (:*:) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings ((:*:@#@$$) t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (::*:@#@$$###)) ())
+    data (:*:@#@$$) (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                      (~>) b0123456789876543210 (T a0123456789876543210 b0123456789876543210)
+      where
+        (::*:@#@$$###) :: forall t0123456789876543210
+                                 t0123456789876543210
+                                 arg. SameKind (Apply ((:*:@#@$$) t0123456789876543210) arg) ((:*:@#@$$$) t0123456789876543210 arg) =>
+                          (:*:@#@$$) t0123456789876543210 t0123456789876543210
+    type instance Apply ((:*:@#@$$) t0123456789876543210) t0123456789876543210 = (:*:) t0123456789876543210 t0123456789876543210
+    infixl 6 :*:@#@$$
+    instance SuppressUnusedWarnings (:*:@#@$) where
+      suppressUnusedWarnings = snd (((,) (::*:@#@$###)) ())
+    data (:*:@#@$) :: forall a0123456789876543210 b0123456789876543210.
+                      (~>) a0123456789876543210 ((~>) b0123456789876543210 (T a0123456789876543210 b0123456789876543210))
+      where
+        (::*:@#@$###) :: forall t0123456789876543210
+                                arg. SameKind (Apply (:*:@#@$) arg) ((:*:@#@$$) arg) =>
+                         (:*:@#@$) t0123456789876543210
+    type instance Apply (:*:@#@$) t0123456789876543210 = (:*:@#@$$) t0123456789876543210
+    infixl 6 :*:@#@$
+    type S1Sym0 = S1
+    type S2Sym0 = S2
+    type family Compare_0123456789876543210 (a :: T a ()) (a :: T a ()) :: Ordering where
+      Compare_0123456789876543210 ((:*:) a_0123456789876543210 a_0123456789876543210) ((:*:) b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))
+    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: T a0123456789876543210 ()) (a0123456789876543210 :: T a0123456789876543210 ()) =
+        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
+    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: T a0123456789876543210 ()) :: (~>) (T a0123456789876543210 ()) Ordering
+      where
+        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
+    data Compare_0123456789876543210Sym0 :: forall a0123456789876543210.
+                                            (~>) (T a0123456789876543210 ()) ((~>) (T a0123456789876543210 ()) Ordering)
+      where
+        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
+                                                        Compare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
+    instance POrd (T a ()) where
+      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: T a ()) (a :: Symbol) :: Symbol where
+      ShowsPrec_0123456789876543210 p_0123456789876543210 ((:*:) argL_0123456789876543210 argR_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 6))) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 7)) argL_0123456789876543210)) (Apply (Apply (.@#@$) (Apply ShowStringSym0 " :*: ")) (Apply (Apply ShowsPrecSym0 (FromInteger 7)) argR_0123456789876543210)))) a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: T a0123456789876543210 ()) (a0123456789876543210 :: Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: T a0123456789876543210 ()) :: (~>) Symbol Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210.
+                                                                                      (~>) (T a0123456789876543210 ()) ((~>) Symbol Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210.
+                                              (~>) GHC.Types.Nat ((~>) (T a0123456789876543210 ()) ((~>) Symbol Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow (T a ()) where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    type family Compare_0123456789876543210 (a :: S) (a :: S) :: Ordering where
+      Compare_0123456789876543210 S1 S1 = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
+      Compare_0123456789876543210 S2 S2 = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
+      Compare_0123456789876543210 S1 S2 = LTSym0
+      Compare_0123456789876543210 S2 S1 = GTSym0
+    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: S) (a0123456789876543210 :: S) =
+        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
+    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: S) :: (~>) S Ordering
+      where
+        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
+    data Compare_0123456789876543210Sym0 :: (~>) S ((~>) S Ordering)
+      where
+        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
+                                                        Compare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
+    instance POrd S where
+      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: S) (a :: Symbol) :: Symbol where
+      ShowsPrec_0123456789876543210 _ S1 a_0123456789876543210 = Apply (Apply ShowStringSym0 "S1") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ S2 a_0123456789876543210 = Apply (Apply ShowStringSym0 "S2") a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: S) (a0123456789876543210 :: Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: S) :: (~>) Symbol Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) S ((~>) Symbol Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) S ((~>) Symbol Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow S where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    type family MinBound_0123456789876543210 :: S where
+      MinBound_0123456789876543210 = S1Sym0
+    type MinBound_0123456789876543210Sym0 =
+        MinBound_0123456789876543210
+    type family MaxBound_0123456789876543210 :: S where
+      MaxBound_0123456789876543210 = S2Sym0
+    type MaxBound_0123456789876543210Sym0 =
+        MaxBound_0123456789876543210
+    instance PBounded S where
+      type MinBound = MinBound_0123456789876543210Sym0
+      type MaxBound = MaxBound_0123456789876543210Sym0
+    type family Case_0123456789876543210 n t where
+      Case_0123456789876543210 n 'True = S2Sym0
+      Case_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument"
+    type family Case_0123456789876543210 n t where
+      Case_0123456789876543210 n 'True = S1Sym0
+      Case_0123456789876543210 n 'False = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 1))
+    type family ToEnum_0123456789876543210 (a :: GHC.Types.Nat) :: S where
+      ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 0))
+    type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) =
+        ToEnum_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ())
+    data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat S
+      where
+        ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                              arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) =>
+                                                       ToEnum_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210 a0123456789876543210
+    type family FromEnum_0123456789876543210 (a :: S) :: GHC.Types.Nat where
+      FromEnum_0123456789876543210 S1 = FromInteger 0
+      FromEnum_0123456789876543210 S2 = FromInteger 1
+    type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: S) =
+        FromEnum_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ())
+    data FromEnum_0123456789876543210Sym0 :: (~>) S GHC.Types.Nat
+      where
+        FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) =>
+                                                         FromEnum_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210 a0123456789876543210
+    instance PEnum S where
+      type ToEnum a = Apply ToEnum_0123456789876543210Sym0 a
+      type FromEnum a = Apply FromEnum_0123456789876543210Sym0 a
+    type family Equals_0123456789876543210 (a :: T a ()) (b :: T a ()) :: Bool where
+      Equals_0123456789876543210 ((:*:) a a) ((:*:) b b) = (&&) ((==) a b) ((==) a b)
+      Equals_0123456789876543210 (_ :: T a ()) (_ :: T a ()) = FalseSym0
+    instance PEq (T a ()) where
+      type (==) a b = Equals_0123456789876543210 a b
+    type family Equals_0123456789876543210 (a :: S) (b :: S) :: Bool where
+      Equals_0123456789876543210 S1 S1 = TrueSym0
+      Equals_0123456789876543210 S2 S2 = TrueSym0
+      Equals_0123456789876543210 (_ :: S) (_ :: S) = FalseSym0
+    instance PEq S where
+      type (==) a b = Equals_0123456789876543210 a b
+    infixl 6 :%*:
+    data ST :: forall a b. T a b -> GHC.Types.Type
+      where
+        (:%*:) :: forall a b (n :: a) (n :: b).
+                  (Sing (n :: a)) -> (Sing (n :: b)) -> ST ((:*:) n n)
+    type instance Sing @(T a b) = ST
+    instance (SingKind a, SingKind b) => SingKind (T a b) where
+      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) }
+    data SS :: S -> GHC.Types.Type
+      where
+        SS1 :: SS S1
+        SS2 :: SS S2
+    type instance Sing @S = SS
+    instance SingKind S where
+      type Demote S = S
+      fromSing SS1 = S1
+      fromSing SS2 = S2
+      toSing S1 = SomeSing SS1
+      toSing S2 = SomeSing SS2
+    instance SOrd a => SOrd (T a ()) where
+      sCompare ::
+        forall (t1 :: T a ()) (t2 :: T a ()).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (CompareSym0 :: TyFun (T a ()) ((~>) (T a ()) Ordering)
+                                                 -> GHC.Types.Type) t1) t2)
+      sCompare
+        ((:%*:) (sA_0123456789876543210 :: Sing a_0123456789876543210)
+                (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        ((:%*:) (sB_0123456789876543210 :: Sing b_0123456789876543210)
+                (sB_0123456789876543210 :: Sing b_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            ((applySing
+                ((applySing ((singFun2 @(:@#@$)) SCons))
+                   ((applySing
+                       ((applySing ((singFun2 @CompareSym0) sCompare))
+                          sA_0123456789876543210))
+                      sB_0123456789876543210)))
+               ((applySing
+                   ((applySing ((singFun2 @(:@#@$)) SCons))
+                      ((applySing
+                          ((applySing ((singFun2 @CompareSym0) sCompare))
+                             sA_0123456789876543210))
+                         sB_0123456789876543210)))
+                  SNil))
+    instance SShow a => SShow (T a ()) where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: T a ()) (t3 :: Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) (T a ()) ((~>) Symbol Symbol))
+                                                             -> GHC.Types.Type) t1) t2) t3)
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        ((:%*:) (sArgL_0123456789876543210 :: Sing argL_0123456789876543210)
+                (sArgR_0123456789876543210 :: Sing argR_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (sFromInteger (sing :: Sing 6)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing
+                           ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                              (sFromInteger (sing :: Sing 7))))
+                          sArgL_0123456789876543210)))
+                   ((applySing
+                       ((applySing ((singFun3 @(.@#@$)) (%.)))
+                          ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                             (sing :: Sing " :*: "))))
+                      ((applySing
+                          ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                             (sFromInteger (sing :: Sing 7))))
+                         sArgR_0123456789876543210)))))
+            sA_0123456789876543210
+    instance SOrd S where
+      sCompare ::
+        forall (t1 :: S) (t2 :: S).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (CompareSym0 :: TyFun S ((~>) S Ordering)
+                                                 -> GHC.Types.Type) t1) t2)
+      sCompare SS1 SS1
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            SNil
+      sCompare SS2 SS2
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            SNil
+      sCompare SS1 SS2 = SLT
+      sCompare SS2 SS1 = SGT
+    instance SShow S where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: S) (t3 :: Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) S ((~>) Symbol Symbol))
+                                                             -> GHC.Types.Type) t1) t2) t3)
+      sShowsPrec
+        _
+        SS1
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "S1")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SS2
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "S2")))
+            sA_0123456789876543210
+    instance SBounded S where
+      sMinBound :: Sing (MinBoundSym0 :: S)
+      sMaxBound :: Sing (MaxBoundSym0 :: S)
+      sMinBound = SS1
+      sMaxBound = SS2
+    instance SEnum S where
+      sToEnum ::
+        forall (t :: GHC.Types.Nat).
+        Sing t
+        -> Sing (Apply (ToEnumSym0 :: TyFun GHC.Types.Nat S
+                                      -> GHC.Types.Type) t)
+      sFromEnum ::
+        forall (t :: S).
+        Sing t
+        -> Sing (Apply (FromEnumSym0 :: TyFun S GHC.Types.Nat
+                                        -> GHC.Types.Type) t)
+      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 -> sError (sing :: Sing "toEnum: bad argument")))
+      sFromEnum SS1 = sFromInteger (sing :: Sing 0)
+      sFromEnum SS2 = sFromInteger (sing :: Sing 1)
+    instance SEq a => SEq (T a ()) where
+      (%==) ((:%*:) a a) ((:%*:) b b)
+        = ((%&&) (((%==) a) b)) (((%==) a) b)
+    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 })
+    instance SDecide a =>
+             Data.Type.Equality.TestEquality (ST :: T a ()
+                                                    -> GHC.Types.Type) where
+      Data.Type.Equality.testEquality
+        = Data.Singletons.Decide.decideEquality
+    instance SDecide a =>
+             Data.Type.Coercion.TestCoercion (ST :: T a ()
+                                                    -> GHC.Types.Type) where
+      Data.Type.Coercion.testCoercion
+        = Data.Singletons.Decide.decideCoercion
+    instance SEq S where
+      (%==) SS1 SS1 = STrue
+      (%==) SS1 SS2 = SFalse
+      (%==) SS2 SS1 = SFalse
+      (%==) SS2 SS2 = STrue
+    instance SDecide S where
+      (%~) SS1 SS1 = Proved Refl
+      (%~) SS1 SS2 = Disproved (\ x -> case x of)
+      (%~) SS2 SS1 = Disproved (\ x -> case x of)
+      (%~) SS2 SS2 = Proved Refl
+    instance Data.Type.Equality.TestEquality (SS :: S
+                                                    -> GHC.Types.Type) where
+      Data.Type.Equality.testEquality
+        = Data.Singletons.Decide.decideEquality
+    instance Data.Type.Coercion.TestCoercion (SS :: S
+                                                    -> GHC.Types.Type) where
+      Data.Type.Coercion.testCoercion
+        = Data.Singletons.Decide.decideCoercion
+    instance Data.Singletons.ShowSing.ShowSing a =>
+             Show (ST (z :: T a ())) where
+      showsPrec
+        p_0123456789876543210
+        ((:%*:) (argL_0123456789876543210 :: Sing argTyL_0123456789876543210)
+                (argR_0123456789876543210 :: Sing argTyR_0123456789876543210))
+        = (showParen (((>) p_0123456789876543210) 9))
+            (((.) ((showsPrec 10) argL_0123456789876543210))
+               (((.) (showString " :%*: "))
+                  ((showsPrec 10) argR_0123456789876543210))) ::
+            (Data.Singletons.ShowSing.ShowSing' argTyL_0123456789876543210,
+             Data.Singletons.ShowSing.ShowSing' argTyR_0123456789876543210) =>
+            ShowS
+    instance Show (SS (z :: S)) where
+      showsPrec _ SS1 = showString "SS1"
+      showsPrec _ SS2 = showString "SS2"
+    instance (SingI n, SingI n) =>
+             SingI ((:*:) (n :: a) (n :: b)) where
+      sing = ((:%*:) sing) sing
+    instance SingI ((:*:@#@$) :: (~>) a ((~>) b (T a b))) where
+      sing = (singFun2 @(:*:@#@$)) (:%*:)
+    instance SingI d =>
+             SingI ((:*:@#@$$) (d :: a) :: (~>) b (T a b)) where
+      sing = (singFun1 @((:*:@#@$$) (d :: a))) ((:%*:) (sing @d))
+    instance SingI S1 where
+      sing = SS1
+    instance SingI S2 where
+      sing = SS2
diff --git a/tests/compile-and-dump/Singletons/Star.ghc86.template b/tests/compile-and-dump/Singletons/Star.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/Star.ghc86.template
+++ /dev/null
@@ -1,422 +0,0 @@
-Singletons/Star.hs:0:0:: Splicing declarations
-    singletonStar [''Nat, ''Int, ''String, ''Maybe, ''Vec]
-  ======>
-    data Rep :: Type
-      where
-        Singletons.Star.Nat :: Rep
-        Singletons.Star.Int :: Rep
-        Singletons.Star.String :: Rep
-        Singletons.Star.Maybe :: Rep -> Rep
-        Singletons.Star.Vec :: Rep -> Nat -> Rep
-      deriving (Eq, Ord, Read, Show)
-    type NatSym0 = Nat
-    type IntSym0 = Int
-    type StringSym0 = String
-    type MaybeSym1 (t0123456789876543210 :: Type) =
-        Maybe t0123456789876543210
-    instance SuppressUnusedWarnings MaybeSym0 where
-      suppressUnusedWarnings = snd (((,) MaybeSym0KindInference) ())
-    data MaybeSym0 :: (~>) Type Type
-      where
-        MaybeSym0KindInference :: forall t0123456789876543210
-                                         arg. SameKind (Apply MaybeSym0 arg) (MaybeSym1 arg) =>
-                                  MaybeSym0 t0123456789876543210
-    type instance Apply MaybeSym0 t0123456789876543210 = Maybe t0123456789876543210
-    type VecSym2 (t0123456789876543210 :: Type) (t0123456789876543210 :: Nat) =
-        Vec t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (VecSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) VecSym1KindInference) ())
-    data VecSym1 (t0123456789876543210 :: Type) :: (~>) Nat Type
-      where
-        VecSym1KindInference :: forall t0123456789876543210
-                                       t0123456789876543210
-                                       arg. SameKind (Apply (VecSym1 t0123456789876543210) arg) (VecSym2 t0123456789876543210 arg) =>
-                                VecSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (VecSym1 t0123456789876543210) t0123456789876543210 = Vec t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings VecSym0 where
-      suppressUnusedWarnings = snd (((,) VecSym0KindInference) ())
-    data VecSym0 :: (~>) Type ((~>) Nat Type)
-      where
-        VecSym0KindInference :: forall t0123456789876543210
-                                       arg. SameKind (Apply VecSym0 arg) (VecSym1 arg) =>
-                                VecSym0 t0123456789876543210
-    type instance Apply VecSym0 t0123456789876543210 = VecSym1 t0123456789876543210
-    type family Equals_0123456789876543210 (a :: Type) (b :: Type) :: Bool where
-      Equals_0123456789876543210 Nat Nat = TrueSym0
-      Equals_0123456789876543210 Int Int = TrueSym0
-      Equals_0123456789876543210 String String = TrueSym0
-      Equals_0123456789876543210 (Maybe a) (Maybe b) = (==) a b
-      Equals_0123456789876543210 (Vec a a) (Vec b b) = (&&) ((==) a b) ((==) a b)
-      Equals_0123456789876543210 (_ :: Type) (_ :: Type) = FalseSym0
-    instance PEq Type where
-      type (==) a b = Equals_0123456789876543210 a b
-    type family Compare_0123456789876543210 (a :: Type) (a :: Type) :: Ordering where
-      Compare_0123456789876543210 Nat Nat = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
-      Compare_0123456789876543210 Int Int = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
-      Compare_0123456789876543210 String String = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
-      Compare_0123456789876543210 (Maybe a_0123456789876543210) (Maybe b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])
-      Compare_0123456789876543210 (Vec a_0123456789876543210 a_0123456789876543210) (Vec b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))
-      Compare_0123456789876543210 Nat Int = LTSym0
-      Compare_0123456789876543210 Nat String = LTSym0
-      Compare_0123456789876543210 Nat (Maybe _) = LTSym0
-      Compare_0123456789876543210 Nat (Vec _ _) = LTSym0
-      Compare_0123456789876543210 Int Nat = GTSym0
-      Compare_0123456789876543210 Int String = LTSym0
-      Compare_0123456789876543210 Int (Maybe _) = LTSym0
-      Compare_0123456789876543210 Int (Vec _ _) = LTSym0
-      Compare_0123456789876543210 String Nat = GTSym0
-      Compare_0123456789876543210 String Int = GTSym0
-      Compare_0123456789876543210 String (Maybe _) = LTSym0
-      Compare_0123456789876543210 String (Vec _ _) = LTSym0
-      Compare_0123456789876543210 (Maybe _) Nat = GTSym0
-      Compare_0123456789876543210 (Maybe _) Int = GTSym0
-      Compare_0123456789876543210 (Maybe _) String = GTSym0
-      Compare_0123456789876543210 (Maybe _) (Vec _ _) = LTSym0
-      Compare_0123456789876543210 (Vec _ _) Nat = GTSym0
-      Compare_0123456789876543210 (Vec _ _) Int = GTSym0
-      Compare_0123456789876543210 (Vec _ _) String = GTSym0
-      Compare_0123456789876543210 (Vec _ _) (Maybe _) = GTSym0
-    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Type) (a0123456789876543210 :: Type) =
-        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
-    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Type) :: (~>) Type Ordering
-      where
-        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
-    data Compare_0123456789876543210Sym0 :: (~>) Type ((~>) Type Ordering)
-      where
-        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
-                                                        Compare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
-    instance POrd Type where
-      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Type) (a :: Symbol) :: Symbol where
-      ShowsPrec_0123456789876543210 _ Nat a_0123456789876543210 = Apply (Apply ShowStringSym0 "Nat") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ Int a_0123456789876543210 = Apply (Apply ShowStringSym0 "Int") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ String a_0123456789876543210 = Apply (Apply ShowStringSym0 "String") a_0123456789876543210
-      ShowsPrec_0123456789876543210 p_0123456789876543210 (Maybe arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Maybe ")) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210
-      ShowsPrec_0123456789876543210 p_0123456789876543210 (Vec arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Vec ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Type) (a0123456789876543210 :: Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Type) :: (~>) Symbol Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Type ((~>) Symbol Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Type ((~>) Symbol Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow Type where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    data instance Sing :: Type -> Type
-      where
-        SNat :: Sing Nat
-        SInt :: Sing Int
-        SString :: Sing String
-        SMaybe :: forall (n :: Type). (Sing (n :: Type)) -> Sing (Maybe n)
-        SVec :: forall (n :: Type) (n :: Nat).
-                (Sing (n :: Type)) -> (Sing (n :: Nat)) -> Sing (Vec n n)
-    type SRep = (Sing :: Type -> Type)
-    instance SingKind Type where
-      type Demote Type = Rep
-      fromSing SNat = Singletons.Star.Nat
-      fromSing SInt = Singletons.Star.Int
-      fromSing SString = Singletons.Star.String
-      fromSing (SMaybe b) = Singletons.Star.Maybe (fromSing b)
-      fromSing (SVec b b)
-        = (Singletons.Star.Vec (fromSing b)) (fromSing b)
-      toSing Singletons.Star.Nat = SomeSing SNat
-      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) }
-      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) }
-    instance (SEq Type, SEq Nat) => SEq Type where
-      (%==) SNat SNat = STrue
-      (%==) SNat SInt = SFalse
-      (%==) SNat SString = SFalse
-      (%==) SNat (SMaybe _) = SFalse
-      (%==) SNat (SVec _ _) = SFalse
-      (%==) SInt SNat = SFalse
-      (%==) SInt SInt = STrue
-      (%==) SInt SString = SFalse
-      (%==) SInt (SMaybe _) = SFalse
-      (%==) SInt (SVec _ _) = SFalse
-      (%==) SString SNat = SFalse
-      (%==) SString SInt = SFalse
-      (%==) SString SString = STrue
-      (%==) SString (SMaybe _) = SFalse
-      (%==) SString (SVec _ _) = SFalse
-      (%==) (SMaybe _) SNat = SFalse
-      (%==) (SMaybe _) SInt = SFalse
-      (%==) (SMaybe _) SString = SFalse
-      (%==) (SMaybe a) (SMaybe b) = ((%==) a) b
-      (%==) (SMaybe _) (SVec _ _) = SFalse
-      (%==) (SVec _ _) SNat = SFalse
-      (%==) (SVec _ _) SInt = SFalse
-      (%==) (SVec _ _) SString = SFalse
-      (%==) (SVec _ _) (SMaybe _) = SFalse
-      (%==) (SVec a a) (SVec b b) = ((%&&) (((%==) a) b)) (((%==) a) b)
-    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)
-      (%~) 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)
-      (%~) 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)
-      (%~) (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)
-      (%~) (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 })
-    instance (SOrd Type, SOrd Nat) => SOrd Type where
-      sCompare ::
-        forall (t1 :: Type) (t2 :: Type).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (CompareSym0 :: TyFun Type ((~>) Type Ordering)
-                                                 -> Type) t1) t2)
-      sCompare SNat SNat
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            SNil
-      sCompare SInt SInt
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            SNil
-      sCompare SString SString
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            SNil
-      sCompare
-        (SMaybe (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        (SMaybe (sB_0123456789876543210 :: Sing b_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            ((applySing
-                ((applySing ((singFun2 @(:@#@$)) SCons))
-                   ((applySing
-                       ((applySing ((singFun2 @CompareSym0) sCompare))
-                          sA_0123456789876543210))
-                      sB_0123456789876543210)))
-               SNil)
-      sCompare
-        (SVec (sA_0123456789876543210 :: Sing a_0123456789876543210)
-              (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        (SVec (sB_0123456789876543210 :: Sing b_0123456789876543210)
-              (sB_0123456789876543210 :: Sing b_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            ((applySing
-                ((applySing ((singFun2 @(:@#@$)) SCons))
-                   ((applySing
-                       ((applySing ((singFun2 @CompareSym0) sCompare))
-                          sA_0123456789876543210))
-                      sB_0123456789876543210)))
-               ((applySing
-                   ((applySing ((singFun2 @(:@#@$)) SCons))
-                      ((applySing
-                          ((applySing ((singFun2 @CompareSym0) sCompare))
-                             sA_0123456789876543210))
-                         sB_0123456789876543210)))
-                  SNil))
-      sCompare SNat SInt = SLT
-      sCompare SNat SString = SLT
-      sCompare SNat (SMaybe _) = SLT
-      sCompare SNat (SVec _ _) = SLT
-      sCompare SInt SNat = SGT
-      sCompare SInt SString = SLT
-      sCompare SInt (SMaybe _) = SLT
-      sCompare SInt (SVec _ _) = SLT
-      sCompare SString SNat = SGT
-      sCompare SString SInt = SGT
-      sCompare SString (SMaybe _) = SLT
-      sCompare SString (SVec _ _) = SLT
-      sCompare (SMaybe _) SNat = SGT
-      sCompare (SMaybe _) SInt = SGT
-      sCompare (SMaybe _) SString = SGT
-      sCompare (SMaybe _) (SVec _ _) = SLT
-      sCompare (SVec _ _) SNat = SGT
-      sCompare (SVec _ _) SInt = SGT
-      sCompare (SVec _ _) SString = SGT
-      sCompare (SVec _ _) (SMaybe _) = SGT
-    instance (SShow Type, SShow Nat) => SShow Type where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: Type) (t3 :: Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) Type ((~>) Symbol Symbol))
-                                                             -> Type) t1) t2) t3)
-      sShowsPrec
-        _
-        SNat
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "Nat")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SInt
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "Int")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SString
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "String")))
-            sA_0123456789876543210
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        (SMaybe (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (sFromInteger (sing :: Sing 10)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                          (sing :: Sing "Maybe "))))
-                   ((applySing
-                       ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                          (sFromInteger (sing :: Sing 11))))
-                      sArg_0123456789876543210))))
-            sA_0123456789876543210
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        (SVec (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
-              (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (sFromInteger (sing :: Sing 10)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                          (sing :: Sing "Vec "))))
-                   ((applySing
-                       ((applySing ((singFun3 @(.@#@$)) (%.)))
-                          ((applySing
-                              ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                                 (sFromInteger (sing :: Sing 11))))
-                             sArg_0123456789876543210)))
-                      ((applySing
-                          ((applySing ((singFun3 @(.@#@$)) (%.)))
-                             ((singFun1 @ShowSpaceSym0) sShowSpace)))
-                         ((applySing
-                             ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                                (sFromInteger (sing :: Sing 11))))
-                            sArg_0123456789876543210))))))
-            sA_0123456789876543210
-    instance SingI Nat where
-      sing = SNat
-    instance SingI Int where
-      sing = SInt
-    instance SingI String where
-      sing = SString
-    instance SingI n => SingI (Maybe (n :: Type)) where
-      sing = SMaybe sing
-    instance SingI (MaybeSym0 :: (~>) Type Type) where
-      sing = (singFun1 @MaybeSym0) SMaybe
-    instance SingI (TyCon1 Maybe :: (~>) Type Type) where
-      sing = (singFun1 @(TyCon1 Maybe)) SMaybe
-    instance (SingI n, SingI n) =>
-             SingI (Vec (n :: Type) (n :: Nat)) where
-      sing = (SVec sing) sing
-    instance SingI (VecSym0 :: (~>) Type ((~>) Nat Type)) where
-      sing = (singFun2 @VecSym0) SVec
-    instance SingI (TyCon2 Vec :: (~>) Type ((~>) Nat Type)) where
-      sing = (singFun2 @(TyCon2 Vec)) SVec
-    instance SingI d =>
-             SingI (VecSym1 (d :: Type) :: (~>) Nat Type) where
-      sing = (singFun1 @(VecSym1 (d :: Type))) (SVec (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 (Vec (d :: Type)) :: (~>) Nat Type) where
-      sing = (singFun1 @(TyCon1 (Vec (d :: Type)))) (SVec (sing @d))
diff --git a/tests/compile-and-dump/Singletons/Star.ghc88.template b/tests/compile-and-dump/Singletons/Star.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/Star.ghc88.template
@@ -0,0 +1,421 @@
+Singletons/Star.hs:0:0:: Splicing declarations
+    singletonStar [''Nat, ''Int, ''String, ''Maybe, ''Vec]
+  ======>
+    data Rep :: Type
+      where
+        Singletons.Star.Nat :: Rep
+        Singletons.Star.Int :: Rep
+        Singletons.Star.String :: Rep
+        Singletons.Star.Maybe :: Rep -> Rep
+        Singletons.Star.Vec :: Rep -> Nat -> Rep
+      deriving (Eq, Ord, Read, Show)
+    type NatSym0 = Nat
+    type IntSym0 = Int
+    type StringSym0 = String
+    type MaybeSym1 (t0123456789876543210 :: Type) =
+        Maybe t0123456789876543210
+    instance SuppressUnusedWarnings MaybeSym0 where
+      suppressUnusedWarnings = snd (((,) MaybeSym0KindInference) ())
+    data MaybeSym0 :: (~>) Type Type
+      where
+        MaybeSym0KindInference :: forall t0123456789876543210
+                                         arg. SameKind (Apply MaybeSym0 arg) (MaybeSym1 arg) =>
+                                  MaybeSym0 t0123456789876543210
+    type instance Apply MaybeSym0 t0123456789876543210 = Maybe t0123456789876543210
+    type VecSym2 (t0123456789876543210 :: Type) (t0123456789876543210 :: Nat) =
+        Vec t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (VecSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) VecSym1KindInference) ())
+    data VecSym1 (t0123456789876543210 :: Type) :: (~>) Nat Type
+      where
+        VecSym1KindInference :: forall t0123456789876543210
+                                       t0123456789876543210
+                                       arg. SameKind (Apply (VecSym1 t0123456789876543210) arg) (VecSym2 t0123456789876543210 arg) =>
+                                VecSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (VecSym1 t0123456789876543210) t0123456789876543210 = Vec t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings VecSym0 where
+      suppressUnusedWarnings = snd (((,) VecSym0KindInference) ())
+    data VecSym0 :: (~>) Type ((~>) Nat Type)
+      where
+        VecSym0KindInference :: forall t0123456789876543210
+                                       arg. SameKind (Apply VecSym0 arg) (VecSym1 arg) =>
+                                VecSym0 t0123456789876543210
+    type instance Apply VecSym0 t0123456789876543210 = VecSym1 t0123456789876543210
+    type family Equals_0123456789876543210 (a :: Type) (b :: Type) :: Bool where
+      Equals_0123456789876543210 Nat Nat = TrueSym0
+      Equals_0123456789876543210 Int Int = TrueSym0
+      Equals_0123456789876543210 String String = TrueSym0
+      Equals_0123456789876543210 (Maybe a) (Maybe b) = (==) a b
+      Equals_0123456789876543210 (Vec a a) (Vec b b) = (&&) ((==) a b) ((==) a b)
+      Equals_0123456789876543210 (_ :: Type) (_ :: Type) = FalseSym0
+    instance PEq Type where
+      type (==) a b = Equals_0123456789876543210 a b
+    type family Compare_0123456789876543210 (a :: Type) (a :: Type) :: Ordering where
+      Compare_0123456789876543210 Nat Nat = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
+      Compare_0123456789876543210 Int Int = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
+      Compare_0123456789876543210 String String = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
+      Compare_0123456789876543210 (Maybe a_0123456789876543210) (Maybe b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])
+      Compare_0123456789876543210 (Vec a_0123456789876543210 a_0123456789876543210) (Vec b_0123456789876543210 b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[]))
+      Compare_0123456789876543210 Nat Int = LTSym0
+      Compare_0123456789876543210 Nat String = LTSym0
+      Compare_0123456789876543210 Nat (Maybe _) = LTSym0
+      Compare_0123456789876543210 Nat (Vec _ _) = LTSym0
+      Compare_0123456789876543210 Int Nat = GTSym0
+      Compare_0123456789876543210 Int String = LTSym0
+      Compare_0123456789876543210 Int (Maybe _) = LTSym0
+      Compare_0123456789876543210 Int (Vec _ _) = LTSym0
+      Compare_0123456789876543210 String Nat = GTSym0
+      Compare_0123456789876543210 String Int = GTSym0
+      Compare_0123456789876543210 String (Maybe _) = LTSym0
+      Compare_0123456789876543210 String (Vec _ _) = LTSym0
+      Compare_0123456789876543210 (Maybe _) Nat = GTSym0
+      Compare_0123456789876543210 (Maybe _) Int = GTSym0
+      Compare_0123456789876543210 (Maybe _) String = GTSym0
+      Compare_0123456789876543210 (Maybe _) (Vec _ _) = LTSym0
+      Compare_0123456789876543210 (Vec _ _) Nat = GTSym0
+      Compare_0123456789876543210 (Vec _ _) Int = GTSym0
+      Compare_0123456789876543210 (Vec _ _) String = GTSym0
+      Compare_0123456789876543210 (Vec _ _) (Maybe _) = GTSym0
+    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Type) (a0123456789876543210 :: Type) =
+        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
+    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Type) :: (~>) Type Ordering
+      where
+        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
+    data Compare_0123456789876543210Sym0 :: (~>) Type ((~>) Type Ordering)
+      where
+        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
+                                                        Compare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
+    instance POrd Type where
+      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Type) (a :: Symbol) :: Symbol where
+      ShowsPrec_0123456789876543210 _ Nat a_0123456789876543210 = Apply (Apply ShowStringSym0 "Nat") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ Int a_0123456789876543210 = Apply (Apply ShowStringSym0 "Int") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ String a_0123456789876543210 = Apply (Apply ShowStringSym0 "String") a_0123456789876543210
+      ShowsPrec_0123456789876543210 p_0123456789876543210 (Maybe arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Maybe ")) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210
+      ShowsPrec_0123456789876543210 p_0123456789876543210 (Vec arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Vec ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Type) (a0123456789876543210 :: Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Type) :: (~>) Symbol Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Type ((~>) Symbol Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Type ((~>) Symbol Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow Type where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    data SRep :: Type -> Type
+      where
+        SNat :: SRep Nat
+        SInt :: SRep Int
+        SString :: SRep String
+        SMaybe :: forall (n :: Type). (Sing (n :: Type)) -> SRep (Maybe n)
+        SVec :: forall (n :: Type) (n :: Nat).
+                (Sing (n :: Type)) -> (Sing (n :: Nat)) -> SRep (Vec n n)
+    type instance Sing @Type = SRep
+    instance SingKind Type where
+      type Demote Type = Rep
+      fromSing SNat = Singletons.Star.Nat
+      fromSing SInt = Singletons.Star.Int
+      fromSing SString = Singletons.Star.String
+      fromSing (SMaybe b) = Singletons.Star.Maybe (fromSing b)
+      fromSing (SVec b b)
+        = (Singletons.Star.Vec (fromSing b)) (fromSing b)
+      toSing Singletons.Star.Nat = SomeSing SNat
+      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) }
+      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) }
+    instance (SEq Type, SEq Nat) => SEq Type where
+      (%==) SNat SNat = STrue
+      (%==) SNat SInt = SFalse
+      (%==) SNat SString = SFalse
+      (%==) SNat (SMaybe _) = SFalse
+      (%==) SNat (SVec _ _) = SFalse
+      (%==) SInt SNat = SFalse
+      (%==) SInt SInt = STrue
+      (%==) SInt SString = SFalse
+      (%==) SInt (SMaybe _) = SFalse
+      (%==) SInt (SVec _ _) = SFalse
+      (%==) SString SNat = SFalse
+      (%==) SString SInt = SFalse
+      (%==) SString SString = STrue
+      (%==) SString (SMaybe _) = SFalse
+      (%==) SString (SVec _ _) = SFalse
+      (%==) (SMaybe _) SNat = SFalse
+      (%==) (SMaybe _) SInt = SFalse
+      (%==) (SMaybe _) SString = SFalse
+      (%==) (SMaybe a) (SMaybe b) = ((%==) a) b
+      (%==) (SMaybe _) (SVec _ _) = SFalse
+      (%==) (SVec _ _) SNat = SFalse
+      (%==) (SVec _ _) SInt = SFalse
+      (%==) (SVec _ _) SString = SFalse
+      (%==) (SVec _ _) (SMaybe _) = SFalse
+      (%==) (SVec a a) (SVec b b) = ((%&&) (((%==) a) b)) (((%==) a) b)
+    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)
+      (%~) 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)
+      (%~) 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)
+      (%~) (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)
+      (%~) (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 })
+    instance (SDecide Type, SDecide Nat) =>
+             Data.Type.Equality.TestEquality (SRep :: Type -> Type) where
+      Data.Type.Equality.testEquality = decideEquality
+    instance (SDecide Type, SDecide Nat) =>
+             Data.Type.Coercion.TestCoercion (SRep :: Type -> Type) where
+      Data.Type.Coercion.testCoercion = decideCoercion
+    instance (SOrd Type, SOrd Nat) => SOrd Type where
+      sCompare ::
+        forall (t1 :: Type) (t2 :: Type).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (CompareSym0 :: TyFun Type ((~>) Type Ordering)
+                                                 -> Type) t1) t2)
+      sCompare SNat SNat
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            SNil
+      sCompare SInt SInt
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            SNil
+      sCompare SString SString
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            SNil
+      sCompare
+        (SMaybe (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        (SMaybe (sB_0123456789876543210 :: Sing b_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            ((applySing
+                ((applySing ((singFun2 @(:@#@$)) SCons))
+                   ((applySing
+                       ((applySing ((singFun2 @CompareSym0) sCompare))
+                          sA_0123456789876543210))
+                      sB_0123456789876543210)))
+               SNil)
+      sCompare
+        (SVec (sA_0123456789876543210 :: Sing a_0123456789876543210)
+              (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        (SVec (sB_0123456789876543210 :: Sing b_0123456789876543210)
+              (sB_0123456789876543210 :: Sing b_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            ((applySing
+                ((applySing ((singFun2 @(:@#@$)) SCons))
+                   ((applySing
+                       ((applySing ((singFun2 @CompareSym0) sCompare))
+                          sA_0123456789876543210))
+                      sB_0123456789876543210)))
+               ((applySing
+                   ((applySing ((singFun2 @(:@#@$)) SCons))
+                      ((applySing
+                          ((applySing ((singFun2 @CompareSym0) sCompare))
+                             sA_0123456789876543210))
+                         sB_0123456789876543210)))
+                  SNil))
+      sCompare SNat SInt = SLT
+      sCompare SNat SString = SLT
+      sCompare SNat (SMaybe _) = SLT
+      sCompare SNat (SVec _ _) = SLT
+      sCompare SInt SNat = SGT
+      sCompare SInt SString = SLT
+      sCompare SInt (SMaybe _) = SLT
+      sCompare SInt (SVec _ _) = SLT
+      sCompare SString SNat = SGT
+      sCompare SString SInt = SGT
+      sCompare SString (SMaybe _) = SLT
+      sCompare SString (SVec _ _) = SLT
+      sCompare (SMaybe _) SNat = SGT
+      sCompare (SMaybe _) SInt = SGT
+      sCompare (SMaybe _) SString = SGT
+      sCompare (SMaybe _) (SVec _ _) = SLT
+      sCompare (SVec _ _) SNat = SGT
+      sCompare (SVec _ _) SInt = SGT
+      sCompare (SVec _ _) SString = SGT
+      sCompare (SVec _ _) (SMaybe _) = SGT
+    instance (SShow Type, SShow Nat) => SShow Type where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: Type) (t3 :: Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) Type ((~>) Symbol Symbol))
+                                                             -> Type) t1) t2) t3)
+      sShowsPrec
+        _
+        SNat
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "Nat")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SInt
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "Int")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SString
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "String")))
+            sA_0123456789876543210
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        (SMaybe (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (sFromInteger (sing :: Sing 10)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                          (sing :: Sing "Maybe "))))
+                   ((applySing
+                       ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                          (sFromInteger (sing :: Sing 11))))
+                      sArg_0123456789876543210))))
+            sA_0123456789876543210
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        (SVec (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
+              (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (sFromInteger (sing :: Sing 10)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                          (sing :: Sing "Vec "))))
+                   ((applySing
+                       ((applySing ((singFun3 @(.@#@$)) (%.)))
+                          ((applySing
+                              ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                                 (sFromInteger (sing :: Sing 11))))
+                             sArg_0123456789876543210)))
+                      ((applySing
+                          ((applySing ((singFun3 @(.@#@$)) (%.)))
+                             ((singFun1 @ShowSpaceSym0) sShowSpace)))
+                         ((applySing
+                             ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                                (sFromInteger (sing :: Sing 11))))
+                            sArg_0123456789876543210))))))
+            sA_0123456789876543210
+    instance SingI Nat where
+      sing = SNat
+    instance SingI Int where
+      sing = SInt
+    instance SingI String where
+      sing = SString
+    instance SingI n => SingI (Maybe (n :: Type)) where
+      sing = SMaybe sing
+    instance SingI (MaybeSym0 :: (~>) Type Type) where
+      sing = (singFun1 @MaybeSym0) SMaybe
+    instance (SingI n, SingI n) =>
+             SingI (Vec (n :: Type) (n :: Nat)) where
+      sing = (SVec sing) sing
+    instance SingI (VecSym0 :: (~>) Type ((~>) Nat Type)) where
+      sing = (singFun2 @VecSym0) SVec
+    instance SingI d =>
+             SingI (VecSym1 (d :: Type) :: (~>) Nat Type) where
+      sing = (singFun1 @(VecSym1 (d :: Type))) (SVec (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T124.ghc86.template b/tests/compile-and-dump/Singletons/T124.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T124.ghc86.template
+++ /dev/null
@@ -1,33 +0,0 @@
-Singletons/T124.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| foo :: Bool -> ()
-          foo True = ()
-          foo False = () |]
-  ======>
-    foo :: Bool -> ()
-    foo True = ()
-    foo False = ()
-    type FooSym1 (a0123456789876543210 :: Bool) =
-        Foo a0123456789876543210
-    instance SuppressUnusedWarnings FooSym0 where
-      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
-    data FooSym0 :: (~>) Bool ()
-      where
-        FooSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
-                                FooSym0 a0123456789876543210
-    type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
-    type family Foo (a :: Bool) :: () where
-      Foo  'True = Tuple0Sym0
-      Foo  'False = Tuple0Sym0
-    sFoo :: forall (t :: Bool). Sing t -> Sing (Apply FooSym0 t :: ())
-    sFoo STrue = STuple0
-    sFoo SFalse = STuple0
-    instance SingI (FooSym0 :: (~>) Bool ()) where
-      sing = (singFun1 @FooSym0) sFoo
-Singletons/T124.hs:0:0:: Splicing expression
-    sCases ''Bool [| b |] [| STuple0 |]
-  ======>
-    case b of
-      SFalse -> STuple0
-      STrue -> STuple0
diff --git a/tests/compile-and-dump/Singletons/T124.ghc88.template b/tests/compile-and-dump/Singletons/T124.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T124.ghc88.template
@@ -0,0 +1,33 @@
+Singletons/T124.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| foo :: Bool -> ()
+          foo True = ()
+          foo False = () |]
+  ======>
+    foo :: Bool -> ()
+    foo True = ()
+    foo False = ()
+    type FooSym1 (a0123456789876543210 :: Bool) =
+        Foo a0123456789876543210
+    instance SuppressUnusedWarnings FooSym0 where
+      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
+    data FooSym0 :: (~>) Bool ()
+      where
+        FooSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
+                                FooSym0 a0123456789876543210
+    type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
+    type family Foo (a :: Bool) :: () where
+      Foo 'True = Tuple0Sym0
+      Foo 'False = Tuple0Sym0
+    sFoo :: forall (t :: Bool). Sing t -> Sing (Apply FooSym0 t :: ())
+    sFoo STrue = STuple0
+    sFoo SFalse = STuple0
+    instance SingI (FooSym0 :: (~>) Bool ()) where
+      sing = (singFun1 @FooSym0) sFoo
+Singletons/T124.hs:0:0:: Splicing expression
+    sCases ''Bool [| b |] [| STuple0 |]
+  ======>
+    case b of
+      SFalse -> STuple0
+      STrue -> STuple0
diff --git a/tests/compile-and-dump/Singletons/T136.ghc86.template b/tests/compile-and-dump/Singletons/T136.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T136.ghc86.template
+++ /dev/null
@@ -1,171 +0,0 @@
-Singletons/T136.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| instance Enum BiNat where
-            succ [] = [True]
-            succ (False : as) = True : as
-            succ (True : as) = False : succ as
-            pred [] = error "pred 0"
-            pred (False : as) = True : pred as
-            pred (True : as) = False : as
-            toEnum i
-              | i < 0 = error "negative toEnum"
-              | i == 0 = []
-              | otherwise = succ (toEnum (pred i))
-            fromEnum [] = 0
-            fromEnum (False : as) = 2 * fromEnum as
-            fromEnum (True : as) = 1 + 2 * fromEnum as |]
-  ======>
-    instance Enum BiNat where
-      succ [] = [True]
-      succ (False : as) = (True : as)
-      succ (True : as) = (False : succ as)
-      pred [] = error "pred 0"
-      pred (False : as) = (True : pred as)
-      pred (True : as) = (False : as)
-      toEnum i
-        | (i < 0) = error "negative toEnum"
-        | (i == 0) = []
-        | otherwise = succ (toEnum (pred i))
-      fromEnum [] = 0
-      fromEnum (False : as) = (2 * fromEnum as)
-      fromEnum (True : as) = (1 + (2 * fromEnum as))
-    type family Succ_0123456789876543210 (a :: [Bool]) :: [Bool] where
-      Succ_0123456789876543210 '[] = Apply (Apply (:@#@$) TrueSym0) '[]
-      Succ_0123456789876543210 ( '(:)  'False as) = Apply (Apply (:@#@$) TrueSym0) as
-      Succ_0123456789876543210 ( '(:)  'True as) = Apply (Apply (:@#@$) FalseSym0) (Apply SuccSym0 as)
-    type Succ_0123456789876543210Sym1 (a0123456789876543210 :: [Bool]) =
-        Succ_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Succ_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Succ_0123456789876543210Sym0KindInference) ())
-    data Succ_0123456789876543210Sym0 :: (~>) [Bool] [Bool]
-      where
-        Succ_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                            arg. SameKind (Apply Succ_0123456789876543210Sym0 arg) (Succ_0123456789876543210Sym1 arg) =>
-                                                     Succ_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Succ_0123456789876543210Sym0 a0123456789876543210 = Succ_0123456789876543210 a0123456789876543210
-    type family Pred_0123456789876543210 (a :: [Bool]) :: [Bool] where
-      Pred_0123456789876543210 '[] = Apply ErrorSym0 "pred 0"
-      Pred_0123456789876543210 ( '(:)  'False as) = Apply (Apply (:@#@$) TrueSym0) (Apply PredSym0 as)
-      Pred_0123456789876543210 ( '(:)  'True as) = Apply (Apply (:@#@$) FalseSym0) as
-    type Pred_0123456789876543210Sym1 (a0123456789876543210 :: [Bool]) =
-        Pred_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Pred_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Pred_0123456789876543210Sym0KindInference) ())
-    data Pred_0123456789876543210Sym0 :: (~>) [Bool] [Bool]
-      where
-        Pred_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                            arg. SameKind (Apply Pred_0123456789876543210Sym0 arg) (Pred_0123456789876543210Sym1 arg) =>
-                                                     Pred_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Pred_0123456789876543210Sym0 a0123456789876543210 = Pred_0123456789876543210 a0123456789876543210
-    type family Case_0123456789876543210 i arg_0123456789876543210 t where
-      Case_0123456789876543210 i arg_0123456789876543210  'True = '[]
-      Case_0123456789876543210 i arg_0123456789876543210  'False = Apply SuccSym0 (Apply ToEnumSym0 (Apply PredSym0 i))
-    type family Case_0123456789876543210 i arg_0123456789876543210 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_0123456789876543210 t where
-      Case_0123456789876543210 arg_0123456789876543210 i = Case_0123456789876543210 i arg_0123456789876543210 (Apply (Apply (<@#@$) i) (FromInteger 0))
-    type family ToEnum_0123456789876543210 (a :: GHC.Types.Nat) :: [Bool] where
-      ToEnum_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210
-    type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) =
-        ToEnum_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ())
-    data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat [Bool]
-      where
-        ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                              arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) =>
-                                                       ToEnum_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210 a0123456789876543210
-    type family FromEnum_0123456789876543210 (a :: [Bool]) :: GHC.Types.Nat where
-      FromEnum_0123456789876543210 '[] = FromInteger 0
-      FromEnum_0123456789876543210 ( '(:)  'False as) = Apply (Apply (*@#@$) (FromInteger 2)) (Apply FromEnumSym0 as)
-      FromEnum_0123456789876543210 ( '(:)  'True as) = Apply (Apply (+@#@$) (FromInteger 1)) (Apply (Apply (*@#@$) (FromInteger 2)) (Apply FromEnumSym0 as))
-    type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: [Bool]) =
-        FromEnum_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ())
-    data FromEnum_0123456789876543210Sym0 :: (~>) [Bool] GHC.Types.Nat
-      where
-        FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) =>
-                                                         FromEnum_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210 a0123456789876543210
-    instance PEnum [Bool] where
-      type Succ a = Apply Succ_0123456789876543210Sym0 a
-      type Pred a = Apply Pred_0123456789876543210Sym0 a
-      type ToEnum a = Apply ToEnum_0123456789876543210Sym0 a
-      type FromEnum a = Apply FromEnum_0123456789876543210Sym0 a
-    instance SEnum [Bool] where
-      sSucc ::
-        forall (t :: [Bool]).
-        Sing t
-        -> Sing (Apply (SuccSym0 :: TyFun [Bool] [Bool]
-                                    -> GHC.Types.Type) t)
-      sPred ::
-        forall (t :: [Bool]).
-        Sing t
-        -> Sing (Apply (PredSym0 :: TyFun [Bool] [Bool]
-                                    -> GHC.Types.Type) t)
-      sToEnum ::
-        forall (t :: GHC.Types.Nat).
-        Sing t
-        -> Sing (Apply (ToEnumSym0 :: TyFun GHC.Types.Nat [Bool]
-                                      -> GHC.Types.Type) t)
-      sFromEnum ::
-        forall (t :: [Bool]).
-        Sing t
-        -> Sing (Apply (FromEnumSym0 :: TyFun [Bool] GHC.Types.Nat
-                                        -> GHC.Types.Type) t)
-      sSucc SNil
-        = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) STrue)) SNil
-      sSucc (SCons SFalse (sAs :: Sing as))
-        = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) STrue)) sAs
-      sSucc (SCons STrue (sAs :: Sing as))
-        = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SFalse))
-            ((applySing ((singFun1 @SuccSym0) sSucc)) sAs)
-      sPred SNil = sError (sing :: Sing "pred 0")
-      sPred (SCons SFalse (sAs :: Sing as))
-        = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) STrue))
-            ((applySing ((singFun1 @PredSym0) sPred)) sAs)
-      sPred (SCons STrue (sAs :: Sing as))
-        = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SFalse)) sAs
-      sToEnum (sArg_0123456789876543210 :: Sing arg_0123456789876543210)
-        = (case sArg_0123456789876543210 of {
-             (sI :: Sing i)
-               -> (case
-                       (applySing ((applySing ((singFun2 @(<@#@$)) (%<))) sI))
-                         (sFromInteger (sing :: Sing 0))
-                   of
-                     STrue -> sError (sing :: Sing "negative toEnum")
-                     SFalse
-                       -> (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))) ::
-                            Sing (Case_0123456789876543210 i arg_0123456789876543210 (Apply (Apply (==@#@$) i) (FromInteger 0)))) ::
-                    Sing (Case_0123456789876543210 i arg_0123456789876543210 (Apply (Apply (<@#@$) i) (FromInteger 0))) }) ::
-            Sing (Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210)
-      sFromEnum SNil = sFromInteger (sing :: Sing 0)
-      sFromEnum (SCons SFalse (sAs :: Sing as))
-        = (applySing
-             ((applySing ((singFun2 @(*@#@$)) (%*)))
-                (sFromInteger (sing :: Sing 2))))
-            ((applySing ((singFun1 @FromEnumSym0) sFromEnum)) sAs)
-      sFromEnum (SCons STrue (sAs :: Sing as))
-        = (applySing
-             ((applySing ((singFun2 @(+@#@$)) (%+)))
-                (sFromInteger (sing :: Sing 1))))
-            ((applySing
-                ((applySing ((singFun2 @(*@#@$)) (%*)))
-                   (sFromInteger (sing :: Sing 2))))
-               ((applySing ((singFun1 @FromEnumSym0) sFromEnum)) sAs))
diff --git a/tests/compile-and-dump/Singletons/T136.ghc88.template b/tests/compile-and-dump/Singletons/T136.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T136.ghc88.template
@@ -0,0 +1,174 @@
+Singletons/T136.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| instance Enum BiNat where
+            succ [] = [True]
+            succ (False : as) = True : as
+            succ (True : as) = False : succ as
+            pred [] = error "pred 0"
+            pred (False : as) = True : pred as
+            pred (True : as) = False : as
+            toEnum i
+              | i < 0 = error "negative toEnum"
+              | i == 0 = []
+              | otherwise = succ (toEnum (pred i))
+            fromEnum [] = 0
+            fromEnum (False : as) = 2 * fromEnum as
+            fromEnum (True : as) = 1 + 2 * fromEnum as |]
+  ======>
+    instance Enum BiNat where
+      succ [] = [True]
+      succ (False : as) = (True : as)
+      succ (True : as) = (False : succ as)
+      pred [] = error "pred 0"
+      pred (False : as) = (True : pred as)
+      pred (True : as) = (False : as)
+      toEnum i
+        | (i < 0) = error "negative toEnum"
+        | (i == 0) = []
+        | otherwise = succ (toEnum (pred i))
+      fromEnum [] = 0
+      fromEnum (False : as) = (2 * fromEnum as)
+      fromEnum (True : as) = (1 + (2 * fromEnum as))
+    type family Succ_0123456789876543210 (a :: [Bool]) :: [Bool] where
+      Succ_0123456789876543210 '[] = Apply (Apply (:@#@$) TrueSym0) '[]
+      Succ_0123456789876543210 ('(:) 'False as) = Apply (Apply (:@#@$) TrueSym0) as
+      Succ_0123456789876543210 ('(:) 'True as) = Apply (Apply (:@#@$) FalseSym0) (Apply SuccSym0 as)
+    type Succ_0123456789876543210Sym1 (a0123456789876543210 :: [Bool]) =
+        Succ_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Succ_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Succ_0123456789876543210Sym0KindInference) ())
+    data Succ_0123456789876543210Sym0 :: (~>) [Bool] [Bool]
+      where
+        Succ_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                            arg. SameKind (Apply Succ_0123456789876543210Sym0 arg) (Succ_0123456789876543210Sym1 arg) =>
+                                                     Succ_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Succ_0123456789876543210Sym0 a0123456789876543210 = Succ_0123456789876543210 a0123456789876543210
+    type family Pred_0123456789876543210 (a :: [Bool]) :: [Bool] where
+      Pred_0123456789876543210 '[] = Apply ErrorSym0 "pred 0"
+      Pred_0123456789876543210 ('(:) 'False as) = Apply (Apply (:@#@$) TrueSym0) (Apply PredSym0 as)
+      Pred_0123456789876543210 ('(:) 'True as) = Apply (Apply (:@#@$) FalseSym0) as
+    type Pred_0123456789876543210Sym1 (a0123456789876543210 :: [Bool]) =
+        Pred_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Pred_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Pred_0123456789876543210Sym0KindInference) ())
+    data Pred_0123456789876543210Sym0 :: (~>) [Bool] [Bool]
+      where
+        Pred_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                            arg. SameKind (Apply Pred_0123456789876543210Sym0 arg) (Pred_0123456789876543210Sym1 arg) =>
+                                                     Pred_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Pred_0123456789876543210Sym0 a0123456789876543210 = Pred_0123456789876543210 a0123456789876543210
+    type family Case_0123456789876543210 i arg_0123456789876543210 t where
+      Case_0123456789876543210 i arg_0123456789876543210 'True = '[]
+      Case_0123456789876543210 i arg_0123456789876543210 'False = Apply SuccSym0 (Apply ToEnumSym0 (Apply PredSym0 i))
+    type family Case_0123456789876543210 i arg_0123456789876543210 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_0123456789876543210 t where
+      Case_0123456789876543210 arg_0123456789876543210 i = Case_0123456789876543210 i arg_0123456789876543210 (Apply (Apply (<@#@$) i) (FromInteger 0))
+    type family ToEnum_0123456789876543210 (a :: GHC.Types.Nat) :: [Bool] where
+      ToEnum_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210
+    type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) =
+        ToEnum_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ())
+    data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat [Bool]
+      where
+        ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                              arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) =>
+                                                       ToEnum_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210 a0123456789876543210
+    type family FromEnum_0123456789876543210 (a :: [Bool]) :: GHC.Types.Nat where
+      FromEnum_0123456789876543210 '[] = FromInteger 0
+      FromEnum_0123456789876543210 ('(:) 'False as) = Apply (Apply (*@#@$) (FromInteger 2)) (Apply FromEnumSym0 as)
+      FromEnum_0123456789876543210 ('(:) 'True as) = Apply (Apply (+@#@$) (FromInteger 1)) (Apply (Apply (*@#@$) (FromInteger 2)) (Apply FromEnumSym0 as))
+    type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: [Bool]) =
+        FromEnum_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ())
+    data FromEnum_0123456789876543210Sym0 :: (~>) [Bool] GHC.Types.Nat
+      where
+        FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) =>
+                                                         FromEnum_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210 a0123456789876543210
+    instance PEnum [Bool] where
+      type Succ a = Apply Succ_0123456789876543210Sym0 a
+      type Pred a = Apply Pred_0123456789876543210Sym0 a
+      type ToEnum a = Apply ToEnum_0123456789876543210Sym0 a
+      type FromEnum a = Apply FromEnum_0123456789876543210Sym0 a
+    instance SEnum [Bool] where
+      sSucc ::
+        forall (t :: [Bool]).
+        Sing t
+        -> Sing (Apply (SuccSym0 :: TyFun [Bool] [Bool]
+                                    -> GHC.Types.Type) t)
+      sPred ::
+        forall (t :: [Bool]).
+        Sing t
+        -> Sing (Apply (PredSym0 :: TyFun [Bool] [Bool]
+                                    -> GHC.Types.Type) t)
+      sToEnum ::
+        forall (t :: GHC.Types.Nat).
+        Sing t
+        -> Sing (Apply (ToEnumSym0 :: TyFun GHC.Types.Nat [Bool]
+                                      -> GHC.Types.Type) t)
+      sFromEnum ::
+        forall (t :: [Bool]).
+        Sing t
+        -> Sing (Apply (FromEnumSym0 :: TyFun [Bool] GHC.Types.Nat
+                                        -> GHC.Types.Type) t)
+      sSucc SNil
+        = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) STrue)) SNil
+      sSucc (SCons SFalse (sAs :: Sing as))
+        = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) STrue)) sAs
+      sSucc (SCons STrue (sAs :: Sing as))
+        = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) SFalse))
+            ((applySing ((singFun1 @SuccSym0) sSucc)) sAs)
+      sPred SNil = sError (sing :: Sing "pred 0")
+      sPred (SCons SFalse (sAs :: Sing as))
+        = (applySing ((applySing ((singFun2 @(:@#@$)) SCons)) STrue))
+            ((applySing ((singFun1 @PredSym0) sPred)) sAs)
+      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 -> 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)))) })
+      sFromEnum SNil = sFromInteger (sing :: Sing 0)
+      sFromEnum (SCons SFalse (sAs :: Sing as))
+        = (applySing
+             ((applySing ((singFun2 @(*@#@$)) (%*)))
+                (sFromInteger (sing :: Sing 2))))
+            ((applySing ((singFun1 @FromEnumSym0) sFromEnum)) sAs)
+      sFromEnum (SCons STrue (sAs :: Sing as))
+        = (applySing
+             ((applySing ((singFun2 @(+@#@$)) (%+)))
+                (sFromInteger (sing :: Sing 1))))
+            ((applySing
+                ((applySing ((singFun2 @(*@#@$)) (%*)))
+                   (sFromInteger (sing :: Sing 2))))
+               ((applySing ((singFun1 @FromEnumSym0) sFromEnum)) sAs))
diff --git a/tests/compile-and-dump/Singletons/T136b.ghc86.template b/tests/compile-and-dump/Singletons/T136b.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T136b.ghc86.template
+++ /dev/null
@@ -1,53 +0,0 @@
-Singletons/T136b.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| class C a where
-            meth :: a -> a |]
-  ======>
-    class C a where
-      meth :: a -> a
-    type MethSym1 (arg0123456789876543210 :: a0123456789876543210) =
-        Meth arg0123456789876543210
-    instance SuppressUnusedWarnings MethSym0 where
-      suppressUnusedWarnings = snd (((,) MethSym0KindInference) ())
-    data MethSym0 :: forall a0123456789876543210.
-                     (~>) a0123456789876543210 a0123456789876543210
-      where
-        MethSym0KindInference :: forall arg0123456789876543210
-                                        arg. SameKind (Apply MethSym0 arg) (MethSym1 arg) =>
-                                 MethSym0 arg0123456789876543210
-    type instance Apply MethSym0 arg0123456789876543210 = Meth arg0123456789876543210
-    class PC (a :: GHC.Types.Type) where
-      type Meth (arg :: a) :: a
-    class SC a where
-      sMeth :: forall (t :: a). Sing t -> Sing (Apply MethSym0 t :: a)
-    instance SC a => SingI (MethSym0 :: (~>) a a) where
-      sing = (singFun1 @MethSym0) sMeth
-Singletons/T136b.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| instance C Bool where
-            meth = not |]
-  ======>
-    instance C Bool where
-      meth = not
-    type family Meth_0123456789876543210 (a :: Bool) :: Bool where
-      Meth_0123456789876543210 a_0123456789876543210 = Apply NotSym0 a_0123456789876543210
-    type Meth_0123456789876543210Sym1 (a0123456789876543210 :: Bool) =
-        Meth_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Meth_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Meth_0123456789876543210Sym0KindInference) ())
-    data Meth_0123456789876543210Sym0 :: (~>) Bool Bool
-      where
-        Meth_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                            arg. SameKind (Apply Meth_0123456789876543210Sym0 arg) (Meth_0123456789876543210Sym1 arg) =>
-                                                     Meth_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Meth_0123456789876543210Sym0 a0123456789876543210 = Meth_0123456789876543210 a0123456789876543210
-    instance PC Bool where
-      type Meth a = Apply Meth_0123456789876543210Sym0 a
-    instance SC Bool where
-      sMeth ::
-        forall (t :: Bool).
-        Sing t
-        -> Sing (Apply (MethSym0 :: TyFun Bool Bool -> GHC.Types.Type) t)
-      sMeth (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing ((singFun1 @NotSym0) sNot)) sA_0123456789876543210
diff --git a/tests/compile-and-dump/Singletons/T136b.ghc88.template b/tests/compile-and-dump/Singletons/T136b.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T136b.ghc88.template
@@ -0,0 +1,53 @@
+Singletons/T136b.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| class C a where
+            meth :: a -> a |]
+  ======>
+    class C a where
+      meth :: a -> a
+    type MethSym1 (arg0123456789876543210 :: a0123456789876543210) =
+        Meth arg0123456789876543210
+    instance SuppressUnusedWarnings MethSym0 where
+      suppressUnusedWarnings = snd (((,) MethSym0KindInference) ())
+    data MethSym0 :: forall a0123456789876543210.
+                     (~>) a0123456789876543210 a0123456789876543210
+      where
+        MethSym0KindInference :: forall arg0123456789876543210
+                                        arg. SameKind (Apply MethSym0 arg) (MethSym1 arg) =>
+                                 MethSym0 arg0123456789876543210
+    type instance Apply MethSym0 arg0123456789876543210 = Meth arg0123456789876543210
+    class PC (a :: GHC.Types.Type) where
+      type Meth (arg :: a) :: a
+    class SC a where
+      sMeth :: forall (t :: a). Sing t -> Sing (Apply MethSym0 t :: a)
+    instance SC a => SingI (MethSym0 :: (~>) a a) where
+      sing = (singFun1 @MethSym0) sMeth
+Singletons/T136b.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| instance C Bool where
+            meth = not |]
+  ======>
+    instance C Bool where
+      meth = not
+    type family Meth_0123456789876543210 (a :: Bool) :: Bool where
+      Meth_0123456789876543210 a_0123456789876543210 = Apply NotSym0 a_0123456789876543210
+    type Meth_0123456789876543210Sym1 (a0123456789876543210 :: Bool) =
+        Meth_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Meth_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Meth_0123456789876543210Sym0KindInference) ())
+    data Meth_0123456789876543210Sym0 :: (~>) Bool Bool
+      where
+        Meth_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                            arg. SameKind (Apply Meth_0123456789876543210Sym0 arg) (Meth_0123456789876543210Sym1 arg) =>
+                                                     Meth_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Meth_0123456789876543210Sym0 a0123456789876543210 = Meth_0123456789876543210 a0123456789876543210
+    instance PC Bool where
+      type Meth a = Apply Meth_0123456789876543210Sym0 a
+    instance SC Bool where
+      sMeth ::
+        forall (t :: Bool).
+        Sing t
+        -> Sing (Apply (MethSym0 :: TyFun Bool Bool -> GHC.Types.Type) t)
+      sMeth (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing ((singFun1 @NotSym0) sNot)) sA_0123456789876543210
diff --git a/tests/compile-and-dump/Singletons/T145.ghc86.template b/tests/compile-and-dump/Singletons/T145.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T145.ghc86.template
+++ /dev/null
@@ -1,39 +0,0 @@
-Singletons/T145.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| class Column (f :: Type -> Type) where
-            col :: f a -> a -> Bool |]
-  ======>
-    class Column (f :: Type -> Type) where
-      col :: f a -> a -> Bool
-    type ColSym2 (arg0123456789876543210 :: f0123456789876543210 a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) =
-        Col arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings (ColSym1 arg0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) ColSym1KindInference) ())
-    data ColSym1 (arg0123456789876543210 :: f0123456789876543210 a0123456789876543210) :: (~>) a0123456789876543210 Bool
-      where
-        ColSym1KindInference :: forall arg0123456789876543210
-                                       arg0123456789876543210
-                                       arg. SameKind (Apply (ColSym1 arg0123456789876543210) arg) (ColSym2 arg0123456789876543210 arg) =>
-                                ColSym1 arg0123456789876543210 arg0123456789876543210
-    type instance Apply (ColSym1 arg0123456789876543210) arg0123456789876543210 = Col arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings ColSym0 where
-      suppressUnusedWarnings = snd (((,) ColSym0KindInference) ())
-    data ColSym0 :: forall a0123456789876543210 f0123456789876543210.
-                    (~>) (f0123456789876543210 a0123456789876543210) ((~>) a0123456789876543210 Bool)
-      where
-        ColSym0KindInference :: forall arg0123456789876543210
-                                       arg. SameKind (Apply ColSym0 arg) (ColSym1 arg) =>
-                                ColSym0 arg0123456789876543210
-    type instance Apply ColSym0 arg0123456789876543210 = ColSym1 arg0123456789876543210
-    class PColumn (f :: Type -> Type) where
-      type Col (arg :: f a) (arg :: a) :: Bool
-    class SColumn (f :: Type -> Type) where
-      sCol ::
-        forall a (t :: f a) (t :: a).
-        Sing t -> Sing t -> Sing (Apply (Apply ColSym0 t) t :: Bool)
-    instance SColumn f =>
-             SingI (ColSym0 :: (~>) (f a) ((~>) a Bool)) where
-      sing = (singFun2 @ColSym0) sCol
-    instance (SColumn f, SingI d) =>
-             SingI (ColSym1 (d :: f a) :: (~>) a Bool) where
-      sing = (singFun1 @(ColSym1 (d :: f a))) (sCol (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T145.ghc88.template b/tests/compile-and-dump/Singletons/T145.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T145.ghc88.template
@@ -0,0 +1,39 @@
+Singletons/T145.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| class Column (f :: Type -> Type) where
+            col :: f a -> a -> Bool |]
+  ======>
+    class Column (f :: Type -> Type) where
+      col :: f a -> a -> Bool
+    type ColSym2 (arg0123456789876543210 :: f0123456789876543210 a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) =
+        Col arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings (ColSym1 arg0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) ColSym1KindInference) ())
+    data ColSym1 (arg0123456789876543210 :: f0123456789876543210 a0123456789876543210) :: (~>) a0123456789876543210 Bool
+      where
+        ColSym1KindInference :: forall arg0123456789876543210
+                                       arg0123456789876543210
+                                       arg. SameKind (Apply (ColSym1 arg0123456789876543210) arg) (ColSym2 arg0123456789876543210 arg) =>
+                                ColSym1 arg0123456789876543210 arg0123456789876543210
+    type instance Apply (ColSym1 arg0123456789876543210) arg0123456789876543210 = Col arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings ColSym0 where
+      suppressUnusedWarnings = snd (((,) ColSym0KindInference) ())
+    data ColSym0 :: forall f0123456789876543210 a0123456789876543210.
+                    (~>) (f0123456789876543210 a0123456789876543210) ((~>) a0123456789876543210 Bool)
+      where
+        ColSym0KindInference :: forall arg0123456789876543210
+                                       arg. SameKind (Apply ColSym0 arg) (ColSym1 arg) =>
+                                ColSym0 arg0123456789876543210
+    type instance Apply ColSym0 arg0123456789876543210 = ColSym1 arg0123456789876543210
+    class PColumn (f :: Type -> Type) where
+      type Col (arg :: f a) (arg :: a) :: Bool
+    class SColumn (f :: Type -> Type) where
+      sCol ::
+        forall a (t :: f a) (t :: a).
+        Sing t -> Sing t -> Sing (Apply (Apply ColSym0 t) t :: Bool)
+    instance SColumn f =>
+             SingI (ColSym0 :: (~>) (f a) ((~>) a Bool)) where
+      sing = (singFun2 @ColSym0) sCol
+    instance (SColumn f, SingI d) =>
+             SingI (ColSym1 (d :: f a) :: (~>) a Bool) where
+      sing = (singFun1 @(ColSym1 (d :: f a))) (sCol (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T153.ghc86.template b/tests/compile-and-dump/Singletons/T153.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T153.ghc86.template
+++ /dev/null
diff --git a/tests/compile-and-dump/Singletons/T153.ghc88.template b/tests/compile-and-dump/Singletons/T153.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T153.ghc88.template
diff --git a/tests/compile-and-dump/Singletons/T157.ghc86.template b/tests/compile-and-dump/Singletons/T157.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T157.ghc86.template
+++ /dev/null
diff --git a/tests/compile-and-dump/Singletons/T157.ghc88.template b/tests/compile-and-dump/Singletons/T157.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T157.ghc88.template
diff --git a/tests/compile-and-dump/Singletons/T159.ghc86.template b/tests/compile-and-dump/Singletons/T159.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T159.ghc86.template
+++ /dev/null
@@ -1,245 +0,0 @@
-Singletons/T159.hs:0:0:: Splicing declarations
-    genSingletons [''T0, ''T1]
-  ======>
-    type ASym0 =  'A
-    type BSym0 =  'B
-    type CSym0 =  'C
-    type DSym0 =  'D
-    type ESym0 =  'E
-    type FSym0 =  'F
-    data instance Sing :: T0 -> GHC.Types.Type
-      where
-        SA :: Sing  'A
-        SB :: Sing  'B
-        SC :: Sing  'C
-        SD :: Sing  'D
-        SE :: Sing  'E
-        SF :: Sing  'F
-    type ST0 = (Sing :: T0 -> GHC.Types.Type)
-    instance SingKind T0 where
-      type Demote T0 = T0
-      fromSing SA = A
-      fromSing SB = B
-      fromSing SC = C
-      fromSing SD = D
-      fromSing SE = E
-      fromSing SF = F
-      toSing A = SomeSing SA
-      toSing B = SomeSing SB
-      toSing C = SomeSing SC
-      toSing D = SomeSing SD
-      toSing E = SomeSing SE
-      toSing F = SomeSing SF
-    instance SingI  'A where
-      sing = SA
-    instance SingI  'B where
-      sing = SB
-    instance SingI  'C where
-      sing = SC
-    instance SingI  'D where
-      sing = SD
-    instance SingI  'E where
-      sing = SE
-    instance SingI  'F where
-      sing = SF
-    type N1Sym0 =  'N1
-    type C1Sym2 (t0123456789876543210 :: T0) (t0123456789876543210 :: T1) =
-         'C1 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (C1Sym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) C1Sym1KindInference) ())
-    data C1Sym1 (t0123456789876543210 :: T0) :: (~>) T1 T1
-      where
-        C1Sym1KindInference :: forall t0123456789876543210
-                                      t0123456789876543210
-                                      arg. SameKind (Apply (C1Sym1 t0123456789876543210) arg) (C1Sym2 t0123456789876543210 arg) =>
-                               C1Sym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (C1Sym1 t0123456789876543210) t0123456789876543210 =  'C1 t0123456789876543210 t0123456789876543210
-    infixr 5 `C1Sym1`
-    instance SuppressUnusedWarnings C1Sym0 where
-      suppressUnusedWarnings = snd (((,) C1Sym0KindInference) ())
-    data C1Sym0 :: (~>) T0 ((~>) T1 T1)
-      where
-        C1Sym0KindInference :: forall t0123456789876543210
-                                      arg. SameKind (Apply C1Sym0 arg) (C1Sym1 arg) =>
-                               C1Sym0 t0123456789876543210
-    type instance Apply C1Sym0 t0123456789876543210 = C1Sym1 t0123456789876543210
-    infixr 5 `C1Sym0`
-    type (:&&@#@$$$) (t0123456789876543210 :: T0) (t0123456789876543210 :: T1) =
-         '(:&&) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings ((:&&@#@$$) t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (::&&@#@$$###)) ())
-    data (:&&@#@$$) (t0123456789876543210 :: T0) :: (~>) T1 T1
-      where
-        (::&&@#@$$###) :: forall t0123456789876543210
-                                 t0123456789876543210
-                                 arg. SameKind (Apply ((:&&@#@$$) t0123456789876543210) arg) ((:&&@#@$$$) t0123456789876543210 arg) =>
-                          (:&&@#@$$) t0123456789876543210 t0123456789876543210
-    type instance Apply ((:&&@#@$$) t0123456789876543210) t0123456789876543210 =  '(:&&) t0123456789876543210 t0123456789876543210
-    infixr 5 :&&@#@$$
-    instance SuppressUnusedWarnings (:&&@#@$) where
-      suppressUnusedWarnings = snd (((,) (::&&@#@$###)) ())
-    data (:&&@#@$) :: (~>) T0 ((~>) T1 T1)
-      where
-        (::&&@#@$###) :: forall t0123456789876543210
-                                arg. SameKind (Apply (:&&@#@$) arg) ((:&&@#@$$) arg) =>
-                         (:&&@#@$) t0123456789876543210
-    type instance Apply (:&&@#@$) t0123456789876543210 = (:&&@#@$$) t0123456789876543210
-    infixr 5 :&&@#@$
-    data instance Sing :: T1 -> GHC.Types.Type
-      where
-        SN1 :: Sing  'N1
-        SC1 :: forall (n :: T0) (n :: T1).
-               (Sing (n :: T0)) -> (Sing (n :: T1)) -> Sing ( 'C1 n n)
-        (:%&&) :: forall (n :: T0) (n :: T1).
-                  (Sing (n :: T0)) -> (Sing (n :: T1)) -> Sing ( '(:&&) n n)
-    type ST1 = (Sing :: T1 -> GHC.Types.Type)
-    instance SingKind T1 where
-      type Demote T1 = T1
-      fromSing SN1 = N1
-      fromSing (SC1 b b) = (C1 (fromSing b)) (fromSing b)
-      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) }
-      toSing ((:&&) (b :: Demote T0) (b :: Demote T1))
-        = case
-              ((,) (toSing b :: SomeSing T0)) (toSing b :: SomeSing T1)
-          of {
-            (,) (SomeSing c) (SomeSing c) -> SomeSing (((:%&&) c) c) }
-    infixr 5 `SC1`
-    infixr 5 :%&&
-    instance SingI  'N1 where
-      sing = SN1
-    instance (SingI n, SingI n) =>
-             SingI ( 'C1 (n :: T0) (n :: T1)) where
-      sing = (SC1 sing) sing
-    instance SingI (C1Sym0 :: (~>) T0 ((~>) T1 T1)) where
-      sing = (singFun2 @C1Sym0) SC1
-    instance SingI (TyCon2  'C1 :: (~>) T0 ((~>) T1 T1)) where
-      sing = (singFun2 @(TyCon2  'C1)) SC1
-    instance SingI d => SingI (C1Sym1 (d :: T0) :: (~>) T1 T1) where
-      sing = (singFun1 @(C1Sym1 (d :: T0))) (SC1 (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 ( 'C1 (d :: T0)) :: (~>) T1 T1) where
-      sing = (singFun1 @(TyCon1 ( 'C1 (d :: T0)))) (SC1 (sing @d))
-    instance (SingI n, SingI n) =>
-             SingI ( '(:&&) (n :: T0) (n :: T1)) where
-      sing = ((:%&&) sing) sing
-    instance SingI ((:&&@#@$) :: (~>) T0 ((~>) T1 T1)) where
-      sing = (singFun2 @(:&&@#@$)) (:%&&)
-    instance SingI (TyCon2  '(:&&) :: (~>) T0 ((~>) T1 T1)) where
-      sing = (singFun2 @(TyCon2  '(:&&))) (:%&&)
-    instance SingI d =>
-             SingI ((:&&@#@$$) (d :: T0) :: (~>) T1 T1) where
-      sing = (singFun1 @((:&&@#@$$) (d :: T0))) ((:%&&) (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 ( '(:&&) (d :: T0)) :: (~>) T1 T1) where
-      sing = (singFun1 @(TyCon1 ( '(:&&) (d :: T0)))) ((:%&&) (sing @d))
-Singletons/T159.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| infixr 5 :||
-          infixr 5 `C2`
-          
-          data T2 = N2 | C2 T0 T2 | T0 :|| T2 |]
-  ======>
-    data T2 = N2 | C2 T0 T2 | T0 :|| T2
-    infixr 5 `C2`
-    infixr 5 :||
-    type N2Sym0 = N2
-    type C2Sym2 (t0123456789876543210 :: T0) (t0123456789876543210 :: T2) =
-        C2 t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (C2Sym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) C2Sym1KindInference) ())
-    data C2Sym1 (t0123456789876543210 :: T0) :: (~>) T2 T2
-      where
-        C2Sym1KindInference :: forall t0123456789876543210
-                                      t0123456789876543210
-                                      arg. SameKind (Apply (C2Sym1 t0123456789876543210) arg) (C2Sym2 t0123456789876543210 arg) =>
-                               C2Sym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (C2Sym1 t0123456789876543210) t0123456789876543210 = C2 t0123456789876543210 t0123456789876543210
-    infixr 5 `C2Sym1`
-    instance SuppressUnusedWarnings C2Sym0 where
-      suppressUnusedWarnings = snd (((,) C2Sym0KindInference) ())
-    data C2Sym0 :: (~>) T0 ((~>) T2 T2)
-      where
-        C2Sym0KindInference :: forall t0123456789876543210
-                                      arg. SameKind (Apply C2Sym0 arg) (C2Sym1 arg) =>
-                               C2Sym0 t0123456789876543210
-    type instance Apply C2Sym0 t0123456789876543210 = C2Sym1 t0123456789876543210
-    infixr 5 `C2Sym0`
-    type (:||@#@$$$) (t0123456789876543210 :: T0) (t0123456789876543210 :: T2) =
-        (:||) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings ((:||@#@$$) t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (::||@#@$$###)) ())
-    data (:||@#@$$) (t0123456789876543210 :: T0) :: (~>) T2 T2
-      where
-        (::||@#@$$###) :: forall t0123456789876543210
-                                 t0123456789876543210
-                                 arg. SameKind (Apply ((:||@#@$$) t0123456789876543210) arg) ((:||@#@$$$) t0123456789876543210 arg) =>
-                          (:||@#@$$) t0123456789876543210 t0123456789876543210
-    type instance Apply ((:||@#@$$) t0123456789876543210) t0123456789876543210 = (:||) t0123456789876543210 t0123456789876543210
-    infixr 5 :||@#@$$
-    instance SuppressUnusedWarnings (:||@#@$) where
-      suppressUnusedWarnings = snd (((,) (::||@#@$###)) ())
-    data (:||@#@$) :: (~>) T0 ((~>) T2 T2)
-      where
-        (::||@#@$###) :: forall t0123456789876543210
-                                arg. SameKind (Apply (:||@#@$) arg) ((:||@#@$$) arg) =>
-                         (:||@#@$) t0123456789876543210
-    type instance Apply (:||@#@$) t0123456789876543210 = (:||@#@$$) t0123456789876543210
-    infixr 5 :||@#@$
-    infixr 5 `SC2`
-    infixr 5 :%||
-    data instance Sing :: T2 -> GHC.Types.Type
-      where
-        SN2 :: Sing N2
-        SC2 :: forall (n :: T0) (n :: T2).
-               (Sing (n :: T0)) -> (Sing (n :: T2)) -> Sing (C2 n n)
-        (:%||) :: forall (n :: T0) (n :: T2).
-                  (Sing (n :: T0)) -> (Sing (n :: T2)) -> Sing ((:||) n n)
-    type ST2 = (Sing :: T2 -> GHC.Types.Type)
-    instance SingKind T2 where
-      type Demote T2 = T2
-      fromSing SN2 = N2
-      fromSing (SC2 b b) = (C2 (fromSing b)) (fromSing b)
-      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) }
-      toSing ((:||) (b :: Demote T0) (b :: Demote T2))
-        = case
-              ((,) (toSing b :: SomeSing T0)) (toSing b :: SomeSing T2)
-          of {
-            (,) (SomeSing c) (SomeSing c) -> SomeSing (((:%||) c) c) }
-    instance SingI N2 where
-      sing = SN2
-    instance (SingI n, SingI n) => SingI (C2 (n :: T0) (n :: T2)) where
-      sing = (SC2 sing) sing
-    instance SingI (C2Sym0 :: (~>) T0 ((~>) T2 T2)) where
-      sing = (singFun2 @C2Sym0) SC2
-    instance SingI (TyCon2 C2 :: (~>) T0 ((~>) T2 T2)) where
-      sing = (singFun2 @(TyCon2 C2)) SC2
-    instance SingI d => SingI (C2Sym1 (d :: T0) :: (~>) T2 T2) where
-      sing = (singFun1 @(C2Sym1 (d :: T0))) (SC2 (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 (C2 (d :: T0)) :: (~>) T2 T2) where
-      sing = (singFun1 @(TyCon1 (C2 (d :: T0)))) (SC2 (sing @d))
-    instance (SingI n, SingI n) =>
-             SingI ((:||) (n :: T0) (n :: T2)) where
-      sing = ((:%||) sing) sing
-    instance SingI ((:||@#@$) :: (~>) T0 ((~>) T2 T2)) where
-      sing = (singFun2 @(:||@#@$)) (:%||)
-    instance SingI (TyCon2 (:||) :: (~>) T0 ((~>) T2 T2)) where
-      sing = (singFun2 @(TyCon2 (:||))) (:%||)
-    instance SingI d =>
-             SingI ((:||@#@$$) (d :: T0) :: (~>) T2 T2) where
-      sing = (singFun1 @((:||@#@$$) (d :: T0))) ((:%||) (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 ((:||) (d :: T0)) :: (~>) T2 T2) where
-      sing = (singFun1 @(TyCon1 ((:||) (d :: T0)))) ((:%||) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T159.ghc88.template b/tests/compile-and-dump/Singletons/T159.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T159.ghc88.template
@@ -0,0 +1,225 @@
+Singletons/T159.hs:0:0:: Splicing declarations
+    genSingletons [''T0, ''T1]
+  ======>
+    type ASym0 = 'A
+    type BSym0 = 'B
+    type CSym0 = 'C
+    type DSym0 = 'D
+    type ESym0 = 'E
+    type FSym0 = 'F
+    data ST0 :: T0 -> GHC.Types.Type
+      where
+        SA :: ST0 'A
+        SB :: ST0 'B
+        SC :: ST0 'C
+        SD :: ST0 'D
+        SE :: ST0 'E
+        SF :: ST0 'F
+    type instance Sing @T0 = ST0
+    instance SingKind T0 where
+      type Demote T0 = T0
+      fromSing SA = A
+      fromSing SB = B
+      fromSing SC = C
+      fromSing SD = D
+      fromSing SE = E
+      fromSing SF = F
+      toSing A = SomeSing SA
+      toSing B = SomeSing SB
+      toSing C = SomeSing SC
+      toSing D = SomeSing SD
+      toSing E = SomeSing SE
+      toSing F = SomeSing SF
+    instance SingI 'A where
+      sing = SA
+    instance SingI 'B where
+      sing = SB
+    instance SingI 'C where
+      sing = SC
+    instance SingI 'D where
+      sing = SD
+    instance SingI 'E where
+      sing = SE
+    instance SingI 'F where
+      sing = SF
+    type N1Sym0 = 'N1
+    type C1Sym2 (t0123456789876543210 :: T0) (t0123456789876543210 :: T1) =
+        'C1 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (C1Sym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) C1Sym1KindInference) ())
+    data C1Sym1 (t0123456789876543210 :: T0) :: (~>) T1 T1
+      where
+        C1Sym1KindInference :: forall t0123456789876543210
+                                      t0123456789876543210
+                                      arg. SameKind (Apply (C1Sym1 t0123456789876543210) arg) (C1Sym2 t0123456789876543210 arg) =>
+                               C1Sym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (C1Sym1 t0123456789876543210) t0123456789876543210 = 'C1 t0123456789876543210 t0123456789876543210
+    infixr 5 `C1Sym1`
+    instance SuppressUnusedWarnings C1Sym0 where
+      suppressUnusedWarnings = snd (((,) C1Sym0KindInference) ())
+    data C1Sym0 :: (~>) T0 ((~>) T1 T1)
+      where
+        C1Sym0KindInference :: forall t0123456789876543210
+                                      arg. SameKind (Apply C1Sym0 arg) (C1Sym1 arg) =>
+                               C1Sym0 t0123456789876543210
+    type instance Apply C1Sym0 t0123456789876543210 = C1Sym1 t0123456789876543210
+    infixr 5 `C1Sym0`
+    type (:&&@#@$$$) (t0123456789876543210 :: T0) (t0123456789876543210 :: T1) =
+        '(:&&) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings ((:&&@#@$$) t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (::&&@#@$$###)) ())
+    data (:&&@#@$$) (t0123456789876543210 :: T0) :: (~>) T1 T1
+      where
+        (::&&@#@$$###) :: forall t0123456789876543210
+                                 t0123456789876543210
+                                 arg. SameKind (Apply ((:&&@#@$$) t0123456789876543210) arg) ((:&&@#@$$$) t0123456789876543210 arg) =>
+                          (:&&@#@$$) t0123456789876543210 t0123456789876543210
+    type instance Apply ((:&&@#@$$) t0123456789876543210) t0123456789876543210 = '(:&&) t0123456789876543210 t0123456789876543210
+    infixr 5 :&&@#@$$
+    instance SuppressUnusedWarnings (:&&@#@$) where
+      suppressUnusedWarnings = snd (((,) (::&&@#@$###)) ())
+    data (:&&@#@$) :: (~>) T0 ((~>) T1 T1)
+      where
+        (::&&@#@$###) :: forall t0123456789876543210
+                                arg. SameKind (Apply (:&&@#@$) arg) ((:&&@#@$$) arg) =>
+                         (:&&@#@$) t0123456789876543210
+    type instance Apply (:&&@#@$) t0123456789876543210 = (:&&@#@$$) t0123456789876543210
+    infixr 5 :&&@#@$
+    data ST1 :: T1 -> GHC.Types.Type
+      where
+        SN1 :: ST1 'N1
+        SC1 :: forall (n :: T0) (n :: T1).
+               (Sing (n :: T0)) -> (Sing (n :: T1)) -> ST1 ('C1 n n)
+        (:%&&) :: forall (n :: T0) (n :: T1).
+                  (Sing (n :: T0)) -> (Sing (n :: T1)) -> ST1 ('(:&&) n n)
+    type instance Sing @T1 = ST1
+    instance SingKind T1 where
+      type Demote T1 = T1
+      fromSing SN1 = N1
+      fromSing (SC1 b b) = (C1 (fromSing b)) (fromSing b)
+      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) }
+      toSing ((:&&) (b :: Demote T0) (b :: Demote T1))
+        = case
+              ((,) (toSing b :: SomeSing T0)) (toSing b :: SomeSing T1)
+          of {
+            (,) (SomeSing c) (SomeSing c) -> SomeSing (((:%&&) c) c) }
+    infixr 5 `SC1`
+    infixr 5 :%&&
+    instance SingI 'N1 where
+      sing = SN1
+    instance (SingI n, SingI n) =>
+             SingI ('C1 (n :: T0) (n :: T1)) where
+      sing = (SC1 sing) sing
+    instance SingI (C1Sym0 :: (~>) T0 ((~>) T1 T1)) where
+      sing = (singFun2 @C1Sym0) SC1
+    instance SingI d => SingI (C1Sym1 (d :: T0) :: (~>) T1 T1) where
+      sing = (singFun1 @(C1Sym1 (d :: T0))) (SC1 (sing @d))
+    instance (SingI n, SingI n) =>
+             SingI ('(:&&) (n :: T0) (n :: T1)) where
+      sing = ((:%&&) sing) sing
+    instance SingI ((:&&@#@$) :: (~>) T0 ((~>) T1 T1)) where
+      sing = (singFun2 @(:&&@#@$)) (:%&&)
+    instance SingI d =>
+             SingI ((:&&@#@$$) (d :: T0) :: (~>) T1 T1) where
+      sing = (singFun1 @((:&&@#@$$) (d :: T0))) ((:%&&) (sing @d))
+Singletons/T159.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| infixr 5 :||
+          infixr 5 `C2`
+          
+          data T2 = N2 | C2 T0 T2 | T0 :|| T2 |]
+  ======>
+    data T2 = N2 | C2 T0 T2 | T0 :|| T2
+    infixr 5 `C2`
+    infixr 5 :||
+    type N2Sym0 = N2
+    type C2Sym2 (t0123456789876543210 :: T0) (t0123456789876543210 :: T2) =
+        C2 t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (C2Sym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) C2Sym1KindInference) ())
+    data C2Sym1 (t0123456789876543210 :: T0) :: (~>) T2 T2
+      where
+        C2Sym1KindInference :: forall t0123456789876543210
+                                      t0123456789876543210
+                                      arg. SameKind (Apply (C2Sym1 t0123456789876543210) arg) (C2Sym2 t0123456789876543210 arg) =>
+                               C2Sym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (C2Sym1 t0123456789876543210) t0123456789876543210 = C2 t0123456789876543210 t0123456789876543210
+    infixr 5 `C2Sym1`
+    instance SuppressUnusedWarnings C2Sym0 where
+      suppressUnusedWarnings = snd (((,) C2Sym0KindInference) ())
+    data C2Sym0 :: (~>) T0 ((~>) T2 T2)
+      where
+        C2Sym0KindInference :: forall t0123456789876543210
+                                      arg. SameKind (Apply C2Sym0 arg) (C2Sym1 arg) =>
+                               C2Sym0 t0123456789876543210
+    type instance Apply C2Sym0 t0123456789876543210 = C2Sym1 t0123456789876543210
+    infixr 5 `C2Sym0`
+    type (:||@#@$$$) (t0123456789876543210 :: T0) (t0123456789876543210 :: T2) =
+        (:||) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings ((:||@#@$$) t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (::||@#@$$###)) ())
+    data (:||@#@$$) (t0123456789876543210 :: T0) :: (~>) T2 T2
+      where
+        (::||@#@$$###) :: forall t0123456789876543210
+                                 t0123456789876543210
+                                 arg. SameKind (Apply ((:||@#@$$) t0123456789876543210) arg) ((:||@#@$$$) t0123456789876543210 arg) =>
+                          (:||@#@$$) t0123456789876543210 t0123456789876543210
+    type instance Apply ((:||@#@$$) t0123456789876543210) t0123456789876543210 = (:||) t0123456789876543210 t0123456789876543210
+    infixr 5 :||@#@$$
+    instance SuppressUnusedWarnings (:||@#@$) where
+      suppressUnusedWarnings = snd (((,) (::||@#@$###)) ())
+    data (:||@#@$) :: (~>) T0 ((~>) T2 T2)
+      where
+        (::||@#@$###) :: forall t0123456789876543210
+                                arg. SameKind (Apply (:||@#@$) arg) ((:||@#@$$) arg) =>
+                         (:||@#@$) t0123456789876543210
+    type instance Apply (:||@#@$) t0123456789876543210 = (:||@#@$$) t0123456789876543210
+    infixr 5 :||@#@$
+    infixr 5 :%||
+    infixr 5 `SC2`
+    data ST2 :: T2 -> GHC.Types.Type
+      where
+        SN2 :: ST2 N2
+        SC2 :: forall (n :: T0) (n :: T2).
+               (Sing (n :: T0)) -> (Sing (n :: T2)) -> ST2 (C2 n n)
+        (:%||) :: forall (n :: T0) (n :: T2).
+                  (Sing (n :: T0)) -> (Sing (n :: T2)) -> ST2 ((:||) n n)
+    type instance Sing @T2 = ST2
+    instance SingKind T2 where
+      type Demote T2 = T2
+      fromSing SN2 = N2
+      fromSing (SC2 b b) = (C2 (fromSing b)) (fromSing b)
+      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) }
+      toSing ((:||) (b :: Demote T0) (b :: Demote T2))
+        = case
+              ((,) (toSing b :: SomeSing T0)) (toSing b :: SomeSing T2)
+          of {
+            (,) (SomeSing c) (SomeSing c) -> SomeSing (((:%||) c) c) }
+    instance SingI N2 where
+      sing = SN2
+    instance (SingI n, SingI n) => SingI (C2 (n :: T0) (n :: T2)) where
+      sing = (SC2 sing) sing
+    instance SingI (C2Sym0 :: (~>) T0 ((~>) T2 T2)) where
+      sing = (singFun2 @C2Sym0) SC2
+    instance SingI d => SingI (C2Sym1 (d :: T0) :: (~>) T2 T2) where
+      sing = (singFun1 @(C2Sym1 (d :: T0))) (SC2 (sing @d))
+    instance (SingI n, SingI n) =>
+             SingI ((:||) (n :: T0) (n :: T2)) where
+      sing = ((:%||) sing) sing
+    instance SingI ((:||@#@$) :: (~>) T0 ((~>) T2 T2)) where
+      sing = (singFun2 @(:||@#@$)) (:%||)
+    instance SingI d =>
+             SingI ((:||@#@$$) (d :: T0) :: (~>) T2 T2) where
+      sing = (singFun1 @((:||@#@$$) (d :: T0))) ((:%||) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T160.ghc86.template b/tests/compile-and-dump/Singletons/T160.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T160.ghc86.template
+++ /dev/null
@@ -1,85 +0,0 @@
-Singletons/T160.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| foo :: (Num a, Eq a) => a -> a
-          foo x = if x == 0 then 1 else typeError $ ShowType x |]
-  ======>
-    foo :: (Num a, Eq a) => a -> a
-    foo x = if (x == 0) then 1 else (typeError $ ShowType x)
-    type Let0123456789876543210Scrutinee_0123456789876543210Sym1 x0123456789876543210 =
-        Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd
-            (((,)
-                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
-               ())
-    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210
-      where
-        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
-                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210
-    type family Let0123456789876543210Scrutinee_0123456789876543210 x where
-      Let0123456789876543210Scrutinee_0123456789876543210 x = Apply (Apply (==@#@$) x) (FromInteger 0)
-    type family Case_0123456789876543210 x t where
-      Case_0123456789876543210 x  'True = FromInteger 1
-      Case_0123456789876543210 x  'False = Apply (Apply ($@#@$) TypeErrorSym0) (Apply ShowTypeSym0 x)
-    type FooSym1 (a0123456789876543210 :: a0123456789876543210) =
-        Foo a0123456789876543210
-    instance SuppressUnusedWarnings FooSym0 where
-      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
-    data FooSym0 :: forall a0123456789876543210.
-                    (~>) a0123456789876543210 a0123456789876543210
-      where
-        FooSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
-                                FooSym0 a0123456789876543210
-    type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
-    type family Foo (a :: a) :: a where
-      Foo x = Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x)
-    sFoo ::
-      forall a (t :: a).
-      (SNum a, SEq a) => Sing t -> Sing (Apply FooSym0 t :: a)
-    sFoo (sX :: Sing x)
-      = let
-          sScrutinee_0123456789876543210 ::
-            Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x)
-          sScrutinee_0123456789876543210
-            = (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sX))
-                (sFromInteger (sing :: Sing 0))
-        in  (case sScrutinee_0123456789876543210 of
-               STrue -> sFromInteger (sing :: Sing 1)
-               SFalse
-                 -> (applySing ((applySing ((singFun2 @($@#@$)) (%$))) sTypeError))
-                      ((applySing ((singFun1 @ShowTypeSym0) SShowType)) sX)) ::
-              Sing (Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x) :: a)
-    instance (SNum a, SEq a) => SingI (FooSym0 :: (~>) a a) where
-      sing = (singFun1 @FooSym0) sFoo
-
-Singletons/T160.hs:0:0: error:
-    • t
-    • In the expression:
-        (applySing ((applySing ((singFun2 @($@#@$)) (%$))) sTypeError))
-          ((applySing ((singFun1 @ShowTypeSym0) SShowType)) sX)
-      In a case alternative:
-          SFalse
-            -> (applySing ((applySing ((singFun2 @($@#@$)) (%$))) sTypeError))
-                 ((applySing ((singFun1 @ShowTypeSym0) SShowType)) sX)
-      In the expression:
-          (case sScrutinee_0123456789876543210 of
-             STrue -> sFromInteger (sing :: Sing 1)
-             SFalse
-               -> (applySing ((applySing ((singFun2 @($@#@$)) (%$))) sTypeError))
-                    ((applySing ((singFun1 @ShowTypeSym0) SShowType)) sX)) ::
-            Sing (Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x) :: a)
-  |
-7 | $(singletons
-  |   ^^^^^^^^^^...
-
-Singletons/T160.hs:0:0: error:
-    • 1
-    • In the expression: Refl
-      In an equation for ‘f’: f = Refl
-   |
-13 | f = Refl
-   |     ^^^^
diff --git a/tests/compile-and-dump/Singletons/T160.ghc88.template b/tests/compile-and-dump/Singletons/T160.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T160.ghc88.template
@@ -0,0 +1,69 @@
+Singletons/T160.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| foo :: (Num a, Eq a) => a -> a
+          foo x = if x == 0 then 1 else typeError $ ShowType x |]
+  ======>
+    foo :: (Num a, Eq a) => a -> a
+    foo x = if (x == 0) then 1 else (typeError $ ShowType x)
+    type Let0123456789876543210Scrutinee_0123456789876543210Sym1 x0123456789876543210 =
+        Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd
+            (((,)
+                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
+               ())
+    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210
+      where
+        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
+                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210
+    type family Let0123456789876543210Scrutinee_0123456789876543210 x where
+      Let0123456789876543210Scrutinee_0123456789876543210 x = Apply (Apply (==@#@$) x) (FromInteger 0)
+    type family Case_0123456789876543210 x t where
+      Case_0123456789876543210 x 'True = FromInteger 1
+      Case_0123456789876543210 x 'False = Apply (Apply ($@#@$) TypeErrorSym0) (Apply ShowTypeSym0 x)
+    type FooSym1 (a0123456789876543210 :: a0123456789876543210) =
+        Foo a0123456789876543210
+    instance SuppressUnusedWarnings FooSym0 where
+      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
+    data FooSym0 :: forall a0123456789876543210.
+                    (~>) a0123456789876543210 a0123456789876543210
+      where
+        FooSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
+                                FooSym0 a0123456789876543210
+    type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
+    type family Foo (a :: a) :: a where
+      Foo x = Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x)
+    sFoo ::
+      forall a (t :: a).
+      (SNum a, SEq a) => Sing t -> Sing (Apply FooSym0 t :: a)
+    sFoo (sX :: Sing x)
+      = let
+          sScrutinee_0123456789876543210 ::
+            Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x)
+          sScrutinee_0123456789876543210
+            = (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sX))
+                (sFromInteger (sing :: Sing 0))
+        in
+          (id
+             @(Sing (Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x) :: a)))
+            (case sScrutinee_0123456789876543210 of
+               STrue -> sFromInteger (sing :: Sing 1)
+               SFalse
+                 -> (applySing
+                       ((applySing ((singFun2 @($@#@$)) (%$)))
+                          ((singFun1 @TypeErrorSym0) sTypeError)))
+                      ((applySing ((singFun1 @ShowTypeSym0) SShowType)) sX))
+    instance (SNum a, SEq a) => SingI (FooSym0 :: (~>) a a) where
+      sing = (singFun1 @FooSym0) sFoo
+
+Singletons/T160.hs:0:0: error:
+    • 1
+    • In the expression: Refl
+      In an equation for ‘f’: f = Refl
+   |
+13 | f = Refl
+   |     ^^^^
diff --git a/tests/compile-and-dump/Singletons/T163.ghc86.template b/tests/compile-and-dump/Singletons/T163.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T163.ghc86.template
+++ /dev/null
@@ -1,51 +0,0 @@
-Singletons/T163.hs:0:0:: Splicing declarations
-    singletons [d| data a + b = L a | R b |]
-  ======>
-    data (+) a b = L a | R b
-    type LSym1 (t0123456789876543210 :: a0123456789876543210) =
-        L t0123456789876543210
-    instance SuppressUnusedWarnings LSym0 where
-      suppressUnusedWarnings = snd (((,) LSym0KindInference) ())
-    data LSym0 :: forall a0123456789876543210 b0123456789876543210.
-                  (~>) a0123456789876543210 ((+) a0123456789876543210 b0123456789876543210)
-      where
-        LSym0KindInference :: forall t0123456789876543210
-                                     arg. SameKind (Apply LSym0 arg) (LSym1 arg) =>
-                              LSym0 t0123456789876543210
-    type instance Apply LSym0 t0123456789876543210 = L t0123456789876543210
-    type RSym1 (t0123456789876543210 :: b0123456789876543210) =
-        R t0123456789876543210
-    instance SuppressUnusedWarnings RSym0 where
-      suppressUnusedWarnings = snd (((,) RSym0KindInference) ())
-    data RSym0 :: forall a0123456789876543210 b0123456789876543210.
-                  (~>) b0123456789876543210 ((+) a0123456789876543210 b0123456789876543210)
-      where
-        RSym0KindInference :: forall t0123456789876543210
-                                     arg. SameKind (Apply RSym0 arg) (RSym1 arg) =>
-                              RSym0 t0123456789876543210
-    type instance Apply RSym0 t0123456789876543210 = R t0123456789876543210
-    data instance Sing :: (+) a b -> GHC.Types.Type
-      where
-        SL :: forall a (n :: a). (Sing (n :: a)) -> Sing (L n)
-        SR :: forall b (n :: b). (Sing (n :: b)) -> Sing (R n)
-    type (%+) = (Sing :: (+) a b -> GHC.Types.Type)
-    instance (SingKind a, SingKind b) => SingKind ((+) a b) where
-      type Demote ((+) a b) = (+) (Demote a) (Demote b)
-      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) }
-      toSing (R (b :: Demote b))
-        = case toSing b :: SomeSing b of { SomeSing c -> SomeSing (SR c) }
-    instance SingI n => SingI (L (n :: a)) where
-      sing = SL sing
-    instance SingI (LSym0 :: (~>) a ((+) a b)) where
-      sing = (singFun1 @LSym0) SL
-    instance SingI (TyCon1 L :: (~>) a ((+) a b)) where
-      sing = (singFun1 @(TyCon1 L)) SL
-    instance SingI n => SingI (R (n :: b)) where
-      sing = SR sing
-    instance SingI (RSym0 :: (~>) b ((+) a b)) where
-      sing = (singFun1 @RSym0) SR
-    instance SingI (TyCon1 R :: (~>) b ((+) a b)) where
-      sing = (singFun1 @(TyCon1 R)) SR
diff --git a/tests/compile-and-dump/Singletons/T163.ghc88.template b/tests/compile-and-dump/Singletons/T163.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T163.ghc88.template
@@ -0,0 +1,47 @@
+Singletons/T163.hs:0:0:: Splicing declarations
+    singletons [d| data a + b = L a | R b |]
+  ======>
+    data (+) a b = L a | R b
+    type LSym1 (t0123456789876543210 :: a0123456789876543210) =
+        L t0123456789876543210
+    instance SuppressUnusedWarnings LSym0 where
+      suppressUnusedWarnings = snd (((,) LSym0KindInference) ())
+    data LSym0 :: forall a0123456789876543210 b0123456789876543210.
+                  (~>) a0123456789876543210 ((+) a0123456789876543210 b0123456789876543210)
+      where
+        LSym0KindInference :: forall t0123456789876543210
+                                     arg. SameKind (Apply LSym0 arg) (LSym1 arg) =>
+                              LSym0 t0123456789876543210
+    type instance Apply LSym0 t0123456789876543210 = L t0123456789876543210
+    type RSym1 (t0123456789876543210 :: b0123456789876543210) =
+        R t0123456789876543210
+    instance SuppressUnusedWarnings RSym0 where
+      suppressUnusedWarnings = snd (((,) RSym0KindInference) ())
+    data RSym0 :: forall b0123456789876543210 a0123456789876543210.
+                  (~>) b0123456789876543210 ((+) a0123456789876543210 b0123456789876543210)
+      where
+        RSym0KindInference :: forall t0123456789876543210
+                                     arg. SameKind (Apply RSym0 arg) (RSym1 arg) =>
+                              RSym0 t0123456789876543210
+    type instance Apply RSym0 t0123456789876543210 = R t0123456789876543210
+    data (%+) :: forall a b. (+) a b -> GHC.Types.Type
+      where
+        SL :: forall a (n :: a). (Sing (n :: a)) -> (%+) (L n)
+        SR :: forall b (n :: b). (Sing (n :: b)) -> (%+) (R n)
+    type instance Sing @((+) a b) = (%+)
+    instance (SingKind a, SingKind b) => SingKind ((+) a b) where
+      type Demote ((+) a b) = (+) (Demote a) (Demote b)
+      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) }
+      toSing (R (b :: Demote b))
+        = case toSing b :: SomeSing b of { SomeSing c -> SomeSing (SR c) }
+    instance SingI n => SingI (L (n :: a)) where
+      sing = SL sing
+    instance SingI (LSym0 :: (~>) a ((+) a b)) where
+      sing = (singFun1 @LSym0) SL
+    instance SingI n => SingI (R (n :: b)) where
+      sing = SR sing
+    instance SingI (RSym0 :: (~>) b ((+) a b)) where
+      sing = (singFun1 @RSym0) SR
diff --git a/tests/compile-and-dump/Singletons/T166.ghc86.template b/tests/compile-and-dump/Singletons/T166.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T166.ghc86.template
+++ /dev/null
@@ -1,139 +0,0 @@
-Singletons/T166.hs:(0,0)-(0,0): Splicing declarations
-    singletonsOnly
-      [d| class Foo a where
-            foosPrec :: Nat -> a -> [Bool] -> [Bool]
-            foo :: a -> [Bool]
-            foo x s = foosPrec 0 x s |]
-  ======>
-    type FoosPrecSym3 (arg0123456789876543210 :: Nat) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: [Bool]) =
-        FoosPrec arg0123456789876543210 arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings (FoosPrecSym2 arg0123456789876543210 arg0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) FoosPrecSym2KindInference) ())
-    data FoosPrecSym2 (arg0123456789876543210 :: Nat) (arg0123456789876543210 :: a0123456789876543210) :: (~>) [Bool] [Bool]
-      where
-        FoosPrecSym2KindInference :: forall arg0123456789876543210
-                                            arg0123456789876543210
-                                            arg0123456789876543210
-                                            arg. SameKind (Apply (FoosPrecSym2 arg0123456789876543210 arg0123456789876543210) arg) (FoosPrecSym3 arg0123456789876543210 arg0123456789876543210 arg) =>
-                                     FoosPrecSym2 arg0123456789876543210 arg0123456789876543210 arg0123456789876543210
-    type instance Apply (FoosPrecSym2 arg0123456789876543210 arg0123456789876543210) arg0123456789876543210 = FoosPrec arg0123456789876543210 arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings (FoosPrecSym1 arg0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) FoosPrecSym1KindInference) ())
-    data FoosPrecSym1 (arg0123456789876543210 :: Nat) :: forall a0123456789876543210.
-                                                         (~>) a0123456789876543210 ((~>) [Bool] [Bool])
-      where
-        FoosPrecSym1KindInference :: forall arg0123456789876543210
-                                            arg0123456789876543210
-                                            arg. SameKind (Apply (FoosPrecSym1 arg0123456789876543210) arg) (FoosPrecSym2 arg0123456789876543210 arg) =>
-                                     FoosPrecSym1 arg0123456789876543210 arg0123456789876543210
-    type instance Apply (FoosPrecSym1 arg0123456789876543210) arg0123456789876543210 = FoosPrecSym2 arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings FoosPrecSym0 where
-      suppressUnusedWarnings = snd (((,) FoosPrecSym0KindInference) ())
-    data FoosPrecSym0 :: forall a0123456789876543210.
-                         (~>) Nat ((~>) a0123456789876543210 ((~>) [Bool] [Bool]))
-      where
-        FoosPrecSym0KindInference :: forall arg0123456789876543210
-                                            arg. SameKind (Apply FoosPrecSym0 arg) (FoosPrecSym1 arg) =>
-                                     FoosPrecSym0 arg0123456789876543210
-    type instance Apply FoosPrecSym0 arg0123456789876543210 = FoosPrecSym1 arg0123456789876543210
-    type FooSym1 (arg0123456789876543210 :: a0123456789876543210) =
-        Foo arg0123456789876543210
-    instance SuppressUnusedWarnings FooSym0 where
-      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
-    data FooSym0 :: forall a0123456789876543210.
-                    (~>) a0123456789876543210 [Bool]
-      where
-        FooSym0KindInference :: forall arg0123456789876543210
-                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
-                                FooSym0 arg0123456789876543210
-    type instance Apply FooSym0 arg0123456789876543210 = Foo arg0123456789876543210
-    type family Lambda_0123456789876543210 x t where
-      Lambda_0123456789876543210 x s = Apply (Apply (Apply FoosPrecSym0 (Data.Singletons.Prelude.Num.FromInteger 0)) x) s
-    type Lambda_0123456789876543210Sym2 x0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
-    type family Foo_0123456789876543210 (a :: a) :: [Bool] where
-      Foo_0123456789876543210 x = Apply Lambda_0123456789876543210Sym0 x
-    type Foo_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) =
-        Foo_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Foo_0123456789876543210Sym0KindInference) ())
-    data Foo_0123456789876543210Sym0 :: forall a0123456789876543210.
-                                        (~>) a0123456789876543210 [Bool]
-      where
-        Foo_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                           arg. SameKind (Apply Foo_0123456789876543210Sym0 arg) (Foo_0123456789876543210Sym1 arg) =>
-                                                    Foo_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Foo_0123456789876543210Sym0 a0123456789876543210 = Foo_0123456789876543210 a0123456789876543210
-    class PFoo (a :: GHC.Types.Type) where
-      type FoosPrec (arg :: Nat) (arg :: a) (arg :: [Bool]) :: [Bool]
-      type Foo (arg :: a) :: [Bool]
-      type Foo a = Apply Foo_0123456789876543210Sym0 a
-    class SFoo a where
-      sFoosPrec ::
-        forall (t :: Nat) (t :: a) (t :: [Bool]).
-        Sing t
-        -> Sing t
-           -> Sing t
-              -> Sing (Apply (Apply (Apply FoosPrecSym0 t) t) t :: [Bool])
-      sFoo :: forall (t :: a). Sing t -> Sing (Apply FooSym0 t :: [Bool])
-      default sFoo ::
-                forall (t :: a).
-                (Apply FooSym0 t :: [Bool])
-                ~ Apply Foo_0123456789876543210Sym0 t =>
-                Sing t -> Sing (Apply FooSym0 t :: [Bool])
-      sFoo (sX :: Sing x)
-        = (singFun1 @(Apply Lambda_0123456789876543210Sym0 x))
-            (\ sS
-               -> case sS of {
-                    (_ :: Sing s)
-                      -> (applySing
-                            ((applySing
-                                ((applySing ((singFun3 @FoosPrecSym0) sFoosPrec))
-                                   (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 0))))
-                               sX))
-                           sS })
-    instance SFoo a =>
-             SingI (FoosPrecSym0 :: (~>) Nat ((~>) a ((~>) [Bool] [Bool]))) where
-      sing = (singFun3 @FoosPrecSym0) sFoosPrec
-    instance (SFoo a, SingI d) =>
-             SingI (FoosPrecSym1 (d :: Nat) :: (~>) a ((~>) [Bool] [Bool])) where
-      sing = (singFun2 @(FoosPrecSym1 (d :: Nat))) (sFoosPrec (sing @d))
-    instance (SFoo a, SingI d, SingI d) =>
-             SingI (FoosPrecSym2 (d :: Nat) (d :: a) :: (~>) [Bool] [Bool]) where
-      sing
-        = (singFun1 @(FoosPrecSym2 (d :: Nat) (d :: a)))
-            ((sFoosPrec (sing @d)) (sing @d))
-    instance SFoo a => SingI (FooSym0 :: (~>) a [Bool]) where
-      sing = (singFun1 @FooSym0) sFoo
-
-Singletons/T166.hs:0:0: error:
-    • Expecting one more argument to ‘Apply Lambda_0123456789876543210Sym0 x’
-      Expected kind ‘[Bool]’,
-        but ‘Apply Lambda_0123456789876543210Sym0 x’ has kind ‘TyFun
-                                                                 [Bool] [Bool]
-                                                               -> Type’
-    • In the type ‘Apply Lambda_0123456789876543210Sym0 x’
-      In the type family declaration for ‘Foo_0123456789876543210’
-   |
-14 | $(singletonsOnly [d|
-   |   ^^^^^^^^^^^^^^^^^^...
diff --git a/tests/compile-and-dump/Singletons/T166.ghc88.template b/tests/compile-and-dump/Singletons/T166.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T166.ghc88.template
@@ -0,0 +1,139 @@
+Singletons/T166.hs:(0,0)-(0,0): Splicing declarations
+    singletonsOnly
+      [d| class Foo a where
+            foosPrec :: Nat -> a -> [Bool] -> [Bool]
+            foo :: a -> [Bool]
+            foo x s = foosPrec 0 x s |]
+  ======>
+    type FoosPrecSym3 (arg0123456789876543210 :: Nat) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: [Bool]) =
+        FoosPrec arg0123456789876543210 arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings (FoosPrecSym2 arg0123456789876543210 arg0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) FoosPrecSym2KindInference) ())
+    data FoosPrecSym2 (arg0123456789876543210 :: Nat) (arg0123456789876543210 :: a0123456789876543210) :: (~>) [Bool] [Bool]
+      where
+        FoosPrecSym2KindInference :: forall arg0123456789876543210
+                                            arg0123456789876543210
+                                            arg0123456789876543210
+                                            arg. SameKind (Apply (FoosPrecSym2 arg0123456789876543210 arg0123456789876543210) arg) (FoosPrecSym3 arg0123456789876543210 arg0123456789876543210 arg) =>
+                                     FoosPrecSym2 arg0123456789876543210 arg0123456789876543210 arg0123456789876543210
+    type instance Apply (FoosPrecSym2 arg0123456789876543210 arg0123456789876543210) arg0123456789876543210 = FoosPrec arg0123456789876543210 arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings (FoosPrecSym1 arg0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) FoosPrecSym1KindInference) ())
+    data FoosPrecSym1 (arg0123456789876543210 :: Nat) :: forall a0123456789876543210.
+                                                         (~>) a0123456789876543210 ((~>) [Bool] [Bool])
+      where
+        FoosPrecSym1KindInference :: forall arg0123456789876543210
+                                            arg0123456789876543210
+                                            arg. SameKind (Apply (FoosPrecSym1 arg0123456789876543210) arg) (FoosPrecSym2 arg0123456789876543210 arg) =>
+                                     FoosPrecSym1 arg0123456789876543210 arg0123456789876543210
+    type instance Apply (FoosPrecSym1 arg0123456789876543210) arg0123456789876543210 = FoosPrecSym2 arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings FoosPrecSym0 where
+      suppressUnusedWarnings = snd (((,) FoosPrecSym0KindInference) ())
+    data FoosPrecSym0 :: forall a0123456789876543210.
+                         (~>) Nat ((~>) a0123456789876543210 ((~>) [Bool] [Bool]))
+      where
+        FoosPrecSym0KindInference :: forall arg0123456789876543210
+                                            arg. SameKind (Apply FoosPrecSym0 arg) (FoosPrecSym1 arg) =>
+                                     FoosPrecSym0 arg0123456789876543210
+    type instance Apply FoosPrecSym0 arg0123456789876543210 = FoosPrecSym1 arg0123456789876543210
+    type FooSym1 (arg0123456789876543210 :: a0123456789876543210) =
+        Foo arg0123456789876543210
+    instance SuppressUnusedWarnings FooSym0 where
+      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
+    data FooSym0 :: forall a0123456789876543210.
+                    (~>) a0123456789876543210 [Bool]
+      where
+        FooSym0KindInference :: forall arg0123456789876543210
+                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
+                                FooSym0 arg0123456789876543210
+    type instance Apply FooSym0 arg0123456789876543210 = Foo arg0123456789876543210
+    type family Lambda_0123456789876543210 x t where
+      Lambda_0123456789876543210 x s = Apply (Apply (Apply FoosPrecSym0 (Data.Singletons.Prelude.Num.FromInteger 0)) x) s
+    type Lambda_0123456789876543210Sym2 x0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
+    type family Foo_0123456789876543210 (a :: a) :: [Bool] where
+      Foo_0123456789876543210 x = Apply Lambda_0123456789876543210Sym0 x
+    type Foo_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) =
+        Foo_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Foo_0123456789876543210Sym0KindInference) ())
+    data Foo_0123456789876543210Sym0 :: forall a0123456789876543210.
+                                        (~>) a0123456789876543210 [Bool]
+      where
+        Foo_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                           arg. SameKind (Apply Foo_0123456789876543210Sym0 arg) (Foo_0123456789876543210Sym1 arg) =>
+                                                    Foo_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Foo_0123456789876543210Sym0 a0123456789876543210 = Foo_0123456789876543210 a0123456789876543210
+    class PFoo (a :: GHC.Types.Type) where
+      type FoosPrec (arg :: Nat) (arg :: a) (arg :: [Bool]) :: [Bool]
+      type Foo (arg :: a) :: [Bool]
+      type Foo a = Apply Foo_0123456789876543210Sym0 a
+    class SFoo a where
+      sFoosPrec ::
+        forall (t :: Nat) (t :: a) (t :: [Bool]).
+        Sing t
+        -> Sing t
+           -> Sing t
+              -> Sing (Apply (Apply (Apply FoosPrecSym0 t) t) t :: [Bool])
+      sFoo :: forall (t :: a). Sing t -> Sing (Apply FooSym0 t :: [Bool])
+      default sFoo ::
+                forall (t :: a).
+                ((Apply FooSym0 t :: [Bool])
+                 ~ Apply Foo_0123456789876543210Sym0 t) =>
+                Sing t -> Sing (Apply FooSym0 t :: [Bool])
+      sFoo (sX :: Sing x)
+        = (singFun1 @(Apply Lambda_0123456789876543210Sym0 x))
+            (\ sS
+               -> case sS of {
+                    (_ :: Sing s)
+                      -> (applySing
+                            ((applySing
+                                ((applySing ((singFun3 @FoosPrecSym0) sFoosPrec))
+                                   (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 0))))
+                               sX))
+                           sS })
+    instance SFoo a =>
+             SingI (FoosPrecSym0 :: (~>) Nat ((~>) a ((~>) [Bool] [Bool]))) where
+      sing = (singFun3 @FoosPrecSym0) sFoosPrec
+    instance (SFoo a, SingI d) =>
+             SingI (FoosPrecSym1 (d :: Nat) :: (~>) a ((~>) [Bool] [Bool])) where
+      sing = (singFun2 @(FoosPrecSym1 (d :: Nat))) (sFoosPrec (sing @d))
+    instance (SFoo a, SingI d, SingI d) =>
+             SingI (FoosPrecSym2 (d :: Nat) (d :: a) :: (~>) [Bool] [Bool]) where
+      sing
+        = (singFun1 @(FoosPrecSym2 (d :: Nat) (d :: a)))
+            ((sFoosPrec (sing @d)) (sing @d))
+    instance SFoo a => SingI (FooSym0 :: (~>) a [Bool]) where
+      sing = (singFun1 @FooSym0) sFoo
+
+Singletons/T166.hs:0:0: error:
+    • Expecting one more argument to ‘Apply Lambda_0123456789876543210Sym0 x’
+      Expected kind ‘[Bool]’,
+        but ‘Apply Lambda_0123456789876543210Sym0 x’ has kind ‘TyFun
+                                                                 [Bool] [Bool]
+                                                               -> Type’
+    • In the type ‘Apply Lambda_0123456789876543210Sym0 x’
+      In the type family declaration for ‘Foo_0123456789876543210’
+   |
+14 | $(singletonsOnly [d|
+   |   ^^^^^^^^^^^^^^^^^^...
diff --git a/tests/compile-and-dump/Singletons/T167.ghc86.template b/tests/compile-and-dump/Singletons/T167.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T167.ghc86.template
+++ /dev/null
@@ -1,178 +0,0 @@
-Singletons/T167.hs:(0,0)-(0,0): Splicing declarations
-    singletonsOnly
-      [d| class Foo a where
-            foosPrec :: Nat -> a -> DiffList
-            fooList :: a -> DiffList
-            fooList = undefined
-          
-          instance Foo a => Foo [a] where
-            foosPrec _ = fooList |]
-  ======>
-    type FoosPrecSym3 (arg0123456789876543210 :: Nat) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: [Bool]) =
-        FoosPrec arg0123456789876543210 arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings (FoosPrecSym2 arg0123456789876543210 arg0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) FoosPrecSym2KindInference) ())
-    data FoosPrecSym2 (arg0123456789876543210 :: Nat) (arg0123456789876543210 :: a0123456789876543210) :: (~>) [Bool] [Bool]
-      where
-        FoosPrecSym2KindInference :: forall arg0123456789876543210
-                                            arg0123456789876543210
-                                            arg0123456789876543210
-                                            arg. SameKind (Apply (FoosPrecSym2 arg0123456789876543210 arg0123456789876543210) arg) (FoosPrecSym3 arg0123456789876543210 arg0123456789876543210 arg) =>
-                                     FoosPrecSym2 arg0123456789876543210 arg0123456789876543210 arg0123456789876543210
-    type instance Apply (FoosPrecSym2 arg0123456789876543210 arg0123456789876543210) arg0123456789876543210 = FoosPrec arg0123456789876543210 arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings (FoosPrecSym1 arg0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) FoosPrecSym1KindInference) ())
-    data FoosPrecSym1 (arg0123456789876543210 :: Nat) :: forall a0123456789876543210.
-                                                         (~>) a0123456789876543210 ((~>) [Bool] [Bool])
-      where
-        FoosPrecSym1KindInference :: forall arg0123456789876543210
-                                            arg0123456789876543210
-                                            arg. SameKind (Apply (FoosPrecSym1 arg0123456789876543210) arg) (FoosPrecSym2 arg0123456789876543210 arg) =>
-                                     FoosPrecSym1 arg0123456789876543210 arg0123456789876543210
-    type instance Apply (FoosPrecSym1 arg0123456789876543210) arg0123456789876543210 = FoosPrecSym2 arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings FoosPrecSym0 where
-      suppressUnusedWarnings = snd (((,) FoosPrecSym0KindInference) ())
-    data FoosPrecSym0 :: forall a0123456789876543210.
-                         (~>) Nat ((~>) a0123456789876543210 ((~>) [Bool] [Bool]))
-      where
-        FoosPrecSym0KindInference :: forall arg0123456789876543210
-                                            arg. SameKind (Apply FoosPrecSym0 arg) (FoosPrecSym1 arg) =>
-                                     FoosPrecSym0 arg0123456789876543210
-    type instance Apply FoosPrecSym0 arg0123456789876543210 = FoosPrecSym1 arg0123456789876543210
-    type FooListSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: [Bool]) =
-        FooList arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings (FooListSym1 arg0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) FooListSym1KindInference) ())
-    data FooListSym1 (arg0123456789876543210 :: a0123456789876543210) :: (~>) [Bool] [Bool]
-      where
-        FooListSym1KindInference :: forall arg0123456789876543210
-                                           arg0123456789876543210
-                                           arg. SameKind (Apply (FooListSym1 arg0123456789876543210) arg) (FooListSym2 arg0123456789876543210 arg) =>
-                                    FooListSym1 arg0123456789876543210 arg0123456789876543210
-    type instance Apply (FooListSym1 arg0123456789876543210) arg0123456789876543210 = FooList arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings FooListSym0 where
-      suppressUnusedWarnings = snd (((,) FooListSym0KindInference) ())
-    data FooListSym0 :: forall a0123456789876543210.
-                        (~>) a0123456789876543210 ((~>) [Bool] [Bool])
-      where
-        FooListSym0KindInference :: forall arg0123456789876543210
-                                           arg. SameKind (Apply FooListSym0 arg) (FooListSym1 arg) =>
-                                    FooListSym0 arg0123456789876543210
-    type instance Apply FooListSym0 arg0123456789876543210 = FooListSym1 arg0123456789876543210
-    type family FooList_0123456789876543210 (a :: a) (a :: [Bool]) :: [Bool] where
-      FooList_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply UndefinedSym0 a_0123456789876543210) a_0123456789876543210
-    type FooList_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: [Bool]) =
-        FooList_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (FooList_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) FooList_0123456789876543210Sym1KindInference) ())
-    data FooList_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) [Bool] [Bool]
-      where
-        FooList_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (FooList_0123456789876543210Sym1 a0123456789876543210) arg) (FooList_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        FooList_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (FooList_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = FooList_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings FooList_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) FooList_0123456789876543210Sym0KindInference) ())
-    data FooList_0123456789876543210Sym0 :: forall a0123456789876543210.
-                                            (~>) a0123456789876543210 ((~>) [Bool] [Bool])
-      where
-        FooList_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply FooList_0123456789876543210Sym0 arg) (FooList_0123456789876543210Sym1 arg) =>
-                                                        FooList_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply FooList_0123456789876543210Sym0 a0123456789876543210 = FooList_0123456789876543210Sym1 a0123456789876543210
-    class PFoo (a :: GHC.Types.Type) where
-      type FoosPrec (arg :: Nat) (arg :: a) (arg :: [Bool]) :: [Bool]
-      type FooList (arg :: a) (arg :: [Bool]) :: [Bool]
-      type FooList a a = Apply (Apply FooList_0123456789876543210Sym0 a) a
-    type family FoosPrec_0123456789876543210 (a :: Nat) (a :: [a]) (a :: [Bool]) :: [Bool] where
-      FoosPrec_0123456789876543210 _ a_0123456789876543210 a_0123456789876543210 = Apply (Apply FooListSym0 a_0123456789876543210) a_0123456789876543210
-    type FoosPrec_0123456789876543210Sym3 (a0123456789876543210 :: Nat) (a0123456789876543210 :: [a0123456789876543210]) (a0123456789876543210 :: [Bool]) =
-        FoosPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) FoosPrec_0123456789876543210Sym2KindInference) ())
-    data FoosPrec_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: [a0123456789876543210]) :: (~>) [Bool] [Bool]
-      where
-        FoosPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                a0123456789876543210
-                                                                a0123456789876543210
-                                                                arg. SameKind (Apply (FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (FoosPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                         FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = FoosPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (FoosPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) FoosPrec_0123456789876543210Sym1KindInference) ())
-    data FoosPrec_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: forall a0123456789876543210.
-                                                                           (~>) [a0123456789876543210] ((~>) [Bool] [Bool])
-      where
-        FoosPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                a0123456789876543210
-                                                                arg. SameKind (Apply (FoosPrec_0123456789876543210Sym1 a0123456789876543210) arg) (FoosPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                         FoosPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (FoosPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings FoosPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) FoosPrec_0123456789876543210Sym0KindInference) ())
-    data FoosPrec_0123456789876543210Sym0 :: forall a0123456789876543210.
-                                             (~>) Nat ((~>) [a0123456789876543210] ((~>) [Bool] [Bool]))
-      where
-        FoosPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply FoosPrec_0123456789876543210Sym0 arg) (FoosPrec_0123456789876543210Sym1 arg) =>
-                                                         FoosPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply FoosPrec_0123456789876543210Sym0 a0123456789876543210 = FoosPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PFoo [a] where
-      type FoosPrec a a a = Apply (Apply (Apply FoosPrec_0123456789876543210Sym0 a) a) a
-    class SFoo a where
-      sFoosPrec ::
-        forall (t :: Nat) (t :: a) (t :: [Bool]).
-        Sing t
-        -> Sing t
-           -> Sing t
-              -> Sing (Apply (Apply (Apply FoosPrecSym0 t) t) t :: [Bool])
-      sFooList ::
-        forall (t :: a) (t :: [Bool]).
-        Sing t -> Sing t -> Sing (Apply (Apply FooListSym0 t) t :: [Bool])
-      default sFooList ::
-                forall (t :: a) (t :: [Bool]).
-                (Apply (Apply FooListSym0 t) t :: [Bool])
-                ~ Apply (Apply FooList_0123456789876543210Sym0 t) t =>
-                Sing t -> Sing t -> Sing (Apply (Apply FooListSym0 t) t :: [Bool])
-      sFooList
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (sUndefined sA_0123456789876543210) sA_0123456789876543210
-    instance SFoo a => SFoo [a] where
-      sFoosPrec ::
-        forall (t :: Nat) (t :: [a]) (t :: [Bool]).
-        Sing t
-        -> Sing t
-           -> Sing t
-              -> Sing (Apply (Apply (Apply FoosPrecSym0 t) t) t :: [Bool])
-      sFoosPrec
-        _
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @FooListSym0) sFooList))
-                sA_0123456789876543210))
-            sA_0123456789876543210
-    instance SFoo a =>
-             SingI (FoosPrecSym0 :: (~>) Nat ((~>) a ((~>) [Bool] [Bool]))) where
-      sing = (singFun3 @FoosPrecSym0) sFoosPrec
-    instance (SFoo a, SingI d) =>
-             SingI (FoosPrecSym1 (d :: Nat) :: (~>) a ((~>) [Bool] [Bool])) where
-      sing = (singFun2 @(FoosPrecSym1 (d :: Nat))) (sFoosPrec (sing @d))
-    instance (SFoo a, SingI d, SingI d) =>
-             SingI (FoosPrecSym2 (d :: Nat) (d :: a) :: (~>) [Bool] [Bool]) where
-      sing
-        = (singFun1 @(FoosPrecSym2 (d :: Nat) (d :: a)))
-            ((sFoosPrec (sing @d)) (sing @d))
-    instance SFoo a =>
-             SingI (FooListSym0 :: (~>) a ((~>) [Bool] [Bool])) where
-      sing = (singFun2 @FooListSym0) sFooList
-    instance (SFoo a, SingI d) =>
-             SingI (FooListSym1 (d :: a) :: (~>) [Bool] [Bool]) where
-      sing = (singFun1 @(FooListSym1 (d :: a))) (sFooList (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T167.ghc88.template b/tests/compile-and-dump/Singletons/T167.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T167.ghc88.template
@@ -0,0 +1,178 @@
+Singletons/T167.hs:(0,0)-(0,0): Splicing declarations
+    singletonsOnly
+      [d| class Foo a where
+            foosPrec :: Nat -> a -> DiffList
+            fooList :: a -> DiffList
+            fooList = undefined
+          
+          instance Foo a => Foo [a] where
+            foosPrec _ = fooList |]
+  ======>
+    type FoosPrecSym3 (arg0123456789876543210 :: Nat) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: [Bool]) =
+        FoosPrec arg0123456789876543210 arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings (FoosPrecSym2 arg0123456789876543210 arg0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) FoosPrecSym2KindInference) ())
+    data FoosPrecSym2 (arg0123456789876543210 :: Nat) (arg0123456789876543210 :: a0123456789876543210) :: (~>) [Bool] [Bool]
+      where
+        FoosPrecSym2KindInference :: forall arg0123456789876543210
+                                            arg0123456789876543210
+                                            arg0123456789876543210
+                                            arg. SameKind (Apply (FoosPrecSym2 arg0123456789876543210 arg0123456789876543210) arg) (FoosPrecSym3 arg0123456789876543210 arg0123456789876543210 arg) =>
+                                     FoosPrecSym2 arg0123456789876543210 arg0123456789876543210 arg0123456789876543210
+    type instance Apply (FoosPrecSym2 arg0123456789876543210 arg0123456789876543210) arg0123456789876543210 = FoosPrec arg0123456789876543210 arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings (FoosPrecSym1 arg0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) FoosPrecSym1KindInference) ())
+    data FoosPrecSym1 (arg0123456789876543210 :: Nat) :: forall a0123456789876543210.
+                                                         (~>) a0123456789876543210 ((~>) [Bool] [Bool])
+      where
+        FoosPrecSym1KindInference :: forall arg0123456789876543210
+                                            arg0123456789876543210
+                                            arg. SameKind (Apply (FoosPrecSym1 arg0123456789876543210) arg) (FoosPrecSym2 arg0123456789876543210 arg) =>
+                                     FoosPrecSym1 arg0123456789876543210 arg0123456789876543210
+    type instance Apply (FoosPrecSym1 arg0123456789876543210) arg0123456789876543210 = FoosPrecSym2 arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings FoosPrecSym0 where
+      suppressUnusedWarnings = snd (((,) FoosPrecSym0KindInference) ())
+    data FoosPrecSym0 :: forall a0123456789876543210.
+                         (~>) Nat ((~>) a0123456789876543210 ((~>) [Bool] [Bool]))
+      where
+        FoosPrecSym0KindInference :: forall arg0123456789876543210
+                                            arg. SameKind (Apply FoosPrecSym0 arg) (FoosPrecSym1 arg) =>
+                                     FoosPrecSym0 arg0123456789876543210
+    type instance Apply FoosPrecSym0 arg0123456789876543210 = FoosPrecSym1 arg0123456789876543210
+    type FooListSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: [Bool]) =
+        FooList arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings (FooListSym1 arg0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) FooListSym1KindInference) ())
+    data FooListSym1 (arg0123456789876543210 :: a0123456789876543210) :: (~>) [Bool] [Bool]
+      where
+        FooListSym1KindInference :: forall arg0123456789876543210
+                                           arg0123456789876543210
+                                           arg. SameKind (Apply (FooListSym1 arg0123456789876543210) arg) (FooListSym2 arg0123456789876543210 arg) =>
+                                    FooListSym1 arg0123456789876543210 arg0123456789876543210
+    type instance Apply (FooListSym1 arg0123456789876543210) arg0123456789876543210 = FooList arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings FooListSym0 where
+      suppressUnusedWarnings = snd (((,) FooListSym0KindInference) ())
+    data FooListSym0 :: forall a0123456789876543210.
+                        (~>) a0123456789876543210 ((~>) [Bool] [Bool])
+      where
+        FooListSym0KindInference :: forall arg0123456789876543210
+                                           arg. SameKind (Apply FooListSym0 arg) (FooListSym1 arg) =>
+                                    FooListSym0 arg0123456789876543210
+    type instance Apply FooListSym0 arg0123456789876543210 = FooListSym1 arg0123456789876543210
+    type family FooList_0123456789876543210 (a :: a) (a :: [Bool]) :: [Bool] where
+      FooList_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply UndefinedSym0 a_0123456789876543210) a_0123456789876543210
+    type FooList_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: [Bool]) =
+        FooList_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (FooList_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) FooList_0123456789876543210Sym1KindInference) ())
+    data FooList_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) [Bool] [Bool]
+      where
+        FooList_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (FooList_0123456789876543210Sym1 a0123456789876543210) arg) (FooList_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        FooList_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (FooList_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = FooList_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings FooList_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) FooList_0123456789876543210Sym0KindInference) ())
+    data FooList_0123456789876543210Sym0 :: forall a0123456789876543210.
+                                            (~>) a0123456789876543210 ((~>) [Bool] [Bool])
+      where
+        FooList_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply FooList_0123456789876543210Sym0 arg) (FooList_0123456789876543210Sym1 arg) =>
+                                                        FooList_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply FooList_0123456789876543210Sym0 a0123456789876543210 = FooList_0123456789876543210Sym1 a0123456789876543210
+    class PFoo (a :: GHC.Types.Type) where
+      type FoosPrec (arg :: Nat) (arg :: a) (arg :: [Bool]) :: [Bool]
+      type FooList (arg :: a) (arg :: [Bool]) :: [Bool]
+      type FooList a a = Apply (Apply FooList_0123456789876543210Sym0 a) a
+    type family FoosPrec_0123456789876543210 (a :: Nat) (a :: [a]) (a :: [Bool]) :: [Bool] where
+      FoosPrec_0123456789876543210 _ a_0123456789876543210 a_0123456789876543210 = Apply (Apply FooListSym0 a_0123456789876543210) a_0123456789876543210
+    type FoosPrec_0123456789876543210Sym3 (a0123456789876543210 :: Nat) (a0123456789876543210 :: [a0123456789876543210]) (a0123456789876543210 :: [Bool]) =
+        FoosPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) FoosPrec_0123456789876543210Sym2KindInference) ())
+    data FoosPrec_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: [a0123456789876543210]) :: (~>) [Bool] [Bool]
+      where
+        FoosPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                a0123456789876543210
+                                                                a0123456789876543210
+                                                                arg. SameKind (Apply (FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (FoosPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                         FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = FoosPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (FoosPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) FoosPrec_0123456789876543210Sym1KindInference) ())
+    data FoosPrec_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: forall a0123456789876543210.
+                                                                           (~>) [a0123456789876543210] ((~>) [Bool] [Bool])
+      where
+        FoosPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                a0123456789876543210
+                                                                arg. SameKind (Apply (FoosPrec_0123456789876543210Sym1 a0123456789876543210) arg) (FoosPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                         FoosPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (FoosPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings FoosPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) FoosPrec_0123456789876543210Sym0KindInference) ())
+    data FoosPrec_0123456789876543210Sym0 :: forall a0123456789876543210.
+                                             (~>) Nat ((~>) [a0123456789876543210] ((~>) [Bool] [Bool]))
+      where
+        FoosPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply FoosPrec_0123456789876543210Sym0 arg) (FoosPrec_0123456789876543210Sym1 arg) =>
+                                                         FoosPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply FoosPrec_0123456789876543210Sym0 a0123456789876543210 = FoosPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PFoo [a] where
+      type FoosPrec a a a = Apply (Apply (Apply FoosPrec_0123456789876543210Sym0 a) a) a
+    class SFoo a where
+      sFoosPrec ::
+        forall (t :: Nat) (t :: a) (t :: [Bool]).
+        Sing t
+        -> Sing t
+           -> Sing t
+              -> Sing (Apply (Apply (Apply FoosPrecSym0 t) t) t :: [Bool])
+      sFooList ::
+        forall (t :: a) (t :: [Bool]).
+        Sing t -> Sing t -> Sing (Apply (Apply FooListSym0 t) t :: [Bool])
+      default sFooList ::
+                forall (t :: a) (t :: [Bool]).
+                ((Apply (Apply FooListSym0 t) t :: [Bool])
+                 ~ Apply (Apply FooList_0123456789876543210Sym0 t) t) =>
+                Sing t -> Sing t -> Sing (Apply (Apply FooListSym0 t) t :: [Bool])
+      sFooList
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (sUndefined sA_0123456789876543210) sA_0123456789876543210
+    instance SFoo a => SFoo [a] where
+      sFoosPrec ::
+        forall (t :: Nat) (t :: [a]) (t :: [Bool]).
+        Sing t
+        -> Sing t
+           -> Sing t
+              -> Sing (Apply (Apply (Apply FoosPrecSym0 t) t) t :: [Bool])
+      sFoosPrec
+        _
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @FooListSym0) sFooList))
+                sA_0123456789876543210))
+            sA_0123456789876543210
+    instance SFoo a =>
+             SingI (FoosPrecSym0 :: (~>) Nat ((~>) a ((~>) [Bool] [Bool]))) where
+      sing = (singFun3 @FoosPrecSym0) sFoosPrec
+    instance (SFoo a, SingI d) =>
+             SingI (FoosPrecSym1 (d :: Nat) :: (~>) a ((~>) [Bool] [Bool])) where
+      sing = (singFun2 @(FoosPrecSym1 (d :: Nat))) (sFoosPrec (sing @d))
+    instance (SFoo a, SingI d, SingI d) =>
+             SingI (FoosPrecSym2 (d :: Nat) (d :: a) :: (~>) [Bool] [Bool]) where
+      sing
+        = (singFun1 @(FoosPrecSym2 (d :: Nat) (d :: a)))
+            ((sFoosPrec (sing @d)) (sing @d))
+    instance SFoo a =>
+             SingI (FooListSym0 :: (~>) a ((~>) [Bool] [Bool])) where
+      sing = (singFun2 @FooListSym0) sFooList
+    instance (SFoo a, SingI d) =>
+             SingI (FooListSym1 (d :: a) :: (~>) [Bool] [Bool]) where
+      sing = (singFun1 @(FooListSym1 (d :: a))) (sFooList (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T172.ghc86.template b/tests/compile-and-dump/Singletons/T172.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T172.ghc86.template
+++ /dev/null
@@ -1,40 +0,0 @@
-Singletons/T172.hs:(0,0)-(0,0): Splicing declarations
-    singletonsOnly
-      [d| ($>) :: Nat -> Nat -> Nat
-          ($>) = (+) |]
-  ======>
-    type ($>@#@$$$) (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
-        ($>) a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (($>@#@$$) a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (:$>@#@$$###)) ())
-    data ($>@#@$$) (a0123456789876543210 :: Nat) :: (~>) Nat Nat
-      where
-        (:$>@#@$$###) :: forall a0123456789876543210
-                                a0123456789876543210
-                                arg. SameKind (Apply (($>@#@$$) a0123456789876543210) arg) (($>@#@$$$) a0123456789876543210 arg) =>
-                         ($>@#@$$) a0123456789876543210 a0123456789876543210
-    type instance Apply (($>@#@$$) a0123456789876543210) a0123456789876543210 = ($>) a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ($>@#@$) where
-      suppressUnusedWarnings = snd (((,) (:$>@#@$###)) ())
-    data ($>@#@$) :: (~>) Nat ((~>) Nat Nat)
-      where
-        (:$>@#@$###) :: forall a0123456789876543210
-                               arg. SameKind (Apply ($>@#@$) arg) (($>@#@$$) arg) =>
-                        ($>@#@$) a0123456789876543210
-    type instance Apply ($>@#@$) a0123456789876543210 = ($>@#@$$) a0123456789876543210
-    type family ($>) (a :: Nat) (a :: Nat) :: Nat where
-      ($>) a_0123456789876543210 a_0123456789876543210 = Apply (Apply (+@#@$) a_0123456789876543210) a_0123456789876543210
-    (%$>) ::
-      forall (t :: Nat) (t :: Nat).
-      Sing t -> Sing t -> Sing (Apply (Apply ($>@#@$) t) t :: Nat)
-    (%$>)
-      (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      = (applySing
-           ((applySing ((singFun2 @(+@#@$)) (%+))) sA_0123456789876543210))
-          sA_0123456789876543210
-    instance SingI (($>@#@$) :: (~>) Nat ((~>) Nat Nat)) where
-      sing = (singFun2 @($>@#@$)) (%$>)
-    instance SingI d =>
-             SingI (($>@#@$$) (d :: Nat) :: (~>) Nat Nat) where
-      sing = (singFun1 @(($>@#@$$) (d :: Nat))) ((%$>) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T172.ghc88.template b/tests/compile-and-dump/Singletons/T172.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T172.ghc88.template
@@ -0,0 +1,40 @@
+Singletons/T172.hs:(0,0)-(0,0): Splicing declarations
+    singletonsOnly
+      [d| ($>) :: Nat -> Nat -> Nat
+          ($>) = (+) |]
+  ======>
+    type ($>@#@$$$) (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) =
+        ($>) a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (($>@#@$$) a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (:$>@#@$$###)) ())
+    data ($>@#@$$) (a0123456789876543210 :: Nat) :: (~>) Nat Nat
+      where
+        (:$>@#@$$###) :: forall a0123456789876543210
+                                a0123456789876543210
+                                arg. SameKind (Apply (($>@#@$$) a0123456789876543210) arg) (($>@#@$$$) a0123456789876543210 arg) =>
+                         ($>@#@$$) a0123456789876543210 a0123456789876543210
+    type instance Apply (($>@#@$$) a0123456789876543210) a0123456789876543210 = ($>) a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ($>@#@$) where
+      suppressUnusedWarnings = snd (((,) (:$>@#@$###)) ())
+    data ($>@#@$) :: (~>) Nat ((~>) Nat Nat)
+      where
+        (:$>@#@$###) :: forall a0123456789876543210
+                               arg. SameKind (Apply ($>@#@$) arg) (($>@#@$$) arg) =>
+                        ($>@#@$) a0123456789876543210
+    type instance Apply ($>@#@$) a0123456789876543210 = ($>@#@$$) a0123456789876543210
+    type family ($>) (a :: Nat) (a :: Nat) :: Nat where
+      ($>) a_0123456789876543210 a_0123456789876543210 = Apply (Apply (+@#@$) a_0123456789876543210) a_0123456789876543210
+    (%$>) ::
+      forall (t :: Nat) (t :: Nat).
+      Sing t -> Sing t -> Sing (Apply (Apply ($>@#@$) t) t :: Nat)
+    (%$>)
+      (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = (applySing
+           ((applySing ((singFun2 @(+@#@$)) (%+))) sA_0123456789876543210))
+          sA_0123456789876543210
+    instance SingI (($>@#@$) :: (~>) Nat ((~>) Nat Nat)) where
+      sing = (singFun2 @($>@#@$)) (%$>)
+    instance SingI d =>
+             SingI (($>@#@$$) (d :: Nat) :: (~>) Nat Nat) where
+      sing = (singFun1 @(($>@#@$$) (d :: Nat))) ((%$>) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T175.ghc86.template b/tests/compile-and-dump/Singletons/T175.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T175.ghc86.template
+++ /dev/null
@@ -1,45 +0,0 @@
-Singletons/T175.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| quux2 :: Bar2 a => a
-          quux2 = baz
-          
-          class Foo a where
-            baz :: a
-          class Foo a => Bar1 a where
-            quux1 :: a
-            quux1 = baz
-          class Foo a => Bar2 a |]
-  ======>
-    class Foo a where
-      baz :: a
-    class Foo a => Bar1 a where
-      quux1 :: a
-      quux1 = baz
-    class Foo a => Bar2 a
-    quux2 :: Bar2 a => a
-    quux2 = baz
-    type Quux2Sym0 = Quux2
-    type family Quux2 :: a where
-      Quux2 = BazSym0
-    type BazSym0 = Baz
-    class PFoo (a :: GHC.Types.Type) where
-      type Baz :: a
-    type Quux1Sym0 = Quux1
-    type family Quux1_0123456789876543210 :: a where
-      Quux1_0123456789876543210 = BazSym0
-    type Quux1_0123456789876543210Sym0 = Quux1_0123456789876543210
-    class PFoo a => PBar1 (a :: GHC.Types.Type) where
-      type Quux1 :: a
-      type Quux1 = Quux1_0123456789876543210Sym0
-    class PFoo a => PBar2 (a :: GHC.Types.Type)
-    sQuux2 :: forall a. SBar2 a => Sing (Quux2Sym0 :: a)
-    sQuux2 = sBaz
-    class SFoo a where
-      sBaz :: Sing (BazSym0 :: a)
-    class SFoo a => SBar1 a where
-      sQuux1 :: Sing (Quux1Sym0 :: a)
-      default sQuux1 ::
-                (Quux1Sym0 :: a) ~ Quux1_0123456789876543210Sym0 =>
-                Sing (Quux1Sym0 :: a)
-      sQuux1 = sBaz
-    class SFoo a => SBar2 a
diff --git a/tests/compile-and-dump/Singletons/T175.ghc88.template b/tests/compile-and-dump/Singletons/T175.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T175.ghc88.template
@@ -0,0 +1,45 @@
+Singletons/T175.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| quux2 :: Bar2 a => a
+          quux2 = baz
+          
+          class Foo a where
+            baz :: a
+          class Foo a => Bar1 a where
+            quux1 :: a
+            quux1 = baz
+          class Foo a => Bar2 a |]
+  ======>
+    class Foo a where
+      baz :: a
+    class Foo a => Bar1 a where
+      quux1 :: a
+      quux1 = baz
+    class Foo a => Bar2 a
+    quux2 :: Bar2 a => a
+    quux2 = baz
+    type Quux2Sym0 = Quux2
+    type family Quux2 :: a where
+      Quux2 = BazSym0
+    type BazSym0 = Baz
+    class PFoo (a :: GHC.Types.Type) where
+      type Baz :: a
+    type Quux1Sym0 = Quux1
+    type family Quux1_0123456789876543210 :: a where
+      Quux1_0123456789876543210 = BazSym0
+    type Quux1_0123456789876543210Sym0 = Quux1_0123456789876543210
+    class PBar1 (a :: GHC.Types.Type) where
+      type Quux1 :: a
+      type Quux1 = Quux1_0123456789876543210Sym0
+    class PBar2 (a :: GHC.Types.Type)
+    sQuux2 :: forall a. SBar2 a => Sing (Quux2Sym0 :: a)
+    sQuux2 = sBaz
+    class SFoo a where
+      sBaz :: Sing (BazSym0 :: a)
+    class SFoo a => SBar1 a where
+      sQuux1 :: Sing (Quux1Sym0 :: a)
+      default sQuux1 ::
+                ((Quux1Sym0 :: a) ~ Quux1_0123456789876543210Sym0) =>
+                Sing (Quux1Sym0 :: a)
+      sQuux1 = sBaz
+    class SFoo a => SBar2 a
diff --git a/tests/compile-and-dump/Singletons/T176.ghc86.template b/tests/compile-and-dump/Singletons/T176.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T176.ghc86.template
+++ /dev/null
@@ -1,166 +0,0 @@
-Singletons/T176.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| quux1 :: Foo1 a => a -> a
-          quux1 x = x `bar1` \ _ -> baz1
-          quux2 :: Foo2 a => a -> a
-          quux2 x = x `bar2` baz2
-          
-          class Foo1 a where
-            bar1 :: a -> (a -> b) -> b
-            baz1 :: a
-          class Foo2 a where
-            bar2 :: a -> b -> b
-            baz2 :: a |]
-  ======>
-    class Foo1 a where
-      bar1 :: a -> (a -> b) -> b
-      baz1 :: a
-    quux1 :: Foo1 a => a -> a
-    quux1 x = (x `bar1` (\ _ -> baz1))
-    class Foo2 a where
-      bar2 :: a -> b -> b
-      baz2 :: a
-    quux2 :: Foo2 a => a -> a
-    quux2 x = (x `bar2` baz2)
-    type family Case_0123456789876543210 x arg_0123456789876543210 t where
-      Case_0123456789876543210 x arg_0123456789876543210 _ = Baz1Sym0
-    type family Lambda_0123456789876543210 x t where
-      Lambda_0123456789876543210 x arg_0123456789876543210 = Case_0123456789876543210 x arg_0123456789876543210 arg_0123456789876543210
-    type Lambda_0123456789876543210Sym2 x0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
-    type Quux2Sym1 (a0123456789876543210 :: a0123456789876543210) =
-        Quux2 a0123456789876543210
-    instance SuppressUnusedWarnings Quux2Sym0 where
-      suppressUnusedWarnings = snd (((,) Quux2Sym0KindInference) ())
-    data Quux2Sym0 :: forall a0123456789876543210.
-                      (~>) a0123456789876543210 a0123456789876543210
-      where
-        Quux2Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply Quux2Sym0 arg) (Quux2Sym1 arg) =>
-                                  Quux2Sym0 a0123456789876543210
-    type instance Apply Quux2Sym0 a0123456789876543210 = Quux2 a0123456789876543210
-    type Quux1Sym1 (a0123456789876543210 :: a0123456789876543210) =
-        Quux1 a0123456789876543210
-    instance SuppressUnusedWarnings Quux1Sym0 where
-      suppressUnusedWarnings = snd (((,) Quux1Sym0KindInference) ())
-    data Quux1Sym0 :: forall a0123456789876543210.
-                      (~>) a0123456789876543210 a0123456789876543210
-      where
-        Quux1Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply Quux1Sym0 arg) (Quux1Sym1 arg) =>
-                                  Quux1Sym0 a0123456789876543210
-    type instance Apply Quux1Sym0 a0123456789876543210 = Quux1 a0123456789876543210
-    type family Quux2 (a :: a) :: a where
-      Quux2 x = Apply (Apply Bar2Sym0 x) Baz2Sym0
-    type family Quux1 (a :: a) :: a where
-      Quux1 x = Apply (Apply Bar1Sym0 x) (Apply Lambda_0123456789876543210Sym0 x)
-    type Bar1Sym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) =
-        Bar1 arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings (Bar1Sym1 arg0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Bar1Sym1KindInference) ())
-    data Bar1Sym1 (arg0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                      (~>) ((~>) a0123456789876543210 b0123456789876543210) b0123456789876543210
-      where
-        Bar1Sym1KindInference :: forall arg0123456789876543210
-                                        arg0123456789876543210
-                                        arg. SameKind (Apply (Bar1Sym1 arg0123456789876543210) arg) (Bar1Sym2 arg0123456789876543210 arg) =>
-                                 Bar1Sym1 arg0123456789876543210 arg0123456789876543210
-    type instance Apply (Bar1Sym1 arg0123456789876543210) arg0123456789876543210 = Bar1 arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings Bar1Sym0 where
-      suppressUnusedWarnings = snd (((,) Bar1Sym0KindInference) ())
-    data Bar1Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) ((~>) a0123456789876543210 b0123456789876543210) b0123456789876543210)
-      where
-        Bar1Sym0KindInference :: forall arg0123456789876543210
-                                        arg. SameKind (Apply Bar1Sym0 arg) (Bar1Sym1 arg) =>
-                                 Bar1Sym0 arg0123456789876543210
-    type instance Apply Bar1Sym0 arg0123456789876543210 = Bar1Sym1 arg0123456789876543210
-    type Baz1Sym0 = Baz1
-    class PFoo1 (a :: Type) where
-      type Bar1 (arg :: a) (arg :: (~>) a b) :: b
-      type Baz1 :: a
-    type Bar2Sym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: b0123456789876543210) =
-        Bar2 arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings (Bar2Sym1 arg0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Bar2Sym1KindInference) ())
-    data Bar2Sym1 (arg0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                      (~>) b0123456789876543210 b0123456789876543210
-      where
-        Bar2Sym1KindInference :: forall arg0123456789876543210
-                                        arg0123456789876543210
-                                        arg. SameKind (Apply (Bar2Sym1 arg0123456789876543210) arg) (Bar2Sym2 arg0123456789876543210 arg) =>
-                                 Bar2Sym1 arg0123456789876543210 arg0123456789876543210
-    type instance Apply (Bar2Sym1 arg0123456789876543210) arg0123456789876543210 = Bar2 arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings Bar2Sym0 where
-      suppressUnusedWarnings = snd (((,) Bar2Sym0KindInference) ())
-    data Bar2Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
-      where
-        Bar2Sym0KindInference :: forall arg0123456789876543210
-                                        arg. SameKind (Apply Bar2Sym0 arg) (Bar2Sym1 arg) =>
-                                 Bar2Sym0 arg0123456789876543210
-    type instance Apply Bar2Sym0 arg0123456789876543210 = Bar2Sym1 arg0123456789876543210
-    type Baz2Sym0 = Baz2
-    class PFoo2 (a :: Type) where
-      type Bar2 (arg :: a) (arg :: b) :: b
-      type Baz2 :: a
-    sQuux2 ::
-      forall a (t :: a).
-      SFoo2 a => Sing t -> Sing (Apply Quux2Sym0 t :: a)
-    sQuux1 ::
-      forall a (t :: a).
-      SFoo1 a => Sing t -> Sing (Apply Quux1Sym0 t :: a)
-    sQuux2 (sX :: Sing x)
-      = (applySing ((applySing ((singFun2 @Bar2Sym0) sBar2)) sX)) sBaz2
-    sQuux1 (sX :: Sing x)
-      = (applySing ((applySing ((singFun2 @Bar1Sym0) sBar1)) sX))
-          ((singFun1 @(Apply Lambda_0123456789876543210Sym0 x))
-             (\ sArg_0123456789876543210
-                -> case sArg_0123456789876543210 of {
-                     (_ :: Sing arg_0123456789876543210)
-                       -> (case sArg_0123456789876543210 of { _ -> sBaz1 }) ::
-                            Sing (Case_0123456789876543210 x arg_0123456789876543210 arg_0123456789876543210) }))
-    instance SFoo2 a => SingI (Quux2Sym0 :: (~>) a a) where
-      sing = (singFun1 @Quux2Sym0) sQuux2
-    instance SFoo1 a => SingI (Quux1Sym0 :: (~>) a a) where
-      sing = (singFun1 @Quux1Sym0) sQuux1
-    class SFoo1 a where
-      sBar1 ::
-        forall b (t :: a) (t :: (~>) a b).
-        Sing t -> Sing t -> Sing (Apply (Apply Bar1Sym0 t) t :: b)
-      sBaz1 :: Sing (Baz1Sym0 :: a)
-    class SFoo2 a where
-      sBar2 ::
-        forall b (t :: a) (t :: b).
-        Sing t -> Sing t -> Sing (Apply (Apply Bar2Sym0 t) t :: b)
-      sBaz2 :: Sing (Baz2Sym0 :: a)
-    instance SFoo1 a =>
-             SingI (Bar1Sym0 :: (~>) a ((~>) ((~>) a b) b)) where
-      sing = (singFun2 @Bar1Sym0) sBar1
-    instance (SFoo1 a, SingI d) =>
-             SingI (Bar1Sym1 (d :: a) :: (~>) ((~>) a b) b) where
-      sing = (singFun1 @(Bar1Sym1 (d :: a))) (sBar1 (sing @d))
-    instance SFoo2 a => SingI (Bar2Sym0 :: (~>) a ((~>) b b)) where
-      sing = (singFun2 @Bar2Sym0) sBar2
-    instance (SFoo2 a, SingI d) =>
-             SingI (Bar2Sym1 (d :: a) :: (~>) b b) where
-      sing = (singFun1 @(Bar2Sym1 (d :: a))) (sBar2 (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T176.ghc88.template b/tests/compile-and-dump/Singletons/T176.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T176.ghc88.template
@@ -0,0 +1,167 @@
+Singletons/T176.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| quux1 :: Foo1 a => a -> a
+          quux1 x = x `bar1` \ _ -> baz1
+          quux2 :: Foo2 a => a -> a
+          quux2 x = x `bar2` baz2
+          
+          class Foo1 a where
+            bar1 :: a -> (a -> b) -> b
+            baz1 :: a
+          class Foo2 a where
+            bar2 :: a -> b -> b
+            baz2 :: a |]
+  ======>
+    class Foo1 a where
+      bar1 :: a -> (a -> b) -> b
+      baz1 :: a
+    quux1 :: Foo1 a => a -> a
+    quux1 x = (x `bar1` (\ _ -> baz1))
+    class Foo2 a where
+      bar2 :: a -> b -> b
+      baz2 :: a
+    quux2 :: Foo2 a => a -> a
+    quux2 x = (x `bar2` baz2)
+    type family Case_0123456789876543210 arg_0123456789876543210 x t where
+      Case_0123456789876543210 arg_0123456789876543210 x _ = Baz1Sym0
+    type family Lambda_0123456789876543210 x t where
+      Lambda_0123456789876543210 x arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x arg_0123456789876543210
+    type Lambda_0123456789876543210Sym2 x0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
+    type Quux2Sym1 (a0123456789876543210 :: a0123456789876543210) =
+        Quux2 a0123456789876543210
+    instance SuppressUnusedWarnings Quux2Sym0 where
+      suppressUnusedWarnings = snd (((,) Quux2Sym0KindInference) ())
+    data Quux2Sym0 :: forall a0123456789876543210.
+                      (~>) a0123456789876543210 a0123456789876543210
+      where
+        Quux2Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply Quux2Sym0 arg) (Quux2Sym1 arg) =>
+                                  Quux2Sym0 a0123456789876543210
+    type instance Apply Quux2Sym0 a0123456789876543210 = Quux2 a0123456789876543210
+    type Quux1Sym1 (a0123456789876543210 :: a0123456789876543210) =
+        Quux1 a0123456789876543210
+    instance SuppressUnusedWarnings Quux1Sym0 where
+      suppressUnusedWarnings = snd (((,) Quux1Sym0KindInference) ())
+    data Quux1Sym0 :: forall a0123456789876543210.
+                      (~>) a0123456789876543210 a0123456789876543210
+      where
+        Quux1Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply Quux1Sym0 arg) (Quux1Sym1 arg) =>
+                                  Quux1Sym0 a0123456789876543210
+    type instance Apply Quux1Sym0 a0123456789876543210 = Quux1 a0123456789876543210
+    type family Quux2 (a :: a) :: a where
+      Quux2 x = Apply (Apply Bar2Sym0 x) Baz2Sym0
+    type family Quux1 (a :: a) :: a where
+      Quux1 x = Apply (Apply Bar1Sym0 x) (Apply Lambda_0123456789876543210Sym0 x)
+    type Bar1Sym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) =
+        Bar1 arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings (Bar1Sym1 arg0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Bar1Sym1KindInference) ())
+    data Bar1Sym1 (arg0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                      (~>) ((~>) a0123456789876543210 b0123456789876543210) b0123456789876543210
+      where
+        Bar1Sym1KindInference :: forall arg0123456789876543210
+                                        arg0123456789876543210
+                                        arg. SameKind (Apply (Bar1Sym1 arg0123456789876543210) arg) (Bar1Sym2 arg0123456789876543210 arg) =>
+                                 Bar1Sym1 arg0123456789876543210 arg0123456789876543210
+    type instance Apply (Bar1Sym1 arg0123456789876543210) arg0123456789876543210 = Bar1 arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings Bar1Sym0 where
+      suppressUnusedWarnings = snd (((,) Bar1Sym0KindInference) ())
+    data Bar1Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) ((~>) a0123456789876543210 b0123456789876543210) b0123456789876543210)
+      where
+        Bar1Sym0KindInference :: forall arg0123456789876543210
+                                        arg. SameKind (Apply Bar1Sym0 arg) (Bar1Sym1 arg) =>
+                                 Bar1Sym0 arg0123456789876543210
+    type instance Apply Bar1Sym0 arg0123456789876543210 = Bar1Sym1 arg0123456789876543210
+    type Baz1Sym0 = Baz1
+    class PFoo1 (a :: Type) where
+      type Bar1 (arg :: a) (arg :: (~>) a b) :: b
+      type Baz1 :: a
+    type Bar2Sym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: b0123456789876543210) =
+        Bar2 arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings (Bar2Sym1 arg0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Bar2Sym1KindInference) ())
+    data Bar2Sym1 (arg0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                      (~>) b0123456789876543210 b0123456789876543210
+      where
+        Bar2Sym1KindInference :: forall arg0123456789876543210
+                                        arg0123456789876543210
+                                        arg. SameKind (Apply (Bar2Sym1 arg0123456789876543210) arg) (Bar2Sym2 arg0123456789876543210 arg) =>
+                                 Bar2Sym1 arg0123456789876543210 arg0123456789876543210
+    type instance Apply (Bar2Sym1 arg0123456789876543210) arg0123456789876543210 = Bar2 arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings Bar2Sym0 where
+      suppressUnusedWarnings = snd (((,) Bar2Sym0KindInference) ())
+    data Bar2Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
+      where
+        Bar2Sym0KindInference :: forall arg0123456789876543210
+                                        arg. SameKind (Apply Bar2Sym0 arg) (Bar2Sym1 arg) =>
+                                 Bar2Sym0 arg0123456789876543210
+    type instance Apply Bar2Sym0 arg0123456789876543210 = Bar2Sym1 arg0123456789876543210
+    type Baz2Sym0 = Baz2
+    class PFoo2 (a :: Type) where
+      type Bar2 (arg :: a) (arg :: b) :: b
+      type Baz2 :: a
+    sQuux2 ::
+      forall a (t :: a).
+      SFoo2 a => Sing t -> Sing (Apply Quux2Sym0 t :: a)
+    sQuux1 ::
+      forall a (t :: a).
+      SFoo1 a => Sing t -> Sing (Apply Quux1Sym0 t :: a)
+    sQuux2 (sX :: Sing x)
+      = (applySing ((applySing ((singFun2 @Bar2Sym0) sBar2)) sX)) sBaz2
+    sQuux1 (sX :: Sing x)
+      = (applySing ((applySing ((singFun2 @Bar1Sym0) sBar1)) sX))
+          ((singFun1 @(Apply 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 }) }))
+    instance SFoo2 a => SingI (Quux2Sym0 :: (~>) a a) where
+      sing = (singFun1 @Quux2Sym0) sQuux2
+    instance SFoo1 a => SingI (Quux1Sym0 :: (~>) a a) where
+      sing = (singFun1 @Quux1Sym0) sQuux1
+    class SFoo1 a where
+      sBar1 ::
+        forall b (t :: a) (t :: (~>) a b).
+        Sing t -> Sing t -> Sing (Apply (Apply Bar1Sym0 t) t :: b)
+      sBaz1 :: Sing (Baz1Sym0 :: a)
+    class SFoo2 a where
+      sBar2 ::
+        forall b (t :: a) (t :: b).
+        Sing t -> Sing t -> Sing (Apply (Apply Bar2Sym0 t) t :: b)
+      sBaz2 :: Sing (Baz2Sym0 :: a)
+    instance SFoo1 a =>
+             SingI (Bar1Sym0 :: (~>) a ((~>) ((~>) a b) b)) where
+      sing = (singFun2 @Bar1Sym0) sBar1
+    instance (SFoo1 a, SingI d) =>
+             SingI (Bar1Sym1 (d :: a) :: (~>) ((~>) a b) b) where
+      sing = (singFun1 @(Bar1Sym1 (d :: a))) (sBar1 (sing @d))
+    instance SFoo2 a => SingI (Bar2Sym0 :: (~>) a ((~>) b b)) where
+      sing = (singFun2 @Bar2Sym0) sBar2
+    instance (SFoo2 a, SingI d) =>
+             SingI (Bar2Sym1 (d :: a) :: (~>) b b) where
+      sing = (singFun1 @(Bar2Sym1 (d :: a))) (sBar2 (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T178.ghc86.template b/tests/compile-and-dump/Singletons/T178.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T178.ghc86.template
+++ /dev/null
@@ -1,210 +0,0 @@
-Singletons/T178.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| empty :: U
-          empty = []
-          
-          data Occ
-            = Str | Opt | Many
-            deriving (Eq, Ord, Show)
-          type U = [(Symbol, Occ)] |]
-  ======>
-    data Occ
-      = Str | Opt | Many
-      deriving (Eq, Ord, Show)
-    type U = [(Symbol, Occ)]
-    empty :: U
-    empty = []
-    type USym0 = U
-    type StrSym0 = Str
-    type OptSym0 = Opt
-    type ManySym0 = Many
-    type EmptySym0 = Empty
-    type family Empty :: [(Symbol, Occ)] where
-      Empty = '[]
-    type family Compare_0123456789876543210 (a :: Occ) (a :: Occ) :: Ordering where
-      Compare_0123456789876543210 Str Str = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
-      Compare_0123456789876543210 Opt Opt = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
-      Compare_0123456789876543210 Many Many = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
-      Compare_0123456789876543210 Str Opt = LTSym0
-      Compare_0123456789876543210 Str Many = LTSym0
-      Compare_0123456789876543210 Opt Str = GTSym0
-      Compare_0123456789876543210 Opt Many = LTSym0
-      Compare_0123456789876543210 Many Str = GTSym0
-      Compare_0123456789876543210 Many Opt = GTSym0
-    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Occ) (a0123456789876543210 :: Occ) =
-        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
-    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Occ) :: (~>) Occ Ordering
-      where
-        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
-    data Compare_0123456789876543210Sym0 :: (~>) Occ ((~>) Occ Ordering)
-      where
-        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
-                                                        Compare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
-    instance POrd Occ where
-      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
-    type family ShowsPrec_0123456789876543210 (a :: Nat) (a :: Occ) (a :: Symbol) :: Symbol where
-      ShowsPrec_0123456789876543210 _ Str a_0123456789876543210 = Apply (Apply ShowStringSym0 "Str") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ Opt a_0123456789876543210 = Apply (Apply ShowStringSym0 "Opt") a_0123456789876543210
-      ShowsPrec_0123456789876543210 _ Many a_0123456789876543210 = Apply (Apply ShowStringSym0 "Many") a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Occ) (a0123456789876543210 :: Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Occ) :: (~>) Symbol Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Occ ((~>) Symbol Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: (~>) Nat ((~>) Occ ((~>) Symbol Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow Occ where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    type family Equals_0123456789876543210 (a :: Occ) (b :: Occ) :: Bool where
-      Equals_0123456789876543210 Str Str = TrueSym0
-      Equals_0123456789876543210 Opt Opt = TrueSym0
-      Equals_0123456789876543210 Many Many = TrueSym0
-      Equals_0123456789876543210 (_ :: Occ) (_ :: Occ) = FalseSym0
-    instance PEq Occ where
-      type (==) a b = Equals_0123456789876543210 a b
-    sEmpty :: Sing (EmptySym0 :: [(Symbol, Occ)])
-    sEmpty = Data.Singletons.Prelude.Instances.SNil
-    data instance Sing :: Occ -> GHC.Types.Type
-      where
-        SStr :: Sing Str
-        SOpt :: Sing Opt
-        SMany :: Sing Many
-    type SOcc = (Sing :: Occ -> GHC.Types.Type)
-    instance SingKind Occ where
-      type Demote Occ = Occ
-      fromSing SStr = Str
-      fromSing SOpt = Opt
-      fromSing SMany = Many
-      toSing Str = SomeSing SStr
-      toSing Opt = SomeSing SOpt
-      toSing Many = SomeSing SMany
-    instance SOrd Occ where
-      sCompare ::
-        forall (t1 :: Occ) (t2 :: Occ).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (CompareSym0 :: TyFun Occ ((~>) Occ Ordering)
-                                                 -> GHC.Types.Type) t1) t2)
-      sCompare SStr SStr
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            Data.Singletons.Prelude.Instances.SNil
-      sCompare SOpt SOpt
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            Data.Singletons.Prelude.Instances.SNil
-      sCompare SMany SMany
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            Data.Singletons.Prelude.Instances.SNil
-      sCompare SStr SOpt = SLT
-      sCompare SStr SMany = SLT
-      sCompare SOpt SStr = SGT
-      sCompare SOpt SMany = SLT
-      sCompare SMany SStr = SGT
-      sCompare SMany SOpt = SGT
-    instance SShow Occ where
-      sShowsPrec ::
-        forall (t1 :: Nat) (t2 :: Occ) (t3 :: Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun Nat ((~>) Occ ((~>) Symbol Symbol))
-                                                             -> GHC.Types.Type) t1) t2) t3)
-      sShowsPrec
-        _
-        SStr
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "Str")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SOpt
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "Opt")))
-            sA_0123456789876543210
-      sShowsPrec
-        _
-        SMany
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "Many")))
-            sA_0123456789876543210
-    instance SEq Occ where
-      (%==) SStr SStr = STrue
-      (%==) SStr SOpt = SFalse
-      (%==) SStr SMany = SFalse
-      (%==) SOpt SStr = SFalse
-      (%==) SOpt SOpt = STrue
-      (%==) SOpt SMany = SFalse
-      (%==) SMany SStr = SFalse
-      (%==) SMany SOpt = SFalse
-      (%==) SMany SMany = STrue
-    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)
-      (%~) 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)
-      (%~) SMany SMany = Proved Refl
-    deriving instance Show (Sing (z :: Occ))
-    instance SingI Str where
-      sing = SStr
-    instance SingI Opt where
-      sing = SOpt
-    instance SingI Many where
-      sing = SMany
diff --git a/tests/compile-and-dump/Singletons/T178.ghc88.template b/tests/compile-and-dump/Singletons/T178.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T178.ghc88.template
@@ -0,0 +1,221 @@
+Singletons/T178.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| empty :: U
+          empty = []
+          
+          data Occ
+            = Str | Opt | Many
+            deriving (Eq, Ord, Show)
+          type U = [(Symbol, Occ)] |]
+  ======>
+    data Occ
+      = Str | Opt | Many
+      deriving (Eq, Ord, Show)
+    type U = [(Symbol, Occ)]
+    empty :: U
+    empty = []
+    type USym0 = U
+    type StrSym0 = Str
+    type OptSym0 = Opt
+    type ManySym0 = Many
+    type EmptySym0 = Empty
+    type family Empty :: [(Symbol, Occ)] where
+      Empty = '[]
+    type family Compare_0123456789876543210 (a :: Occ) (a :: Occ) :: Ordering where
+      Compare_0123456789876543210 Str Str = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
+      Compare_0123456789876543210 Opt Opt = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
+      Compare_0123456789876543210 Many Many = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
+      Compare_0123456789876543210 Str Opt = LTSym0
+      Compare_0123456789876543210 Str Many = LTSym0
+      Compare_0123456789876543210 Opt Str = GTSym0
+      Compare_0123456789876543210 Opt Many = LTSym0
+      Compare_0123456789876543210 Many Str = GTSym0
+      Compare_0123456789876543210 Many Opt = GTSym0
+    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Occ) (a0123456789876543210 :: Occ) =
+        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
+    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Occ) :: (~>) Occ Ordering
+      where
+        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
+    data Compare_0123456789876543210Sym0 :: (~>) Occ ((~>) Occ Ordering)
+      where
+        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
+                                                        Compare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
+    instance POrd Occ where
+      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
+    type family ShowsPrec_0123456789876543210 (a :: Nat) (a :: Occ) (a :: Symbol) :: Symbol where
+      ShowsPrec_0123456789876543210 _ Str a_0123456789876543210 = Apply (Apply ShowStringSym0 "Str") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ Opt a_0123456789876543210 = Apply (Apply ShowStringSym0 "Opt") a_0123456789876543210
+      ShowsPrec_0123456789876543210 _ Many a_0123456789876543210 = Apply (Apply ShowStringSym0 "Many") a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Occ) (a0123456789876543210 :: Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Occ) :: (~>) Symbol Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Occ ((~>) Symbol Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: (~>) Nat ((~>) Occ ((~>) Symbol Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow Occ where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    type family Equals_0123456789876543210 (a :: Occ) (b :: Occ) :: Bool where
+      Equals_0123456789876543210 Str Str = TrueSym0
+      Equals_0123456789876543210 Opt Opt = TrueSym0
+      Equals_0123456789876543210 Many Many = TrueSym0
+      Equals_0123456789876543210 (_ :: Occ) (_ :: Occ) = FalseSym0
+    instance PEq Occ where
+      type (==) a b = Equals_0123456789876543210 a b
+    sEmpty :: Sing (EmptySym0 :: [(Symbol, Occ)])
+    sEmpty = Data.Singletons.Prelude.Instances.SNil
+    data SOcc :: Occ -> GHC.Types.Type
+      where
+        SStr :: SOcc Str
+        SOpt :: SOcc Opt
+        SMany :: SOcc Many
+    type instance Sing @Occ = SOcc
+    instance SingKind Occ where
+      type Demote Occ = Occ
+      fromSing SStr = Str
+      fromSing SOpt = Opt
+      fromSing SMany = Many
+      toSing Str = SomeSing SStr
+      toSing Opt = SomeSing SOpt
+      toSing Many = SomeSing SMany
+    instance SOrd Occ where
+      sCompare ::
+        forall (t1 :: Occ) (t2 :: Occ).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (CompareSym0 :: TyFun Occ ((~>) Occ Ordering)
+                                                 -> GHC.Types.Type) t1) t2)
+      sCompare SStr SStr
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            Data.Singletons.Prelude.Instances.SNil
+      sCompare SOpt SOpt
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            Data.Singletons.Prelude.Instances.SNil
+      sCompare SMany SMany
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            Data.Singletons.Prelude.Instances.SNil
+      sCompare SStr SOpt = SLT
+      sCompare SStr SMany = SLT
+      sCompare SOpt SStr = SGT
+      sCompare SOpt SMany = SLT
+      sCompare SMany SStr = SGT
+      sCompare SMany SOpt = SGT
+    instance SShow Occ where
+      sShowsPrec ::
+        forall (t1 :: Nat) (t2 :: Occ) (t3 :: Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun Nat ((~>) Occ ((~>) Symbol Symbol))
+                                                             -> GHC.Types.Type) t1) t2) t3)
+      sShowsPrec
+        _
+        SStr
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "Str")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SOpt
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "Opt")))
+            sA_0123456789876543210
+      sShowsPrec
+        _
+        SMany
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "Many")))
+            sA_0123456789876543210
+    instance SEq Occ where
+      (%==) SStr SStr = STrue
+      (%==) SStr SOpt = SFalse
+      (%==) SStr SMany = SFalse
+      (%==) SOpt SStr = SFalse
+      (%==) SOpt SOpt = STrue
+      (%==) SOpt SMany = SFalse
+      (%==) SMany SStr = SFalse
+      (%==) SMany SOpt = SFalse
+      (%==) SMany SMany = STrue
+    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)
+      (%~) 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)
+      (%~) SMany SMany = Proved Refl
+    instance Data.Type.Equality.TestEquality (SOcc :: Occ
+                                                      -> GHC.Types.Type) where
+      Data.Type.Equality.testEquality
+        = Data.Singletons.Decide.decideEquality
+    instance Data.Type.Coercion.TestCoercion (SOcc :: Occ
+                                                      -> GHC.Types.Type) where
+      Data.Type.Coercion.testCoercion
+        = Data.Singletons.Decide.decideCoercion
+    instance Show (SOcc (z :: Occ)) where
+      showsPrec _ SStr = showString "SStr"
+      showsPrec _ SOpt = showString "SOpt"
+      showsPrec _ SMany = showString "SMany"
+    instance SingI Str where
+      sing = SStr
+    instance SingI Opt where
+      sing = SOpt
+    instance SingI Many where
+      sing = SMany
diff --git a/tests/compile-and-dump/Singletons/T183.ghc86.template b/tests/compile-and-dump/Singletons/T183.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T183.ghc86.template
+++ /dev/null
@@ -1,512 +0,0 @@
-Singletons/T183.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| f1 (x :: Maybe Bool) = (x :: Maybe Bool)
-          f2 (x :: Maybe a) = (x :: Maybe a)
-          f3 (Just a :: Maybe Bool) = "hi"
-          g x = case Just x of { (Just y :: Maybe Bool) -> (y :: Bool) }
-          foo1 :: Maybe a -> a
-          foo1 (Just x :: Maybe a) = (x :: a)
-          foo2, foo3 :: forall a. Maybe a -> a
-          foo2 (Just x :: Maybe a) = (x :: a)
-          foo3 (Just x) = (x :: a)
-          foo4 :: (a, b) -> (b, a)
-          foo4 = \ (x :: a, y :: b) -> (y :: b, x :: a)
-          foo5, foo6 :: Maybe (Maybe a) -> Maybe (Maybe a)
-          foo5 (Just (Just (x :: a) :: Maybe a) :: Maybe (Maybe a))
-            = Just (Just (x :: a) :: Maybe a) :: Maybe (Maybe a)
-          foo6 (Just x :: Maybe (Maybe a))
-            = case x :: Maybe a of {
-                (Just (y :: a) :: Maybe a) -> Just (Just (y :: a) :: Maybe a) }
-          foo7 :: a -> b -> a
-          foo7 (x :: a) (_ :: b) = (x :: a)
-          foo8 :: forall a. Maybe a -> Maybe a
-          foo8 x@(Just (_ :: a) :: Maybe a) = x
-          foo9 :: a -> a
-          foo9 (x :: a)
-            = let
-                g :: a -> b -> a
-                g y _ = y
-              in g x () |]
-  ======>
-    f1 (x :: Maybe Bool) = x :: Maybe Bool
-    f2 (x :: Maybe a) = x :: Maybe a
-    f3 (Just a :: Maybe Bool) = "hi"
-    g x = case Just x of { (Just y :: Maybe Bool) -> y :: Bool }
-    foo1 :: Maybe a -> a
-    foo1 (Just x :: Maybe a) = x :: a
-    foo2 :: forall a. Maybe a -> a
-    foo3 :: forall a. Maybe a -> a
-    foo2 (Just x :: Maybe a) = x :: a
-    foo3 (Just x) = x :: a
-    foo4 :: (a, b) -> (b, a)
-    foo4 = \ (x :: a, y :: b) -> (y :: b, x :: a)
-    foo5 :: Maybe (Maybe a) -> Maybe (Maybe a)
-    foo6 :: Maybe (Maybe a) -> Maybe (Maybe a)
-    foo5 (Just (Just (x :: a) :: Maybe a) :: Maybe (Maybe a))
-      = Just (Just (x :: a) :: Maybe a) :: Maybe (Maybe a)
-    foo6 (Just x :: Maybe (Maybe a))
-      = case x :: Maybe a of {
-          (Just (y :: a) :: Maybe a) -> Just (Just (y :: a) :: Maybe a) }
-    foo7 :: a -> b -> a
-    foo7 (x :: a) (_ :: b) = x :: a
-    foo8 :: forall a. Maybe a -> Maybe a
-    foo8 x@(Just (_ :: a) :: Maybe a) = x
-    foo9 :: a -> a
-    foo9 (x :: a)
-      = let
-          g :: a -> b -> a
-          g y _ = y
-        in (g x) ()
-    type Let0123456789876543210GSym3 x0123456789876543210 (a0123456789876543210 :: a) (a0123456789876543210 :: b0123456789876543210) =
-        Let0123456789876543210G x0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210GSym2 a0123456789876543210 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210GSym2KindInference) ())
-    data Let0123456789876543210GSym2 x0123456789876543210 (a0123456789876543210 :: a) :: forall b0123456789876543210.
-                                                                                         (~>) b0123456789876543210 a
-      where
-        Let0123456789876543210GSym2KindInference :: forall x0123456789876543210
-                                                           a0123456789876543210
-                                                           a0123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210) arg) (Let0123456789876543210GSym3 x0123456789876543210 a0123456789876543210 arg) =>
-                                                    Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (Let0123456789876543210GSym2 a0123456789876543210 x0123456789876543210) a0123456789876543210 = Let0123456789876543210G a0123456789876543210 x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210GSym1 x0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210GSym1KindInference) ())
-    data Let0123456789876543210GSym1 x0123456789876543210 :: forall b0123456789876543210
-                                                                    a.
-                                                             (~>) a ((~>) b0123456789876543210 a)
-      where
-        Let0123456789876543210GSym1KindInference :: forall x0123456789876543210
-                                                           a0123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210GSym1 x0123456789876543210) arg) (Let0123456789876543210GSym2 x0123456789876543210 arg) =>
-                                                    Let0123456789876543210GSym1 x0123456789876543210 a0123456789876543210
-    type instance Apply (Let0123456789876543210GSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210GSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210GSym0KindInference) ())
-    data Let0123456789876543210GSym0 x0123456789876543210
-      where
-        Let0123456789876543210GSym0KindInference :: forall x0123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210GSym0 arg) (Let0123456789876543210GSym1 arg) =>
-                                                    Let0123456789876543210GSym0 x0123456789876543210
-    type instance Apply Let0123456789876543210GSym0 x0123456789876543210 = Let0123456789876543210GSym1 x0123456789876543210
-    type family Let0123456789876543210G x (a :: a) (a :: b) :: a where
-      Let0123456789876543210G x y _ = y
-    type Let0123456789876543210XSym1 wild_01234567898765432100123456789876543210 =
-        Let0123456789876543210X wild_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210XSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210XSym0KindInference) ())
-    data Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210
-      where
-        Let0123456789876543210XSym0KindInference :: forall wild_01234567898765432100123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210XSym0 arg) (Let0123456789876543210XSym1 arg) =>
-                                                    Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210
-    type instance Apply Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210X wild_01234567898765432100123456789876543210
-    type family Let0123456789876543210X wild_0123456789876543210 where
-      Let0123456789876543210X wild_0123456789876543210 = (Apply JustSym0 (wild_0123456789876543210 :: a) :: Maybe a)
-    type Let0123456789876543210Scrutinee_0123456789876543210Sym1 x0123456789876543210 =
-        Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd
-            (((,)
-                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
-               ())
-    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210
-      where
-        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
-                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210
-    type family Let0123456789876543210Scrutinee_0123456789876543210 x where
-      Let0123456789876543210Scrutinee_0123456789876543210 x = (x :: Maybe a)
-    type family Case_0123456789876543210 x t where
-      Case_0123456789876543210 x ( 'Just (y :: a) :: Maybe a) = Apply JustSym0 (Apply JustSym0 (y :: a) :: Maybe a)
-    type family Case_0123456789876543210 arg_0123456789876543210 a_0123456789876543210 t where
-      Case_0123456789876543210 arg_0123456789876543210 a_0123456789876543210 '((x :: a),
-                                                                               (y :: b)) = Apply (Apply Tuple2Sym0 (y :: b)) (x :: a)
-    type family Lambda_0123456789876543210 a_0123456789876543210 t where
-      Lambda_0123456789876543210 a_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 a_0123456789876543210 arg_0123456789876543210
-    type Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall a_01234567898765432100123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall a_01234567898765432100123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210
-    type Let0123456789876543210Scrutinee_0123456789876543210Sym1 x0123456789876543210 =
-        Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd
-            (((,)
-                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
-               ())
-    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210
-      where
-        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall x0123456789876543210
-                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
-                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210
-    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210
-    type family Let0123456789876543210Scrutinee_0123456789876543210 x where
-      Let0123456789876543210Scrutinee_0123456789876543210 x = Apply JustSym0 x
-    type family Case_0123456789876543210 x t where
-      Case_0123456789876543210 x ( 'Just y :: Maybe Bool) = (y :: Bool)
-    type Foo9Sym1 (a0123456789876543210 :: a0123456789876543210) =
-        Foo9 a0123456789876543210
-    instance SuppressUnusedWarnings Foo9Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo9Sym0KindInference) ())
-    data Foo9Sym0 :: forall a0123456789876543210.
-                     (~>) a0123456789876543210 a0123456789876543210
-      where
-        Foo9Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo9Sym0 arg) (Foo9Sym1 arg) =>
-                                 Foo9Sym0 a0123456789876543210
-    type instance Apply Foo9Sym0 a0123456789876543210 = Foo9 a0123456789876543210
-    type Foo8Sym1 (a0123456789876543210 :: Maybe a0123456789876543210) =
-        Foo8 a0123456789876543210
-    instance SuppressUnusedWarnings Foo8Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo8Sym0KindInference) ())
-    data Foo8Sym0 :: forall a0123456789876543210.
-                     (~>) (Maybe a0123456789876543210) (Maybe a0123456789876543210)
-      where
-        Foo8Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo8Sym0 arg) (Foo8Sym1 arg) =>
-                                 Foo8Sym0 a0123456789876543210
-    type instance Apply Foo8Sym0 a0123456789876543210 = Foo8 a0123456789876543210
-    type Foo7Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
-        Foo7 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Foo7Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Foo7Sym1KindInference) ())
-    data Foo7Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                    (~>) b0123456789876543210 a0123456789876543210
-      where
-        Foo7Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Foo7Sym1 a0123456789876543210) arg) (Foo7Sym2 a0123456789876543210 arg) =>
-                                 Foo7Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Foo7Sym1 a0123456789876543210) a0123456789876543210 = Foo7 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Foo7Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo7Sym0KindInference) ())
-    data Foo7Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
-      where
-        Foo7Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo7Sym0 arg) (Foo7Sym1 arg) =>
-                                 Foo7Sym0 a0123456789876543210
-    type instance Apply Foo7Sym0 a0123456789876543210 = Foo7Sym1 a0123456789876543210
-    type Foo6Sym1 (a0123456789876543210 :: Maybe (Maybe a0123456789876543210)) =
-        Foo6 a0123456789876543210
-    instance SuppressUnusedWarnings Foo6Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo6Sym0KindInference) ())
-    data Foo6Sym0 :: forall a0123456789876543210.
-                     (~>) (Maybe (Maybe a0123456789876543210)) (Maybe (Maybe a0123456789876543210))
-      where
-        Foo6Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo6Sym0 arg) (Foo6Sym1 arg) =>
-                                 Foo6Sym0 a0123456789876543210
-    type instance Apply Foo6Sym0 a0123456789876543210 = Foo6 a0123456789876543210
-    type Foo5Sym1 (a0123456789876543210 :: Maybe (Maybe a0123456789876543210)) =
-        Foo5 a0123456789876543210
-    instance SuppressUnusedWarnings Foo5Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ())
-    data Foo5Sym0 :: forall a0123456789876543210.
-                     (~>) (Maybe (Maybe a0123456789876543210)) (Maybe (Maybe a0123456789876543210))
-      where
-        Foo5Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) =>
-                                 Foo5Sym0 a0123456789876543210
-    type instance Apply Foo5Sym0 a0123456789876543210 = Foo5 a0123456789876543210
-    type Foo4Sym1 (a0123456789876543210 :: (a0123456789876543210,
-                                            b0123456789876543210)) =
-        Foo4 a0123456789876543210
-    instance SuppressUnusedWarnings Foo4Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ())
-    data Foo4Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) (a0123456789876543210,
-                           b0123456789876543210) (b0123456789876543210, a0123456789876543210)
-      where
-        Foo4Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) =>
-                                 Foo4Sym0 a0123456789876543210
-    type instance Apply Foo4Sym0 a0123456789876543210 = Foo4 a0123456789876543210
-    type Foo3Sym1 (a0123456789876543210 :: Maybe a0123456789876543210) =
-        Foo3 a0123456789876543210
-    instance SuppressUnusedWarnings Foo3Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ())
-    data Foo3Sym0 :: forall a0123456789876543210.
-                     (~>) (Maybe a0123456789876543210) a0123456789876543210
-      where
-        Foo3Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>
-                                 Foo3Sym0 a0123456789876543210
-    type instance Apply Foo3Sym0 a0123456789876543210 = Foo3 a0123456789876543210
-    type Foo2Sym1 (a0123456789876543210 :: Maybe a0123456789876543210) =
-        Foo2 a0123456789876543210
-    instance SuppressUnusedWarnings Foo2Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ())
-    data Foo2Sym0 :: forall a0123456789876543210.
-                     (~>) (Maybe a0123456789876543210) a0123456789876543210
-      where
-        Foo2Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) =>
-                                 Foo2Sym0 a0123456789876543210
-    type instance Apply Foo2Sym0 a0123456789876543210 = Foo2 a0123456789876543210
-    type Foo1Sym1 (a0123456789876543210 :: Maybe a0123456789876543210) =
-        Foo1 a0123456789876543210
-    instance SuppressUnusedWarnings Foo1Sym0 where
-      suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ())
-    data Foo1Sym0 :: forall a0123456789876543210.
-                     (~>) (Maybe a0123456789876543210) a0123456789876543210
-      where
-        Foo1Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>
-                                 Foo1Sym0 a0123456789876543210
-    type instance Apply Foo1Sym0 a0123456789876543210 = Foo1 a0123456789876543210
-    type GSym1 a0123456789876543210 = G a0123456789876543210
-    instance SuppressUnusedWarnings GSym0 where
-      suppressUnusedWarnings = snd (((,) GSym0KindInference) ())
-    data GSym0 a0123456789876543210
-      where
-        GSym0KindInference :: forall a0123456789876543210
-                                     arg. SameKind (Apply GSym0 arg) (GSym1 arg) =>
-                              GSym0 a0123456789876543210
-    type instance Apply GSym0 a0123456789876543210 = G a0123456789876543210
-    type F3Sym1 a0123456789876543210 = F3 a0123456789876543210
-    instance SuppressUnusedWarnings F3Sym0 where
-      suppressUnusedWarnings = snd (((,) F3Sym0KindInference) ())
-    data F3Sym0 a0123456789876543210
-      where
-        F3Sym0KindInference :: forall a0123456789876543210
-                                      arg. SameKind (Apply F3Sym0 arg) (F3Sym1 arg) =>
-                               F3Sym0 a0123456789876543210
-    type instance Apply F3Sym0 a0123456789876543210 = F3 a0123456789876543210
-    type F2Sym1 a0123456789876543210 = F2 a0123456789876543210
-    instance SuppressUnusedWarnings F2Sym0 where
-      suppressUnusedWarnings = snd (((,) F2Sym0KindInference) ())
-    data F2Sym0 a0123456789876543210
-      where
-        F2Sym0KindInference :: forall a0123456789876543210
-                                      arg. SameKind (Apply F2Sym0 arg) (F2Sym1 arg) =>
-                               F2Sym0 a0123456789876543210
-    type instance Apply F2Sym0 a0123456789876543210 = F2 a0123456789876543210
-    type F1Sym1 a0123456789876543210 = F1 a0123456789876543210
-    instance SuppressUnusedWarnings F1Sym0 where
-      suppressUnusedWarnings = snd (((,) F1Sym0KindInference) ())
-    data F1Sym0 a0123456789876543210
-      where
-        F1Sym0KindInference :: forall a0123456789876543210
-                                      arg. SameKind (Apply F1Sym0 arg) (F1Sym1 arg) =>
-                               F1Sym0 a0123456789876543210
-    type instance Apply F1Sym0 a0123456789876543210 = F1 a0123456789876543210
-    type family Foo9 (a :: a) :: a where
-      Foo9 (x :: a) = Apply (Apply (Let0123456789876543210GSym1 x) x) Tuple0Sym0
-    type family Foo8 (a :: Maybe a) :: Maybe a where
-      Foo8 ( 'Just (wild_0123456789876543210 :: a) :: Maybe a) = Let0123456789876543210XSym1 wild_0123456789876543210
-    type family Foo7 (a :: a) (a :: b) :: a where
-      Foo7 (x :: a) (wild_0123456789876543210 :: b) = (x :: a)
-    type family Foo6 (a :: Maybe (Maybe a)) :: Maybe (Maybe a) where
-      Foo6 ( 'Just x :: Maybe (Maybe a)) = Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x)
-    type family Foo5 (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 family Foo4 (a :: (a, b)) :: (b, a) where
-      Foo4 a_0123456789876543210 = Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210
-    type family Foo3 (a :: Maybe a) :: a where
-      Foo3 ( 'Just x) = (x :: a)
-    type family Foo2 (a :: Maybe a) :: a where
-      Foo2 ( 'Just x :: Maybe a) = (x :: a)
-    type family Foo1 (a :: Maybe a) :: a where
-      Foo1 ( 'Just x :: Maybe a) = (x :: a)
-    type family G a where
-      G x = Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x)
-    type family F3 a where
-      F3 ( 'Just a :: Maybe Bool) = "hi"
-    type family F2 a where
-      F2 (x :: Maybe a) = (x :: Maybe a)
-    type family F1 a where
-      F1 (x :: Maybe Bool) = (x :: Maybe Bool)
-    sFoo9 :: forall a (t :: a). Sing t -> Sing (Apply Foo9Sym0 t :: a)
-    sFoo8 ::
-      forall a (t :: Maybe a).
-      Sing t -> Sing (Apply Foo8Sym0 t :: Maybe a)
-    sFoo7 ::
-      forall a b (t :: a) (t :: b).
-      Sing t -> Sing t -> Sing (Apply (Apply Foo7Sym0 t) t :: a)
-    sFoo6 ::
-      forall a (t :: Maybe (Maybe a)).
-      Sing t -> Sing (Apply Foo6Sym0 t :: Maybe (Maybe a))
-    sFoo5 ::
-      forall a (t :: Maybe (Maybe a)).
-      Sing t -> Sing (Apply Foo5Sym0 t :: Maybe (Maybe a))
-    sFoo4 ::
-      forall a b (t :: (a, b)).
-      Sing t -> Sing (Apply Foo4Sym0 t :: (b, a))
-    sFoo3 ::
-      forall a (t :: Maybe a). Sing t -> Sing (Apply Foo3Sym0 t :: a)
-    sFoo2 ::
-      forall a (t :: Maybe a). Sing t -> Sing (Apply Foo2Sym0 t :: a)
-    sFoo1 ::
-      forall a (t :: Maybe a). Sing t -> Sing (Apply Foo1Sym0 t :: a)
-    sG :: forall arg. Sing arg -> Sing (Apply GSym0 arg)
-    sF3 :: forall arg. Sing arg -> Sing (Apply F3Sym0 arg)
-    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 b (t :: a) (t :: b).
-                   Sing t
-                   -> Sing t
-                      -> Sing (Apply (Apply (Let0123456789876543210GSym1 x) t) t :: a)
-                 sG (sY :: Sing y) _ = sY
-               in
-                 (applySing
-                    ((applySing ((singFun2 @(Let0123456789876543210GSym1 x)) sG)) sX))
-                   STuple0 }
-    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 (Let0123456789876543210XSym1 wild_0123456789876543210)
-                 sX
-                   = (applySing ((singFun1 @JustSym0) SJust))
-                       (sWild_0123456789876543210 ::
-                          Sing (wild_0123456789876543210 :: a)) ::
-                       Sing (Apply JustSym0 (wild_0123456789876543210 :: a) :: Maybe a)
-               in sX }
-    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) }
-    sFoo6 (SJust (sX :: Sing x))
-      = case SJust (sX :: Sing x) of {
-          (_ :: Sing ( 'Just x :: Maybe (Maybe a)))
-            -> let
-                 sScrutinee_0123456789876543210 ::
-                   Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x)
-                 sScrutinee_0123456789876543210 = sX :: Sing (x :: Maybe a)
-               in  (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)) } }) ::
-                     Sing (Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x) :: Maybe (Maybe a)) }
-    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)) }
-    sFoo4 (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      = (applySing
-           ((singFun1
-               @(Apply Lambda_0123456789876543210Sym0 a_0123456789876543210))
-              (\ sArg_0123456789876543210
-                 -> case sArg_0123456789876543210 of {
-                      (_ :: Sing 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)) } }) ::
-                             Sing (Case_0123456789876543210 arg_0123456789876543210 a_0123456789876543210 arg_0123456789876543210) })))
-          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) }
-    sFoo1 (SJust (sX :: Sing x))
-      = case SJust (sX :: Sing x) of {
-          (_ :: Sing ( 'Just x :: Maybe a)) -> sX :: Sing (x :: a) }
-    sG (sX :: Sing x)
-      = let
-          sScrutinee_0123456789876543210 ::
-            Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x)
-          sScrutinee_0123456789876543210
-            = (applySing ((singFun1 @JustSym0) SJust)) sX
-        in  (case sScrutinee_0123456789876543210 of {
-               SJust (sY :: Sing y)
-                 -> case SJust (sY :: Sing y) of {
-                      (_ :: Sing ( 'Just y :: Maybe Bool))
-                        -> sY :: Sing (y :: Bool) } }) ::
-              Sing (Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x))
-    sF3 (SJust (sA :: Sing a))
-      = case SJust (sA :: Sing a) of {
-          (_ :: Sing ( 'Just a :: Maybe Bool)) -> sing :: Sing "hi" }
-    sF2 (sX :: Sing x)
-      = case sX :: Sing x of {
-          (_ :: Sing (x :: Maybe a)) -> sX :: Sing (x :: Maybe a) }
-    sF1 (sX :: Sing x)
-      = case sX :: Sing x of {
-          (_ :: Sing (x :: Maybe Bool)) -> sX :: Sing (x :: Maybe Bool) }
-    instance SingI (Foo9Sym0 :: (~>) a a) where
-      sing = (singFun1 @Foo9Sym0) sFoo9
-    instance SingI (Foo8Sym0 :: (~>) (Maybe a) (Maybe a)) where
-      sing = (singFun1 @Foo8Sym0) sFoo8
-    instance SingI (Foo7Sym0 :: (~>) a ((~>) b a)) where
-      sing = (singFun2 @Foo7Sym0) sFoo7
-    instance SingI d => SingI (Foo7Sym1 (d :: a) :: (~>) b a) where
-      sing = (singFun1 @(Foo7Sym1 (d :: a))) (sFoo7 (sing @d))
-    instance SingI (Foo6Sym0 :: (~>) (Maybe (Maybe a)) (Maybe (Maybe a))) where
-      sing = (singFun1 @Foo6Sym0) sFoo6
-    instance SingI (Foo5Sym0 :: (~>) (Maybe (Maybe a)) (Maybe (Maybe a))) where
-      sing = (singFun1 @Foo5Sym0) sFoo5
-    instance SingI (Foo4Sym0 :: (~>) (a, b) (b, a)) where
-      sing = (singFun1 @Foo4Sym0) sFoo4
-    instance SingI (Foo3Sym0 :: (~>) (Maybe a) a) where
-      sing = (singFun1 @Foo3Sym0) sFoo3
-    instance SingI (Foo2Sym0 :: (~>) (Maybe a) a) where
-      sing = (singFun1 @Foo2Sym0) sFoo2
-    instance SingI (Foo1Sym0 :: (~>) (Maybe a) a) where
-      sing = (singFun1 @Foo1Sym0) sFoo1
-    instance SingI GSym0 where
-      sing = (singFun1 @GSym0) sG
-    instance SingI F3Sym0 where
-      sing = (singFun1 @F3Sym0) sF3
-    instance SingI F2Sym0 where
-      sing = (singFun1 @F2Sym0) sF2
-    instance SingI F1Sym0 where
-      sing = (singFun1 @F1Sym0) sF1
diff --git a/tests/compile-and-dump/Singletons/T183.ghc88.template b/tests/compile-and-dump/Singletons/T183.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T183.ghc88.template
@@ -0,0 +1,516 @@
+Singletons/T183.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| f1 (x :: Maybe Bool) = (x :: Maybe Bool)
+          f2 (x :: Maybe a) = (x :: Maybe a)
+          f3 (Just a :: Maybe Bool) = "hi"
+          g x = case Just x of { (Just y :: Maybe Bool) -> (y :: Bool) }
+          foo1 :: Maybe a -> a
+          foo1 (Just x :: Maybe a) = (x :: a)
+          foo2, foo3 :: forall a. Maybe a -> a
+          foo2 (Just x :: Maybe a) = (x :: a)
+          foo3 (Just x) = (x :: a)
+          foo4 :: (a, b) -> (b, a)
+          foo4 = \ (x :: a, y :: b) -> (y :: b, x :: a)
+          foo5, foo6 :: Maybe (Maybe a) -> Maybe (Maybe a)
+          foo5 (Just (Just (x :: a) :: Maybe a) :: Maybe (Maybe a))
+            = Just (Just (x :: a) :: Maybe a) :: Maybe (Maybe a)
+          foo6 (Just x :: Maybe (Maybe a))
+            = case x :: Maybe a of {
+                (Just (y :: a) :: Maybe a) -> Just (Just (y :: a) :: Maybe a) }
+          foo7 :: a -> b -> a
+          foo7 (x :: a) (_ :: b) = (x :: a)
+          foo8 :: forall a. Maybe a -> Maybe a
+          foo8 x@(Just (_ :: a) :: Maybe a) = x
+          foo9 :: a -> a
+          foo9 (x :: a)
+            = let
+                g :: a -> b -> a
+                g y _ = y
+              in g x () |]
+  ======>
+    f1 (x :: Maybe Bool) = x :: Maybe Bool
+    f2 (x :: Maybe a) = x :: Maybe a
+    f3 (Just a :: Maybe Bool) = "hi"
+    g x = case Just x of { (Just y :: Maybe Bool) -> y :: Bool }
+    foo1 :: Maybe a -> a
+    foo1 (Just x :: Maybe a) = x :: a
+    foo2 :: forall a. Maybe a -> a
+    foo3 :: forall a. Maybe a -> a
+    foo2 (Just x :: Maybe a) = x :: a
+    foo3 (Just x) = x :: a
+    foo4 :: (a, b) -> (b, a)
+    foo4 = \ (x :: a, y :: b) -> (y :: b, x :: a)
+    foo5 :: Maybe (Maybe a) -> Maybe (Maybe a)
+    foo6 :: Maybe (Maybe a) -> Maybe (Maybe a)
+    foo5 (Just (Just (x :: a) :: Maybe a) :: Maybe (Maybe a))
+      = Just (Just (x :: a) :: Maybe a) :: Maybe (Maybe a)
+    foo6 (Just x :: Maybe (Maybe a))
+      = case x :: Maybe a of {
+          (Just (y :: a) :: Maybe a) -> Just (Just (y :: a) :: Maybe a) }
+    foo7 :: a -> b -> a
+    foo7 (x :: a) (_ :: b) = x :: a
+    foo8 :: forall a. Maybe a -> Maybe a
+    foo8 x@(Just (_ :: a) :: Maybe a) = x
+    foo9 :: a -> a
+    foo9 (x :: a)
+      = let
+          g :: a -> b -> a
+          g y _ = y
+        in (g x) ()
+    type Let0123456789876543210GSym3 x0123456789876543210 (a0123456789876543210 :: a) (a0123456789876543210 :: b0123456789876543210) =
+        Let0123456789876543210G x0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210GSym2 a0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210GSym2KindInference) ())
+    data Let0123456789876543210GSym2 x0123456789876543210 (a0123456789876543210 :: a) :: forall b0123456789876543210.
+                                                                                         (~>) b0123456789876543210 a
+      where
+        Let0123456789876543210GSym2KindInference :: forall x0123456789876543210
+                                                           a0123456789876543210
+                                                           a0123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210) arg) (Let0123456789876543210GSym3 x0123456789876543210 a0123456789876543210 arg) =>
+                                                    Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (Let0123456789876543210GSym2 a0123456789876543210 x0123456789876543210) a0123456789876543210 = Let0123456789876543210G a0123456789876543210 x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210GSym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210GSym1KindInference) ())
+    data Let0123456789876543210GSym1 x0123456789876543210 :: forall a
+                                                                    b0123456789876543210.
+                                                             (~>) a ((~>) b0123456789876543210 a)
+      where
+        Let0123456789876543210GSym1KindInference :: forall x0123456789876543210
+                                                           a0123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210GSym1 x0123456789876543210) arg) (Let0123456789876543210GSym2 x0123456789876543210 arg) =>
+                                                    Let0123456789876543210GSym1 x0123456789876543210 a0123456789876543210
+    type instance Apply (Let0123456789876543210GSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210GSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210GSym0KindInference) ())
+    data Let0123456789876543210GSym0 x0123456789876543210
+      where
+        Let0123456789876543210GSym0KindInference :: forall x0123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210GSym0 arg) (Let0123456789876543210GSym1 arg) =>
+                                                    Let0123456789876543210GSym0 x0123456789876543210
+    type instance Apply Let0123456789876543210GSym0 x0123456789876543210 = Let0123456789876543210GSym1 x0123456789876543210
+    type family Let0123456789876543210G x (a :: a) (a :: b) :: a where
+      Let0123456789876543210G x y _ = y
+    type Let0123456789876543210XSym1 wild_01234567898765432100123456789876543210 =
+        Let0123456789876543210X wild_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210XSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210XSym0KindInference) ())
+    data Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210
+      where
+        Let0123456789876543210XSym0KindInference :: forall wild_01234567898765432100123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210XSym0 arg) (Let0123456789876543210XSym1 arg) =>
+                                                    Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210
+    type instance Apply Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210X wild_01234567898765432100123456789876543210
+    type family Let0123456789876543210X wild_0123456789876543210 where
+      Let0123456789876543210X wild_0123456789876543210 = Apply JustSym0 (wild_0123456789876543210 :: a) :: Maybe a
+    type Let0123456789876543210Scrutinee_0123456789876543210Sym1 x0123456789876543210 =
+        Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd
+            (((,)
+                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
+               ())
+    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210
+      where
+        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
+                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210
+    type family Let0123456789876543210Scrutinee_0123456789876543210 x where
+      Let0123456789876543210Scrutinee_0123456789876543210 x = x :: Maybe a
+    type family Case_0123456789876543210 x t where
+      Case_0123456789876543210 x ('Just (y :: a) :: Maybe a) = Apply JustSym0 (Apply JustSym0 (y :: a) :: Maybe a)
+    type family Case_0123456789876543210 arg_0123456789876543210 a_0123456789876543210 t where
+      Case_0123456789876543210 arg_0123456789876543210 a_0123456789876543210 '(x :: a,
+                                                                               y :: b) = Apply (Apply Tuple2Sym0 (y :: b)) (x :: a)
+    type family Lambda_0123456789876543210 a_0123456789876543210 t where
+      Lambda_0123456789876543210 a_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 a_0123456789876543210 arg_0123456789876543210
+    type Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall a_01234567898765432100123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall a_01234567898765432100123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210
+    type Let0123456789876543210Scrutinee_0123456789876543210Sym1 x0123456789876543210 =
+        Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd
+            (((,)
+                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
+               ())
+    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210
+      where
+        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
+                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210
+    type family Let0123456789876543210Scrutinee_0123456789876543210 x where
+      Let0123456789876543210Scrutinee_0123456789876543210 x = Apply JustSym0 x
+    type family Case_0123456789876543210 x t where
+      Case_0123456789876543210 x ('Just y :: Maybe Bool) = y :: Bool
+    type Foo9Sym1 (a0123456789876543210 :: a0123456789876543210) =
+        Foo9 a0123456789876543210
+    instance SuppressUnusedWarnings Foo9Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo9Sym0KindInference) ())
+    data Foo9Sym0 :: forall a0123456789876543210.
+                     (~>) a0123456789876543210 a0123456789876543210
+      where
+        Foo9Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo9Sym0 arg) (Foo9Sym1 arg) =>
+                                 Foo9Sym0 a0123456789876543210
+    type instance Apply Foo9Sym0 a0123456789876543210 = Foo9 a0123456789876543210
+    type Foo8Sym1 (a0123456789876543210 :: Maybe a0123456789876543210) =
+        Foo8 a0123456789876543210
+    instance SuppressUnusedWarnings Foo8Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo8Sym0KindInference) ())
+    data Foo8Sym0 :: forall a0123456789876543210.
+                     (~>) (Maybe a0123456789876543210) (Maybe a0123456789876543210)
+      where
+        Foo8Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo8Sym0 arg) (Foo8Sym1 arg) =>
+                                 Foo8Sym0 a0123456789876543210
+    type instance Apply Foo8Sym0 a0123456789876543210 = Foo8 a0123456789876543210
+    type Foo7Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
+        Foo7 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Foo7Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Foo7Sym1KindInference) ())
+    data Foo7Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                    (~>) b0123456789876543210 a0123456789876543210
+      where
+        Foo7Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Foo7Sym1 a0123456789876543210) arg) (Foo7Sym2 a0123456789876543210 arg) =>
+                                 Foo7Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Foo7Sym1 a0123456789876543210) a0123456789876543210 = Foo7 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Foo7Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo7Sym0KindInference) ())
+    data Foo7Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
+      where
+        Foo7Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo7Sym0 arg) (Foo7Sym1 arg) =>
+                                 Foo7Sym0 a0123456789876543210
+    type instance Apply Foo7Sym0 a0123456789876543210 = Foo7Sym1 a0123456789876543210
+    type Foo6Sym1 (a0123456789876543210 :: Maybe (Maybe a0123456789876543210)) =
+        Foo6 a0123456789876543210
+    instance SuppressUnusedWarnings Foo6Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo6Sym0KindInference) ())
+    data Foo6Sym0 :: forall a0123456789876543210.
+                     (~>) (Maybe (Maybe a0123456789876543210)) (Maybe (Maybe a0123456789876543210))
+      where
+        Foo6Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo6Sym0 arg) (Foo6Sym1 arg) =>
+                                 Foo6Sym0 a0123456789876543210
+    type instance Apply Foo6Sym0 a0123456789876543210 = Foo6 a0123456789876543210
+    type Foo5Sym1 (a0123456789876543210 :: Maybe (Maybe a0123456789876543210)) =
+        Foo5 a0123456789876543210
+    instance SuppressUnusedWarnings Foo5Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ())
+    data Foo5Sym0 :: forall a0123456789876543210.
+                     (~>) (Maybe (Maybe a0123456789876543210)) (Maybe (Maybe a0123456789876543210))
+      where
+        Foo5Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) =>
+                                 Foo5Sym0 a0123456789876543210
+    type instance Apply Foo5Sym0 a0123456789876543210 = Foo5 a0123456789876543210
+    type Foo4Sym1 (a0123456789876543210 :: (a0123456789876543210,
+                                            b0123456789876543210)) =
+        Foo4 a0123456789876543210
+    instance SuppressUnusedWarnings Foo4Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ())
+    data Foo4Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) (a0123456789876543210,
+                           b0123456789876543210) (b0123456789876543210, a0123456789876543210)
+      where
+        Foo4Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) =>
+                                 Foo4Sym0 a0123456789876543210
+    type instance Apply Foo4Sym0 a0123456789876543210 = Foo4 a0123456789876543210
+    type Foo3Sym1 (a0123456789876543210 :: Maybe a0123456789876543210) =
+        Foo3 a0123456789876543210
+    instance SuppressUnusedWarnings Foo3Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ())
+    data Foo3Sym0 :: forall a0123456789876543210.
+                     (~>) (Maybe a0123456789876543210) a0123456789876543210
+      where
+        Foo3Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) =>
+                                 Foo3Sym0 a0123456789876543210
+    type instance Apply Foo3Sym0 a0123456789876543210 = Foo3 a0123456789876543210
+    type Foo2Sym1 (a0123456789876543210 :: Maybe a0123456789876543210) =
+        Foo2 a0123456789876543210
+    instance SuppressUnusedWarnings Foo2Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ())
+    data Foo2Sym0 :: forall a0123456789876543210.
+                     (~>) (Maybe a0123456789876543210) a0123456789876543210
+      where
+        Foo2Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) =>
+                                 Foo2Sym0 a0123456789876543210
+    type instance Apply Foo2Sym0 a0123456789876543210 = Foo2 a0123456789876543210
+    type Foo1Sym1 (a0123456789876543210 :: Maybe a0123456789876543210) =
+        Foo1 a0123456789876543210
+    instance SuppressUnusedWarnings Foo1Sym0 where
+      suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ())
+    data Foo1Sym0 :: forall a0123456789876543210.
+                     (~>) (Maybe a0123456789876543210) a0123456789876543210
+      where
+        Foo1Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) =>
+                                 Foo1Sym0 a0123456789876543210
+    type instance Apply Foo1Sym0 a0123456789876543210 = Foo1 a0123456789876543210
+    type GSym1 a0123456789876543210 = G a0123456789876543210
+    instance SuppressUnusedWarnings GSym0 where
+      suppressUnusedWarnings = snd (((,) GSym0KindInference) ())
+    data GSym0 a0123456789876543210
+      where
+        GSym0KindInference :: forall a0123456789876543210
+                                     arg. SameKind (Apply GSym0 arg) (GSym1 arg) =>
+                              GSym0 a0123456789876543210
+    type instance Apply GSym0 a0123456789876543210 = G a0123456789876543210
+    type F3Sym1 a0123456789876543210 = F3 a0123456789876543210
+    instance SuppressUnusedWarnings F3Sym0 where
+      suppressUnusedWarnings = snd (((,) F3Sym0KindInference) ())
+    data F3Sym0 a0123456789876543210
+      where
+        F3Sym0KindInference :: forall a0123456789876543210
+                                      arg. SameKind (Apply F3Sym0 arg) (F3Sym1 arg) =>
+                               F3Sym0 a0123456789876543210
+    type instance Apply F3Sym0 a0123456789876543210 = F3 a0123456789876543210
+    type F2Sym1 a0123456789876543210 = F2 a0123456789876543210
+    instance SuppressUnusedWarnings F2Sym0 where
+      suppressUnusedWarnings = snd (((,) F2Sym0KindInference) ())
+    data F2Sym0 a0123456789876543210
+      where
+        F2Sym0KindInference :: forall a0123456789876543210
+                                      arg. SameKind (Apply F2Sym0 arg) (F2Sym1 arg) =>
+                               F2Sym0 a0123456789876543210
+    type instance Apply F2Sym0 a0123456789876543210 = F2 a0123456789876543210
+    type F1Sym1 a0123456789876543210 = F1 a0123456789876543210
+    instance SuppressUnusedWarnings F1Sym0 where
+      suppressUnusedWarnings = snd (((,) F1Sym0KindInference) ())
+    data F1Sym0 a0123456789876543210
+      where
+        F1Sym0KindInference :: forall a0123456789876543210
+                                      arg. SameKind (Apply F1Sym0 arg) (F1Sym1 arg) =>
+                               F1Sym0 a0123456789876543210
+    type instance Apply F1Sym0 a0123456789876543210 = F1 a0123456789876543210
+    type family Foo9 (a :: a) :: a where
+      Foo9 (x :: a) = Apply (Apply (Let0123456789876543210GSym1 x) x) Tuple0Sym0
+    type family Foo8 (a :: Maybe a) :: Maybe a where
+      Foo8 ('Just (wild_0123456789876543210 :: a) :: Maybe a) = Let0123456789876543210XSym1 wild_0123456789876543210
+    type family Foo7 (a :: a) (a :: b) :: a where
+      Foo7 (x :: a) (wild_0123456789876543210 :: b) = x :: a
+    type family Foo6 (a :: Maybe (Maybe a)) :: Maybe (Maybe a) where
+      Foo6 ('Just x :: Maybe (Maybe a)) = Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x)
+    type family Foo5 (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 family Foo4 (a :: (a, b)) :: (b, a) where
+      Foo4 a_0123456789876543210 = Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210
+    type family Foo3 (a :: Maybe a) :: a where
+      Foo3 ('Just x) = x :: a
+    type family Foo2 (a :: Maybe a) :: a where
+      Foo2 ('Just x :: Maybe a) = x :: a
+    type family Foo1 (a :: Maybe a) :: a where
+      Foo1 ('Just x :: Maybe a) = x :: a
+    type family G a where
+      G x = Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x)
+    type family F3 a where
+      F3 ('Just a :: Maybe Bool) = "hi"
+    type family F2 a where
+      F2 (x :: Maybe a) = x :: Maybe a
+    type family F1 a where
+      F1 (x :: Maybe Bool) = x :: Maybe Bool
+    sFoo9 :: forall a (t :: a). Sing t -> Sing (Apply Foo9Sym0 t :: a)
+    sFoo8 ::
+      forall a (t :: Maybe a).
+      Sing t -> Sing (Apply Foo8Sym0 t :: Maybe a)
+    sFoo7 ::
+      forall a b (t :: a) (t :: b).
+      Sing t -> Sing t -> Sing (Apply (Apply Foo7Sym0 t) t :: a)
+    sFoo6 ::
+      forall a (t :: Maybe (Maybe a)).
+      Sing t -> Sing (Apply Foo6Sym0 t :: Maybe (Maybe a))
+    sFoo5 ::
+      forall a (t :: Maybe (Maybe a)).
+      Sing t -> Sing (Apply Foo5Sym0 t :: Maybe (Maybe a))
+    sFoo4 ::
+      forall a b (t :: (a, b)).
+      Sing t -> Sing (Apply Foo4Sym0 t :: (b, a))
+    sFoo3 ::
+      forall a (t :: Maybe a). Sing t -> Sing (Apply Foo3Sym0 t :: a)
+    sFoo2 ::
+      forall a (t :: Maybe a). Sing t -> Sing (Apply Foo2Sym0 t :: a)
+    sFoo1 ::
+      forall a (t :: Maybe a). Sing t -> Sing (Apply Foo1Sym0 t :: a)
+    sG :: forall arg. Sing arg -> Sing (Apply GSym0 arg)
+    sF3 :: forall arg. Sing arg -> Sing (Apply F3Sym0 arg)
+    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 b (t :: a) (t :: b).
+                   Sing t
+                   -> Sing t
+                      -> Sing (Apply (Apply (Let0123456789876543210GSym1 x) t) t :: a)
+                 sG (sY :: Sing y) _ = sY
+               in
+                 (applySing
+                    ((applySing ((singFun2 @(Let0123456789876543210GSym1 x)) sG)) sX))
+                   STuple0 }
+    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 (Let0123456789876543210XSym1 wild_0123456789876543210)
+                 sX
+                   = (applySing ((singFun1 @JustSym0) SJust))
+                       (sWild_0123456789876543210 ::
+                          Sing (wild_0123456789876543210 :: a)) ::
+                       Sing (Apply JustSym0 (wild_0123456789876543210 :: a) :: Maybe a)
+               in sX }
+    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) }
+    sFoo6 (SJust (sX :: Sing x))
+      = case SJust (sX :: Sing x) of {
+          (_ :: Sing ('Just x :: Maybe (Maybe a)))
+            -> let
+                 sScrutinee_0123456789876543210 ::
+                   Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x)
+                 sScrutinee_0123456789876543210 = sX :: Sing (x :: Maybe a)
+               in
+                 (id
+                    @(Sing (Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x) :: Maybe (Maybe a))))
+                   (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)) } }) }
+    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)) }
+    sFoo4 (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = (applySing
+           ((singFun1
+               @(Apply 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)) } }) })))
+          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) }
+    sFoo1 (SJust (sX :: Sing x))
+      = case SJust (sX :: Sing x) of {
+          (_ :: Sing ('Just x :: Maybe a)) -> sX :: Sing (x :: a) }
+    sG (sX :: Sing x)
+      = let
+          sScrutinee_0123456789876543210 ::
+            Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x)
+          sScrutinee_0123456789876543210
+            = (applySing ((singFun1 @JustSym0) SJust)) sX
+        in
+          (id
+             @(Sing (Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x))))
+            (case sScrutinee_0123456789876543210 of {
+               SJust (sY :: Sing y)
+                 -> case SJust (sY :: Sing y) of {
+                      (_ :: Sing ('Just y :: Maybe Bool)) -> sY :: Sing (y :: Bool) } })
+    sF3 (SJust (sA :: Sing a))
+      = case SJust (sA :: Sing a) of {
+          (_ :: Sing ('Just a :: Maybe Bool)) -> sing :: Sing "hi" }
+    sF2 (sX :: Sing x)
+      = case sX :: Sing x of {
+          (_ :: Sing (x :: Maybe a)) -> sX :: Sing (x :: Maybe a) }
+    sF1 (sX :: Sing x)
+      = case sX :: Sing x of {
+          (_ :: Sing (x :: Maybe Bool)) -> sX :: Sing (x :: Maybe Bool) }
+    instance SingI (Foo9Sym0 :: (~>) a a) where
+      sing = (singFun1 @Foo9Sym0) sFoo9
+    instance SingI (Foo8Sym0 :: (~>) (Maybe a) (Maybe a)) where
+      sing = (singFun1 @Foo8Sym0) sFoo8
+    instance SingI (Foo7Sym0 :: (~>) a ((~>) b a)) where
+      sing = (singFun2 @Foo7Sym0) sFoo7
+    instance SingI d => SingI (Foo7Sym1 (d :: a) :: (~>) b a) where
+      sing = (singFun1 @(Foo7Sym1 (d :: a))) (sFoo7 (sing @d))
+    instance SingI (Foo6Sym0 :: (~>) (Maybe (Maybe a)) (Maybe (Maybe a))) where
+      sing = (singFun1 @Foo6Sym0) sFoo6
+    instance SingI (Foo5Sym0 :: (~>) (Maybe (Maybe a)) (Maybe (Maybe a))) where
+      sing = (singFun1 @Foo5Sym0) sFoo5
+    instance SingI (Foo4Sym0 :: (~>) (a, b) (b, a)) where
+      sing = (singFun1 @Foo4Sym0) sFoo4
+    instance SingI (Foo3Sym0 :: (~>) (Maybe a) a) where
+      sing = (singFun1 @Foo3Sym0) sFoo3
+    instance SingI (Foo2Sym0 :: (~>) (Maybe a) a) where
+      sing = (singFun1 @Foo2Sym0) sFoo2
+    instance SingI (Foo1Sym0 :: (~>) (Maybe a) a) where
+      sing = (singFun1 @Foo1Sym0) sFoo1
+    instance SingI GSym0 where
+      sing = (singFun1 @GSym0) sG
+    instance SingI F3Sym0 where
+      sing = (singFun1 @F3Sym0) sF3
+    instance SingI F2Sym0 where
+      sing = (singFun1 @F2Sym0) sF2
+    instance SingI F1Sym0 where
+      sing = (singFun1 @F1Sym0) sF1
diff --git a/tests/compile-and-dump/Singletons/T184.ghc86.template b/tests/compile-and-dump/Singletons/T184.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T184.ghc86.template
+++ /dev/null
@@ -1,499 +0,0 @@
-Singletons/T184.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| boogie :: Maybe a -> Maybe Bool -> Maybe a
-          boogie ma mb
-            = do a <- ma
-                 b <- mb
-                 guard b
-                 return a
-          zip' :: [a] -> [b] -> [(a, b)]
-          zip' xs ys = [(x, y) | x <- xs |  y <- ys]
-          cartProd :: [a] -> [b] -> [(a, b)]
-          cartProd xs ys = [(x, y) | x <- xs, y <- ys]
-          trues :: [Bool] -> [Bool]
-          trues xs = [x | x <- xs, x] |]
-  ======>
-    boogie :: Maybe a -> Maybe Bool -> Maybe a
-    boogie ma mb
-      = do a <- ma
-           b <- mb
-           guard b
-           return a
-    zip' :: [a] -> [b] -> [(a, b)]
-    zip' xs ys = [(x, y) | x <- xs |  y <- ys]
-    cartProd :: [a] -> [b] -> [(a, b)]
-    cartProd xs ys = [(x, y) | x <- xs, y <- ys]
-    trues :: [Bool] -> [Bool]
-    trues xs = [x | x <- xs, x]
-    type family Lambda_0123456789876543210 xs t where
-      Lambda_0123456789876543210 xs x = Apply (Apply (>>@#@$) (Apply GuardSym0 x)) (Apply ReturnSym0 x)
-    type Lambda_0123456789876543210Sym2 xs0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 xs0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 xs0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 xs0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 xs0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall xs0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 xs0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210
-    type family Lambda_0123456789876543210 xs ys x t where
-      Lambda_0123456789876543210 xs ys x y = Apply ReturnSym0 (Apply (Apply Tuple2Sym0 x) y)
-    type Lambda_0123456789876543210Sym4 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 x0123456789876543210 ys0123456789876543210 xs0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall xs0123456789876543210
-                                                              ys0123456789876543210
-                                                              x0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym4 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 ys0123456789876543210 xs0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 ys0123456789876543210 xs0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 x0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall xs0123456789876543210
-                                                              ys0123456789876543210
-                                                              x0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 x0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym3 ys0123456789876543210 xs0123456789876543210 x0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210
-                                                              ys0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) ys0123456789876543210 = Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 xs0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall xs0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 xs0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210
-    type family Lambda_0123456789876543210 xs ys t where
-      Lambda_0123456789876543210 xs ys x = Apply (Apply (>>=@#@$) ys) (Apply (Apply (Apply Lambda_0123456789876543210Sym0 xs) ys) x)
-    type Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall xs0123456789876543210
-                                                              ys0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 ys0123456789876543210 xs0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210
-                                                              ys0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) ys0123456789876543210 = Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 xs0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall xs0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 xs0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210
-    type family Lambda_0123456789876543210 xs ys t where
-      Lambda_0123456789876543210 xs ys x = Apply ReturnSym0 x
-    type Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall xs0123456789876543210
-                                                              ys0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 ys0123456789876543210 xs0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210
-                                                              ys0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) ys0123456789876543210 = Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 xs0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall xs0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 xs0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210
-    type family Lambda_0123456789876543210 xs ys t where
-      Lambda_0123456789876543210 xs ys y = Apply ReturnSym0 y
-    type Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall xs0123456789876543210
-                                                              ys0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 ys0123456789876543210 xs0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210
-                                                              ys0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) ys0123456789876543210 = Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 xs0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall xs0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 xs0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210
-    type family Case_0123456789876543210 xs ys arg_0123456789876543210 t where
-      Case_0123456789876543210 xs ys arg_0123456789876543210 '(x,
-                                                               y) = Apply ReturnSym0 (Apply (Apply Tuple2Sym0 x) y)
-    type family Lambda_0123456789876543210 xs ys t where
-      Lambda_0123456789876543210 xs ys arg_0123456789876543210 = Case_0123456789876543210 xs ys arg_0123456789876543210 arg_0123456789876543210
-    type Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall xs0123456789876543210
-                                                              ys0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 ys0123456789876543210 xs0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210
-                                                              ys0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) ys0123456789876543210 = Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 xs0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall xs0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 xs0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210
-    type family Lambda_0123456789876543210 ma mb a t where
-      Lambda_0123456789876543210 ma mb a b = Apply (Apply (>>@#@$) (Apply GuardSym0 b)) (Apply ReturnSym0 a)
-    type Lambda_0123456789876543210Sym4 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a0123456789876543210 mb0123456789876543210 ma0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
-    data Lambda_0123456789876543210Sym3 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym3KindInference :: forall ma0123456789876543210
-                                                              mb0123456789876543210
-                                                              a0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 ma0123456789876543210 mb0123456789876543210 a0123456789876543210) arg) (Lambda_0123456789876543210Sym4 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym3 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym3 a0123456789876543210 mb0123456789876543210 ma0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 mb0123456789876543210 ma0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 mb0123456789876543210 ma0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210 a0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall ma0123456789876543210
-                                                              mb0123456789876543210
-                                                              a0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210) arg) (Lambda_0123456789876543210Sym3 ma0123456789876543210 mb0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210 a0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 mb0123456789876543210 ma0123456789876543210) a0123456789876543210 = Lambda_0123456789876543210Sym3 mb0123456789876543210 ma0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 ma0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 ma0123456789876543210 mb0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall ma0123456789876543210
-                                                              mb0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 ma0123456789876543210) arg) (Lambda_0123456789876543210Sym2 ma0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 ma0123456789876543210 mb0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 ma0123456789876543210) mb0123456789876543210 = Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 ma0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall ma0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 ma0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 ma0123456789876543210 = Lambda_0123456789876543210Sym1 ma0123456789876543210
-    type family Lambda_0123456789876543210 ma mb t where
-      Lambda_0123456789876543210 ma mb a = Apply (Apply (>>=@#@$) mb) (Apply (Apply (Apply Lambda_0123456789876543210Sym0 ma) mb) a)
-    type Lambda_0123456789876543210Sym3 ma0123456789876543210 mb0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 ma0123456789876543210 mb0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 mb0123456789876543210 ma0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall ma0123456789876543210
-                                                              mb0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210) arg) (Lambda_0123456789876543210Sym3 ma0123456789876543210 mb0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 mb0123456789876543210 ma0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 mb0123456789876543210 ma0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 ma0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 ma0123456789876543210 mb0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall ma0123456789876543210
-                                                              mb0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 ma0123456789876543210) arg) (Lambda_0123456789876543210Sym2 ma0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 ma0123456789876543210 mb0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 ma0123456789876543210) mb0123456789876543210 = Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 ma0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall ma0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 ma0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 ma0123456789876543210 = Lambda_0123456789876543210Sym1 ma0123456789876543210
-    type TruesSym1 (a0123456789876543210 :: [Bool]) =
-        Trues a0123456789876543210
-    instance SuppressUnusedWarnings TruesSym0 where
-      suppressUnusedWarnings = snd (((,) TruesSym0KindInference) ())
-    data TruesSym0 :: (~>) [Bool] [Bool]
-      where
-        TruesSym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply TruesSym0 arg) (TruesSym1 arg) =>
-                                  TruesSym0 a0123456789876543210
-    type instance Apply TruesSym0 a0123456789876543210 = Trues a0123456789876543210
-    type CartProdSym2 (a0123456789876543210 :: [a0123456789876543210]) (a0123456789876543210 :: [b0123456789876543210]) =
-        CartProd a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (CartProdSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) CartProdSym1KindInference) ())
-    data CartProdSym1 (a0123456789876543210 :: [a0123456789876543210]) :: forall b0123456789876543210.
-                                                                          (~>) [b0123456789876543210] [(a0123456789876543210,
-                                                                                                        b0123456789876543210)]
-      where
-        CartProdSym1KindInference :: forall a0123456789876543210
-                                            a0123456789876543210
-                                            arg. SameKind (Apply (CartProdSym1 a0123456789876543210) arg) (CartProdSym2 a0123456789876543210 arg) =>
-                                     CartProdSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (CartProdSym1 a0123456789876543210) a0123456789876543210 = CartProd a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings CartProdSym0 where
-      suppressUnusedWarnings = snd (((,) CartProdSym0KindInference) ())
-    data CartProdSym0 :: forall a0123456789876543210
-                                b0123456789876543210.
-                         (~>) [a0123456789876543210] ((~>) [b0123456789876543210] [(a0123456789876543210,
-                                                                                    b0123456789876543210)])
-      where
-        CartProdSym0KindInference :: forall a0123456789876543210
-                                            arg. SameKind (Apply CartProdSym0 arg) (CartProdSym1 arg) =>
-                                     CartProdSym0 a0123456789876543210
-    type instance Apply CartProdSym0 a0123456789876543210 = CartProdSym1 a0123456789876543210
-    type Zip'Sym2 (a0123456789876543210 :: [a0123456789876543210]) (a0123456789876543210 :: [b0123456789876543210]) =
-        Zip' a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Zip'Sym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) Zip'Sym1KindInference) ())
-    data Zip'Sym1 (a0123456789876543210 :: [a0123456789876543210]) :: forall b0123456789876543210.
-                                                                      (~>) [b0123456789876543210] [(a0123456789876543210,
-                                                                                                    b0123456789876543210)]
-      where
-        Zip'Sym1KindInference :: forall a0123456789876543210
-                                        a0123456789876543210
-                                        arg. SameKind (Apply (Zip'Sym1 a0123456789876543210) arg) (Zip'Sym2 a0123456789876543210 arg) =>
-                                 Zip'Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Zip'Sym1 a0123456789876543210) a0123456789876543210 = Zip' a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Zip'Sym0 where
-      suppressUnusedWarnings = snd (((,) Zip'Sym0KindInference) ())
-    data Zip'Sym0 :: forall a0123456789876543210 b0123456789876543210.
-                     (~>) [a0123456789876543210] ((~>) [b0123456789876543210] [(a0123456789876543210,
-                                                                                b0123456789876543210)])
-      where
-        Zip'Sym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply Zip'Sym0 arg) (Zip'Sym1 arg) =>
-                                 Zip'Sym0 a0123456789876543210
-    type instance Apply Zip'Sym0 a0123456789876543210 = Zip'Sym1 a0123456789876543210
-    type BoogieSym2 (a0123456789876543210 :: Maybe a0123456789876543210) (a0123456789876543210 :: Maybe Bool) =
-        Boogie a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (BoogieSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) BoogieSym1KindInference) ())
-    data BoogieSym1 (a0123456789876543210 :: Maybe a0123456789876543210) :: (~>) (Maybe Bool) (Maybe a0123456789876543210)
-      where
-        BoogieSym1KindInference :: forall a0123456789876543210
-                                          a0123456789876543210
-                                          arg. SameKind (Apply (BoogieSym1 a0123456789876543210) arg) (BoogieSym2 a0123456789876543210 arg) =>
-                                   BoogieSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (BoogieSym1 a0123456789876543210) a0123456789876543210 = Boogie a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings BoogieSym0 where
-      suppressUnusedWarnings = snd (((,) BoogieSym0KindInference) ())
-    data BoogieSym0 :: forall a0123456789876543210.
-                       (~>) (Maybe a0123456789876543210) ((~>) (Maybe Bool) (Maybe a0123456789876543210))
-      where
-        BoogieSym0KindInference :: forall a0123456789876543210
-                                          arg. SameKind (Apply BoogieSym0 arg) (BoogieSym1 arg) =>
-                                   BoogieSym0 a0123456789876543210
-    type instance Apply BoogieSym0 a0123456789876543210 = BoogieSym1 a0123456789876543210
-    type family Trues (a :: [Bool]) :: [Bool] where
-      Trues xs = Apply (Apply (>>=@#@$) xs) (Apply Lambda_0123456789876543210Sym0 xs)
-    type family CartProd (a :: [a]) (a :: [b]) :: [(a, b)] where
-      CartProd xs ys = Apply (Apply (>>=@#@$) xs) (Apply (Apply Lambda_0123456789876543210Sym0 xs) ys)
-    type family Zip' (a :: [a]) (a :: [b]) :: [(a, b)] where
-      Zip' xs ys = Apply (Apply (>>=@#@$) (Apply (Apply MzipSym0 (Apply (Apply (>>=@#@$) xs) (Apply (Apply Lambda_0123456789876543210Sym0 xs) ys))) (Apply (Apply (>>=@#@$) ys) (Apply (Apply Lambda_0123456789876543210Sym0 xs) ys)))) (Apply (Apply Lambda_0123456789876543210Sym0 xs) ys)
-    type family Boogie (a :: Maybe a) (a :: Maybe Bool) :: Maybe a where
-      Boogie ma mb = Apply (Apply (>>=@#@$) ma) (Apply (Apply Lambda_0123456789876543210Sym0 ma) mb)
-    sTrues ::
-      forall (t :: [Bool]). Sing t -> Sing (Apply TruesSym0 t :: [Bool])
-    sCartProd ::
-      forall a b (t :: [a]) (t :: [b]).
-      Sing t
-      -> Sing t -> Sing (Apply (Apply CartProdSym0 t) t :: [(a, b)])
-    sZip' ::
-      forall a b (t :: [a]) (t :: [b]).
-      Sing t -> Sing t -> Sing (Apply (Apply Zip'Sym0 t) t :: [(a, b)])
-    sBoogie ::
-      forall a (t :: Maybe a) (t :: Maybe Bool).
-      Sing t -> Sing t -> Sing (Apply (Apply BoogieSym0 t) t :: Maybe a)
-    sTrues (sXs :: Sing xs)
-      = (applySing ((applySing ((singFun2 @(>>=@#@$)) (%>>=))) sXs))
-          ((singFun1 @(Apply Lambda_0123456789876543210Sym0 xs))
-             (\ sX
-                -> case sX of {
-                     (_ :: 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 @(Apply (Apply Lambda_0123456789876543210Sym0 xs) ys))
-             (\ sX
-                -> case sX of {
-                     (_ :: Sing x)
-                       -> (applySing ((applySing ((singFun2 @(>>=@#@$)) (%>>=))) sYs))
-                            ((singFun1
-                                @(Apply (Apply (Apply Lambda_0123456789876543210Sym0 xs) ys) x))
-                               (\ sY
-                                  -> case sY of {
-                                       (_ :: Sing y)
-                                         -> (applySing ((singFun1 @ReturnSym0) sReturn))
-                                              ((applySing
-                                                  ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sX))
-                                                 sY) })) }))
-    sZip' (sXs :: Sing xs) (sYs :: Sing ys)
-      = (applySing
-           ((applySing ((singFun2 @(>>=@#@$)) (%>>=)))
-              ((applySing
-                  ((applySing ((singFun2 @MzipSym0) sMzip))
-                     ((applySing ((applySing ((singFun2 @(>>=@#@$)) (%>>=))) sXs))
-                        ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 xs) ys))
-                           (\ sX
-                              -> case sX of {
-                                   (_ :: Sing x)
-                                     -> (applySing ((singFun1 @ReturnSym0) sReturn)) sX })))))
-                 ((applySing ((applySing ((singFun2 @(>>=@#@$)) (%>>=))) sYs))
-                    ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 xs) ys))
-                       (\ sY
-                          -> case sY of {
-                               (_ :: Sing y)
-                                 -> (applySing ((singFun1 @ReturnSym0) sReturn)) sY }))))))
-          ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 xs) ys))
-             (\ sArg_0123456789876543210
-                -> case sArg_0123456789876543210 of {
-                     (_ :: Sing arg_0123456789876543210)
-                       -> (case sArg_0123456789876543210 of {
-                             STuple2 (sX :: Sing x) (sY :: Sing y)
-                               -> (applySing ((singFun1 @ReturnSym0) sReturn))
-                                    ((applySing ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sX))
-                                       sY) }) ::
-                            Sing (Case_0123456789876543210 xs ys arg_0123456789876543210 arg_0123456789876543210) }))
-    sBoogie (sMa :: Sing ma) (sMb :: Sing mb)
-      = (applySing ((applySing ((singFun2 @(>>=@#@$)) (%>>=))) sMa))
-          ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 ma) mb))
-             (\ sA
-                -> case sA of {
-                     (_ :: Sing a)
-                       -> (applySing ((applySing ((singFun2 @(>>=@#@$)) (%>>=))) sMb))
-                            ((singFun1
-                                @(Apply (Apply (Apply Lambda_0123456789876543210Sym0 ma) mb) a))
-                               (\ sB
-                                  -> case sB of {
-                                       (_ :: 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
-      sing = (singFun2 @CartProdSym0) sCartProd
-    instance SingI d =>
-             SingI (CartProdSym1 (d :: [a]) :: (~>) [b] [(a, b)]) where
-      sing = (singFun1 @(CartProdSym1 (d :: [a]))) (sCartProd (sing @d))
-    instance SingI (Zip'Sym0 :: (~>) [a] ((~>) [b] [(a, b)])) where
-      sing = (singFun2 @Zip'Sym0) sZip'
-    instance SingI d =>
-             SingI (Zip'Sym1 (d :: [a]) :: (~>) [b] [(a, b)]) where
-      sing = (singFun1 @(Zip'Sym1 (d :: [a]))) (sZip' (sing @d))
-    instance SingI (BoogieSym0 :: (~>) (Maybe a) ((~>) (Maybe Bool) (Maybe a))) where
-      sing = (singFun2 @BoogieSym0) sBoogie
-    instance SingI d =>
-             SingI (BoogieSym1 (d :: Maybe a) :: (~>) (Maybe Bool) (Maybe a)) where
-      sing = (singFun1 @(BoogieSym1 (d :: Maybe a))) (sBoogie (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T184.ghc88.template b/tests/compile-and-dump/Singletons/T184.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T184.ghc88.template
@@ -0,0 +1,500 @@
+Singletons/T184.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| boogie :: Maybe a -> Maybe Bool -> Maybe a
+          boogie ma mb
+            = do a <- ma
+                 b <- mb
+                 guard b
+                 return a
+          zip' :: [a] -> [b] -> [(a, b)]
+          zip' xs ys = [(x, y) | x <- xs |  y <- ys]
+          cartProd :: [a] -> [b] -> [(a, b)]
+          cartProd xs ys = [(x, y) | x <- xs, y <- ys]
+          trues :: [Bool] -> [Bool]
+          trues xs = [x | x <- xs, x] |]
+  ======>
+    boogie :: Maybe a -> Maybe Bool -> Maybe a
+    boogie ma mb
+      = do a <- ma
+           b <- mb
+           guard b
+           return a
+    zip' :: [a] -> [b] -> [(a, b)]
+    zip' xs ys = [(x, y) | x <- xs |  y <- ys]
+    cartProd :: [a] -> [b] -> [(a, b)]
+    cartProd xs ys = [(x, y) | x <- xs, y <- ys]
+    trues :: [Bool] -> [Bool]
+    trues xs = [x | x <- xs, x]
+    type family Lambda_0123456789876543210 xs t where
+      Lambda_0123456789876543210 xs x = Apply (Apply (>>@#@$) (Apply GuardSym0 x)) (Apply ReturnSym0 x)
+    type Lambda_0123456789876543210Sym2 xs0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 xs0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 xs0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 xs0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 xs0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall xs0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 xs0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210
+    type family Lambda_0123456789876543210 x xs ys t where
+      Lambda_0123456789876543210 x xs ys y = Apply ReturnSym0 (Apply (Apply Tuple2Sym0 x) y)
+    type Lambda_0123456789876543210Sym4 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 ys0123456789876543210 xs0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall x0123456789876543210
+                                                              xs0123456789876543210
+                                                              ys0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym4 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 ys0123456789876543210 xs0123456789876543210 x0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 ys0123456789876543210 xs0123456789876543210 x0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 xs0123456789876543210 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 x0123456789876543210 xs0123456789876543210 ys0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210
+                                                              xs0123456789876543210
+                                                              ys0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 xs0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 x0123456789876543210 xs0123456789876543210 ys0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 x0123456789876543210) ys0123456789876543210 = Lambda_0123456789876543210Sym3 xs0123456789876543210 x0123456789876543210 ys0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 x0123456789876543210 xs0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210
+                                                              xs0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 x0123456789876543210 xs0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) xs0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 xs0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 x0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall x0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 x0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210
+    type family Lambda_0123456789876543210 xs ys t where
+      Lambda_0123456789876543210 xs ys x = Apply (Apply (>>=@#@$) ys) (Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) xs) ys)
+    type Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall xs0123456789876543210
+                                                              ys0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 ys0123456789876543210 xs0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210
+                                                              ys0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) ys0123456789876543210 = Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 xs0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall xs0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 xs0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210
+    type family Lambda_0123456789876543210 xs ys t where
+      Lambda_0123456789876543210 xs ys x = Apply ReturnSym0 x
+    type Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall xs0123456789876543210
+                                                              ys0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 ys0123456789876543210 xs0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210
+                                                              ys0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) ys0123456789876543210 = Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 xs0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall xs0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 xs0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210
+    type family Lambda_0123456789876543210 xs ys t where
+      Lambda_0123456789876543210 xs ys y = Apply ReturnSym0 y
+    type Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall xs0123456789876543210
+                                                              ys0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 ys0123456789876543210 xs0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210
+                                                              ys0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) ys0123456789876543210 = Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 xs0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall xs0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 xs0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210
+    type family Case_0123456789876543210 arg_0123456789876543210 xs ys t where
+      Case_0123456789876543210 arg_0123456789876543210 xs ys '(x,
+                                                               y) = Apply ReturnSym0 (Apply (Apply Tuple2Sym0 x) y)
+    type family Lambda_0123456789876543210 xs ys t where
+      Lambda_0123456789876543210 xs ys arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 xs ys arg_0123456789876543210
+    type Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall xs0123456789876543210
+                                                              ys0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 ys0123456789876543210 xs0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 ys0123456789876543210 xs0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210
+                                                              ys0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) ys0123456789876543210 = Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 xs0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall xs0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 xs0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210
+    type family Lambda_0123456789876543210 a ma mb t where
+      Lambda_0123456789876543210 a ma mb b = Apply (Apply (>>@#@$) (Apply GuardSym0 b)) (Apply ReturnSym0 a)
+    type Lambda_0123456789876543210Sym4 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 mb0123456789876543210 ma0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym3KindInference) ())
+    data Lambda_0123456789876543210Sym3 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym3KindInference :: forall a0123456789876543210
+                                                              ma0123456789876543210
+                                                              mb0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym3 a0123456789876543210 ma0123456789876543210 mb0123456789876543210) arg) (Lambda_0123456789876543210Sym4 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym3 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym3 mb0123456789876543210 ma0123456789876543210 a0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 mb0123456789876543210 ma0123456789876543210 a0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 ma0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 a0123456789876543210 ma0123456789876543210 mb0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                              ma0123456789876543210
+                                                              mb0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 ma0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a0123456789876543210 ma0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 a0123456789876543210 ma0123456789876543210 mb0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 ma0123456789876543210 a0123456789876543210) mb0123456789876543210 = Lambda_0123456789876543210Sym3 ma0123456789876543210 a0123456789876543210 mb0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 a0123456789876543210 ma0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                              ma0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) arg) (Lambda_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 a0123456789876543210 ma0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) ma0123456789876543210 = Lambda_0123456789876543210Sym2 a0123456789876543210 ma0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 a0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 a0123456789876543210 = Lambda_0123456789876543210Sym1 a0123456789876543210
+    type family Lambda_0123456789876543210 ma mb t where
+      Lambda_0123456789876543210 ma mb a = Apply (Apply (>>=@#@$) mb) (Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) ma) mb)
+    type Lambda_0123456789876543210Sym3 ma0123456789876543210 mb0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 ma0123456789876543210 mb0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 mb0123456789876543210 ma0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall ma0123456789876543210
+                                                              mb0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210) arg) (Lambda_0123456789876543210Sym3 ma0123456789876543210 mb0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 mb0123456789876543210 ma0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 mb0123456789876543210 ma0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 ma0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 ma0123456789876543210 mb0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall ma0123456789876543210
+                                                              mb0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 ma0123456789876543210) arg) (Lambda_0123456789876543210Sym2 ma0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 ma0123456789876543210 mb0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 ma0123456789876543210) mb0123456789876543210 = Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 ma0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall ma0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 ma0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 ma0123456789876543210 = Lambda_0123456789876543210Sym1 ma0123456789876543210
+    type TruesSym1 (a0123456789876543210 :: [Bool]) =
+        Trues a0123456789876543210
+    instance SuppressUnusedWarnings TruesSym0 where
+      suppressUnusedWarnings = snd (((,) TruesSym0KindInference) ())
+    data TruesSym0 :: (~>) [Bool] [Bool]
+      where
+        TruesSym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply TruesSym0 arg) (TruesSym1 arg) =>
+                                  TruesSym0 a0123456789876543210
+    type instance Apply TruesSym0 a0123456789876543210 = Trues a0123456789876543210
+    type CartProdSym2 (a0123456789876543210 :: [a0123456789876543210]) (a0123456789876543210 :: [b0123456789876543210]) =
+        CartProd a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (CartProdSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) CartProdSym1KindInference) ())
+    data CartProdSym1 (a0123456789876543210 :: [a0123456789876543210]) :: forall b0123456789876543210.
+                                                                          (~>) [b0123456789876543210] [(a0123456789876543210,
+                                                                                                        b0123456789876543210)]
+      where
+        CartProdSym1KindInference :: forall a0123456789876543210
+                                            a0123456789876543210
+                                            arg. SameKind (Apply (CartProdSym1 a0123456789876543210) arg) (CartProdSym2 a0123456789876543210 arg) =>
+                                     CartProdSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (CartProdSym1 a0123456789876543210) a0123456789876543210 = CartProd a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings CartProdSym0 where
+      suppressUnusedWarnings = snd (((,) CartProdSym0KindInference) ())
+    data CartProdSym0 :: forall a0123456789876543210
+                                b0123456789876543210.
+                         (~>) [a0123456789876543210] ((~>) [b0123456789876543210] [(a0123456789876543210,
+                                                                                    b0123456789876543210)])
+      where
+        CartProdSym0KindInference :: forall a0123456789876543210
+                                            arg. SameKind (Apply CartProdSym0 arg) (CartProdSym1 arg) =>
+                                     CartProdSym0 a0123456789876543210
+    type instance Apply CartProdSym0 a0123456789876543210 = CartProdSym1 a0123456789876543210
+    type Zip'Sym2 (a0123456789876543210 :: [a0123456789876543210]) (a0123456789876543210 :: [b0123456789876543210]) =
+        Zip' a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Zip'Sym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) Zip'Sym1KindInference) ())
+    data Zip'Sym1 (a0123456789876543210 :: [a0123456789876543210]) :: forall b0123456789876543210.
+                                                                      (~>) [b0123456789876543210] [(a0123456789876543210,
+                                                                                                    b0123456789876543210)]
+      where
+        Zip'Sym1KindInference :: forall a0123456789876543210
+                                        a0123456789876543210
+                                        arg. SameKind (Apply (Zip'Sym1 a0123456789876543210) arg) (Zip'Sym2 a0123456789876543210 arg) =>
+                                 Zip'Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Zip'Sym1 a0123456789876543210) a0123456789876543210 = Zip' a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Zip'Sym0 where
+      suppressUnusedWarnings = snd (((,) Zip'Sym0KindInference) ())
+    data Zip'Sym0 :: forall a0123456789876543210 b0123456789876543210.
+                     (~>) [a0123456789876543210] ((~>) [b0123456789876543210] [(a0123456789876543210,
+                                                                                b0123456789876543210)])
+      where
+        Zip'Sym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply Zip'Sym0 arg) (Zip'Sym1 arg) =>
+                                 Zip'Sym0 a0123456789876543210
+    type instance Apply Zip'Sym0 a0123456789876543210 = Zip'Sym1 a0123456789876543210
+    type BoogieSym2 (a0123456789876543210 :: Maybe a0123456789876543210) (a0123456789876543210 :: Maybe Bool) =
+        Boogie a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (BoogieSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) BoogieSym1KindInference) ())
+    data BoogieSym1 (a0123456789876543210 :: Maybe a0123456789876543210) :: (~>) (Maybe Bool) (Maybe a0123456789876543210)
+      where
+        BoogieSym1KindInference :: forall a0123456789876543210
+                                          a0123456789876543210
+                                          arg. SameKind (Apply (BoogieSym1 a0123456789876543210) arg) (BoogieSym2 a0123456789876543210 arg) =>
+                                   BoogieSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (BoogieSym1 a0123456789876543210) a0123456789876543210 = Boogie a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings BoogieSym0 where
+      suppressUnusedWarnings = snd (((,) BoogieSym0KindInference) ())
+    data BoogieSym0 :: forall a0123456789876543210.
+                       (~>) (Maybe a0123456789876543210) ((~>) (Maybe Bool) (Maybe a0123456789876543210))
+      where
+        BoogieSym0KindInference :: forall a0123456789876543210
+                                          arg. SameKind (Apply BoogieSym0 arg) (BoogieSym1 arg) =>
+                                   BoogieSym0 a0123456789876543210
+    type instance Apply BoogieSym0 a0123456789876543210 = BoogieSym1 a0123456789876543210
+    type family Trues (a :: [Bool]) :: [Bool] where
+      Trues xs = Apply (Apply (>>=@#@$) xs) (Apply Lambda_0123456789876543210Sym0 xs)
+    type family CartProd (a :: [a]) (a :: [b]) :: [(a, b)] where
+      CartProd xs ys = Apply (Apply (>>=@#@$) xs) (Apply (Apply Lambda_0123456789876543210Sym0 xs) ys)
+    type family Zip' (a :: [a]) (a :: [b]) :: [(a, b)] where
+      Zip' xs ys = Apply (Apply (>>=@#@$) (Apply (Apply MzipSym0 (Apply (Apply (>>=@#@$) xs) (Apply (Apply Lambda_0123456789876543210Sym0 xs) ys))) (Apply (Apply (>>=@#@$) ys) (Apply (Apply Lambda_0123456789876543210Sym0 xs) ys)))) (Apply (Apply Lambda_0123456789876543210Sym0 xs) ys)
+    type family Boogie (a :: Maybe a) (a :: Maybe Bool) :: Maybe a where
+      Boogie ma mb = Apply (Apply (>>=@#@$) ma) (Apply (Apply Lambda_0123456789876543210Sym0 ma) mb)
+    sTrues ::
+      forall (t :: [Bool]). Sing t -> Sing (Apply TruesSym0 t :: [Bool])
+    sCartProd ::
+      forall a b (t :: [a]) (t :: [b]).
+      Sing t
+      -> Sing t -> Sing (Apply (Apply CartProdSym0 t) t :: [(a, b)])
+    sZip' ::
+      forall a b (t :: [a]) (t :: [b]).
+      Sing t -> Sing t -> Sing (Apply (Apply Zip'Sym0 t) t :: [(a, b)])
+    sBoogie ::
+      forall a (t :: Maybe a) (t :: Maybe Bool).
+      Sing t -> Sing t -> Sing (Apply (Apply BoogieSym0 t) t :: Maybe a)
+    sTrues (sXs :: Sing xs)
+      = (applySing ((applySing ((singFun2 @(>>=@#@$)) (%>>=))) sXs))
+          ((singFun1 @(Apply Lambda_0123456789876543210Sym0 xs))
+             (\ sX
+                -> case sX of {
+                     (_ :: 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 @(Apply (Apply Lambda_0123456789876543210Sym0 xs) ys))
+             (\ sX
+                -> case sX of {
+                     (_ :: Sing x)
+                       -> (applySing ((applySing ((singFun2 @(>>=@#@$)) (%>>=))) sYs))
+                            ((singFun1
+                                @(Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) xs) ys))
+                               (\ sY
+                                  -> case sY of {
+                                       (_ :: Sing y)
+                                         -> (applySing ((singFun1 @ReturnSym0) sReturn))
+                                              ((applySing
+                                                  ((applySing ((singFun2 @Tuple2Sym0) STuple2)) sX))
+                                                 sY) })) }))
+    sZip' (sXs :: Sing xs) (sYs :: Sing ys)
+      = (applySing
+           ((applySing ((singFun2 @(>>=@#@$)) (%>>=)))
+              ((applySing
+                  ((applySing ((singFun2 @MzipSym0) sMzip))
+                     ((applySing ((applySing ((singFun2 @(>>=@#@$)) (%>>=))) sXs))
+                        ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 xs) ys))
+                           (\ sX
+                              -> case sX of {
+                                   (_ :: Sing x)
+                                     -> (applySing ((singFun1 @ReturnSym0) sReturn)) sX })))))
+                 ((applySing ((applySing ((singFun2 @(>>=@#@$)) (%>>=))) sYs))
+                    ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 xs) ys))
+                       (\ sY
+                          -> case sY of {
+                               (_ :: Sing y)
+                                 -> (applySing ((singFun1 @ReturnSym0) sReturn)) sY }))))))
+          ((singFun1 @(Apply (Apply 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) }) }))
+    sBoogie (sMa :: Sing ma) (sMb :: Sing mb)
+      = (applySing ((applySing ((singFun2 @(>>=@#@$)) (%>>=))) sMa))
+          ((singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 ma) mb))
+             (\ sA
+                -> case sA of {
+                     (_ :: Sing a)
+                       -> (applySing ((applySing ((singFun2 @(>>=@#@$)) (%>>=))) sMb))
+                            ((singFun1
+                                @(Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) ma) mb))
+                               (\ sB
+                                  -> case sB of {
+                                       (_ :: 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
+      sing = (singFun2 @CartProdSym0) sCartProd
+    instance SingI d =>
+             SingI (CartProdSym1 (d :: [a]) :: (~>) [b] [(a, b)]) where
+      sing = (singFun1 @(CartProdSym1 (d :: [a]))) (sCartProd (sing @d))
+    instance SingI (Zip'Sym0 :: (~>) [a] ((~>) [b] [(a, b)])) where
+      sing = (singFun2 @Zip'Sym0) sZip'
+    instance SingI d =>
+             SingI (Zip'Sym1 (d :: [a]) :: (~>) [b] [(a, b)]) where
+      sing = (singFun1 @(Zip'Sym1 (d :: [a]))) (sZip' (sing @d))
+    instance SingI (BoogieSym0 :: (~>) (Maybe a) ((~>) (Maybe Bool) (Maybe a))) where
+      sing = (singFun2 @BoogieSym0) sBoogie
+    instance SingI d =>
+             SingI (BoogieSym1 (d :: Maybe a) :: (~>) (Maybe Bool) (Maybe a)) where
+      sing = (singFun1 @(BoogieSym1 (d :: Maybe a))) (sBoogie (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T187.ghc86.template b/tests/compile-and-dump/Singletons/T187.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T187.ghc86.template
+++ /dev/null
@@ -1,57 +0,0 @@
-Singletons/T187.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| data Empty
-          
-          deriving instance Ord Empty
-          deriving instance Eq Empty |]
-  ======>
-    data Empty
-    deriving instance Eq Empty
-    deriving instance Ord Empty
-    type family Compare_0123456789876543210 (a :: Empty) (a :: Empty) :: Ordering where
-      Compare_0123456789876543210 _ _ = EQSym0
-    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Empty) (a0123456789876543210 :: Empty) =
-        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
-    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Empty) :: (~>) Empty Ordering
-      where
-        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
-    data Compare_0123456789876543210Sym0 :: (~>) Empty ((~>) Empty Ordering)
-      where
-        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
-                                                        Compare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
-    instance POrd Empty where
-      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
-    type family Equals_0123456789876543210 (a :: Empty) (b :: Empty) :: Bool where
-      Equals_0123456789876543210 (_ :: Empty) (_ :: Empty) = TrueSym0
-    instance PEq Empty where
-      type (==) a b = Equals_0123456789876543210 a b
-    data instance Sing :: Empty -> GHC.Types.Type
-    type SEmpty = (Sing :: Empty -> GHC.Types.Type)
-    instance SingKind Empty where
-      type Demote Empty = Empty
-      fromSing x = case x of
-      toSing x = SomeSing (case x of)
-    instance SOrd Empty where
-      sCompare ::
-        forall (t1 :: Empty) (t2 :: Empty).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (CompareSym0 :: TyFun Empty ((~>) Empty Ordering)
-                                                 -> GHC.Types.Type) t1) t2)
-      sCompare _ _ = SEQ
-    instance SEq Empty where
-      (%==) _ _ = STrue
-    instance SDecide Empty where
-      (%~) x _ = Proved (case x of)
diff --git a/tests/compile-and-dump/Singletons/T187.ghc88.template b/tests/compile-and-dump/Singletons/T187.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T187.ghc88.template
@@ -0,0 +1,65 @@
+Singletons/T187.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| data Empty
+          
+          deriving instance Ord Empty
+          deriving instance Eq Empty |]
+  ======>
+    data Empty
+    deriving instance Eq Empty
+    deriving instance Ord Empty
+    type family Compare_0123456789876543210 (a :: Empty) (a :: Empty) :: Ordering where
+      Compare_0123456789876543210 _ _ = EQSym0
+    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Empty) (a0123456789876543210 :: Empty) =
+        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
+    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Empty) :: (~>) Empty Ordering
+      where
+        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
+    data Compare_0123456789876543210Sym0 :: (~>) Empty ((~>) Empty Ordering)
+      where
+        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
+                                                        Compare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
+    instance POrd Empty where
+      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
+    type family Equals_0123456789876543210 (a :: Empty) (b :: Empty) :: Bool where
+      Equals_0123456789876543210 (_ :: Empty) (_ :: Empty) = TrueSym0
+    instance PEq Empty where
+      type (==) a b = Equals_0123456789876543210 a b
+    data SEmpty :: Empty -> GHC.Types.Type
+    type instance Sing @Empty = SEmpty
+    instance SingKind Empty where
+      type Demote Empty = Empty
+      fromSing x = case x of
+      toSing x = SomeSing (case x of)
+    instance SOrd Empty where
+      sCompare ::
+        forall (t1 :: Empty) (t2 :: Empty).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (CompareSym0 :: TyFun Empty ((~>) Empty Ordering)
+                                                 -> GHC.Types.Type) t1) t2)
+      sCompare _ _ = SEQ
+    instance SEq Empty where
+      (%==) _ _ = STrue
+    instance SDecide Empty where
+      (%~) x _ = Proved (case x of)
+    instance Data.Type.Equality.TestEquality (SEmpty :: Empty
+                                                        -> GHC.Types.Type) where
+      Data.Type.Equality.testEquality
+        = Data.Singletons.Decide.decideEquality
+    instance Data.Type.Coercion.TestCoercion (SEmpty :: Empty
+                                                        -> GHC.Types.Type) where
+      Data.Type.Coercion.testCoercion
+        = Data.Singletons.Decide.decideCoercion
diff --git a/tests/compile-and-dump/Singletons/T190.ghc86.template b/tests/compile-and-dump/Singletons/T190.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T190.ghc86.template
+++ /dev/null
@@ -1,188 +0,0 @@
-Singletons/T190.hs:0:0:: Splicing declarations
-    singletons
-      [d| data T
-            = T
-            deriving (Eq, Ord, Enum, Bounded, Show) |]
-  ======>
-    data T
-      = T
-      deriving (Eq, Ord, Enum, Bounded, Show)
-    type TSym0 = T
-    type family Compare_0123456789876543210 (a :: T) (a :: T) :: Ordering where
-      Compare_0123456789876543210 T T = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
-    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: T) (a0123456789876543210 :: T) =
-        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
-    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: T) :: (~>) T Ordering
-      where
-        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
-    data Compare_0123456789876543210Sym0 :: (~>) T ((~>) T Ordering)
-      where
-        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
-                                                        Compare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
-    instance POrd T where
-      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
-    type family Case_0123456789876543210 n t where
-      Case_0123456789876543210 n  'True = TSym0
-      Case_0123456789876543210 n  'False = Apply ErrorSym0 "toEnum: bad argument"
-    type family ToEnum_0123456789876543210 (a :: GHC.Types.Nat) :: T where
-      ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0))
-    type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) =
-        ToEnum_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ())
-    data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat T
-      where
-        ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                              arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) =>
-                                                       ToEnum_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210 a0123456789876543210
-    type family FromEnum_0123456789876543210 (a :: T) :: GHC.Types.Nat where
-      FromEnum_0123456789876543210 T = Data.Singletons.Prelude.Num.FromInteger 0
-    type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: T) =
-        FromEnum_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ())
-    data FromEnum_0123456789876543210Sym0 :: (~>) T GHC.Types.Nat
-      where
-        FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) =>
-                                                         FromEnum_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210 a0123456789876543210
-    instance PEnum T where
-      type ToEnum a = Apply ToEnum_0123456789876543210Sym0 a
-      type FromEnum a = Apply FromEnum_0123456789876543210Sym0 a
-    type family MinBound_0123456789876543210 :: T where
-      MinBound_0123456789876543210 = TSym0
-    type MinBound_0123456789876543210Sym0 =
-        MinBound_0123456789876543210
-    type family MaxBound_0123456789876543210 :: T where
-      MaxBound_0123456789876543210 = TSym0
-    type MaxBound_0123456789876543210Sym0 =
-        MaxBound_0123456789876543210
-    instance PBounded T where
-      type MinBound = MinBound_0123456789876543210Sym0
-      type MaxBound = MaxBound_0123456789876543210Sym0
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: T) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where
-      ShowsPrec_0123456789876543210 _ T a_0123456789876543210 = Apply (Apply ShowStringSym0 "T") a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: T) (a0123456789876543210 :: GHC.Types.Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: T) :: (~>) GHC.Types.Symbol GHC.Types.Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) T ((~>) GHC.Types.Symbol GHC.Types.Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) T ((~>) GHC.Types.Symbol GHC.Types.Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow T where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    type family Equals_0123456789876543210 (a :: T) (b :: T) :: Bool where
-      Equals_0123456789876543210 T T = TrueSym0
-      Equals_0123456789876543210 (_ :: T) (_ :: T) = FalseSym0
-    instance PEq T where
-      type (==) a b = Equals_0123456789876543210 a b
-    data instance Sing :: T -> GHC.Types.Type where ST :: Sing T
-    type ST = (Sing :: T -> GHC.Types.Type)
-    instance SingKind T where
-      type Demote T = T
-      fromSing ST = T
-      toSing T = SomeSing ST
-    instance SOrd T where
-      sCompare ::
-        forall (t1 :: T) (t2 :: T).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (CompareSym0 :: TyFun T ((~>) T Ordering)
-                                                 -> GHC.Types.Type) t1) t2)
-      sCompare ST ST
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            Data.Singletons.Prelude.Instances.SNil
-    instance SEnum T where
-      sToEnum ::
-        forall (t :: GHC.Types.Nat).
-        Sing t
-        -> Sing (Apply (Data.Singletons.Prelude.Enum.ToEnumSym0 :: TyFun GHC.Types.Nat T
-                                                                   -> GHC.Types.Type) t)
-      sFromEnum ::
-        forall (t :: T).
-        Sing t
-        -> Sing (Apply (Data.Singletons.Prelude.Enum.FromEnumSym0 :: TyFun T GHC.Types.Nat
-                                                                     -> GHC.Types.Type) t)
-      sToEnum (sN :: Sing n)
-        = (case
-               (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sN))
-                 (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 0))
-           of
-             STrue -> ST
-             SFalse -> sError (sing :: Sing "toEnum: bad argument")) ::
-            Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0)))
-      sFromEnum ST
-        = Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 0)
-    instance SBounded T where
-      sMinBound :: Sing (MinBoundSym0 :: T)
-      sMaxBound :: Sing (MaxBoundSym0 :: T)
-      sMinBound = ST
-      sMaxBound = ST
-    instance SShow T where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: T) (t3 :: GHC.Types.Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) T ((~>) GHC.Types.Symbol GHC.Types.Symbol))
-                                                             -> GHC.Types.Type) t1) t2) t3)
-      sShowsPrec
-        _
-        ST
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "T")))
-            sA_0123456789876543210
-    instance SEq T where
-      (%==) ST ST = STrue
-    instance SDecide T where
-      (%~) ST ST = Proved Refl
-    deriving instance Show (Sing (z :: T))
-    instance SingI T where
-      sing = ST
diff --git a/tests/compile-and-dump/Singletons/T190.ghc88.template b/tests/compile-and-dump/Singletons/T190.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T190.ghc88.template
@@ -0,0 +1,198 @@
+Singletons/T190.hs:0:0:: Splicing declarations
+    singletons
+      [d| data T
+            = T
+            deriving (Eq, Ord, Enum, Bounded, Show) |]
+  ======>
+    data T
+      = T
+      deriving (Eq, Ord, Enum, Bounded, Show)
+    type TSym0 = T
+    type family Compare_0123456789876543210 (a :: T) (a :: T) :: Ordering where
+      Compare_0123456789876543210 T T = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) '[]
+    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: T) (a0123456789876543210 :: T) =
+        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
+    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: T) :: (~>) T Ordering
+      where
+        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
+    data Compare_0123456789876543210Sym0 :: (~>) T ((~>) T Ordering)
+      where
+        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
+                                                        Compare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
+    instance POrd T where
+      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
+    type family Case_0123456789876543210 n t where
+      Case_0123456789876543210 n 'True = TSym0
+      Case_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument"
+    type family ToEnum_0123456789876543210 (a :: GHC.Types.Nat) :: T where
+      ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0))
+    type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) =
+        ToEnum_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ())
+    data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat T
+      where
+        ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                              arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) =>
+                                                       ToEnum_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210 a0123456789876543210
+    type family FromEnum_0123456789876543210 (a :: T) :: GHC.Types.Nat where
+      FromEnum_0123456789876543210 T = Data.Singletons.Prelude.Num.FromInteger 0
+    type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: T) =
+        FromEnum_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ())
+    data FromEnum_0123456789876543210Sym0 :: (~>) T GHC.Types.Nat
+      where
+        FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) =>
+                                                         FromEnum_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210 a0123456789876543210
+    instance PEnum T where
+      type ToEnum a = Apply ToEnum_0123456789876543210Sym0 a
+      type FromEnum a = Apply FromEnum_0123456789876543210Sym0 a
+    type family MinBound_0123456789876543210 :: T where
+      MinBound_0123456789876543210 = TSym0
+    type MinBound_0123456789876543210Sym0 =
+        MinBound_0123456789876543210
+    type family MaxBound_0123456789876543210 :: T where
+      MaxBound_0123456789876543210 = TSym0
+    type MaxBound_0123456789876543210Sym0 =
+        MaxBound_0123456789876543210
+    instance PBounded T where
+      type MinBound = MinBound_0123456789876543210Sym0
+      type MaxBound = MaxBound_0123456789876543210Sym0
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: T) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where
+      ShowsPrec_0123456789876543210 _ T a_0123456789876543210 = Apply (Apply ShowStringSym0 "T") a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: T) (a0123456789876543210 :: GHC.Types.Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: T) :: (~>) GHC.Types.Symbol GHC.Types.Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) T ((~>) GHC.Types.Symbol GHC.Types.Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) T ((~>) GHC.Types.Symbol GHC.Types.Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow T where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    type family Equals_0123456789876543210 (a :: T) (b :: T) :: Bool where
+      Equals_0123456789876543210 T T = TrueSym0
+      Equals_0123456789876543210 (_ :: T) (_ :: T) = FalseSym0
+    instance PEq T where
+      type (==) a b = Equals_0123456789876543210 a b
+    data ST :: T -> GHC.Types.Type where ST :: ST T
+    type instance Sing @T = ST
+    instance SingKind T where
+      type Demote T = T
+      fromSing ST = T
+      toSing T = SomeSing ST
+    instance SOrd T where
+      sCompare ::
+        forall (t1 :: T) (t2 :: T).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (CompareSym0 :: TyFun T ((~>) T Ordering)
+                                                 -> GHC.Types.Type) t1) t2)
+      sCompare ST ST
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            Data.Singletons.Prelude.Instances.SNil
+    instance SEnum T where
+      sToEnum ::
+        forall (t :: GHC.Types.Nat).
+        Sing t
+        -> Sing (Apply (Data.Singletons.Prelude.Enum.ToEnumSym0 :: TyFun GHC.Types.Nat T
+                                                                   -> GHC.Types.Type) t)
+      sFromEnum ::
+        forall (t :: T).
+        Sing t
+        -> Sing (Apply (Data.Singletons.Prelude.Enum.FromEnumSym0 :: TyFun T GHC.Types.Nat
+                                                                     -> GHC.Types.Type) t)
+      sToEnum (sN :: Sing n)
+        = (id
+             @(Sing (Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0)))))
+            (case
+                 (applySing ((applySing ((singFun2 @(==@#@$)) (%==))) sN))
+                   (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 0))
+             of
+               STrue -> ST
+               SFalse -> sError (sing :: Sing "toEnum: bad argument"))
+      sFromEnum ST
+        = Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 0)
+    instance SBounded T where
+      sMinBound :: Sing (MinBoundSym0 :: T)
+      sMaxBound :: Sing (MaxBoundSym0 :: T)
+      sMinBound = ST
+      sMaxBound = ST
+    instance SShow T where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: T) (t3 :: GHC.Types.Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) T ((~>) GHC.Types.Symbol GHC.Types.Symbol))
+                                                             -> GHC.Types.Type) t1) t2) t3)
+      sShowsPrec
+        _
+        ST
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "T")))
+            sA_0123456789876543210
+    instance SEq T where
+      (%==) ST ST = STrue
+    instance SDecide T where
+      (%~) ST ST = Proved Refl
+    instance Data.Type.Equality.TestEquality (ST :: T
+                                                    -> GHC.Types.Type) where
+      Data.Type.Equality.testEquality
+        = Data.Singletons.Decide.decideEquality
+    instance Data.Type.Coercion.TestCoercion (ST :: T
+                                                    -> GHC.Types.Type) where
+      Data.Type.Coercion.testCoercion
+        = Data.Singletons.Decide.decideCoercion
+    instance Show (ST (z :: T)) where
+      showsPrec _ ST = showString "ST"
+    instance SingI T where
+      sing = ST
diff --git a/tests/compile-and-dump/Singletons/T197.ghc86.template b/tests/compile-and-dump/Singletons/T197.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T197.ghc86.template
+++ /dev/null
@@ -1,43 +0,0 @@
-Singletons/T197.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| infixl 5 $$:
-          
-          ($$:) :: Bool -> Bool -> Bool
-          _ $$: _ = False |]
-  ======>
-    infixl 5 $$:
-    ($$:) :: Bool -> Bool -> Bool
-    ($$:) _ _ = False
-    type ($$:@#@$$$) (a0123456789876543210 :: Bool) (a0123456789876543210 :: Bool) =
-        ($$:) a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (($$:@#@$$) a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (:$$:@#@$$###)) ())
-    data ($$:@#@$$) (a0123456789876543210 :: Bool) :: (~>) Bool Bool
-      where
-        (:$$:@#@$$###) :: forall a0123456789876543210
-                                 a0123456789876543210
-                                 arg. SameKind (Apply (($$:@#@$$) a0123456789876543210) arg) (($$:@#@$$$) a0123456789876543210 arg) =>
-                          ($$:@#@$$) a0123456789876543210 a0123456789876543210
-    type instance Apply (($$:@#@$$) a0123456789876543210) a0123456789876543210 = ($$:) a0123456789876543210 a0123456789876543210
-    infixl 5 $$:@#@$$
-    instance SuppressUnusedWarnings ($$:@#@$) where
-      suppressUnusedWarnings = snd (((,) (:$$:@#@$###)) ())
-    data ($$:@#@$) :: (~>) Bool ((~>) Bool Bool)
-      where
-        (:$$:@#@$###) :: forall a0123456789876543210
-                                arg. SameKind (Apply ($$:@#@$) arg) (($$:@#@$$) arg) =>
-                         ($$:@#@$) a0123456789876543210
-    type instance Apply ($$:@#@$) a0123456789876543210 = ($$:@#@$$) a0123456789876543210
-    infixl 5 $$:@#@$
-    type family ($$:) (a :: Bool) (a :: Bool) :: Bool where
-      ($$:) _ _ = FalseSym0
-    infixl 5 %$$:
-    (%$$:) ::
-      forall (t :: Bool) (t :: Bool).
-      Sing t -> Sing t -> Sing (Apply (Apply ($$:@#@$) t) t :: Bool)
-    (%$$:) _ _ = SFalse
-    instance SingI (($$:@#@$) :: (~>) Bool ((~>) Bool Bool)) where
-      sing = (singFun2 @($$:@#@$)) (%$$:)
-    instance SingI d =>
-             SingI (($$:@#@$$) (d :: Bool) :: (~>) Bool Bool) where
-      sing = (singFun1 @(($$:@#@$$) (d :: Bool))) ((%$$:) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T197.ghc88.template b/tests/compile-and-dump/Singletons/T197.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T197.ghc88.template
@@ -0,0 +1,43 @@
+Singletons/T197.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| infixl 5 $$:
+          
+          ($$:) :: Bool -> Bool -> Bool
+          _ $$: _ = False |]
+  ======>
+    infixl 5 $$:
+    ($$:) :: Bool -> Bool -> Bool
+    ($$:) _ _ = False
+    type ($$:@#@$$$) (a0123456789876543210 :: Bool) (a0123456789876543210 :: Bool) =
+        ($$:) a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (($$:@#@$$) a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (:$$:@#@$$###)) ())
+    data ($$:@#@$$) (a0123456789876543210 :: Bool) :: (~>) Bool Bool
+      where
+        (:$$:@#@$$###) :: forall a0123456789876543210
+                                 a0123456789876543210
+                                 arg. SameKind (Apply (($$:@#@$$) a0123456789876543210) arg) (($$:@#@$$$) a0123456789876543210 arg) =>
+                          ($$:@#@$$) a0123456789876543210 a0123456789876543210
+    type instance Apply (($$:@#@$$) a0123456789876543210) a0123456789876543210 = ($$:) a0123456789876543210 a0123456789876543210
+    infixl 5 $$:@#@$$
+    instance SuppressUnusedWarnings ($$:@#@$) where
+      suppressUnusedWarnings = snd (((,) (:$$:@#@$###)) ())
+    data ($$:@#@$) :: (~>) Bool ((~>) Bool Bool)
+      where
+        (:$$:@#@$###) :: forall a0123456789876543210
+                                arg. SameKind (Apply ($$:@#@$) arg) (($$:@#@$$) arg) =>
+                         ($$:@#@$) a0123456789876543210
+    type instance Apply ($$:@#@$) a0123456789876543210 = ($$:@#@$$) a0123456789876543210
+    infixl 5 $$:@#@$
+    type family ($$:) (a :: Bool) (a :: Bool) :: Bool where
+      ($$:) _ _ = FalseSym0
+    infixl 5 %$$:
+    (%$$:) ::
+      forall (t :: Bool) (t :: Bool).
+      Sing t -> Sing t -> Sing (Apply (Apply ($$:@#@$) t) t :: Bool)
+    (%$$:) _ _ = SFalse
+    instance SingI (($$:@#@$) :: (~>) Bool ((~>) Bool Bool)) where
+      sing = (singFun2 @($$:@#@$)) (%$$:)
+    instance SingI d =>
+             SingI (($$:@#@$$) (d :: Bool) :: (~>) Bool Bool) where
+      sing = (singFun1 @(($$:@#@$$) (d :: Bool))) ((%$$:) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T197b.ghc86.template b/tests/compile-and-dump/Singletons/T197b.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T197b.ghc86.template
+++ /dev/null
@@ -1,106 +0,0 @@
-Singletons/T197b.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| infixr 9 `Pair`, `MkPair`
-          
-          data a :*: b = a :*: b
-          data Pair a b = MkPair a b |]
-  ======>
-    data (:*:) a b = a :*: b
-    data Pair a b = MkPair a b
-    infixr 9 `Pair`
-    infixr 9 `MkPair`
-    type (:*:@#@$$$) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) =
-        (:*:) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings ((:*:@#@$$) t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (::*:@#@$$###)) ())
-    data (:*:@#@$$) (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                      (~>) b0123456789876543210 ((:*:) a0123456789876543210 b0123456789876543210)
-      where
-        (::*:@#@$$###) :: forall t0123456789876543210
-                                 t0123456789876543210
-                                 arg. SameKind (Apply ((:*:@#@$$) t0123456789876543210) arg) ((:*:@#@$$$) t0123456789876543210 arg) =>
-                          (:*:@#@$$) t0123456789876543210 t0123456789876543210
-    type instance Apply ((:*:@#@$$) t0123456789876543210) t0123456789876543210 = (:*:) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (:*:@#@$) where
-      suppressUnusedWarnings = snd (((,) (::*:@#@$###)) ())
-    data (:*:@#@$) :: forall a0123456789876543210 b0123456789876543210.
-                      (~>) a0123456789876543210 ((~>) b0123456789876543210 ((:*:) a0123456789876543210 b0123456789876543210))
-      where
-        (::*:@#@$###) :: forall t0123456789876543210
-                                arg. SameKind (Apply (:*:@#@$) arg) ((:*:@#@$$) arg) =>
-                         (:*:@#@$) t0123456789876543210
-    type instance Apply (:*:@#@$) t0123456789876543210 = (:*:@#@$$) t0123456789876543210
-    type MkPairSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) =
-        MkPair t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (MkPairSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MkPairSym1KindInference) ())
-    data MkPairSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                      (~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210)
-      where
-        MkPairSym1KindInference :: forall t0123456789876543210
-                                          t0123456789876543210
-                                          arg. SameKind (Apply (MkPairSym1 t0123456789876543210) arg) (MkPairSym2 t0123456789876543210 arg) =>
-                                   MkPairSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (MkPairSym1 t0123456789876543210) t0123456789876543210 = MkPair t0123456789876543210 t0123456789876543210
-    infixr 9 `MkPairSym1`
-    instance SuppressUnusedWarnings MkPairSym0 where
-      suppressUnusedWarnings = snd (((,) MkPairSym0KindInference) ())
-    data MkPairSym0 :: forall a0123456789876543210
-                              b0123456789876543210.
-                       (~>) a0123456789876543210 ((~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210))
-      where
-        MkPairSym0KindInference :: forall t0123456789876543210
-                                          arg. SameKind (Apply MkPairSym0 arg) (MkPairSym1 arg) =>
-                                   MkPairSym0 t0123456789876543210
-    type instance Apply MkPairSym0 t0123456789876543210 = MkPairSym1 t0123456789876543210
-    infixr 9 `MkPairSym0`
-    infixr 9 `SPair`
-    infixr 9 `SMkPair`
-    data instance Sing :: (:*:) a b -> GHC.Types.Type
-      where
-        (:%*:) :: forall a b (n :: a) (n :: b).
-                  (Sing (n :: a)) -> (Sing (n :: b)) -> Sing ((:*:) n n)
-    type (%:*:) = (Sing :: (:*:) a b -> GHC.Types.Type)
-    instance (SingKind a, SingKind b) => SingKind ((:*:) a b) where
-      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) }
-    data instance Sing :: Pair a b -> GHC.Types.Type
-      where
-        SMkPair :: forall a b (n :: a) (n :: b).
-                   (Sing (n :: a)) -> (Sing (n :: b)) -> Sing (MkPair n n)
-    type SPair = (Sing :: Pair a b -> GHC.Types.Type)
-    instance (SingKind a, SingKind b) => SingKind (Pair a b) where
-      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) }
-    instance (SingI n, SingI n) =>
-             SingI ((:*:) (n :: a) (n :: b)) where
-      sing = ((:%*:) sing) sing
-    instance SingI ((:*:@#@$) :: (~>) a ((~>) b ((:*:) a b))) where
-      sing = (singFun2 @(:*:@#@$)) (:%*:)
-    instance SingI (TyCon2 (:*:) :: (~>) a ((~>) b ((:*:) a b))) where
-      sing = (singFun2 @(TyCon2 (:*:))) (:%*:)
-    instance SingI d =>
-             SingI ((:*:@#@$$) (d :: a) :: (~>) b ((:*:) a b)) where
-      sing = (singFun1 @((:*:@#@$$) (d :: a))) ((:%*:) (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 ((:*:) (d :: a)) :: (~>) b ((:*:) a b)) where
-      sing = (singFun1 @(TyCon1 ((:*:) (d :: a)))) ((:%*:) (sing @d))
-    instance (SingI n, SingI n) =>
-             SingI (MkPair (n :: a) (n :: b)) where
-      sing = (SMkPair sing) sing
-    instance SingI (MkPairSym0 :: (~>) a ((~>) b (Pair a b))) where
-      sing = (singFun2 @MkPairSym0) SMkPair
-    instance SingI (TyCon2 MkPair :: (~>) a ((~>) b (Pair a b))) where
-      sing = (singFun2 @(TyCon2 MkPair)) SMkPair
-    instance SingI d =>
-             SingI (MkPairSym1 (d :: a) :: (~>) b (Pair a b)) where
-      sing = (singFun1 @(MkPairSym1 (d :: a))) (SMkPair (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 (MkPair (d :: a)) :: (~>) b (Pair a b)) where
-      sing = (singFun1 @(TyCon1 (MkPair (d :: a)))) (SMkPair (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T197b.ghc88.template b/tests/compile-and-dump/Singletons/T197b.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T197b.ghc88.template
@@ -0,0 +1,96 @@
+Singletons/T197b.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| infixr 9 `Pair`, `MkPair`
+          
+          data a :*: b = a :*: b
+          data Pair a b = MkPair a b |]
+  ======>
+    data (:*:) a b = a :*: b
+    data Pair a b = MkPair a b
+    infixr 9 `Pair`
+    infixr 9 `MkPair`
+    type (:*:@#@$$$) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) =
+        (:*:) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings ((:*:@#@$$) t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (::*:@#@$$###)) ())
+    data (:*:@#@$$) (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                      (~>) b0123456789876543210 ((:*:) a0123456789876543210 b0123456789876543210)
+      where
+        (::*:@#@$$###) :: forall t0123456789876543210
+                                 t0123456789876543210
+                                 arg. SameKind (Apply ((:*:@#@$$) t0123456789876543210) arg) ((:*:@#@$$$) t0123456789876543210 arg) =>
+                          (:*:@#@$$) t0123456789876543210 t0123456789876543210
+    type instance Apply ((:*:@#@$$) t0123456789876543210) t0123456789876543210 = (:*:) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (:*:@#@$) where
+      suppressUnusedWarnings = snd (((,) (::*:@#@$###)) ())
+    data (:*:@#@$) :: forall a0123456789876543210 b0123456789876543210.
+                      (~>) a0123456789876543210 ((~>) b0123456789876543210 ((:*:) a0123456789876543210 b0123456789876543210))
+      where
+        (::*:@#@$###) :: forall t0123456789876543210
+                                arg. SameKind (Apply (:*:@#@$) arg) ((:*:@#@$$) arg) =>
+                         (:*:@#@$) t0123456789876543210
+    type instance Apply (:*:@#@$) t0123456789876543210 = (:*:@#@$$) t0123456789876543210
+    type MkPairSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) =
+        MkPair t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (MkPairSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MkPairSym1KindInference) ())
+    data MkPairSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                      (~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210)
+      where
+        MkPairSym1KindInference :: forall t0123456789876543210
+                                          t0123456789876543210
+                                          arg. SameKind (Apply (MkPairSym1 t0123456789876543210) arg) (MkPairSym2 t0123456789876543210 arg) =>
+                                   MkPairSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (MkPairSym1 t0123456789876543210) t0123456789876543210 = MkPair t0123456789876543210 t0123456789876543210
+    infixr 9 `MkPairSym1`
+    instance SuppressUnusedWarnings MkPairSym0 where
+      suppressUnusedWarnings = snd (((,) MkPairSym0KindInference) ())
+    data MkPairSym0 :: forall a0123456789876543210
+                              b0123456789876543210.
+                       (~>) a0123456789876543210 ((~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210))
+      where
+        MkPairSym0KindInference :: forall t0123456789876543210
+                                          arg. SameKind (Apply MkPairSym0 arg) (MkPairSym1 arg) =>
+                                   MkPairSym0 t0123456789876543210
+    type instance Apply MkPairSym0 t0123456789876543210 = MkPairSym1 t0123456789876543210
+    infixr 9 `MkPairSym0`
+    infixr 9 `SMkPair`
+    infixr 9 `SPair`
+    data (%:*:) :: forall a b. (:*:) a b -> GHC.Types.Type
+      where
+        (:%*:) :: forall a b (n :: a) (n :: b).
+                  (Sing (n :: a)) -> (Sing (n :: b)) -> (%:*:) ((:*:) n n)
+    type instance Sing @((:*:) a b) = (%:*:)
+    instance (SingKind a, SingKind b) => SingKind ((:*:) a b) where
+      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) }
+    data SPair :: forall a b. Pair a b -> GHC.Types.Type
+      where
+        SMkPair :: forall a b (n :: a) (n :: b).
+                   (Sing (n :: a)) -> (Sing (n :: b)) -> SPair (MkPair n n)
+    type instance Sing @(Pair a b) = SPair
+    instance (SingKind a, SingKind b) => SingKind (Pair a b) where
+      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) }
+    instance (SingI n, SingI n) =>
+             SingI ((:*:) (n :: a) (n :: b)) where
+      sing = ((:%*:) sing) sing
+    instance SingI ((:*:@#@$) :: (~>) a ((~>) b ((:*:) a b))) where
+      sing = (singFun2 @(:*:@#@$)) (:%*:)
+    instance SingI d =>
+             SingI ((:*:@#@$$) (d :: a) :: (~>) b ((:*:) a b)) where
+      sing = (singFun1 @((:*:@#@$$) (d :: a))) ((:%*:) (sing @d))
+    instance (SingI n, SingI n) =>
+             SingI (MkPair (n :: a) (n :: b)) where
+      sing = (SMkPair sing) sing
+    instance SingI (MkPairSym0 :: (~>) a ((~>) b (Pair a b))) where
+      sing = (singFun2 @MkPairSym0) SMkPair
+    instance SingI d =>
+             SingI (MkPairSym1 (d :: a) :: (~>) b (Pair a b)) where
+      sing = (singFun1 @(MkPairSym1 (d :: a))) (SMkPair (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T200.ghc86.template b/tests/compile-and-dump/Singletons/T200.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T200.ghc86.template
+++ /dev/null
@@ -1,204 +0,0 @@
-Singletons/T200.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| ($$:) :: ErrorMessage -> ErrorMessage -> ErrorMessage
-          x $$: y = x :$$: y
-          (<>:) :: ErrorMessage -> ErrorMessage -> ErrorMessage
-          x <>: y = x :<>: y
-          
-          data ErrorMessage
-            = ErrorMessage :$$: ErrorMessage |
-              ErrorMessage :<>: ErrorMessage |
-              EM [Bool] |]
-  ======>
-    data ErrorMessage
-      = ErrorMessage :$$: ErrorMessage |
-        ErrorMessage :<>: ErrorMessage |
-        EM [Bool]
-    ($$:) :: ErrorMessage -> ErrorMessage -> ErrorMessage
-    ($$:) x y = (x :$$: y)
-    (<>:) :: ErrorMessage -> ErrorMessage -> ErrorMessage
-    (<>:) x y = (x :<>: y)
-    type (:$$:@#@$$$) (t0123456789876543210 :: ErrorMessage) (t0123456789876543210 :: ErrorMessage) =
-        (:$$:) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings ((:$$:@#@$$) t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (::$$:@#@$$###)) ())
-    data (:$$:@#@$$) (t0123456789876543210 :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage
-      where
-        (::$$:@#@$$###) :: forall t0123456789876543210
-                                  t0123456789876543210
-                                  arg. SameKind (Apply ((:$$:@#@$$) t0123456789876543210) arg) ((:$$:@#@$$$) t0123456789876543210 arg) =>
-                           (:$$:@#@$$) t0123456789876543210 t0123456789876543210
-    type instance Apply ((:$$:@#@$$) t0123456789876543210) t0123456789876543210 = (:$$:) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (:$$:@#@$) where
-      suppressUnusedWarnings = snd (((,) (::$$:@#@$###)) ())
-    data (:$$:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)
-      where
-        (::$$:@#@$###) :: forall t0123456789876543210
-                                 arg. SameKind (Apply (:$$:@#@$) arg) ((:$$:@#@$$) arg) =>
-                          (:$$:@#@$) t0123456789876543210
-    type instance Apply (:$$:@#@$) t0123456789876543210 = (:$$:@#@$$) t0123456789876543210
-    type (:<>:@#@$$$) (t0123456789876543210 :: ErrorMessage) (t0123456789876543210 :: ErrorMessage) =
-        (:<>:) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings ((:<>:@#@$$) t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (::<>:@#@$$###)) ())
-    data (:<>:@#@$$) (t0123456789876543210 :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage
-      where
-        (::<>:@#@$$###) :: forall t0123456789876543210
-                                  t0123456789876543210
-                                  arg. SameKind (Apply ((:<>:@#@$$) t0123456789876543210) arg) ((:<>:@#@$$$) t0123456789876543210 arg) =>
-                           (:<>:@#@$$) t0123456789876543210 t0123456789876543210
-    type instance Apply ((:<>:@#@$$) t0123456789876543210) t0123456789876543210 = (:<>:) t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (:<>:@#@$) where
-      suppressUnusedWarnings = snd (((,) (::<>:@#@$###)) ())
-    data (:<>:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)
-      where
-        (::<>:@#@$###) :: forall t0123456789876543210
-                                 arg. SameKind (Apply (:<>:@#@$) arg) ((:<>:@#@$$) arg) =>
-                          (:<>:@#@$) t0123456789876543210
-    type instance Apply (:<>:@#@$) t0123456789876543210 = (:<>:@#@$$) t0123456789876543210
-    type EMSym1 (t0123456789876543210 :: [Bool]) =
-        EM t0123456789876543210
-    instance SuppressUnusedWarnings EMSym0 where
-      suppressUnusedWarnings = snd (((,) EMSym0KindInference) ())
-    data EMSym0 :: (~>) [Bool] ErrorMessage
-      where
-        EMSym0KindInference :: forall t0123456789876543210
-                                      arg. SameKind (Apply EMSym0 arg) (EMSym1 arg) =>
-                               EMSym0 t0123456789876543210
-    type instance Apply EMSym0 t0123456789876543210 = EM t0123456789876543210
-    type (<>:@#@$$$) (a0123456789876543210 :: ErrorMessage) (a0123456789876543210 :: ErrorMessage) =
-        (<>:) a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ((<>:@#@$$) a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (:<>:@#@$$###)) ())
-    data (<>:@#@$$) (a0123456789876543210 :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage
-      where
-        (:<>:@#@$$###) :: forall a0123456789876543210
-                                 a0123456789876543210
-                                 arg. SameKind (Apply ((<>:@#@$$) a0123456789876543210) arg) ((<>:@#@$$$) a0123456789876543210 arg) =>
-                          (<>:@#@$$) a0123456789876543210 a0123456789876543210
-    type instance Apply ((<>:@#@$$) a0123456789876543210) a0123456789876543210 = (<>:) a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (<>:@#@$) where
-      suppressUnusedWarnings = snd (((,) (:<>:@#@$###)) ())
-    data (<>:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)
-      where
-        (:<>:@#@$###) :: forall a0123456789876543210
-                                arg. SameKind (Apply (<>:@#@$) arg) ((<>:@#@$$) arg) =>
-                         (<>:@#@$) a0123456789876543210
-    type instance Apply (<>:@#@$) a0123456789876543210 = (<>:@#@$$) a0123456789876543210
-    type ($$:@#@$$$) (a0123456789876543210 :: ErrorMessage) (a0123456789876543210 :: ErrorMessage) =
-        ($$:) a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (($$:@#@$$) a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (:$$:@#@$$###)) ())
-    data ($$:@#@$$) (a0123456789876543210 :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage
-      where
-        (:$$:@#@$$###) :: forall a0123456789876543210
-                                 a0123456789876543210
-                                 arg. SameKind (Apply (($$:@#@$$) a0123456789876543210) arg) (($$:@#@$$$) a0123456789876543210 arg) =>
-                          ($$:@#@$$) a0123456789876543210 a0123456789876543210
-    type instance Apply (($$:@#@$$) a0123456789876543210) a0123456789876543210 = ($$:) a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ($$:@#@$) where
-      suppressUnusedWarnings = snd (((,) (:$$:@#@$###)) ())
-    data ($$:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)
-      where
-        (:$$:@#@$###) :: forall a0123456789876543210
-                                arg. SameKind (Apply ($$:@#@$) arg) (($$:@#@$$) arg) =>
-                         ($$:@#@$) a0123456789876543210
-    type instance Apply ($$:@#@$) a0123456789876543210 = ($$:@#@$$) a0123456789876543210
-    type family (<>:) (a :: ErrorMessage) (a :: ErrorMessage) :: ErrorMessage where
-      (<>:) x y = Apply (Apply (:<>:@#@$) x) y
-    type family ($$:) (a :: ErrorMessage) (a :: ErrorMessage) :: ErrorMessage where
-      ($$:) x y = Apply (Apply (:$$:@#@$) x) y
-    (%<>:) ::
-      forall (t :: ErrorMessage) (t :: ErrorMessage).
-      Sing t
-      -> Sing t -> Sing (Apply (Apply (<>:@#@$) t) t :: ErrorMessage)
-    (%$$:) ::
-      forall (t :: ErrorMessage) (t :: ErrorMessage).
-      Sing t
-      -> Sing t -> Sing (Apply (Apply ($$:@#@$) t) t :: ErrorMessage)
-    (%<>:) (sX :: Sing x) (sY :: Sing y)
-      = (applySing ((applySing ((singFun2 @(:<>:@#@$)) (:%<>:))) sX)) sY
-    (%$$:) (sX :: Sing x) (sY :: Sing y)
-      = (applySing ((applySing ((singFun2 @(:$$:@#@$)) (:%$$:))) sX)) sY
-    instance SingI ((<>:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)) where
-      sing = (singFun2 @(<>:@#@$)) (%<>:)
-    instance SingI d =>
-             SingI ((<>:@#@$$) (d :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage) where
-      sing
-        = (singFun1 @((<>:@#@$$) (d :: ErrorMessage))) ((%<>:) (sing @d))
-    instance SingI (($$:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)) where
-      sing = (singFun2 @($$:@#@$)) (%$$:)
-    instance SingI d =>
-             SingI (($$:@#@$$) (d :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage) where
-      sing
-        = (singFun1 @(($$:@#@$$) (d :: ErrorMessage))) ((%$$:) (sing @d))
-    data instance Sing :: ErrorMessage -> GHC.Types.Type
-      where
-        (:%$$:) :: forall (n :: ErrorMessage) (n :: ErrorMessage).
-                   (Sing (n :: ErrorMessage))
-                   -> (Sing (n :: ErrorMessage)) -> Sing ((:$$:) n n)
-        (:%<>:) :: forall (n :: ErrorMessage) (n :: ErrorMessage).
-                   (Sing (n :: ErrorMessage))
-                   -> (Sing (n :: ErrorMessage)) -> Sing ((:<>:) n n)
-        SEM :: forall (n :: [Bool]). (Sing (n :: [Bool])) -> Sing (EM n)
-    type SErrorMessage = (Sing :: ErrorMessage -> GHC.Types.Type)
-    instance SingKind ErrorMessage where
-      type Demote ErrorMessage = ErrorMessage
-      fromSing ((:%$$:) b b) = ((:$$:) (fromSing b)) (fromSing b)
-      fromSing ((:%<>:) b b) = ((:<>:) (fromSing b)) (fromSing b)
-      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) }
-      toSing
-        ((:<>:) (b :: Demote ErrorMessage) (b :: Demote ErrorMessage))
-        = case
-              ((,) (toSing b :: SomeSing ErrorMessage))
-                (toSing b :: SomeSing ErrorMessage)
-          of {
-            (,) (SomeSing c) (SomeSing c) -> SomeSing (((:%<>:) c) c) }
-      toSing (EM (b :: Demote [Bool]))
-        = case toSing b :: SomeSing [Bool] of {
-            SomeSing c -> SomeSing (SEM c) }
-    instance (SingI n, SingI n) =>
-             SingI ((:$$:) (n :: ErrorMessage) (n :: ErrorMessage)) where
-      sing = ((:%$$:) sing) sing
-    instance SingI ((:$$:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)) where
-      sing = (singFun2 @(:$$:@#@$)) (:%$$:)
-    instance SingI (TyCon2 (:$$:) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)) where
-      sing = (singFun2 @(TyCon2 (:$$:))) (:%$$:)
-    instance SingI d =>
-             SingI ((:$$:@#@$$) (d :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage) where
-      sing
-        = (singFun1 @((:$$:@#@$$) (d :: ErrorMessage))) ((:%$$:) (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 ((:$$:) (d :: ErrorMessage)) :: (~>) ErrorMessage ErrorMessage) where
-      sing
-        = (singFun1 @(TyCon1 ((:$$:) (d :: ErrorMessage))))
-            ((:%$$:) (sing @d))
-    instance (SingI n, SingI n) =>
-             SingI ((:<>:) (n :: ErrorMessage) (n :: ErrorMessage)) where
-      sing = ((:%<>:) sing) sing
-    instance SingI ((:<>:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)) where
-      sing = (singFun2 @(:<>:@#@$)) (:%<>:)
-    instance SingI (TyCon2 (:<>:) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)) where
-      sing = (singFun2 @(TyCon2 (:<>:))) (:%<>:)
-    instance SingI d =>
-             SingI ((:<>:@#@$$) (d :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage) where
-      sing
-        = (singFun1 @((:<>:@#@$$) (d :: ErrorMessage))) ((:%<>:) (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 ((:<>:) (d :: ErrorMessage)) :: (~>) ErrorMessage ErrorMessage) where
-      sing
-        = (singFun1 @(TyCon1 ((:<>:) (d :: ErrorMessage))))
-            ((:%<>:) (sing @d))
-    instance SingI n => SingI (EM (n :: [Bool])) where
-      sing = SEM sing
-    instance SingI (EMSym0 :: (~>) [Bool] ErrorMessage) where
-      sing = (singFun1 @EMSym0) SEM
-    instance SingI (TyCon1 EM :: (~>) [Bool] ErrorMessage) where
-      sing = (singFun1 @(TyCon1 EM)) SEM
diff --git a/tests/compile-and-dump/Singletons/T200.ghc88.template b/tests/compile-and-dump/Singletons/T200.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T200.ghc88.template
@@ -0,0 +1,189 @@
+Singletons/T200.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| ($$:) :: ErrorMessage -> ErrorMessage -> ErrorMessage
+          x $$: y = x :$$: y
+          (<>:) :: ErrorMessage -> ErrorMessage -> ErrorMessage
+          x <>: y = x :<>: y
+          
+          data ErrorMessage
+            = ErrorMessage :$$: ErrorMessage |
+              ErrorMessage :<>: ErrorMessage |
+              EM [Bool] |]
+  ======>
+    data ErrorMessage
+      = ErrorMessage :$$: ErrorMessage |
+        ErrorMessage :<>: ErrorMessage |
+        EM [Bool]
+    ($$:) :: ErrorMessage -> ErrorMessage -> ErrorMessage
+    ($$:) x y = (x :$$: y)
+    (<>:) :: ErrorMessage -> ErrorMessage -> ErrorMessage
+    (<>:) x y = (x :<>: y)
+    type (:$$:@#@$$$) (t0123456789876543210 :: ErrorMessage) (t0123456789876543210 :: ErrorMessage) =
+        (:$$:) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings ((:$$:@#@$$) t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (::$$:@#@$$###)) ())
+    data (:$$:@#@$$) (t0123456789876543210 :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage
+      where
+        (::$$:@#@$$###) :: forall t0123456789876543210
+                                  t0123456789876543210
+                                  arg. SameKind (Apply ((:$$:@#@$$) t0123456789876543210) arg) ((:$$:@#@$$$) t0123456789876543210 arg) =>
+                           (:$$:@#@$$) t0123456789876543210 t0123456789876543210
+    type instance Apply ((:$$:@#@$$) t0123456789876543210) t0123456789876543210 = (:$$:) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (:$$:@#@$) where
+      suppressUnusedWarnings = snd (((,) (::$$:@#@$###)) ())
+    data (:$$:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)
+      where
+        (::$$:@#@$###) :: forall t0123456789876543210
+                                 arg. SameKind (Apply (:$$:@#@$) arg) ((:$$:@#@$$) arg) =>
+                          (:$$:@#@$) t0123456789876543210
+    type instance Apply (:$$:@#@$) t0123456789876543210 = (:$$:@#@$$) t0123456789876543210
+    type (:<>:@#@$$$) (t0123456789876543210 :: ErrorMessage) (t0123456789876543210 :: ErrorMessage) =
+        (:<>:) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings ((:<>:@#@$$) t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (::<>:@#@$$###)) ())
+    data (:<>:@#@$$) (t0123456789876543210 :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage
+      where
+        (::<>:@#@$$###) :: forall t0123456789876543210
+                                  t0123456789876543210
+                                  arg. SameKind (Apply ((:<>:@#@$$) t0123456789876543210) arg) ((:<>:@#@$$$) t0123456789876543210 arg) =>
+                           (:<>:@#@$$) t0123456789876543210 t0123456789876543210
+    type instance Apply ((:<>:@#@$$) t0123456789876543210) t0123456789876543210 = (:<>:) t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (:<>:@#@$) where
+      suppressUnusedWarnings = snd (((,) (::<>:@#@$###)) ())
+    data (:<>:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)
+      where
+        (::<>:@#@$###) :: forall t0123456789876543210
+                                 arg. SameKind (Apply (:<>:@#@$) arg) ((:<>:@#@$$) arg) =>
+                          (:<>:@#@$) t0123456789876543210
+    type instance Apply (:<>:@#@$) t0123456789876543210 = (:<>:@#@$$) t0123456789876543210
+    type EMSym1 (t0123456789876543210 :: [Bool]) =
+        EM t0123456789876543210
+    instance SuppressUnusedWarnings EMSym0 where
+      suppressUnusedWarnings = snd (((,) EMSym0KindInference) ())
+    data EMSym0 :: (~>) [Bool] ErrorMessage
+      where
+        EMSym0KindInference :: forall t0123456789876543210
+                                      arg. SameKind (Apply EMSym0 arg) (EMSym1 arg) =>
+                               EMSym0 t0123456789876543210
+    type instance Apply EMSym0 t0123456789876543210 = EM t0123456789876543210
+    type (<>:@#@$$$) (a0123456789876543210 :: ErrorMessage) (a0123456789876543210 :: ErrorMessage) =
+        (<>:) a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ((<>:@#@$$) a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (:<>:@#@$$###)) ())
+    data (<>:@#@$$) (a0123456789876543210 :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage
+      where
+        (:<>:@#@$$###) :: forall a0123456789876543210
+                                 a0123456789876543210
+                                 arg. SameKind (Apply ((<>:@#@$$) a0123456789876543210) arg) ((<>:@#@$$$) a0123456789876543210 arg) =>
+                          (<>:@#@$$) a0123456789876543210 a0123456789876543210
+    type instance Apply ((<>:@#@$$) a0123456789876543210) a0123456789876543210 = (<>:) a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (<>:@#@$) where
+      suppressUnusedWarnings = snd (((,) (:<>:@#@$###)) ())
+    data (<>:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)
+      where
+        (:<>:@#@$###) :: forall a0123456789876543210
+                                arg. SameKind (Apply (<>:@#@$) arg) ((<>:@#@$$) arg) =>
+                         (<>:@#@$) a0123456789876543210
+    type instance Apply (<>:@#@$) a0123456789876543210 = (<>:@#@$$) a0123456789876543210
+    type ($$:@#@$$$) (a0123456789876543210 :: ErrorMessage) (a0123456789876543210 :: ErrorMessage) =
+        ($$:) a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (($$:@#@$$) a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (:$$:@#@$$###)) ())
+    data ($$:@#@$$) (a0123456789876543210 :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage
+      where
+        (:$$:@#@$$###) :: forall a0123456789876543210
+                                 a0123456789876543210
+                                 arg. SameKind (Apply (($$:@#@$$) a0123456789876543210) arg) (($$:@#@$$$) a0123456789876543210 arg) =>
+                          ($$:@#@$$) a0123456789876543210 a0123456789876543210
+    type instance Apply (($$:@#@$$) a0123456789876543210) a0123456789876543210 = ($$:) a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ($$:@#@$) where
+      suppressUnusedWarnings = snd (((,) (:$$:@#@$###)) ())
+    data ($$:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)
+      where
+        (:$$:@#@$###) :: forall a0123456789876543210
+                                arg. SameKind (Apply ($$:@#@$) arg) (($$:@#@$$) arg) =>
+                         ($$:@#@$) a0123456789876543210
+    type instance Apply ($$:@#@$) a0123456789876543210 = ($$:@#@$$) a0123456789876543210
+    type family (<>:) (a :: ErrorMessage) (a :: ErrorMessage) :: ErrorMessage where
+      (<>:) x y = Apply (Apply (:<>:@#@$) x) y
+    type family ($$:) (a :: ErrorMessage) (a :: ErrorMessage) :: ErrorMessage where
+      ($$:) x y = Apply (Apply (:$$:@#@$) x) y
+    (%<>:) ::
+      forall (t :: ErrorMessage) (t :: ErrorMessage).
+      Sing t
+      -> Sing t -> Sing (Apply (Apply (<>:@#@$) t) t :: ErrorMessage)
+    (%$$:) ::
+      forall (t :: ErrorMessage) (t :: ErrorMessage).
+      Sing t
+      -> Sing t -> Sing (Apply (Apply ($$:@#@$) t) t :: ErrorMessage)
+    (%<>:) (sX :: Sing x) (sY :: Sing y)
+      = (applySing ((applySing ((singFun2 @(:<>:@#@$)) (:%<>:))) sX)) sY
+    (%$$:) (sX :: Sing x) (sY :: Sing y)
+      = (applySing ((applySing ((singFun2 @(:$$:@#@$)) (:%$$:))) sX)) sY
+    instance SingI ((<>:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)) where
+      sing = (singFun2 @(<>:@#@$)) (%<>:)
+    instance SingI d =>
+             SingI ((<>:@#@$$) (d :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage) where
+      sing
+        = (singFun1 @((<>:@#@$$) (d :: ErrorMessage))) ((%<>:) (sing @d))
+    instance SingI (($$:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)) where
+      sing = (singFun2 @($$:@#@$)) (%$$:)
+    instance SingI d =>
+             SingI (($$:@#@$$) (d :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage) where
+      sing
+        = (singFun1 @(($$:@#@$$) (d :: ErrorMessage))) ((%$$:) (sing @d))
+    data SErrorMessage :: ErrorMessage -> GHC.Types.Type
+      where
+        (:%$$:) :: forall (n :: ErrorMessage) (n :: ErrorMessage).
+                   (Sing (n :: ErrorMessage))
+                   -> (Sing (n :: ErrorMessage)) -> SErrorMessage ((:$$:) n n)
+        (:%<>:) :: forall (n :: ErrorMessage) (n :: ErrorMessage).
+                   (Sing (n :: ErrorMessage))
+                   -> (Sing (n :: ErrorMessage)) -> SErrorMessage ((:<>:) n n)
+        SEM :: forall (n :: [Bool]).
+               (Sing (n :: [Bool])) -> SErrorMessage (EM n)
+    type instance Sing @ErrorMessage = SErrorMessage
+    instance SingKind ErrorMessage where
+      type Demote ErrorMessage = ErrorMessage
+      fromSing ((:%$$:) b b) = ((:$$:) (fromSing b)) (fromSing b)
+      fromSing ((:%<>:) b b) = ((:<>:) (fromSing b)) (fromSing b)
+      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) }
+      toSing
+        ((:<>:) (b :: Demote ErrorMessage) (b :: Demote ErrorMessage))
+        = case
+              ((,) (toSing b :: SomeSing ErrorMessage))
+                (toSing b :: SomeSing ErrorMessage)
+          of {
+            (,) (SomeSing c) (SomeSing c) -> SomeSing (((:%<>:) c) c) }
+      toSing (EM (b :: Demote [Bool]))
+        = case toSing b :: SomeSing [Bool] of {
+            SomeSing c -> SomeSing (SEM c) }
+    instance (SingI n, SingI n) =>
+             SingI ((:$$:) (n :: ErrorMessage) (n :: ErrorMessage)) where
+      sing = ((:%$$:) sing) sing
+    instance SingI ((:$$:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)) where
+      sing = (singFun2 @(:$$:@#@$)) (:%$$:)
+    instance SingI d =>
+             SingI ((:$$:@#@$$) (d :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage) where
+      sing
+        = (singFun1 @((:$$:@#@$$) (d :: ErrorMessage))) ((:%$$:) (sing @d))
+    instance (SingI n, SingI n) =>
+             SingI ((:<>:) (n :: ErrorMessage) (n :: ErrorMessage)) where
+      sing = ((:%<>:) sing) sing
+    instance SingI ((:<>:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage)) where
+      sing = (singFun2 @(:<>:@#@$)) (:%<>:)
+    instance SingI d =>
+             SingI ((:<>:@#@$$) (d :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage) where
+      sing
+        = (singFun1 @((:<>:@#@$$) (d :: ErrorMessage))) ((:%<>:) (sing @d))
+    instance SingI n => SingI (EM (n :: [Bool])) where
+      sing = SEM sing
+    instance SingI (EMSym0 :: (~>) [Bool] ErrorMessage) where
+      sing = (singFun1 @EMSym0) SEM
diff --git a/tests/compile-and-dump/Singletons/T206.ghc86.template b/tests/compile-and-dump/Singletons/T206.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T206.ghc86.template
+++ /dev/null
diff --git a/tests/compile-and-dump/Singletons/T206.ghc88.template b/tests/compile-and-dump/Singletons/T206.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T206.ghc88.template
diff --git a/tests/compile-and-dump/Singletons/T209.ghc86.template b/tests/compile-and-dump/Singletons/T209.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T209.ghc86.template
+++ /dev/null
@@ -1,82 +0,0 @@
-Singletons/T209.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| m :: a -> b -> Bool -> Bool
-          m _ _ x = x
-          
-          class C a b
-          data Hm
-            = Hm
-            deriving anyclass (C Bool)
-          
-          deriving anyclass instance C a a => C a (Maybe a) |]
-  ======>
-    class C a b
-    m :: a -> b -> Bool -> Bool
-    m _ _ x = x
-    data Hm
-      = Hm
-      deriving anyclass (C Bool)
-    deriving anyclass instance C a a => C a (Maybe a)
-    type HmSym0 = Hm
-    type MSym3 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) (a0123456789876543210 :: Bool) =
-        M a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (MSym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MSym2KindInference) ())
-    data MSym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) :: (~>) Bool Bool
-      where
-        MSym2KindInference :: forall a0123456789876543210
-                                     a0123456789876543210
-                                     a0123456789876543210
-                                     arg. SameKind (Apply (MSym2 a0123456789876543210 a0123456789876543210) arg) (MSym3 a0123456789876543210 a0123456789876543210 arg) =>
-                              MSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (MSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = M a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (MSym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MSym1KindInference) ())
-    data MSym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                 (~>) b0123456789876543210 ((~>) Bool Bool)
-      where
-        MSym1KindInference :: forall a0123456789876543210
-                                     a0123456789876543210
-                                     arg. SameKind (Apply (MSym1 a0123456789876543210) arg) (MSym2 a0123456789876543210 arg) =>
-                              MSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (MSym1 a0123456789876543210) a0123456789876543210 = MSym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings MSym0 where
-      suppressUnusedWarnings = snd (((,) MSym0KindInference) ())
-    data MSym0 :: forall a0123456789876543210 b0123456789876543210.
-                  (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) Bool Bool))
-      where
-        MSym0KindInference :: forall a0123456789876543210
-                                     arg. SameKind (Apply MSym0 arg) (MSym1 arg) =>
-                              MSym0 a0123456789876543210
-    type instance Apply MSym0 a0123456789876543210 = MSym1 a0123456789876543210
-    type family M (a :: a) (a :: b) (a :: Bool) :: Bool where
-      M _ _ x = x
-    class PC (a :: GHC.Types.Type) (b :: GHC.Types.Type)
-    instance PC Bool Hm
-    instance PC a (Maybe a)
-    sM ::
-      forall a b (t :: a) (t :: b) (t :: Bool).
-      Sing t
-      -> Sing t
-         -> Sing t -> Sing (Apply (Apply (Apply MSym0 t) t) t :: Bool)
-    sM _ _ (sX :: Sing x) = sX
-    instance SingI (MSym0 :: (~>) a ((~>) b ((~>) Bool Bool))) where
-      sing = (singFun3 @MSym0) sM
-    instance SingI d =>
-             SingI (MSym1 (d :: a) :: (~>) b ((~>) Bool Bool)) where
-      sing = (singFun2 @(MSym1 (d :: a))) (sM (sing @d))
-    instance (SingI d, SingI d) =>
-             SingI (MSym2 (d :: a) (d :: b) :: (~>) Bool Bool) where
-      sing
-        = (singFun1 @(MSym2 (d :: a) (d :: b))) ((sM (sing @d)) (sing @d))
-    data instance Sing :: Hm -> GHC.Types.Type where SHm :: Sing Hm
-    type SHm = (Sing :: Hm -> GHC.Types.Type)
-    instance SingKind Hm where
-      type Demote Hm = Hm
-      fromSing SHm = Hm
-      toSing Hm = SomeSing SHm
-    class SC a b
-    instance SC Bool Hm
-    instance SC a a => SC a (Maybe a)
-    instance SingI Hm where
-      sing = SHm
diff --git a/tests/compile-and-dump/Singletons/T209.ghc88.template b/tests/compile-and-dump/Singletons/T209.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T209.ghc88.template
@@ -0,0 +1,82 @@
+Singletons/T209.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| m :: a -> b -> Bool -> Bool
+          m _ _ x = x
+          
+          class C a b
+          data Hm
+            = Hm
+            deriving anyclass (C Bool)
+          
+          deriving anyclass instance C a a => C a (Maybe a) |]
+  ======>
+    class C a b
+    m :: a -> b -> Bool -> Bool
+    m _ _ x = x
+    data Hm
+      = Hm
+      deriving anyclass (C Bool)
+    deriving anyclass instance C a a => C a (Maybe a)
+    type HmSym0 = Hm
+    type MSym3 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) (a0123456789876543210 :: Bool) =
+        M a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (MSym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MSym2KindInference) ())
+    data MSym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) :: (~>) Bool Bool
+      where
+        MSym2KindInference :: forall a0123456789876543210
+                                     a0123456789876543210
+                                     a0123456789876543210
+                                     arg. SameKind (Apply (MSym2 a0123456789876543210 a0123456789876543210) arg) (MSym3 a0123456789876543210 a0123456789876543210 arg) =>
+                              MSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (MSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = M a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (MSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MSym1KindInference) ())
+    data MSym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                 (~>) b0123456789876543210 ((~>) Bool Bool)
+      where
+        MSym1KindInference :: forall a0123456789876543210
+                                     a0123456789876543210
+                                     arg. SameKind (Apply (MSym1 a0123456789876543210) arg) (MSym2 a0123456789876543210 arg) =>
+                              MSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (MSym1 a0123456789876543210) a0123456789876543210 = MSym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings MSym0 where
+      suppressUnusedWarnings = snd (((,) MSym0KindInference) ())
+    data MSym0 :: forall a0123456789876543210 b0123456789876543210.
+                  (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) Bool Bool))
+      where
+        MSym0KindInference :: forall a0123456789876543210
+                                     arg. SameKind (Apply MSym0 arg) (MSym1 arg) =>
+                              MSym0 a0123456789876543210
+    type instance Apply MSym0 a0123456789876543210 = MSym1 a0123456789876543210
+    type family M (a :: a) (a :: b) (a :: Bool) :: Bool where
+      M _ _ x = x
+    class PC (a :: GHC.Types.Type) (b :: GHC.Types.Type)
+    instance PC Bool Hm
+    instance PC a (Maybe a)
+    sM ::
+      forall a b (t :: a) (t :: b) (t :: Bool).
+      Sing t
+      -> Sing t
+         -> Sing t -> Sing (Apply (Apply (Apply MSym0 t) t) t :: Bool)
+    sM _ _ (sX :: Sing x) = sX
+    instance SingI (MSym0 :: (~>) a ((~>) b ((~>) Bool Bool))) where
+      sing = (singFun3 @MSym0) sM
+    instance SingI d =>
+             SingI (MSym1 (d :: a) :: (~>) b ((~>) Bool Bool)) where
+      sing = (singFun2 @(MSym1 (d :: a))) (sM (sing @d))
+    instance (SingI d, SingI d) =>
+             SingI (MSym2 (d :: a) (d :: b) :: (~>) Bool Bool) where
+      sing
+        = (singFun1 @(MSym2 (d :: a) (d :: b))) ((sM (sing @d)) (sing @d))
+    data SHm :: Hm -> GHC.Types.Type where SHm :: SHm Hm
+    type instance Sing @Hm = SHm
+    instance SingKind Hm where
+      type Demote Hm = Hm
+      fromSing SHm = Hm
+      toSing Hm = SomeSing SHm
+    class SC a b
+    instance SC Bool Hm
+    instance SC a a => SC a (Maybe a)
+    instance SingI Hm where
+      sing = SHm
diff --git a/tests/compile-and-dump/Singletons/T216.ghc86.template b/tests/compile-and-dump/Singletons/T216.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T216.ghc86.template
+++ /dev/null
@@ -1,56 +0,0 @@
-Singletons/T216.hs:0:0:: Splicing declarations
-    genDefunSymbols [''MyProxy, ''Symmetry]
-  ======>
-    type MyProxySym2 (k0123456789876543210 :: Type) (a0123456789876543210 :: k0123456789876543210) =
-        MyProxy k0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (MyProxySym1 k0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MyProxySym1KindInference) ())
-    data MyProxySym1 (k0123456789876543210 :: Type) :: (~>) k0123456789876543210 Type
-      where
-        MyProxySym1KindInference :: forall k0123456789876543210
-                                           a0123456789876543210
-                                           arg. SameKind (Apply (MyProxySym1 k0123456789876543210) arg) (MyProxySym2 k0123456789876543210 arg) =>
-                                    MyProxySym1 k0123456789876543210 a0123456789876543210
-    type instance Apply (MyProxySym1 k0123456789876543210) a0123456789876543210 = MyProxy k0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings MyProxySym0 where
-      suppressUnusedWarnings = snd (((,) MyProxySym0KindInference) ())
-    data MyProxySym0 :: forall (k0123456789876543210 :: Type).
-                        (~>) Type ((~>) k0123456789876543210 Type)
-      where
-        MyProxySym0KindInference :: forall k0123456789876543210
-                                           arg. SameKind (Apply MyProxySym0 arg) (MyProxySym1 arg) =>
-                                    MyProxySym0 k0123456789876543210
-    type instance Apply MyProxySym0 k0123456789876543210 = MyProxySym1 k0123456789876543210
-    type SymmetrySym3 (a0123456789876543210 :: t0123456789876543210) (y0123456789876543210 :: t0123456789876543210) (e0123456789876543210 :: (:~:) a0123456789876543210 y0123456789876543210) =
-        Symmetry a0123456789876543210 y0123456789876543210 e0123456789876543210
-    instance SuppressUnusedWarnings (SymmetrySym2 y0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) SymmetrySym2KindInference) ())
-    data SymmetrySym2 (a0123456789876543210 :: t0123456789876543210) (y0123456789876543210 :: t0123456789876543210) :: (~>) ((:~:) a0123456789876543210 y0123456789876543210) Type
-      where
-        SymmetrySym2KindInference :: forall a0123456789876543210
-                                            y0123456789876543210
-                                            e0123456789876543210
-                                            arg. SameKind (Apply (SymmetrySym2 a0123456789876543210 y0123456789876543210) arg) (SymmetrySym3 a0123456789876543210 y0123456789876543210 arg) =>
-                                     SymmetrySym2 a0123456789876543210 y0123456789876543210 e0123456789876543210
-    type instance Apply (SymmetrySym2 y0123456789876543210 a0123456789876543210) e0123456789876543210 = Symmetry y0123456789876543210 a0123456789876543210 e0123456789876543210
-    instance SuppressUnusedWarnings (SymmetrySym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) SymmetrySym1KindInference) ())
-    data SymmetrySym1 (a0123456789876543210 :: t0123456789876543210) :: forall (y0123456789876543210 :: t0123456789876543210).
-                                                                        (~>) t0123456789876543210 ((~>) ((:~:) a0123456789876543210 y0123456789876543210) Type)
-      where
-        SymmetrySym1KindInference :: forall a0123456789876543210
-                                            y0123456789876543210
-                                            arg. SameKind (Apply (SymmetrySym1 a0123456789876543210) arg) (SymmetrySym2 a0123456789876543210 arg) =>
-                                     SymmetrySym1 a0123456789876543210 y0123456789876543210
-    type instance Apply (SymmetrySym1 a0123456789876543210) y0123456789876543210 = SymmetrySym2 a0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings SymmetrySym0 where
-      suppressUnusedWarnings = snd (((,) SymmetrySym0KindInference) ())
-    data SymmetrySym0 :: forall t0123456789876543210
-                                (a0123456789876543210 :: t0123456789876543210)
-                                (y0123456789876543210 :: t0123456789876543210).
-                         (~>) t0123456789876543210 ((~>) t0123456789876543210 ((~>) ((:~:) a0123456789876543210 y0123456789876543210) Type))
-      where
-        SymmetrySym0KindInference :: forall a0123456789876543210
-                                            arg. SameKind (Apply SymmetrySym0 arg) (SymmetrySym1 arg) =>
-                                     SymmetrySym0 a0123456789876543210
-    type instance Apply SymmetrySym0 a0123456789876543210 = SymmetrySym1 a0123456789876543210
diff --git a/tests/compile-and-dump/Singletons/T216.ghc88.template b/tests/compile-and-dump/Singletons/T216.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T216.ghc88.template
@@ -0,0 +1,56 @@
+Singletons/T216.hs:0:0:: Splicing declarations
+    genDefunSymbols [''MyProxy, ''Symmetry]
+  ======>
+    type MyProxySym2 (k0123456789876543210 :: Type) (a0123456789876543210 :: k0123456789876543210) =
+        MyProxy k0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (MyProxySym1 k0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MyProxySym1KindInference) ())
+    data MyProxySym1 (k0123456789876543210 :: Type) :: (~>) k0123456789876543210 Type
+      where
+        MyProxySym1KindInference :: forall k0123456789876543210
+                                           a0123456789876543210
+                                           arg. SameKind (Apply (MyProxySym1 k0123456789876543210) arg) (MyProxySym2 k0123456789876543210 arg) =>
+                                    MyProxySym1 k0123456789876543210 a0123456789876543210
+    type instance Apply (MyProxySym1 k0123456789876543210) a0123456789876543210 = MyProxy k0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings MyProxySym0 where
+      suppressUnusedWarnings = snd (((,) MyProxySym0KindInference) ())
+    data MyProxySym0 :: forall (k0123456789876543210 :: Type).
+                        (~>) Type ((~>) k0123456789876543210 Type)
+      where
+        MyProxySym0KindInference :: forall k0123456789876543210
+                                           arg. SameKind (Apply MyProxySym0 arg) (MyProxySym1 arg) =>
+                                    MyProxySym0 k0123456789876543210
+    type instance Apply MyProxySym0 k0123456789876543210 = MyProxySym1 k0123456789876543210
+    type SymmetrySym3 (a0123456789876543210 :: t0123456789876543210) (y0123456789876543210 :: t0123456789876543210) (e0123456789876543210 :: (:~:) a0123456789876543210 y0123456789876543210) =
+        Symmetry a0123456789876543210 y0123456789876543210 e0123456789876543210
+    instance SuppressUnusedWarnings (SymmetrySym2 y0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) SymmetrySym2KindInference) ())
+    data SymmetrySym2 (a0123456789876543210 :: t0123456789876543210) (y0123456789876543210 :: t0123456789876543210) :: (~>) ((:~:) a0123456789876543210 y0123456789876543210) Type
+      where
+        SymmetrySym2KindInference :: forall a0123456789876543210
+                                            y0123456789876543210
+                                            e0123456789876543210
+                                            arg. SameKind (Apply (SymmetrySym2 a0123456789876543210 y0123456789876543210) arg) (SymmetrySym3 a0123456789876543210 y0123456789876543210 arg) =>
+                                     SymmetrySym2 a0123456789876543210 y0123456789876543210 e0123456789876543210
+    type instance Apply (SymmetrySym2 y0123456789876543210 a0123456789876543210) e0123456789876543210 = Symmetry y0123456789876543210 a0123456789876543210 e0123456789876543210
+    instance SuppressUnusedWarnings (SymmetrySym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) SymmetrySym1KindInference) ())
+    data SymmetrySym1 (a0123456789876543210 :: t0123456789876543210) :: forall (y0123456789876543210 :: t0123456789876543210).
+                                                                        (~>) t0123456789876543210 ((~>) ((:~:) a0123456789876543210 y0123456789876543210) Type)
+      where
+        SymmetrySym1KindInference :: forall a0123456789876543210
+                                            y0123456789876543210
+                                            arg. SameKind (Apply (SymmetrySym1 a0123456789876543210) arg) (SymmetrySym2 a0123456789876543210 arg) =>
+                                     SymmetrySym1 a0123456789876543210 y0123456789876543210
+    type instance Apply (SymmetrySym1 a0123456789876543210) y0123456789876543210 = SymmetrySym2 a0123456789876543210 y0123456789876543210
+    instance SuppressUnusedWarnings SymmetrySym0 where
+      suppressUnusedWarnings = snd (((,) SymmetrySym0KindInference) ())
+    data SymmetrySym0 :: forall t0123456789876543210
+                                (a0123456789876543210 :: t0123456789876543210)
+                                (y0123456789876543210 :: t0123456789876543210).
+                         (~>) t0123456789876543210 ((~>) t0123456789876543210 ((~>) ((:~:) a0123456789876543210 y0123456789876543210) Type))
+      where
+        SymmetrySym0KindInference :: forall a0123456789876543210
+                                            arg. SameKind (Apply SymmetrySym0 arg) (SymmetrySym1 arg) =>
+                                     SymmetrySym0 a0123456789876543210
+    type instance Apply SymmetrySym0 a0123456789876543210 = SymmetrySym1 a0123456789876543210
diff --git a/tests/compile-and-dump/Singletons/T226.ghc86.template b/tests/compile-and-dump/Singletons/T226.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T226.ghc86.template
+++ /dev/null
@@ -1,6 +0,0 @@
-Singletons/T226.hs:0:0:: Splicing declarations
-    singletons [d| class a ~> b |]
-  ======>
-    class (~>) a b
-    class (#~>) (a :: GHC.Types.Type) (b :: GHC.Types.Type)
-    class (%~>) a b
diff --git a/tests/compile-and-dump/Singletons/T226.ghc88.template b/tests/compile-and-dump/Singletons/T226.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T226.ghc88.template
@@ -0,0 +1,6 @@
+Singletons/T226.hs:0:0:: Splicing declarations
+    singletons [d| class a ~> b |]
+  ======>
+    class (~>) a b
+    class (#~>) (a :: GHC.Types.Type) (b :: GHC.Types.Type)
+    class (%~>) a b
diff --git a/tests/compile-and-dump/Singletons/T229.ghc86.template b/tests/compile-and-dump/Singletons/T229.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T229.ghc86.template
+++ /dev/null
@@ -1,24 +0,0 @@
-Singletons/T229.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| ___foo :: Bool -> Bool
-          ___foo _ = True |]
-  ======>
-    ___foo :: Bool -> Bool
-    ___foo _ = True
-    type US___fooSym1 (a0123456789876543210 :: Bool) =
-        US___foo a0123456789876543210
-    instance SuppressUnusedWarnings US___fooSym0 where
-      suppressUnusedWarnings = snd (((,) US___fooSym0KindInference) ())
-    data US___fooSym0 :: (~>) Bool Bool
-      where
-        US___fooSym0KindInference :: forall a0123456789876543210
-                                            arg. SameKind (Apply US___fooSym0 arg) (US___fooSym1 arg) =>
-                                     US___fooSym0 a0123456789876543210
-    type instance Apply US___fooSym0 a0123456789876543210 = US___foo a0123456789876543210
-    type family US___foo (a :: Bool) :: Bool where
-      US___foo _ = TrueSym0
-    ___sfoo ::
-      forall (t :: Bool). Sing t -> Sing (Apply US___fooSym0 t :: Bool)
-    ___sfoo _ = STrue
-    instance SingI (US___fooSym0 :: (~>) Bool Bool) where
-      sing = (singFun1 @US___fooSym0) ___sfoo
diff --git a/tests/compile-and-dump/Singletons/T229.ghc88.template b/tests/compile-and-dump/Singletons/T229.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T229.ghc88.template
@@ -0,0 +1,24 @@
+Singletons/T229.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| ___foo :: Bool -> Bool
+          ___foo _ = True |]
+  ======>
+    ___foo :: Bool -> Bool
+    ___foo _ = True
+    type US___fooSym1 (a0123456789876543210 :: Bool) =
+        US___foo a0123456789876543210
+    instance SuppressUnusedWarnings US___fooSym0 where
+      suppressUnusedWarnings = snd (((,) US___fooSym0KindInference) ())
+    data US___fooSym0 :: (~>) Bool Bool
+      where
+        US___fooSym0KindInference :: forall a0123456789876543210
+                                            arg. SameKind (Apply US___fooSym0 arg) (US___fooSym1 arg) =>
+                                     US___fooSym0 a0123456789876543210
+    type instance Apply US___fooSym0 a0123456789876543210 = US___foo a0123456789876543210
+    type family US___foo (a :: Bool) :: Bool where
+      US___foo _ = TrueSym0
+    ___sfoo ::
+      forall (t :: Bool). Sing t -> Sing (Apply US___fooSym0 t :: Bool)
+    ___sfoo _ = STrue
+    instance SingI (US___fooSym0 :: (~>) Bool Bool) where
+      sing = (singFun1 @US___fooSym0) ___sfoo
diff --git a/tests/compile-and-dump/Singletons/T249.ghc86.template b/tests/compile-and-dump/Singletons/T249.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T249.ghc86.template
+++ /dev/null
@@ -1,90 +0,0 @@
-Singletons/T249.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| data Foo1 a = MkFoo1 a
-          data Foo2 a where MkFoo2 :: x -> Foo2 x
-          data Foo3 a where MkFoo3 :: forall x. x -> Foo3 x |]
-  ======>
-    data Foo1 a = MkFoo1 a
-    data Foo2 a where MkFoo2 :: x -> Foo2 x
-    data Foo3 a where MkFoo3 :: forall x. x -> Foo3 x
-    type MkFoo1Sym1 (t0123456789876543210 :: a0123456789876543210) =
-        MkFoo1 t0123456789876543210
-    instance SuppressUnusedWarnings MkFoo1Sym0 where
-      suppressUnusedWarnings = snd (((,) MkFoo1Sym0KindInference) ())
-    data MkFoo1Sym0 :: forall a0123456789876543210.
-                       (~>) a0123456789876543210 (Foo1 a0123456789876543210)
-      where
-        MkFoo1Sym0KindInference :: forall t0123456789876543210
-                                          arg. SameKind (Apply MkFoo1Sym0 arg) (MkFoo1Sym1 arg) =>
-                                   MkFoo1Sym0 t0123456789876543210
-    type instance Apply MkFoo1Sym0 t0123456789876543210 = MkFoo1 t0123456789876543210
-    type MkFoo2Sym1 (t0123456789876543210 :: x0123456789876543210) =
-        MkFoo2 t0123456789876543210
-    instance SuppressUnusedWarnings MkFoo2Sym0 where
-      suppressUnusedWarnings = snd (((,) MkFoo2Sym0KindInference) ())
-    data MkFoo2Sym0 :: forall x0123456789876543210.
-                       (~>) x0123456789876543210 (Foo2 x0123456789876543210)
-      where
-        MkFoo2Sym0KindInference :: forall t0123456789876543210
-                                          arg. SameKind (Apply MkFoo2Sym0 arg) (MkFoo2Sym1 arg) =>
-                                   MkFoo2Sym0 t0123456789876543210
-    type instance Apply MkFoo2Sym0 t0123456789876543210 = MkFoo2 t0123456789876543210
-    type MkFoo3Sym1 (t0123456789876543210 :: x0123456789876543210) =
-        MkFoo3 t0123456789876543210
-    instance SuppressUnusedWarnings MkFoo3Sym0 where
-      suppressUnusedWarnings = snd (((,) MkFoo3Sym0KindInference) ())
-    data MkFoo3Sym0 :: forall x0123456789876543210.
-                       (~>) x0123456789876543210 (Foo3 x0123456789876543210)
-      where
-        MkFoo3Sym0KindInference :: forall t0123456789876543210
-                                          arg. SameKind (Apply MkFoo3Sym0 arg) (MkFoo3Sym1 arg) =>
-                                   MkFoo3Sym0 t0123456789876543210
-    type instance Apply MkFoo3Sym0 t0123456789876543210 = MkFoo3 t0123456789876543210
-    data instance Sing :: Foo1 a -> Type
-      where
-        SMkFoo1 :: forall a (n :: a). (Sing (n :: a)) -> Sing (MkFoo1 n)
-    type SFoo1 = (Sing :: Foo1 a -> Type)
-    instance SingKind a => SingKind (Foo1 a) where
-      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) }
-    data instance Sing :: Foo2 a -> Type
-      where
-        SMkFoo2 :: forall x (n :: x). (Sing (n :: x)) -> Sing (MkFoo2 n)
-    type SFoo2 = (Sing :: Foo2 a -> Type)
-    instance SingKind a => SingKind (Foo2 a) where
-      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) }
-    data instance Sing :: Foo3 a -> Type
-      where
-        SMkFoo3 :: forall x (n :: x). (Sing (n :: x)) -> Sing (MkFoo3 n)
-    type SFoo3 = (Sing :: Foo3 a -> Type)
-    instance SingKind a => SingKind (Foo3 a) where
-      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) }
-    instance SingI n => SingI (MkFoo1 (n :: a)) where
-      sing = SMkFoo1 sing
-    instance SingI (MkFoo1Sym0 :: (~>) a (Foo1 a)) where
-      sing = (singFun1 @MkFoo1Sym0) SMkFoo1
-    instance SingI (TyCon1 MkFoo1 :: (~>) a (Foo1 a)) where
-      sing = (singFun1 @(TyCon1 MkFoo1)) SMkFoo1
-    instance SingI n => SingI (MkFoo2 (n :: x)) where
-      sing = SMkFoo2 sing
-    instance SingI (MkFoo2Sym0 :: (~>) x (Foo2 x)) where
-      sing = (singFun1 @MkFoo2Sym0) SMkFoo2
-    instance SingI (TyCon1 MkFoo2 :: (~>) x (Foo2 x)) where
-      sing = (singFun1 @(TyCon1 MkFoo2)) SMkFoo2
-    instance SingI n => SingI (MkFoo3 (n :: x)) where
-      sing = SMkFoo3 sing
-    instance SingI (MkFoo3Sym0 :: (~>) x (Foo3 x)) where
-      sing = (singFun1 @MkFoo3Sym0) SMkFoo3
-    instance SingI (TyCon1 MkFoo3 :: (~>) x (Foo3 x)) where
-      sing = (singFun1 @(TyCon1 MkFoo3)) SMkFoo3
diff --git a/tests/compile-and-dump/Singletons/T249.ghc88.template b/tests/compile-and-dump/Singletons/T249.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T249.ghc88.template
@@ -0,0 +1,84 @@
+Singletons/T249.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| data Foo1 a = MkFoo1 a
+          data Foo2 a where MkFoo2 :: x -> Foo2 x
+          data Foo3 a where MkFoo3 :: forall x. x -> Foo3 x |]
+  ======>
+    data Foo1 a = MkFoo1 a
+    data Foo2 a where MkFoo2 :: x -> Foo2 x
+    data Foo3 a where MkFoo3 :: forall x. x -> Foo3 x
+    type MkFoo1Sym1 (t0123456789876543210 :: a0123456789876543210) =
+        MkFoo1 t0123456789876543210
+    instance SuppressUnusedWarnings MkFoo1Sym0 where
+      suppressUnusedWarnings = snd (((,) MkFoo1Sym0KindInference) ())
+    data MkFoo1Sym0 :: forall a0123456789876543210.
+                       (~>) a0123456789876543210 (Foo1 a0123456789876543210)
+      where
+        MkFoo1Sym0KindInference :: forall t0123456789876543210
+                                          arg. SameKind (Apply MkFoo1Sym0 arg) (MkFoo1Sym1 arg) =>
+                                   MkFoo1Sym0 t0123456789876543210
+    type instance Apply MkFoo1Sym0 t0123456789876543210 = MkFoo1 t0123456789876543210
+    type MkFoo2Sym1 (t0123456789876543210 :: x0123456789876543210) =
+        MkFoo2 t0123456789876543210
+    instance SuppressUnusedWarnings MkFoo2Sym0 where
+      suppressUnusedWarnings = snd (((,) MkFoo2Sym0KindInference) ())
+    data MkFoo2Sym0 :: forall x0123456789876543210.
+                       (~>) x0123456789876543210 (Foo2 x0123456789876543210)
+      where
+        MkFoo2Sym0KindInference :: forall t0123456789876543210
+                                          arg. SameKind (Apply MkFoo2Sym0 arg) (MkFoo2Sym1 arg) =>
+                                   MkFoo2Sym0 t0123456789876543210
+    type instance Apply MkFoo2Sym0 t0123456789876543210 = MkFoo2 t0123456789876543210
+    type MkFoo3Sym1 (t0123456789876543210 :: x0123456789876543210) =
+        MkFoo3 t0123456789876543210
+    instance SuppressUnusedWarnings MkFoo3Sym0 where
+      suppressUnusedWarnings = snd (((,) MkFoo3Sym0KindInference) ())
+    data MkFoo3Sym0 :: forall x0123456789876543210.
+                       (~>) x0123456789876543210 (Foo3 x0123456789876543210)
+      where
+        MkFoo3Sym0KindInference :: forall t0123456789876543210
+                                          arg. SameKind (Apply MkFoo3Sym0 arg) (MkFoo3Sym1 arg) =>
+                                   MkFoo3Sym0 t0123456789876543210
+    type instance Apply MkFoo3Sym0 t0123456789876543210 = MkFoo3 t0123456789876543210
+    data SFoo1 :: forall a. Foo1 a -> Type
+      where
+        SMkFoo1 :: forall a (n :: a). (Sing (n :: a)) -> SFoo1 (MkFoo1 n)
+    type instance Sing @(Foo1 a) = SFoo1
+    instance SingKind a => SingKind (Foo1 a) where
+      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) }
+    data SFoo2 :: forall a. Foo2 a -> Type
+      where
+        SMkFoo2 :: forall x (n :: x). (Sing (n :: x)) -> SFoo2 (MkFoo2 n)
+    type instance Sing @(Foo2 a) = SFoo2
+    instance SingKind a => SingKind (Foo2 a) where
+      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) }
+    data SFoo3 :: forall a. Foo3 a -> Type
+      where
+        SMkFoo3 :: forall x (n :: x). (Sing (n :: x)) -> SFoo3 (MkFoo3 n)
+    type instance Sing @(Foo3 a) = SFoo3
+    instance SingKind a => SingKind (Foo3 a) where
+      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) }
+    instance SingI n => SingI (MkFoo1 (n :: a)) where
+      sing = SMkFoo1 sing
+    instance SingI (MkFoo1Sym0 :: (~>) a (Foo1 a)) where
+      sing = (singFun1 @MkFoo1Sym0) SMkFoo1
+    instance SingI n => SingI (MkFoo2 (n :: x)) where
+      sing = SMkFoo2 sing
+    instance SingI (MkFoo2Sym0 :: (~>) x (Foo2 x)) where
+      sing = (singFun1 @MkFoo2Sym0) SMkFoo2
+    instance SingI n => SingI (MkFoo3 (n :: x)) where
+      sing = SMkFoo3 sing
+    instance SingI (MkFoo3Sym0 :: (~>) x (Foo3 x)) where
+      sing = (singFun1 @MkFoo3Sym0) SMkFoo3
diff --git a/tests/compile-and-dump/Singletons/T271.ghc86.template b/tests/compile-and-dump/Singletons/T271.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T271.ghc86.template
+++ /dev/null
@@ -1,199 +0,0 @@
-Singletons/T271.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| newtype Constant (a :: Type) (b :: Type)
-            = Constant a
-            deriving (Eq, Ord)
-          data Identity :: Type -> Type
-            where Identity :: a -> Identity a
-            deriving (Eq, Ord) |]
-  ======>
-    newtype Constant (a :: Type) (b :: Type)
-      = Constant a
-      deriving (Eq, Ord)
-    data Identity :: Type -> Type
-      where Identity :: a -> Identity a
-      deriving (Eq, Ord)
-    type ConstantSym1 (t0123456789876543210 :: a0123456789876543210) =
-        Constant t0123456789876543210
-    instance SuppressUnusedWarnings ConstantSym0 where
-      suppressUnusedWarnings = snd (((,) ConstantSym0KindInference) ())
-    data ConstantSym0 :: forall (a0123456789876543210 :: Type)
-                                (b0123456789876543210 :: Type).
-                         (~>) a0123456789876543210 (Constant (a0123456789876543210 :: Type) (b0123456789876543210 :: Type))
-      where
-        ConstantSym0KindInference :: forall t0123456789876543210
-                                            arg. SameKind (Apply ConstantSym0 arg) (ConstantSym1 arg) =>
-                                     ConstantSym0 t0123456789876543210
-    type instance Apply ConstantSym0 t0123456789876543210 = Constant t0123456789876543210
-    type IdentitySym1 (t0123456789876543210 :: a0123456789876543210) =
-        Identity t0123456789876543210
-    instance SuppressUnusedWarnings IdentitySym0 where
-      suppressUnusedWarnings = snd (((,) IdentitySym0KindInference) ())
-    data IdentitySym0 :: forall a0123456789876543210.
-                         (~>) a0123456789876543210 (Identity a0123456789876543210)
-      where
-        IdentitySym0KindInference :: forall t0123456789876543210
-                                            arg. SameKind (Apply IdentitySym0 arg) (IdentitySym1 arg) =>
-                                     IdentitySym0 t0123456789876543210
-    type instance Apply IdentitySym0 t0123456789876543210 = Identity t0123456789876543210
-    type family Compare_0123456789876543210 (a :: Constant a b) (a :: Constant a b) :: Ordering where
-      Compare_0123456789876543210 (Constant a_0123456789876543210) (Constant b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])
-    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Constant a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: Constant a0123456789876543210 b0123456789876543210) =
-        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
-    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Constant a0123456789876543210 b0123456789876543210) :: (~>) (Constant a0123456789876543210 b0123456789876543210) Ordering
-      where
-        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
-    data Compare_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                   b0123456789876543210.
-                                            (~>) (Constant a0123456789876543210 b0123456789876543210) ((~>) (Constant a0123456789876543210 b0123456789876543210) Ordering)
-      where
-        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
-                                                        Compare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
-    instance POrd (Constant a b) where
-      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
-    type family Compare_0123456789876543210 (a :: Identity a) (a :: Identity a) :: Ordering where
-      Compare_0123456789876543210 (Identity a_0123456789876543210) (Identity b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])
-    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Identity a0123456789876543210) (a0123456789876543210 :: Identity a0123456789876543210) =
-        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
-    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Identity a0123456789876543210) :: (~>) (Identity a0123456789876543210) Ordering
-      where
-        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                               a0123456789876543210
-                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
-    data Compare_0123456789876543210Sym0 :: forall a0123456789876543210.
-                                            (~>) (Identity a0123456789876543210) ((~>) (Identity a0123456789876543210) Ordering)
-      where
-        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
-                                                        Compare_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
-    instance POrd (Identity a) where
-      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
-    type family Equals_0123456789876543210 (a :: Constant a b) (b :: Constant a b) :: Bool where
-      Equals_0123456789876543210 (Constant a) (Constant b) = (==) a b
-      Equals_0123456789876543210 (_ :: Constant a b) (_ :: Constant a b) = FalseSym0
-    instance PEq (Constant a b) where
-      type (==) a b = Equals_0123456789876543210 a b
-    type family Equals_0123456789876543210 (a :: Identity a) (b :: Identity a) :: Bool where
-      Equals_0123456789876543210 (Identity a) (Identity b) = (==) a b
-      Equals_0123456789876543210 (_ :: Identity a) (_ :: Identity a) = FalseSym0
-    instance PEq (Identity a) where
-      type (==) a b = Equals_0123456789876543210 a b
-    data instance Sing :: Constant a b -> Type
-      where
-        SConstant :: forall a (n :: a).
-                     (Sing (n :: a)) -> Sing (Constant n)
-    type SConstant = (Sing :: Constant a b -> Type)
-    instance (SingKind a, SingKind b) => SingKind (Constant a b) where
-      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) }
-    data instance Sing :: Identity a -> Type
-      where
-        SIdentity :: forall a (n :: a).
-                     (Sing (n :: a)) -> Sing (Identity n)
-    type SIdentity = (Sing :: Identity a -> Type)
-    instance SingKind a => SingKind (Identity a) where
-      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) }
-    instance SOrd a => SOrd (Constant a b) where
-      sCompare ::
-        forall (t1 :: Constant a b) (t2 :: Constant a b).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (CompareSym0 :: TyFun (Constant a b) ((~>) (Constant a b) Ordering)
-                                                 -> Type) t1) t2)
-      sCompare
-        (SConstant (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        (SConstant (sB_0123456789876543210 :: Sing b_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            ((applySing
-                ((applySing
-                    ((singFun2 @(:@#@$))
-                       Data.Singletons.Prelude.Instances.SCons))
-                   ((applySing
-                       ((applySing ((singFun2 @CompareSym0) sCompare))
-                          sA_0123456789876543210))
-                      sB_0123456789876543210)))
-               Data.Singletons.Prelude.Instances.SNil)
-    instance SOrd a => SOrd (Identity a) where
-      sCompare ::
-        forall (t1 :: Identity a) (t2 :: Identity a).
-        Sing t1
-        -> Sing t2
-           -> Sing (Apply (Apply (CompareSym0 :: TyFun (Identity a) ((~>) (Identity a) Ordering)
-                                                 -> Type) t1) t2)
-      sCompare
-        (SIdentity (sA_0123456789876543210 :: Sing a_0123456789876543210))
-        (SIdentity (sB_0123456789876543210 :: Sing b_0123456789876543210))
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
-                    ((singFun2 @ThenCmpSym0) sThenCmp)))
-                SEQ))
-            ((applySing
-                ((applySing
-                    ((singFun2 @(:@#@$))
-                       Data.Singletons.Prelude.Instances.SCons))
-                   ((applySing
-                       ((applySing ((singFun2 @CompareSym0) sCompare))
-                          sA_0123456789876543210))
-                      sB_0123456789876543210)))
-               Data.Singletons.Prelude.Instances.SNil)
-    instance SEq a => SEq (Constant a b) where
-      (%==) (SConstant a) (SConstant b) = ((%==) a) b
-    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 })
-    instance SEq a => SEq (Identity a) where
-      (%==) (SIdentity a) (SIdentity b) = ((%==) a) b
-    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 })
-    instance SingI n => SingI (Constant (n :: a)) where
-      sing = SConstant sing
-    instance SingI (ConstantSym0 :: (~>) a (Constant (a :: Type) (b :: Type))) where
-      sing = (singFun1 @ConstantSym0) SConstant
-    instance SingI (TyCon1 Constant :: (~>) a (Constant (a :: Type) (b :: Type))) where
-      sing = (singFun1 @(TyCon1 Constant)) SConstant
-    instance SingI n => SingI (Identity (n :: a)) where
-      sing = SIdentity sing
-    instance SingI (IdentitySym0 :: (~>) a (Identity a)) where
-      sing = (singFun1 @IdentitySym0) SIdentity
-    instance SingI (TyCon1 Identity :: (~>) a (Identity a)) where
-      sing = (singFun1 @(TyCon1 Identity)) SIdentity
diff --git a/tests/compile-and-dump/Singletons/T271.ghc88.template b/tests/compile-and-dump/Singletons/T271.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T271.ghc88.template
@@ -0,0 +1,215 @@
+Singletons/T271.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| newtype Constant (a :: Type) (b :: Type)
+            = Constant a
+            deriving (Eq, Ord)
+          data Identity :: Type -> Type
+            where Identity :: a -> Identity a
+            deriving (Eq, Ord) |]
+  ======>
+    newtype Constant (a :: Type) (b :: Type)
+      = Constant a
+      deriving (Eq, Ord)
+    data Identity :: Type -> Type
+      where Identity :: a -> Identity a
+      deriving (Eq, Ord)
+    type ConstantSym1 (t0123456789876543210 :: a0123456789876543210) =
+        Constant t0123456789876543210
+    instance SuppressUnusedWarnings ConstantSym0 where
+      suppressUnusedWarnings = snd (((,) ConstantSym0KindInference) ())
+    data ConstantSym0 :: forall (a0123456789876543210 :: Type)
+                                (b0123456789876543210 :: Type).
+                         (~>) a0123456789876543210 (Constant (a0123456789876543210 :: Type) (b0123456789876543210 :: Type))
+      where
+        ConstantSym0KindInference :: forall t0123456789876543210
+                                            arg. SameKind (Apply ConstantSym0 arg) (ConstantSym1 arg) =>
+                                     ConstantSym0 t0123456789876543210
+    type instance Apply ConstantSym0 t0123456789876543210 = Constant t0123456789876543210
+    type IdentitySym1 (t0123456789876543210 :: a0123456789876543210) =
+        Identity t0123456789876543210
+    instance SuppressUnusedWarnings IdentitySym0 where
+      suppressUnusedWarnings = snd (((,) IdentitySym0KindInference) ())
+    data IdentitySym0 :: forall a0123456789876543210.
+                         (~>) a0123456789876543210 (Identity a0123456789876543210)
+      where
+        IdentitySym0KindInference :: forall t0123456789876543210
+                                            arg. SameKind (Apply IdentitySym0 arg) (IdentitySym1 arg) =>
+                                     IdentitySym0 t0123456789876543210
+    type instance Apply IdentitySym0 t0123456789876543210 = Identity t0123456789876543210
+    type family Compare_0123456789876543210 (a :: Constant a b) (a :: Constant a b) :: Ordering where
+      Compare_0123456789876543210 (Constant a_0123456789876543210) (Constant b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])
+    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Constant a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: Constant a0123456789876543210 b0123456789876543210) =
+        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
+    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Constant a0123456789876543210 b0123456789876543210) :: (~>) (Constant a0123456789876543210 b0123456789876543210) Ordering
+      where
+        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
+    data Compare_0123456789876543210Sym0 :: forall a0123456789876543210
+                                                   b0123456789876543210.
+                                            (~>) (Constant a0123456789876543210 b0123456789876543210) ((~>) (Constant a0123456789876543210 b0123456789876543210) Ordering)
+      where
+        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
+                                                        Compare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
+    instance POrd (Constant a b) where
+      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
+    type family Compare_0123456789876543210 (a :: Identity a) (a :: Identity a) :: Ordering where
+      Compare_0123456789876543210 (Identity a_0123456789876543210) (Identity b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) '[])
+    type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Identity a0123456789876543210) (a0123456789876543210 :: Identity a0123456789876543210) =
+        Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym1KindInference) ())
+    data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Identity a0123456789876543210) :: (~>) (Identity a0123456789876543210) Ordering
+      where
+        Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                               a0123456789876543210
+                                                               arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                        Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Compare_0123456789876543210Sym0KindInference) ())
+    data Compare_0123456789876543210Sym0 :: forall a0123456789876543210.
+                                            (~>) (Identity a0123456789876543210) ((~>) (Identity a0123456789876543210) Ordering)
+      where
+        Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                               arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) =>
+                                                        Compare_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210
+    instance POrd (Identity a) where
+      type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a
+    type family Equals_0123456789876543210 (a :: Constant a b) (b :: Constant a b) :: Bool where
+      Equals_0123456789876543210 (Constant a) (Constant b) = (==) a b
+      Equals_0123456789876543210 (_ :: Constant a b) (_ :: Constant a b) = FalseSym0
+    instance PEq (Constant a b) where
+      type (==) a b = Equals_0123456789876543210 a b
+    type family Equals_0123456789876543210 (a :: Identity a) (b :: Identity a) :: Bool where
+      Equals_0123456789876543210 (Identity a) (Identity b) = (==) a b
+      Equals_0123456789876543210 (_ :: Identity a) (_ :: Identity a) = FalseSym0
+    instance PEq (Identity a) where
+      type (==) a b = Equals_0123456789876543210 a b
+    data SConstant :: forall a b. Constant a b -> Type
+      where
+        SConstant :: forall a (n :: a).
+                     (Sing (n :: a)) -> SConstant (Constant n)
+    type instance Sing @(Constant a b) = SConstant
+    instance (SingKind a, SingKind b) => SingKind (Constant a b) where
+      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) }
+    data SIdentity :: forall a. Identity a -> Type
+      where
+        SIdentity :: forall a (n :: a).
+                     (Sing (n :: a)) -> SIdentity (Identity n)
+    type instance Sing @(Identity a) = SIdentity
+    instance SingKind a => SingKind (Identity a) where
+      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) }
+    instance SOrd a => SOrd (Constant a b) where
+      sCompare ::
+        forall (t1 :: Constant a b) (t2 :: Constant a b).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (CompareSym0 :: TyFun (Constant a b) ((~>) (Constant a b) Ordering)
+                                                 -> Type) t1) t2)
+      sCompare
+        (SConstant (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        (SConstant (sB_0123456789876543210 :: Sing b_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            ((applySing
+                ((applySing
+                    ((singFun2 @(:@#@$))
+                       Data.Singletons.Prelude.Instances.SCons))
+                   ((applySing
+                       ((applySing ((singFun2 @CompareSym0) sCompare))
+                          sA_0123456789876543210))
+                      sB_0123456789876543210)))
+               Data.Singletons.Prelude.Instances.SNil)
+    instance SOrd a => SOrd (Identity a) where
+      sCompare ::
+        forall (t1 :: Identity a) (t2 :: Identity a).
+        Sing t1
+        -> Sing t2
+           -> Sing (Apply (Apply (CompareSym0 :: TyFun (Identity a) ((~>) (Identity a) Ordering)
+                                                 -> Type) t1) t2)
+      sCompare
+        (SIdentity (sA_0123456789876543210 :: Sing a_0123456789876543210))
+        (SIdentity (sB_0123456789876543210 :: Sing b_0123456789876543210))
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @FoldlSym0) sFoldl))
+                    ((singFun2 @ThenCmpSym0) sThenCmp)))
+                SEQ))
+            ((applySing
+                ((applySing
+                    ((singFun2 @(:@#@$))
+                       Data.Singletons.Prelude.Instances.SCons))
+                   ((applySing
+                       ((applySing ((singFun2 @CompareSym0) sCompare))
+                          sA_0123456789876543210))
+                      sB_0123456789876543210)))
+               Data.Singletons.Prelude.Instances.SNil)
+    instance SEq a => SEq (Constant a b) where
+      (%==) (SConstant a) (SConstant b) = ((%==) a) b
+    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 })
+    instance SDecide a =>
+             Data.Type.Equality.TestEquality (SConstant :: Constant a b
+                                                           -> Type) where
+      Data.Type.Equality.testEquality
+        = Data.Singletons.Decide.decideEquality
+    instance SDecide a =>
+             Data.Type.Coercion.TestCoercion (SConstant :: Constant a b
+                                                           -> Type) where
+      Data.Type.Coercion.testCoercion
+        = Data.Singletons.Decide.decideCoercion
+    instance SEq a => SEq (Identity a) where
+      (%==) (SIdentity a) (SIdentity b) = ((%==) a) b
+    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 })
+    instance SDecide a =>
+             Data.Type.Equality.TestEquality (SIdentity :: Identity a
+                                                           -> Type) where
+      Data.Type.Equality.testEquality
+        = Data.Singletons.Decide.decideEquality
+    instance SDecide a =>
+             Data.Type.Coercion.TestCoercion (SIdentity :: Identity a
+                                                           -> Type) where
+      Data.Type.Coercion.testCoercion
+        = Data.Singletons.Decide.decideCoercion
+    instance SingI n => SingI (Constant (n :: a)) where
+      sing = SConstant sing
+    instance SingI (ConstantSym0 :: (~>) a (Constant (a :: Type) (b :: Type))) where
+      sing = (singFun1 @ConstantSym0) SConstant
+    instance SingI n => SingI (Identity (n :: a)) where
+      sing = SIdentity sing
+    instance SingI (IdentitySym0 :: (~>) a (Identity a)) where
+      sing = (singFun1 @IdentitySym0) SIdentity
diff --git a/tests/compile-and-dump/Singletons/T287.ghc86.template b/tests/compile-and-dump/Singletons/T287.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T287.ghc86.template
+++ /dev/null
@@ -1,116 +0,0 @@
-Singletons/T287.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| class S a where
-            (<<>>) :: a -> a -> a
-          
-          instance S b => S (a -> b) where
-            f <<>> g = \ x -> f x <<>> g x |]
-  ======>
-    class S a where
-      (<<>>) :: a -> a -> a
-    instance S b => S (a -> b) where
-      (<<>>) f g = \ x -> (f x <<>> g x)
-    type (<<>>@#@$$$) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) =
-        (<<>>) arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings ((<<>>@#@$$) arg0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (:<<>>@#@$$###)) ())
-    data (<<>>@#@$$) (arg0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 a0123456789876543210
-      where
-        (:<<>>@#@$$###) :: forall arg0123456789876543210
-                                  arg0123456789876543210
-                                  arg. SameKind (Apply ((<<>>@#@$$) arg0123456789876543210) arg) ((<<>>@#@$$$) arg0123456789876543210 arg) =>
-                           (<<>>@#@$$) arg0123456789876543210 arg0123456789876543210
-    type instance Apply ((<<>>@#@$$) arg0123456789876543210) arg0123456789876543210 = (<<>>) arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings (<<>>@#@$) where
-      suppressUnusedWarnings = snd (((,) (:<<>>@#@$###)) ())
-    data (<<>>@#@$) :: forall a0123456789876543210.
-                       (~>) a0123456789876543210 ((~>) a0123456789876543210 a0123456789876543210)
-      where
-        (:<<>>@#@$###) :: forall arg0123456789876543210
-                                 arg. SameKind (Apply (<<>>@#@$) arg) ((<<>>@#@$$) arg) =>
-                          (<<>>@#@$) arg0123456789876543210
-    type instance Apply (<<>>@#@$) arg0123456789876543210 = (<<>>@#@$$) arg0123456789876543210
-    class PS (a :: GHC.Types.Type) where
-      type (<<>>) (arg :: a) (arg :: a) :: a
-    type family Lambda_0123456789876543210 f g t where
-      Lambda_0123456789876543210 f g x = Apply (Apply (<<>>@#@$) (Apply f x)) (Apply g x)
-    type Lambda_0123456789876543210Sym3 f0123456789876543210 g0123456789876543210 t0123456789876543210 =
-        Lambda_0123456789876543210 f0123456789876543210 g0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 g0123456789876543210 f0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
-    data Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210 t0123456789876543210
-      where
-        Lambda_0123456789876543210Sym2KindInference :: forall f0123456789876543210
-                                                              g0123456789876543210
-                                                              t0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210) arg) (Lambda_0123456789876543210Sym3 f0123456789876543210 g0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210 t0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym2 g0123456789876543210 f0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 g0123456789876543210 f0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 f0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
-    data Lambda_0123456789876543210Sym1 f0123456789876543210 g0123456789876543210
-      where
-        Lambda_0123456789876543210Sym1KindInference :: forall f0123456789876543210
-                                                              g0123456789876543210
-                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 f0123456789876543210) arg) (Lambda_0123456789876543210Sym2 f0123456789876543210 arg) =>
-                                                       Lambda_0123456789876543210Sym1 f0123456789876543210 g0123456789876543210
-    type instance Apply (Lambda_0123456789876543210Sym1 f0123456789876543210) g0123456789876543210 = Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210
-    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
-    data Lambda_0123456789876543210Sym0 f0123456789876543210
-      where
-        Lambda_0123456789876543210Sym0KindInference :: forall f0123456789876543210
-                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
-                                                       Lambda_0123456789876543210Sym0 f0123456789876543210
-    type instance Apply Lambda_0123456789876543210Sym0 f0123456789876543210 = Lambda_0123456789876543210Sym1 f0123456789876543210
-    type family TFHelper_0123456789876543210 (a :: (~>) a b) (a :: (~>) a b) :: (~>) a b where
-      TFHelper_0123456789876543210 f g = Apply (Apply Lambda_0123456789876543210Sym0 f) g
-    type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) =
-        TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ())
-    data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)
-      where
-        TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                a0123456789876543210
-                                                                arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                         TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ())
-    data TFHelper_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                    b0123456789876543210.
-                                             (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210))
-      where
-        TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) =>
-                                                         TFHelper_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210
-    instance PS ((~>) a b) where
-      type (<<>>) a a = Apply (Apply TFHelper_0123456789876543210Sym0 a) a
-    class SS a where
-      (%<<>>) ::
-        forall (t :: a) (t :: a).
-        Sing t -> Sing t -> Sing (Apply (Apply (<<>>@#@$) t) t :: a)
-    instance SS b => SS ((~>) a b) where
-      (%<<>>) ::
-        forall (t :: (~>) a b) (t :: (~>) a b).
-        Sing t -> Sing t -> Sing (Apply (Apply (<<>>@#@$) t) t :: (~>) a b)
-      (%<<>>) (sF :: Sing f) (sG :: Sing g)
-        = (singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 f) g))
-            (\ sX
-               -> case sX of {
-                    (_ :: 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) =>
-             SingI ((<<>>@#@$$) (d :: a) :: (~>) a a) where
-      sing = (singFun1 @((<<>>@#@$$) (d :: a))) ((%<<>>) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T287.ghc88.template b/tests/compile-and-dump/Singletons/T287.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T287.ghc88.template
@@ -0,0 +1,116 @@
+Singletons/T287.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| class S a where
+            (<<>>) :: a -> a -> a
+          
+          instance S b => S (a -> b) where
+            f <<>> g = \ x -> f x <<>> g x |]
+  ======>
+    class S a where
+      (<<>>) :: a -> a -> a
+    instance S b => S (a -> b) where
+      (<<>>) f g = \ x -> (f x <<>> g x)
+    type (<<>>@#@$$$) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) =
+        (<<>>) arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings ((<<>>@#@$$) arg0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (:<<>>@#@$$###)) ())
+    data (<<>>@#@$$) (arg0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 a0123456789876543210
+      where
+        (:<<>>@#@$$###) :: forall arg0123456789876543210
+                                  arg0123456789876543210
+                                  arg. SameKind (Apply ((<<>>@#@$$) arg0123456789876543210) arg) ((<<>>@#@$$$) arg0123456789876543210 arg) =>
+                           (<<>>@#@$$) arg0123456789876543210 arg0123456789876543210
+    type instance Apply ((<<>>@#@$$) arg0123456789876543210) arg0123456789876543210 = (<<>>) arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings (<<>>@#@$) where
+      suppressUnusedWarnings = snd (((,) (:<<>>@#@$###)) ())
+    data (<<>>@#@$) :: forall a0123456789876543210.
+                       (~>) a0123456789876543210 ((~>) a0123456789876543210 a0123456789876543210)
+      where
+        (:<<>>@#@$###) :: forall arg0123456789876543210
+                                 arg. SameKind (Apply (<<>>@#@$) arg) ((<<>>@#@$$) arg) =>
+                          (<<>>@#@$) arg0123456789876543210
+    type instance Apply (<<>>@#@$) arg0123456789876543210 = (<<>>@#@$$) arg0123456789876543210
+    class PS (a :: GHC.Types.Type) where
+      type (<<>>) (arg :: a) (arg :: a) :: a
+    type family Lambda_0123456789876543210 f g t where
+      Lambda_0123456789876543210 f g x = Apply (Apply (<<>>@#@$) (Apply f x)) (Apply g x)
+    type Lambda_0123456789876543210Sym3 f0123456789876543210 g0123456789876543210 t0123456789876543210 =
+        Lambda_0123456789876543210 f0123456789876543210 g0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 g0123456789876543210 f0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym2KindInference) ())
+    data Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210 t0123456789876543210
+      where
+        Lambda_0123456789876543210Sym2KindInference :: forall f0123456789876543210
+                                                              g0123456789876543210
+                                                              t0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210) arg) (Lambda_0123456789876543210Sym3 f0123456789876543210 g0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210 t0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym2 g0123456789876543210 f0123456789876543210) t0123456789876543210 = Lambda_0123456789876543210 g0123456789876543210 f0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 f0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym1KindInference) ())
+    data Lambda_0123456789876543210Sym1 f0123456789876543210 g0123456789876543210
+      where
+        Lambda_0123456789876543210Sym1KindInference :: forall f0123456789876543210
+                                                              g0123456789876543210
+                                                              arg. SameKind (Apply (Lambda_0123456789876543210Sym1 f0123456789876543210) arg) (Lambda_0123456789876543210Sym2 f0123456789876543210 arg) =>
+                                                       Lambda_0123456789876543210Sym1 f0123456789876543210 g0123456789876543210
+    type instance Apply (Lambda_0123456789876543210Sym1 f0123456789876543210) g0123456789876543210 = Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210
+    instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Lambda_0123456789876543210Sym0KindInference) ())
+    data Lambda_0123456789876543210Sym0 f0123456789876543210
+      where
+        Lambda_0123456789876543210Sym0KindInference :: forall f0123456789876543210
+                                                              arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) =>
+                                                       Lambda_0123456789876543210Sym0 f0123456789876543210
+    type instance Apply Lambda_0123456789876543210Sym0 f0123456789876543210 = Lambda_0123456789876543210Sym1 f0123456789876543210
+    type family TFHelper_0123456789876543210 (a :: (~>) a b) (a :: (~>) a b) :: (~>) a b where
+      TFHelper_0123456789876543210 f g = Apply (Apply Lambda_0123456789876543210Sym0 f) g
+    type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) =
+        TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ())
+    data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)
+      where
+        TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                a0123456789876543210
+                                                                arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                         TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ())
+    data TFHelper_0123456789876543210Sym0 :: forall a0123456789876543210
+                                                    b0123456789876543210.
+                                             (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210))
+      where
+        TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) =>
+                                                         TFHelper_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210
+    instance PS ((~>) a b) where
+      type (<<>>) a a = Apply (Apply TFHelper_0123456789876543210Sym0 a) a
+    class SS a where
+      (%<<>>) ::
+        forall (t :: a) (t :: a).
+        Sing t -> Sing t -> Sing (Apply (Apply (<<>>@#@$) t) t :: a)
+    instance SS b => SS ((~>) a b) where
+      (%<<>>) ::
+        forall (t :: (~>) a b) (t :: (~>) a b).
+        Sing t -> Sing t -> Sing (Apply (Apply (<<>>@#@$) t) t :: (~>) a b)
+      (%<<>>) (sF :: Sing f) (sG :: Sing g)
+        = (singFun1 @(Apply (Apply Lambda_0123456789876543210Sym0 f) g))
+            (\ sX
+               -> case sX of {
+                    (_ :: 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) =>
+             SingI ((<<>>@#@$$) (d :: a) :: (~>) a a) where
+      sing = (singFun1 @((<<>>@#@$$) (d :: a))) ((%<<>>) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T29.ghc86.template b/tests/compile-and-dump/Singletons/T29.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T29.ghc86.template
+++ /dev/null
@@ -1,115 +0,0 @@
-Singletons/T29.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| foo :: Bool -> Bool
-          foo x = not $ x
-          bar :: Bool -> Bool
-          bar x = not . not . not $ x
-          baz :: Bool -> Bool
-          baz x = not $! x
-          ban :: Bool -> Bool
-          ban x = not . not . not $! x |]
-  ======>
-    foo :: Bool -> Bool
-    foo x = (not $ x)
-    bar :: Bool -> Bool
-    bar x = ((not . (not . not)) $ x)
-    baz :: Bool -> Bool
-    baz x = (not $! x)
-    ban :: Bool -> Bool
-    ban x = ((not . (not . not)) $! x)
-    type BanSym1 (a0123456789876543210 :: Bool) =
-        Ban a0123456789876543210
-    instance SuppressUnusedWarnings BanSym0 where
-      suppressUnusedWarnings = snd (((,) BanSym0KindInference) ())
-    data BanSym0 :: (~>) Bool Bool
-      where
-        BanSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply BanSym0 arg) (BanSym1 arg) =>
-                                BanSym0 a0123456789876543210
-    type instance Apply BanSym0 a0123456789876543210 = Ban a0123456789876543210
-    type BazSym1 (a0123456789876543210 :: Bool) =
-        Baz a0123456789876543210
-    instance SuppressUnusedWarnings BazSym0 where
-      suppressUnusedWarnings = snd (((,) BazSym0KindInference) ())
-    data BazSym0 :: (~>) Bool Bool
-      where
-        BazSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply BazSym0 arg) (BazSym1 arg) =>
-                                BazSym0 a0123456789876543210
-    type instance Apply BazSym0 a0123456789876543210 = Baz a0123456789876543210
-    type BarSym1 (a0123456789876543210 :: Bool) =
-        Bar a0123456789876543210
-    instance SuppressUnusedWarnings BarSym0 where
-      suppressUnusedWarnings = snd (((,) BarSym0KindInference) ())
-    data BarSym0 :: (~>) Bool Bool
-      where
-        BarSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
-                                BarSym0 a0123456789876543210
-    type instance Apply BarSym0 a0123456789876543210 = Bar a0123456789876543210
-    type FooSym1 (a0123456789876543210 :: Bool) =
-        Foo a0123456789876543210
-    instance SuppressUnusedWarnings FooSym0 where
-      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
-    data FooSym0 :: (~>) Bool Bool
-      where
-        FooSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
-                                FooSym0 a0123456789876543210
-    type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
-    type family Ban (a :: Bool) :: Bool where
-      Ban x = Apply (Apply ($!@#@$) (Apply (Apply (.@#@$) NotSym0) (Apply (Apply (.@#@$) NotSym0) NotSym0))) x
-    type family Baz (a :: Bool) :: Bool where
-      Baz x = Apply (Apply ($!@#@$) NotSym0) x
-    type family Bar (a :: Bool) :: Bool where
-      Bar x = Apply (Apply ($@#@$) (Apply (Apply (.@#@$) NotSym0) (Apply (Apply (.@#@$) NotSym0) NotSym0))) x
-    type family Foo (a :: Bool) :: Bool where
-      Foo x = Apply (Apply ($@#@$) NotSym0) x
-    sBan ::
-      forall (t :: Bool). Sing t -> Sing (Apply BanSym0 t :: Bool)
-    sBaz ::
-      forall (t :: Bool). Sing t -> Sing (Apply BazSym0 t :: Bool)
-    sBar ::
-      forall (t :: Bool). Sing t -> Sing (Apply BarSym0 t :: Bool)
-    sFoo ::
-      forall (t :: Bool). Sing t -> Sing (Apply FooSym0 t :: Bool)
-    sBan (sX :: Sing x)
-      = (applySing
-           ((applySing ((singFun2 @($!@#@$)) (%$!)))
-              ((applySing
-                  ((applySing ((singFun3 @(.@#@$)) (%.)))
-                     ((singFun1 @NotSym0) sNot)))
-                 ((applySing
-                     ((applySing ((singFun3 @(.@#@$)) (%.)))
-                        ((singFun1 @NotSym0) sNot)))
-                    ((singFun1 @NotSym0) sNot)))))
-          sX
-    sBaz (sX :: Sing x)
-      = (applySing
-           ((applySing ((singFun2 @($!@#@$)) (%$!)))
-              ((singFun1 @NotSym0) sNot)))
-          sX
-    sBar (sX :: Sing x)
-      = (applySing
-           ((applySing ((singFun2 @($@#@$)) (%$)))
-              ((applySing
-                  ((applySing ((singFun3 @(.@#@$)) (%.)))
-                     ((singFun1 @NotSym0) sNot)))
-                 ((applySing
-                     ((applySing ((singFun3 @(.@#@$)) (%.)))
-                        ((singFun1 @NotSym0) sNot)))
-                    ((singFun1 @NotSym0) sNot)))))
-          sX
-    sFoo (sX :: Sing x)
-      = (applySing
-           ((applySing ((singFun2 @($@#@$)) (%$)))
-              ((singFun1 @NotSym0) sNot)))
-          sX
-    instance SingI (BanSym0 :: (~>) Bool Bool) where
-      sing = (singFun1 @BanSym0) sBan
-    instance SingI (BazSym0 :: (~>) Bool Bool) where
-      sing = (singFun1 @BazSym0) sBaz
-    instance SingI (BarSym0 :: (~>) Bool Bool) where
-      sing = (singFun1 @BarSym0) sBar
-    instance SingI (FooSym0 :: (~>) Bool Bool) where
-      sing = (singFun1 @FooSym0) sFoo
diff --git a/tests/compile-and-dump/Singletons/T29.ghc88.template b/tests/compile-and-dump/Singletons/T29.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T29.ghc88.template
@@ -0,0 +1,115 @@
+Singletons/T29.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| foo :: Bool -> Bool
+          foo x = not $ x
+          bar :: Bool -> Bool
+          bar x = not . not . not $ x
+          baz :: Bool -> Bool
+          baz x = not $! x
+          ban :: Bool -> Bool
+          ban x = not . not . not $! x |]
+  ======>
+    foo :: Bool -> Bool
+    foo x = (not $ x)
+    bar :: Bool -> Bool
+    bar x = ((not . (not . not)) $ x)
+    baz :: Bool -> Bool
+    baz x = (not $! x)
+    ban :: Bool -> Bool
+    ban x = ((not . (not . not)) $! x)
+    type BanSym1 (a0123456789876543210 :: Bool) =
+        Ban a0123456789876543210
+    instance SuppressUnusedWarnings BanSym0 where
+      suppressUnusedWarnings = snd (((,) BanSym0KindInference) ())
+    data BanSym0 :: (~>) Bool Bool
+      where
+        BanSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply BanSym0 arg) (BanSym1 arg) =>
+                                BanSym0 a0123456789876543210
+    type instance Apply BanSym0 a0123456789876543210 = Ban a0123456789876543210
+    type BazSym1 (a0123456789876543210 :: Bool) =
+        Baz a0123456789876543210
+    instance SuppressUnusedWarnings BazSym0 where
+      suppressUnusedWarnings = snd (((,) BazSym0KindInference) ())
+    data BazSym0 :: (~>) Bool Bool
+      where
+        BazSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply BazSym0 arg) (BazSym1 arg) =>
+                                BazSym0 a0123456789876543210
+    type instance Apply BazSym0 a0123456789876543210 = Baz a0123456789876543210
+    type BarSym1 (a0123456789876543210 :: Bool) =
+        Bar a0123456789876543210
+    instance SuppressUnusedWarnings BarSym0 where
+      suppressUnusedWarnings = snd (((,) BarSym0KindInference) ())
+    data BarSym0 :: (~>) Bool Bool
+      where
+        BarSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
+                                BarSym0 a0123456789876543210
+    type instance Apply BarSym0 a0123456789876543210 = Bar a0123456789876543210
+    type FooSym1 (a0123456789876543210 :: Bool) =
+        Foo a0123456789876543210
+    instance SuppressUnusedWarnings FooSym0 where
+      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
+    data FooSym0 :: (~>) Bool Bool
+      where
+        FooSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
+                                FooSym0 a0123456789876543210
+    type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
+    type family Ban (a :: Bool) :: Bool where
+      Ban x = Apply (Apply ($!@#@$) (Apply (Apply (.@#@$) NotSym0) (Apply (Apply (.@#@$) NotSym0) NotSym0))) x
+    type family Baz (a :: Bool) :: Bool where
+      Baz x = Apply (Apply ($!@#@$) NotSym0) x
+    type family Bar (a :: Bool) :: Bool where
+      Bar x = Apply (Apply ($@#@$) (Apply (Apply (.@#@$) NotSym0) (Apply (Apply (.@#@$) NotSym0) NotSym0))) x
+    type family Foo (a :: Bool) :: Bool where
+      Foo x = Apply (Apply ($@#@$) NotSym0) x
+    sBan ::
+      forall (t :: Bool). Sing t -> Sing (Apply BanSym0 t :: Bool)
+    sBaz ::
+      forall (t :: Bool). Sing t -> Sing (Apply BazSym0 t :: Bool)
+    sBar ::
+      forall (t :: Bool). Sing t -> Sing (Apply BarSym0 t :: Bool)
+    sFoo ::
+      forall (t :: Bool). Sing t -> Sing (Apply FooSym0 t :: Bool)
+    sBan (sX :: Sing x)
+      = (applySing
+           ((applySing ((singFun2 @($!@#@$)) (%$!)))
+              ((applySing
+                  ((applySing ((singFun3 @(.@#@$)) (%.)))
+                     ((singFun1 @NotSym0) sNot)))
+                 ((applySing
+                     ((applySing ((singFun3 @(.@#@$)) (%.)))
+                        ((singFun1 @NotSym0) sNot)))
+                    ((singFun1 @NotSym0) sNot)))))
+          sX
+    sBaz (sX :: Sing x)
+      = (applySing
+           ((applySing ((singFun2 @($!@#@$)) (%$!)))
+              ((singFun1 @NotSym0) sNot)))
+          sX
+    sBar (sX :: Sing x)
+      = (applySing
+           ((applySing ((singFun2 @($@#@$)) (%$)))
+              ((applySing
+                  ((applySing ((singFun3 @(.@#@$)) (%.)))
+                     ((singFun1 @NotSym0) sNot)))
+                 ((applySing
+                     ((applySing ((singFun3 @(.@#@$)) (%.)))
+                        ((singFun1 @NotSym0) sNot)))
+                    ((singFun1 @NotSym0) sNot)))))
+          sX
+    sFoo (sX :: Sing x)
+      = (applySing
+           ((applySing ((singFun2 @($@#@$)) (%$)))
+              ((singFun1 @NotSym0) sNot)))
+          sX
+    instance SingI (BanSym0 :: (~>) Bool Bool) where
+      sing = (singFun1 @BanSym0) sBan
+    instance SingI (BazSym0 :: (~>) Bool Bool) where
+      sing = (singFun1 @BazSym0) sBaz
+    instance SingI (BarSym0 :: (~>) Bool Bool) where
+      sing = (singFun1 @BarSym0) sBar
+    instance SingI (FooSym0 :: (~>) Bool Bool) where
+      sing = (singFun1 @FooSym0) sFoo
diff --git a/tests/compile-and-dump/Singletons/T297.ghc86.template b/tests/compile-and-dump/Singletons/T297.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T297.ghc86.template
+++ /dev/null
@@ -1,59 +0,0 @@
-Singletons/T297.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| f MyProxy
-            = let
-                x = let
-                      z :: MyProxy a
-                      z = MyProxy
-                    in z
-              in x
-          
-          data MyProxy (a :: Type) = MyProxy |]
-  ======>
-    data MyProxy (a :: Type) = MyProxy
-    f MyProxy
-      = let
-          x = let
-                z :: MyProxy a
-                z = MyProxy
-              in z
-        in x
-    type MyProxySym0 = MyProxy
-    type Let0123456789876543210ZSym0 = Let0123456789876543210Z
-    type family Let0123456789876543210Z :: MyProxy a where
-      Let0123456789876543210Z = MyProxySym0
-    type Let0123456789876543210XSym0 = Let0123456789876543210X
-    type family Let0123456789876543210X where
-      Let0123456789876543210X = Let0123456789876543210ZSym0
-    type FSym1 a0123456789876543210 = F a0123456789876543210
-    instance SuppressUnusedWarnings FSym0 where
-      suppressUnusedWarnings = snd (((,) FSym0KindInference) ())
-    data FSym0 a0123456789876543210
-      where
-        FSym0KindInference :: forall a0123456789876543210
-                                     arg. SameKind (Apply FSym0 arg) (FSym1 arg) =>
-                              FSym0 a0123456789876543210
-    type instance Apply FSym0 a0123456789876543210 = F a0123456789876543210
-    type family F a where
-      F MyProxy = Let0123456789876543210XSym0
-    sF :: forall arg. Sing arg -> Sing (Apply FSym0 arg)
-    sF SMyProxy
-      = let
-          sX :: Sing Let0123456789876543210XSym0
-          sX
-            = let
-                sZ :: forall a. Sing (Let0123456789876543210ZSym0 :: MyProxy a)
-                sZ = SMyProxy
-              in sZ
-        in sX
-    instance SingI FSym0 where
-      sing = (singFun1 @FSym0) sF
-    data instance Sing :: MyProxy a -> Type
-      where SMyProxy :: Sing MyProxy
-    type SMyProxy = (Sing :: MyProxy a -> Type)
-    instance SingKind a => SingKind (MyProxy a) where
-      type Demote (MyProxy a) = MyProxy (Demote a)
-      fromSing SMyProxy = MyProxy
-      toSing MyProxy = SomeSing SMyProxy
-    instance SingI MyProxy where
-      sing = SMyProxy
diff --git a/tests/compile-and-dump/Singletons/T297.ghc88.template b/tests/compile-and-dump/Singletons/T297.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T297.ghc88.template
@@ -0,0 +1,59 @@
+Singletons/T297.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| f MyProxy
+            = let
+                x = let
+                      z :: MyProxy a
+                      z = MyProxy
+                    in z
+              in x
+          
+          data MyProxy (a :: Type) = MyProxy |]
+  ======>
+    data MyProxy (a :: Type) = MyProxy
+    f MyProxy
+      = let
+          x = let
+                z :: MyProxy a
+                z = MyProxy
+              in z
+        in x
+    type MyProxySym0 = MyProxy
+    type Let0123456789876543210ZSym0 = Let0123456789876543210Z
+    type family Let0123456789876543210Z :: MyProxy a where
+      Let0123456789876543210Z = MyProxySym0
+    type Let0123456789876543210XSym0 = Let0123456789876543210X
+    type family Let0123456789876543210X where
+      Let0123456789876543210X = Let0123456789876543210ZSym0
+    type FSym1 a0123456789876543210 = F a0123456789876543210
+    instance SuppressUnusedWarnings FSym0 where
+      suppressUnusedWarnings = snd (((,) FSym0KindInference) ())
+    data FSym0 a0123456789876543210
+      where
+        FSym0KindInference :: forall a0123456789876543210
+                                     arg. SameKind (Apply FSym0 arg) (FSym1 arg) =>
+                              FSym0 a0123456789876543210
+    type instance Apply FSym0 a0123456789876543210 = F a0123456789876543210
+    type family F a where
+      F MyProxy = Let0123456789876543210XSym0
+    sF :: forall arg. Sing arg -> Sing (Apply FSym0 arg)
+    sF SMyProxy
+      = let
+          sX :: Sing Let0123456789876543210XSym0
+          sX
+            = let
+                sZ :: forall a. Sing (Let0123456789876543210ZSym0 :: MyProxy a)
+                sZ = SMyProxy
+              in sZ
+        in sX
+    instance SingI FSym0 where
+      sing = (singFun1 @FSym0) sF
+    data SMyProxy :: forall a. MyProxy a -> Type
+      where SMyProxy :: SMyProxy MyProxy
+    type instance Sing @(MyProxy a) = SMyProxy
+    instance SingKind a => SingKind (MyProxy a) where
+      type Demote (MyProxy a) = MyProxy (Demote a)
+      fromSing SMyProxy = MyProxy
+      toSing MyProxy = SomeSing SMyProxy
+    instance SingI MyProxy where
+      sing = SMyProxy
diff --git a/tests/compile-and-dump/Singletons/T312.ghc86.template b/tests/compile-and-dump/Singletons/T312.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T312.ghc86.template
+++ /dev/null
@@ -1,215 +0,0 @@
-Singletons/T312.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| class Foo a where
-            bar :: a -> b -> b
-            bar _ x = x
-            baz :: forall b. a -> b -> b
-            baz
-              = h
-              where
-                  h :: forall c. c -> b -> b
-                  h _ x = x |]
-  ======>
-    class Foo a where
-      bar :: a -> b -> b
-      baz :: forall b. a -> b -> b
-      bar _ x = x
-      baz
-        = h
-        where
-            h :: forall c. c -> b -> b
-            h _ x = x
-    type BarSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: b0123456789876543210) =
-        Bar arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings (BarSym1 arg0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) BarSym1KindInference) ())
-    data BarSym1 (arg0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                     (~>) b0123456789876543210 b0123456789876543210
-      where
-        BarSym1KindInference :: forall arg0123456789876543210
-                                       arg0123456789876543210
-                                       arg. SameKind (Apply (BarSym1 arg0123456789876543210) arg) (BarSym2 arg0123456789876543210 arg) =>
-                                BarSym1 arg0123456789876543210 arg0123456789876543210
-    type instance Apply (BarSym1 arg0123456789876543210) arg0123456789876543210 = Bar arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings BarSym0 where
-      suppressUnusedWarnings = snd (((,) BarSym0KindInference) ())
-    data BarSym0 :: forall a0123456789876543210 b0123456789876543210.
-                    (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
-      where
-        BarSym0KindInference :: forall arg0123456789876543210
-                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
-                                BarSym0 arg0123456789876543210
-    type instance Apply BarSym0 arg0123456789876543210 = BarSym1 arg0123456789876543210
-    type BazSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: b0123456789876543210) =
-        Baz arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings (BazSym1 arg0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) BazSym1KindInference) ())
-    data BazSym1 (arg0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                     (~>) b0123456789876543210 b0123456789876543210
-      where
-        BazSym1KindInference :: forall arg0123456789876543210
-                                       arg0123456789876543210
-                                       arg. SameKind (Apply (BazSym1 arg0123456789876543210) arg) (BazSym2 arg0123456789876543210 arg) =>
-                                BazSym1 arg0123456789876543210 arg0123456789876543210
-    type instance Apply (BazSym1 arg0123456789876543210) arg0123456789876543210 = Baz arg0123456789876543210 arg0123456789876543210
-    instance SuppressUnusedWarnings BazSym0 where
-      suppressUnusedWarnings = snd (((,) BazSym0KindInference) ())
-    data BazSym0 :: forall a0123456789876543210 b0123456789876543210.
-                    (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
-      where
-        BazSym0KindInference :: forall arg0123456789876543210
-                                       arg. SameKind (Apply BazSym0 arg) (BazSym1 arg) =>
-                                BazSym0 arg0123456789876543210
-    type instance Apply BazSym0 arg0123456789876543210 = BazSym1 arg0123456789876543210
-    type family Bar_0123456789876543210 (a :: a) (a :: b) :: b where
-      Bar_0123456789876543210 _ x = x
-    type Bar_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
-        Bar_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Bar_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Bar_0123456789876543210Sym1KindInference) ())
-    data Bar_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                                       (~>) b0123456789876543210 b0123456789876543210
-      where
-        Bar_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                           a0123456789876543210
-                                                           arg. SameKind (Apply (Bar_0123456789876543210Sym1 a0123456789876543210) arg) (Bar_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                    Bar_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Bar_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Bar_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Bar_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Bar_0123456789876543210Sym0KindInference) ())
-    data Bar_0123456789876543210Sym0 :: forall a0123456789876543210
-                                               b0123456789876543210.
-                                        (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
-      where
-        Bar_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                           arg. SameKind (Apply Bar_0123456789876543210Sym0 arg) (Bar_0123456789876543210Sym1 arg) =>
-                                                    Bar_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Bar_0123456789876543210Sym0 a0123456789876543210 = Bar_0123456789876543210Sym1 a0123456789876543210
-    type Let0123456789876543210HSym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 (a0123456789876543210 :: c0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
-        Let0123456789876543210H a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210HSym3 a0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210HSym3KindInference) ())
-    data Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 (a0123456789876543210 :: c0123456789876543210) :: forall b0123456789876543210.
-                                                                                                                                                                         (~>) b0123456789876543210 b0123456789876543210
-      where
-        Let0123456789876543210HSym3KindInference :: forall a_01234567898765432100123456789876543210
-                                                           a_01234567898765432100123456789876543210
-                                                           a0123456789876543210
-                                                           a0123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210) arg) (Let0123456789876543210HSym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210 arg) =>
-                                                    Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (Let0123456789876543210HSym3 a0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a0123456789876543210 = Let0123456789876543210H a0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210HSym2KindInference) ())
-    data Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 :: forall b0123456789876543210
-                                                                                                                                 c0123456789876543210.
-                                                                                                                          (~>) c0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
-      where
-        Let0123456789876543210HSym2KindInference :: forall a_01234567898765432100123456789876543210
-                                                           a_01234567898765432100123456789876543210
-                                                           a0123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
-                                                    Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210
-    type instance Apply (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a0123456789876543210 = Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Let0123456789876543210HSym1 a_01234567898765432100123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210HSym1KindInference) ())
-    data Let0123456789876543210HSym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-      where
-        Let0123456789876543210HSym1KindInference :: forall a_01234567898765432100123456789876543210
-                                                           a_01234567898765432100123456789876543210
-                                                           arg. SameKind (Apply (Let0123456789876543210HSym1 a_01234567898765432100123456789876543210) arg) (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 arg) =>
-                                                    Let0123456789876543210HSym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    type instance Apply (Let0123456789876543210HSym1 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210HSym0 where
-      suppressUnusedWarnings
-        = snd (((,) Let0123456789876543210HSym0KindInference) ())
-    data Let0123456789876543210HSym0 a_01234567898765432100123456789876543210
-      where
-        Let0123456789876543210HSym0KindInference :: forall a_01234567898765432100123456789876543210
-                                                           arg. SameKind (Apply Let0123456789876543210HSym0 arg) (Let0123456789876543210HSym1 arg) =>
-                                                    Let0123456789876543210HSym0 a_01234567898765432100123456789876543210
-    type instance Apply Let0123456789876543210HSym0 a_01234567898765432100123456789876543210 = Let0123456789876543210HSym1 a_01234567898765432100123456789876543210
-    type family Let0123456789876543210H a_0123456789876543210 a_0123456789876543210 (a :: c) (a :: b) :: b where
-      Let0123456789876543210H a_0123456789876543210 a_0123456789876543210 _ x = x
-    type family Baz_0123456789876543210 (a :: a) (a :: b) :: b where
-      Baz_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply (Let0123456789876543210HSym2 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210) a_0123456789876543210
-    type Baz_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
-        Baz_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (Baz_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) Baz_0123456789876543210Sym1KindInference) ())
-    data Baz_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
-                                                                                       (~>) b0123456789876543210 b0123456789876543210
-      where
-        Baz_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                           a0123456789876543210
-                                                           arg. SameKind (Apply (Baz_0123456789876543210Sym1 a0123456789876543210) arg) (Baz_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                    Baz_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (Baz_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Baz_0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Baz_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Baz_0123456789876543210Sym0KindInference) ())
-    data Baz_0123456789876543210Sym0 :: forall a0123456789876543210
-                                               b0123456789876543210.
-                                        (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
-      where
-        Baz_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                           arg. SameKind (Apply Baz_0123456789876543210Sym0 arg) (Baz_0123456789876543210Sym1 arg) =>
-                                                    Baz_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Baz_0123456789876543210Sym0 a0123456789876543210 = Baz_0123456789876543210Sym1 a0123456789876543210
-    class PFoo (a :: GHC.Types.Type) where
-      type Bar (arg :: a) (arg :: b) :: b
-      type Baz (arg :: a) (arg :: b) :: b
-      type Bar a a = Apply (Apply Bar_0123456789876543210Sym0 a) a
-      type Baz a a = Apply (Apply Baz_0123456789876543210Sym0 a) a
-    class SFoo a where
-      sBar ::
-        forall b (t :: a) (t :: b).
-        Sing t -> Sing t -> Sing (Apply (Apply BarSym0 t) t :: b)
-      sBaz ::
-        forall b (t :: a) (t :: b).
-        Sing t -> Sing t -> Sing (Apply (Apply BazSym0 t) t :: b)
-      default sBar ::
-                forall b (t :: a) (t :: b).
-                (Apply (Apply BarSym0 t) t :: b)
-                ~ Apply (Apply Bar_0123456789876543210Sym0 t) t =>
-                Sing t -> Sing t -> Sing (Apply (Apply BarSym0 t) t :: b)
-      default sBaz ::
-                forall b (t :: a) (t :: b).
-                (Apply (Apply BazSym0 t) t :: b)
-                ~ Apply (Apply Baz_0123456789876543210Sym0 t) t =>
-                Sing t -> Sing t -> Sing (Apply (Apply BazSym0 t) t :: b)
-      sBar _ (sX :: Sing x) = sX
-      sBaz
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 (let
-                    sH ::
-                      forall c (t :: c) (t :: b).
-                      Sing t
-                      -> Sing t
-                         -> Sing (Apply (Apply (Let0123456789876543210HSym2 a_0123456789876543210 a_0123456789876543210) t) t :: b)
-                    sH _ (sX :: Sing x) = sX
-                  in
-                    (singFun2
-                       @(Let0123456789876543210HSym2 a_0123456789876543210 a_0123456789876543210))
-                      sH))
-                sA_0123456789876543210))
-            sA_0123456789876543210
-    instance SFoo a => SingI (BarSym0 :: (~>) a ((~>) b b)) where
-      sing = (singFun2 @BarSym0) sBar
-    instance (SFoo a, SingI d) =>
-             SingI (BarSym1 (d :: a) :: (~>) b b) where
-      sing = (singFun1 @(BarSym1 (d :: a))) (sBar (sing @d))
-    instance SFoo a => SingI (BazSym0 :: (~>) a ((~>) b b)) where
-      sing = (singFun2 @BazSym0) sBaz
-    instance (SFoo a, SingI d) =>
-             SingI (BazSym1 (d :: a) :: (~>) b b) where
-      sing = (singFun1 @(BazSym1 (d :: a))) (sBaz (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T312.ghc88.template b/tests/compile-and-dump/Singletons/T312.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T312.ghc88.template
@@ -0,0 +1,215 @@
+Singletons/T312.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| class Foo a where
+            bar :: a -> b -> b
+            bar _ x = x
+            baz :: forall b. a -> b -> b
+            baz
+              = h
+              where
+                  h :: forall c. c -> b -> b
+                  h _ x = x |]
+  ======>
+    class Foo a where
+      bar :: a -> b -> b
+      baz :: forall b. a -> b -> b
+      bar _ x = x
+      baz
+        = h
+        where
+            h :: forall c. c -> b -> b
+            h _ x = x
+    type BarSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: b0123456789876543210) =
+        Bar arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings (BarSym1 arg0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) BarSym1KindInference) ())
+    data BarSym1 (arg0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                     (~>) b0123456789876543210 b0123456789876543210
+      where
+        BarSym1KindInference :: forall arg0123456789876543210
+                                       arg0123456789876543210
+                                       arg. SameKind (Apply (BarSym1 arg0123456789876543210) arg) (BarSym2 arg0123456789876543210 arg) =>
+                                BarSym1 arg0123456789876543210 arg0123456789876543210
+    type instance Apply (BarSym1 arg0123456789876543210) arg0123456789876543210 = Bar arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings BarSym0 where
+      suppressUnusedWarnings = snd (((,) BarSym0KindInference) ())
+    data BarSym0 :: forall a0123456789876543210 b0123456789876543210.
+                    (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
+      where
+        BarSym0KindInference :: forall arg0123456789876543210
+                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
+                                BarSym0 arg0123456789876543210
+    type instance Apply BarSym0 arg0123456789876543210 = BarSym1 arg0123456789876543210
+    type BazSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: b0123456789876543210) =
+        Baz arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings (BazSym1 arg0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) BazSym1KindInference) ())
+    data BazSym1 (arg0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                     (~>) b0123456789876543210 b0123456789876543210
+      where
+        BazSym1KindInference :: forall arg0123456789876543210
+                                       arg0123456789876543210
+                                       arg. SameKind (Apply (BazSym1 arg0123456789876543210) arg) (BazSym2 arg0123456789876543210 arg) =>
+                                BazSym1 arg0123456789876543210 arg0123456789876543210
+    type instance Apply (BazSym1 arg0123456789876543210) arg0123456789876543210 = Baz arg0123456789876543210 arg0123456789876543210
+    instance SuppressUnusedWarnings BazSym0 where
+      suppressUnusedWarnings = snd (((,) BazSym0KindInference) ())
+    data BazSym0 :: forall a0123456789876543210 b0123456789876543210.
+                    (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
+      where
+        BazSym0KindInference :: forall arg0123456789876543210
+                                       arg. SameKind (Apply BazSym0 arg) (BazSym1 arg) =>
+                                BazSym0 arg0123456789876543210
+    type instance Apply BazSym0 arg0123456789876543210 = BazSym1 arg0123456789876543210
+    type family Bar_0123456789876543210 (a :: a) (a :: b) :: b where
+      Bar_0123456789876543210 _ x = x
+    type Bar_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
+        Bar_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Bar_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Bar_0123456789876543210Sym1KindInference) ())
+    data Bar_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                                       (~>) b0123456789876543210 b0123456789876543210
+      where
+        Bar_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                           a0123456789876543210
+                                                           arg. SameKind (Apply (Bar_0123456789876543210Sym1 a0123456789876543210) arg) (Bar_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                    Bar_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Bar_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Bar_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Bar_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Bar_0123456789876543210Sym0KindInference) ())
+    data Bar_0123456789876543210Sym0 :: forall a0123456789876543210
+                                               b0123456789876543210.
+                                        (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
+      where
+        Bar_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                           arg. SameKind (Apply Bar_0123456789876543210Sym0 arg) (Bar_0123456789876543210Sym1 arg) =>
+                                                    Bar_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Bar_0123456789876543210Sym0 a0123456789876543210 = Bar_0123456789876543210Sym1 a0123456789876543210
+    type Let0123456789876543210HSym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 (a0123456789876543210 :: c0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
+        Let0123456789876543210H a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210HSym3 a0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210HSym3KindInference) ())
+    data Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 (a0123456789876543210 :: c0123456789876543210) :: forall b0123456789876543210.
+                                                                                                                                                                         (~>) b0123456789876543210 b0123456789876543210
+      where
+        Let0123456789876543210HSym3KindInference :: forall a_01234567898765432100123456789876543210
+                                                           a_01234567898765432100123456789876543210
+                                                           a0123456789876543210
+                                                           a0123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210) arg) (Let0123456789876543210HSym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210 arg) =>
+                                                    Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (Let0123456789876543210HSym3 a0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a0123456789876543210 = Let0123456789876543210H a0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210HSym2KindInference) ())
+    data Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 :: forall c0123456789876543210
+                                                                                                                                 b0123456789876543210.
+                                                                                                                          (~>) c0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
+      where
+        Let0123456789876543210HSym2KindInference :: forall a_01234567898765432100123456789876543210
+                                                           a_01234567898765432100123456789876543210
+                                                           a0123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) =>
+                                                    Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210
+    type instance Apply (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a0123456789876543210 = Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Let0123456789876543210HSym1 a_01234567898765432100123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210HSym1KindInference) ())
+    data Let0123456789876543210HSym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+      where
+        Let0123456789876543210HSym1KindInference :: forall a_01234567898765432100123456789876543210
+                                                           a_01234567898765432100123456789876543210
+                                                           arg. SameKind (Apply (Let0123456789876543210HSym1 a_01234567898765432100123456789876543210) arg) (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 arg) =>
+                                                    Let0123456789876543210HSym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    type instance Apply (Let0123456789876543210HSym1 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210HSym0 where
+      suppressUnusedWarnings
+        = snd (((,) Let0123456789876543210HSym0KindInference) ())
+    data Let0123456789876543210HSym0 a_01234567898765432100123456789876543210
+      where
+        Let0123456789876543210HSym0KindInference :: forall a_01234567898765432100123456789876543210
+                                                           arg. SameKind (Apply Let0123456789876543210HSym0 arg) (Let0123456789876543210HSym1 arg) =>
+                                                    Let0123456789876543210HSym0 a_01234567898765432100123456789876543210
+    type instance Apply Let0123456789876543210HSym0 a_01234567898765432100123456789876543210 = Let0123456789876543210HSym1 a_01234567898765432100123456789876543210
+    type family Let0123456789876543210H a_0123456789876543210 a_0123456789876543210 (a :: c) (a :: b) :: b where
+      Let0123456789876543210H a_0123456789876543210 a_0123456789876543210 _ x = x
+    type family Baz_0123456789876543210 (a :: a) (a :: b) :: b where
+      Baz_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply (Let0123456789876543210HSym2 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210) a_0123456789876543210
+    type Baz_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
+        Baz_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (Baz_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) Baz_0123456789876543210Sym1KindInference) ())
+    data Baz_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                                       (~>) b0123456789876543210 b0123456789876543210
+      where
+        Baz_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                           a0123456789876543210
+                                                           arg. SameKind (Apply (Baz_0123456789876543210Sym1 a0123456789876543210) arg) (Baz_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                    Baz_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Baz_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Baz_0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Baz_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Baz_0123456789876543210Sym0KindInference) ())
+    data Baz_0123456789876543210Sym0 :: forall a0123456789876543210
+                                               b0123456789876543210.
+                                        (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)
+      where
+        Baz_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                           arg. SameKind (Apply Baz_0123456789876543210Sym0 arg) (Baz_0123456789876543210Sym1 arg) =>
+                                                    Baz_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Baz_0123456789876543210Sym0 a0123456789876543210 = Baz_0123456789876543210Sym1 a0123456789876543210
+    class PFoo (a :: GHC.Types.Type) where
+      type Bar (arg :: a) (arg :: b) :: b
+      type Baz (arg :: a) (arg :: b) :: b
+      type Bar a a = Apply (Apply Bar_0123456789876543210Sym0 a) a
+      type Baz a a = Apply (Apply Baz_0123456789876543210Sym0 a) a
+    class SFoo a where
+      sBar ::
+        forall b (t :: a) (t :: b).
+        Sing t -> Sing t -> Sing (Apply (Apply BarSym0 t) t :: b)
+      sBaz ::
+        forall b (t :: a) (t :: b).
+        Sing t -> Sing t -> Sing (Apply (Apply BazSym0 t) t :: b)
+      default sBar ::
+                forall b (t :: a) (t :: b).
+                ((Apply (Apply BarSym0 t) t :: b)
+                 ~ Apply (Apply Bar_0123456789876543210Sym0 t) t) =>
+                Sing t -> Sing t -> Sing (Apply (Apply BarSym0 t) t :: b)
+      default sBaz ::
+                forall b (t :: a) (t :: b).
+                ((Apply (Apply BazSym0 t) t :: b)
+                 ~ Apply (Apply Baz_0123456789876543210Sym0 t) t) =>
+                Sing t -> Sing t -> Sing (Apply (Apply BazSym0 t) t :: b)
+      sBar _ (sX :: Sing x) = sX
+      sBaz
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 (let
+                    sH ::
+                      forall c (t :: c) (t :: b).
+                      Sing t
+                      -> Sing t
+                         -> Sing (Apply (Apply (Let0123456789876543210HSym2 a_0123456789876543210 a_0123456789876543210) t) t :: b)
+                    sH _ (sX :: Sing x) = sX
+                  in
+                    (singFun2
+                       @(Let0123456789876543210HSym2 a_0123456789876543210 a_0123456789876543210))
+                      sH))
+                sA_0123456789876543210))
+            sA_0123456789876543210
+    instance SFoo a => SingI (BarSym0 :: (~>) a ((~>) b b)) where
+      sing = (singFun2 @BarSym0) sBar
+    instance (SFoo a, SingI d) =>
+             SingI (BarSym1 (d :: a) :: (~>) b b) where
+      sing = (singFun1 @(BarSym1 (d :: a))) (sBar (sing @d))
+    instance SFoo a => SingI (BazSym0 :: (~>) a ((~>) b b)) where
+      sing = (singFun2 @BazSym0) sBaz
+    instance (SFoo a, SingI d) =>
+             SingI (BazSym1 (d :: a) :: (~>) b b) where
+      sing = (singFun1 @(BazSym1 (d :: a))) (sBaz (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T313.ghc86.template b/tests/compile-and-dump/Singletons/T313.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T313.ghc86.template
+++ /dev/null
@@ -1,130 +0,0 @@
-Singletons/T313.hs:(0,0)-(0,0): Splicing declarations
-    promote
-      [d| type PFoo1 a = Maybe a
-          type family PFoo2 a
-          type family PFoo3 a where
-            PFoo3 a = Maybe a
-          class PC (a :: Type) where
-            type PFoo4 a
-            type PFoo4 a = Maybe a
-          
-          type instance PFoo2 a = Maybe a
-          instance PC a where
-            type PFoo4 a = Maybe a |]
-  ======>
-    type PFoo1 a = Maybe a
-    type family PFoo2 a
-    type instance PFoo2 a = Maybe a
-    type family PFoo3 a where
-      PFoo3 a = Maybe a
-    class PC (a :: Type) where
-      type PFoo4 a
-      type PFoo4 a = Maybe a
-    instance PC a where
-      type PFoo4 a = Maybe a
-    type PFoo1Sym1 a0123456789876543210 = PFoo1 a0123456789876543210
-    instance SuppressUnusedWarnings PFoo1Sym0 where
-      suppressUnusedWarnings = snd (((,) PFoo1Sym0KindInference) ())
-    data PFoo1Sym0 a0123456789876543210
-      where
-        PFoo1Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply PFoo1Sym0 arg) (PFoo1Sym1 arg) =>
-                                  PFoo1Sym0 a0123456789876543210
-    type instance Apply PFoo1Sym0 a0123456789876543210 = PFoo1 a0123456789876543210
-    type PFoo3Sym1 a0123456789876543210 = PFoo3 a0123456789876543210
-    instance SuppressUnusedWarnings PFoo3Sym0 where
-      suppressUnusedWarnings = snd (((,) PFoo3Sym0KindInference) ())
-    data PFoo3Sym0 a0123456789876543210
-      where
-        PFoo3Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply PFoo3Sym0 arg) (PFoo3Sym1 arg) =>
-                                  PFoo3Sym0 a0123456789876543210
-    type instance Apply PFoo3Sym0 a0123456789876543210 = PFoo3 a0123456789876543210
-    type PFoo2Sym1 (a0123456789876543210 :: Type) =
-        PFoo2 a0123456789876543210
-    instance SuppressUnusedWarnings PFoo2Sym0 where
-      suppressUnusedWarnings = snd (((,) PFoo2Sym0KindInference) ())
-    data PFoo2Sym0 :: (~>) Type Type
-      where
-        PFoo2Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply PFoo2Sym0 arg) (PFoo2Sym1 arg) =>
-                                  PFoo2Sym0 a0123456789876543210
-    type instance Apply PFoo2Sym0 a0123456789876543210 = PFoo2 a0123456789876543210
-    type PFoo4Sym1 (a0123456789876543210 :: Type) =
-        PFoo4 a0123456789876543210
-    instance SuppressUnusedWarnings PFoo4Sym0 where
-      suppressUnusedWarnings = snd (((,) PFoo4Sym0KindInference) ())
-    data PFoo4Sym0 :: (~>) Type Type
-      where
-        PFoo4Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply PFoo4Sym0 arg) (PFoo4Sym1 arg) =>
-                                  PFoo4Sym0 a0123456789876543210
-    type instance Apply PFoo4Sym0 a0123456789876543210 = PFoo4 a0123456789876543210
-    class PPC (a :: Type)
-    instance PPC a
-Singletons/T313.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| type SFoo1 a = Maybe a
-          type family SFoo2 a
-          type family SFoo3 a where
-            SFoo3 a = Maybe a
-          class SC (a :: Type) where
-            type SFoo4 a
-            type SFoo4 a = Maybe a
-          
-          type instance SFoo2 a = Maybe a
-          instance SC a where
-            type SFoo4 a = Maybe a |]
-  ======>
-    type SFoo1 a = Maybe a
-    type family SFoo2 a
-    type instance SFoo2 a = Maybe a
-    type family SFoo3 a where
-      SFoo3 a = Maybe a
-    class SC (a :: Type) where
-      type SFoo4 a
-      type SFoo4 a = Maybe a
-    instance SC a where
-      type SFoo4 a = Maybe a
-    type SFoo1Sym1 a0123456789876543210 = SFoo1 a0123456789876543210
-    instance SuppressUnusedWarnings SFoo1Sym0 where
-      suppressUnusedWarnings = snd (((,) SFoo1Sym0KindInference) ())
-    data SFoo1Sym0 a0123456789876543210
-      where
-        SFoo1Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply SFoo1Sym0 arg) (SFoo1Sym1 arg) =>
-                                  SFoo1Sym0 a0123456789876543210
-    type instance Apply SFoo1Sym0 a0123456789876543210 = SFoo1 a0123456789876543210
-    type SFoo3Sym1 a0123456789876543210 = SFoo3 a0123456789876543210
-    instance SuppressUnusedWarnings SFoo3Sym0 where
-      suppressUnusedWarnings = snd (((,) SFoo3Sym0KindInference) ())
-    data SFoo3Sym0 a0123456789876543210
-      where
-        SFoo3Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply SFoo3Sym0 arg) (SFoo3Sym1 arg) =>
-                                  SFoo3Sym0 a0123456789876543210
-    type instance Apply SFoo3Sym0 a0123456789876543210 = SFoo3 a0123456789876543210
-    type SFoo2Sym1 (a0123456789876543210 :: Type) =
-        SFoo2 a0123456789876543210
-    instance SuppressUnusedWarnings SFoo2Sym0 where
-      suppressUnusedWarnings = snd (((,) SFoo2Sym0KindInference) ())
-    data SFoo2Sym0 :: (~>) Type Type
-      where
-        SFoo2Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply SFoo2Sym0 arg) (SFoo2Sym1 arg) =>
-                                  SFoo2Sym0 a0123456789876543210
-    type instance Apply SFoo2Sym0 a0123456789876543210 = SFoo2 a0123456789876543210
-    type SFoo4Sym1 (a0123456789876543210 :: Type) =
-        SFoo4 a0123456789876543210
-    instance SuppressUnusedWarnings SFoo4Sym0 where
-      suppressUnusedWarnings = snd (((,) SFoo4Sym0KindInference) ())
-    data SFoo4Sym0 :: (~>) Type Type
-      where
-        SFoo4Sym0KindInference :: forall a0123456789876543210
-                                         arg. SameKind (Apply SFoo4Sym0 arg) (SFoo4Sym1 arg) =>
-                                  SFoo4Sym0 a0123456789876543210
-    type instance Apply SFoo4Sym0 a0123456789876543210 = SFoo4 a0123456789876543210
-    class PSC (a :: Type)
-    instance PSC a
-    class SSC (a :: Type)
-    instance SSC a
diff --git a/tests/compile-and-dump/Singletons/T313.ghc88.template b/tests/compile-and-dump/Singletons/T313.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T313.ghc88.template
@@ -0,0 +1,130 @@
+Singletons/T313.hs:(0,0)-(0,0): Splicing declarations
+    promote
+      [d| type PFoo1 a = Maybe a
+          type family PFoo2 a
+          type family PFoo3 a where
+            PFoo3 a = Maybe a
+          class PC (a :: Type) where
+            type PFoo4 a
+            type PFoo4 a = Maybe a
+          
+          type instance PFoo2 a = Maybe a
+          instance PC a where
+            type PFoo4 a = Maybe a |]
+  ======>
+    type PFoo1 a = Maybe a
+    type family PFoo2 a
+    type instance PFoo2 a = Maybe a
+    type family PFoo3 a where
+      PFoo3 a = Maybe a
+    class PC (a :: Type) where
+      type PFoo4 a
+      type PFoo4 a = Maybe a
+    instance PC a where
+      type PFoo4 a = Maybe a
+    type PFoo1Sym1 a0123456789876543210 = PFoo1 a0123456789876543210
+    instance SuppressUnusedWarnings PFoo1Sym0 where
+      suppressUnusedWarnings = snd (((,) PFoo1Sym0KindInference) ())
+    data PFoo1Sym0 a0123456789876543210
+      where
+        PFoo1Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply PFoo1Sym0 arg) (PFoo1Sym1 arg) =>
+                                  PFoo1Sym0 a0123456789876543210
+    type instance Apply PFoo1Sym0 a0123456789876543210 = PFoo1 a0123456789876543210
+    type PFoo3Sym1 a0123456789876543210 = PFoo3 a0123456789876543210
+    instance SuppressUnusedWarnings PFoo3Sym0 where
+      suppressUnusedWarnings = snd (((,) PFoo3Sym0KindInference) ())
+    data PFoo3Sym0 a0123456789876543210
+      where
+        PFoo3Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply PFoo3Sym0 arg) (PFoo3Sym1 arg) =>
+                                  PFoo3Sym0 a0123456789876543210
+    type instance Apply PFoo3Sym0 a0123456789876543210 = PFoo3 a0123456789876543210
+    type PFoo2Sym1 (a0123456789876543210 :: Type) =
+        PFoo2 a0123456789876543210
+    instance SuppressUnusedWarnings PFoo2Sym0 where
+      suppressUnusedWarnings = snd (((,) PFoo2Sym0KindInference) ())
+    data PFoo2Sym0 :: (~>) Type Type
+      where
+        PFoo2Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply PFoo2Sym0 arg) (PFoo2Sym1 arg) =>
+                                  PFoo2Sym0 a0123456789876543210
+    type instance Apply PFoo2Sym0 a0123456789876543210 = PFoo2 a0123456789876543210
+    type PFoo4Sym1 (a0123456789876543210 :: Type) =
+        PFoo4 a0123456789876543210
+    instance SuppressUnusedWarnings PFoo4Sym0 where
+      suppressUnusedWarnings = snd (((,) PFoo4Sym0KindInference) ())
+    data PFoo4Sym0 :: (~>) Type Type
+      where
+        PFoo4Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply PFoo4Sym0 arg) (PFoo4Sym1 arg) =>
+                                  PFoo4Sym0 a0123456789876543210
+    type instance Apply PFoo4Sym0 a0123456789876543210 = PFoo4 a0123456789876543210
+    class PPC (a :: Type)
+    instance PPC a
+Singletons/T313.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| type SFoo1 a = Maybe a
+          type family SFoo2 a
+          type family SFoo3 a where
+            SFoo3 a = Maybe a
+          class SC (a :: Type) where
+            type SFoo4 a
+            type SFoo4 a = Maybe a
+          
+          type instance SFoo2 a = Maybe a
+          instance SC a where
+            type SFoo4 a = Maybe a |]
+  ======>
+    type SFoo1 a = Maybe a
+    type family SFoo2 a
+    type instance SFoo2 a = Maybe a
+    type family SFoo3 a where
+      SFoo3 a = Maybe a
+    class SC (a :: Type) where
+      type SFoo4 a
+      type SFoo4 a = Maybe a
+    instance SC a where
+      type SFoo4 a = Maybe a
+    type SFoo1Sym1 a0123456789876543210 = SFoo1 a0123456789876543210
+    instance SuppressUnusedWarnings SFoo1Sym0 where
+      suppressUnusedWarnings = snd (((,) SFoo1Sym0KindInference) ())
+    data SFoo1Sym0 a0123456789876543210
+      where
+        SFoo1Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply SFoo1Sym0 arg) (SFoo1Sym1 arg) =>
+                                  SFoo1Sym0 a0123456789876543210
+    type instance Apply SFoo1Sym0 a0123456789876543210 = SFoo1 a0123456789876543210
+    type SFoo3Sym1 a0123456789876543210 = SFoo3 a0123456789876543210
+    instance SuppressUnusedWarnings SFoo3Sym0 where
+      suppressUnusedWarnings = snd (((,) SFoo3Sym0KindInference) ())
+    data SFoo3Sym0 a0123456789876543210
+      where
+        SFoo3Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply SFoo3Sym0 arg) (SFoo3Sym1 arg) =>
+                                  SFoo3Sym0 a0123456789876543210
+    type instance Apply SFoo3Sym0 a0123456789876543210 = SFoo3 a0123456789876543210
+    type SFoo2Sym1 (a0123456789876543210 :: Type) =
+        SFoo2 a0123456789876543210
+    instance SuppressUnusedWarnings SFoo2Sym0 where
+      suppressUnusedWarnings = snd (((,) SFoo2Sym0KindInference) ())
+    data SFoo2Sym0 :: (~>) Type Type
+      where
+        SFoo2Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply SFoo2Sym0 arg) (SFoo2Sym1 arg) =>
+                                  SFoo2Sym0 a0123456789876543210
+    type instance Apply SFoo2Sym0 a0123456789876543210 = SFoo2 a0123456789876543210
+    type SFoo4Sym1 (a0123456789876543210 :: Type) =
+        SFoo4 a0123456789876543210
+    instance SuppressUnusedWarnings SFoo4Sym0 where
+      suppressUnusedWarnings = snd (((,) SFoo4Sym0KindInference) ())
+    data SFoo4Sym0 :: (~>) Type Type
+      where
+        SFoo4Sym0KindInference :: forall a0123456789876543210
+                                         arg. SameKind (Apply SFoo4Sym0 arg) (SFoo4Sym1 arg) =>
+                                  SFoo4Sym0 a0123456789876543210
+    type instance Apply SFoo4Sym0 a0123456789876543210 = SFoo4 a0123456789876543210
+    class PSC (a :: Type)
+    instance PSC a
+    class SSC (a :: Type)
+    instance SSC a
diff --git a/tests/compile-and-dump/Singletons/T316.ghc86.template b/tests/compile-and-dump/Singletons/T316.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T316.ghc86.template
+++ /dev/null
@@ -1,40 +0,0 @@
-Singletons/T316.hs:(0,0)-(0,0): Splicing declarations
-    promoteOnly
-      [d| replaceAllGTypes :: (a -> Type -> a) -> [Type] -> [a] -> [a]
-          replaceAllGTypes f types as = zipWith f as types |]
-  ======>
-    type ReplaceAllGTypesSym3 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) Type a0123456789876543210)) (a0123456789876543210 :: [Type]) (a0123456789876543210 :: [a0123456789876543210]) =
-        ReplaceAllGTypes a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ReplaceAllGTypesSym2KindInference) ())
-    data ReplaceAllGTypesSym2 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) Type a0123456789876543210)) (a0123456789876543210 :: [Type]) :: (~>) [a0123456789876543210] [a0123456789876543210]
-      where
-        ReplaceAllGTypesSym2KindInference :: forall a0123456789876543210
-                                                    a0123456789876543210
-                                                    a0123456789876543210
-                                                    arg. SameKind (Apply (ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210) arg) (ReplaceAllGTypesSym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                             ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ReplaceAllGTypes a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ReplaceAllGTypesSym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ReplaceAllGTypesSym1KindInference) ())
-    data ReplaceAllGTypesSym1 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) Type a0123456789876543210)) :: (~>) [Type] ((~>) [a0123456789876543210] [a0123456789876543210])
-      where
-        ReplaceAllGTypesSym1KindInference :: forall a0123456789876543210
-                                                    a0123456789876543210
-                                                    arg. SameKind (Apply (ReplaceAllGTypesSym1 a0123456789876543210) arg) (ReplaceAllGTypesSym2 a0123456789876543210 arg) =>
-                                             ReplaceAllGTypesSym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ReplaceAllGTypesSym1 a0123456789876543210) a0123456789876543210 = ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ReplaceAllGTypesSym0 where
-      suppressUnusedWarnings
-        = snd (((,) ReplaceAllGTypesSym0KindInference) ())
-    data ReplaceAllGTypesSym0 :: forall a0123456789876543210.
-                                 (~>) ((~>) a0123456789876543210 ((~>) Type a0123456789876543210)) ((~>) [Type] ((~>) [a0123456789876543210] [a0123456789876543210]))
-      where
-        ReplaceAllGTypesSym0KindInference :: forall a0123456789876543210
-                                                    arg. SameKind (Apply ReplaceAllGTypesSym0 arg) (ReplaceAllGTypesSym1 arg) =>
-                                             ReplaceAllGTypesSym0 a0123456789876543210
-    type instance Apply ReplaceAllGTypesSym0 a0123456789876543210 = ReplaceAllGTypesSym1 a0123456789876543210
-    type family ReplaceAllGTypes (a :: (~>) a ((~>) Type a)) (a :: [Type]) (a :: [a]) :: [a] where
-      ReplaceAllGTypes f types as = Apply (Apply (Apply ZipWithSym0 f) as) types
diff --git a/tests/compile-and-dump/Singletons/T316.ghc88.template b/tests/compile-and-dump/Singletons/T316.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T316.ghc88.template
@@ -0,0 +1,40 @@
+Singletons/T316.hs:(0,0)-(0,0): Splicing declarations
+    promoteOnly
+      [d| replaceAllGTypes :: (a -> Type -> a) -> [Type] -> [a] -> [a]
+          replaceAllGTypes f types as = zipWith f as types |]
+  ======>
+    type ReplaceAllGTypesSym3 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) Type a0123456789876543210)) (a0123456789876543210 :: [Type]) (a0123456789876543210 :: [a0123456789876543210]) =
+        ReplaceAllGTypes a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ReplaceAllGTypesSym2KindInference) ())
+    data ReplaceAllGTypesSym2 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) Type a0123456789876543210)) (a0123456789876543210 :: [Type]) :: (~>) [a0123456789876543210] [a0123456789876543210]
+      where
+        ReplaceAllGTypesSym2KindInference :: forall a0123456789876543210
+                                                    a0123456789876543210
+                                                    a0123456789876543210
+                                                    arg. SameKind (Apply (ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210) arg) (ReplaceAllGTypesSym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                             ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ReplaceAllGTypes a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ReplaceAllGTypesSym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ReplaceAllGTypesSym1KindInference) ())
+    data ReplaceAllGTypesSym1 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) Type a0123456789876543210)) :: (~>) [Type] ((~>) [a0123456789876543210] [a0123456789876543210])
+      where
+        ReplaceAllGTypesSym1KindInference :: forall a0123456789876543210
+                                                    a0123456789876543210
+                                                    arg. SameKind (Apply (ReplaceAllGTypesSym1 a0123456789876543210) arg) (ReplaceAllGTypesSym2 a0123456789876543210 arg) =>
+                                             ReplaceAllGTypesSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ReplaceAllGTypesSym1 a0123456789876543210) a0123456789876543210 = ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ReplaceAllGTypesSym0 where
+      suppressUnusedWarnings
+        = snd (((,) ReplaceAllGTypesSym0KindInference) ())
+    data ReplaceAllGTypesSym0 :: forall a0123456789876543210.
+                                 (~>) ((~>) a0123456789876543210 ((~>) Type a0123456789876543210)) ((~>) [Type] ((~>) [a0123456789876543210] [a0123456789876543210]))
+      where
+        ReplaceAllGTypesSym0KindInference :: forall a0123456789876543210
+                                                    arg. SameKind (Apply ReplaceAllGTypesSym0 arg) (ReplaceAllGTypesSym1 arg) =>
+                                             ReplaceAllGTypesSym0 a0123456789876543210
+    type instance Apply ReplaceAllGTypesSym0 a0123456789876543210 = ReplaceAllGTypesSym1 a0123456789876543210
+    type family ReplaceAllGTypes (a :: (~>) a ((~>) Type a)) (a :: [Type]) (a :: [a]) :: [a] where
+      ReplaceAllGTypes f types as = Apply (Apply (Apply ZipWithSym0 f) as) types
diff --git a/tests/compile-and-dump/Singletons/T322.ghc86.template b/tests/compile-and-dump/Singletons/T322.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T322.ghc86.template
+++ /dev/null
@@ -1,49 +0,0 @@
-Singletons/T322.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| infixr 2 !
-          
-          (!) :: Bool -> Bool -> Bool
-          (!) = (||) |]
-  ======>
-    (!) :: Bool -> Bool -> Bool
-    (!) = (||)
-    infixr 2 !
-    type (!@#@$$$) (a0123456789876543210 :: Bool) (a0123456789876543210 :: Bool) =
-        (:!) a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ((!@#@$$) a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) (:!@#@$$###)) ())
-    data (!@#@$$) (a0123456789876543210 :: Bool) :: (~>) Bool Bool
-      where
-        (:!@#@$$###) :: forall a0123456789876543210
-                               a0123456789876543210
-                               arg. SameKind (Apply ((!@#@$$) a0123456789876543210) arg) ((!@#@$$$) a0123456789876543210 arg) =>
-                        (!@#@$$) a0123456789876543210 a0123456789876543210
-    type instance Apply ((!@#@$$) a0123456789876543210) a0123456789876543210 = (:!) a0123456789876543210 a0123456789876543210
-    infixr 2 !@#@$$
-    instance SuppressUnusedWarnings (!@#@$) where
-      suppressUnusedWarnings = snd (((,) (:!@#@$###)) ())
-    data (!@#@$) :: (~>) Bool ((~>) Bool Bool)
-      where
-        (:!@#@$###) :: forall a0123456789876543210
-                              arg. SameKind (Apply (!@#@$) arg) ((!@#@$$) arg) =>
-                       (!@#@$) a0123456789876543210
-    type instance Apply (!@#@$) a0123456789876543210 = (!@#@$$) a0123456789876543210
-    infixr 2 !@#@$
-    type family (:!) (a :: Bool) (a :: Bool) :: Bool where
-      (:!) a_0123456789876543210 a_0123456789876543210 = Apply (Apply (||@#@$) a_0123456789876543210) a_0123456789876543210
-    infixr 2 :!
-    infixr 2 %!
-    (%!) ::
-      forall (t :: Bool) (t :: Bool).
-      Sing t -> Sing t -> Sing (Apply (Apply (!@#@$) t) t :: Bool)
-    (%!)
-      (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      = (applySing
-           ((applySing ((singFun2 @(||@#@$)) (%||))) sA_0123456789876543210))
-          sA_0123456789876543210
-    instance SingI ((!@#@$) :: (~>) Bool ((~>) Bool Bool)) where
-      sing = (singFun2 @(!@#@$)) (%!)
-    instance SingI d =>
-             SingI ((!@#@$$) (d :: Bool) :: (~>) Bool Bool) where
-      sing = (singFun1 @((!@#@$$) (d :: Bool))) ((%!) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T322.ghc88.template b/tests/compile-and-dump/Singletons/T322.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T322.ghc88.template
@@ -0,0 +1,48 @@
+Singletons/T322.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| infixr 2 !
+          
+          (!) :: Bool -> Bool -> Bool
+          (!) = (||) |]
+  ======>
+    (!) :: Bool -> Bool -> Bool
+    (!) = (||)
+    infixr 2 !
+    type (!@#@$$$) (a0123456789876543210 :: Bool) (a0123456789876543210 :: Bool) =
+        (!) a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ((!@#@$$) a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) (:!@#@$$###)) ())
+    data (!@#@$$) (a0123456789876543210 :: Bool) :: (~>) Bool Bool
+      where
+        (:!@#@$$###) :: forall a0123456789876543210
+                               a0123456789876543210
+                               arg. SameKind (Apply ((!@#@$$) a0123456789876543210) arg) ((!@#@$$$) a0123456789876543210 arg) =>
+                        (!@#@$$) a0123456789876543210 a0123456789876543210
+    type instance Apply ((!@#@$$) a0123456789876543210) a0123456789876543210 = (!) a0123456789876543210 a0123456789876543210
+    infixr 2 !@#@$$
+    instance SuppressUnusedWarnings (!@#@$) where
+      suppressUnusedWarnings = snd (((,) (:!@#@$###)) ())
+    data (!@#@$) :: (~>) Bool ((~>) Bool Bool)
+      where
+        (:!@#@$###) :: forall a0123456789876543210
+                              arg. SameKind (Apply (!@#@$) arg) ((!@#@$$) arg) =>
+                       (!@#@$) a0123456789876543210
+    type instance Apply (!@#@$) a0123456789876543210 = (!@#@$$) a0123456789876543210
+    infixr 2 !@#@$
+    type family (!) (a :: Bool) (a :: Bool) :: Bool where
+      (!) a_0123456789876543210 a_0123456789876543210 = Apply (Apply (||@#@$) a_0123456789876543210) a_0123456789876543210
+    infixr 2 %!
+    (%!) ::
+      forall (t :: Bool) (t :: Bool).
+      Sing t -> Sing t -> Sing (Apply (Apply (!@#@$) t) t :: Bool)
+    (%!)
+      (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = (applySing
+           ((applySing ((singFun2 @(||@#@$)) (%||))) sA_0123456789876543210))
+          sA_0123456789876543210
+    instance SingI ((!@#@$) :: (~>) Bool ((~>) Bool Bool)) where
+      sing = (singFun2 @(!@#@$)) (%!)
+    instance SingI d =>
+             SingI ((!@#@$$) (d :: Bool) :: (~>) Bool Bool) where
+      sing = (singFun1 @((!@#@$$) (d :: Bool))) ((%!) (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T322.hs b/tests/compile-and-dump/Singletons/T322.hs
--- a/tests/compile-and-dump/Singletons/T322.hs
+++ b/tests/compile-and-dump/Singletons/T322.hs
@@ -9,5 +9,5 @@
   infixr 2 !
   |])
 
-f1 :: (False && True :! True) :~: True
+f1 :: (False && True ! True) :~: True
 f1 = Refl
diff --git a/tests/compile-and-dump/Singletons/T323.ghc86.template b/tests/compile-and-dump/Singletons/T323.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T323.ghc86.template
+++ /dev/null
diff --git a/tests/compile-and-dump/Singletons/T323.ghc88.template b/tests/compile-and-dump/Singletons/T323.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T323.ghc88.template
diff --git a/tests/compile-and-dump/Singletons/T33.ghc86.template b/tests/compile-and-dump/Singletons/T33.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T33.ghc86.template
+++ /dev/null
@@ -1,36 +0,0 @@
-Singletons/T33.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| foo :: (Bool, Bool) -> ()
-          foo ~(_, _) = () |]
-  ======>
-    foo :: (Bool, Bool) -> ()
-    foo ~(_, _) = ()
-    type FooSym1 (a0123456789876543210 :: (Bool, Bool)) =
-        Foo a0123456789876543210
-    instance SuppressUnusedWarnings FooSym0 where
-      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
-    data FooSym0 :: (~>) (Bool, Bool) ()
-      where
-        FooSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
-                                FooSym0 a0123456789876543210
-    type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
-    type family Foo (a :: (Bool, Bool)) :: () where
-      Foo '(_, _) = Tuple0Sym0
-    sFoo ::
-      forall (t :: (Bool, Bool)). Sing t -> Sing (Apply FooSym0 t :: ())
-    sFoo (STuple2 _ _) = STuple0
-    instance SingI (FooSym0 :: (~>) (Bool, Bool) ()) where
-      sing = (singFun1 @FooSym0) sFoo
-
-Singletons/T33.hs:0:0: warning:
-    Lazy pattern converted into regular pattern in promotion
-  |
-6 | $(singletons [d|
-  |   ^^^^^^^^^^^^^^...
-
-Singletons/T33.hs:0:0: warning:
-    Lazy pattern converted into regular pattern during singleton generation.
-  |
-6 | $(singletons [d|
-  |   ^^^^^^^^^^^^^^...
diff --git a/tests/compile-and-dump/Singletons/T33.ghc88.template b/tests/compile-and-dump/Singletons/T33.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T33.ghc88.template
@@ -0,0 +1,36 @@
+Singletons/T33.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| foo :: (Bool, Bool) -> ()
+          foo ~(_, _) = () |]
+  ======>
+    foo :: (Bool, Bool) -> ()
+    foo ~(_, _) = ()
+    type FooSym1 (a0123456789876543210 :: (Bool, Bool)) =
+        Foo a0123456789876543210
+    instance SuppressUnusedWarnings FooSym0 where
+      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
+    data FooSym0 :: (~>) (Bool, Bool) ()
+      where
+        FooSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
+                                FooSym0 a0123456789876543210
+    type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
+    type family Foo (a :: (Bool, Bool)) :: () where
+      Foo '(_, _) = Tuple0Sym0
+    sFoo ::
+      forall (t :: (Bool, Bool)). Sing t -> Sing (Apply FooSym0 t :: ())
+    sFoo (STuple2 _ _) = STuple0
+    instance SingI (FooSym0 :: (~>) (Bool, Bool) ()) where
+      sing = (singFun1 @FooSym0) sFoo
+
+Singletons/T33.hs:0:0: warning:
+    Lazy pattern converted into regular pattern in promotion
+  |
+6 | $(singletons [d|
+  |   ^^^^^^^^^^^^^^...
+
+Singletons/T33.hs:0:0: warning:
+    Lazy pattern converted into regular pattern during singleton generation.
+  |
+6 | $(singletons [d|
+  |   ^^^^^^^^^^^^^^...
diff --git a/tests/compile-and-dump/Singletons/T332.ghc86.template b/tests/compile-and-dump/Singletons/T332.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T332.ghc86.template
+++ /dev/null
@@ -1,57 +0,0 @@
-Singletons/T332.hs:(0,0)-(0,0): Splicing declarations
-    promote
-      [d| f :: Foo -> ()
-          f MkFoo {} = ()
-          
-          data Foo = MkFoo |]
-  ======>
-    data Foo = MkFoo
-    f :: Foo -> ()
-    f MkFoo {} = ()
-    type FSym1 (a0123456789876543210 :: Foo) = F a0123456789876543210
-    instance SuppressUnusedWarnings FSym0 where
-      suppressUnusedWarnings = snd (((,) FSym0KindInference) ())
-    data FSym0 :: (~>) Foo ()
-      where
-        FSym0KindInference :: forall a0123456789876543210
-                                     arg. SameKind (Apply FSym0 arg) (FSym1 arg) =>
-                              FSym0 a0123456789876543210
-    type instance Apply FSym0 a0123456789876543210 = F a0123456789876543210
-    type family F (a :: Foo) :: () where
-      F MkFoo = Tuple0Sym0
-    type MkFooSym0 = MkFoo
-Singletons/T332.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| b :: Bar -> ()
-          b MkBar {} = ()
-          
-          data Bar = MkBar |]
-  ======>
-    data Bar = MkBar
-    b :: Bar -> ()
-    b MkBar {} = ()
-    type MkBarSym0 = MkBar
-    type BSym1 (a0123456789876543210 :: Bar) = B a0123456789876543210
-    instance SuppressUnusedWarnings BSym0 where
-      suppressUnusedWarnings = snd (((,) BSym0KindInference) ())
-    data BSym0 :: (~>) Bar ()
-      where
-        BSym0KindInference :: forall a0123456789876543210
-                                     arg. SameKind (Apply BSym0 arg) (BSym1 arg) =>
-                              BSym0 a0123456789876543210
-    type instance Apply BSym0 a0123456789876543210 = B a0123456789876543210
-    type family B (a :: Bar) :: () where
-      B MkBar = Tuple0Sym0
-    sB :: forall (t :: Bar). Sing t -> Sing (Apply BSym0 t :: ())
-    sB SMkBar = STuple0
-    instance SingI (BSym0 :: (~>) Bar ()) where
-      sing = (singFun1 @BSym0) sB
-    data instance Sing :: Bar -> GHC.Types.Type
-      where SMkBar :: Sing MkBar
-    type SBar = (Sing :: Bar -> GHC.Types.Type)
-    instance SingKind Bar where
-      type Demote Bar = Bar
-      fromSing SMkBar = MkBar
-      toSing MkBar = SomeSing SMkBar
-    instance SingI MkBar where
-      sing = SMkBar
diff --git a/tests/compile-and-dump/Singletons/T332.ghc88.template b/tests/compile-and-dump/Singletons/T332.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T332.ghc88.template
@@ -0,0 +1,56 @@
+Singletons/T332.hs:(0,0)-(0,0): Splicing declarations
+    promote
+      [d| f :: Foo -> ()
+          f MkFoo {} = ()
+          
+          data Foo = MkFoo |]
+  ======>
+    data Foo = MkFoo
+    f :: Foo -> ()
+    f MkFoo {} = ()
+    type FSym1 (a0123456789876543210 :: Foo) = F a0123456789876543210
+    instance SuppressUnusedWarnings FSym0 where
+      suppressUnusedWarnings = snd (((,) FSym0KindInference) ())
+    data FSym0 :: (~>) Foo ()
+      where
+        FSym0KindInference :: forall a0123456789876543210
+                                     arg. SameKind (Apply FSym0 arg) (FSym1 arg) =>
+                              FSym0 a0123456789876543210
+    type instance Apply FSym0 a0123456789876543210 = F a0123456789876543210
+    type family F (a :: Foo) :: () where
+      F MkFoo = Tuple0Sym0
+    type MkFooSym0 = MkFoo
+Singletons/T332.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| b :: Bar -> ()
+          b MkBar {} = ()
+          
+          data Bar = MkBar |]
+  ======>
+    data Bar = MkBar
+    b :: Bar -> ()
+    b MkBar {} = ()
+    type MkBarSym0 = MkBar
+    type BSym1 (a0123456789876543210 :: Bar) = B a0123456789876543210
+    instance SuppressUnusedWarnings BSym0 where
+      suppressUnusedWarnings = snd (((,) BSym0KindInference) ())
+    data BSym0 :: (~>) Bar ()
+      where
+        BSym0KindInference :: forall a0123456789876543210
+                                     arg. SameKind (Apply BSym0 arg) (BSym1 arg) =>
+                              BSym0 a0123456789876543210
+    type instance Apply BSym0 a0123456789876543210 = B a0123456789876543210
+    type family B (a :: Bar) :: () where
+      B MkBar = Tuple0Sym0
+    sB :: forall (t :: Bar). Sing t -> Sing (Apply BSym0 t :: ())
+    sB SMkBar = STuple0
+    instance SingI (BSym0 :: (~>) Bar ()) where
+      sing = (singFun1 @BSym0) sB
+    data SBar :: Bar -> GHC.Types.Type where SMkBar :: SBar MkBar
+    type instance Sing @Bar = SBar
+    instance SingKind Bar where
+      type Demote Bar = Bar
+      fromSing SMkBar = MkBar
+      toSing MkBar = SomeSing SMkBar
+    instance SingI MkBar where
+      sing = SMkBar
diff --git a/tests/compile-and-dump/Singletons/T342.ghc86.template b/tests/compile-and-dump/Singletons/T342.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T342.ghc86.template
+++ /dev/null
@@ -1,17 +0,0 @@
-Singletons/T342.hs:(0,0)-(0,0): Splicing declarations
-    do synName <- newName "MyId"
-       a <- newName "a"
-       let syn = TySynD synName [PlainTV a] (VarT a)
-       defuns <- withLocalDeclarations [syn] $ genDefunSymbols [synName]
-       pure $ syn : defuns
-  ======>
-    type MyId a = a
-    type MyIdSym1 a0123456789876543210 = MyId a0123456789876543210
-    instance SuppressUnusedWarnings MyIdSym0 where
-      suppressUnusedWarnings = snd (((,) MyIdSym0KindInference) ())
-    data MyIdSym0 a0123456789876543210
-      where
-        MyIdSym0KindInference :: forall a0123456789876543210
-                                        arg. SameKind (Apply MyIdSym0 arg) (MyIdSym1 arg) =>
-                                 MyIdSym0 a0123456789876543210
-    type instance Apply MyIdSym0 a0123456789876543210 = MyId a0123456789876543210
diff --git a/tests/compile-and-dump/Singletons/T342.ghc88.template b/tests/compile-and-dump/Singletons/T342.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T342.ghc88.template
@@ -0,0 +1,17 @@
+Singletons/T342.hs:(0,0)-(0,0): Splicing declarations
+    do synName <- newName "MyId"
+       a <- newName "a"
+       let syn = TySynD synName [PlainTV a] (VarT a)
+       defuns <- withLocalDeclarations [syn] $ genDefunSymbols [synName]
+       pure $ syn : defuns
+  ======>
+    type MyId a = a
+    type MyIdSym1 a0123456789876543210 = MyId a0123456789876543210
+    instance SuppressUnusedWarnings MyIdSym0 where
+      suppressUnusedWarnings = snd (((,) MyIdSym0KindInference) ())
+    data MyIdSym0 a0123456789876543210
+      where
+        MyIdSym0KindInference :: forall a0123456789876543210
+                                        arg. SameKind (Apply MyIdSym0 arg) (MyIdSym1 arg) =>
+                                 MyIdSym0 a0123456789876543210
+    type instance Apply MyIdSym0 a0123456789876543210 = MyId a0123456789876543210
diff --git a/tests/compile-and-dump/Singletons/T353.ghc86.template b/tests/compile-and-dump/Singletons/T353.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T353.ghc86.template
+++ /dev/null
@@ -1,104 +0,0 @@
-Singletons/T353.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| type family Symmetry (a :: Proxy t) (y :: Proxy t) (e :: (a :: Proxy (t :: k))
-                                                                   :~:
-                                                                   (y :: Proxy (t :: k))) :: Type where
-            Symmetry a y _ = y :~: a |]
-  ======>
-    type family Symmetry (a :: Proxy t) (y :: Proxy t) (e :: (:~:) (a :: Proxy (t :: k)) (y :: Proxy (t :: k))) :: Type where
-      Symmetry a y _ = (:~:) y a
-    type SymmetrySym3 (a0123456789876543210 :: Proxy t0123456789876543210) (y0123456789876543210 :: Proxy t0123456789876543210) (e0123456789876543210 :: (:~:) (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) (y0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210))) =
-        Symmetry a0123456789876543210 y0123456789876543210 e0123456789876543210
-    instance SuppressUnusedWarnings (SymmetrySym2 y0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) SymmetrySym2KindInference) ())
-    data SymmetrySym2 (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) (y0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) :: (~>) ((:~:) (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) (y0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210))) Type
-      where
-        SymmetrySym2KindInference :: forall a0123456789876543210
-                                            y0123456789876543210
-                                            e0123456789876543210
-                                            arg. SameKind (Apply (SymmetrySym2 a0123456789876543210 y0123456789876543210) arg) (SymmetrySym3 a0123456789876543210 y0123456789876543210 arg) =>
-                                     SymmetrySym2 a0123456789876543210 y0123456789876543210 e0123456789876543210
-    type instance Apply (SymmetrySym2 y0123456789876543210 a0123456789876543210) e0123456789876543210 = Symmetry y0123456789876543210 a0123456789876543210 e0123456789876543210
-    instance SuppressUnusedWarnings (SymmetrySym1 a0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) SymmetrySym1KindInference) ())
-    data SymmetrySym1 (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) :: forall (y0123456789876543210 :: Proxy t0123456789876543210).
-                                                                                                        (~>) (Proxy t0123456789876543210) ((~>) ((:~:) (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) (y0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210))) Type)
-      where
-        SymmetrySym1KindInference :: forall a0123456789876543210
-                                            y0123456789876543210
-                                            arg. SameKind (Apply (SymmetrySym1 a0123456789876543210) arg) (SymmetrySym2 a0123456789876543210 arg) =>
-                                     SymmetrySym1 a0123456789876543210 y0123456789876543210
-    type instance Apply (SymmetrySym1 a0123456789876543210) y0123456789876543210 = SymmetrySym2 a0123456789876543210 y0123456789876543210
-    instance SuppressUnusedWarnings SymmetrySym0 where
-      suppressUnusedWarnings = snd (((,) SymmetrySym0KindInference) ())
-    data SymmetrySym0 :: forall k0123456789876543210
-                                (t0123456789876543210 :: k0123456789876543210)
-                                (a0123456789876543210 :: Proxy t0123456789876543210)
-                                (y0123456789876543210 :: Proxy t0123456789876543210).
-                         (~>) (Proxy t0123456789876543210) ((~>) (Proxy t0123456789876543210) ((~>) ((:~:) (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) (y0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210))) Type))
-      where
-        SymmetrySym0KindInference :: forall a0123456789876543210
-                                            arg. SameKind (Apply SymmetrySym0 arg) (SymmetrySym1 arg) =>
-                                     SymmetrySym0 a0123456789876543210
-    type instance Apply SymmetrySym0 a0123456789876543210 = SymmetrySym1 a0123456789876543210
-Singletons/T353.hs:0:0:: Splicing declarations
-    genDefunSymbols [''Prod]
-  ======>
-    type MkProdSym2 (t0123456789876543210 :: f0123456789876543210 p0123456789876543210) (t0123456789876543210 :: g0123456789876543210 p0123456789876543210) =
-         'MkProd t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (MkProdSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MkProdSym1KindInference) ())
-    data MkProdSym1 (t0123456789876543210 :: (f0123456789876543210 :: k0123456789876543210
-                                                                      -> Type) (p0123456789876543210 :: k0123456789876543210)) :: forall (g0123456789876543210 :: k0123456789876543210
-                                                                                                                                                                  -> Type).
-                                                                                                                                  (~>) (g0123456789876543210 p0123456789876543210) (Prod (f0123456789876543210 :: k0123456789876543210
-                                                                                                                                                                                                                  -> Type) (g0123456789876543210 :: k0123456789876543210
-                                                                                                                                                                                                                                                    -> Type) (p0123456789876543210 :: k0123456789876543210))
-      where
-        MkProdSym1KindInference :: forall t0123456789876543210
-                                          t0123456789876543210
-                                          arg. SameKind (Apply (MkProdSym1 t0123456789876543210) arg) (MkProdSym2 t0123456789876543210 arg) =>
-                                   MkProdSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (MkProdSym1 t0123456789876543210) t0123456789876543210 =  'MkProd t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings MkProdSym0 where
-      suppressUnusedWarnings = snd (((,) MkProdSym0KindInference) ())
-    data MkProdSym0 :: forall k0123456789876543210
-                              (f0123456789876543210 :: k0123456789876543210 -> Type)
-                              (g0123456789876543210 :: k0123456789876543210 -> Type)
-                              (p0123456789876543210 :: k0123456789876543210).
-                       (~>) (f0123456789876543210 p0123456789876543210) ((~>) (g0123456789876543210 p0123456789876543210) (Prod (f0123456789876543210 :: k0123456789876543210
-                                                                                                                                                         -> Type) (g0123456789876543210 :: k0123456789876543210
-                                                                                                                                                                                           -> Type) (p0123456789876543210 :: k0123456789876543210)))
-      where
-        MkProdSym0KindInference :: forall t0123456789876543210
-                                          arg. SameKind (Apply MkProdSym0 arg) (MkProdSym1 arg) =>
-                                   MkProdSym0 t0123456789876543210
-    type instance Apply MkProdSym0 t0123456789876543210 = MkProdSym1 t0123456789876543210
-Singletons/T353.hs:0:0:: Splicing declarations
-    genDefunSymbols [''Foo]
-  ======>
-    type MkFooSym2 (t0123456789876543210 :: Proxy a0123456789876543210) (t0123456789876543210 :: Proxy b0123456789876543210) =
-         'MkFoo t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (MkFooSym1 t0123456789876543210) where
-      suppressUnusedWarnings = snd (((,) MkFooSym1KindInference) ())
-    data MkFooSym1 (t0123456789876543210 :: Proxy (a0123456789876543210 :: k0123456789876543210)) :: forall k0123456789876543210
-                                                                                                            (b0123456789876543210 :: k0123456789876543210).
-                                                                                                     (~>) (Proxy b0123456789876543210) (Foo (a0123456789876543210 :: k0123456789876543210) (b0123456789876543210 :: k0123456789876543210))
-      where
-        MkFooSym1KindInference :: forall t0123456789876543210
-                                         t0123456789876543210
-                                         arg. SameKind (Apply (MkFooSym1 t0123456789876543210) arg) (MkFooSym2 t0123456789876543210 arg) =>
-                                  MkFooSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (MkFooSym1 t0123456789876543210) t0123456789876543210 =  'MkFoo t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings MkFooSym0 where
-      suppressUnusedWarnings = snd (((,) MkFooSym0KindInference) ())
-    data MkFooSym0 :: forall k0123456789876543210
-                             (a0123456789876543210 :: k0123456789876543210)
-                             k0123456789876543210
-                             (b0123456789876543210 :: k0123456789876543210).
-                      (~>) (Proxy a0123456789876543210) ((~>) (Proxy b0123456789876543210) (Foo (a0123456789876543210 :: k0123456789876543210) (b0123456789876543210 :: k0123456789876543210)))
-      where
-        MkFooSym0KindInference :: forall t0123456789876543210
-                                         arg. SameKind (Apply MkFooSym0 arg) (MkFooSym1 arg) =>
-                                  MkFooSym0 t0123456789876543210
-    type instance Apply MkFooSym0 t0123456789876543210 = MkFooSym1 t0123456789876543210
diff --git a/tests/compile-and-dump/Singletons/T353.ghc88.template b/tests/compile-and-dump/Singletons/T353.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T353.ghc88.template
@@ -0,0 +1,104 @@
+Singletons/T353.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| type family Symmetry (a :: Proxy t) (y :: Proxy t) (e :: (a :: Proxy (t :: k))
+                                                                   :~:
+                                                                   (y :: Proxy (t :: k))) :: Type where
+            Symmetry a y _ = y :~: a |]
+  ======>
+    type family Symmetry (a :: Proxy t) (y :: Proxy t) (e :: (:~:) (a :: Proxy (t :: k)) (y :: Proxy (t :: k))) :: Type where
+      Symmetry a y _ = (:~:) y a
+    type SymmetrySym3 (a0123456789876543210 :: Proxy t0123456789876543210) (y0123456789876543210 :: Proxy t0123456789876543210) (e0123456789876543210 :: (:~:) (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) (y0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210))) =
+        Symmetry a0123456789876543210 y0123456789876543210 e0123456789876543210
+    instance SuppressUnusedWarnings (SymmetrySym2 y0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) SymmetrySym2KindInference) ())
+    data SymmetrySym2 (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) (y0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) :: (~>) ((:~:) (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) (y0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210))) Type
+      where
+        SymmetrySym2KindInference :: forall a0123456789876543210
+                                            y0123456789876543210
+                                            e0123456789876543210
+                                            arg. SameKind (Apply (SymmetrySym2 a0123456789876543210 y0123456789876543210) arg) (SymmetrySym3 a0123456789876543210 y0123456789876543210 arg) =>
+                                     SymmetrySym2 a0123456789876543210 y0123456789876543210 e0123456789876543210
+    type instance Apply (SymmetrySym2 y0123456789876543210 a0123456789876543210) e0123456789876543210 = Symmetry y0123456789876543210 a0123456789876543210 e0123456789876543210
+    instance SuppressUnusedWarnings (SymmetrySym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) SymmetrySym1KindInference) ())
+    data SymmetrySym1 (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) :: forall (y0123456789876543210 :: Proxy t0123456789876543210).
+                                                                                                        (~>) (Proxy t0123456789876543210) ((~>) ((:~:) (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) (y0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210))) Type)
+      where
+        SymmetrySym1KindInference :: forall a0123456789876543210
+                                            y0123456789876543210
+                                            arg. SameKind (Apply (SymmetrySym1 a0123456789876543210) arg) (SymmetrySym2 a0123456789876543210 arg) =>
+                                     SymmetrySym1 a0123456789876543210 y0123456789876543210
+    type instance Apply (SymmetrySym1 a0123456789876543210) y0123456789876543210 = SymmetrySym2 a0123456789876543210 y0123456789876543210
+    instance SuppressUnusedWarnings SymmetrySym0 where
+      suppressUnusedWarnings = snd (((,) SymmetrySym0KindInference) ())
+    data SymmetrySym0 :: forall k0123456789876543210
+                                (t0123456789876543210 :: k0123456789876543210)
+                                (a0123456789876543210 :: Proxy t0123456789876543210)
+                                (y0123456789876543210 :: Proxy t0123456789876543210).
+                         (~>) (Proxy t0123456789876543210) ((~>) (Proxy t0123456789876543210) ((~>) ((:~:) (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) (y0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210))) Type))
+      where
+        SymmetrySym0KindInference :: forall a0123456789876543210
+                                            arg. SameKind (Apply SymmetrySym0 arg) (SymmetrySym1 arg) =>
+                                     SymmetrySym0 a0123456789876543210
+    type instance Apply SymmetrySym0 a0123456789876543210 = SymmetrySym1 a0123456789876543210
+Singletons/T353.hs:0:0:: Splicing declarations
+    genDefunSymbols [''Prod]
+  ======>
+    type MkProdSym2 (t0123456789876543210 :: f0123456789876543210 p0123456789876543210) (t0123456789876543210 :: g0123456789876543210 p0123456789876543210) =
+        'MkProd t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (MkProdSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MkProdSym1KindInference) ())
+    data MkProdSym1 (t0123456789876543210 :: (f0123456789876543210 :: k0123456789876543210
+                                                                      -> Type) (p0123456789876543210 :: k0123456789876543210)) :: forall (g0123456789876543210 :: k0123456789876543210
+                                                                                                                                                                  -> Type).
+                                                                                                                                  (~>) (g0123456789876543210 p0123456789876543210) (Prod (f0123456789876543210 :: k0123456789876543210
+                                                                                                                                                                                                                  -> Type) (g0123456789876543210 :: k0123456789876543210
+                                                                                                                                                                                                                                                    -> Type) (p0123456789876543210 :: k0123456789876543210))
+      where
+        MkProdSym1KindInference :: forall t0123456789876543210
+                                          t0123456789876543210
+                                          arg. SameKind (Apply (MkProdSym1 t0123456789876543210) arg) (MkProdSym2 t0123456789876543210 arg) =>
+                                   MkProdSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (MkProdSym1 t0123456789876543210) t0123456789876543210 = 'MkProd t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings MkProdSym0 where
+      suppressUnusedWarnings = snd (((,) MkProdSym0KindInference) ())
+    data MkProdSym0 :: forall k0123456789876543210
+                              (f0123456789876543210 :: k0123456789876543210 -> Type)
+                              (p0123456789876543210 :: k0123456789876543210)
+                              (g0123456789876543210 :: k0123456789876543210 -> Type).
+                       (~>) (f0123456789876543210 p0123456789876543210) ((~>) (g0123456789876543210 p0123456789876543210) (Prod (f0123456789876543210 :: k0123456789876543210
+                                                                                                                                                         -> Type) (g0123456789876543210 :: k0123456789876543210
+                                                                                                                                                                                           -> Type) (p0123456789876543210 :: k0123456789876543210)))
+      where
+        MkProdSym0KindInference :: forall t0123456789876543210
+                                          arg. SameKind (Apply MkProdSym0 arg) (MkProdSym1 arg) =>
+                                   MkProdSym0 t0123456789876543210
+    type instance Apply MkProdSym0 t0123456789876543210 = MkProdSym1 t0123456789876543210
+Singletons/T353.hs:0:0:: Splicing declarations
+    genDefunSymbols [''Foo]
+  ======>
+    type MkFooSym2 (t0123456789876543210 :: Proxy a0123456789876543210) (t0123456789876543210 :: Proxy b0123456789876543210) =
+        'MkFoo t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (MkFooSym1 t0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) MkFooSym1KindInference) ())
+    data MkFooSym1 (t0123456789876543210 :: Proxy (a0123456789876543210 :: k0123456789876543210)) :: forall k0123456789876543210
+                                                                                                            (b0123456789876543210 :: k0123456789876543210).
+                                                                                                     (~>) (Proxy b0123456789876543210) (Foo (a0123456789876543210 :: k0123456789876543210) (b0123456789876543210 :: k0123456789876543210))
+      where
+        MkFooSym1KindInference :: forall t0123456789876543210
+                                         t0123456789876543210
+                                         arg. SameKind (Apply (MkFooSym1 t0123456789876543210) arg) (MkFooSym2 t0123456789876543210 arg) =>
+                                  MkFooSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (MkFooSym1 t0123456789876543210) t0123456789876543210 = 'MkFoo t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings MkFooSym0 where
+      suppressUnusedWarnings = snd (((,) MkFooSym0KindInference) ())
+    data MkFooSym0 :: forall k0123456789876543210
+                             (a0123456789876543210 :: k0123456789876543210)
+                             k0123456789876543210
+                             (b0123456789876543210 :: k0123456789876543210).
+                      (~>) (Proxy a0123456789876543210) ((~>) (Proxy b0123456789876543210) (Foo (a0123456789876543210 :: k0123456789876543210) (b0123456789876543210 :: k0123456789876543210)))
+      where
+        MkFooSym0KindInference :: forall t0123456789876543210
+                                         arg. SameKind (Apply MkFooSym0 arg) (MkFooSym1 arg) =>
+                                  MkFooSym0 t0123456789876543210
+    type instance Apply MkFooSym0 t0123456789876543210 = MkFooSym1 t0123456789876543210
diff --git a/tests/compile-and-dump/Singletons/T358.ghc86.template b/tests/compile-and-dump/Singletons/T358.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T358.ghc86.template
+++ /dev/null
@@ -1,118 +0,0 @@
-Singletons/T358.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| class C1 (f :: k -> Type) where
-            method1 :: f a
-          class C2 a where
-            method2a, method2b :: forall b. b -> a
-          
-          instance C1 [] where
-            method1 :: [a]
-            method1 = []
-          instance C2 [a] where
-            method2a _ = []
-            method2b :: forall b. b -> [a]
-            method2b _ = [] |]
-  ======>
-    class C1 (f :: k -> Type) where
-      method1 :: f a
-    instance C1 [] where
-      method1 :: [a]
-      method1 = []
-    class C2 a where
-      method2a :: forall b. b -> a
-      method2b :: forall b. b -> a
-    instance C2 [a] where
-      method2b :: forall b. b -> [a]
-      method2a _ = []
-      method2b _ = []
-    type Method1Sym0 = Method1
-    class PC1 (f :: k -> Type) where
-      type Method1 :: f a
-    type Method2aSym1 (arg0123456789876543210 :: b0123456789876543210) =
-        Method2a arg0123456789876543210
-    instance SuppressUnusedWarnings Method2aSym0 where
-      suppressUnusedWarnings = snd (((,) Method2aSym0KindInference) ())
-    data Method2aSym0 :: forall a0123456789876543210
-                                b0123456789876543210.
-                         (~>) b0123456789876543210 a0123456789876543210
-      where
-        Method2aSym0KindInference :: forall arg0123456789876543210
-                                            arg. SameKind (Apply Method2aSym0 arg) (Method2aSym1 arg) =>
-                                     Method2aSym0 arg0123456789876543210
-    type instance Apply Method2aSym0 arg0123456789876543210 = Method2a arg0123456789876543210
-    type Method2bSym1 (arg0123456789876543210 :: b0123456789876543210) =
-        Method2b arg0123456789876543210
-    instance SuppressUnusedWarnings Method2bSym0 where
-      suppressUnusedWarnings = snd (((,) Method2bSym0KindInference) ())
-    data Method2bSym0 :: forall a0123456789876543210
-                                b0123456789876543210.
-                         (~>) b0123456789876543210 a0123456789876543210
-      where
-        Method2bSym0KindInference :: forall arg0123456789876543210
-                                            arg. SameKind (Apply Method2bSym0 arg) (Method2bSym1 arg) =>
-                                     Method2bSym0 arg0123456789876543210
-    type instance Apply Method2bSym0 arg0123456789876543210 = Method2b arg0123456789876543210
-    class PC2 (a :: Type) where
-      type Method2a (arg :: b) :: a
-      type Method2b (arg :: b) :: a
-    type family Method1_0123456789876543210 :: [a] where
-      Method1_0123456789876543210 = '[]
-    type Method1_0123456789876543210Sym0 = Method1_0123456789876543210
-    instance PC1 [] where
-      type Method1 = Method1_0123456789876543210Sym0
-    type family Method2a_0123456789876543210 (a :: b) :: [a] where
-      Method2a_0123456789876543210 _ = '[]
-    type Method2a_0123456789876543210Sym1 (a0123456789876543210 :: b0123456789876543210) =
-        Method2a_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Method2a_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Method2a_0123456789876543210Sym0KindInference) ())
-    data Method2a_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                    b0123456789876543210.
-                                             (~>) b0123456789876543210 [a0123456789876543210]
-      where
-        Method2a_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply Method2a_0123456789876543210Sym0 arg) (Method2a_0123456789876543210Sym1 arg) =>
-                                                         Method2a_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Method2a_0123456789876543210Sym0 a0123456789876543210 = Method2a_0123456789876543210 a0123456789876543210
-    type family Method2b_0123456789876543210 (a :: b) :: [a] where
-      Method2b_0123456789876543210 _ = '[]
-    type Method2b_0123456789876543210Sym1 (a0123456789876543210 :: b0123456789876543210) =
-        Method2b_0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings Method2b_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) Method2b_0123456789876543210Sym0KindInference) ())
-    data Method2b_0123456789876543210Sym0 :: forall a0123456789876543210
-                                                    b0123456789876543210.
-                                             (~>) b0123456789876543210 [a0123456789876543210]
-      where
-        Method2b_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                arg. SameKind (Apply Method2b_0123456789876543210Sym0 arg) (Method2b_0123456789876543210Sym1 arg) =>
-                                                         Method2b_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply Method2b_0123456789876543210Sym0 a0123456789876543210 = Method2b_0123456789876543210 a0123456789876543210
-    instance PC2 [a] where
-      type Method2a a = Apply Method2a_0123456789876543210Sym0 a
-      type Method2b a = Apply Method2b_0123456789876543210Sym0 a
-    class SC1 (f :: k -> Type) where
-      sMethod1 :: forall a. Sing (Method1Sym0 :: f a)
-    class SC2 a where
-      sMethod2a ::
-        forall b (t :: b). Sing t -> Sing (Apply Method2aSym0 t :: a)
-      sMethod2b ::
-        forall b (t :: b). Sing t -> Sing (Apply Method2bSym0 t :: a)
-    instance SC1 [] where
-      sMethod1 :: forall a. Sing (Method1Sym0 :: [a])
-      sMethod1 = Data.Singletons.Prelude.Instances.SNil
-    instance SC2 [a] where
-      sMethod2a ::
-        forall b (t :: b). Sing t -> Sing (Apply Method2aSym0 t :: [a])
-      sMethod2b ::
-        forall b (t :: b). Sing t -> Sing (Apply Method2bSym0 t :: [a])
-      sMethod2a _
-        = Data.Singletons.Prelude.Instances.SNil
-      sMethod2b _
-        = Data.Singletons.Prelude.Instances.SNil
-    instance SC2 a => SingI (Method2aSym0 :: (~>) b a) where
-      sing = (singFun1 @Method2aSym0) sMethod2a
-    instance SC2 a => SingI (Method2bSym0 :: (~>) b a) where
-      sing = (singFun1 @Method2bSym0) sMethod2b
diff --git a/tests/compile-and-dump/Singletons/T358.ghc88.template b/tests/compile-and-dump/Singletons/T358.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T358.ghc88.template
@@ -0,0 +1,116 @@
+Singletons/T358.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| class C1 (f :: k -> Type) where
+            method1 :: f a
+          class C2 a where
+            method2a, method2b :: forall b. b -> a
+          
+          instance C1 [] where
+            method1 :: [a]
+            method1 = []
+          instance C2 [a] where
+            method2a _ = []
+            method2b :: forall b. b -> [a]
+            method2b _ = [] |]
+  ======>
+    class C1 (f :: k -> Type) where
+      method1 :: f a
+    instance C1 [] where
+      method1 :: [a]
+      method1 = []
+    class C2 a where
+      method2a :: forall b. b -> a
+      method2b :: forall b. b -> a
+    instance C2 [a] where
+      method2b :: forall b. b -> [a]
+      method2a _ = []
+      method2b _ = []
+    type Method1Sym0 = Method1
+    class PC1 (f :: k -> Type) where
+      type Method1 :: f a
+    type Method2aSym1 (arg0123456789876543210 :: b0123456789876543210) =
+        Method2a arg0123456789876543210
+    instance SuppressUnusedWarnings Method2aSym0 where
+      suppressUnusedWarnings = snd (((,) Method2aSym0KindInference) ())
+    data Method2aSym0 :: forall b0123456789876543210
+                                a0123456789876543210.
+                         (~>) b0123456789876543210 a0123456789876543210
+      where
+        Method2aSym0KindInference :: forall arg0123456789876543210
+                                            arg. SameKind (Apply Method2aSym0 arg) (Method2aSym1 arg) =>
+                                     Method2aSym0 arg0123456789876543210
+    type instance Apply Method2aSym0 arg0123456789876543210 = Method2a arg0123456789876543210
+    type Method2bSym1 (arg0123456789876543210 :: b0123456789876543210) =
+        Method2b arg0123456789876543210
+    instance SuppressUnusedWarnings Method2bSym0 where
+      suppressUnusedWarnings = snd (((,) Method2bSym0KindInference) ())
+    data Method2bSym0 :: forall b0123456789876543210
+                                a0123456789876543210.
+                         (~>) b0123456789876543210 a0123456789876543210
+      where
+        Method2bSym0KindInference :: forall arg0123456789876543210
+                                            arg. SameKind (Apply Method2bSym0 arg) (Method2bSym1 arg) =>
+                                     Method2bSym0 arg0123456789876543210
+    type instance Apply Method2bSym0 arg0123456789876543210 = Method2b arg0123456789876543210
+    class PC2 (a :: Type) where
+      type Method2a (arg :: b) :: a
+      type Method2b (arg :: b) :: a
+    type family Method1_0123456789876543210 :: [a] where
+      Method1_0123456789876543210 = '[]
+    type Method1_0123456789876543210Sym0 = Method1_0123456789876543210
+    instance PC1 [] where
+      type Method1 = Method1_0123456789876543210Sym0
+    type family Method2a_0123456789876543210 (a :: b) :: [a] where
+      Method2a_0123456789876543210 _ = '[]
+    type Method2a_0123456789876543210Sym1 (a0123456789876543210 :: b0123456789876543210) =
+        Method2a_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Method2a_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Method2a_0123456789876543210Sym0KindInference) ())
+    data Method2a_0123456789876543210Sym0 :: forall b0123456789876543210
+                                                    a0123456789876543210.
+                                             (~>) b0123456789876543210 [a0123456789876543210]
+      where
+        Method2a_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply Method2a_0123456789876543210Sym0 arg) (Method2a_0123456789876543210Sym1 arg) =>
+                                                         Method2a_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Method2a_0123456789876543210Sym0 a0123456789876543210 = Method2a_0123456789876543210 a0123456789876543210
+    type family Method2b_0123456789876543210 (a :: b) :: [a] where
+      Method2b_0123456789876543210 _ = '[]
+    type Method2b_0123456789876543210Sym1 (a0123456789876543210 :: b0123456789876543210) =
+        Method2b_0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings Method2b_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) Method2b_0123456789876543210Sym0KindInference) ())
+    data Method2b_0123456789876543210Sym0 :: forall b0123456789876543210
+                                                    a0123456789876543210.
+                                             (~>) b0123456789876543210 [a0123456789876543210]
+      where
+        Method2b_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                arg. SameKind (Apply Method2b_0123456789876543210Sym0 arg) (Method2b_0123456789876543210Sym1 arg) =>
+                                                         Method2b_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply Method2b_0123456789876543210Sym0 a0123456789876543210 = Method2b_0123456789876543210 a0123456789876543210
+    instance PC2 [a] where
+      type Method2a a = Apply Method2a_0123456789876543210Sym0 a
+      type Method2b a = Apply Method2b_0123456789876543210Sym0 a
+    class SC1 (f :: k -> Type) where
+      sMethod1 :: forall a. Sing (Method1Sym0 :: f a)
+    class SC2 a where
+      sMethod2a ::
+        forall b (t :: b). Sing t -> Sing (Apply Method2aSym0 t :: a)
+      sMethod2b ::
+        forall b (t :: b). Sing t -> Sing (Apply Method2bSym0 t :: a)
+    instance SC1 [] where
+      sMethod1 :: forall a. Sing (Method1Sym0 :: [a])
+      sMethod1 = Data.Singletons.Prelude.Instances.SNil
+    instance SC2 [a] where
+      sMethod2a ::
+        forall b (t :: b). Sing t -> Sing (Apply Method2aSym0 t :: [a])
+      sMethod2b ::
+        forall b (t :: b). Sing t -> Sing (Apply Method2bSym0 t :: [a])
+      sMethod2a _ = Data.Singletons.Prelude.Instances.SNil
+      sMethod2b _ = Data.Singletons.Prelude.Instances.SNil
+    instance SC2 a => SingI (Method2aSym0 :: (~>) b a) where
+      sing = (singFun1 @Method2aSym0) sMethod2a
+    instance SC2 a => SingI (Method2bSym0 :: (~>) b a) where
+      sing = (singFun1 @Method2bSym0) sMethod2b
diff --git a/tests/compile-and-dump/Singletons/T367.ghc88.template b/tests/compile-and-dump/Singletons/T367.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T367.ghc88.template
@@ -0,0 +1,39 @@
+Singletons/T367.hs:(0,0)-(0,0): Splicing declarations
+    singletonsOnly
+      [d| const' :: a -> b -> a
+          const' x _ = x |]
+  ======>
+    type Const'Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) =
+        Const' a0123456789876543210 a0123456789876543210
+    instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Const'Sym1 a0123456789876543210) where
+      Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings
+        = snd (((,) Const'Sym1KindInference) ())
+    data Const'Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210.
+                                                                      (~>) b0123456789876543210 a0123456789876543210
+      where
+        Const'Sym1KindInference :: forall a0123456789876543210
+                                          a0123456789876543210
+                                          arg. SameKind (Apply (Const'Sym1 a0123456789876543210) arg) (Const'Sym2 a0123456789876543210 arg) =>
+                                   Const'Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (Const'Sym1 a0123456789876543210) a0123456789876543210 = Const' a0123456789876543210 a0123456789876543210
+    instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Const'Sym0 where
+      Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings
+        = snd (((,) Const'Sym0KindInference) ())
+    data Const'Sym0 :: forall a0123456789876543210
+                              b0123456789876543210.
+                       (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210)
+      where
+        Const'Sym0KindInference :: forall a0123456789876543210
+                                          arg. SameKind (Apply Const'Sym0 arg) (Const'Sym1 arg) =>
+                                   Const'Sym0 a0123456789876543210
+    type instance Apply Const'Sym0 a0123456789876543210 = Const'Sym1 a0123456789876543210
+    type family Const' (a :: a) (a :: b) :: a where
+      Const' x _ = x
+    sConst' ::
+      forall a b (t :: a) (t :: b).
+      Sing t -> Sing t -> Sing (Apply (Apply Const'Sym0 t) t :: a)
+    sConst' (sX :: Sing x) _ = sX
+    instance SingI (Const'Sym0 :: (~>) a ((~>) b a)) where
+      sing = (singFun2 @Const'Sym0) sConst'
+    instance SingI d => SingI (Const'Sym1 (d :: a) :: (~>) b a) where
+      sing = (singFun1 @(Const'Sym1 (d :: a))) (sConst' (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T367.hs b/tests/compile-and-dump/Singletons/T367.hs
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T367.hs
@@ -0,0 +1,12 @@
+module T367 where
+
+import Data.Singletons.Prelude
+import Data.Singletons.TH (singletonsOnly)
+
+$(singletonsOnly [d|
+  const' :: a -> b -> a
+  const' x _ = x
+  |])
+
+test :: Sing True
+test = sConst' @Bool @() STrue STuple0
diff --git a/tests/compile-and-dump/Singletons/T371.ghc86.template b/tests/compile-and-dump/Singletons/T371.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T371.ghc86.template
+++ /dev/null
@@ -1,233 +0,0 @@
-Singletons/T371.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| data Y (a :: Type)
-            = Y1 | Y2 (X a)
-            deriving Show
-          data X (a :: Type)
-            = X1 | X2 (Y a)
-            deriving Show |]
-  ======>
-    data X (a :: Type)
-      = X1 | X2 (Y a)
-      deriving Show
-    data Y (a :: Type)
-      = Y1 | Y2 (X a)
-      deriving Show
-    type X1Sym0 = X1
-    type X2Sym1 (t0123456789876543210 :: Y a0123456789876543210) =
-        X2 t0123456789876543210
-    instance SuppressUnusedWarnings X2Sym0 where
-      suppressUnusedWarnings = snd (((,) X2Sym0KindInference) ())
-    data X2Sym0 :: forall (a0123456789876543210 :: Type).
-                   (~>) (Y a0123456789876543210) (X (a0123456789876543210 :: Type))
-      where
-        X2Sym0KindInference :: forall t0123456789876543210
-                                      arg. SameKind (Apply X2Sym0 arg) (X2Sym1 arg) =>
-                               X2Sym0 t0123456789876543210
-    type instance Apply X2Sym0 t0123456789876543210 = X2 t0123456789876543210
-    type Y1Sym0 = Y1
-    type Y2Sym1 (t0123456789876543210 :: X a0123456789876543210) =
-        Y2 t0123456789876543210
-    instance SuppressUnusedWarnings Y2Sym0 where
-      suppressUnusedWarnings = snd (((,) Y2Sym0KindInference) ())
-    data Y2Sym0 :: forall (a0123456789876543210 :: Type).
-                   (~>) (X a0123456789876543210) (Y (a0123456789876543210 :: Type))
-      where
-        Y2Sym0KindInference :: forall t0123456789876543210
-                                      arg. SameKind (Apply Y2Sym0 arg) (Y2Sym1 arg) =>
-                               Y2Sym0 t0123456789876543210
-    type instance Apply Y2Sym0 t0123456789876543210 = Y2 t0123456789876543210
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: X a) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where
-      ShowsPrec_0123456789876543210 _ X1 a_0123456789876543210 = Apply (Apply ShowStringSym0 "X1") a_0123456789876543210
-      ShowsPrec_0123456789876543210 p_0123456789876543210 (X2 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (Data.Singletons.Prelude.Num.FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "X2 ")) (Apply (Apply ShowsPrecSym0 (Data.Singletons.Prelude.Num.FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: X a0123456789876543210) (a0123456789876543210 :: GHC.Types.Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: X a0123456789876543210) :: (~>) GHC.Types.Symbol GHC.Types.Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210.
-                                                                                      (~>) (X a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210.
-                                              (~>) GHC.Types.Nat ((~>) (X a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow (X a) where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Y a) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where
-      ShowsPrec_0123456789876543210 _ Y1 a_0123456789876543210 = Apply (Apply ShowStringSym0 "Y1") a_0123456789876543210
-      ShowsPrec_0123456789876543210 p_0123456789876543210 (Y2 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (Data.Singletons.Prelude.Num.FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Y2 ")) (Apply (Apply ShowsPrecSym0 (Data.Singletons.Prelude.Num.FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210
-    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Y a0123456789876543210) (a0123456789876543210 :: GHC.Types.Symbol) =
-        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
-    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Y a0123456789876543210) :: (~>) GHC.Types.Symbol GHC.Types.Symbol
-      where
-        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
-    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210.
-                                                                                      (~>) (Y a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol)
-      where
-        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
-                                                                 a0123456789876543210
-                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
-    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
-    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
-    data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210.
-                                              (~>) GHC.Types.Nat ((~>) (Y a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol))
-      where
-        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
-                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
-                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
-    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
-    instance PShow (Y a) where
-      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
-    data instance Sing :: X a -> Type
-      where
-        SX1 :: Sing X1
-        SX2 :: forall a (n :: Y a). (Sing (n :: Y a)) -> Sing (X2 n)
-    type SX = (Sing :: X a -> Type)
-    instance SingKind a => SingKind (X a) where
-      type Demote (X a) = X (Demote a)
-      fromSing SX1 = X1
-      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) }
-    data instance Sing :: Y a -> Type
-      where
-        SY1 :: Sing Y1
-        SY2 :: forall a (n :: X a). (Sing (n :: X a)) -> Sing (Y2 n)
-    type SY = (Sing :: Y a -> Type)
-    instance SingKind a => SingKind (Y a) where
-      type Demote (Y a) = Y (Demote a)
-      fromSing SY1 = Y1
-      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) }
-    instance SShow (Y a) => SShow (X a) where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: X a) (t3 :: GHC.Types.Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) (X a) ((~>) GHC.Types.Symbol GHC.Types.Symbol))
-                                                             -> Type) t1) t2) t3)
-      sShowsPrec
-        _
-        SX1
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "X1")))
-            sA_0123456789876543210
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        (SX2 (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 10)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                          (sing :: Sing "X2 "))))
-                   ((applySing
-                       ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                          (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 11))))
-                      sArg_0123456789876543210))))
-            sA_0123456789876543210
-    instance SShow (X a) => SShow (Y a) where
-      sShowsPrec ::
-        forall (t1 :: GHC.Types.Nat) (t2 :: Y a) (t3 :: GHC.Types.Symbol).
-        Sing t1
-        -> Sing t2
-           -> Sing t3
-              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) (Y a) ((~>) GHC.Types.Symbol GHC.Types.Symbol))
-                                                             -> Type) t1) t2) t3)
-      sShowsPrec
-        _
-        SY1
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                (sing :: Sing "Y1")))
-            sA_0123456789876543210
-      sShowsPrec
-        (sP_0123456789876543210 :: Sing p_0123456789876543210)
-        (SY2 (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
-        (sA_0123456789876543210 :: Sing a_0123456789876543210)
-        = (applySing
-             ((applySing
-                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
-                    ((applySing
-                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
-                       (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 10)))))
-                ((applySing
-                    ((applySing ((singFun3 @(.@#@$)) (%.)))
-                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
-                          (sing :: Sing "Y2 "))))
-                   ((applySing
-                       ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
-                          (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 11))))
-                      sArg_0123456789876543210))))
-            sA_0123456789876543210
-    deriving instance Data.Singletons.ShowSing.ShowSing (Y a) =>
-                      Show (Sing (z :: X a))
-    deriving instance Data.Singletons.ShowSing.ShowSing (X a) =>
-                      Show (Sing (z :: Y a))
-    instance SingI X1 where
-      sing = SX1
-    instance SingI n => SingI (X2 (n :: Y a)) where
-      sing = SX2 sing
-    instance SingI (X2Sym0 :: (~>) (Y a) (X (a :: Type))) where
-      sing = (singFun1 @X2Sym0) SX2
-    instance SingI (TyCon1 X2 :: (~>) (Y a) (X (a :: Type))) where
-      sing = (singFun1 @(TyCon1 X2)) SX2
-    instance SingI Y1 where
-      sing = SY1
-    instance SingI n => SingI (Y2 (n :: X a)) where
-      sing = SY2 sing
-    instance SingI (Y2Sym0 :: (~>) (X a) (Y (a :: Type))) where
-      sing = (singFun1 @Y2Sym0) SY2
-    instance SingI (TyCon1 Y2 :: (~>) (X a) (Y (a :: Type))) where
-      sing = (singFun1 @(TyCon1 Y2)) SY2
diff --git a/tests/compile-and-dump/Singletons/T371.ghc88.template b/tests/compile-and-dump/Singletons/T371.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T371.ghc88.template
@@ -0,0 +1,247 @@
+Singletons/T371.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| data Y (a :: Type)
+            = Y1 | Y2 (X a)
+            deriving Show
+          data X (a :: Type)
+            = X1 | X2 (Y a)
+            deriving Show |]
+  ======>
+    data X (a :: Type)
+      = X1 | X2 (Y a)
+      deriving Show
+    data Y (a :: Type)
+      = Y1 | Y2 (X a)
+      deriving Show
+    type X1Sym0 = X1
+    type X2Sym1 (t0123456789876543210 :: Y a0123456789876543210) =
+        X2 t0123456789876543210
+    instance SuppressUnusedWarnings X2Sym0 where
+      suppressUnusedWarnings = snd (((,) X2Sym0KindInference) ())
+    data X2Sym0 :: forall (a0123456789876543210 :: Type).
+                   (~>) (Y a0123456789876543210) (X (a0123456789876543210 :: Type))
+      where
+        X2Sym0KindInference :: forall t0123456789876543210
+                                      arg. SameKind (Apply X2Sym0 arg) (X2Sym1 arg) =>
+                               X2Sym0 t0123456789876543210
+    type instance Apply X2Sym0 t0123456789876543210 = X2 t0123456789876543210
+    type Y1Sym0 = Y1
+    type Y2Sym1 (t0123456789876543210 :: X a0123456789876543210) =
+        Y2 t0123456789876543210
+    instance SuppressUnusedWarnings Y2Sym0 where
+      suppressUnusedWarnings = snd (((,) Y2Sym0KindInference) ())
+    data Y2Sym0 :: forall (a0123456789876543210 :: Type).
+                   (~>) (X a0123456789876543210) (Y (a0123456789876543210 :: Type))
+      where
+        Y2Sym0KindInference :: forall t0123456789876543210
+                                      arg. SameKind (Apply Y2Sym0 arg) (Y2Sym1 arg) =>
+                               Y2Sym0 t0123456789876543210
+    type instance Apply Y2Sym0 t0123456789876543210 = Y2 t0123456789876543210
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: X a) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where
+      ShowsPrec_0123456789876543210 _ X1 a_0123456789876543210 = Apply (Apply ShowStringSym0 "X1") a_0123456789876543210
+      ShowsPrec_0123456789876543210 p_0123456789876543210 (X2 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (Data.Singletons.Prelude.Num.FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "X2 ")) (Apply (Apply ShowsPrecSym0 (Data.Singletons.Prelude.Num.FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: X a0123456789876543210) (a0123456789876543210 :: GHC.Types.Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: X a0123456789876543210) :: (~>) GHC.Types.Symbol GHC.Types.Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210.
+                                                                                      (~>) (X a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210.
+                                              (~>) GHC.Types.Nat ((~>) (X a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow (X a) where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Y a) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where
+      ShowsPrec_0123456789876543210 _ Y1 a_0123456789876543210 = Apply (Apply ShowStringSym0 "Y1") a_0123456789876543210
+      ShowsPrec_0123456789876543210 p_0123456789876543210 (Y2 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (Data.Singletons.Prelude.Num.FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "Y2 ")) (Apply (Apply ShowsPrecSym0 (Data.Singletons.Prelude.Num.FromInteger 11)) arg_0123456789876543210))) a_0123456789876543210
+    type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Y a0123456789876543210) (a0123456789876543210 :: GHC.Types.Symbol) =
+        ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ())
+    data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Y a0123456789876543210) :: (~>) GHC.Types.Symbol GHC.Types.Symbol
+      where
+        ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ())
+    data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210.
+                                                                                      (~>) (Y a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol)
+      where
+        ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210
+                                                                 a0123456789876543210
+                                                                 arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ())
+    data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210.
+                                              (~>) GHC.Types.Nat ((~>) (Y a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol))
+      where
+        ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210
+                                                                 arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) =>
+                                                          ShowsPrec_0123456789876543210Sym0 a0123456789876543210
+    type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210
+    instance PShow (Y a) where
+      type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a
+    data SX :: forall a. X a -> Type
+      where
+        SX1 :: SX X1
+        SX2 :: forall a (n :: Y a). (Sing (n :: Y a)) -> SX (X2 n)
+    type instance Sing @(X a) = SX
+    instance SingKind a => SingKind (X a) where
+      type Demote (X a) = X (Demote a)
+      fromSing SX1 = X1
+      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) }
+    data SY :: forall a. Y a -> Type
+      where
+        SY1 :: SY Y1
+        SY2 :: forall a (n :: X a). (Sing (n :: X a)) -> SY (Y2 n)
+    type instance Sing @(Y a) = SY
+    instance SingKind a => SingKind (Y a) where
+      type Demote (Y a) = Y (Demote a)
+      fromSing SY1 = Y1
+      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) }
+    instance SShow (Y a) => SShow (X a) where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: X a) (t3 :: GHC.Types.Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) (X a) ((~>) GHC.Types.Symbol GHC.Types.Symbol))
+                                                             -> Type) t1) t2) t3)
+      sShowsPrec
+        _
+        SX1
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "X1")))
+            sA_0123456789876543210
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        (SX2 (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 10)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                          (sing :: Sing "X2 "))))
+                   ((applySing
+                       ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                          (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 11))))
+                      sArg_0123456789876543210))))
+            sA_0123456789876543210
+    instance SShow (X a) => SShow (Y a) where
+      sShowsPrec ::
+        forall (t1 :: GHC.Types.Nat) (t2 :: Y a) (t3 :: GHC.Types.Symbol).
+        Sing t1
+        -> Sing t2
+           -> Sing t3
+              -> Sing (Apply (Apply (Apply (ShowsPrecSym0 :: TyFun GHC.Types.Nat ((~>) (Y a) ((~>) GHC.Types.Symbol GHC.Types.Symbol))
+                                                             -> Type) t1) t2) t3)
+      sShowsPrec
+        _
+        SY1
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                (sing :: Sing "Y1")))
+            sA_0123456789876543210
+      sShowsPrec
+        (sP_0123456789876543210 :: Sing p_0123456789876543210)
+        (SY2 (sArg_0123456789876543210 :: Sing arg_0123456789876543210))
+        (sA_0123456789876543210 :: Sing a_0123456789876543210)
+        = (applySing
+             ((applySing
+                 ((applySing ((singFun3 @ShowParenSym0) sShowParen))
+                    ((applySing
+                        ((applySing ((singFun2 @(>@#@$)) (%>))) sP_0123456789876543210))
+                       (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 10)))))
+                ((applySing
+                    ((applySing ((singFun3 @(.@#@$)) (%.)))
+                       ((applySing ((singFun2 @ShowStringSym0) sShowString))
+                          (sing :: Sing "Y2 "))))
+                   ((applySing
+                       ((applySing ((singFun3 @ShowsPrecSym0) sShowsPrec))
+                          (Data.Singletons.Prelude.Num.sFromInteger (sing :: Sing 11))))
+                      sArg_0123456789876543210))))
+            sA_0123456789876543210
+    instance Data.Singletons.ShowSing.ShowSing (Y a) =>
+             Show (SX (z :: X a)) where
+      showsPrec _ SX1 = showString "SX1"
+      showsPrec
+        p_0123456789876543210
+        (SX2 (arg_0123456789876543210 :: Sing argTy_0123456789876543210))
+        = (showParen (((>) p_0123456789876543210) 10))
+            (((.) (showString "SX2 "))
+               ((showsPrec 11) arg_0123456789876543210)) ::
+            Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210 =>
+            ShowS
+    instance Data.Singletons.ShowSing.ShowSing (X a) =>
+             Show (SY (z :: Y a)) where
+      showsPrec _ SY1 = showString "SY1"
+      showsPrec
+        p_0123456789876543210
+        (SY2 (arg_0123456789876543210 :: Sing argTy_0123456789876543210))
+        = (showParen (((>) p_0123456789876543210) 10))
+            (((.) (showString "SY2 "))
+               ((showsPrec 11) arg_0123456789876543210)) ::
+            Data.Singletons.ShowSing.ShowSing' argTy_0123456789876543210 =>
+            ShowS
+    instance SingI X1 where
+      sing = SX1
+    instance SingI n => SingI (X2 (n :: Y a)) where
+      sing = SX2 sing
+    instance SingI (X2Sym0 :: (~>) (Y a) (X (a :: Type))) where
+      sing = (singFun1 @X2Sym0) SX2
+    instance SingI Y1 where
+      sing = SY1
+    instance SingI n => SingI (Y2 (n :: X a)) where
+      sing = SY2 sing
+    instance SingI (Y2Sym0 :: (~>) (X a) (Y (a :: Type))) where
+      sing = (singFun1 @Y2Sym0) SY2
diff --git a/tests/compile-and-dump/Singletons/T376.ghc88.template b/tests/compile-and-dump/Singletons/T376.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T376.ghc88.template
@@ -0,0 +1,40 @@
+Singletons/T376.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| f :: (() -> ()) -> (() -> ())
+          f g = g :: () -> () |]
+  ======>
+    f :: (() -> ()) -> () -> ()
+    f g = g :: () -> ()
+    type FSym2 (a0123456789876543210 :: (~>) () ()) (a0123456789876543210 :: ()) =
+        F a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings (FSym1 a0123456789876543210) where
+      suppressUnusedWarnings = snd (((,) FSym1KindInference) ())
+    data FSym1 (a0123456789876543210 :: (~>) () ()) :: (~>) () ()
+      where
+        FSym1KindInference :: forall a0123456789876543210
+                                     a0123456789876543210
+                                     arg. SameKind (Apply (FSym1 a0123456789876543210) arg) (FSym2 a0123456789876543210 arg) =>
+                              FSym1 a0123456789876543210 a0123456789876543210
+    type instance Apply (FSym1 a0123456789876543210) a0123456789876543210 = F a0123456789876543210 a0123456789876543210
+    instance SuppressUnusedWarnings FSym0 where
+      suppressUnusedWarnings = snd (((,) FSym0KindInference) ())
+    data FSym0 :: (~>) ((~>) () ()) ((~>) () ())
+      where
+        FSym0KindInference :: forall a0123456789876543210
+                                     arg. SameKind (Apply FSym0 arg) (FSym1 arg) =>
+                              FSym0 a0123456789876543210
+    type instance Apply FSym0 a0123456789876543210 = FSym1 a0123456789876543210
+    type family F (a :: (~>) () ()) (a :: ()) :: () where
+      F g a_0123456789876543210 = Apply (g :: (~>) () ()) a_0123456789876543210
+    sF ::
+      forall (t :: (~>) () ()) (t :: ()).
+      Sing t -> Sing t -> Sing (Apply (Apply FSym0 t) t :: ())
+    sF
+      (sG :: Sing g)
+      (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = (applySing (sG :: Sing (g :: (~>) () ()))) sA_0123456789876543210
+    instance SingI (FSym0 :: (~>) ((~>) () ()) ((~>) () ())) where
+      sing = (singFun2 @FSym0) sF
+    instance SingI d =>
+             SingI (FSym1 (d :: (~>) () ()) :: (~>) () ()) where
+      sing = (singFun1 @(FSym1 (d :: (~>) () ()))) (sF (sing @d))
diff --git a/tests/compile-and-dump/Singletons/T376.hs b/tests/compile-and-dump/Singletons/T376.hs
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T376.hs
@@ -0,0 +1,8 @@
+module T376 where
+
+import Data.Singletons.TH
+
+$(singletons [d|
+  f :: (() -> ()) -> (() -> ())
+  f g = g :: () -> ()
+  |])
diff --git a/tests/compile-and-dump/Singletons/T402.ghc88.template b/tests/compile-and-dump/Singletons/T402.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T402.ghc88.template
@@ -0,0 +1,15 @@
+Singletons/T402.hs:0:0:: Splicing declarations
+    singletons [d| type AnyOfKind (k :: Type) = Any :: k |]
+  ======>
+    type AnyOfKind (k :: Type) = Any :: k
+    type AnyOfKindSym1 (k0123456789876543210 :: Type) =
+        AnyOfKind k0123456789876543210
+    instance SuppressUnusedWarnings AnyOfKindSym0 where
+      suppressUnusedWarnings = snd (((,) AnyOfKindSym0KindInference) ())
+    data AnyOfKindSym0 :: forall (k0123456789876543210 :: Type).
+                          (~>) Type k0123456789876543210
+      where
+        AnyOfKindSym0KindInference :: forall k0123456789876543210
+                                             arg. SameKind (Apply AnyOfKindSym0 arg) (AnyOfKindSym1 arg) =>
+                                      AnyOfKindSym0 k0123456789876543210
+    type instance Apply AnyOfKindSym0 k0123456789876543210 = AnyOfKind k0123456789876543210
diff --git a/tests/compile-and-dump/Singletons/T402.hs b/tests/compile-and-dump/Singletons/T402.hs
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T402.hs
@@ -0,0 +1,7 @@
+module T402 where
+
+import Data.Kind
+import Data.Singletons.TH
+
+type family Any :: k
+$(singletons [d| type AnyOfKind (k :: Type) = Any :: k |])
diff --git a/tests/compile-and-dump/Singletons/T54.ghc86.template b/tests/compile-and-dump/Singletons/T54.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T54.ghc86.template
+++ /dev/null
@@ -1,53 +0,0 @@
-Singletons/T54.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| g :: Bool -> Bool
-          g e = (case [not] of { [_] -> not }) e |]
-  ======>
-    g :: Bool -> Bool
-    g e = (case [not] of { [_] -> not }) e
-    type Let0123456789876543210Scrutinee_0123456789876543210Sym1 e0123456789876543210 =
-        Let0123456789876543210Scrutinee_0123456789876543210 e0123456789876543210
-    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
-      suppressUnusedWarnings
-        = snd
-            (((,)
-                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
-               ())
-    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 e0123456789876543210
-      where
-        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall e0123456789876543210
-                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
-                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 e0123456789876543210
-    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 e0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 e0123456789876543210
-    type family Let0123456789876543210Scrutinee_0123456789876543210 e where
-      Let0123456789876543210Scrutinee_0123456789876543210 e = Apply (Apply (:@#@$) NotSym0) '[]
-    type family Case_0123456789876543210 e t where
-      Case_0123456789876543210 e '[_] = NotSym0
-    type GSym1 (a0123456789876543210 :: Bool) = G a0123456789876543210
-    instance SuppressUnusedWarnings GSym0 where
-      suppressUnusedWarnings = snd (((,) GSym0KindInference) ())
-    data GSym0 :: (~>) Bool Bool
-      where
-        GSym0KindInference :: forall a0123456789876543210
-                                     arg. SameKind (Apply GSym0 arg) (GSym1 arg) =>
-                              GSym0 a0123456789876543210
-    type instance Apply GSym0 a0123456789876543210 = G a0123456789876543210
-    type family G (a :: Bool) :: Bool where
-      G e = Apply (Case_0123456789876543210 e (Let0123456789876543210Scrutinee_0123456789876543210Sym1 e)) e
-    sG :: forall (t :: Bool). Sing t -> Sing (Apply GSym0 t :: Bool)
-    sG (sE :: Sing e)
-      = (applySing
-           (let
-              sScrutinee_0123456789876543210 ::
-                Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym1 e)
-              sScrutinee_0123456789876543210
-                = (applySing
-                     ((applySing ((singFun2 @(:@#@$)) SCons))
-                        ((singFun1 @NotSym0) sNot)))
-                    SNil
-            in  (case sScrutinee_0123456789876543210 of {
-                   SCons _ SNil -> (singFun1 @NotSym0) sNot }) ::
-                  Sing (Case_0123456789876543210 e (Let0123456789876543210Scrutinee_0123456789876543210Sym1 e))))
-          sE
-    instance SingI (GSym0 :: (~>) Bool Bool) where
-      sing = (singFun1 @GSym0) sG
diff --git a/tests/compile-and-dump/Singletons/T54.ghc88.template b/tests/compile-and-dump/Singletons/T54.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T54.ghc88.template
@@ -0,0 +1,55 @@
+Singletons/T54.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| g :: Bool -> Bool
+          g e = (case [not] of { [_] -> not }) e |]
+  ======>
+    g :: Bool -> Bool
+    g e = (case [not] of { [_] -> not }) e
+    type Let0123456789876543210Scrutinee_0123456789876543210Sym1 e0123456789876543210 =
+        Let0123456789876543210Scrutinee_0123456789876543210 e0123456789876543210
+    instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where
+      suppressUnusedWarnings
+        = snd
+            (((,)
+                Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference)
+               ())
+    data Let0123456789876543210Scrutinee_0123456789876543210Sym0 e0123456789876543210
+      where
+        Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall e0123456789876543210
+                                                                                       arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) =>
+                                                                                Let0123456789876543210Scrutinee_0123456789876543210Sym0 e0123456789876543210
+    type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 e0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 e0123456789876543210
+    type family Let0123456789876543210Scrutinee_0123456789876543210 e where
+      Let0123456789876543210Scrutinee_0123456789876543210 e = Apply (Apply (:@#@$) NotSym0) '[]
+    type family Case_0123456789876543210 e t where
+      Case_0123456789876543210 e '[_] = NotSym0
+    type GSym1 (a0123456789876543210 :: Bool) = G a0123456789876543210
+    instance SuppressUnusedWarnings GSym0 where
+      suppressUnusedWarnings = snd (((,) GSym0KindInference) ())
+    data GSym0 :: (~>) Bool Bool
+      where
+        GSym0KindInference :: forall a0123456789876543210
+                                     arg. SameKind (Apply GSym0 arg) (GSym1 arg) =>
+                              GSym0 a0123456789876543210
+    type instance Apply GSym0 a0123456789876543210 = G a0123456789876543210
+    type family G (a :: Bool) :: Bool where
+      G e = Apply (Case_0123456789876543210 e (Let0123456789876543210Scrutinee_0123456789876543210Sym1 e)) e
+    sG :: forall (t :: Bool). Sing t -> Sing (Apply GSym0 t :: Bool)
+    sG (sE :: Sing e)
+      = (applySing
+           (let
+              sScrutinee_0123456789876543210 ::
+                Sing (Let0123456789876543210Scrutinee_0123456789876543210Sym1 e)
+              sScrutinee_0123456789876543210
+                = (applySing
+                     ((applySing ((singFun2 @(:@#@$)) SCons))
+                        ((singFun1 @NotSym0) sNot)))
+                    SNil
+            in
+              (id
+                 @(Sing (Case_0123456789876543210 e (Let0123456789876543210Scrutinee_0123456789876543210Sym1 e))))
+                (case sScrutinee_0123456789876543210 of {
+                   SCons _ SNil -> (singFun1 @NotSym0) sNot })))
+          sE
+    instance SingI (GSym0 :: (~>) Bool Bool) where
+      sing = (singFun1 @GSym0) sG
diff --git a/tests/compile-and-dump/Singletons/T78.ghc86.template b/tests/compile-and-dump/Singletons/T78.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/T78.ghc86.template
+++ /dev/null
@@ -1,32 +0,0 @@
-Singletons/T78.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| foo :: MaybeBool -> Bool
-          foo (Just False) = False
-          foo (Just True) = True
-          foo Nothing = False |]
-  ======>
-    foo :: MaybeBool -> Bool
-    foo (Just False) = False
-    foo (Just True) = True
-    foo Nothing = False
-    type FooSym1 (a0123456789876543210 :: Maybe Bool) =
-        Foo a0123456789876543210
-    instance SuppressUnusedWarnings FooSym0 where
-      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
-    data FooSym0 :: (~>) (Maybe Bool) Bool
-      where
-        FooSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
-                                FooSym0 a0123456789876543210
-    type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
-    type family Foo (a :: Maybe Bool) :: Bool where
-      Foo ( 'Just  'False) = FalseSym0
-      Foo ( 'Just  'True) = TrueSym0
-      Foo  'Nothing = FalseSym0
-    sFoo ::
-      forall (t :: Maybe Bool). Sing t -> Sing (Apply FooSym0 t :: Bool)
-    sFoo (SJust SFalse) = SFalse
-    sFoo (SJust STrue) = STrue
-    sFoo SNothing = SFalse
-    instance SingI (FooSym0 :: (~>) (Maybe Bool) Bool) where
-      sing = (singFun1 @FooSym0) sFoo
diff --git a/tests/compile-and-dump/Singletons/T78.ghc88.template b/tests/compile-and-dump/Singletons/T78.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/T78.ghc88.template
@@ -0,0 +1,32 @@
+Singletons/T78.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| foo :: MaybeBool -> Bool
+          foo (Just False) = False
+          foo (Just True) = True
+          foo Nothing = False |]
+  ======>
+    foo :: MaybeBool -> Bool
+    foo (Just False) = False
+    foo (Just True) = True
+    foo Nothing = False
+    type FooSym1 (a0123456789876543210 :: Maybe Bool) =
+        Foo a0123456789876543210
+    instance SuppressUnusedWarnings FooSym0 where
+      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
+    data FooSym0 :: (~>) (Maybe Bool) Bool
+      where
+        FooSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
+                                FooSym0 a0123456789876543210
+    type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
+    type family Foo (a :: Maybe Bool) :: Bool where
+      Foo ('Just 'False) = FalseSym0
+      Foo ('Just 'True) = TrueSym0
+      Foo 'Nothing = FalseSym0
+    sFoo ::
+      forall (t :: Maybe Bool). Sing t -> Sing (Apply FooSym0 t :: Bool)
+    sFoo (SJust SFalse) = SFalse
+    sFoo (SJust STrue) = STrue
+    sFoo SNothing = SFalse
+    instance SingI (FooSym0 :: (~>) (Maybe Bool) Bool) where
+      sing = (singFun1 @FooSym0) sFoo
diff --git a/tests/compile-and-dump/Singletons/TopLevelPatterns.ghc86.template b/tests/compile-and-dump/Singletons/TopLevelPatterns.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/TopLevelPatterns.ghc86.template
+++ /dev/null
@@ -1,347 +0,0 @@
-Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| data Bool = False | True
-          data Foo = Bar Bool Bool |]
-  ======>
-    data Bool = False | True
-    data Foo = Bar Bool Bool
-    type FalseSym0 = False
-    type TrueSym0 = True
-    type BarSym2 (t0123456789876543210 :: Bool) (t0123456789876543210 :: Bool) =
-        Bar t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings (BarSym1 t0123456789876543210) where
-      suppressUnusedWarnings
-        = Data.Tuple.snd (((,) BarSym1KindInference) ())
-    data BarSym1 (t0123456789876543210 :: Bool) :: (~>) Bool Foo
-      where
-        BarSym1KindInference :: forall t0123456789876543210
-                                       t0123456789876543210
-                                       arg. SameKind (Apply (BarSym1 t0123456789876543210) arg) (BarSym2 t0123456789876543210 arg) =>
-                                BarSym1 t0123456789876543210 t0123456789876543210
-    type instance Apply (BarSym1 t0123456789876543210) t0123456789876543210 = Bar t0123456789876543210 t0123456789876543210
-    instance SuppressUnusedWarnings BarSym0 where
-      suppressUnusedWarnings
-        = Data.Tuple.snd (((,) BarSym0KindInference) ())
-    data BarSym0 :: (~>) Bool ((~>) Bool Foo)
-      where
-        BarSym0KindInference :: forall t0123456789876543210
-                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
-                                BarSym0 t0123456789876543210
-    type instance Apply BarSym0 t0123456789876543210 = BarSym1 t0123456789876543210
-    data instance Sing :: Bool -> GHC.Types.Type
-      where
-        SFalse :: Sing False
-        STrue :: Sing True
-    type SBool = (Sing :: Bool -> GHC.Types.Type)
-    instance SingKind Bool where
-      type Demote Bool = Bool
-      fromSing SFalse = False
-      fromSing STrue = True
-      toSing False = SomeSing SFalse
-      toSing True = SomeSing STrue
-    data instance Sing :: Foo -> GHC.Types.Type
-      where
-        SBar :: forall (n :: Bool) (n :: Bool).
-                (Sing (n :: Bool)) -> (Sing (n :: Bool)) -> Sing (Bar n n)
-    type SFoo = (Sing :: Foo -> GHC.Types.Type)
-    instance SingKind Foo where
-      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) }
-    instance SingI False where
-      sing = SFalse
-    instance SingI True where
-      sing = STrue
-    instance (SingI n, SingI n) =>
-             SingI (Bar (n :: Bool) (n :: Bool)) where
-      sing = (SBar sing) sing
-    instance SingI (BarSym0 :: (~>) Bool ((~>) Bool Foo)) where
-      sing = (singFun2 @BarSym0) SBar
-    instance SingI (TyCon2 Bar :: (~>) Bool ((~>) Bool Foo)) where
-      sing = (singFun2 @(TyCon2 Bar)) SBar
-    instance SingI d =>
-             SingI (BarSym1 (d :: Bool) :: (~>) Bool Foo) where
-      sing = (singFun1 @(BarSym1 (d :: Bool))) (SBar (sing @d))
-    instance SingI d =>
-             SingI (TyCon1 (Bar (d :: Bool)) :: (~>) Bool Foo) where
-      sing = (singFun1 @(TyCon1 (Bar (d :: Bool)))) (SBar (sing @d))
-Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| otherwise :: Bool
-          otherwise = True
-          id :: a -> a
-          id x = x
-          not :: Bool -> Bool
-          not True = False
-          not False = True
-          false_ = False
-          f, g :: Bool -> Bool
-          [f, g] = [not, id]
-          h, i :: Bool -> Bool
-          (h, i) = (f, g)
-          j, k :: Bool
-          (Bar j k) = Bar True (h False)
-          l, m :: Bool
-          [l, m] = [not True, id False] |]
-  ======>
-    otherwise :: Bool
-    otherwise = True
-    id :: a -> a
-    id x = x
-    not :: Bool -> Bool
-    not True = False
-    not False = True
-    false_ = False
-    f :: Bool -> Bool
-    g :: Bool -> Bool
-    [f, g] = [not, id]
-    h :: Bool -> Bool
-    i :: Bool -> Bool
-    (h, i) = (f, g)
-    j :: Bool
-    k :: Bool
-    Bar j k = (Bar True) (h False)
-    l :: Bool
-    m :: Bool
-    [l, m] = [not True, id False]
-    type family Case_0123456789876543210 a_0123456789876543210 t where
-      Case_0123456789876543210 a_0123456789876543210 '[y_0123456789876543210,
-                                                       _] = y_0123456789876543210
-    type family Case_0123456789876543210 a_0123456789876543210 t where
-      Case_0123456789876543210 a_0123456789876543210 '[_,
-                                                       y_0123456789876543210] = y_0123456789876543210
-    type family Case_0123456789876543210 a_0123456789876543210 t where
-      Case_0123456789876543210 a_0123456789876543210 '(y_0123456789876543210,
-                                                       _) = y_0123456789876543210
-    type family Case_0123456789876543210 a_0123456789876543210 t where
-      Case_0123456789876543210 a_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 t where
-      Case_0123456789876543210 '[y_0123456789876543210,
-                                 _] = y_0123456789876543210
-    type family Case_0123456789876543210 t where
-      Case_0123456789876543210 '[_,
-                                 y_0123456789876543210] = y_0123456789876543210
-    type False_Sym0 = False_
-    type NotSym1 (a0123456789876543210 :: Bool) =
-        Not a0123456789876543210
-    instance SuppressUnusedWarnings NotSym0 where
-      suppressUnusedWarnings
-        = Data.Tuple.snd (((,) NotSym0KindInference) ())
-    data NotSym0 :: (~>) Bool Bool
-      where
-        NotSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply NotSym0 arg) (NotSym1 arg) =>
-                                NotSym0 a0123456789876543210
-    type instance Apply NotSym0 a0123456789876543210 = Not a0123456789876543210
-    type IdSym1 (a0123456789876543210 :: a0123456789876543210) =
-        Id a0123456789876543210
-    instance SuppressUnusedWarnings IdSym0 where
-      suppressUnusedWarnings
-        = Data.Tuple.snd (((,) IdSym0KindInference) ())
-    data IdSym0 :: forall a0123456789876543210.
-                   (~>) a0123456789876543210 a0123456789876543210
-      where
-        IdSym0KindInference :: forall a0123456789876543210
-                                      arg. SameKind (Apply IdSym0 arg) (IdSym1 arg) =>
-                               IdSym0 a0123456789876543210
-    type instance Apply IdSym0 a0123456789876543210 = Id a0123456789876543210
-    type FSym1 (a0123456789876543210 :: Bool) = F a0123456789876543210
-    instance SuppressUnusedWarnings FSym0 where
-      suppressUnusedWarnings
-        = Data.Tuple.snd (((,) FSym0KindInference) ())
-    data FSym0 :: (~>) Bool Bool
-      where
-        FSym0KindInference :: forall a0123456789876543210
-                                     arg. SameKind (Apply FSym0 arg) (FSym1 arg) =>
-                              FSym0 a0123456789876543210
-    type instance Apply FSym0 a0123456789876543210 = F a0123456789876543210
-    type GSym1 (a0123456789876543210 :: Bool) = G a0123456789876543210
-    instance SuppressUnusedWarnings GSym0 where
-      suppressUnusedWarnings
-        = Data.Tuple.snd (((,) GSym0KindInference) ())
-    data GSym0 :: (~>) Bool Bool
-      where
-        GSym0KindInference :: forall a0123456789876543210
-                                     arg. SameKind (Apply GSym0 arg) (GSym1 arg) =>
-                              GSym0 a0123456789876543210
-    type instance Apply GSym0 a0123456789876543210 = G a0123456789876543210
-    type HSym1 (a0123456789876543210 :: Bool) = H a0123456789876543210
-    instance SuppressUnusedWarnings HSym0 where
-      suppressUnusedWarnings
-        = Data.Tuple.snd (((,) HSym0KindInference) ())
-    data HSym0 :: (~>) Bool Bool
-      where
-        HSym0KindInference :: forall a0123456789876543210
-                                     arg. SameKind (Apply HSym0 arg) (HSym1 arg) =>
-                              HSym0 a0123456789876543210
-    type instance Apply HSym0 a0123456789876543210 = H a0123456789876543210
-    type ISym1 (a0123456789876543210 :: Bool) = I a0123456789876543210
-    instance SuppressUnusedWarnings ISym0 where
-      suppressUnusedWarnings
-        = Data.Tuple.snd (((,) ISym0KindInference) ())
-    data ISym0 :: (~>) Bool Bool
-      where
-        ISym0KindInference :: forall a0123456789876543210
-                                     arg. SameKind (Apply ISym0 arg) (ISym1 arg) =>
-                              ISym0 a0123456789876543210
-    type instance Apply ISym0 a0123456789876543210 = I a0123456789876543210
-    type JSym0 = J
-    type KSym0 = K
-    type LSym0 = L
-    type MSym0 = M
-    type OtherwiseSym0 = Otherwise
-    type X_0123456789876543210Sym0 = X_0123456789876543210
-    type X_0123456789876543210Sym0 = X_0123456789876543210
-    type X_0123456789876543210Sym0 = X_0123456789876543210
-    type X_0123456789876543210Sym0 = X_0123456789876543210
-    type family False_ where
-      False_ = FalseSym0
-    type family Not (a :: Bool) :: Bool where
-      Not  'True = FalseSym0
-      Not  'False = TrueSym0
-    type family Id (a :: a) :: a where
-      Id x = x
-    type family F (a :: Bool) :: Bool where
-      F a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210
-    type family G (a :: Bool) :: Bool where
-      G a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210
-    type family H (a :: Bool) :: Bool where
-      H a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210
-    type family I (a :: Bool) :: Bool where
-      I a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210
-    type family J :: Bool where
-      J = Case_0123456789876543210 X_0123456789876543210Sym0
-    type family K :: Bool where
-      K = Case_0123456789876543210 X_0123456789876543210Sym0
-    type family L :: Bool where
-      L = Case_0123456789876543210 X_0123456789876543210Sym0
-    type family M :: Bool where
-      M = Case_0123456789876543210 X_0123456789876543210Sym0
-    type family Otherwise :: Bool where
-      Otherwise = TrueSym0
-    type family X_0123456789876543210 where
-      X_0123456789876543210 = Apply (Apply (:@#@$) NotSym0) (Apply (Apply (:@#@$) IdSym0) '[])
-    type family X_0123456789876543210 where
-      X_0123456789876543210 = Apply (Apply Tuple2Sym0 FSym0) GSym0
-    type family X_0123456789876543210 where
-      X_0123456789876543210 = Apply (Apply BarSym0 TrueSym0) (Apply HSym0 FalseSym0)
-    type family X_0123456789876543210 where
-      X_0123456789876543210 = Apply (Apply (:@#@$) (Apply NotSym0 TrueSym0)) (Apply (Apply (:@#@$) (Apply IdSym0 FalseSym0)) '[])
-    sFalse_ :: Sing False_Sym0
-    sNot ::
-      forall (t :: Bool). Sing t -> Sing (Apply NotSym0 t :: Bool)
-    sId :: forall a (t :: a). Sing t -> Sing (Apply IdSym0 t :: a)
-    sF :: forall (t :: Bool). Sing t -> Sing (Apply FSym0 t :: Bool)
-    sG :: forall (t :: Bool). Sing t -> Sing (Apply GSym0 t :: Bool)
-    sH :: forall (t :: Bool). Sing t -> Sing (Apply HSym0 t :: Bool)
-    sI :: forall (t :: Bool). Sing t -> Sing (Apply ISym0 t :: Bool)
-    sJ :: Sing (JSym0 :: Bool)
-    sK :: Sing (KSym0 :: Bool)
-    sL :: Sing (LSym0 :: Bool)
-    sM :: Sing (MSym0 :: Bool)
-    sOtherwise :: Sing (OtherwiseSym0 :: Bool)
-    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
-    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
-    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
-    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
-    sFalse_ = SFalse
-    sNot STrue = SFalse
-    sNot SFalse = STrue
-    sId (sX :: Sing x) = sX
-    sF (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      = (applySing
-           ((case sX_0123456789876543210 of {
-               SCons (sY_0123456789876543210 :: Sing y_0123456789876543210)
-                     (SCons _ SNil)
-                 -> sY_0123456789876543210 }) ::
-              Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)))
-          sA_0123456789876543210
-    sG (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      = (applySing
-           ((case sX_0123456789876543210 of {
-               SCons _
-                     (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) SNil)
-                 -> sY_0123456789876543210 }) ::
-              Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)))
-          sA_0123456789876543210
-    sH (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      = (applySing
-           ((case sX_0123456789876543210 of {
-               STuple2 (sY_0123456789876543210 :: Sing y_0123456789876543210) _
-                 -> sY_0123456789876543210 }) ::
-              Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)))
-          sA_0123456789876543210
-    sI (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      = (applySing
-           ((case sX_0123456789876543210 of {
-               STuple2 _ (sY_0123456789876543210 :: Sing y_0123456789876543210)
-                 -> sY_0123456789876543210 }) ::
-              Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)))
-          sA_0123456789876543210
-    sJ
-      = (case sX_0123456789876543210 of {
-           SBar (sY_0123456789876543210 :: Sing y_0123456789876543210) _
-             -> sY_0123456789876543210 }) ::
-          Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)
-    sK
-      = (case sX_0123456789876543210 of {
-           SBar _ (sY_0123456789876543210 :: Sing y_0123456789876543210)
-             -> sY_0123456789876543210 }) ::
-          Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)
-    sL
-      = (case sX_0123456789876543210 of {
-           SCons (sY_0123456789876543210 :: Sing y_0123456789876543210)
-                 (SCons _ SNil)
-             -> sY_0123456789876543210 }) ::
-          Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)
-    sM
-      = (case sX_0123456789876543210 of {
-           SCons _
-                 (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) SNil)
-             -> sY_0123456789876543210 }) ::
-          Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)
-    sOtherwise = STrue
-    sX_0123456789876543210
-      = (applySing
-           ((applySing ((singFun2 @(:@#@$)) SCons))
-              ((singFun1 @NotSym0) sNot)))
-          ((applySing
-              ((applySing ((singFun2 @(:@#@$)) SCons)) ((singFun1 @IdSym0) sId)))
-             SNil)
-    sX_0123456789876543210
-      = (applySing
-           ((applySing ((singFun2 @Tuple2Sym0) STuple2))
-              ((singFun1 @FSym0) sF)))
-          ((singFun1 @GSym0) sG)
-    sX_0123456789876543210
-      = (applySing ((applySing ((singFun2 @BarSym0) SBar)) STrue))
-          ((applySing ((singFun1 @HSym0) sH)) SFalse)
-    sX_0123456789876543210
-      = (applySing
-           ((applySing ((singFun2 @(:@#@$)) SCons))
-              ((applySing ((singFun1 @NotSym0) sNot)) STrue)))
-          ((applySing
-              ((applySing ((singFun2 @(:@#@$)) SCons))
-                 ((applySing ((singFun1 @IdSym0) sId)) SFalse)))
-             SNil)
-    instance SingI (NotSym0 :: (~>) Bool Bool) where
-      sing = (singFun1 @NotSym0) sNot
-    instance SingI (IdSym0 :: (~>) a a) where
-      sing = (singFun1 @IdSym0) sId
-    instance SingI (FSym0 :: (~>) Bool Bool) where
-      sing = (singFun1 @FSym0) sF
-    instance SingI (GSym0 :: (~>) Bool Bool) where
-      sing = (singFun1 @GSym0) sG
-    instance SingI (HSym0 :: (~>) Bool Bool) where
-      sing = (singFun1 @HSym0) sH
-    instance SingI (ISym0 :: (~>) Bool Bool) where
-      sing = (singFun1 @ISym0) sI
diff --git a/tests/compile-and-dump/Singletons/TopLevelPatterns.ghc88.template b/tests/compile-and-dump/Singletons/TopLevelPatterns.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/TopLevelPatterns.ghc88.template
@@ -0,0 +1,350 @@
+Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| data Bool = False | True
+          data Foo = Bar Bool Bool |]
+  ======>
+    data Bool = False | True
+    data Foo = Bar Bool Bool
+    type FalseSym0 = False
+    type TrueSym0 = True
+    type BarSym2 (t0123456789876543210 :: Bool) (t0123456789876543210 :: Bool) =
+        Bar t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings (BarSym1 t0123456789876543210) where
+      suppressUnusedWarnings
+        = Data.Tuple.snd (((,) BarSym1KindInference) ())
+    data BarSym1 (t0123456789876543210 :: Bool) :: (~>) Bool Foo
+      where
+        BarSym1KindInference :: forall t0123456789876543210
+                                       t0123456789876543210
+                                       arg. SameKind (Apply (BarSym1 t0123456789876543210) arg) (BarSym2 t0123456789876543210 arg) =>
+                                BarSym1 t0123456789876543210 t0123456789876543210
+    type instance Apply (BarSym1 t0123456789876543210) t0123456789876543210 = Bar t0123456789876543210 t0123456789876543210
+    instance SuppressUnusedWarnings BarSym0 where
+      suppressUnusedWarnings
+        = Data.Tuple.snd (((,) BarSym0KindInference) ())
+    data BarSym0 :: (~>) Bool ((~>) Bool Foo)
+      where
+        BarSym0KindInference :: forall t0123456789876543210
+                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
+                                BarSym0 t0123456789876543210
+    type instance Apply BarSym0 t0123456789876543210 = BarSym1 t0123456789876543210
+    data SBool :: Bool -> GHC.Types.Type
+      where
+        SFalse :: SBool False
+        STrue :: SBool True
+    type instance Sing @Bool = SBool
+    instance SingKind Bool where
+      type Demote Bool = Bool
+      fromSing SFalse = False
+      fromSing STrue = True
+      toSing False = SomeSing SFalse
+      toSing True = SomeSing STrue
+    data SFoo :: Foo -> GHC.Types.Type
+      where
+        SBar :: forall (n :: Bool) (n :: Bool).
+                (Sing (n :: Bool)) -> (Sing (n :: Bool)) -> SFoo (Bar n n)
+    type instance Sing @Foo = SFoo
+    instance SingKind Foo where
+      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) }
+    instance SingI False where
+      sing = SFalse
+    instance SingI True where
+      sing = STrue
+    instance (SingI n, SingI n) =>
+             SingI (Bar (n :: Bool) (n :: Bool)) where
+      sing = (SBar sing) sing
+    instance SingI (BarSym0 :: (~>) Bool ((~>) Bool Foo)) where
+      sing = (singFun2 @BarSym0) SBar
+    instance SingI d =>
+             SingI (BarSym1 (d :: Bool) :: (~>) Bool Foo) where
+      sing = (singFun1 @(BarSym1 (d :: Bool))) (SBar (sing @d))
+Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| otherwise :: Bool
+          otherwise = True
+          id :: a -> a
+          id x = x
+          not :: Bool -> Bool
+          not True = False
+          not False = True
+          false_ = False
+          f, g :: Bool -> Bool
+          [f, g] = [not, id]
+          h, i :: Bool -> Bool
+          (h, i) = (f, g)
+          j, k :: Bool
+          (Bar j k) = Bar True (h False)
+          l, m :: Bool
+          [l, m] = [not True, id False] |]
+  ======>
+    otherwise :: Bool
+    otherwise = True
+    id :: a -> a
+    id x = x
+    not :: Bool -> Bool
+    not True = False
+    not False = True
+    false_ = False
+    f :: Bool -> Bool
+    g :: Bool -> Bool
+    [f, g] = [not, id]
+    h :: Bool -> Bool
+    i :: Bool -> Bool
+    (h, i) = (f, g)
+    j :: Bool
+    k :: Bool
+    Bar j k = (Bar True) (h False)
+    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_0123456789876543210 t where
+      Case_0123456789876543210 a_0123456789876543210 '(_,
+                                                       y_0123456789876543210) = y_0123456789876543210
+    type family Case_0123456789876543210 a_0123456789876543210 t where
+      Case_0123456789876543210 a_0123456789876543210 '(y_0123456789876543210,
+                                                       _) = y_0123456789876543210
+    type family Case_0123456789876543210 a_0123456789876543210 t where
+      Case_0123456789876543210 a_0123456789876543210 '[_,
+                                                       y_0123456789876543210] = y_0123456789876543210
+    type family Case_0123456789876543210 a_0123456789876543210 t where
+      Case_0123456789876543210 a_0123456789876543210 '[y_0123456789876543210,
+                                                       _] = y_0123456789876543210
+    type MSym0 = M
+    type LSym0 = L
+    type X_0123456789876543210Sym0 = X_0123456789876543210
+    type KSym0 = K
+    type JSym0 = J
+    type X_0123456789876543210Sym0 = X_0123456789876543210
+    type ISym1 (a0123456789876543210 :: Bool) = I a0123456789876543210
+    instance SuppressUnusedWarnings ISym0 where
+      suppressUnusedWarnings
+        = Data.Tuple.snd (((,) ISym0KindInference) ())
+    data ISym0 :: (~>) Bool Bool
+      where
+        ISym0KindInference :: forall a0123456789876543210
+                                     arg. SameKind (Apply ISym0 arg) (ISym1 arg) =>
+                              ISym0 a0123456789876543210
+    type instance Apply ISym0 a0123456789876543210 = I a0123456789876543210
+    type HSym1 (a0123456789876543210 :: Bool) = H a0123456789876543210
+    instance SuppressUnusedWarnings HSym0 where
+      suppressUnusedWarnings
+        = Data.Tuple.snd (((,) HSym0KindInference) ())
+    data HSym0 :: (~>) Bool Bool
+      where
+        HSym0KindInference :: forall a0123456789876543210
+                                     arg. SameKind (Apply HSym0 arg) (HSym1 arg) =>
+                              HSym0 a0123456789876543210
+    type instance Apply HSym0 a0123456789876543210 = H a0123456789876543210
+    type X_0123456789876543210Sym0 = X_0123456789876543210
+    type GSym1 (a0123456789876543210 :: Bool) = G a0123456789876543210
+    instance SuppressUnusedWarnings GSym0 where
+      suppressUnusedWarnings
+        = Data.Tuple.snd (((,) GSym0KindInference) ())
+    data GSym0 :: (~>) Bool Bool
+      where
+        GSym0KindInference :: forall a0123456789876543210
+                                     arg. SameKind (Apply GSym0 arg) (GSym1 arg) =>
+                              GSym0 a0123456789876543210
+    type instance Apply GSym0 a0123456789876543210 = G a0123456789876543210
+    type FSym1 (a0123456789876543210 :: Bool) = F a0123456789876543210
+    instance SuppressUnusedWarnings FSym0 where
+      suppressUnusedWarnings
+        = Data.Tuple.snd (((,) FSym0KindInference) ())
+    data FSym0 :: (~>) Bool Bool
+      where
+        FSym0KindInference :: forall a0123456789876543210
+                                     arg. SameKind (Apply FSym0 arg) (FSym1 arg) =>
+                              FSym0 a0123456789876543210
+    type instance Apply FSym0 a0123456789876543210 = F a0123456789876543210
+    type X_0123456789876543210Sym0 = X_0123456789876543210
+    type False_Sym0 = False_
+    type NotSym1 (a0123456789876543210 :: Bool) =
+        Not a0123456789876543210
+    instance SuppressUnusedWarnings NotSym0 where
+      suppressUnusedWarnings
+        = Data.Tuple.snd (((,) NotSym0KindInference) ())
+    data NotSym0 :: (~>) Bool Bool
+      where
+        NotSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply NotSym0 arg) (NotSym1 arg) =>
+                                NotSym0 a0123456789876543210
+    type instance Apply NotSym0 a0123456789876543210 = Not a0123456789876543210
+    type IdSym1 (a0123456789876543210 :: a0123456789876543210) =
+        Id a0123456789876543210
+    instance SuppressUnusedWarnings IdSym0 where
+      suppressUnusedWarnings
+        = Data.Tuple.snd (((,) IdSym0KindInference) ())
+    data IdSym0 :: forall a0123456789876543210.
+                   (~>) a0123456789876543210 a0123456789876543210
+      where
+        IdSym0KindInference :: forall a0123456789876543210
+                                      arg. SameKind (Apply IdSym0 arg) (IdSym1 arg) =>
+                               IdSym0 a0123456789876543210
+    type instance Apply IdSym0 a0123456789876543210 = Id a0123456789876543210
+    type OtherwiseSym0 = Otherwise
+    type family M :: Bool where
+      M = Case_0123456789876543210 X_0123456789876543210Sym0
+    type family L :: Bool where
+      L = Case_0123456789876543210 X_0123456789876543210Sym0
+    type family X_0123456789876543210 where
+      X_0123456789876543210 = Apply (Apply (:@#@$) (Apply NotSym0 TrueSym0)) (Apply (Apply (:@#@$) (Apply IdSym0 FalseSym0)) '[])
+    type family K :: Bool where
+      K = Case_0123456789876543210 X_0123456789876543210Sym0
+    type family J :: Bool where
+      J = Case_0123456789876543210 X_0123456789876543210Sym0
+    type family X_0123456789876543210 where
+      X_0123456789876543210 = Apply (Apply BarSym0 TrueSym0) (Apply HSym0 FalseSym0)
+    type family I (a :: Bool) :: Bool where
+      I a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210
+    type family H (a :: Bool) :: Bool where
+      H a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210
+    type family X_0123456789876543210 where
+      X_0123456789876543210 = Apply (Apply Tuple2Sym0 FSym0) GSym0
+    type family G (a :: Bool) :: Bool where
+      G a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210
+    type family F (a :: Bool) :: Bool where
+      F a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210
+    type family X_0123456789876543210 where
+      X_0123456789876543210 = Apply (Apply (:@#@$) NotSym0) (Apply (Apply (:@#@$) IdSym0) '[])
+    type family False_ where
+      False_ = FalseSym0
+    type family Not (a :: Bool) :: Bool where
+      Not 'True = FalseSym0
+      Not 'False = TrueSym0
+    type family Id (a :: a) :: a where
+      Id x = x
+    type family Otherwise :: Bool where
+      Otherwise = TrueSym0
+    sM :: Sing (MSym0 :: Bool)
+    sL :: Sing (LSym0 :: Bool)
+    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
+    sK :: Sing (KSym0 :: Bool)
+    sJ :: Sing (JSym0 :: Bool)
+    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
+    sI :: forall (t :: Bool). Sing t -> Sing (Apply ISym0 t :: Bool)
+    sH :: forall (t :: Bool). Sing t -> Sing (Apply HSym0 t :: Bool)
+    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
+    sG :: forall (t :: Bool). Sing t -> Sing (Apply GSym0 t :: Bool)
+    sF :: forall (t :: Bool). Sing t -> Sing (Apply FSym0 t :: Bool)
+    sX_0123456789876543210 :: Sing X_0123456789876543210Sym0
+    sFalse_ :: Sing False_Sym0
+    sNot ::
+      forall (t :: Bool). Sing t -> Sing (Apply NotSym0 t :: Bool)
+    sId :: forall a (t :: a). Sing t -> Sing (Apply IdSym0 t :: a)
+    sOtherwise :: Sing (OtherwiseSym0 :: Bool)
+    sM
+      = (GHC.Base.id
+           @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)))
+          (case sX_0123456789876543210 of {
+             SCons _
+                   (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) SNil)
+               -> sY_0123456789876543210 })
+    sL
+      = (GHC.Base.id
+           @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)))
+          (case sX_0123456789876543210 of {
+             SCons (sY_0123456789876543210 :: Sing y_0123456789876543210)
+                   (SCons _ SNil)
+               -> sY_0123456789876543210 })
+    sX_0123456789876543210
+      = (applySing
+           ((applySing ((singFun2 @(:@#@$)) SCons))
+              ((applySing ((singFun1 @NotSym0) sNot)) STrue)))
+          ((applySing
+              ((applySing ((singFun2 @(:@#@$)) SCons))
+                 ((applySing ((singFun1 @IdSym0) sId)) SFalse)))
+             SNil)
+    sK
+      = (GHC.Base.id
+           @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)))
+          (case sX_0123456789876543210 of {
+             SBar _ (sY_0123456789876543210 :: Sing y_0123456789876543210)
+               -> sY_0123456789876543210 })
+    sJ
+      = (GHC.Base.id
+           @(Sing (Case_0123456789876543210 X_0123456789876543210Sym0 :: Bool)))
+          (case sX_0123456789876543210 of {
+             SBar (sY_0123456789876543210 :: Sing y_0123456789876543210) _
+               -> sY_0123456789876543210 })
+    sX_0123456789876543210
+      = (applySing ((applySing ((singFun2 @BarSym0) SBar)) STrue))
+          ((applySing ((singFun1 @HSym0) sH)) SFalse)
+    sI (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = (applySing
+           ((GHC.Base.id
+               @(Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)))
+              (case sX_0123456789876543210 of {
+                 STuple2 _ (sY_0123456789876543210 :: Sing y_0123456789876543210)
+                   -> sY_0123456789876543210 })))
+          sA_0123456789876543210
+    sH (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = (applySing
+           ((GHC.Base.id
+               @(Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)))
+              (case sX_0123456789876543210 of {
+                 STuple2 (sY_0123456789876543210 :: Sing y_0123456789876543210) _
+                   -> sY_0123456789876543210 })))
+          sA_0123456789876543210
+    sX_0123456789876543210
+      = (applySing
+           ((applySing ((singFun2 @Tuple2Sym0) STuple2))
+              ((singFun1 @FSym0) sF)))
+          ((singFun1 @GSym0) sG)
+    sG (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = (applySing
+           ((GHC.Base.id
+               @(Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)))
+              (case sX_0123456789876543210 of {
+                 SCons _
+                       (SCons (sY_0123456789876543210 :: Sing y_0123456789876543210) SNil)
+                   -> sY_0123456789876543210 })))
+          sA_0123456789876543210
+    sF (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = (applySing
+           ((GHC.Base.id
+               @(Sing (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0)))
+              (case sX_0123456789876543210 of {
+                 SCons (sY_0123456789876543210 :: Sing y_0123456789876543210)
+                       (SCons _ SNil)
+                   -> sY_0123456789876543210 })))
+          sA_0123456789876543210
+    sX_0123456789876543210
+      = (applySing
+           ((applySing ((singFun2 @(:@#@$)) SCons))
+              ((singFun1 @NotSym0) sNot)))
+          ((applySing
+              ((applySing ((singFun2 @(:@#@$)) SCons)) ((singFun1 @IdSym0) sId)))
+             SNil)
+    sFalse_ = SFalse
+    sNot STrue = SFalse
+    sNot SFalse = STrue
+    sId (sX :: Sing x) = sX
+    sOtherwise = STrue
+    instance SingI (ISym0 :: (~>) Bool Bool) where
+      sing = (singFun1 @ISym0) sI
+    instance SingI (HSym0 :: (~>) Bool Bool) where
+      sing = (singFun1 @HSym0) sH
+    instance SingI (GSym0 :: (~>) Bool Bool) where
+      sing = (singFun1 @GSym0) sG
+    instance SingI (FSym0 :: (~>) Bool Bool) where
+      sing = (singFun1 @FSym0) sF
+    instance SingI (NotSym0 :: (~>) Bool Bool) where
+      sing = (singFun1 @NotSym0) sNot
+    instance SingI (IdSym0 :: (~>) a a) where
+      sing = (singFun1 @IdSym0) sId
diff --git a/tests/compile-and-dump/Singletons/TopLevelPatterns.hs b/tests/compile-and-dump/Singletons/TopLevelPatterns.hs
--- a/tests/compile-and-dump/Singletons/TopLevelPatterns.hs
+++ b/tests/compile-and-dump/Singletons/TopLevelPatterns.hs
@@ -6,7 +6,7 @@
 import Data.Singletons
 import Data.Singletons.Prelude.List
 import Data.Singletons.SuppressUnusedWarnings
-import Data.Singletons.TH hiding (STrue, SFalse, TrueSym0, FalseSym0)
+import Data.Singletons.TH hiding (SBool(..), TrueSym0, FalseSym0)
 
 $(singletons [d|
   data Bool = False | True
diff --git a/tests/compile-and-dump/Singletons/TypeRepTYPE.ghc86.template b/tests/compile-and-dump/Singletons/TypeRepTYPE.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/TypeRepTYPE.ghc86.template
+++ /dev/null
diff --git a/tests/compile-and-dump/Singletons/TypeRepTYPE.ghc88.template b/tests/compile-and-dump/Singletons/TypeRepTYPE.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/TypeRepTYPE.ghc88.template
diff --git a/tests/compile-and-dump/Singletons/TypeRepTYPE.hs b/tests/compile-and-dump/Singletons/TypeRepTYPE.hs
--- a/tests/compile-and-dump/Singletons/TypeRepTYPE.hs
+++ b/tests/compile-and-dump/Singletons/TypeRepTYPE.hs
@@ -37,4 +37,4 @@
   = NothingWordRep
 
 h :: forall (rep :: RuntimeRep) (a :: TYPE rep). Typeable a => Sing a
-h = STypeRep (typeRep @a)
+h = typeRep @a
diff --git a/tests/compile-and-dump/Singletons/Undef.ghc86.template b/tests/compile-and-dump/Singletons/Undef.ghc86.template
deleted file mode 100644
--- a/tests/compile-and-dump/Singletons/Undef.ghc86.template
+++ /dev/null
@@ -1,47 +0,0 @@
-Singletons/Undef.hs:(0,0)-(0,0): Splicing declarations
-    singletons
-      [d| foo :: Bool -> Bool
-          foo = undefined
-          bar :: Bool -> Bool
-          bar = error "urk" |]
-  ======>
-    foo :: Bool -> Bool
-    foo = undefined
-    bar :: Bool -> Bool
-    bar = error "urk"
-    type BarSym1 (a0123456789876543210 :: Bool) =
-        Bar a0123456789876543210
-    instance SuppressUnusedWarnings BarSym0 where
-      suppressUnusedWarnings = snd (((,) BarSym0KindInference) ())
-    data BarSym0 :: (~>) Bool Bool
-      where
-        BarSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
-                                BarSym0 a0123456789876543210
-    type instance Apply BarSym0 a0123456789876543210 = Bar a0123456789876543210
-    type FooSym1 (a0123456789876543210 :: Bool) =
-        Foo a0123456789876543210
-    instance SuppressUnusedWarnings FooSym0 where
-      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
-    data FooSym0 :: (~>) Bool Bool
-      where
-        FooSym0KindInference :: forall a0123456789876543210
-                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
-                                FooSym0 a0123456789876543210
-    type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
-    type family Bar (a :: Bool) :: Bool where
-      Bar a_0123456789876543210 = Apply (Apply ErrorSym0 "urk") a_0123456789876543210
-    type family Foo (a :: Bool) :: Bool where
-      Foo a_0123456789876543210 = Apply UndefinedSym0 a_0123456789876543210
-    sBar ::
-      forall (t :: Bool). Sing t -> Sing (Apply BarSym0 t :: Bool)
-    sFoo ::
-      forall (t :: Bool). Sing t -> Sing (Apply FooSym0 t :: Bool)
-    sBar (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      = (sError (sing :: Sing "urk")) sA_0123456789876543210
-    sFoo (sA_0123456789876543210 :: Sing a_0123456789876543210)
-      = sUndefined sA_0123456789876543210
-    instance SingI (BarSym0 :: (~>) Bool Bool) where
-      sing = (singFun1 @BarSym0) sBar
-    instance SingI (FooSym0 :: (~>) Bool Bool) where
-      sing = (singFun1 @FooSym0) sFoo
diff --git a/tests/compile-and-dump/Singletons/Undef.ghc88.template b/tests/compile-and-dump/Singletons/Undef.ghc88.template
new file mode 100644
--- /dev/null
+++ b/tests/compile-and-dump/Singletons/Undef.ghc88.template
@@ -0,0 +1,47 @@
+Singletons/Undef.hs:(0,0)-(0,0): Splicing declarations
+    singletons
+      [d| foo :: Bool -> Bool
+          foo = undefined
+          bar :: Bool -> Bool
+          bar = error "urk" |]
+  ======>
+    foo :: Bool -> Bool
+    foo = undefined
+    bar :: Bool -> Bool
+    bar = error "urk"
+    type BarSym1 (a0123456789876543210 :: Bool) =
+        Bar a0123456789876543210
+    instance SuppressUnusedWarnings BarSym0 where
+      suppressUnusedWarnings = snd (((,) BarSym0KindInference) ())
+    data BarSym0 :: (~>) Bool Bool
+      where
+        BarSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) =>
+                                BarSym0 a0123456789876543210
+    type instance Apply BarSym0 a0123456789876543210 = Bar a0123456789876543210
+    type FooSym1 (a0123456789876543210 :: Bool) =
+        Foo a0123456789876543210
+    instance SuppressUnusedWarnings FooSym0 where
+      suppressUnusedWarnings = snd (((,) FooSym0KindInference) ())
+    data FooSym0 :: (~>) Bool Bool
+      where
+        FooSym0KindInference :: forall a0123456789876543210
+                                       arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) =>
+                                FooSym0 a0123456789876543210
+    type instance Apply FooSym0 a0123456789876543210 = Foo a0123456789876543210
+    type family Bar (a :: Bool) :: Bool where
+      Bar a_0123456789876543210 = Apply (Apply ErrorSym0 "urk") a_0123456789876543210
+    type family Foo (a :: Bool) :: Bool where
+      Foo a_0123456789876543210 = Apply UndefinedSym0 a_0123456789876543210
+    sBar ::
+      forall (t :: Bool). Sing t -> Sing (Apply BarSym0 t :: Bool)
+    sFoo ::
+      forall (t :: Bool). Sing t -> Sing (Apply FooSym0 t :: Bool)
+    sBar (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = (sError (sing :: Sing "urk")) sA_0123456789876543210
+    sFoo (sA_0123456789876543210 :: Sing a_0123456789876543210)
+      = sUndefined sA_0123456789876543210
+    instance SingI (BarSym0 :: (~>) Bool Bool) where
+      sing = (singFun1 @BarSym0) sBar
+    instance SingI (FooSym0 :: (~>) Bool Bool) where
+      sing = (singFun1 @FooSym0) sFoo
