diff --git a/.travis.yml b/.travis.yml index f58bbf29..e3323ad3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -101,7 +101,7 @@ install: echo "source-repository-package" >> cabal.project echo " type: git" >> cabal.project echo " location: https://github.com/goldfirere/th-desugar" >> cabal.project - echo " tag: 4e8f7d46954e690530c17b2eac9d302170ff994f" >> cabal.project + echo " tag: a6c902914ff6fcca021619dbb4919327fb98c404" >> cabal.project echo "" >> cabal.project echo "package th-desugar" >> cabal.project echo " tests: False" >> cabal.project @@ -133,7 +133,7 @@ script: echo "source-repository-package" >> cabal.project echo " type: git" >> cabal.project echo " location: https://github.com/goldfirere/th-desugar" >> cabal.project - echo " tag: 4e8f7d46954e690530c17b2eac9d302170ff994f" >> cabal.project + echo " tag: a6c902914ff6fcca021619dbb4919327fb98c404" >> cabal.project echo "" >> cabal.project echo "package th-desugar" >> cabal.project echo " tests: False" >> cabal.project diff --git a/CHANGES.md b/CHANGES.md index 66d7e347..5b8aeee2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -24,9 +24,15 @@ Changelog for singletons project Most TH functions are now polymorphic over `OptionsMonad` instead of `DsMonad`. * `singletons` now does a much better job of preserving the order of type - variables when singling the type signatures of top-level functions and data - constructors. See the `Support for TypeApplications` section of the `README` - for more details. + variables in type signatures during promotion and singling. See the + `Support for TypeApplications` section of the `README` for more details. + + When generating type-level declarations in particular (e.g., promoted type + families or defunctionalization symbols), `singletons` will likely also + generate standalone kind signatures to preserve type variable order. As a + result, most `singletons` code that uses Template Haskell will require the + use of the `StandaloneKindSignatures` extension (and, by extension, the + `NoCUSKs` extension) to work. * `singletons` now does a more much thorough job of rejecting higher-rank types during promotion or singling, as `singletons` cannot support them. (Previously, `singletons` would sometimes accept them, often changing rank-2 diff --git a/README.md b/README.md index cf0bb165..8ab13ec9 100644 --- a/README.md +++ b/README.md @@ -54,10 +54,12 @@ following: * `GADTs` * `InstanceSigs` * `KindSignatures` +* `NoCUSKs` * `NoStarIsType` * `PolyKinds` * `RankNTypes` * `ScopedTypeVariables` +* `StandaloneKindSignatures` * `TemplateHaskell` * `TypeApplications` * `TypeFamilies` @@ -599,15 +601,6 @@ The following constructs are fully supported: * functional dependencies (with limitations -- see below) * type families (with limitations -- see below) -Higher-kinded type variables in `class`/`data` declarations must be annotated -explicitly. This is due to GHC's handling of *complete -user-specified kind signatures*, or [CUSKs](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#complete-user-supplied-kind-signatures-and-polymorphic-recursion). -Briefly, `singletons` has a hard -time conforming to the precise rules that GHC imposes around CUSKs and so -needs a little help around kind inference here. See -[this pull request](https://github.com/goldfirere/singletons/pull/171) for more -background. - `singletons` is slightly more conservative with respect to `deriving` than GHC is. The stock classes listed above (`Eq`, `Ord`, `Show`, `Bounded`, `Enum`, `Functor`, `Foldable`, and `Traversable`) are the only ones that `singletons` will derive @@ -681,8 +674,11 @@ The following constructs are not supported: * datatypes that store arrows, `Nat`, or `Symbol` * literals (limited support) +* rank-n types + +See the following sections for more details. -Why are these out of reach? +## Arrows, `Nat`, `Symbol`, and literals As described in the promotion paper, promotion of datatypes that store arrows is currently impossible. So if you have a declaration such as @@ -704,6 +700,21 @@ This is the same line of reasoning that forbids the use of `Nat` or `Symbol` in datatype definitions. But, see [this bug report](https://github.com/goldfirere/singletons/issues/76) for a workaround. +## Rank-n types + +`singletons` does not support type signatures that have higher-rank types. +More precisely, the only types that can be promoted or singled are +_vanilla_ types, where a vanilla function type is a type that: + +1. Only uses a @forall@ at the top level, if used at all. That is to say, it + does not contain any nested or higher-rank @forall@s. + +2. Only uses a context (e.g., @c => ...@) at the top level, if used at all, + and only after the top-level @forall@ if one is present. That is to say, + it does not contain any nested or higher-rank contexts. + +3. Contains no visible dependent quantification. + Support for `*` --------------- @@ -740,30 +751,109 @@ singled to `sId STrue`. See of how `singletons` may support `TypeApplications` in the future. On the other hand, `singletons` does make an effort to preserve the order of -type variables when singling type signatures. For example, this type signature: +type variables when promoting and singling certain constructors. These include: + +* Kind signatures of promoted top-level functions +* Type signatures of singled top-level functions +* Kind signatures of singled data type declarations +* Type signatures of singled data constructors +* Kind signatures of singled class declarations +* Type signatures of singled class methods + +For example, consider this type signature: ```haskell const2 :: forall b a. a -> b -> a ``` -Will single to the following: +The promoted version of `const` will have the following kind signature: + +```haskell +type Const2 :: forall b a. a -> b -> a +``` + +The singled version of `const2` will have the following type signature: ```haskell sConst2 :: forall b a (x :: a) (y :: a). Sing x -> Sing y -> Sing (Const x y) ``` Therefore, writing `const2 @T1 @T2` works just as well as writing -`sConst2 @T1 @T2`, since the type signatures for `const2` and `sConst2` both -begin with `forall b a.`, in that order. Again, it is worth emphasizing that -the TH machinery does not support singling `const2 @T1 @T2` directly, but you -can write the type applications by hand if you so choose. - -It is not yet guaranteed that promotion preserves the order of type variables. -For instance, if one writes `const @T1 @T2`, then one would have to write -`Const @T2 @T1` at the kind level (and similarly for `Const`'s -defunctionalization symbols). See -[#378](https://github.com/goldfirere/singletons/issues/378) for a discussion -of how this may be fixed in the future. +`Const2 @T1 @T2` or `sConst2 @T1 @T2`, since the signatures for `const2`, `Const2`, +and `sConst2` all begin with `forall b a.`, in that order. Again, it is worth +emphasizing that the TH machinery does not support promoting or singling +`const2 @T1 @T2` directly, but you can write the type applications by hand if +you so choose. + +`singletons` also has limited support for preserving the order of type variables +for the following constructs: + +* Kind signatures of defunctionalization symbols. + The order of type variables is only guaranteed to be preserved if: + + 1. The thing being defunctionalized has a standalone type (or kind) + signature. + 2. The type (or kind) signature of the thing being defunctionalized is + a vanilla type. (See the "Rank-n types" section above for what "vanilla" + means.) + + If either of these conditions do not hold, `singletons` will fall back to + a slightly different approach to generating defunctionalization symbols that + does *not* guarantee the order of type variables. As an example, consider the + following example: + + ```haskell + data T (x :: a) :: forall b. b -> Type + $(genDefunSymbols [''T]) + ``` + + The kind of `T` is `forall a. a -> forall b. b -> Type`, which is not + vanilla. Currently, `singletons` will generate the following + defunctionalization symbols for `T`: + + ```haskell + data TSym0 :: a ~> b ~> Type + data TSym1 (x :: a) :: b ~> Type + ``` + + In both symbols, the kind starts with `forall a b.` rather than quantifying + the `b` after the visible argument of kind `a`. These symbols can still be + useful even with this flaw, so `singletons` permits generating them + regardless. Be aware of this drawback if you try doing something similar + yourself! + +* Kind signatures of promoted class methods. + The order of type variables will often "just work" by happy coincidence, but + there are some situations where this does not happen. Consider the following + class: + + ```haskell + class C (b :: Type) where + m :: forall a. a -> b -> a + ``` + + The full type of `m` is `forall b. C b => forall a. a -> b -> a`, which binds + `b` before `a`. This order is preserved when singling `m`, but *not* when + promoting `m`. This is because the `C` class is promoted as follows: + + ```haskell + class PC (b :: Type) where + type M (x :: a) (y :: b) :: a + ``` + + Due to the way GHC kind-checks associated type families, the kind of `M` is + `forall a b. a -> b -> a`, which binds `b` *after* `a`. Moreover, the + `StandaloneKindSignatures` extension does not provide a way to explicitly + declare the full kind of an associated type family, so this limitation is + not easy to work around. + + The defunctionalization symbols for `M` will also follow a similar + order of type variables: + + ```haskell + type MSym0 :: forall a b. a ~> b ~> a + type MSym1 :: forall a b. a -> b ~> a + ``` Known bugs ---------- diff --git a/cabal.project b/cabal.project index ff4d2922..81ac8f60 100644 --- a/cabal.project +++ b/cabal.project @@ -3,4 +3,4 @@ packages: . source-repository-package type: git location: https://github.com/goldfirere/th-desugar - tag: 4e8f7d46954e690530c17b2eac9d302170ff994f + tag: a6c902914ff6fcca021619dbb4919327fb98c404 diff --git a/src/Data/Singletons.hs b/src/Data/Singletons.hs index 21639736..08eb34bc 100644 --- a/src/Data/Singletons.hs +++ b/src/Data/Singletons.hs @@ -9,6 +9,7 @@ {-# LANGUAGE QuantifiedConstraints #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Partition.hs b/src/Data/Singletons/Partition.hs index 180f6627..4ba8d8e4 100644 --- a/src/Data/Singletons/Partition.hs +++ b/src/Data/Singletons/Partition.hs @@ -55,12 +55,12 @@ data PartitionedDecs = instance Semigroup PartitionedDecs where PDecs a1 b1 c1 d1 e1 f1 g1 h1 i1 <> PDecs a2 b2 c2 d2 e2 f2 g2 h2 i2 = - PDecs (a1 <> a2) (b1 <> b2) (c1 <> c2) (d1 <> d2) (e1 <> e2) (f1 <> f2) - (g1 <> g2) (h1 <> h2) (i1 <> i2) + PDecs (a1 <> a2) (b1 <> b2) (c1 <> c2) (d1 <> d2) (e1 <> e2) + (f1 <> f2) (g1 <> g2) (h1 <> h2) (i1 <> i2) instance Monoid PartitionedDecs where - mempty = PDecs [] [] [] [] [] [] [] [] [] - mappend = (<>) + mempty = PDecs mempty mempty mempty mempty mempty + mempty mempty mempty mempty -- | Split up a @[DDec]@ into its pieces, extracting 'Ord' instances -- from deriving clauses @@ -129,6 +129,9 @@ partitionDec (DOpenTypeFamilyD tf_head) = partitionDec (DTySynInstD {}) = pure mempty -- There's no need to track type family instances, since -- we already record the type family itself separately. +partitionDec (DKiSigD {}) = pure mempty + -- There's no need to track standalone kind signatures, since we use + -- dsReifyType to look them up. partitionDec (DStandaloneDerivD mb_strat _ ctxt ty) = case unfoldDType ty of (cls_pred_ty, cls_tys) diff --git a/src/Data/Singletons/Prelude/Applicative.hs b/src/Data/Singletons/Prelude/Applicative.hs index 3ca111a9..96d7c8c8 100644 --- a/src/Data/Singletons/Prelude/Applicative.hs +++ b/src/Data/Singletons/Prelude/Applicative.hs @@ -5,6 +5,7 @@ {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/Base.hs b/src/Data/Singletons/Prelude/Base.hs index 6dd1fe67..fea0b66d 100644 --- a/src/Data/Singletons/Prelude/Base.hs +++ b/src/Data/Singletons/Prelude/Base.hs @@ -1,6 +1,7 @@ {-# LANGUAGE TemplateHaskell, TypeOperators, DataKinds, PolyKinds, ScopedTypeVariables, TypeFamilies, GADTs, - UndecidableInstances, BangPatterns, TypeApplications #-} + UndecidableInstances, BangPatterns, TypeApplications, + StandaloneKindSignatures #-} ----------------------------------------------------------------------------- -- | diff --git a/src/Data/Singletons/Prelude/Bool.hs b/src/Data/Singletons/Prelude/Bool.hs index 9042a1e4..bc7b98ea 100644 --- a/src/Data/Singletons/Prelude/Bool.hs +++ b/src/Data/Singletons/Prelude/Bool.hs @@ -1,6 +1,6 @@ {-# LANGUAGE TemplateHaskell, TypeApplications, TypeFamilies, TypeOperators, GADTs, ScopedTypeVariables, DeriveDataTypeable, UndecidableInstances, - DataKinds, PolyKinds #-} + DataKinds, PolyKinds, StandaloneKindSignatures #-} ----------------------------------------------------------------------------- -- | diff --git a/src/Data/Singletons/Prelude/Const.hs b/src/Data/Singletons/Prelude/Const.hs index 0523dfe1..443ec414 100644 --- a/src/Data/Singletons/Prelude/Const.hs +++ b/src/Data/Singletons/Prelude/Const.hs @@ -85,7 +85,8 @@ instance SingI ConstSym0 where sing = singFun1 SConst $(singletons [d| - type family GetConst (x :: Const a b) :: a where + type GetConst :: Const a b -> a + type family GetConst x where GetConst ('Const x) = x |]) diff --git a/src/Data/Singletons/Prelude/Either.hs b/src/Data/Singletons/Prelude/Either.hs index c93fe849..405743bf 100644 --- a/src/Data/Singletons/Prelude/Either.hs +++ b/src/Data/Singletons/Prelude/Either.hs @@ -1,6 +1,6 @@ {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeFamilies, GADTs, RankNTypes, UndecidableInstances, DataKinds, PolyKinds, - TypeApplications #-} + TypeApplications, StandaloneKindSignatures #-} ----------------------------------------------------------------------------- -- | diff --git a/src/Data/Singletons/Prelude/Enum.hs b/src/Data/Singletons/Prelude/Enum.hs index 5164aee7..5f3b64e1 100644 --- 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, TypeApplications #-} + InstanceSigs, TypeApplications, StandaloneKindSignatures #-} ----------------------------------------------------------------------------- -- | diff --git a/src/Data/Singletons/Prelude/Foldable.hs b/src/Data/Singletons/Prelude/Foldable.hs index 64868089..f17424ae 100644 --- a/src/Data/Singletons/Prelude/Foldable.hs +++ b/src/Data/Singletons/Prelude/Foldable.hs @@ -6,6 +6,7 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/Function.hs b/src/Data/Singletons/Prelude/Function.hs index 9b78709d..624595fb 100644 --- a/src/Data/Singletons/Prelude/Function.hs +++ b/src/Data/Singletons/Prelude/Function.hs @@ -19,7 +19,8 @@ {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeFamilies, TypeOperators, UndecidableInstances, GADTs, - DataKinds, PolyKinds, TypeApplications #-} + DataKinds, PolyKinds, TypeApplications, + StandaloneKindSignatures #-} module Data.Singletons.Prelude.Function ( -- * "Prelude" re-exports diff --git a/src/Data/Singletons/Prelude/Functor.hs b/src/Data/Singletons/Prelude/Functor.hs index 6a7cc41d..906dc2f3 100644 --- a/src/Data/Singletons/Prelude/Functor.hs +++ b/src/Data/Singletons/Prelude/Functor.hs @@ -6,6 +6,7 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/Identity.hs b/src/Data/Singletons/Prelude/Identity.hs index 194ddd1b..1e1782bb 100644 --- a/src/Data/Singletons/Prelude/Identity.hs +++ b/src/Data/Singletons/Prelude/Identity.hs @@ -5,6 +5,7 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/Instances.hs b/src/Data/Singletons/Prelude/Instances.hs index acbc9930..1340a4a6 100644 --- a/src/Data/Singletons/Prelude/Instances.hs +++ b/src/Data/Singletons/Prelude/Instances.hs @@ -11,7 +11,7 @@ re-exported from various places. {-# LANGUAGE DataKinds, PolyKinds, RankNTypes, GADTs, TypeFamilies, EmptyCase, FlexibleContexts, TemplateHaskell, ScopedTypeVariables, UndecidableInstances, TypeOperators, FlexibleInstances, - TypeApplications #-} + TypeApplications, StandaloneKindSignatures #-} {-# OPTIONS_GHC -Wno-orphans #-} module Data.Singletons.Prelude.Instances ( diff --git a/src/Data/Singletons/Prelude/IsString.hs b/src/Data/Singletons/Prelude/IsString.hs index cad174ea..dc8d1bd1 100644 --- a/src/Data/Singletons/Prelude/IsString.hs +++ b/src/Data/Singletons/Prelude/IsString.hs @@ -3,6 +3,7 @@ {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/List/Internal.hs b/src/Data/Singletons/Prelude/List/Internal.hs index 6e3295c1..fc66f1bb 100644 --- a/src/Data/Singletons/Prelude/List/Internal.hs +++ b/src/Data/Singletons/Prelude/List/Internal.hs @@ -1,7 +1,7 @@ {-# LANGUAGE TypeOperators, DataKinds, PolyKinds, TypeFamilies, TemplateHaskell, GADTs, UndecidableInstances, RankNTypes, ScopedTypeVariables, FlexibleContexts, - TypeApplications #-} + TypeApplications, StandaloneKindSignatures #-} {-# OPTIONS_GHC -O0 #-} ----------------------------------------------------------------------------- diff --git a/src/Data/Singletons/Prelude/List/Internal/Disambiguation.hs b/src/Data/Singletons/Prelude/List/Internal/Disambiguation.hs index 77ce5d34..dab72f95 100644 --- a/src/Data/Singletons/Prelude/List/Internal/Disambiguation.hs +++ b/src/Data/Singletons/Prelude/List/Internal/Disambiguation.hs @@ -14,7 +14,7 @@ {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeFamilies, UndecidableInstances, GADTs, DataKinds, PolyKinds, - TypeApplications #-} + TypeApplications, StandaloneKindSignatures #-} 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 index e2a8577b..dc4d053c 100644 --- a/src/Data/Singletons/Prelude/List/NonEmpty.hs +++ b/src/Data/Singletons/Prelude/List/NonEmpty.hs @@ -1,6 +1,7 @@ {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeOperators, TypeFamilies, GADTs, UndecidableInstances, InstanceSigs, - DataKinds, PolyKinds, TypeApplications #-} + DataKinds, PolyKinds, TypeApplications, + StandaloneKindSignatures #-} {-# OPTIONS_GHC -Wno-orphans #-} ----------------------------------------------------------------------------- diff --git a/src/Data/Singletons/Prelude/Maybe.hs b/src/Data/Singletons/Prelude/Maybe.hs index 372044f6..b926b18a 100644 --- a/src/Data/Singletons/Prelude/Maybe.hs +++ b/src/Data/Singletons/Prelude/Maybe.hs @@ -1,6 +1,6 @@ {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeFamilies, DataKinds, PolyKinds, UndecidableInstances, GADTs, RankNTypes, - TypeApplications #-} + TypeApplications, StandaloneKindSignatures #-} ----------------------------------------------------------------------------- -- | diff --git a/src/Data/Singletons/Prelude/Monad.hs b/src/Data/Singletons/Prelude/Monad.hs index cbaeff9e..65605f90 100644 --- a/src/Data/Singletons/Prelude/Monad.hs +++ b/src/Data/Singletons/Prelude/Monad.hs @@ -5,6 +5,7 @@ {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/Monad/Fail.hs b/src/Data/Singletons/Prelude/Monad/Fail.hs index 233f4f51..53cb6042 100644 --- a/src/Data/Singletons/Prelude/Monad/Fail.hs +++ b/src/Data/Singletons/Prelude/Monad/Fail.hs @@ -2,6 +2,7 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE PolyKinds #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/Monad/Internal.hs b/src/Data/Singletons/Prelude/Monad/Internal.hs index 2685f238..81c1948c 100644 --- a/src/Data/Singletons/Prelude/Monad/Internal.hs +++ b/src/Data/Singletons/Prelude/Monad/Internal.hs @@ -6,6 +6,7 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} @@ -44,16 +45,6 @@ import Data.Singletons.Prelude.Base import Data.Singletons.Prelude.Instances import Data.Singletons.Single -{- -Note [How to get the right kinds when promoting Functor and friends] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To avoid running afoul of a CUSK validity check (see Note [CUSKification]), -classes with type parameters that lack explicit kind signatures will be -defaulted to be of kind Type. This is not what you want for Functor, however, -since its argument is of kind (Type -> Type), so we must explicitly use this -kind when declaring the Functor class (and other classes in this module). --} - $(singletonsOnly [d| infixl 4 <$ diff --git a/src/Data/Singletons/Prelude/Monad/Zip.hs b/src/Data/Singletons/Prelude/Monad/Zip.hs index 9c1676cb..78160b3c 100644 --- a/src/Data/Singletons/Prelude/Monad/Zip.hs +++ b/src/Data/Singletons/Prelude/Monad/Zip.hs @@ -5,6 +5,7 @@ {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/Monoid.hs b/src/Data/Singletons/Prelude/Monoid.hs index 0e9a8205..213133d9 100644 --- a/src/Data/Singletons/Prelude/Monoid.hs +++ b/src/Data/Singletons/Prelude/Monoid.hs @@ -6,6 +6,7 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/Num.hs b/src/Data/Singletons/Prelude/Num.hs index 7507c9d2..a0d0ce21 100644 --- a/src/Data/Singletons/Prelude/Num.hs +++ b/src/Data/Singletons/Prelude/Num.hs @@ -1,7 +1,7 @@ {-# LANGUAGE TemplateHaskell, PolyKinds, DataKinds, TypeFamilies, TypeOperators, GADTs, ScopedTypeVariables, UndecidableInstances, DefaultSignatures, FlexibleContexts, InstanceSigs, NoStarIsType, - TypeApplications + TypeApplications, StandaloneKindSignatures #-} ----------------------------------------------------------------------------- diff --git a/src/Data/Singletons/Prelude/Ord.hs b/src/Data/Singletons/Prelude/Ord.hs index cc9a8f5d..3ae86c63 100644 --- a/src/Data/Singletons/Prelude/Ord.hs +++ b/src/Data/Singletons/Prelude/Ord.hs @@ -1,7 +1,8 @@ {-# LANGUAGE TemplateHaskell, DataKinds, PolyKinds, ScopedTypeVariables, TypeFamilies, TypeOperators, GADTs, UndecidableInstances, FlexibleContexts, DefaultSignatures, InstanceSigs, - StandaloneDeriving, FlexibleInstances, TypeApplications #-} + StandaloneDeriving, FlexibleInstances, TypeApplications, + StandaloneKindSignatures #-} {-# OPTIONS_GHC -Wno-orphans #-} ----------------------------------------------------------------------------- diff --git a/src/Data/Singletons/Prelude/Ord/Disambiguation.hs b/src/Data/Singletons/Prelude/Ord/Disambiguation.hs index 95666bc6..4d2ff582 100644 --- a/src/Data/Singletons/Prelude/Ord/Disambiguation.hs +++ b/src/Data/Singletons/Prelude/Ord/Disambiguation.hs @@ -2,6 +2,7 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/Semigroup.hs b/src/Data/Singletons/Prelude/Semigroup.hs index 16c87b1f..0e0365fb 100644 --- a/src/Data/Singletons/Prelude/Semigroup.hs +++ b/src/Data/Singletons/Prelude/Semigroup.hs @@ -6,6 +6,7 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/Semigroup/Internal.hs b/src/Data/Singletons/Prelude/Semigroup/Internal.hs index bdf8cd2d..656d614e 100644 --- a/src/Data/Singletons/Prelude/Semigroup/Internal.hs +++ b/src/Data/Singletons/Prelude/Semigroup/Internal.hs @@ -6,6 +6,7 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/Semigroup/Internal/Disambiguation.hs b/src/Data/Singletons/Prelude/Semigroup/Internal/Disambiguation.hs index 4b8352a1..3a86b377 100644 --- a/src/Data/Singletons/Prelude/Semigroup/Internal/Disambiguation.hs +++ b/src/Data/Singletons/Prelude/Semigroup/Internal/Disambiguation.hs @@ -2,6 +2,7 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/Show.hs b/src/Data/Singletons/Prelude/Show.hs index 06493b17..2b0f4b6e 100644 --- a/src/Data/Singletons/Prelude/Show.hs +++ b/src/Data/Singletons/Prelude/Show.hs @@ -6,6 +6,7 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/Traversable.hs b/src/Data/Singletons/Prelude/Traversable.hs index fe9c3918..2d8fa482 100644 --- a/src/Data/Singletons/Prelude/Traversable.hs +++ b/src/Data/Singletons/Prelude/Traversable.hs @@ -6,6 +6,7 @@ {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Prelude/Tuple.hs b/src/Data/Singletons/Prelude/Tuple.hs index 4c639cd3..7ddb60cb 100644 --- a/src/Data/Singletons/Prelude/Tuple.hs +++ b/src/Data/Singletons/Prelude/Tuple.hs @@ -1,6 +1,6 @@ {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, DataKinds, PolyKinds, RankNTypes, TypeFamilies, GADTs, UndecidableInstances, - TypeApplications #-} + TypeApplications, StandaloneKindSignatures #-} ----------------------------------------------------------------------------- -- | diff --git a/src/Data/Singletons/Prelude/Void.hs b/src/Data/Singletons/Prelude/Void.hs index 746f612c..64a5405f 100644 --- a/src/Data/Singletons/Prelude/Void.hs +++ b/src/Data/Singletons/Prelude/Void.hs @@ -3,6 +3,7 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} diff --git a/src/Data/Singletons/Promote.hs b/src/Data/Singletons/Promote.hs index 0404a031..75954264 100644 --- a/src/Data/Singletons/Promote.hs +++ b/src/Data/Singletons/Promote.hs @@ -41,6 +41,7 @@ import Control.Monad.Trans.Maybe import Control.Monad.Writer import qualified Data.Map.Strict as Map import Data.Map.Strict ( Map ) +import Data.Maybe import qualified GHC.LanguageExtensions.Type as LangExt {- @@ -317,8 +318,7 @@ promoteDataDec (DataDecl _name _tvbs ctors) = do ctorSyms <- buildDefunSymsDataD ctors emitDecs ctorSyms -promoteClassDec :: UClassDecl - -> PrM AClassDecl +promoteClassDec :: UClassDecl -> PrM AClassDecl promoteClassDec decl@(ClassDecl { cd_name = cls_name , cd_tvbs = tvbs , cd_fds = fundeps @@ -334,6 +334,7 @@ promoteClassDec decl@(ClassDecl { cd_name = cls_name meth_names = map fst meth_sigs_list defaults_list = OMap.assocs defaults defaults_names = map fst defaults_list + mb_cls_sak <- dsReifyType cls_name sig_decs <- mapM (uncurry promote_sig) meth_sigs_list (default_decs, ann_rhss, prom_rhss) <- mapAndUnzip3M (promoteMethod DefaultMethods meth_sigs) defaults_list @@ -346,7 +347,8 @@ promoteClassDec decl@(ClassDecl { cd_name = cls_name -- no need to do anything to the fundeps. They work as is! let pro_cls_dec = DClassD [] pClsName tvbs fundeps (sig_decs ++ default_decs ++ infix_decls') - emitDecs $ pro_cls_dec:cls_infix_decls + mb_pro_cls_sak = fmap (DKiSigD pClsName) mb_cls_sak + emitDecs $ maybeToList mb_pro_cls_sak ++ pro_cls_dec:cls_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 @@ -363,17 +365,69 @@ promoteClassDec decl@(ClassDecl { cd_name = cls_name promote_sig name ty = do opts <- getOptions let proName = promotedTopLevelValueName opts name - (argKs, resK) <- promoteUnraveled ty + -- When computing the kind to use for the defunctionalization symbols, + -- /don't/ use the type variable binders from the method's type... + (_, argKs, resK) <- promoteUnraveled ty args <- mapM (const $ qNewName "arg") argKs let proTvbs = zipWith DKindedTV args argKs + -- ...instead, compute the type variable binders in a left-to-right order, + -- since that is the same order that the promoted method's kind will use. + -- See Note [Promoted class methods and kind variable ordering] + meth_sak_tvbs = toposortTyVarsOf $ argKs ++ [resK] + meth_sak = ravelVanillaDType meth_sak_tvbs [] argKs resK m_fixity <- reifyFixityWithLocals name - emitDecsM $ defunctionalize proName m_fixity proTvbs (Just resK) + emitDecsM $ defunctionalize proName m_fixity $ DefunSAK meth_sak return $ DOpenTypeFamilyD (DTypeFamilyHead proName proTvbs (DKindSig resK) Nothing) +{- +Note [Promoted class methods and kind variable ordering] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +In general, we make an effort to preserve the order of type variables when +promoting type signatures, but there is an annoying corner case where this is +difficult: class methods. When promoting class methods, the order of kind +variables in their kinds will often "just work" by happy coincidence, but +there are some situations where this does not happen. Consider the following +class: + + class C (b :: Type) where + m :: forall a. a -> b -> a + +The full type of `m` is `forall b. C b => forall a. a -> b -> a`, which binds +`b` before `a`. This order is preserved when singling `m`, but *not* when +promoting `m`. This is because the `C` class is promoted as follows: + + class PC (b :: Type) where + type M (x :: a) (y :: b) :: a + +Due to the way GHC kind-checks associated type families, the kind of `M` is +`forall a b. a -> b -> a`, which binds `b` *after* `a`. Moreover, the +`StandaloneKindSignatures` extension does not provide a way to explicitly +declare the full kind of an associated type family, so this limitation is +not easy to work around. + +The defunctionalization symbols for `M` will also follow a similar +order of type variables: + + type MSym0 :: forall a b. a ~> b ~> a + type MSym1 :: forall a b. a -> b ~> a + +There is one potential hack we could use to rectify this: + + type FlipConst x y = y + class PC (b :: Type) where + type M (x :: FlipConst '(b, a) a) (y :: b) :: a + +Using `FlipConst` would cause `b` to be mentioned before `a`, which would give +`M` the kind `forall b a. FlipConst '(b, a) a -> b -> a`. While the order of +type variables would be preserved, the downside is that the ugly `FlipConst` +type synonym leaks into the kind. I'm not particularly fond of this, so I have +decided not to use this hack unless someone specifically requests it. +-} + -- returns (unpromoted method name, ALetDecRHS) pairs promoteInstanceDec :: OMap Name DType -- Class method type signatures @@ -387,10 +441,11 @@ promoteInstanceDec orig_meth_sigs cls_tvbs_map , id_sigs = inst_sigs , id_meths = meths }) = do opts <- getOptions - cls_tvb_names <- lookup_cls_tvb_names + cls_tvbs <- lookup_cls_tvbs inst_kis <- mapM promoteType inst_tys - let pClsName = promotedClassName opts cls_name - kvs_to_bind = foldMap fvDType inst_kis + let pClsName = promotedClassName opts cls_name + cls_tvb_names = map extractTvbName cls_tvbs + kvs_to_bind = foldMap fvDType inst_kis forallBind kvs_to_bind $ do let subst = Map.fromList $ zip cls_tvb_names inst_kis meth_impl = InstanceMethods inst_sigs subst @@ -400,37 +455,36 @@ promoteInstanceDec orig_meth_sigs cls_tvbs_map inst_kis) meths'] return (decl { id_meths = zip (map fst meths) ann_rhss }) where - lookup_cls_tvb_names :: PrM [Name] - lookup_cls_tvb_names = + lookup_cls_tvbs :: PrM [DTyVarBndr] + lookup_cls_tvbs = -- First, try consulting the map of class names to their type variables. -- It is important to do this first to ensure that we consider locally -- declared classes before imported ones. See #410 for what happens if -- you don't. case Map.lookup cls_name cls_tvbs_map of - Just tvb_names -> pure $ map extractTvbName tvb_names - Nothing -> reify_cls_tvb_names + Just tvbs -> pure tvbs + Nothing -> reify_cls_tvbs -- If the class isn't present in this map, we try reifying the class -- as a last resort. - reify_cls_tvb_names :: PrM [Name] - reify_cls_tvb_names = do + reify_cls_tvbs :: PrM [DTyVarBndr] + reify_cls_tvbs = do opts <- getOptions - let pClsName = promotedClassName opts cls_name - mk_tvb_names = extract_tvb_names (dsReifyTypeNameInfo pClsName) - <|> extract_tvb_names (dsReifyTypeNameInfo cls_name) + let pClsName = promotedClassName opts cls_name + mk_tvbs = extract_tvbs (dsReifyTypeNameInfo pClsName) + <|> extract_tvbs (dsReifyTypeNameInfo cls_name) -- See Note [Using dsReifyTypeNameInfo when promoting instances] - mb_tvb_names <- runMaybeT mk_tvb_names - case mb_tvb_names of - Just tvb_names -> pure tvb_names + mb_tvbs <- runMaybeT mk_tvbs + case mb_tvbs of + Just tvbs -> pure tvbs Nothing -> fail $ "Cannot find class declaration annotation for " ++ show cls_name - extract_tvb_names :: PrM (Maybe DInfo) -> MaybeT PrM [Name] - extract_tvb_names reify_info = do + extract_tvbs :: PrM (Maybe DInfo) -> MaybeT PrM [DTyVarBndr] + extract_tvbs reify_info = do mb_info <- lift reify_info case mb_info of - Just (DTyConI (DClassD _ _ tvbs _ _) _) - -> pure $ map extractTvbName tvbs - _ -> empty + Just (DTyConI (DClassD _ _ tvbs _ _) _) -> pure tvbs + _ -> empty {- Note [Using dsReifyTypeNameInfo when promoting instances] @@ -483,8 +537,8 @@ promoteMethod :: MethodSort -- returns (type instance, ALetDecRHS, promoted RHS) promoteMethod meth_sort orig_sigs_map (meth_name, meth_rhs) = do opts <- getOptions - (meth_arg_kis, meth_res_ki) <- promote_meth_ty - meth_arg_tvs <- mapM (const $ qNewName "a") meth_arg_kis + (meth_tvbs, meth_arg_kis, meth_res_ki) <- promote_meth_ty + meth_arg_tvs <- replicateM (length meth_arg_kis) (qNewName "a") let proName = promotedTopLevelValueName opts meth_name helperNameBase = case nameBase proName of first:_ | not (isHsLetter first) -> "TFHelper" @@ -505,10 +559,11 @@ promoteMethod meth_sort orig_sigs_map (meth_name, meth_rhs) = do family_args = map DVarT meth_arg_tvs helperName <- newUniqueName helperNameBase let helperDefunName = defunctionalizedName0 opts helperName - (pro_dec, defun_decs, ann_rhs) - <- promoteLetDecRHS (ClassMethodRHS meth_arg_kis meth_res_ki) OMap.empty OMap.empty + (pro_decs, defun_decs, ann_rhs) + <- promoteLetDecRHS (ClassMethodRHS meth_tvbs meth_arg_kis meth_res_ki) + OMap.empty OMap.empty Nothing helperName meth_rhs - emitDecs (pro_dec:defun_decs) + emitDecs (pro_decs ++ defun_decs) return ( DTySynInstD (DTySynEqn Nothing (foldType (DConT proName) family_args) @@ -522,7 +577,7 @@ promoteMethod meth_sort orig_sigs_map (meth_name, meth_rhs) = do -- the types in the instance head. (e.g., if you have `class C a` and -- `instance C T`, then the substitution [a |-> T] must be applied to the -- original method's type.) - promote_meth_ty :: PrM ([DKind], DKind) + promote_meth_ty :: PrM ([DTyVarBndr], [DKind], DKind) promote_meth_ty = case meth_sort of DefaultMethods -> @@ -532,7 +587,7 @@ promoteMethod meth_sort orig_sigs_map (meth_name, meth_rhs) = do lookup_meth_ty InstanceMethods inst_sigs_map cls_subst -> case OMap.lookup meth_name inst_sigs_map of - Just ty -> + Just ty -> do -- We have an InstanceSig. These are easy: we can just use the -- instance signature's type directly, and no substitution for -- class variables is required. @@ -540,20 +595,25 @@ promoteMethod meth_sort orig_sigs_map (meth_name, meth_rhs) = do Nothing -> do -- We don't have an InstanceSig, so we must compute the kind to use -- ourselves. - (arg_kis, res_ki) <- lookup_meth_ty + (_, arg_kis, res_ki) <- lookup_meth_ty -- Substitute for the class variables in the method's type. -- See Note [Promoted class method kinds] let arg_kis' = map (substKind cls_subst) arg_kis res_ki' = substKind cls_subst res_ki - pure (arg_kis', res_ki') + -- Compute the type variable binders in a left-to-right + -- order, since that is the same order that the promoted + -- method's kind will use. + -- See Note [Promoted class methods and kind variable ordering] + tvbs' = toposortTyVarsOf (arg_kis' ++ [res_ki']) + pure (tvbs', arg_kis', res_ki') -- Attempt to look up a class method's original type. - lookup_meth_ty :: PrM ([DKind], DKind) + lookup_meth_ty :: PrM ([DTyVarBndr], [DKind], DKind) lookup_meth_ty = do opts <- getOptions let proName = promotedTopLevelValueName opts meth_name case OMap.lookup meth_name orig_sigs_map of - Just ty -> + Just ty -> do -- The type of the method is in scope, so promote that. promoteUnraveled ty Nothing -> do @@ -563,9 +623,14 @@ promoteMethod meth_sort orig_sigs_map (meth_name, meth_rhs) = do -- See Note [Using dsReifyTypeNameInfo when promoting instances] case mb_info of Just (DTyConI (DOpenTypeFamilyD (DTypeFamilyHead _ tvbs mb_res_ki _)) _) - -> let arg_kis = map (defaultToTypeKind . extractTvbKind) tvbs - res_ki = defaultToTypeKind (resultSigToMaybeKind mb_res_ki) - in pure (arg_kis, res_ki) + -> let arg_kis = map (defaultMaybeToTypeKind . extractTvbKind) tvbs + res_ki = defaultMaybeToTypeKind (resultSigToMaybeKind mb_res_ki) + -- Compute the type variable binders in a left-to-right + -- order, since that is the same order that the promoted + -- method's kind will use. + -- See Note [Promoted class methods and kind variable ordering] + tvbs' = toposortTyVarsOf (arg_kis ++ [res_ki]) + in pure (tvbs', arg_kis, res_ki) _ -> fail $ "Cannot find type annotation for " ++ show proName {- @@ -583,14 +648,17 @@ Consider this example of a type class (and instance): The promoted version of these declarations would be: class PC a where - type M (x :: a) (y :: Bool) (z :: Bool) - type M x y z = MHelper1 x y z + type M (x :: a) (y :: Bool) :: Bool + type M x y = MHelper1 x y instance PC [a] where - type M x y z = MHelper2 x y z + type M x y = MHelper2 x y - type family MHelper1 (x :: a) (y :: Bool) (z :: Bool) where ... - type family MHelper2 (x :: [a]) (y :: Bool) (z :: Bool) where ... + type MHelper1 :: a -> Bool -> Bool + type family MHelper1 x y where ... + + type MHelper2 :: [a] -> Bool -> Bool + type family MHelper2 x y where ... Getting the kind signature for MHelper1 (the promoted default implementation of M) is quite simple, as it corresponds exactly to the kind of M. We might even @@ -616,7 +684,7 @@ promoteLetDecEnv mb_let_uniq (LetDecEnv { lde_defns = value_env emitDecs $ concat defun_decss bound_kvs <- allBoundKindVars - let decs = pro_decs ++ infix_decls + let decs = concat pro_decs ++ infix_decls -- build the ALetDecEnv let let_dec_env' = LetDecEnv { lde_defns = OMap.fromList $ zip names ann_rhss @@ -691,8 +759,10 @@ data LetDecRHSSort = LetBindingRHS -- The right-hand side of a class method (either a default method or a -- method in an instance declaration). - | ClassMethodRHS [DKind] DKind -- The RHS's promoted argument and result types. - -- Needed to fix #136. + | ClassMethodRHS + [DTyVarBndr] [DKind] DKind + -- The RHS's promoted type variable binders, argument types, and + -- result type. Needed to fix #136. deriving Show -- This function is used both to promote class method defaults and normal @@ -704,7 +774,8 @@ promoteLetDecRHS :: LetDecRHSSort -> Maybe Uniq -- let-binding unique (if locally bound) -> Name -- name of the thing being promoted -> ULetDecRHS -- body of the thing - -> PrM ( DDec -- "type family" + -> PrM ( [DDec] -- promoted type family dec, plus the + -- SAK dec (if one exists) , [DDec] -- defunctionalization , ALetDecRHS ) -- annotated RHS promoteLetDecRHS rhs_sort type_env fix_env mb_let_uniq name let_dec_rhs = do @@ -712,13 +783,12 @@ promoteLetDecRHS rhs_sort type_env fix_env mb_let_uniq name let_dec_rhs = do all_locals <- allLocals case let_dec_rhs of UValue exp -> do - (m_argKs, m_resK, ty_num_args) <- promote_let_dec_ty 0 + (m_ldrki, ty_num_args) <- promote_let_dec_ty all_locals 0 if ty_num_args == 0 then let proName = promotedValueName opts name mb_let_uniq prom_fun_lhs = foldType (DConT proName) $ map DVarT all_locals in - promote_let_dec_rhs all_locals m_argKs m_resK 0 - (promoteExp exp) + promote_let_dec_rhs all_locals m_ldrki 0 (promoteExp exp) (\exp' -> [DTySynEqn Nothing prom_fun_lhs exp']) AValue else @@ -730,15 +800,15 @@ promoteLetDecRHS rhs_sort type_env fix_env mb_let_uniq name let_dec_rhs = do where -- Promote the RHS of a UFunction (or a UValue with a function type). promote_function_rhs :: [Name] - -> [DClause] -> PrM (DDec, [DDec], ALetDecRHS) + -> [DClause] -> PrM ([DDec], [DDec], ALetDecRHS) promote_function_rhs all_locals clauses = do opts <- getOptions numArgs <- count_args clauses let proName = promotedValueName opts name mb_let_uniq prom_fun_lhs = foldType (DConT proName) $ map DVarT all_locals - (m_argKs, m_resK, ty_num_args) <- promote_let_dec_ty numArgs + (m_ldrki, ty_num_args) <- promote_let_dec_ty all_locals numArgs expClauses <- mapM (etaContractOrExpand ty_num_args numArgs) clauses - promote_let_dec_rhs all_locals m_argKs m_resK ty_num_args + promote_let_dec_rhs all_locals m_ldrki ty_num_args (mapAndUnzipM (promoteClause prom_fun_lhs) expClauses) id AFunction @@ -750,53 +820,112 @@ promoteLetDecRHS rhs_sort type_env fix_env mb_let_uniq name let_dec_rhs = do -- * For UFunctions, `prom_a` is [DTySynEqn] and `a` is [DClause]. promote_let_dec_rhs :: [Name] -- Local variables bound in this scope - -> [Maybe DKind] -- Promoted function argument types (if known) - -> Maybe DKind -- Promoted function result type (if known) + -> Maybe LetDecRHSKindInfo -- Information about the promoted kind (if present) -> Int -- The number of promoted function arguments -> PrM (prom_a, a) -- Promote the RHS -> (prom_a -> [DTySynEqn]) -- Turn the promoted RHS into type family equations -> (DType -> Int -> a -> ALetDecRHS) -- Build an ALetDecRHS - -> PrM (DDec, [DDec], ALetDecRHS) - promote_let_dec_rhs all_locals m_argKs m_resK ty_num_args + -> PrM ([DDec], [DDec], ALetDecRHS) + promote_let_dec_rhs all_locals m_ldrki ty_num_args promote_thing mk_prom_eqns mk_alet_dec_rhs = do opts <- getOptions - tyvarNames <- mapM (const $ qNewName "a") m_argKs - let proName = promotedValueName opts name mb_let_uniq - local_tvbs = map DPlainTV all_locals - m_fixity = OMap.lookup name fix_env - args = zipWith inferMaybeKindTV tyvarNames m_argKs - all_args = local_tvbs ++ args - lde_kvs_to_bind = foldMap (foldMap fvDType) m_argKs <> foldMap fvDType m_resK - defun_decs <- defunctionalize proName m_fixity all_args m_resK + tyvarNames <- replicateM ty_num_args (qNewName "a") + let proName = promotedValueName opts name mb_let_uniq + local_tvbs = map DPlainTV all_locals + m_fixity = OMap.lookup name fix_env + + mk_tf_head :: [DTyVarBndr] -> DFamilyResultSig -> DTypeFamilyHead + mk_tf_head tvbs res_sig = DTypeFamilyHead proName tvbs res_sig Nothing + + (lde_kvs_to_bind, m_sak_dec, defun_ki, tf_head) = + -- There are three possible cases: + case m_ldrki of + -- 1. We have no kind information whatsoever. + Nothing -> + let all_args = local_tvbs ++ map DPlainTV tyvarNames in + ( OSet.empty + , Nothing + , DefunNoSAK all_args Nothing + , mk_tf_head all_args DNoSig + ) + -- 2. We have some kind information in the form of a LetDecRHSKindInfo. + Just (LDRKI m_sak tvbs argKs resK) -> + let all_args = local_tvbs ++ zipWith DKindedTV tyvarNames argKs + lde_kvs_to_bind' = OSet.fromList (map extractTvbName tvbs) in + case m_sak of + -- 2(a). We do not have a standalone kind signature. + Nothing -> + ( lde_kvs_to_bind' + , Nothing + , DefunNoSAK all_args (Just resK) + , mk_tf_head all_args (DKindSig resK) + ) + -- 2(b). We have a standalone kind signature. + Just sak -> + ( lde_kvs_to_bind' + , Just $ DKiSigD proName sak + , DefunSAK sak + -- If the promoted type family has a standalone kind + -- signature, then there is no need to annotate the arguments + -- or result with explicit kinds. A standalone kind signature + -- accomplishes the same thing, but better. + , mk_tf_head (map dropTvbKind all_args) DNoSig + ) + + defun_decs <- defunctionalize proName m_fixity defun_ki (prom_thing, thing) <- forallBind lde_kvs_to_bind promote_thing prom_fun_rhs <- lookupVarE name - return ( DClosedTypeFamilyD - (DTypeFamilyHead proName all_args (maybeKindToResultSig m_resK) Nothing) - (mk_prom_eqns prom_thing) + return ( catMaybes [ m_sak_dec + , Just $ DClosedTypeFamilyD tf_head (mk_prom_eqns prom_thing) + ] , defun_decs , mk_alet_dec_rhs prom_fun_rhs ty_num_args thing ) - promote_let_dec_ty :: Int -- The number of arguments to default to if the - -- type cannot be inferred. This is 0 for UValues - -- and the number of arguments in a single clause - -- for UFunctions. - -> PrM ([Maybe DKind], Maybe DKind, Int) - promote_let_dec_ty default_num_args = + promote_let_dec_ty :: [Name] -- The local variables that the let-dec closes + -- over. If this is non-empty, we cannot + -- produce a standalone kind signature. + -- See Note [No SAKs for let-decs with local variables] + -> Int -- The number of arguments to default to if the + -- type cannot be inferred. This is 0 for UValues + -- and the number of arguments in a single clause + -- for UFunctions. + -> PrM (Maybe LetDecRHSKindInfo, Int) + -- Returns two things in a pair: + -- + -- 1. Information about the promoted kind, + -- if available. + -- + -- 2. The number of arguments the let-dec has. + -- If no kind information is available from + -- which to infer this number, then this + -- will default to the earlier Int argument. + promote_let_dec_ty all_locals default_num_args = case rhs_sort of - ClassMethodRHS arg_kis res_ki - -> return (map Just arg_kis, Just res_ki, length arg_kis) + ClassMethodRHS tvbs arg_kis res_ki + -> -- For class method RHS helper functions, don't bother quantifying + -- any type variables in their SAKS. We could certainly try, but + -- given that these functions are only used internally, there's no + -- point in trying to get the order of type variables correct, + -- since we don't apply these functions with visible kind + -- applications. + let sak = ravelVanillaDType [] [] arg_kis res_ki in + return (Just (LDRKI (Just sak) tvbs arg_kis res_ki), length arg_kis) LetBindingRHS | 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 - -- to make the return kind work out - (argKs, resultK) <- promoteUnraveled ty + -- promoteType turns rank-1 uses of (->) into (~>). So, we unravel + -- first to avoid this behavior, and then ravel back. + (tvbs, argKs, resultK) <- promoteUnraveled ty + let m_sak | null all_locals = Just $ ravelVanillaDType tvbs [] argKs resultK + -- If this let-dec closes over local variables, then + -- don't give it a SAK. + -- See Note [No SAKs for let-decs with local variables] + | otherwise = Nothing -- invariant: count_args ty == length argKs - return (map Just argKs, Just resultK, length argKs) + return (Just (LDRKI m_sak tvbs argKs resultK), length argKs) | otherwise - -> return (replicate default_num_args Nothing, Nothing, default_num_args) + -> return (Nothing, default_num_args) etaContractOrExpand :: Int -> Int -> DClause -> PrM DClause etaContractOrExpand ty_num_args clause_num_args (DClause pats exp) @@ -816,6 +945,69 @@ promoteLetDecRHS rhs_sort type_env fix_env mb_let_uniq name let_dec_rhs = do count_args (DClause pats _ : _) = return $ length pats count_args _ = fail $ "Impossible! A function without clauses." +-- An auxiliary data type used in promoteLetDecRHS that describes information +-- related to the promoted kind of a class method default or normal +-- let binding. +data LetDecRHSKindInfo = + LDRKI (Maybe DKind) -- The standalone kind signature, if applicable. + -- This will be Nothing if the let-dec RHS has local + -- variables that it closes over. + -- See Note [No SAKs for let-decs with local variables] + [DTyVarBndr] -- The type variable binders of the kind. + [DKind] -- The argument kinds. + DKind -- The result kind. + +{- +Note [No SAKs for let-decs with local variables] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Consider promoting this: + + f :: Bool + f = let x = True + g :: () -> Bool + g _ = x + in g () + +Clearly, the promoted `F` type family will have the following SAK: + + type F :: () + +What about `G`? At a passing glance, it appears that you could get away with +this: + + type G :: Bool -> () + +But this isn't quite right, since `g` closes over `x = True`. The body of `G`, +therefore, has to lift `x` to be an explicit argument: + + type family G x (u :: ()) :: Bool where + G x _ = x + +At present, we don't keep track of the types of local variables like `x`, which +makes it difficult to create a SAK for things like `G`. Here are some possible +ideas, each followed by explanations for why they are infeasible: + +* Use wildcards: + + type G :: _ -> () -> Bool + + Alas, GHC currently does not allow wildcards in SAKs. See GHC#17432. + +* Use visible dependent quantification to avoid having to say what the kind + of `x` is: + + type G :: forall x -> () -> Bool + + A clever trick to be sure, but it doesn't quite do what we want, since + GHC will generalize that kind to become `forall (x :: k) -> () -> Bool`, + which is more general than we want. + +In any case, it's probably not worth bothering with SAKs for local definitions +like `g` in the first place, so we avoid generating SAKs for anything that +closes over at least one local variable for now. If someone yells about this, +we'll reconsider this design. +-} + promoteClause :: DType -- What to use as the LHS of the promoted type family -- equation. This should consist of the promoted name of -- the function to which the clause belongs, applied to @@ -915,7 +1107,7 @@ promoteExp (DLamE names exp) = do (foldType (DConT lambdaName) $ map DVarT all_args) rhs]] - emitDecsM $ defunctionalize lambdaName Nothing tvbs Nothing + emitDecsM $ defunctionalize lambdaName Nothing $ DefunNoSAK tvbs Nothing let promLambda = foldl apply (DConT (defunctionalizedName opts lambdaName 0)) (map DVarT all_locals) return (promLambda, ADLamE tyNames promLambda names ann_exp) diff --git a/src/Data/Singletons/Promote/Defun.hs b/src/Data/Singletons/Promote/Defun.hs index 1a067403..874b6819 100644 --- a/src/Data/Singletons/Promote/Defun.hs +++ b/src/Data/Singletons/Promote/Defun.hs @@ -11,7 +11,6 @@ This file creates defunctionalization symbols for types during promotion. 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 @@ -20,7 +19,6 @@ import Data.Singletons.Syntax import Data.Singletons.TH.Options 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 @@ -63,42 +61,30 @@ defunAssociatedTypeFamilies cls_tvbs atfs = do emitDecs defun_atfs where defun :: OpenTypeFamilyDecl -> PrM [DDec] - defun (TypeFamilyDecl tf_head) - | cls_has_cusk - -- If the parent class has a CUSK, so does its associated type - -- families. Default type variable kinds and the result kind to be Type - -- if they do not yet have an explicit kind. - = buildDefunSymsTypeFamilyHead (cuskify . ascribe_tf_tvb_kind) - (Just . defaultToTypeKind) tf_head - | otherwise - -- If the parent class lacks a CUSK, we cannot safely default kinds to - -- Type. Use whatever information from the parent class is available - -- and let kind inference do the rest. - = buildDefunSymsTypeFamilyHead ascribe_tf_tvb_kind id tf_head - - -- A class has a CUSK when all of its type variable binders have explicit - -- kinds. In other words, `cls_tvb_kind_map` should have an entry for each - -- class-bound type variable. - cls_has_cusk :: Bool - cls_has_cusk = length cls_tvbs == Map.size cls_tvb_kind_map + defun (TypeFamilyDecl tf_head) = + buildDefunSymsTypeFamilyHead ascribe_tf_tvb_kind id tf_head -- Maps class-bound type variables to their kind annotations (if supplied). -- For example, `class C (a :: Bool) b (c :: Type)` will produce -- {a |-> Bool, c |-> Type}. cls_tvb_kind_map :: Map Name DKind - cls_tvb_kind_map = Map.fromList [ (extractTvbName cls_tvb, cls_tvb_kind) - | cls_tvb <- cls_tvbs - , Just cls_tvb_kind <- [extractTvbKind cls_tvb] + cls_tvb_kind_map = Map.fromList [ (extractTvbName tvb, tvb_kind) + | tvb <- cls_tvbs + , Just tvb_kind <- [extractTvbKind tvb] ] + -- If the parent class lacks a SAK, we cannot safely default kinds to + -- Type. All we can do is make use of whatever kind information that parent + -- class provides and let kind inference do the rest. + -- -- We can sometimes learn more specific information about unannotated type - -- family binders from the paren class, as in the following example: + -- family binders from the parent class, as in the following example: -- -- class C (a :: Bool) where -- type T a :: Type -- -- Here, we know that `T :: Bool -> Type` because we can infer that the `a` - -- in `type T a` should be of kind `Bool` from the class header. + -- in `type T a` should be of kind `Bool` from the class SAK. ascribe_tf_tvb_kind :: DTyVarBndr -> DTyVarBndr ascribe_tf_tvb_kind tvb = case tvb of @@ -106,30 +92,33 @@ defunAssociatedTypeFamilies cls_tvbs atfs = do DPlainTV n -> maybe tvb (DKindedTV n) $ Map.lookup n cls_tvb_kind_map buildDefunSyms :: DDec -> PrM [DDec] -buildDefunSyms (DDataD _new_or_data _cxt _tyName _tvbs _k ctors _derivings) = - buildDefunSymsDataD ctors -buildDefunSyms (DClosedTypeFamilyD tf_head _) = - buildDefunSymsClosedTypeFamilyD tf_head -buildDefunSyms (DOpenTypeFamilyD tf_head) = - buildDefunSymsOpenTypeFamilyD tf_head -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 " ++ - "type families and data declarations" - --- If a closed type family lacks an explicit kind for any of its type variables --- or its result kind, then it does not have a CUSK, so we must let kind --- inference do the rest. +buildDefunSyms dec = + case dec of + DDataD _new_or_data _cxt _tyName _tvbs _k ctors _derivings -> + buildDefunSymsDataD ctors + DClosedTypeFamilyD tf_head _ -> + buildDefunSymsClosedTypeFamilyD tf_head + DOpenTypeFamilyD tf_head -> + buildDefunSymsOpenTypeFamilyD tf_head + DTySynD name tvbs rhs -> + buildDefunSymsTySynD name tvbs rhs + DClassD _cxt name tvbs _fundeps _members -> + defunReify name tvbs (Just (DConT constraintName)) + _ -> fail $ "Defunctionalization symbols can only be built for " ++ + "type families and data declarations" + +-- Unlike open type families, closed type families that lack SAKS do not +-- default anything to Type, instead relying on kind inference to figure out +-- unspecified kinds. buildDefunSymsClosedTypeFamilyD :: DTypeFamilyHead -> PrM [DDec] buildDefunSymsClosedTypeFamilyD = buildDefunSymsTypeFamilyHead id id --- Top-level open type families always have CUSKs, so it is safe to default --- type variable kinds or the result kind to Type if they are not indicated --- explicitly. +-- If an open type family lacks a SAK and has type variable binders or a result +-- without explicit kinds, then they default to Type (hence the uses of +-- default{Tvb,Maybe}ToTypeKind). buildDefunSymsOpenTypeFamilyD :: DTypeFamilyHead -> PrM [DDec] -buildDefunSymsOpenTypeFamilyD = buildDefunSymsTypeFamilyHead cuskify (Just . defaultToTypeKind) +buildDefunSymsOpenTypeFamilyD = + buildDefunSymsTypeFamilyHead defaultTvbToTypeKind (Just . defaultMaybeToTypeKind) buildDefunSymsTypeFamilyHead :: (DTyVarBndr -> DTyVarBndr) -- How to default each type variable binder @@ -139,16 +128,13 @@ buildDefunSymsTypeFamilyHead default_tvb default_kind (DTypeFamilyHead name tvbs result_sig _) = do let arg_tvbs = map default_tvb tvbs res_kind = default_kind (resultSigToMaybeKind result_sig) - defunReifyFixity name arg_tvbs res_kind + defunReify name arg_tvbs res_kind buildDefunSymsTySynD :: Name -> [DTyVarBndr] -> DType -> PrM [DDec] -buildDefunSymsTySynD name tvbs rhs = - defunReifyFixity name tvbs mb_res_kind +buildDefunSymsTySynD name tvbs rhs = defunReify 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. + -- If a type synonym lacks a SAK, we can "infer" its result kind by + -- checking for an explicit kind annotation on the right-hand side. mb_res_kind :: Maybe DKind mb_res_kind = case rhs of DSigT _ k -> Just k @@ -159,179 +145,233 @@ buildDefunSymsDataD ctors = concatMapM promoteCtor ctors where promoteCtor :: DCon -> PrM [DDec] - promoteCtor ctor@(DCon _ _ _ _ res_ty) = do - let (name, arg_tys) = extractNameTypes ctor - tvb_names <- replicateM (length arg_tys) $ qNewName "t" - arg_kis <- mapM promoteType arg_tys - let arg_tvbs = zipWith DKindedTV tvb_names arg_kis - res_ki <- promoteType res_ty - defunReifyFixity name arg_tvbs (Just res_ki) + promoteCtor (DCon tvbs _ name fields res_ty) = do + let arg_tys = tysOfConFields fields + arg_kis <- traverse promoteType_NC arg_tys + res_ki <- promoteType_NC res_ty + let con_ki = ravelVanillaDType tvbs [] arg_kis res_ki + m_fixity <- reifyFixityWithLocals name + defunctionalize name m_fixity $ DefunSAK con_ki -- Generate defunctionalization symbols for a name, using reifyFixityWithLocals --- to determine what the fixity of each symbol should be. --- See Note [Fixity declarations for defunctionalization symbols] -defunReifyFixity :: Name -> [DTyVarBndr] -> Maybe DKind -> PrM [DDec] -defunReifyFixity name tvbs m_res_kind = do +-- to determine what the fixity of each symbol should be +-- (see Note [Fixity declarations for defunctionalization symbols]) +-- and dsReifyType to determine whether defunctionalization should make use +-- of SAKs or not (see Note [Defunctionalization game plan]). +defunReify :: Name -- Name of the declaration to be defunctionalized + -> [DTyVarBndr] -- The declaration's type variable binders + -- (only used if the declaration lacks a SAK) + -> Maybe DKind -- The declaration's return kind, if it has one + -- (only used if the declaration lacks a SAK) + -> PrM [DDec] +defunReify name tvbs m_res_kind = do m_fixity <- reifyFixityWithLocals name - defunctionalize name m_fixity tvbs m_res_kind - --- Generate data declarations and apply instances --- required for defunctionalization. --- For a type family: --- --- type family Foo (m :: Nat) (n :: Nat) (l :: Nat) :: Nat --- --- we generate data declarations that allow us to talk about partial --- application at the type level: --- --- type FooSym3 a b c = Foo a b c --- data FooSym2 a b f where --- FooSym2KindInference :: SameKind (Apply (FooSym2 a b) arg) (FooSym3 a b arg) --- => FooSym2 a b f --- type instance Apply (FooSym2 a b) c = FooSym3 a b c --- data FooSym1 a f where --- FooSym1KindInference :: SameKind (Apply (FooSym1 a) arg) (FooSym2 a arg) --- => FooSym1 a f --- type instance Apply (FooSym1 a) b = FooSym2 a b --- data FooSym0 f where --- FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) --- => FooSym0 f --- type instance Apply FooSym0 a = FooSym1 a --- --- What's up with all the "KindInference" stuff? In some scenarios, we don't --- know the kinds that we should be using in these symbols. But, GHC can figure --- it out using the types of the "KindInference" dummy data constructors. A --- bit of a hack, but it works quite nicely. The only problem is that GHC will --- warn about an unused data constructor. So, we use the data constructor in --- an instance of a dummy class. (See Data.Singletons.SuppressUnusedWarnings --- for the class, which should never be seen by anyone, ever.) --- --- The defunctionalize function takes Maybe DKinds so that the caller can --- indicate which kinds are known and which need to be inferred. --- --- See also Note [Defunctionalization and dependent quantification] + m_sak <- dsReifyType name + let defun = defunctionalize name m_fixity + case m_sak of + Just sak -> defun $ DefunSAK sak + Nothing -> defun $ DefunNoSAK tvbs m_res_kind + +-- Generate symbol data types, Apply instances, and other declarations required +-- for defunctionalization. +-- See Note [Defunctionalization game plan] for an overview of the design +-- considerations involved. defunctionalize :: Name - -> Maybe Fixity -- The name's fixity, if one was declared. - -> [DTyVarBndr] -> Maybe DKind -> PrM [DDec] -defunctionalize name m_fixity m_arg_tvbs' m_res_kind' = do - opts <- getOptions - (m_arg_tvbs, m_res_kind) <- eta_expand (noExactTyVars m_arg_tvbs') - (noExactTyVars m_res_kind') - extra_name <- qNewName "arg" - - let -- Implements part (2)(i) from Note [Defunctionalization and dependent quantification] - tvb_to_type_map :: Map Name DType - tvb_to_type_map = Map.fromList $ -- (2)(i)(c) - map (\tvb -> (extractTvbName tvb, dTyVarBndrToDType tvb)) $ - toposortTyVarsOf $ -- (2)(i)(b) - map dTyVarBndrToDType m_arg_tvbs - ++ maybeToList m_res_kind -- (2)(i)(a) - - -- The inner loop. @go n arg_tvbs res_tvbs@ returns @(m_result, decls)@. - -- Using one particular example: - -- - -- @ - -- data ExampleSym2 (x :: a) (y :: b) :: c ~> d ~> Type where ... - -- type instance Apply (ExampleSym2 x y) z = ExampleSym3 x y z - -- ... - -- @ - -- - -- We have: - -- - -- * @n@ is 2. This is incremented in each iteration of `go`. - -- - -- * @arg_tvbs@ is [(x :: a), (y :: b)]. - -- - -- * @res_tvbs@ is [(z :: c), (w :: d)]. The kinds of these type variable - -- binders appear in the result kind. - -- - -- * @m_result@ is `Just (c ~> d ~> Type)`. @m_result@ is returned so - -- that earlier defunctionalization symbols can build on the result - -- kinds of later symbols. For instance, ExampleSym1 would get the - -- result kind `b ~> c ~> d ~> Type` by prepending `b` to ExampleSym2's - -- result kind `c ~> d ~> Type`. - -- - -- * @decls@ are all of the declarations corresponding to ExampleSym2 - -- and later defunctionalization symbols. This is the main payload of - -- the function. - -- - -- This function is quadratic because it appends a variable at the end of - -- the @arg_tvbs@ list at each iteration. In practice, this is unlikely - -- to be a performance bottleneck since the number of arguments rarely - -- gets to be that large. - go :: Int -> [DTyVarBndr] -> [DTyVarBndr] - -> (Maybe DKind, [DDec]) - go _ _ [] = (m_res_kind, []) - go n arg_tvbs (res_tvb:res_tvbs) = - let (m_result, decls) = go (n+1) (arg_tvbs ++ [res_tvb]) res_tvbs - - tyfun_name = extractTvbName res_tvb - data_name = defunctionalizedName opts name n - next_name = defunctionalizedName opts name (n+1) - con_name = prefixName "" ":" $ suffixName "KindInference" "###" data_name - m_tyfun = buildTyFunArrow_maybe (extractTvbKind res_tvb) m_result - arg_params = -- Implements part (2)(ii) from - -- Note [Defunctionalization and dependent quantification] - map (map_tvb_kind (substType tvb_to_type_map)) arg_tvbs - arg_names = map extractTvbName arg_params - 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])) - con_decl = DCon (map dropTvbKind params ++ [DPlainTV extra_name]) - [con_eq_ct] - con_name - (DNormalC False []) - (foldTypeTvbs (DConT data_name) params) - data_decl = DDataD Data [] data_name args res_ki [con_decl] [] - where - (args, res_ki) - = case m_tyfun of - Nothing -> (params, Nothing) - -- If we cannot infer the return type, don't bother - -- trying to construct an explicit return kind. - Just tyfun -> - 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) - toList $ fvDType tyfun -- (2)(iii)(a) - in (arg_params, Just (DForallT ForallInvis tyfun_tvbs tyfun)) - app_data_ty = foldTypeTvbs (DConT data_name) arg_tvbs - app_eqn = DTySynEqn Nothing - (DConT applyName `DAppT` app_data_ty - `DAppT` DVarT tyfun_name) - (foldTypeTvbs (DConT next_name) - (arg_tvbs ++ [DPlainTV tyfun_name])) - app_decl = DTySynInstD app_eqn - suppress = DInstanceD Nothing Nothing [] - (DConT suppressClassName `DAppT` app_data_ty) - [DLetDec $ DFunD suppressMethodName - [DClause [] - ((DVarE 'snd) `DAppE` - mkTupleDExp [DConE con_name, - mkTupleDExp []])]] - - -- See Note [Fixity declarations for defunctionalization symbols] - fixity_decl = maybeToList $ fmap (mk_fix_decl data_name) m_fixity - in (m_tyfun, suppress : data_decl : app_decl : fixity_decl ++ decls) - - let num_args = length m_arg_tvbs - sat_name = defunctionalizedName opts name num_args - sat_dec = DTySynD sat_name m_arg_tvbs $ foldTypeTvbs (DConT name) m_arg_tvbs - sat_fixity_dec = maybeToList $ fmap (mk_fix_decl sat_name) m_fixity - - (_, other_decs) = go 0 [] m_arg_tvbs - return $ other_decs ++ sat_dec : sat_fixity_dec + -> Maybe Fixity + -> DefunKindInfo + -> PrM [DDec] +defunctionalize name m_fixity defun_ki = do + case defun_ki of + DefunSAK sak -> + -- Even if a declaration has a SAK, its kind may not be vanilla. + case unravelVanillaDType_either sak of + -- If the kind isn't vanilla, use the fallback approach. + -- See Note [Defunctionalization game plan], + -- Wrinkle 2: Non-vanilla kinds. + Left _ -> defun_fallback [] (Just sak) + -- Otherwise, proceed with defun_vanilla_sak. + Right (sak_tvbs, _sak_cxt, sak_arg_kis, sak_res_ki) + -> defun_vanilla_sak sak_tvbs sak_arg_kis sak_res_ki + -- If a declaration lacks a SAK, it likely has a partial kind. + -- See Note [Defunctionalization game plan], Wrinkle 1: Partial kinds. + DefunNoSAK tvbs m_res -> defun_fallback tvbs m_res where + -- Generate defunctionalization symbols for things with vanilla SAKs. + -- The symbols themselves will also be given SAKs. + defun_vanilla_sak :: [DTyVarBndr] -> [DKind] -> DKind -> PrM [DDec] + defun_vanilla_sak sak_tvbs sak_arg_kis sak_res_ki = do + opts <- getOptions + extra_name <- qNewName "arg" + -- Use noExactName below to avoid #17537. + arg_names <- replicateM (length sak_arg_kis) (noExactName <$> qNewName "a") + + let -- The inner loop. @go n arg_nks res_nks@ returns @(res_k, decls)@. + -- Using one particular example: + -- + -- @ + -- type ExampleSym2 :: a -> b -> c ~> d ~> Type + -- data ExampleSym2 x y where ... + -- type instance Apply (ExampleSym2 x y) z = ExampleSym3 x y z + -- ... + -- @ + -- + -- We have: + -- + -- * @n@ is 2. This is incremented in each iteration of `go`. + -- + -- * @arg_nks@ is [(x, a), (y, b)]. Each element in this list is a + -- (type variable name, type variable kind) pair. The kinds appear in + -- the SAK, separated by matchable arrows (->). + -- + -- * @res_tvbs@ is [(z, c), (w, d)]. Each element in this list is a + -- (type variable name, type variable kind) pair. The kinds appear in + -- @res_k@, separated by unmatchable arrows (~>). + -- + -- * @res_k@ is `c ~> d ~> Type`. @res_k@ is returned so that earlier + -- defunctionalization symbols can build on the result kinds of + -- later symbols. For instance, ExampleSym1 would get the result + -- kind `b ~> c ~> d ~> Type` by prepending `b` to ExampleSym2's + -- result kind `c ~> d ~> Type`. + -- + -- * @decls@ are all of the declarations corresponding to ExampleSym2 + -- and later defunctionalization symbols. This is the main payload of + -- the function. + -- + -- This function is quadratic because it appends a variable at the end of + -- the @arg_nks@ list at each iteration. In practice, this is unlikely + -- to be a performance bottleneck since the number of arguments rarely + -- gets to be that large. + go :: Int -> [(Name, DKind)] -> [(Name, DKind)] -> (DKind, [DDec]) + go n arg_nks res_nkss = + case res_nkss of + [] -> + let -- Somewhat surprisingly, we do *not* generate SAKs for + -- fully saturated defunctionalization symbols. + -- See Note [No SAKs for fully saturated defunctionalization symbols] + sat_decs = mk_sat_decs opts n (map (uncurry DKindedTV) arg_nks) + (Just sak_res_ki) + in (sak_res_ki, sat_decs) + res_nk:res_nks -> + let (res_ki, decs) = go (n+1) (arg_nks ++ [res_nk]) res_nks + tyfun = buildTyFunArrow (snd res_nk) res_ki + defun_sak_dec = DKiSigD (defunctionalizedName opts name n) $ + ravelVanillaDType sak_tvbs [] (map snd arg_nks) tyfun + defun_other_decs = mk_defun_decs opts n (map (DPlainTV . fst) arg_nks) + (fst res_nk) extra_name Nothing + in (tyfun, defun_sak_dec:defun_other_decs ++ decs) + + pure $ snd $ go 0 [] $ zip arg_names sak_arg_kis + + -- If defun_sak can't be used to defunctionalize something, this fallback + -- approach is used. This is used when defunctionalizing something with a + -- partial kind + -- (see Note [Defunctionalization game plan], Wrinkle 1: Partial kinds) + -- or a non-vanilla kind + -- (see Note [Defunctionalization game plan], Wrinkle 2: Non-vanilla kinds). + defun_fallback :: [DTyVarBndr] -> Maybe DKind -> PrM [DDec] + defun_fallback tvbs' m_res' = do + opts <- getOptions + extra_name <- qNewName "arg" + -- Use noExactTyVars below to avoid #11812. + (tvbs, m_res) <- eta_expand (noExactTyVars tvbs') (noExactTyVars m_res') + + let -- The inner loop. @go n arg_tvbs res_tvbs@ returns @(m_res_k, decls)@. + -- Using one particular example: + -- + -- @ + -- data ExampleSym2 (x :: a) y :: c ~> d ~> Type where ... + -- type instance Apply (ExampleSym2 x y) z = ExampleSym3 x y z + -- ... + -- @ + -- + -- This works very similarly to the `go` function in + -- `defun_vanilla_sak`. The main differences are: + -- + -- * This function does not produce any SAKs for defunctionalization + -- symbols. + -- + -- * Instead of [(Name, DKind)], this function uses [DTyVarBndr] as + -- the types of @arg_tvbs@ and @res_tvbs@. This is because the + -- kinds are not always known. By a similar token, this function + -- uses Maybe DKind, not DKind, as the type of @m_res_k@, since + -- the result kind is not always fully known. + go :: Int -> [DTyVarBndr] -> [DTyVarBndr] -> (Maybe DKind, [DDec]) + go n arg_tvbs res_tvbss = + case res_tvbss of + [] -> + let sat_decs = mk_sat_decs opts n arg_tvbs m_res + in (m_res, sat_decs) + res_tvb:res_tvbs -> + let (m_res_ki, decs) = go (n+1) (arg_tvbs ++ [res_tvb]) res_tvbs + m_tyfun = buildTyFunArrow_maybe (extractTvbKind res_tvb) + m_res_ki + defun_decs' = mk_defun_decs opts n arg_tvbs + (extractTvbName res_tvb) + extra_name m_tyfun + in (m_tyfun, defun_decs' ++ decs) + + pure $ snd $ go 0 [] tvbs + + mk_defun_decs :: Options + -> Int + -> [DTyVarBndr] + -> Name + -> Name + -> Maybe DKind + -> [DDec] + mk_defun_decs opts n arg_tvbs tyfun_name extra_name m_tyfun = + let data_name = defunctionalizedName opts name n + next_name = defunctionalizedName opts name (n+1) + con_name = prefixName "" ":" $ suffixName "KindInference" "###" data_name + arg_names = map extractTvbName arg_tvbs + params = arg_tvbs ++ [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])) + con_decl = DCon [] [con_eq_ct] con_name (DNormalC False []) + (foldTypeTvbs (DConT data_name) params) + data_decl = DDataD Data [] data_name args m_tyfun [con_decl] [] + where + args | isJust m_tyfun = arg_tvbs + | otherwise = params + app_data_ty = foldTypeTvbs (DConT data_name) arg_tvbs + app_eqn = DTySynEqn Nothing + (DConT applyName `DAppT` app_data_ty + `DAppT` DVarT tyfun_name) + (foldTypeTvbs (DConT next_name) + (arg_tvbs ++ [DPlainTV tyfun_name])) + app_decl = DTySynInstD app_eqn + suppress = DInstanceD Nothing Nothing [] + (DConT suppressClassName `DAppT` app_data_ty) + [DLetDec $ DFunD suppressMethodName + [DClause [] + ((DVarE 'snd) `DAppE` + mkTupleDExp [DConE con_name, + mkTupleDExp []])]] + + -- See Note [Fixity declarations for defunctionalization symbols] + fixity_decl = maybeToList $ fmap (mk_fix_decl data_name) m_fixity + in data_decl : app_decl : suppress : fixity_decl + + -- Generate a "fully saturated" defunction symbol, along with a fixity + -- declaration (if needed). + mk_sat_decs :: Options -> Int -> [DTyVarBndr] -> Maybe DKind -> [DDec] + mk_sat_decs opts n sat_tvbs m_sat_res = + let sat_name = defunctionalizedName opts name n + sat_dec = DTySynD sat_name sat_tvbs $ + foldTypeTvbs (DConT name) sat_tvbs `maybeSigT` m_sat_res + sat_fixity_dec = maybeToList $ fmap (mk_fix_decl sat_name) m_fixity + in sat_dec : sat_fixity_dec + + -- Generate extra kind variable binders corresponding to the number of + -- arrows in the return kind (if provided). Examples: + -- + -- >>> eta_expand [(x :: a), (y :: b)] (Just (c -> Type)) + -- ([(x :: a), (y :: b), (e :: c)], Just Type) + -- + -- >>> eta_expand [(x :: a), (y :: b)] Nothing + -- ([(x :: a), (y :: b)], Nothing) 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 @@ -340,279 +380,501 @@ defunctionalize name m_fixity m_arg_tvbs' m_res_kind' = do extra_arg_tvbs <- traverse mk_extra_tvb vis_arg_ks pure (m_arg_tvbs ++ extra_arg_tvbs, Just result_k) + -- Convert a DVisFunArg to a DTyVarBndr, generating a fresh type variable + -- name if the DVisFunArg is an anonymous argument. mk_extra_tvb :: DVisFunArg -> PrM DTyVarBndr mk_extra_tvb vfa = case vfa of DVisFADep tvb -> pure tvb DVisFAAnon k -> DKindedTV <$> qNewName "e" <*> pure k - map_tvb_kind :: (DKind -> DKind) -> DTyVarBndr -> DTyVarBndr - map_tvb_kind _ tvb@DPlainTV{} = tvb - map_tvb_kind f (DKindedTV n k) = DKindedTV n (f k) - mk_fix_decl :: Name -> Fixity -> DDec mk_fix_decl n f = DLetDec $ DInfixD f n -{- -Note [Defunctionalization and dependent quantification] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The machinery in this module supports defunctionalizing types that use -dependent quantification, such as in the following example: - - 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 - -Here is what is involved in making this happen: - -1. When defunctionalizing, we must not only know the argument kinds, but rather - the argument *kind variable binders*. This is essential since, for instance, - Symmetry dependently quantifies `a` and `y` and uses them in the kind of - `e`. If we did not track the original kind variable names, then instead of - generating this defunctionalization symbol for Symmetry: - - data SymmetrySym2 (a :: Proxy t) (y :: Proxy t) :: (a :~: y) ~> Type - - We would generate something more general, like this: - - data SymmetrySym2 (abc1 :: Proxy t) (abc2 :: Proxy t) :: (a :~: y) ~> Type - - Alas, there are times where will have no choice but to write a slightly - more general kind than we should. For instance, consider this: - - data SymmetrySym0 :: Proxy t ~> Proxy t ~> (a :~: y) ~> Type - - This defunctionalization symbol doesn't capture the dependent quantification - in the first and second argument kinds. But in order to do that properly, - you'd need the ability to write something like: - - data SymmetrySym0 :: forall (a :: Proxy t) ~> forall (y :: Proxy t) - ~> (a :~: y) ~> Type +-- Indicates whether the type being defunctionalized has a standalone kind +-- signature. If it does, DefunSAK contains the kind. If not, DefunNoSAK +-- contains whatever information is known about its type variable binders +-- and result kind. +-- See Note [Defunctionalization game plan] for details on how this +-- information is used. +data DefunKindInfo + = DefunSAK DKind + | DefunNoSAK [DTyVarBndr] (Maybe DKind) - It is my (RGS's) belief that it is not possible to achieve something like - this in today's GHC (see #304), so we'll just have to live with SymmetrySym0 - being slightly more general than it ought to be. In practice, this is - unlikely to bite unless you're writing code that specifically exploits this - dependency in just the right way. - -2. I pulled a fast one earlier by writing: - - data SymmetrySym0 :: Proxy t ~> Proxy t ~> (a :~: y) ~> Type - - GHC will actually reject this, because it does not have a CUSK. There are - two glaring problems here: +-- Shorthand for building (k1 ~> k2) +buildTyFunArrow :: DKind -> DKind -> DKind +buildTyFunArrow k1 k2 = DConT tyFunArrowName `DAppT` k1 `DAppT` k2 - (a) The kind of `t` is underdetermined. - (b) `a` and `y` should have kind `Proxy t`, but this is not currently the case. +buildTyFunArrow_maybe :: Maybe DKind -> Maybe DKind -> Maybe DKind +buildTyFunArrow_maybe m_k1 m_k2 = buildTyFunArrow <$> m_k1 <*> m_k2 - Ultimately, the fix is to use explicit kind signatures. A naïve attempt - would be something like this: +{- +Note [Defunctionalization game plan] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Generating defunctionalization symbols involves a surprising amount of +complexity. This Note gives a broad overview of what happens during +defunctionalization and highlights various design considerations. +As a working example, we will use the following type family: + + type Foo :: forall c a b. a -> b -> c -> c + type family Foo x y z where ... + +We must generate a defunctionalization symbol for every number of arguments +to which Foo can be partially applied. We do so by generating the following +declarations: + + type FooSym0 :: forall c a b. a ~> b ~> c ~> c + data FooSym0 f where + FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) + => FooSym0 f + type instance Apply FooSym0 x = FooSym1 x + + type FooSym1 :: forall c a b. a -> b ~> c ~> c + data FooSym1 x f where + FooSym1KindInference :: SameKind (Apply (FooSym1 a) arg) (FooSym2 a arg) + => FooSym1 a f + type instance Apply (FooSym1 x) y = FooSym2 x y + + type FooSym2 :: forall c a b. a -> b -> c ~> c + data FooSym2 x y f where + FooSym2KindInference :: SameKind (Apply (FooSym2 x y) arg) (FooSym3 x y arg) + => FooSym2 x y f + type instance Apply (FooSym2 x y) z = FooSym3 x y z + + type FooSym3 (x :: a) (y :: b) (z :: c) = Foo x y z :: c + +Some things to note: + +* Each defunctionalization symbol has its own standalone kind signature. The + number after `Sym` in each symbol indicates the number of leading -> arrows + in its kind—that is, the number of arguments to which it can be applied + directly to without the use of the Apply type family. + + See "Wrinkle 1: Partial kinds" below for what happens if the declaration + being defunctionalized does *not* have a standalone kind signature. + +* Each data declaration has a constructor with the suffix `-KindInference` + in its name. These are redundant in the particular case of Foo, where the + kind is already known. They play a more vital role when the kind of the + declaration being defunctionalized is only partially known. + See "Wrinkle 1: Partial kinds" below for more information. + +* FooSym3, the last defunctionalization symbol, is somewhat special in that + it is a type synonym, not a data type. These sorts of symbols are referred + to as "fully saturated" defunctionalization symbols. Furthermore, these + symbols are intentionally *not* given SAKs. See + Note [No SAKs for fully saturated defunctionalization symbols]. + +* If Foo had a fixity declaration (e.g., infixl 4 `Foo`), then we would also + generate fixity declarations for each defunctionalization symbol (e.g., + infixl 4 `FooSym0`). + See Note [Fixity declarations for defunctionalization symbols]. + +* Foo has a vanilla kind signature. (See + Note [Vanilla-type validity checking during promotion] in D.S.Promote.Type + for what "vanilla" means in this context.) Having a vanilla type signature is + important, as it is a property that makes it much simpler to preserve the + order of type variables (`forall c a b.`) in each of the defunctionalization + symbols. + + That being said, it is not strictly required that the kind be vanilla. There + is another approach that can be used to defunctionalize things with + non-vanilla types, at the possible expense of having different type variable + orders between different defunctionalization symbols. + See "Wrinkle 2: Non-vanilla kinds" below for more information. + +----- +-- Wrinkle 1: Partial kinds +----- + +The Foo example above has a standalone kind signature, but not everything has +this much kind information. For example, consider this: + + $(singletons [d| + type family Not x where + Not False = True + Not True = False + |]) + +The inferred kind for Not is `Bool -> Bool`, but since Not was declared in TH +quotes, `singletons` has no knowledge of this. Instead, we must rely on kind +inference to give Not's defunctionalization symbols the appropriate kinds. +Here is a naïve first attempt: + + data NotSym0 f + type instance Apply NotSym0 x = NotSym1 x + + type NotSym1 x = Not x + +NotSym1 will have the inferred kind `Bool -> Bool`, but poor NotSym0 will have +the inferred kind `forall k. k -> Type`, which is far more general than we +would like. We can do slightly better by supplying additional kind information +in a data constructor, like so: + + type SameKind :: k -> k -> Constraint + class SameKind x y = () + + data NotSym0 f where + NotSym0KindInference :: SameKind (Apply NotSym0 arg) (NotSym1 arg) + => NotSym0 f + +NotSym0KindInference is not intended to ever be seen by the user. Its only +reason for existing is its existential +`SameKind (Apply NotSym0 arg) (NotSym1 arg)` context, which allows GHC to +figure out that NotSym0 has kind `Bool ~> Bool`. This is a bit of a hack, but +it works quite nicely. The only problem is that GHC is likely to warn that +NotSym0KindInference is unused, which is annoying. To work around this, we +mention the data constructor in an instance of a dummy class: + + instance SuppressUnusedWarnings NotSym0 where + suppressUnusedWarnings = snd (NotSym0KindInference, ()) + +Similarly, this SuppressUnusedWarnings class is not intended to ever be seen +by the user. As its name suggests, it only exists to help suppress "unused +data constructor" warnings. + +Some declarations have a mixture of known kinds and unknown kinds, such as in +this example: + + $(singletons [d| + type family Bar x (y :: Nat) (z :: Nat) :: Nat where ... + |]) - data SymmetrySym0 :: Proxy (t :: (k :: Type)) ~> Proxy (t :: (k :: Type)) - ~> ((a :: Proxy (t :: (k :: Type))) :~: (y :: Proxy (t :: (k :: Type)))) - ~> Type +We can use the known kinds to guide kind inference. In this particular example +of Bar, here are the defunctionalization symbols that would be generated: - While that works, it adds a nontrivial amount of clutter. Plus, it requires - figuring out (in Template Haskell) which variables have underdetermined - kinds and substituting for them. Blegh. A much cleaner approach is: + data BarSym0 f where ... + data BarSym1 x :: Nat ~> Nat ~> Nat where ... + data BarSym2 x (y :: Nat) :: Nat ~> Nat where ... + type BarSym3 x (y :: Nat) (z :: Nat) = Bar x y z :: Nat - data SymmetrySym0 :: forall (k :: Type) (t :: k) (a :: Proxy t) (y :: Proxy t). - Proxy t ~> Proxy t ~> (a :~: y) ~> Type +----- +-- Wrinkle 2: Non-vanilla kinds +----- + +There is only limited support for defunctionalizing declarations with +non-vanilla kinds. One example of something with a non-vanilla kind is the +following, which uses a nested forall: + + $(singletons [d| + type Baz :: forall a. a -> forall b. b -> Type + data Baz x y + |]) + +One might envision generating the following defunctionalization symbols for +Baz: + + type BazSym0 :: forall a. a ~> forall b. b ~> Type + data BazSym0 f where ... + + type BarSym1 :: forall a. a -> forall b. b ~> Type + data BazSym1 x f where ... - This time, all we have to do is put an explicit `forall` in front, and we - achieve a CUSK without having to muck up the body of return kind. It also - has the benefit of looking much nicer in generated code. + type family BazSym2 (x :: a) (y :: b) = Baz x y :: Type + +Unfortunately, doing so would require impredicativity, since we would have: + + forall a. a ~> forall b. b ~> Type + = forall a. (~>) a (forall b. b ~> Type) + = forall a. TyFun a (forall b. b ~> Type) -> Type - Let's talk about how to achieve this feat, using SymmetrySym1 as the - guiding example: +Note that TyFun is an ordinary data type, so having its second argument be +(forall b. b ~> Type) is truly impredicative. As a result, trying to preserve +nested or higher-rank foralls is a non-starter. - (i) Before we begin defunctionalizing a type, we construct a mapping from - variable names to their corresponding types, complete with kinds. - For instance, in Symmetry, we would have the following map: +We need not reject Baz entirely, however. We can still generate perfectly +usable defunctionalization symbols if we are willing to sacrifice the exact +order of foralls. When we encounter a non-vanilla kind such as Baz's, we simply +fall back to the algorithm used when we encounter a partial kind (as described +in "Wrinkle 1: Partial kinds" above.) In other words, we generate the +following symbols: - { k :-> DVarT k -- k - , t :-> DSigT (DVarT t) (DVarT k) -- (t :: k) - , a :-> DSigT (DVarT a) (DConT ''Proxy `DAppT` DVarT t) -- (a :: Proxy t) - , y :-> DSigT (DVarT y) (DConT ''Proxy `DAppT` DVarT y) -- (y :: Proxy t) - , e :-> DSigT (DVarT e) (DConT ''(:~:) - `DAppT` DSigT (DVarT a) (DConT ''Proxy `DAppT` DSigT (DVarT t) (DVarT k)) - `DAppT` DSigT (DVarT y) (DConT ''Proxy `DAppT` DSigT (DVarT t) (DVarT k))) - -- (e :: (a :: Proxy (t :: k)) :~: (y :: Proxy (t :: k))) - } + data BazSym0 :: a ~> b ~> Type where ... + data BazSym1 (x :: a) :: b ~> Type where ... + type BazSym2 (x :: a) (y :: b) = Baz x y :: Type - Why do this? Because when constructing the `forall` in the return kind - of a defunctionalization symbol, it's convenient to be able to know - the kinds of everything being bound at a glance. It's not always - possible to recover the kinds of every variable (for instance, if - we're just given `Proxy t ~> Proxy t ~> (a :~: y) ~> Type`), so having - this information is handy. +The kinds of BazSym0 and BazSym1 both start with `forall a b.`, +whereas the `b` is quantified later in Baz itself. For most use cases, however, +this is not a huge concern. - To construct this map, we: +Another way kinds can be non-vanilla is if they contain visible dependent +quantification, like so: - (a) Grab the list of type variable binders (this is given as an input - to defunctionalize, as discussed in part (1)) and turn it into a list - of types. Also include the return kind (if there is one) in this - list, as it may also mention type variables with explicit kinds. - (b) Construct a flat list of all type variables mentioned in this list. - This may involve looking in the kinds of type variables binders. - (Note that this part is crucial—the the Singletons/PolyKinds test - will fail to compile without it!) - (c) Take the flat list and insert each variable into the map by - mapping its name to its type (as demonstrated above). + $(singletons [d| + type Quux :: forall (k :: Type) -> k -> Type + data Quux x y + |]) - To continue the Symmetry example: +What should the kind of QuuxSym0 be? Intuitively, it should be this: - (a) We grab the list of type variable binders + type QuuxSym0 :: forall (k :: Type) ~> k ~> Type - [ (a :: Proxy t) - , (y :: Proxy t) - , (e :: (a :: Proxy (t :: k)) :~: (y :: Proxy (t :: k))) - ] +Alas, `forall (k :: Type) ~>` simply doesn't work. See #304. But there is an +acceptable compromise we can make that can give us defunctionalization symbols +for Quux. Once again, we fall back to the partial kind algorithm: - from the Symmetry declaration. Including the return kind (Type), - we get: + data QuuxSym0 :: Type ~> k ~> Type where ... + data QuuxSym1 (k :: Type) :: k ~> Type where ... + type QuuxSym2 (k :: Type) (x :: k) = Quux k x :: Type - [ (a :: Proxy t) - , (y :: Proxy t) - , (e :: (a :: Proxy (t :: k)) :~: (y :: Proxy (t :: k))) - , Type - ] +The catch is that the kind of QuuxSym0, `forall k. Type ~> k ~> Type`, is +slightly more general than it ought to be. In practice, however, this is +unlikely to be a problem as long as you apply QuuxSym0 to arguments of the +right kinds. - (b) We flatten this into a list of well scoped type variables: +Note [No SAKs for fully saturated defunctionalization symbols] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +When generating defunctionalization symbols, most of the symbols are data +types. The last one, however, is a type synonym. For example, this code: - [ k - , (t :: k) - , (a :: Proxy t) - , (y :: Proxy t) - , (e :: (a :: Proxy (t :: k)) :~: (y :~: Proxy (t :: k))) - ] + $(singletons [d| + type Const :: a -> b -> a + type Const x y = x + |]) - (c) From this, we construct the map shown at the beginning of (i). +Will generate the following symbols: - (ii) Using the map, we will annotate any kind variables in the LHS of the - declaration with their respective kinds. In this example, the LHS is: + type ConstSym0 :: a ~> b ~> a + data ConstSym0 f where ... - data SymmetrySym1 (a :: Proxy t) :: ... + type ConstSym1 :: a -> b ~> a + data ConstSym1 x f where ... - Since `t` maps to simply `(t :: k)` in the map, the LHS becomes: + type ConstSym2 (x :: a) (y :: b) = Const x y :: a - data SymmetrySym1 (a :: Proxy (t :: k)) :: ... +ConstSym2, the sole type synonym of the bunch, is what is referred to as a +"fully saturated" defunctionaliztion symbol. - Why do this? Because we need to make it apparent that `k` is bound on - the LHS. If we don't, we might end up trying to quantify `k` in the - return kind (see #353 for an example of what goes wrong if you try to - do this). - - Having to explicitly annotate each occurrence of every kind variable on - the LHS like this is a bit tiresome, especially since we don't have to - do this in the return kind. If GHC had syntax for visible dependent - quantification, we could avoid this step entirely and simply write: +At first glance, ConstSym2 may not seem terribly useful, since it is +effectively a thin wrapper around the original Const type. Indeed, fully +saturated symbols are never appear directly in user-written code. Instead, +they are most valuable in TH-generated code, as singletons often generates code +that directly applies a defunctionalization symbol to some number of arguments +(see, for instance, D.S.Names.promoteTySym). In theory, such code could carve +out a special case for fully saturated applications and apply the original +type instead of a defunctionalization symbol, but determining when an +application is fully saturated is often difficult in practice. As a result, it +is more convenient to just generate code that always applies FuncSymN to N +arguments, and to let fully saturated defunctionalization symbols handle the +case where N equals the number of arguments needed to fully saturate Func. - data SymmetrySym1 :: forall k (t :: k). forall (a :: Proxy t) -> ... - - Until GHC gains this syntax, this is the best alternative. +Another curious thing about fully saturated defunctionalization symbols do +*not* get assigned SAKs, unlike their data type brethren. Why not just give +ConstSym2 a SAK like this? - (iii) When constructing each defunctionalization symbol, we will end up with - some remaining type variable binders and a return kind. For instance: - - data SymmetrySym1 (a :: Proxy (t :: k)) - :: forall ???. Proxy t - ~> ((a :: Proxy (t :: k)) :~: (y :: Proxy (t :: k))) - ~> Type - - We must fill in the ??? part. Here is how we do so: - - (a) Collect all of the type variables mentioned in the return kind. - (b) Look up each type variable's corresponding type in the map (from - part (i)) to learn as much kind information as possible. - (c) Perform a reverse topological sort on these types to put the - types (and kind) variables in proper dependency order. - (d) Filter out any variables that are already bound by the type - variable binders that precede the return kind. - - After doing these steps, what remains goes in place of ???. Let's - explain this with the example above: - - data SymmetrySym1 (a :: Proxy (t :: k)) - :: forall ???. Proxy t - ~> ((a :: Proxy (t :: k)) :~: (y :: Proxy (t :: k))) - ~> Type + type ConstSym2 :: a -> b -> a + type ConstSym2 x y = Const x y - (a) [t, a, k, y] - (b) [(t :: k), (a :: Proxy t), k, (y :: Proxy t)] - (c) [k, (t :: k), (a :: Proxy t), (y :: Proxy t)] - (d) [(y :: Proxy t)] (`k`, `t` and `a` were already bound) +This would in fact work for most use cases, but there are a handful of corner +cases where this approach would break down. Here is one such corner case: + + $(promote [d| + class Applicative f where + pure :: a -> f a + ... + (*>) :: f a -> f b -> f b + |]) + + ==> + + class PApplicative f where + type Pure (x :: a) :: f a + type (*>) (x :: f a) (y :: f b) :: f b + +What would happen if we were to defunctionalize the promoted version of (*>)? +We'd end up with the following defunctionalization symbols: + + type (*>@#@$) :: f a ~> f b ~> f b + data (*>@#@$) f where ... - Therefore, we end up with: + type (*>@#@$$) :: f a -> f b ~> f b + data (*>@#@$$) x f where ... - data SymmetrySym1 (a :: Proxy (t :: k)) - :: forall (y :: Proxy t). - Proxy t - ~> ((a :: Proxy (t :: k)) :~: (y :: Proxy (t :: k))) - ~> Type --} + type (*>@#@$$$) :: f a -> f b -> f b + type (*>@#@$$$) x y = (*>) x y --- This is a small function with large importance. When generating --- defunctionalization data types, we often need to fill in the blank in the --- sort of code exemplified below: --- --- @ --- data FooSym2 a (b :: x) (c :: TyFun y z) where --- FooSym2KindInference :: _ --- @ --- --- Where the kind of @a@ is not known. It's extremely tempting to just --- copy-and-paste the type variable binders from the data type itself to the --- constructor, like so: --- --- @ --- data FooSym2 a (b :: x) (c :: TyFun y z) where --- FooSym2KindInference :: forall a (b :: x) (c :: TyFun y z). --- SameKind (...) (...). --- FooSym2KindInference a b c --- @ --- --- But this ends up being an untenable approach. Because @a@ lacks a kind --- signature, @FooSym2@ does not have a complete, user-specified kind signature --- (or CUSK), so GHC will fail to typecheck @FooSym2KindInference@. --- --- Thankfully, there's a workaround—just don't give any of the constructor's --- type variable binders any kinds: --- --- @ --- data FooSym2 a (b :: x) (c :: TyFun y z) where --- FooSym2KindInference :: forall a b c --- SameKind (...) (...). --- FooSym2KindInference a b c --- @ --- --- GHC may be moody when it comes to CUSKs, but it's at least understanding --- enough to typecheck this without issue. The 'dropTvbKind' function is --- what removes the kinds used in the kind inference constructor. -dropTvbKind :: DTyVarBndr -> DTyVarBndr -dropTvbKind tvb@(DPlainTV {}) = tvb -dropTvbKind (DKindedTV n _) = DPlainTV n +It turns out, however, that (*>@#@$$$) will not kind-check. Because (*>@#@$$$) +has a standalone kind signature, it is kind-generalized *before* kind-checking +the actual definition itself. Therefore, the full kind is: --- Shorthand for building (k1 ~> k2) -buildTyFunArrow :: DKind -> DKind -> DKind -buildTyFunArrow k1 k2 = DConT tyFunArrowName `DAppT` k1 `DAppT` k2 + type (*>@#@$$$) :: forall {k} (f :: k -> Type) (a :: k) (b :: k). + f a -> f b -> f b + type (*>@#@$$$) x y = (*>) x y + +However, the kind of (*>) is +`forall (f :: Type -> Type) (a :: Type) (b :: Type). f a -> f b -> f b`. +This is not general enough for (*>@#@$$$), which expects kind-polymorphic `f`, +`a`, and `b`, leading to a kind error. You might think that we could somehow +infer this information, but note the quoted definition of Applicative (and +PApplicative, as a consequence) omits the kinds of `f`, `a`, and `b` entirely. +Unless we were to implement full-blown kind inference inside of Template +Haskell (which is a tall order), the kind `f a -> f b -> f b` is about as good +as we can get. + +Note that (*>@#@$) and (*>@#@$$) are implemented as GADTs, not type synonyms. +This allows them to have kind-polymorphic `f`, `a`, and `b` in their kinds +while equating `k` to be `Type` in their data constructors, which neatly avoids +the issue that (*>@#@$$$) faces. -buildTyFunArrow_maybe :: Maybe DKind -> Maybe DKind -> Maybe DKind -buildTyFunArrow_maybe m_k1 m_k2 = do - k1 <- m_k1 - k2 <- m_k2 - return $ DConT tyFunArrowName `DAppT` k1 `DAppT` k2 - --- Build (~>) kind from the list of kinds -ravelTyFun :: [DKind] -> DKind -ravelTyFun [] = error "Internal error: TyFun raveling nil" -ravelTyFun [k] = k -ravelTyFun kinds = go tailK (buildTyFunArrow k2 k1) - where (k1 : k2 : tailK) = reverse kinds - go [] acc = acc - go (k:ks) acc = go ks (buildTyFunArrow k acc) +----- + +In one last attempt to salvage the idea of giving SAKs to fully saturated +defunctionalization symbols, I explored an idea where we would add +"dummy constraints" to get the kinds exactly right. The idea was to first +define a type synonym for dummy contexts: + + type Dummy :: Constraint -> Constraint + type Dummy x = () ~ () + +Dummy simply ignores its argument and returns `() ~ ()`. `() ~ ()` was chosen +because it's one of the few Constraints that can currently be used at the kind +level. Dummy could, in theory, be used like this: + + type (*>@#@$) :: Dummy (PApplicative f) => f a ~> f b ~> f b + type (*>@#@$$) :: Dummy (PApplicative f) => f a -> f b ~> f b + type (*>@#@$$$) :: Dummy (PApplicative f) => f a -> f b -> f b + +The advantage to using `Dummy (PApplicative f)` is that it would constraint `f` +to be of kind `Type -> Type`, which would get the kinds exactly the way we want +them. Sounds great, right? Unfortunately, it doesn't work in practice. Consider +this example: + + $(promoteOnly [d| + class C a where + m1 :: a -> a + m1 = m2 + + m2 :: a -> a + m2 = m1 + |]) + + ==> + + class PC a where + type M1 (x :: a) :: a + type M1 x = Apply M2Sym1 x + + type M2 (x :: a) :: a + type M2 x = Apply M1Sym1 x + +The generated code would fail to compile, instead throwing this error: + + error: + • Class ‘PC’ cannot be used here + (it is defined and used in the same recursive group) + • In the first argument of ‘Dummy’, namely ‘(PC a)’ + In a standalone kind signature for ‘M2Sym1’: + forall a. Dummy (PC a) => a -> a + | + | type M2Sym1 :: forall a. Dummy (PC a) => a -> a + | ^^^^ + +Ugh. I suspect this is a GHC bug (see +https://gitlab.haskell.org/ghc/ghc/issues/15942#note_242075), but it's one +that's unlikely to be fixed any time soon. + +A slight variations on idea is to use the original class instead of the +promoted class in `Dummy` contexts, e.g., + + type M2Sym1 :: forall a. Dummy (C a) => a -> a + +This would avoid the recursive group issues, but it would introduce a new +problem: the original class is not guaranteed to exist if +`promoteOnly` or `singletonsOnly` are used to create the promoted class. +(Indeed, this is precisely the case in the `PC` example.) + +----- + +As an alternative to type synonyms, we might consider using type families to +define fully saturated defunctionalization symbols. For instance, we could try +this: + + type (*>@#@$$$) :: f a -> f b -> f b + type family (*>@#@$$$) x y where + (*>@#@$$$) x y = (*>) x y + +Like before, the full kind of (*>@#@$$$) is generalized to be +`forall {k} (f :: k -> Type) (a :: k) (b :: k)`. The difference is that the +type family equation *matches* on `k` such that the equation will only trigger +if `k` is equal to `Type`. (This is similar to the trick that (*>@#@$) and +(*>@#@$$) employ, as being GADTs allows them to constrain `k` to be `Type` in +their data constructors.) + +Alas, the type family approach is strictly less powerful than the type synonym +approach. Consider the following code: + + $(singletons [d| + data Nat = Z | S Nat + + natMinus :: Nat -> Nat -> Nat + natMinus Z _ = Z + natMinus (S a) (S b) = natMinus a b + natMinus a Z = a + |]) + +Among other things, this will generate the following declarations: + + type ZSym0 :: Nat + + type NatMinus :: Nat -> Nat -> Nat + type family NatMinus x y where + NatMinus Z _ = ZSym0 + NatMinus (S a) (S b) = NatMinus a b + NatMinus a Z = a + + sNatMinus :: SNat x -> SNat y -> SNat (NatMinus x y) + sNatMinus SZ _ = SZ + sNatMinus (SS sA) (SS sB) = sNatMinus sA sB + sNatMinus sA SZ = sA + +Shockingly, this will either succeed or fail to compile depending on whether +ZSym0 is a type synonym or a type family. If ZSym0 is a type synonym, then +the first and third equations of NatMinus will be compatible (since GHC will +be able to infer that Z ~ ZSym0), which is what allows the third equation of +sNatMinus to typecheck. If ZSym0 is a type family, however, then the third +equation of NatMinus will be incompatible with the first, which will cause +the third equation of sNatMinus to fail to typecheck: + + error: + • Could not deduce: NatMinus x 'Z ~ x + from the context: y ~ 'Z + bound by a pattern with constructor: SZ :: SNat 'Z, + in an equation for ‘sNatMinus’ + ‘x’ is a rigid type variable bound by + the type signature for: + sNatMinus :: forall (x :: Nat) (y :: Nat). + SNat x -> SNat y -> SNat (NatMinus x y) + Expected type: SNat (NatMinus x y) + Actual type: SNat x + • In the expression: sA + In an equation for ‘sNatMinus’: sNatMinus sA SZ = sA + • Relevant bindings include + sA :: SNat x + sNatMinus :: SNat x -> SNat y -> SNat (NatMinus x y) + +One could work around the issue by tweaking the third equation of natMinus +slightly: + + $(singletons [d| + ... + + natMinus :: Nat -> Nat -> Nat + natMinus Z _ = Z + natMinus (S a) (S b) = natMinus a b + natMinus a@(S _) Z = a + |]) + +But I would generally prefer to avoid having the user add extraneous pattern +matches when possible. Given the choice between expressiveness and SAKs, I give +the edge to expressiveness. + +Bottom line: don't give fully saturated defunctionalization symbols SAKs. This +is admittedly not ideal, but it's unlikely to be a sticking point in practice, +given that these symbols are almost exclusively used in autogenerated code +in the first place. If we want to support promoting code that uses visible +type application (see #378), we will need to figure out how to resolve this +issue. -{- Note [Fixity declarations for defunctionalization symbols] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Just like we promote fixity declarations, we should also generate fixity diff --git a/src/Data/Singletons/Promote/Eq.hs b/src/Data/Singletons/Promote/Eq.hs index 9ad94973..ea484998 100644 --- a/src/Data/Singletons/Promote/Eq.hs +++ b/src/Data/Singletons/Promote/Eq.hs @@ -29,14 +29,12 @@ mkEqTypeInstance kind cons = do false_branch = catch_all_case opts helperName falseName branches | null cons = [null_branch] | otherwise = true_branches ++ [false_branch] + -- We opt to give an explicit kind signature for the helper type family. + -- See Note [Promoted class method kinds] in Data.Singletons.Promote. + sakDec = DKiSigD helperName $ ravelVanillaDType [] [] [kind, kind] boolKi closedFam = DClosedTypeFamilyD (DTypeFamilyHead helperName - -- We opt to give explicit kinds for the tyvars - -- in the helper type family. - -- See Note [Promoted class method kinds] - -- in Data.Singletons.Promote. - [ DKindedTV aName kind - , DKindedTV bName kind ] - (DKindSig boolKi) + [DPlainTV aName, DPlainTV bName] + DNoSig Nothing) branches eqInst = DTySynInstD $ @@ -46,7 +44,7 @@ mkEqTypeInstance kind cons = do inst = DInstanceD Nothing Nothing [] ((DConT $ promotedClassName opts eqName) `DAppT` kind) [eqInst] - return [closedFam, inst] + return [sakDec, closedFam, inst] where mk_branch :: OptionsMonad q => Name -> DCon -> q DTySynEqn mk_branch helper_name con = do diff --git a/src/Data/Singletons/Promote/Type.hs b/src/Data/Singletons/Promote/Type.hs index d326b9ae..23eae124 100644 --- a/src/Data/Singletons/Promote/Type.hs +++ b/src/Data/Singletons/Promote/Type.hs @@ -80,14 +80,15 @@ promoteTypeArg_NC :: MonadFail m => DTypeArg -> m DTypeArg promoteTypeArg_NC (DTANormal t) = DTANormal <$> promoteType_NC t promoteTypeArg_NC ta@(DTyArg _) = pure ta -- Kinds are already promoted --- | Promote a DType to the kind level, splitting it into its argument and --- result types in the process. -promoteUnraveled :: MonadFail m => DType -> m ([DKind], DKind) +-- | Promote a DType to the kind level, splitting it into its type variable +-- binders, argument types, and result type in the process. +promoteUnraveled :: MonadFail m + => DType -> m ([DTyVarBndr], [DKind], DKind) promoteUnraveled ty = do - (_, _, arg_tys, res_ty) <- unravelVanillaDType ty + (tvbs, _, arg_tys, res_ty) <- unravelVanillaDType ty arg_kis <- mapM promoteType_NC arg_tys res_ki <- promoteType_NC res_ty - return (arg_kis, res_ki) + return (tvbs, arg_kis, res_ki) {- Note [Vanilla-type validity checking during promotion] diff --git a/src/Data/Singletons/Single.hs b/src/Data/Singletons/Single.hs index 09507096..e720f63c 100644 --- a/src/Data/Singletons/Single.hs +++ b/src/Data/Singletons/Single.hs @@ -262,7 +262,7 @@ singITyConInstance n f <- qNewName "f" x <- qNewName "x" let k_penult = last ks - k_fun = ravel (map DVarT ks) (DVarT k_last) + k_fun = ravelVanillaDType [] [] (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 @@ -399,12 +399,15 @@ singClassD (ClassDecl { cd_cxt = cls_cxt , lde_bound_kvs = meth_bound_kvs } }) = bindContext [foldTypeTvbs (DConT cls_name) cls_tvbs] $ do opts <- getOptions + mb_cls_sak <- dsReifyType cls_name + let sing_cls_name = singledClassName opts cls_name + mb_sing_cls_sak = fmap (DKiSigD sing_cls_name) mb_cls_sak cls_infix_decls <- singReifiedInfixDecls $ cls_name:meth_names (sing_sigs, _, tyvar_names, cxts, res_kis, singIDefunss) <- unzip6 <$> zipWithM (singTySig no_meth_defns meth_sigs meth_bound_kvs) meth_names (map (DConT . defunctionalizedName0 opts) meth_names) - emitDecs $ cls_infix_decls ++ concat singIDefunss + emitDecs $ maybeToList mb_sing_cls_sak ++ cls_infix_decls ++ concat singIDefunss let default_sigs = catMaybes $ zipWith4 (mk_default_sig opts) meth_names sing_sigs tyvar_names res_kis @@ -417,7 +420,7 @@ singClassD (ClassDecl { cd_cxt = cls_cxt fixities' <- mapMaybeM (uncurry singInfixDecl) $ OMap.assocs fixities cls_cxt' <- mapM singPred cls_cxt return $ DClassD cls_cxt' - (singledClassName opts cls_name) + sing_cls_name cls_tvbs cls_fundeps -- they are fine without modification (map DLetDec (sing_sigs ++ sing_meths ++ fixities') ++ default_sigs) @@ -458,8 +461,7 @@ singClassD (ClassDecl { cd_cxt = cls_cxt -- See #175 [ foldApply prom_meth tvs `DSigT` res_ki , foldApply prom_dflt tvs ] - return $ DForallT ForallInvis tvbs - $ DConstrainedT (default_pred : cxt) (ravel args res) + return $ ravelVanillaDType tvbs (default_pred : cxt) args res where bound_kv_set = Set.fromList bound_kvs @@ -637,11 +639,12 @@ singTySig defns types bound_kvs name prom_ty = do mk_sing_ty :: Int -> SgM (DType, [Name]) mk_sing_ty n = do arg_names <- replicateM n (qNewName "arg") - return ( DForallT ForallInvis - (map DPlainTV arg_names) - (ravel (map (\nm -> singFamily `DAppT` DVarT nm) arg_names) - (singFamily `DAppT` - (foldl apply prom_ty (map DVarT arg_names)))) + return ( ravelVanillaDType + (map DPlainTV arg_names) + [] + (map (\nm -> singFamily `DAppT` DVarT nm) arg_names) + (singFamily `DAppT` + (foldl apply prom_ty (map DVarT arg_names))) , arg_names ) singLetDecRHS :: Map Name [Name] @@ -993,10 +996,6 @@ singLit (StringL str) = do singLit lit = fail ("Only string and natural number literals can be singled: " ++ show lit) -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] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/src/Data/Singletons/Single/Data.hs b/src/Data/Singletons/Single/Data.hs index 2d3624a4..683a54f9 100644 --- a/src/Data/Singletons/Single/Data.hs +++ b/src/Data/Singletons/Single/Data.hs @@ -30,6 +30,7 @@ singDataD (DataDecl name tvbs ctors) = do opts <- getOptions let tvbNames = map extractTvbName tvbs k <- promoteType (foldType (DConT name) (map DVarT tvbNames)) + mb_data_sak <- dsReifyType name ctors' <- mapM (singCtor name) ctors ctorFixities <- singReifiedInfixDecls [ n | DCon _ _ n _ _ <- ctors ] -- instance for SingKind @@ -56,10 +57,37 @@ singDataD (DataDecl name tvbs ctors) = do DTySynInstD $ DTySynEqn Nothing (DConT singFamilyName `DAppKindT` k) (DConT singDataName) - kindedSingTy = DForallT ForallInvis (map DPlainTV tvbNames) $ - DArrowT `DAppT` k `DAppT` DConT typeKindName - return $ (DDataD Data [] singDataName [] (Just kindedSingTy) ctors' []) : + mk_data_dec tvbs' mb_kind = + DDataD Data [] singDataName tvbs' mb_kind ctors' [] + + data_decs <- + case mb_data_sak of + -- No standalone kind signature. Try to figure out the order of kind + -- variables on a best-effort basis. + Nothing -> do + ki <- promoteType $ foldType (DConT name) (map dTyVarBndrToDType tvbs) + let sing_tvbs = toposortTyVarsOf [k] + kinded_sing_ty = DForallT ForallInvis sing_tvbs $ + DArrowT `DAppT` ki `DAppT` DConT typeKindName + pure [mk_data_dec [] (Just kinded_sing_ty)] + + -- A standalone kind signature is provided, so use that to determine the + -- order of kind variables. + Just data_sak -> do + let (args, _) = unravelDType data_sak + vis_args = filterDVisFunArgs args + invis_tvbs = filterInvisTvbArgs args + vis_tvbs = zipWith replaceTvbKind vis_args tvbs + ki <- promoteType $ foldType (DConT name) (map dTyVarBndrToDType vis_tvbs) + z <- qNewName "z" + let sing_data_sak = DForallT ForallInvis (invis_tvbs ++ vis_tvbs) $ + DArrowT `DAppT` ki `DAppT` DConT typeKindName + pure [ DKiSigD singDataName sing_data_sak + , mk_data_dec [DPlainTV z] Nothing + ] + + return $ data_decs ++ singSynInst : [singKindInst | genSingKindInsts opts] ++ ctorFixities @@ -136,7 +164,7 @@ singCtor dataName (DCon con_tvbs cxt name fields rty) sName = singledDataConName opts name sCon = DConE sName pCon = DConT name - checkVanillaDType $ DForallT ForallInvis con_tvbs $ ravel types rty + checkVanillaDType $ ravelVanillaDType con_tvbs [] types rty indexNames <- mapM (const $ qNewName "n") types kinds <- mapM promoteType_NC types rty' <- promoteType_NC rty diff --git a/src/Data/Singletons/Single/Type.hs b/src/Data/Singletons/Single/Type.hs index 4e8e5c4c..302215fe 100644 --- a/src/Data/Singletons/Single/Type.hs +++ b/src/Data/Singletons/Single/Type.hs @@ -44,10 +44,9 @@ singType bound_kvs prom ty = do -- Make sure to include an explicit `prom_res` kind annotation. -- See Note [Preserve the order of type variables during singling], -- wrinkle 3. - tau = ravel args' res' kvbs = singTypeKVBs orig_tvbs prom_args cxt' prom_res bound_kvs all_tvbs = kvbs ++ zipWith DKindedTV arg_names prom_args - ty' = DForallT ForallInvis all_tvbs $ DConstrainedT cxt' tau + ty' = ravelVanillaDType all_tvbs cxt' args' res' return (ty', num_args, arg_names, cxt, prom_args, prom_res) -- Compute the kind variable binders to use in the singled version of a type diff --git a/src/Data/Singletons/TypeLits.hs b/src/Data/Singletons/TypeLits.hs index e0ae424b..219e052f 100644 --- a/src/Data/Singletons/TypeLits.hs +++ b/src/Data/Singletons/TypeLits.hs @@ -1,6 +1,6 @@ {-# LANGUAGE TemplateHaskell, ScopedTypeVariables, ConstraintKinds, GADTs, TypeApplications, TypeFamilies, UndecidableInstances, - DataKinds, PolyKinds #-} + DataKinds, PolyKinds, StandaloneKindSignatures #-} ----------------------------------------------------------------------------- -- | diff --git a/src/Data/Singletons/Util.hs b/src/Data/Singletons/Util.hs index 8115f896..a185b8a0 100644 --- a/src/Data/Singletons/Util.hs +++ b/src/Data/Singletons/Util.hs @@ -117,11 +117,7 @@ tysOfConFields (DRecC vstys) = map (\(_,_,ty) -> ty) vstys -- extract the name and number of arguments to a constructor extractNameArgs :: DCon -> (Name, Int) -extractNameArgs = liftSnd length . extractNameTypes - --- extract the name and types of constructor arguments -extractNameTypes :: DCon -> (Name, [DType]) -extractNameTypes (DCon _ _ n fields _) = (n, tysOfConFields fields) +extractNameArgs (DCon _ _ n fields _) = (n, length (tysOfConFields fields)) extractName :: DCon -> Name extractName (DCon _ _ n _ _) = n @@ -239,9 +235,16 @@ extractTvbName (DKindedTV n _) = n tvbToType :: DTyVarBndr -> DType tvbToType = DVarT . extractTvbName -defaultToTypeKind :: Maybe DKind -> DKind -defaultToTypeKind (Just k) = k -defaultToTypeKind Nothing = DConT typeKindName +-- If a type variable binder lacks an explicit kind, pick a default kind of +-- Type. Otherwise, leave the binder alone. +defaultTvbToTypeKind :: DTyVarBndr -> DTyVarBndr +defaultTvbToTypeKind (DPlainTV tvname) = DKindedTV tvname $ DConT typeKindName +defaultTvbToTypeKind tvb = tvb + +-- If @Nothing@, return @Type@. If @Just k@, return @k@. +defaultMaybeToTypeKind :: Maybe DKind -> DKind +defaultMaybeToTypeKind (Just k) = k +defaultMaybeToTypeKind Nothing = DConT typeKindName inferMaybeKindTV :: Name -> Maybe DKind -> DTyVarBndr inferMaybeKindTV n Nothing = DPlainTV n @@ -256,10 +259,27 @@ resultSigToMaybeKind (DTyVarSig (DKindedTV _ k)) = Just k maybeKindToResultSig :: Maybe DKind -> DFamilyResultSig maybeKindToResultSig = maybe DNoSig DKindSig --- Reconstruct arrow kind from the list of kinds -ravel :: [DType] -> DType -> DType -ravel [] res = res -ravel (h:t) res = DAppT (DAppT DArrowT h) (ravel t res) +maybeSigT :: DType -> Maybe DKind -> DType +maybeSigT ty Nothing = ty +maybeSigT ty (Just ki) = ty `DSigT` ki + +-- Reconstruct a vanilla function type from its individual type variable +-- binders, constraints, argument types, and result type. (See +-- Note [Vanilla-type validity checking during promotion] in +-- Data.Singletons.Promote.Type for what "vanilla" means.) +ravelVanillaDType :: [DTyVarBndr] -> DCxt -> [DType] -> DType -> DType +ravelVanillaDType tvbs ctxt args res = + ifNonEmpty tvbs (DForallT ForallInvis) $ + ifNonEmpty ctxt DConstrainedT $ + go args + where + ifNonEmpty :: [a] -> ([a] -> b -> b) -> b -> b + ifNonEmpty [] _ z = z + ifNonEmpty l f z = f l z + + go :: [DType] -> DType + go [] = res + go (h:t) = DAppT (DAppT DArrowT h) (go t) -- Decompose a vanilla function type into its type variables, its context, its -- argument types, and its result type. (See @@ -376,25 +396,42 @@ countArgs :: DType -> Int countArgs ty = length $ filterDVisFunArgs args where (args, _) = unravelDType ty --- changes all TyVars not to be NameU's. Workaround for GHC#11812 +-- Collect the invisible type variable binders from a sequence of DFunArgs. +filterInvisTvbArgs :: DFunArgs -> [DTyVarBndr] +filterInvisTvbArgs DFANil = [] +filterInvisTvbArgs (DFACxt _ args) = filterInvisTvbArgs args +filterInvisTvbArgs (DFAAnon _ args) = filterInvisTvbArgs args +filterInvisTvbArgs (DFAForalls fvf tvbs' args) = + let res = filterInvisTvbArgs args in + case fvf of + ForallVis -> res + ForallInvis -> tvbs' ++ res + +-- Infer the kind of a DTyVarBndr by using information from a DVisFunArg. +replaceTvbKind :: DVisFunArg -> DTyVarBndr -> DTyVarBndr +replaceTvbKind (DVisFADep tvb) _ = tvb +replaceTvbKind (DVisFAAnon k) tvb = DKindedTV (extractTvbName tvb) k + +-- changes all TyVars not to be NameU's. Workaround for GHC#11812/#17537 noExactTyVars :: Data a => a -> a noExactTyVars = everywhere go where go :: Data a => a -> a go = mkT fix_tvb `extT` fix_ty `extT` fix_inj_ann - no_exact_name :: Name -> Name - no_exact_name (Name (OccName occ) (NameU unique)) = mkName (occ ++ show unique) - no_exact_name n = n + fix_tvb (DPlainTV n) = DPlainTV (noExactName n) + fix_tvb (DKindedTV n k) = DKindedTV (noExactName n) k - fix_tvb (DPlainTV n) = DPlainTV (no_exact_name n) - fix_tvb (DKindedTV n k) = DKindedTV (no_exact_name n) k - - fix_ty (DVarT n) = DVarT (no_exact_name n) + fix_ty (DVarT n) = DVarT (noExactName n) fix_ty ty = ty fix_inj_ann (InjectivityAnn lhs rhs) - = InjectivityAnn (no_exact_name lhs) (map no_exact_name rhs) + = InjectivityAnn (noExactName lhs) (map noExactName rhs) + +-- changes a Name not to be a NameU. Workaround for GHC#11812/#17537 +noExactName :: Name -> Name +noExactName (Name (OccName occ) (NameU unique)) = mkName (occ ++ show unique) +noExactName n = n substKind :: Map Name DKind -> DKind -> DKind substKind = substType @@ -426,9 +463,9 @@ 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)) -cuskify :: DTyVarBndr -> DTyVarBndr -cuskify (DPlainTV tvname) = DKindedTV tvname $ DConT typeKindName -cuskify tvb = tvb +dropTvbKind :: DTyVarBndr -> DTyVarBndr +dropTvbKind tvb@(DPlainTV {}) = tvb +dropTvbKind (DKindedTV n _) = DPlainTV n -- apply a type to a list of types foldType :: DType -> [DType] -> DType diff --git a/tests/SingletonsTestSuiteUtils.hs b/tests/SingletonsTestSuiteUtils.hs index 80c931cf..0dda0a0c 100644 --- a/tests/SingletonsTestSuiteUtils.hs +++ b/tests/SingletonsTestSuiteUtils.hs @@ -69,6 +69,7 @@ ghcOpts = ghcFlags ++ [ , "-XTypeApplications" , "-XEmptyCase" , "-XNoStarIsType" + , "-XStandaloneKindSignatures" ] -- Compile a test using specified GHC options. Save output to file, normalize diff --git a/tests/compile-and-dump/GradingClient/Database.golden b/tests/compile-and-dump/GradingClient/Database.golden index 1ae419df..dde4e952 100644 --- a/tests/compile-and-dump/GradingClient/Database.golden +++ b/tests/compile-and-dump/GradingClient/Database.golden @@ -7,46 +7,47 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations data Nat = Zero | Succ Nat deriving (Eq, Ord) - type ZeroSym0 = Zero + type ZeroSym0 = Zero :: Nat + type SuccSym0 :: (~>) Nat Nat + data SuccSym0 a0123456789876543210 + where + SuccSym0KindInference :: SameKind (Apply SuccSym0 arg) (SuccSym1 arg) => + SuccSym0 a0123456789876543210 + type instance Apply SuccSym0 a0123456789876543210 = SuccSym1 a0123456789876543210 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 = SuccSym1 t0123456789876543210 - type SuccSym1 (t0123456789876543210 :: Nat) = - Succ t0123456789876543210 - type family Compare_0123456789876543210 (a :: Nat) (a :: Nat) :: Ordering where + type SuccSym1 (a0123456789876543210 :: Nat) = + Succ a0123456789876543210 :: Nat + type Compare_0123456789876543210 :: Nat -> Nat -> Ordering + type family Compare_0123456789876543210 a a where Compare_0123456789876543210 Zero Zero = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) NilSym0 Compare_0123456789876543210 (Succ a_0123456789876543210) (Succ b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) NilSym0) Compare_0123456789876543210 Zero (Succ _) = LTSym0 Compare_0123456789876543210 (Succ _) Zero = GTSym0 - instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) - data Compare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering) + type Compare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering) + data Compare_0123456789876543210Sym0 a0123456789876543210 where - Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => + Compare_0123456789876543210Sym0KindInference :: SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => Compare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) - data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Nat Ordering + = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) + type Compare_0123456789876543210Sym1 :: Nat -> (~>) Nat Ordering + data Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => + Compare_0123456789876543210Sym1KindInference :: SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = - Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering instance POrd Nat where type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a - type family Equals_0123456789876543210 (a :: Nat) (b :: Nat) :: Bool where + type Equals_0123456789876543210 :: Nat -> Nat -> Bool + type family Equals_0123456789876543210 a b where Equals_0123456789876543210 Zero Zero = TrueSym0 Equals_0123456789876543210 (Succ a) (Succ b) = (==) a b Equals_0123456789876543210 (_ :: Nat) (_ :: Nat) = FalseSym0 @@ -229,137 +230,125 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations 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 BOOLSym0 = BOOL :: U + type STRINGSym0 = STRING :: U + type NATSym0 = NAT :: U + type VECSym0 :: (~>) U ((~>) Nat U) + data VECSym0 a0123456789876543210 + where + VECSym0KindInference :: SameKind (Apply VECSym0 arg) (VECSym1 arg) => + VECSym0 a0123456789876543210 + type instance Apply VECSym0 a0123456789876543210 = VECSym1 a0123456789876543210 instance SuppressUnusedWarnings VECSym0 where suppressUnusedWarnings = snd (((,) VECSym0KindInference) ()) - data VECSym0 :: (~>) U ((~>) Nat U) + type VECSym1 :: U -> (~>) Nat U + data VECSym1 a0123456789876543210 a0123456789876543210 where - VECSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply VECSym0 arg) (VECSym1 arg) => - VECSym0 t0123456789876543210 - type instance Apply VECSym0 t0123456789876543210 = VECSym1 t0123456789876543210 - instance SuppressUnusedWarnings (VECSym1 t0123456789876543210) where + VECSym1KindInference :: SameKind (Apply (VECSym1 a0123456789876543210) arg) (VECSym2 a0123456789876543210 arg) => + VECSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (VECSym1 a0123456789876543210) a0123456789876543210 = VECSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (VECSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) VECSym1KindInference) ()) - data VECSym1 (t0123456789876543210 :: U) :: (~>) Nat U + type VECSym2 (a0123456789876543210 :: U) (a0123456789876543210 :: Nat) = + VEC a0123456789876543210 a0123456789876543210 :: U + type CASym0 = CA :: AChar + type CBSym0 = CB :: AChar + type CCSym0 = CC :: AChar + type CDSym0 = CD :: AChar + type CESym0 = CE :: AChar + type CFSym0 = CF :: AChar + type CGSym0 = CG :: AChar + type CHSym0 = CH :: AChar + type CISym0 = CI :: AChar + type CJSym0 = CJ :: AChar + type CKSym0 = CK :: AChar + type CLSym0 = CL :: AChar + type CMSym0 = CM :: AChar + type CNSym0 = CN :: AChar + type COSym0 = CO :: AChar + type CPSym0 = CP :: AChar + type CQSym0 = CQ :: AChar + type CRSym0 = CR :: AChar + type CSSym0 = CS :: AChar + type CTSym0 = CT :: AChar + type CUSym0 = CU :: AChar + type CVSym0 = CV :: AChar + type CWSym0 = CW :: AChar + type CXSym0 = CX :: AChar + type CYSym0 = CY :: AChar + type CZSym0 = CZ :: AChar + type AttrSym0 :: (~>) [AChar] ((~>) U Attribute) + data AttrSym0 a0123456789876543210 where - VECSym1KindInference :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply (VECSym1 t0123456789876543210) arg) (VECSym2 t0123456789876543210 arg) => - VECSym1 t0123456789876543210 t0123456789876543210 - type instance Apply (VECSym1 t0123456789876543210) t0123456789876543210 = VECSym2 t0123456789876543210 t0123456789876543210 - type VECSym2 (t0123456789876543210 :: U) (t0123456789876543210 :: Nat) = - VEC t0123456789876543210 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 + AttrSym0KindInference :: SameKind (Apply AttrSym0 arg) (AttrSym1 arg) => + AttrSym0 a0123456789876543210 + type instance Apply AttrSym0 a0123456789876543210 = AttrSym1 a0123456789876543210 instance SuppressUnusedWarnings AttrSym0 where suppressUnusedWarnings = snd (((,) AttrSym0KindInference) ()) - data AttrSym0 :: (~>) [AChar] ((~>) U Attribute) + type AttrSym1 :: [AChar] -> (~>) U Attribute + data AttrSym1 a0123456789876543210 a0123456789876543210 where - AttrSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply AttrSym0 arg) (AttrSym1 arg) => - AttrSym0 t0123456789876543210 - type instance Apply AttrSym0 t0123456789876543210 = AttrSym1 t0123456789876543210 - instance SuppressUnusedWarnings (AttrSym1 t0123456789876543210) where + AttrSym1KindInference :: SameKind (Apply (AttrSym1 a0123456789876543210) arg) (AttrSym2 a0123456789876543210 arg) => + AttrSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (AttrSym1 a0123456789876543210) a0123456789876543210 = AttrSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (AttrSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) AttrSym1KindInference) ()) - data AttrSym1 (t0123456789876543210 :: [AChar]) :: (~>) U Attribute + type AttrSym2 (a0123456789876543210 :: [AChar]) (a0123456789876543210 :: U) = + Attr a0123456789876543210 a0123456789876543210 :: Attribute + type SchSym0 :: (~>) [Attribute] Schema + data SchSym0 a0123456789876543210 where - AttrSym1KindInference :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply (AttrSym1 t0123456789876543210) arg) (AttrSym2 t0123456789876543210 arg) => - AttrSym1 t0123456789876543210 t0123456789876543210 - type instance Apply (AttrSym1 t0123456789876543210) t0123456789876543210 = AttrSym2 t0123456789876543210 t0123456789876543210 - type AttrSym2 (t0123456789876543210 :: [AChar]) (t0123456789876543210 :: U) = - Attr t0123456789876543210 t0123456789876543210 + SchSym0KindInference :: SameKind (Apply SchSym0 arg) (SchSym1 arg) => + SchSym0 a0123456789876543210 + type instance Apply SchSym0 a0123456789876543210 = SchSym1 a0123456789876543210 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 = SchSym1 t0123456789876543210 - type SchSym1 (t0123456789876543210 :: [Attribute]) = - Sch t0123456789876543210 - instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd - (((,) - Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference) - ()) + type SchSym1 (a0123456789876543210 :: [Attribute]) = + Sch a0123456789876543210 :: Schema data Let0123456789876543210Scrutinee_0123456789876543210Sym0 name0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: forall name0123456789876543210 - arg. SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) => + Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) => Let0123456789876543210Scrutinee_0123456789876543210Sym0 name0123456789876543210 type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 name0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210) where + instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where suppressUnusedWarnings = snd (((,) - Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference) + Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 name0123456789876543210 name'0123456789876543210) where + instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym1 name0123456789876543210) where suppressUnusedWarnings = snd (((,) - Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference) + Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: 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 name0123456789876543210 name'0123456789876543210) u0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym3 name0123456789876543210 name'0123456789876543210 u0123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym3 name0123456789876543210 name'0123456789876543210 u0123456789876543210) where + instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym2 name0123456789876543210 name'0123456789876543210) where suppressUnusedWarnings = snd (((,) - Let0123456789876543210Scrutinee_0123456789876543210Sym3KindInference) + Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference) ()) 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_0123456789876543210Sym3KindInference :: 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 name0123456789876543210 name'0123456789876543210 u0123456789876543210) attrs0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym4 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 + instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym3 name0123456789876543210 name'0123456789876543210 u0123456789876543210) where + suppressUnusedWarnings + = snd + (((,) + Let0123456789876543210Scrutinee_0123456789876543210Sym3KindInference) + ()) type Let0123456789876543210Scrutinee_0123456789876543210Sym4 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 name0123456789876543210 name'0123456789876543210 u0123456789876543210 attrs0123456789876543210 type family Let0123456789876543210Scrutinee_0123456789876543210 name name' u attrs where @@ -367,155 +356,158 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations 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) - instance SuppressUnusedWarnings LookupSym0 where - suppressUnusedWarnings = snd (((,) LookupSym0KindInference) ()) - data LookupSym0 :: (~>) [AChar] ((~>) Schema U) + type LookupSym0 :: (~>) [AChar] ((~>) Schema U) + data LookupSym0 a0123456789876543210 where - LookupSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply LookupSym0 arg) (LookupSym1 arg) => + LookupSym0KindInference :: SameKind (Apply LookupSym0 arg) (LookupSym1 arg) => LookupSym0 a0123456789876543210 type instance Apply LookupSym0 a0123456789876543210 = LookupSym1 a0123456789876543210 - instance SuppressUnusedWarnings (LookupSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) LookupSym1KindInference) ()) - data LookupSym1 (a0123456789876543210 :: [AChar]) :: (~>) Schema U + instance SuppressUnusedWarnings LookupSym0 where + suppressUnusedWarnings = snd (((,) LookupSym0KindInference) ()) + type LookupSym1 :: [AChar] -> (~>) Schema U + data LookupSym1 a0123456789876543210 a0123456789876543210 where - LookupSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (LookupSym1 a0123456789876543210) arg) (LookupSym2 a0123456789876543210 arg) => + LookupSym1KindInference :: SameKind (Apply (LookupSym1 a0123456789876543210) arg) (LookupSym2 a0123456789876543210 arg) => LookupSym1 a0123456789876543210 a0123456789876543210 type instance Apply (LookupSym1 a0123456789876543210) a0123456789876543210 = LookupSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (LookupSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) LookupSym1KindInference) ()) type LookupSym2 (a0123456789876543210 :: [AChar]) (a0123456789876543210 :: Schema) = - Lookup a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings OccursSym0 where - suppressUnusedWarnings = snd (((,) OccursSym0KindInference) ()) - data OccursSym0 :: (~>) [AChar] ((~>) Schema Bool) + Lookup a0123456789876543210 a0123456789876543210 :: U + type OccursSym0 :: (~>) [AChar] ((~>) Schema Bool) + data OccursSym0 a0123456789876543210 where - OccursSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply OccursSym0 arg) (OccursSym1 arg) => + OccursSym0KindInference :: SameKind (Apply OccursSym0 arg) (OccursSym1 arg) => OccursSym0 a0123456789876543210 type instance Apply OccursSym0 a0123456789876543210 = OccursSym1 a0123456789876543210 - instance SuppressUnusedWarnings (OccursSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) OccursSym1KindInference) ()) - data OccursSym1 (a0123456789876543210 :: [AChar]) :: (~>) Schema Bool + instance SuppressUnusedWarnings OccursSym0 where + suppressUnusedWarnings = snd (((,) OccursSym0KindInference) ()) + type OccursSym1 :: [AChar] -> (~>) Schema Bool + data OccursSym1 a0123456789876543210 a0123456789876543210 where - OccursSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (OccursSym1 a0123456789876543210) arg) (OccursSym2 a0123456789876543210 arg) => + OccursSym1KindInference :: SameKind (Apply (OccursSym1 a0123456789876543210) arg) (OccursSym2 a0123456789876543210 arg) => OccursSym1 a0123456789876543210 a0123456789876543210 type instance Apply (OccursSym1 a0123456789876543210) a0123456789876543210 = OccursSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (OccursSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) OccursSym1KindInference) ()) type OccursSym2 (a0123456789876543210 :: [AChar]) (a0123456789876543210 :: Schema) = - Occurs a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings DisjointSym0 where - suppressUnusedWarnings = snd (((,) DisjointSym0KindInference) ()) - data DisjointSym0 :: (~>) Schema ((~>) Schema Bool) + Occurs a0123456789876543210 a0123456789876543210 :: Bool + type DisjointSym0 :: (~>) Schema ((~>) Schema Bool) + data DisjointSym0 a0123456789876543210 where - DisjointSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply DisjointSym0 arg) (DisjointSym1 arg) => + DisjointSym0KindInference :: SameKind (Apply DisjointSym0 arg) (DisjointSym1 arg) => DisjointSym0 a0123456789876543210 type instance Apply DisjointSym0 a0123456789876543210 = DisjointSym1 a0123456789876543210 - instance SuppressUnusedWarnings (DisjointSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) DisjointSym1KindInference) ()) - data DisjointSym1 (a0123456789876543210 :: Schema) :: (~>) Schema Bool + instance SuppressUnusedWarnings DisjointSym0 where + suppressUnusedWarnings = snd (((,) DisjointSym0KindInference) ()) + type DisjointSym1 :: Schema -> (~>) Schema Bool + data DisjointSym1 a0123456789876543210 a0123456789876543210 where - DisjointSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (DisjointSym1 a0123456789876543210) arg) (DisjointSym2 a0123456789876543210 arg) => + DisjointSym1KindInference :: SameKind (Apply (DisjointSym1 a0123456789876543210) arg) (DisjointSym2 a0123456789876543210 arg) => DisjointSym1 a0123456789876543210 a0123456789876543210 type instance Apply (DisjointSym1 a0123456789876543210) a0123456789876543210 = DisjointSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (DisjointSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) DisjointSym1KindInference) ()) type DisjointSym2 (a0123456789876543210 :: Schema) (a0123456789876543210 :: Schema) = - Disjoint a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings AttrNotInSym0 where - suppressUnusedWarnings = snd (((,) AttrNotInSym0KindInference) ()) - data AttrNotInSym0 :: (~>) Attribute ((~>) Schema Bool) + Disjoint a0123456789876543210 a0123456789876543210 :: Bool + type AttrNotInSym0 :: (~>) Attribute ((~>) Schema Bool) + data AttrNotInSym0 a0123456789876543210 where - AttrNotInSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply AttrNotInSym0 arg) (AttrNotInSym1 arg) => + AttrNotInSym0KindInference :: SameKind (Apply AttrNotInSym0 arg) (AttrNotInSym1 arg) => AttrNotInSym0 a0123456789876543210 type instance Apply AttrNotInSym0 a0123456789876543210 = AttrNotInSym1 a0123456789876543210 - instance SuppressUnusedWarnings (AttrNotInSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) AttrNotInSym1KindInference) ()) - data AttrNotInSym1 (a0123456789876543210 :: Attribute) :: (~>) Schema Bool + instance SuppressUnusedWarnings AttrNotInSym0 where + suppressUnusedWarnings = snd (((,) AttrNotInSym0KindInference) ()) + type AttrNotInSym1 :: Attribute -> (~>) Schema Bool + data AttrNotInSym1 a0123456789876543210 a0123456789876543210 where - AttrNotInSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (AttrNotInSym1 a0123456789876543210) arg) (AttrNotInSym2 a0123456789876543210 arg) => + AttrNotInSym1KindInference :: SameKind (Apply (AttrNotInSym1 a0123456789876543210) arg) (AttrNotInSym2 a0123456789876543210 arg) => AttrNotInSym1 a0123456789876543210 a0123456789876543210 type instance Apply (AttrNotInSym1 a0123456789876543210) a0123456789876543210 = AttrNotInSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (AttrNotInSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) AttrNotInSym1KindInference) ()) type AttrNotInSym2 (a0123456789876543210 :: Attribute) (a0123456789876543210 :: Schema) = - AttrNotIn a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings AppendSym0 where - suppressUnusedWarnings = snd (((,) AppendSym0KindInference) ()) - data AppendSym0 :: (~>) Schema ((~>) Schema Schema) + AttrNotIn a0123456789876543210 a0123456789876543210 :: Bool + type AppendSym0 :: (~>) Schema ((~>) Schema Schema) + data AppendSym0 a0123456789876543210 where - AppendSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply AppendSym0 arg) (AppendSym1 arg) => + AppendSym0KindInference :: SameKind (Apply AppendSym0 arg) (AppendSym1 arg) => AppendSym0 a0123456789876543210 type instance Apply AppendSym0 a0123456789876543210 = AppendSym1 a0123456789876543210 - instance SuppressUnusedWarnings (AppendSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) AppendSym1KindInference) ()) - data AppendSym1 (a0123456789876543210 :: Schema) :: (~>) Schema Schema + instance SuppressUnusedWarnings AppendSym0 where + suppressUnusedWarnings = snd (((,) AppendSym0KindInference) ()) + type AppendSym1 :: Schema -> (~>) Schema Schema + data AppendSym1 a0123456789876543210 a0123456789876543210 where - AppendSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (AppendSym1 a0123456789876543210) arg) (AppendSym2 a0123456789876543210 arg) => + AppendSym1KindInference :: SameKind (Apply (AppendSym1 a0123456789876543210) arg) (AppendSym2 a0123456789876543210 arg) => AppendSym1 a0123456789876543210 a0123456789876543210 type instance Apply (AppendSym1 a0123456789876543210) a0123456789876543210 = AppendSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (AppendSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) AppendSym1KindInference) ()) type AppendSym2 (a0123456789876543210 :: Schema) (a0123456789876543210 :: Schema) = - Append a0123456789876543210 a0123456789876543210 - type family Lookup (a :: [AChar]) (a :: Schema) :: U where + Append a0123456789876543210 a0123456789876543210 :: Schema + type Lookup :: [AChar] -> Schema -> U + type family Lookup a a 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 + type Occurs :: [AChar] -> Schema -> Bool + type family Occurs a a 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 + type Disjoint :: Schema -> Schema -> Bool + type family Disjoint a a 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 + type AttrNotIn :: Attribute -> Schema -> Bool + type family AttrNotIn a a 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 + type Append :: Schema -> Schema -> Schema + type family Append a a 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 + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> U -> Symbol -> Symbol + type family ShowsPrec_0123456789876543210 a a a 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 - instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) - data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) U ((~>) Symbol Symbol)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) U ((~>) Symbol Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) U ((~>) Symbol Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) U ((~>) Symbol Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: U) :: (~>) Symbol Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> U -> (~>) Symbol Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: U) (a0123456789876543210 :: Symbol) = - ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Symbol 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 + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> AChar -> Symbol -> Symbol + type family ShowsPrec_0123456789876543210 a a a 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 @@ -542,41 +534,41 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations 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 - instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) - data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) AChar ((~>) Symbol Symbol)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) AChar ((~>) Symbol Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) AChar ((~>) Symbol Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) AChar ((~>) Symbol Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: AChar) :: (~>) Symbol Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> AChar -> (~>) Symbol Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: AChar) (a0123456789876543210 :: Symbol) = - ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Symbol 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 + type Equals_0123456789876543210 :: U -> U -> Bool + type family Equals_0123456789876543210 a b where Equals_0123456789876543210 BOOL BOOL = TrueSym0 Equals_0123456789876543210 STRING STRING = TrueSym0 Equals_0123456789876543210 NAT NAT = TrueSym0 @@ -584,7 +576,8 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations 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 + type Equals_0123456789876543210 :: AChar -> AChar -> Bool + type family Equals_0123456789876543210 a b where Equals_0123456789876543210 CA CA = TrueSym0 Equals_0123456789876543210 CB CB = TrueSym0 Equals_0123456789876543210 CC CC = TrueSym0 diff --git a/tests/compile-and-dump/GradingClient/Main.golden b/tests/compile-and-dump/GradingClient/Main.golden index 3138b866..f9c2346d 100644 --- a/tests/compile-and-dump/GradingClient/Main.golden +++ b/tests/compile-and-dump/GradingClient/Main.golden @@ -31,26 +31,33 @@ GradingClient/Main.hs:(0,0)-(0,0): Splicing declarations (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 + type NamesSym0 = Names :: Schema + type GradingSchemaSym0 = GradingSchema :: Schema + type MajorNameSym0 = MajorName :: [AChar] + type GradeNameSym0 = GradeName :: [AChar] + type YearNameSym0 = YearName :: [AChar] + type FirstNameSym0 = FirstName :: [AChar] + type LastNameSym0 = LastName :: [AChar] + type Names :: Schema + type family Names where Names = Apply SchSym0 (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 FirstNameSym0) STRINGSym0)) (Apply (Apply (:@#@$) (Apply (Apply AttrSym0 LastNameSym0) STRINGSym0)) NilSym0)) - type family GradingSchema :: Schema where + type GradingSchema :: Schema + type family GradingSchema 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)) NilSym0))))) - type family MajorName :: [AChar] where + type MajorName :: [AChar] + type family MajorName where MajorName = Apply (Apply (:@#@$) CMSym0) (Apply (Apply (:@#@$) CASym0) (Apply (Apply (:@#@$) CJSym0) (Apply (Apply (:@#@$) COSym0) (Apply (Apply (:@#@$) CRSym0) NilSym0)))) - type family GradeName :: [AChar] where + type GradeName :: [AChar] + type family GradeName where GradeName = Apply (Apply (:@#@$) CGSym0) (Apply (Apply (:@#@$) CRSym0) (Apply (Apply (:@#@$) CASym0) (Apply (Apply (:@#@$) CDSym0) (Apply (Apply (:@#@$) CESym0) NilSym0)))) - type family YearName :: [AChar] where + type YearName :: [AChar] + type family YearName where YearName = Apply (Apply (:@#@$) CYSym0) (Apply (Apply (:@#@$) CESym0) (Apply (Apply (:@#@$) CASym0) (Apply (Apply (:@#@$) CRSym0) NilSym0))) - type family FirstName :: [AChar] where + type FirstName :: [AChar] + type family FirstName where FirstName = Apply (Apply (:@#@$) CFSym0) (Apply (Apply (:@#@$) CISym0) (Apply (Apply (:@#@$) CRSym0) (Apply (Apply (:@#@$) CSSym0) (Apply (Apply (:@#@$) CTSym0) NilSym0)))) - type family LastName :: [AChar] where + type LastName :: [AChar] + type family LastName where LastName = Apply (Apply (:@#@$) CLSym0) (Apply (Apply (:@#@$) CASym0) (Apply (Apply (:@#@$) CSSym0) (Apply (Apply (:@#@$) CTSym0) NilSym0))) sNames :: Sing (NamesSym0 :: Schema) sGradingSchema :: Sing (GradingSchemaSym0 :: Schema) diff --git a/tests/compile-and-dump/InsertionSort/InsertionSortImp.golden b/tests/compile-and-dump/InsertionSort/InsertionSortImp.golden index bf3d05b1..12fdaebb 100644 --- a/tests/compile-and-dump/InsertionSort/InsertionSortImp.golden +++ b/tests/compile-and-dump/InsertionSort/InsertionSortImp.golden @@ -2,17 +2,17 @@ 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 ZeroSym0 = Zero :: Nat + type SuccSym0 :: (~>) Nat Nat + data SuccSym0 a0123456789876543210 + where + SuccSym0KindInference :: SameKind (Apply SuccSym0 arg) (SuccSym1 arg) => + SuccSym0 a0123456789876543210 + type instance Apply SuccSym0 a0123456789876543210 = SuccSym1 a0123456789876543210 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 = SuccSym1 t0123456789876543210 - type SuccSym1 (t0123456789876543210 :: Nat) = - Succ t0123456789876543210 + type SuccSym1 (a0123456789876543210 :: Nat) = + Succ a0123456789876543210 :: Nat data SNat :: Nat -> Type where SZero :: SNat (Zero :: Nat) @@ -57,45 +57,39 @@ InsertionSort/InsertionSortImp.hs:(0,0)-(0,0): Splicing declarations insertionSort :: [Nat] -> [Nat] insertionSort [] = [] insertionSort (h : t) = (insert h) (insertionSort t) - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) => Let0123456789876543210Scrutinee_0123456789876543210Sym0 n0123456789876543210 type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 n0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210) where + instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where suppressUnusedWarnings = snd (((,) - Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference) + Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference) ()) data Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210 h0123456789876543210 where - Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference :: forall n0123456789876543210 - h0123456789876543210 - arg. SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 arg) => + Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 n0123456789876543210 h0123456789876543210) where + instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym1 n0123456789876543210) where suppressUnusedWarnings = snd (((,) - Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference) + Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 h0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym3 n0123456789876543210 h0123456789876543210 arg) => Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 h0123456789876543210 t0123456789876543210 type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 h0123456789876543210) t0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym3 n0123456789876543210 h0123456789876543210 t0123456789876543210 + instance SuppressUnusedWarnings (Let0123456789876543210Scrutinee_0123456789876543210Sym2 n0123456789876543210 h0123456789876543210) where + suppressUnusedWarnings + = snd + (((,) + Let0123456789876543210Scrutinee_0123456789876543210Sym2KindInference) + ()) type Let0123456789876543210Scrutinee_0123456789876543210Sym3 n0123456789876543210 h0123456789876543210 t0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 n0123456789876543210 h0123456789876543210 t0123456789876543210 type family Let0123456789876543210Scrutinee_0123456789876543210 n h t where @@ -103,62 +97,63 @@ InsertionSort/InsertionSortImp.hs:(0,0)-(0,0): Splicing declarations 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) - instance SuppressUnusedWarnings InsertionSortSym0 where - suppressUnusedWarnings - = snd (((,) InsertionSortSym0KindInference) ()) - data InsertionSortSym0 :: (~>) [Nat] [Nat] + type InsertionSortSym0 :: (~>) [Nat] [Nat] + data InsertionSortSym0 a0123456789876543210 where - InsertionSortSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply InsertionSortSym0 arg) (InsertionSortSym1 arg) => + InsertionSortSym0KindInference :: SameKind (Apply InsertionSortSym0 arg) (InsertionSortSym1 arg) => InsertionSortSym0 a0123456789876543210 type instance Apply InsertionSortSym0 a0123456789876543210 = InsertionSortSym1 a0123456789876543210 + instance SuppressUnusedWarnings InsertionSortSym0 where + suppressUnusedWarnings + = snd (((,) InsertionSortSym0KindInference) ()) type InsertionSortSym1 (a0123456789876543210 :: [Nat]) = - InsertionSort a0123456789876543210 - instance SuppressUnusedWarnings InsertSym0 where - suppressUnusedWarnings = snd (((,) InsertSym0KindInference) ()) - data InsertSym0 :: (~>) Nat ((~>) [Nat] [Nat]) + InsertionSort a0123456789876543210 :: [Nat] + type InsertSym0 :: (~>) Nat ((~>) [Nat] [Nat]) + data InsertSym0 a0123456789876543210 where - InsertSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply InsertSym0 arg) (InsertSym1 arg) => + InsertSym0KindInference :: SameKind (Apply InsertSym0 arg) (InsertSym1 arg) => InsertSym0 a0123456789876543210 type instance Apply InsertSym0 a0123456789876543210 = InsertSym1 a0123456789876543210 - instance SuppressUnusedWarnings (InsertSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) InsertSym1KindInference) ()) - data InsertSym1 (a0123456789876543210 :: Nat) :: (~>) [Nat] [Nat] + instance SuppressUnusedWarnings InsertSym0 where + suppressUnusedWarnings = snd (((,) InsertSym0KindInference) ()) + type InsertSym1 :: Nat -> (~>) [Nat] [Nat] + data InsertSym1 a0123456789876543210 a0123456789876543210 where - InsertSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (InsertSym1 a0123456789876543210) arg) (InsertSym2 a0123456789876543210 arg) => + InsertSym1KindInference :: SameKind (Apply (InsertSym1 a0123456789876543210) arg) (InsertSym2 a0123456789876543210 arg) => InsertSym1 a0123456789876543210 a0123456789876543210 type instance Apply (InsertSym1 a0123456789876543210) a0123456789876543210 = InsertSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (InsertSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) InsertSym1KindInference) ()) type InsertSym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: [Nat]) = - Insert a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings LeqSym0 where - suppressUnusedWarnings = snd (((,) LeqSym0KindInference) ()) - data LeqSym0 :: (~>) Nat ((~>) Nat Bool) + Insert a0123456789876543210 a0123456789876543210 :: [Nat] + type LeqSym0 :: (~>) Nat ((~>) Nat Bool) + data LeqSym0 a0123456789876543210 where - LeqSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply LeqSym0 arg) (LeqSym1 arg) => + LeqSym0KindInference :: SameKind (Apply LeqSym0 arg) (LeqSym1 arg) => LeqSym0 a0123456789876543210 type instance Apply LeqSym0 a0123456789876543210 = LeqSym1 a0123456789876543210 - instance SuppressUnusedWarnings (LeqSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) LeqSym1KindInference) ()) - data LeqSym1 (a0123456789876543210 :: Nat) :: (~>) Nat Bool + instance SuppressUnusedWarnings LeqSym0 where + suppressUnusedWarnings = snd (((,) LeqSym0KindInference) ()) + type LeqSym1 :: Nat -> (~>) Nat Bool + data LeqSym1 a0123456789876543210 a0123456789876543210 where - LeqSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (LeqSym1 a0123456789876543210) arg) (LeqSym2 a0123456789876543210 arg) => + LeqSym1KindInference :: SameKind (Apply (LeqSym1 a0123456789876543210) arg) (LeqSym2 a0123456789876543210 arg) => LeqSym1 a0123456789876543210 a0123456789876543210 type instance Apply (LeqSym1 a0123456789876543210) a0123456789876543210 = LeqSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (LeqSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) LeqSym1KindInference) ()) type LeqSym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = - Leq a0123456789876543210 a0123456789876543210 - type family InsertionSort (a :: [Nat]) :: [Nat] where + Leq a0123456789876543210 a0123456789876543210 :: Bool + type InsertionSort :: [Nat] -> [Nat] + type family InsertionSort a where InsertionSort '[] = NilSym0 InsertionSort ('(:) h t) = Apply (Apply InsertSym0 h) (Apply InsertionSortSym0 t) - type family Insert (a :: Nat) (a :: [Nat]) :: [Nat] where + type Insert :: Nat -> [Nat] -> [Nat] + type family Insert a a where Insert n '[] = Apply (Apply (:@#@$) n) NilSym0 Insert n ('(:) h t) = Case_0123456789876543210 n h t (Let0123456789876543210Scrutinee_0123456789876543210Sym3 n h t) - type family Leq (a :: Nat) (a :: Nat) :: Bool where + type Leq :: Nat -> Nat -> Bool + type family Leq a a where Leq 'Zero _ = TrueSym0 Leq ('Succ _) 'Zero = FalseSym0 Leq ('Succ a) ('Succ b) = Apply (Apply LeqSym0 a) b diff --git a/tests/compile-and-dump/Promote/Constructors.golden b/tests/compile-and-dump/Promote/Constructors.golden index 28a5ad23..4c67ef2d 100644 --- a/tests/compile-and-dump/Promote/Constructors.golden +++ b/tests/compile-and-dump/Promote/Constructors.golden @@ -5,75 +5,65 @@ Promote/Constructors.hs:(0,0)-(0,0): Splicing declarations ======> data Foo = Foo | Foo :+ Foo data Bar = Bar Bar Bar Bar Bar Foo - type FooSym0 = Foo + type FooSym0 = Foo :: Foo + type (:+@#@$) :: (~>) Foo ((~>) Foo Foo) + data (:+@#@$) a0123456789876543210 + where + (::+@#@$###) :: SameKind (Apply (:+@#@$) arg) ((:+@#@$$) arg) => + (:+@#@$) a0123456789876543210 + type instance Apply (:+@#@$) a0123456789876543210 = (:+@#@$$) a0123456789876543210 instance SuppressUnusedWarnings (:+@#@$) where suppressUnusedWarnings = snd (((,) (::+@#@$###)) ()) - data (:+@#@$) :: (~>) Foo ((~>) Foo Foo) + type (:+@#@$$) :: Foo -> (~>) Foo Foo + data (:+@#@$$) a0123456789876543210 a0123456789876543210 where - (::+@#@$###) :: forall t0123456789876543210 - arg. SameKind (Apply (:+@#@$) arg) ((:+@#@$$) arg) => - (:+@#@$) t0123456789876543210 - type instance Apply (:+@#@$) t0123456789876543210 = (:+@#@$$) t0123456789876543210 - instance SuppressUnusedWarnings ((:+@#@$$) t0123456789876543210) where + (::+@#@$$###) :: SameKind (Apply ((:+@#@$$) a0123456789876543210) arg) ((:+@#@$$$) a0123456789876543210 arg) => + (:+@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((:+@#@$$) a0123456789876543210) a0123456789876543210 = (:+@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((:+@#@$$) a0123456789876543210) where suppressUnusedWarnings = snd (((,) (::+@#@$$###)) ()) - data (:+@#@$$) (t0123456789876543210 :: Foo) :: (~>) Foo Foo + type (:+@#@$$$) (a0123456789876543210 :: Foo) (a0123456789876543210 :: Foo) = + (:+) a0123456789876543210 a0123456789876543210 :: Foo + type BarSym0 :: (~>) Bar ((~>) Bar ((~>) Bar ((~>) Bar ((~>) Foo Bar)))) + data BarSym0 a0123456789876543210 where - (::+@#@$$###) :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply ((:+@#@$$) t0123456789876543210) arg) ((:+@#@$$$) t0123456789876543210 arg) => - (:+@#@$$) t0123456789876543210 t0123456789876543210 - type instance Apply ((:+@#@$$) t0123456789876543210) t0123456789876543210 = (:+@#@$$$) t0123456789876543210 t0123456789876543210 - type (:+@#@$$$) (t0123456789876543210 :: Foo) (t0123456789876543210 :: Foo) = - (:+) t0123456789876543210 t0123456789876543210 + BarSym0KindInference :: SameKind (Apply BarSym0 arg) (BarSym1 arg) => + BarSym0 a0123456789876543210 + type instance Apply BarSym0 a0123456789876543210 = BarSym1 a0123456789876543210 instance SuppressUnusedWarnings BarSym0 where suppressUnusedWarnings = snd (((,) BarSym0KindInference) ()) - data BarSym0 :: (~>) Bar ((~>) Bar ((~>) Bar ((~>) Bar ((~>) Foo Bar)))) + type BarSym1 :: Bar + -> (~>) Bar ((~>) Bar ((~>) Bar ((~>) Foo Bar))) + data BarSym1 a0123456789876543210 a0123456789876543210 where - BarSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) => - BarSym0 t0123456789876543210 - type instance Apply BarSym0 t0123456789876543210 = BarSym1 t0123456789876543210 - instance SuppressUnusedWarnings (BarSym1 t0123456789876543210) where + BarSym1KindInference :: SameKind (Apply (BarSym1 a0123456789876543210) arg) (BarSym2 a0123456789876543210 arg) => + BarSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (BarSym1 a0123456789876543210) a0123456789876543210 = BarSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (BarSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) BarSym1KindInference) ()) - data BarSym1 (t0123456789876543210 :: Bar) :: (~>) Bar ((~>) Bar ((~>) Bar ((~>) Foo Bar))) + type BarSym2 :: Bar -> Bar -> (~>) Bar ((~>) Bar ((~>) Foo Bar)) + data BarSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (BarSym2 t0123456789876543210 t0123456789876543210) where + BarSym2KindInference :: SameKind (Apply (BarSym2 a0123456789876543210 a0123456789876543210) arg) (BarSym3 a0123456789876543210 a0123456789876543210 arg) => + BarSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (BarSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = BarSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (BarSym2 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) BarSym2KindInference) ()) - data BarSym2 (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) :: (~>) Bar ((~>) Bar ((~>) Foo Bar)) + type BarSym3 :: Bar -> Bar -> Bar -> (~>) Bar ((~>) Foo Bar) + data BarSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (BarSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where + BarSym3KindInference :: SameKind (Apply (BarSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) arg) (BarSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 arg) => + BarSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (BarSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) a0123456789876543210 = BarSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (BarSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) BarSym3KindInference) ()) - data BarSym3 (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) :: (~>) Bar ((~>) Foo Bar) + type BarSym4 :: Bar -> Bar -> Bar -> Bar -> (~>) Foo Bar + data BarSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (BarSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210) where + BarSym4KindInference :: SameKind (Apply (BarSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210) arg) (BarSym5 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 arg) => + BarSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (BarSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210) a0123456789876543210 = BarSym5 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (BarSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210) 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 = BarSym5 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 - type BarSym5 (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Bar) (t0123456789876543210 :: Foo) = - Bar t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 + type BarSym5 (a0123456789876543210 :: Bar) (a0123456789876543210 :: Bar) (a0123456789876543210 :: Bar) (a0123456789876543210 :: Bar) (a0123456789876543210 :: Foo) = + Bar a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Bar diff --git a/tests/compile-and-dump/Promote/GenDefunSymbols.golden b/tests/compile-and-dump/Promote/GenDefunSymbols.golden index a022ecd9..786b843a 100644 --- a/tests/compile-and-dump/Promote/GenDefunSymbols.golden +++ b/tests/compile-and-dump/Promote/GenDefunSymbols.golden @@ -1,54 +1,52 @@ Promote/GenDefunSymbols.hs:0:0:: Splicing declarations genDefunSymbols [''LiftMaybe, ''NatT, ''(:+)] ======> + type LiftMaybeSym0 :: forall (a :: Type) (b :: Type). + (~>) ((~>) a b) ((~>) (Maybe a) (Maybe b)) + data LiftMaybeSym0 a0123456789876543210 + where + LiftMaybeSym0KindInference :: Data.Singletons.Internal.SameKind (Apply LiftMaybeSym0 arg) (LiftMaybeSym1 arg) => + LiftMaybeSym0 a0123456789876543210 + type instance Apply LiftMaybeSym0 a0123456789876543210 = LiftMaybeSym1 a0123456789876543210 instance SuppressUnusedWarnings LiftMaybeSym0 where suppressUnusedWarnings = snd (((,) LiftMaybeSym0KindInference) ()) - data LiftMaybeSym0 :: forall a0123456789876543210 - b0123456789876543210. - (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) (Maybe a0123456789876543210) (Maybe b0123456789876543210)) + type LiftMaybeSym1 :: forall (a :: Type) (b :: Type). + (~>) a b -> (~>) (Maybe a) (Maybe b) + data LiftMaybeSym1 a0123456789876543210 a0123456789876543210 where - LiftMaybeSym0KindInference :: forall f0123456789876543210 - arg. Data.Singletons.Internal.SameKind (Apply LiftMaybeSym0 arg) (LiftMaybeSym1 arg) => - LiftMaybeSym0 f0123456789876543210 - type instance Apply LiftMaybeSym0 f0123456789876543210 = LiftMaybeSym1 f0123456789876543210 - instance SuppressUnusedWarnings (LiftMaybeSym1 f0123456789876543210) where + LiftMaybeSym1KindInference :: Data.Singletons.Internal.SameKind (Apply (LiftMaybeSym1 a0123456789876543210) arg) (LiftMaybeSym2 a0123456789876543210 arg) => + LiftMaybeSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (LiftMaybeSym1 a0123456789876543210) a0123456789876543210 = LiftMaybeSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (LiftMaybeSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) LiftMaybeSym1KindInference) ()) - data LiftMaybeSym1 (f0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) (Maybe a0123456789876543210) (Maybe b0123456789876543210) + type LiftMaybeSym2 (a0123456789876543210 :: (~>) a b) (a0123456789876543210 :: Maybe a) = + LiftMaybe a0123456789876543210 a0123456789876543210 :: Maybe b + type ZeroSym0 = 'Zero :: NatT + type SuccSym0 :: (~>) NatT NatT + data SuccSym0 a0123456789876543210 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 = LiftMaybeSym2 f0123456789876543210 x0123456789876543210 - type LiftMaybeSym2 (f0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (x0123456789876543210 :: Maybe a0123456789876543210) = - LiftMaybe f0123456789876543210 x0123456789876543210 - type ZeroSym0 = 'Zero + SuccSym0KindInference :: Data.Singletons.Internal.SameKind (Apply SuccSym0 arg) (SuccSym1 arg) => + SuccSym0 a0123456789876543210 + type instance Apply SuccSym0 a0123456789876543210 = SuccSym1 a0123456789876543210 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 = SuccSym1 t0123456789876543210 - type SuccSym1 (t0123456789876543210 :: NatT) = - 'Succ t0123456789876543210 - instance SuppressUnusedWarnings (:+@#@$) where - suppressUnusedWarnings = snd (((,) (::+@#@$###)) ()) + type SuccSym1 (a0123456789876543210 :: NatT) = + 'Succ a0123456789876543210 :: NatT + type (:+@#@$) :: (~>) Nat ((~>) Nat Nat) data (:+@#@$) a0123456789876543210 where - (::+@#@$###) :: forall a0123456789876543210 - arg. Data.Singletons.Internal.SameKind (Apply (:+@#@$) arg) ((:+@#@$$) arg) => + (::+@#@$###) :: Data.Singletons.Internal.SameKind (Apply (:+@#@$) arg) ((:+@#@$$) arg) => (:+@#@$) a0123456789876543210 type instance Apply (:+@#@$) a0123456789876543210 = (:+@#@$$) a0123456789876543210 + instance SuppressUnusedWarnings (:+@#@$) where + suppressUnusedWarnings = snd (((,) (::+@#@$###)) ()) + type (:+@#@$$) :: Nat -> (~>) Nat Nat + data (:+@#@$$) a0123456789876543210 a0123456789876543210 + where + (::+@#@$$###) :: Data.Singletons.Internal.SameKind (Apply ((:+@#@$$) a0123456789876543210) arg) ((:+@#@$$$) a0123456789876543210 arg) => + (:+@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((:+@#@$$) a0123456789876543210) a0123456789876543210 = (:+@#@$$$) a0123456789876543210 a0123456789876543210 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 - type (:+@#@$$$) (a0123456789876543210 :: Nat) (b0123456789876543210 :: Nat) = - (:+) a0123456789876543210 b0123456789876543210 + type (:+@#@$$$) (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = + (:+) a0123456789876543210 a0123456789876543210 :: Nat diff --git a/tests/compile-and-dump/Promote/Newtypes.golden b/tests/compile-and-dump/Promote/Newtypes.golden index 88448c38..98f1e850 100644 --- a/tests/compile-and-dump/Promote/Newtypes.golden +++ b/tests/compile-and-dump/Promote/Newtypes.golden @@ -9,40 +9,42 @@ Promote/Newtypes.hs:(0,0)-(0,0): Splicing declarations = Foo Nat deriving Eq newtype Bar = Bar {unBar :: Nat} - type family Equals_0123456789876543210 (a :: Foo) (b :: Foo) :: Bool where + type Equals_0123456789876543210 :: Foo -> Foo -> Bool + type family Equals_0123456789876543210 a b 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 - instance SuppressUnusedWarnings UnBarSym0 where - suppressUnusedWarnings = snd (((,) UnBarSym0KindInference) ()) - data UnBarSym0 :: (~>) Bar Nat + type UnBarSym0 :: (~>) Bar Nat + data UnBarSym0 a0123456789876543210 where - UnBarSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply UnBarSym0 arg) (UnBarSym1 arg) => + UnBarSym0KindInference :: SameKind (Apply UnBarSym0 arg) (UnBarSym1 arg) => UnBarSym0 a0123456789876543210 type instance Apply UnBarSym0 a0123456789876543210 = UnBarSym1 a0123456789876543210 + instance SuppressUnusedWarnings UnBarSym0 where + suppressUnusedWarnings = snd (((,) UnBarSym0KindInference) ()) type UnBarSym1 (a0123456789876543210 :: Bar) = - UnBar a0123456789876543210 - type family UnBar (a :: Bar) :: Nat where + UnBar a0123456789876543210 :: Nat + type UnBar :: Bar -> Nat + type family UnBar a where UnBar (Bar field) = field + type FooSym0 :: (~>) Nat Foo + data FooSym0 a0123456789876543210 + where + FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) => + FooSym0 a0123456789876543210 + type instance Apply FooSym0 a0123456789876543210 = FooSym1 a0123456789876543210 instance SuppressUnusedWarnings FooSym0 where suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) - data FooSym0 :: (~>) Nat Foo + type FooSym1 (a0123456789876543210 :: Nat) = + Foo a0123456789876543210 :: Foo + type BarSym0 :: (~>) Nat Bar + data BarSym0 a0123456789876543210 where - FooSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) => - FooSym0 t0123456789876543210 - type instance Apply FooSym0 t0123456789876543210 = FooSym1 t0123456789876543210 - type FooSym1 (t0123456789876543210 :: Nat) = - Foo t0123456789876543210 + BarSym0KindInference :: SameKind (Apply BarSym0 arg) (BarSym1 arg) => + BarSym0 a0123456789876543210 + type instance Apply BarSym0 a0123456789876543210 = BarSym1 a0123456789876543210 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 = BarSym1 t0123456789876543210 - type BarSym1 (t0123456789876543210 :: Nat) = - Bar t0123456789876543210 + type BarSym1 (a0123456789876543210 :: Nat) = + Bar a0123456789876543210 :: Bar diff --git a/tests/compile-and-dump/Promote/Pragmas.golden b/tests/compile-and-dump/Promote/Pragmas.golden index dd683dca..a7ed78bc 100644 --- a/tests/compile-and-dump/Promote/Pragmas.golden +++ b/tests/compile-and-dump/Promote/Pragmas.golden @@ -7,6 +7,7 @@ Promote/Pragmas.hs:(0,0)-(0,0): Splicing declarations {-# INLINE foo #-} foo :: Bool foo = True - type FooSym0 = Foo - type family Foo :: Bool where + type FooSym0 = Foo :: Bool + type Foo :: Bool + type family Foo where Foo = TrueSym0 diff --git a/tests/compile-and-dump/Promote/Prelude.golden b/tests/compile-and-dump/Promote/Prelude.golden index e6b306c7..1fad5848 100644 --- a/tests/compile-and-dump/Promote/Prelude.golden +++ b/tests/compile-and-dump/Promote/Prelude.golden @@ -4,16 +4,17 @@ Promote/Prelude.hs:(0,0)-(0,0): Splicing declarations odd 0 = False odd n = not . odd $ n - 1 |] ======> - instance SuppressUnusedWarnings OddSym0 where - suppressUnusedWarnings = snd (((,) OddSym0KindInference) ()) - data OddSym0 :: (~>) Nat Bool + type OddSym0 :: (~>) Nat Bool + data OddSym0 a0123456789876543210 where - OddSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply OddSym0 arg) (OddSym1 arg) => + OddSym0KindInference :: SameKind (Apply OddSym0 arg) (OddSym1 arg) => OddSym0 a0123456789876543210 type instance Apply OddSym0 a0123456789876543210 = OddSym1 a0123456789876543210 + instance SuppressUnusedWarnings OddSym0 where + suppressUnusedWarnings = snd (((,) OddSym0KindInference) ()) type OddSym1 (a0123456789876543210 :: Nat) = - Odd a0123456789876543210 - type family Odd (a :: Nat) :: Bool where + Odd a0123456789876543210 :: Bool + type Odd :: Nat -> Bool + type family Odd a 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.golden b/tests/compile-and-dump/Promote/T180.golden index e53a91ae..7a9b41c6 100644 --- a/tests/compile-and-dump/Promote/T180.golden +++ b/tests/compile-and-dump/Promote/T180.golden @@ -8,47 +8,48 @@ Promote/T180.hs:(0,0)-(0,0): Splicing declarations data X = X1 {y :: Symbol} | X2 {y :: Symbol} z (X1 x) = x z (X2 x) = x - instance SuppressUnusedWarnings ZSym0 where - suppressUnusedWarnings = snd (((,) ZSym0KindInference) ()) data ZSym0 a0123456789876543210 where - ZSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ZSym0 arg) (ZSym1 arg) => + ZSym0KindInference :: SameKind (Apply ZSym0 arg) (ZSym1 arg) => ZSym0 a0123456789876543210 type instance Apply ZSym0 a0123456789876543210 = ZSym1 a0123456789876543210 + instance SuppressUnusedWarnings ZSym0 where + suppressUnusedWarnings = snd (((,) ZSym0KindInference) ()) type ZSym1 a0123456789876543210 = Z a0123456789876543210 type family Z a where Z (X1 x) = x Z (X2 x) = x - instance SuppressUnusedWarnings YSym0 where - suppressUnusedWarnings = snd (((,) YSym0KindInference) ()) - data YSym0 :: (~>) X Symbol + type YSym0 :: (~>) X Symbol + data YSym0 a0123456789876543210 where - YSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply YSym0 arg) (YSym1 arg) => + YSym0KindInference :: SameKind (Apply YSym0 arg) (YSym1 arg) => YSym0 a0123456789876543210 type instance Apply YSym0 a0123456789876543210 = YSym1 a0123456789876543210 - type YSym1 (a0123456789876543210 :: X) = Y a0123456789876543210 - type family Y (a :: X) :: Symbol where + instance SuppressUnusedWarnings YSym0 where + suppressUnusedWarnings = snd (((,) YSym0KindInference) ()) + type YSym1 (a0123456789876543210 :: X) = + Y a0123456789876543210 :: Symbol + type Y :: X -> Symbol + type family Y a where Y (X1 field) = field Y (X2 field) = field + type X1Sym0 :: (~>) Symbol X + data X1Sym0 a0123456789876543210 + where + X1Sym0KindInference :: SameKind (Apply X1Sym0 arg) (X1Sym1 arg) => + X1Sym0 a0123456789876543210 + type instance Apply X1Sym0 a0123456789876543210 = X1Sym1 a0123456789876543210 instance SuppressUnusedWarnings X1Sym0 where suppressUnusedWarnings = snd (((,) X1Sym0KindInference) ()) - data X1Sym0 :: (~>) Symbol X + type X1Sym1 (a0123456789876543210 :: Symbol) = + X1 a0123456789876543210 :: X + type X2Sym0 :: (~>) Symbol X + data X2Sym0 a0123456789876543210 where - X1Sym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply X1Sym0 arg) (X1Sym1 arg) => - X1Sym0 t0123456789876543210 - type instance Apply X1Sym0 t0123456789876543210 = X1Sym1 t0123456789876543210 - type X1Sym1 (t0123456789876543210 :: Symbol) = - X1 t0123456789876543210 + X2Sym0KindInference :: SameKind (Apply X2Sym0 arg) (X2Sym1 arg) => + X2Sym0 a0123456789876543210 + type instance Apply X2Sym0 a0123456789876543210 = X2Sym1 a0123456789876543210 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 = X2Sym1 t0123456789876543210 - type X2Sym1 (t0123456789876543210 :: Symbol) = - X2 t0123456789876543210 + type X2Sym1 (a0123456789876543210 :: Symbol) = + X2 a0123456789876543210 :: X diff --git a/tests/compile-and-dump/Promote/T361.golden b/tests/compile-and-dump/Promote/T361.golden index bb7839f6..710281f5 100644 --- a/tests/compile-and-dump/Promote/T361.golden +++ b/tests/compile-and-dump/Promote/T361.golden @@ -1,5 +1,7 @@ Promote/T361.hs:0:0:: Splicing declarations - genDefunSymbols [''Proxy] ======> type ProxySym0 = 'Proxy + genDefunSymbols [''Proxy] + ======> + type ProxySym0 = 'Proxy :: Proxy (t :: k) Promote/T361.hs:(0,0)-(0,0): Splicing declarations promote [d| f :: Proxy 1 -> Proxy 2 @@ -7,15 +9,16 @@ Promote/T361.hs:(0,0)-(0,0): Splicing declarations ======> f :: Proxy 1 -> Proxy 2 f Proxy = Proxy - instance SuppressUnusedWarnings FSym0 where - suppressUnusedWarnings = snd (((,) FSym0KindInference) ()) - data FSym0 :: (~>) (Proxy 1) (Proxy 2) + type FSym0 :: (~>) (Proxy 1) (Proxy 2) + data FSym0 a0123456789876543210 where - FSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FSym0 arg) (FSym1 arg) => + FSym0KindInference :: SameKind (Apply FSym0 arg) (FSym1 arg) => FSym0 a0123456789876543210 type instance Apply FSym0 a0123456789876543210 = FSym1 a0123456789876543210 + instance SuppressUnusedWarnings FSym0 where + suppressUnusedWarnings = snd (((,) FSym0KindInference) ()) type FSym1 (a0123456789876543210 :: Proxy 1) = - F a0123456789876543210 - type family F (a :: Proxy 1) :: Proxy 2 where + F a0123456789876543210 :: Proxy 2 + type F :: Proxy 1 -> Proxy 2 + type family F a where F 'Proxy = ProxySym0 diff --git a/tests/compile-and-dump/Singletons/AsPattern.golden b/tests/compile-and-dump/Singletons/AsPattern.golden index 562e5ae1..bb1b0dcf 100644 --- a/tests/compile-and-dump/Singletons/AsPattern.golden +++ b/tests/compile-and-dump/Singletons/AsPattern.golden @@ -34,104 +34,91 @@ Singletons/AsPattern.hs:(0,0)-(0,0): Splicing declarations foo p@[] = p foo p@[_] = p foo p@(_ : (_ : _)) = p + type BazSym0 :: (~>) Nat ((~>) Nat ((~>) Nat Baz)) + data BazSym0 a0123456789876543210 + where + BazSym0KindInference :: SameKind (Apply BazSym0 arg) (BazSym1 arg) => + BazSym0 a0123456789876543210 + type instance Apply BazSym0 a0123456789876543210 = BazSym1 a0123456789876543210 instance SuppressUnusedWarnings BazSym0 where suppressUnusedWarnings = snd (((,) BazSym0KindInference) ()) - data BazSym0 :: (~>) Nat ((~>) Nat ((~>) Nat Baz)) + type BazSym1 :: Nat -> (~>) Nat ((~>) Nat Baz) + data BazSym1 a0123456789876543210 a0123456789876543210 where - BazSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply BazSym0 arg) (BazSym1 arg) => - BazSym0 t0123456789876543210 - type instance Apply BazSym0 t0123456789876543210 = BazSym1 t0123456789876543210 - instance SuppressUnusedWarnings (BazSym1 t0123456789876543210) where + BazSym1KindInference :: SameKind (Apply (BazSym1 a0123456789876543210) arg) (BazSym2 a0123456789876543210 arg) => + BazSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (BazSym1 a0123456789876543210) a0123456789876543210 = BazSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (BazSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) BazSym1KindInference) ()) - data BazSym1 (t0123456789876543210 :: Nat) :: (~>) Nat ((~>) Nat Baz) + type BazSym2 :: Nat -> Nat -> (~>) Nat Baz + data BazSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (BazSym2 t0123456789876543210 t0123456789876543210) where + BazSym2KindInference :: SameKind (Apply (BazSym2 a0123456789876543210 a0123456789876543210) arg) (BazSym3 a0123456789876543210 a0123456789876543210 arg) => + BazSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (BazSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = BazSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (BazSym2 a0123456789876543210 a0123456789876543210) 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 = BazSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210 - type BazSym3 (t0123456789876543210 :: Nat) (t0123456789876543210 :: Nat) (t0123456789876543210 :: Nat) = - Baz t0123456789876543210 t0123456789876543210 t0123456789876543210 + type BazSym3 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = + Baz a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Baz type Let0123456789876543210PSym0 = Let0123456789876543210P type family Let0123456789876543210P where Let0123456789876543210P = NilSym0 - instance SuppressUnusedWarnings Let0123456789876543210PSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210PSym0KindInference) ()) data Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 where - Let0123456789876543210PSym0KindInference :: forall wild_01234567898765432100123456789876543210 - arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) => + Let0123456789876543210PSym0KindInference :: SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) => Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 type instance Apply Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings Let0123456789876543210PSym0 where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210PSym0KindInference) ()) type Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 = Let0123456789876543210P wild_01234567898765432100123456789876543210 type family Let0123456789876543210P wild_0123456789876543210 where Let0123456789876543210P wild_0123456789876543210 = Apply (Apply (:@#@$) wild_0123456789876543210) NilSym0 - instance SuppressUnusedWarnings Let0123456789876543210PSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210PSym0KindInference) ()) data Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 where - Let0123456789876543210PSym0KindInference :: forall wild_01234567898765432100123456789876543210 - arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) => + Let0123456789876543210PSym0KindInference :: SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) => Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 type instance Apply Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Let0123456789876543210PSym0 where suppressUnusedWarnings - = snd (((,) Let0123456789876543210PSym1KindInference) ()) + = snd (((,) Let0123456789876543210PSym0KindInference) ()) data Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 where - Let0123456789876543210PSym1KindInference :: forall wild_01234567898765432100123456789876543210 - wild_01234567898765432100123456789876543210 - arg. SameKind (Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) arg) (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 arg) => + Let0123456789876543210PSym1KindInference :: 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 (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Let0123456789876543210PSym2KindInference) ()) + = snd (((,) Let0123456789876543210PSym1KindInference) ()) 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) => + Let0123456789876543210PSym2KindInference :: 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 = Let0123456789876543210PSym3 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210PSym2KindInference) ()) type Let0123456789876543210PSym3 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 = Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 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) - instance SuppressUnusedWarnings Let0123456789876543210PSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210PSym0KindInference) ()) data Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 where - Let0123456789876543210PSym0KindInference :: forall wild_01234567898765432100123456789876543210 - arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) => + Let0123456789876543210PSym0KindInference :: SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) => Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 type instance Apply Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Let0123456789876543210PSym0 where suppressUnusedWarnings - = snd (((,) Let0123456789876543210PSym1KindInference) ()) + = snd (((,) Let0123456789876543210PSym0KindInference) ()) data Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 where - Let0123456789876543210PSym1KindInference :: forall wild_01234567898765432100123456789876543210 - wild_01234567898765432100123456789876543210 - arg. SameKind (Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) arg) (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 arg) => + Let0123456789876543210PSym1KindInference :: 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 (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210PSym1KindInference) ()) type Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 = Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 type family Let0123456789876543210P wild_0123456789876543210 wild_0123456789876543210 where @@ -139,49 +126,42 @@ Singletons/AsPattern.hs:(0,0)-(0,0): Splicing declarations type Let0123456789876543210PSym0 = Let0123456789876543210P type family Let0123456789876543210P where Let0123456789876543210P = NothingSym0 - instance SuppressUnusedWarnings Let0123456789876543210PSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210PSym0KindInference) ()) data Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 where - Let0123456789876543210PSym0KindInference :: forall wild_01234567898765432100123456789876543210 - arg. SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) => + Let0123456789876543210PSym0KindInference :: SameKind (Apply Let0123456789876543210PSym0 arg) (Let0123456789876543210PSym1 arg) => Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 type instance Apply Let0123456789876543210PSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Let0123456789876543210PSym0 where suppressUnusedWarnings - = snd (((,) Let0123456789876543210PSym1KindInference) ()) + = snd (((,) Let0123456789876543210PSym0KindInference) ()) data Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 where - Let0123456789876543210PSym1KindInference :: forall wild_01234567898765432100123456789876543210 - wild_01234567898765432100123456789876543210 - arg. SameKind (Apply (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) arg) (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 arg) => + Let0123456789876543210PSym1KindInference :: 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 (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Let0123456789876543210PSym1 wild_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Let0123456789876543210PSym2KindInference) ()) + = snd (((,) Let0123456789876543210PSym1KindInference) ()) 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) => + Let0123456789876543210PSym2KindInference :: 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 = Let0123456789876543210PSym3 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Let0123456789876543210PSym2 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210PSym2KindInference) ()) type Let0123456789876543210PSym3 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 = Let0123456789876543210P wild_01234567898765432100123456789876543210 wild_01234567898765432100123456789876543210 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) - instance SuppressUnusedWarnings Let0123456789876543210XSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210XSym0KindInference) ()) data Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210 where - Let0123456789876543210XSym0KindInference :: forall wild_01234567898765432100123456789876543210 - arg. SameKind (Apply Let0123456789876543210XSym0 arg) (Let0123456789876543210XSym1 arg) => + Let0123456789876543210XSym0KindInference :: SameKind (Apply Let0123456789876543210XSym0 arg) (Let0123456789876543210XSym1 arg) => Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210 type instance Apply Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210XSym1 wild_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings Let0123456789876543210XSym0 where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210XSym0KindInference) ()) type Let0123456789876543210XSym1 wild_01234567898765432100123456789876543210 = Let0123456789876543210X wild_01234567898765432100123456789876543210 type family Let0123456789876543210X wild_0123456789876543210 where @@ -189,70 +169,75 @@ Singletons/AsPattern.hs:(0,0)-(0,0): Splicing declarations type Let0123456789876543210PSym0 = Let0123456789876543210P type family Let0123456789876543210P where Let0123456789876543210P = NothingSym0 - instance SuppressUnusedWarnings FooSym0 where - suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) - data FooSym0 :: (~>) [Nat] [Nat] + type FooSym0 :: (~>) [Nat] [Nat] + data FooSym0 a0123456789876543210 where - FooSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) => + FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) => FooSym0 a0123456789876543210 type instance Apply FooSym0 a0123456789876543210 = FooSym1 a0123456789876543210 + instance SuppressUnusedWarnings FooSym0 where + suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) type FooSym1 (a0123456789876543210 :: [Nat]) = - Foo a0123456789876543210 - instance SuppressUnusedWarnings TupSym0 where - suppressUnusedWarnings = snd (((,) TupSym0KindInference) ()) - data TupSym0 :: (~>) (Nat, Nat) (Nat, Nat) + Foo a0123456789876543210 :: [Nat] + type TupSym0 :: (~>) (Nat, Nat) (Nat, Nat) + data TupSym0 a0123456789876543210 where - TupSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply TupSym0 arg) (TupSym1 arg) => + TupSym0KindInference :: SameKind (Apply TupSym0 arg) (TupSym1 arg) => TupSym0 a0123456789876543210 type instance Apply TupSym0 a0123456789876543210 = TupSym1 a0123456789876543210 + instance SuppressUnusedWarnings TupSym0 where + suppressUnusedWarnings = snd (((,) TupSym0KindInference) ()) type TupSym1 (a0123456789876543210 :: (Nat, Nat)) = - Tup a0123456789876543210 - instance SuppressUnusedWarnings Baz_Sym0 where - suppressUnusedWarnings = snd (((,) Baz_Sym0KindInference) ()) - data Baz_Sym0 :: (~>) (Maybe Baz) (Maybe Baz) + Tup a0123456789876543210 :: (Nat, Nat) + type Baz_Sym0 :: (~>) (Maybe Baz) (Maybe Baz) + data Baz_Sym0 a0123456789876543210 where - Baz_Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Baz_Sym0 arg) (Baz_Sym1 arg) => + Baz_Sym0KindInference :: SameKind (Apply Baz_Sym0 arg) (Baz_Sym1 arg) => Baz_Sym0 a0123456789876543210 type instance Apply Baz_Sym0 a0123456789876543210 = Baz_Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Baz_Sym0 where + suppressUnusedWarnings = snd (((,) Baz_Sym0KindInference) ()) type Baz_Sym1 (a0123456789876543210 :: Maybe Baz) = - Baz_ a0123456789876543210 - instance SuppressUnusedWarnings BarSym0 where - suppressUnusedWarnings = snd (((,) BarSym0KindInference) ()) - data BarSym0 :: (~>) (Maybe Nat) (Maybe Nat) + Baz_ a0123456789876543210 :: Maybe Baz + type BarSym0 :: (~>) (Maybe Nat) (Maybe Nat) + data BarSym0 a0123456789876543210 where - BarSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) => + BarSym0KindInference :: SameKind (Apply BarSym0 arg) (BarSym1 arg) => BarSym0 a0123456789876543210 type instance Apply BarSym0 a0123456789876543210 = BarSym1 a0123456789876543210 + instance SuppressUnusedWarnings BarSym0 where + suppressUnusedWarnings = snd (((,) BarSym0KindInference) ()) type BarSym1 (a0123456789876543210 :: Maybe Nat) = - Bar a0123456789876543210 - instance SuppressUnusedWarnings MaybePlusSym0 where - suppressUnusedWarnings = snd (((,) MaybePlusSym0KindInference) ()) - data MaybePlusSym0 :: (~>) (Maybe Nat) (Maybe Nat) + Bar a0123456789876543210 :: Maybe Nat + type MaybePlusSym0 :: (~>) (Maybe Nat) (Maybe Nat) + data MaybePlusSym0 a0123456789876543210 where - MaybePlusSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply MaybePlusSym0 arg) (MaybePlusSym1 arg) => + MaybePlusSym0KindInference :: SameKind (Apply MaybePlusSym0 arg) (MaybePlusSym1 arg) => MaybePlusSym0 a0123456789876543210 type instance Apply MaybePlusSym0 a0123456789876543210 = MaybePlusSym1 a0123456789876543210 + instance SuppressUnusedWarnings MaybePlusSym0 where + suppressUnusedWarnings = snd (((,) MaybePlusSym0KindInference) ()) type MaybePlusSym1 (a0123456789876543210 :: Maybe Nat) = - MaybePlus a0123456789876543210 - type family Foo (a :: [Nat]) :: [Nat] where + MaybePlus a0123456789876543210 :: Maybe Nat + type Foo :: [Nat] -> [Nat] + type family Foo a 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 + type Tup :: (Nat, Nat) -> (Nat, Nat) + type family Tup a where Tup '(wild_0123456789876543210, wild_0123456789876543210) = Let0123456789876543210PSym2 wild_0123456789876543210 wild_0123456789876543210 - type family Baz_ (a :: Maybe Baz) :: Maybe Baz where + type Baz_ :: Maybe Baz -> Maybe Baz + type family Baz_ a 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 + type Bar :: Maybe Nat -> Maybe Nat + type family Bar a where Bar ('Just wild_0123456789876543210) = Let0123456789876543210XSym1 wild_0123456789876543210 Bar 'Nothing = NothingSym0 - type family MaybePlus (a :: Maybe Nat) :: Maybe Nat where + type MaybePlus :: Maybe Nat -> Maybe Nat + type family MaybePlus a where MaybePlus ('Just n) = Apply JustSym0 (Apply (Apply PlusSym0 (Apply SuccSym0 ZeroSym0)) n) MaybePlus 'Nothing = Let0123456789876543210PSym0 sFoo :: diff --git a/tests/compile-and-dump/Singletons/BoundedDeriving.golden b/tests/compile-and-dump/Singletons/BoundedDeriving.golden index 0103bba4..cc69fb94 100644 --- a/tests/compile-and-dump/Singletons/BoundedDeriving.golden +++ b/tests/compile-and-dump/Singletons/BoundedDeriving.golden @@ -31,96 +31,104 @@ Singletons/BoundedDeriving.hs:(0,0)-(0,0): Splicing declarations 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 Foo1Sym0 = Foo1 :: Foo1 + type ASym0 = A :: Foo2 + type BSym0 = B :: Foo2 + type CSym0 = C :: Foo2 + type DSym0 = D :: Foo2 + type ESym0 = E :: Foo2 + type Foo3Sym0 :: forall a. (~>) a (Foo3 a) + data Foo3Sym0 a0123456789876543210 + where + Foo3Sym0KindInference :: SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) => + Foo3Sym0 a0123456789876543210 + type instance Apply Foo3Sym0 a0123456789876543210 = Foo3Sym1 a0123456789876543210 instance SuppressUnusedWarnings Foo3Sym0 where suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ()) - data Foo3Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 (Foo3 a0123456789876543210) + type Foo3Sym1 (a0123456789876543210 :: a) = + Foo3 a0123456789876543210 :: Foo3 a + type Foo41Sym0 = Foo41 :: Foo4 (a :: Type) (b :: Type) + type Foo42Sym0 = Foo42 :: Foo4 (a :: Type) (b :: Type) + type PairSym0 :: (~>) Bool ((~>) Bool Pair) + data PairSym0 a0123456789876543210 where - Foo3Sym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) => - Foo3Sym0 t0123456789876543210 - type instance Apply Foo3Sym0 t0123456789876543210 = Foo3Sym1 t0123456789876543210 - type Foo3Sym1 (t0123456789876543210 :: a0123456789876543210) = - Foo3 t0123456789876543210 - type Foo41Sym0 = Foo41 - type Foo42Sym0 = Foo42 + PairSym0KindInference :: SameKind (Apply PairSym0 arg) (PairSym1 arg) => + PairSym0 a0123456789876543210 + type instance Apply PairSym0 a0123456789876543210 = PairSym1 a0123456789876543210 instance SuppressUnusedWarnings PairSym0 where suppressUnusedWarnings = snd (((,) PairSym0KindInference) ()) - data PairSym0 :: (~>) Bool ((~>) Bool Pair) + type PairSym1 :: Bool -> (~>) Bool Pair + data PairSym1 a0123456789876543210 a0123456789876543210 where - PairSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply PairSym0 arg) (PairSym1 arg) => - PairSym0 t0123456789876543210 - type instance Apply PairSym0 t0123456789876543210 = PairSym1 t0123456789876543210 - instance SuppressUnusedWarnings (PairSym1 t0123456789876543210) where + PairSym1KindInference :: SameKind (Apply (PairSym1 a0123456789876543210) arg) (PairSym2 a0123456789876543210 arg) => + PairSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (PairSym1 a0123456789876543210) a0123456789876543210 = PairSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (PairSym1 a0123456789876543210) 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 = PairSym2 t0123456789876543210 t0123456789876543210 - type PairSym2 (t0123456789876543210 :: Bool) (t0123456789876543210 :: Bool) = - Pair t0123456789876543210 t0123456789876543210 - type family MinBound_0123456789876543210 :: Foo1 where + type PairSym2 (a0123456789876543210 :: Bool) (a0123456789876543210 :: Bool) = + Pair a0123456789876543210 a0123456789876543210 :: Pair + type MinBound_0123456789876543210 :: Foo1 + type family MinBound_0123456789876543210 where MinBound_0123456789876543210 = Foo1Sym0 type MinBound_0123456789876543210Sym0 = - MinBound_0123456789876543210 - type family MaxBound_0123456789876543210 :: Foo1 where + MinBound_0123456789876543210 :: Foo1 + type MaxBound_0123456789876543210 :: Foo1 + type family MaxBound_0123456789876543210 where MaxBound_0123456789876543210 = Foo1Sym0 type MaxBound_0123456789876543210Sym0 = - MaxBound_0123456789876543210 + MaxBound_0123456789876543210 :: Foo1 instance PBounded Foo1 where type MinBound = MinBound_0123456789876543210Sym0 type MaxBound = MaxBound_0123456789876543210Sym0 - type family MinBound_0123456789876543210 :: Foo2 where + type MinBound_0123456789876543210 :: Foo2 + type family MinBound_0123456789876543210 where MinBound_0123456789876543210 = ASym0 type MinBound_0123456789876543210Sym0 = - MinBound_0123456789876543210 - type family MaxBound_0123456789876543210 :: Foo2 where + MinBound_0123456789876543210 :: Foo2 + type MaxBound_0123456789876543210 :: Foo2 + type family MaxBound_0123456789876543210 where MaxBound_0123456789876543210 = ESym0 type MaxBound_0123456789876543210Sym0 = - MaxBound_0123456789876543210 + MaxBound_0123456789876543210 :: Foo2 instance PBounded Foo2 where type MinBound = MinBound_0123456789876543210Sym0 type MaxBound = MaxBound_0123456789876543210Sym0 - type family MinBound_0123456789876543210 :: Foo3 a where + type MinBound_0123456789876543210 :: Foo3 a + type family MinBound_0123456789876543210 where MinBound_0123456789876543210 = Apply Foo3Sym0 MinBoundSym0 type MinBound_0123456789876543210Sym0 = - MinBound_0123456789876543210 - type family MaxBound_0123456789876543210 :: Foo3 a where + MinBound_0123456789876543210 :: Foo3 a + type MaxBound_0123456789876543210 :: Foo3 a + type family MaxBound_0123456789876543210 where MaxBound_0123456789876543210 = Apply Foo3Sym0 MaxBoundSym0 type MaxBound_0123456789876543210Sym0 = - MaxBound_0123456789876543210 + MaxBound_0123456789876543210 :: Foo3 a instance PBounded (Foo3 a) where type MinBound = MinBound_0123456789876543210Sym0 type MaxBound = MaxBound_0123456789876543210Sym0 - type family MinBound_0123456789876543210 :: Foo4 a b where + type MinBound_0123456789876543210 :: Foo4 a b + type family MinBound_0123456789876543210 where MinBound_0123456789876543210 = Foo41Sym0 type MinBound_0123456789876543210Sym0 = - MinBound_0123456789876543210 - type family MaxBound_0123456789876543210 :: Foo4 a b where + MinBound_0123456789876543210 :: Foo4 a b + type MaxBound_0123456789876543210 :: Foo4 a b + type family MaxBound_0123456789876543210 where MaxBound_0123456789876543210 = Foo42Sym0 type MaxBound_0123456789876543210Sym0 = - MaxBound_0123456789876543210 + MaxBound_0123456789876543210 :: Foo4 a b instance PBounded (Foo4 a b) where type MinBound = MinBound_0123456789876543210Sym0 type MaxBound = MaxBound_0123456789876543210Sym0 - type family MinBound_0123456789876543210 :: Pair where + type MinBound_0123456789876543210 :: Pair + type family MinBound_0123456789876543210 where MinBound_0123456789876543210 = Apply (Apply PairSym0 MinBoundSym0) MinBoundSym0 type MinBound_0123456789876543210Sym0 = - MinBound_0123456789876543210 - type family MaxBound_0123456789876543210 :: Pair where + MinBound_0123456789876543210 :: Pair + type MaxBound_0123456789876543210 :: Pair + type family MaxBound_0123456789876543210 where MaxBound_0123456789876543210 = Apply (Apply PairSym0 MaxBoundSym0) MaxBoundSym0 type MaxBound_0123456789876543210Sym0 = - MaxBound_0123456789876543210 + MaxBound_0123456789876543210 :: Pair instance PBounded Pair where type MinBound = MinBound_0123456789876543210Sym0 type MaxBound = MaxBound_0123456789876543210Sym0 @@ -160,7 +168,7 @@ Singletons/BoundedDeriving.hs:(0,0)-(0,0): Splicing declarations 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 + data SFoo4 :: forall a b. Foo4 (a :: Type) (b :: Type) -> Type where SFoo41 :: forall (a :: Type) (b :: Type). SFoo4 (Foo41 :: Foo4 (a :: Type) (b :: Type)) diff --git a/tests/compile-and-dump/Singletons/BoxUnBox.golden b/tests/compile-and-dump/Singletons/BoxUnBox.golden index 4410730a..558f71ce 100644 --- a/tests/compile-and-dump/Singletons/BoxUnBox.golden +++ b/tests/compile-and-dump/Singletons/BoxUnBox.golden @@ -8,29 +8,28 @@ Singletons/BoxUnBox.hs:(0,0)-(0,0): Splicing declarations data Box a = FBox a unBox :: Box a -> a unBox (FBox a) = a + type FBoxSym0 :: forall a. (~>) a (Box a) + data FBoxSym0 a0123456789876543210 + where + FBoxSym0KindInference :: SameKind (Apply FBoxSym0 arg) (FBoxSym1 arg) => + FBoxSym0 a0123456789876543210 + type instance Apply FBoxSym0 a0123456789876543210 = FBoxSym1 a0123456789876543210 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 = FBoxSym1 t0123456789876543210 - type FBoxSym1 (t0123456789876543210 :: a0123456789876543210) = - FBox t0123456789876543210 - instance SuppressUnusedWarnings UnBoxSym0 where - suppressUnusedWarnings = snd (((,) UnBoxSym0KindInference) ()) - data UnBoxSym0 :: forall a0123456789876543210. - (~>) (Box a0123456789876543210) a0123456789876543210 + type FBoxSym1 (a0123456789876543210 :: a) = + FBox a0123456789876543210 :: Box a + type UnBoxSym0 :: (~>) (Box a) a + data UnBoxSym0 a0123456789876543210 where - UnBoxSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply UnBoxSym0 arg) (UnBoxSym1 arg) => + UnBoxSym0KindInference :: SameKind (Apply UnBoxSym0 arg) (UnBoxSym1 arg) => UnBoxSym0 a0123456789876543210 type instance Apply UnBoxSym0 a0123456789876543210 = UnBoxSym1 a0123456789876543210 - type UnBoxSym1 (a0123456789876543210 :: Box a0123456789876543210) = - UnBox a0123456789876543210 - type family UnBox (a :: Box a) :: a where + instance SuppressUnusedWarnings UnBoxSym0 where + suppressUnusedWarnings = snd (((,) UnBoxSym0KindInference) ()) + type UnBoxSym1 (a0123456789876543210 :: Box a) = + UnBox a0123456789876543210 :: a + type UnBox :: Box a -> a + type family UnBox a where UnBox (FBox a) = a sUnBox :: forall a (t :: Box a). Sing t -> Sing (Apply UnBoxSym0 t :: a) diff --git a/tests/compile-and-dump/Singletons/CaseExpressions.golden b/tests/compile-and-dump/Singletons/CaseExpressions.golden index 59d7365b..7f70bfc9 100644 --- a/tests/compile-and-dump/Singletons/CaseExpressions.golden +++ b/tests/compile-and-dump/Singletons/CaseExpressions.golden @@ -41,108 +41,95 @@ Singletons/CaseExpressions.hs:(0,0)-(0,0): Splicing declarations Case_0123456789876543210 arg_0123456789876543210 y x _ = x type family Lambda_0123456789876543210 y x arg_0123456789876543210 where Lambda_0123456789876543210 y x arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 y x arg_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 y0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 y0123456789876543210 = Lambda_0123456789876543210Sym1 y0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 y0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 y0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall y0123456789876543210 - x0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 y0123456789876543210) arg) (Lambda_0123456789876543210Sym2 y0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 y0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall y0123456789876543210 - x0123456789876543210 - arg_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym3 y0123456789876543210 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym3 y0123456789876543210 x0123456789876543210 arg) => Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 y0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 y0123456789876543210 x0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 y0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 y0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 type family Case_0123456789876543210 x t where Case_0123456789876543210 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 y) x) y - instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210ZSym0KindInference) ()) data Let0123456789876543210ZSym0 y0123456789876543210 where - Let0123456789876543210ZSym0KindInference :: forall y0123456789876543210 - arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) => + Let0123456789876543210ZSym0KindInference :: SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) => Let0123456789876543210ZSym0 y0123456789876543210 type instance Apply Let0123456789876543210ZSym0 y0123456789876543210 = Let0123456789876543210ZSym1 y0123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210ZSym1 y0123456789876543210) where + instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where suppressUnusedWarnings - = snd (((,) Let0123456789876543210ZSym1KindInference) ()) + = snd (((,) Let0123456789876543210ZSym0KindInference) ()) data Let0123456789876543210ZSym1 y0123456789876543210 x0123456789876543210 where - Let0123456789876543210ZSym1KindInference :: forall y0123456789876543210 - x0123456789876543210 - arg. SameKind (Apply (Let0123456789876543210ZSym1 y0123456789876543210) arg) (Let0123456789876543210ZSym2 y0123456789876543210 arg) => + Let0123456789876543210ZSym1KindInference :: SameKind (Apply (Let0123456789876543210ZSym1 y0123456789876543210) arg) (Let0123456789876543210ZSym2 y0123456789876543210 arg) => Let0123456789876543210ZSym1 y0123456789876543210 x0123456789876543210 type instance Apply (Let0123456789876543210ZSym1 y0123456789876543210) x0123456789876543210 = Let0123456789876543210ZSym2 y0123456789876543210 x0123456789876543210 + instance SuppressUnusedWarnings (Let0123456789876543210ZSym1 y0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210ZSym1KindInference) ()) type Let0123456789876543210ZSym2 y0123456789876543210 x0123456789876543210 = - Let0123456789876543210Z y0123456789876543210 x0123456789876543210 + Let0123456789876543210Z y0123456789876543210 x0123456789876543210 :: a0123456789876543210 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 + data Let0123456789876543210Scrutinee_0123456789876543210Sym0 a0123456789876543210 + where + Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) => + Let0123456789876543210Scrutinee_0123456789876543210Sym0 a0123456789876543210 + type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 a0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210 instance SuppressUnusedWarnings Let0123456789876543210Scrutinee_0123456789876543210Sym0 where suppressUnusedWarnings = snd (((,) Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference) ()) - data Let0123456789876543210Scrutinee_0123456789876543210Sym0 a0123456789876543210 + data Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 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 + Let0123456789876543210Scrutinee_0123456789876543210Sym1KindInference :: SameKind (Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210) arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym2 a0123456789876543210 arg) => + Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 + type instance Apply (Let0123456789876543210Scrutinee_0123456789876543210Sym1 a0123456789876543210) b0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym2 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_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 type Let0123456789876543210Scrutinee_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 a0123456789876543210 b0123456789876543210 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 + data Let0123456789876543210Scrutinee_0123456789876543210Sym0 d0123456789876543210 + where + Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) => + Let0123456789876543210Scrutinee_0123456789876543210Sym0 d0123456789876543210 + type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 d0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym1 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_0123456789876543210Sym1 d0123456789876543210 type Let0123456789876543210Scrutinee_0123456789876543210Sym1 d0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 d0123456789876543210 type family Let0123456789876543210Scrutinee_0123456789876543210 d where @@ -152,98 +139,94 @@ Singletons/CaseExpressions.hs:(0,0)-(0,0): Splicing declarations type family Case_0123456789876543210 d x t where Case_0123456789876543210 d x ('Just y) = y Case_0123456789876543210 d x 'Nothing = d - instance SuppressUnusedWarnings Foo5Sym0 where - suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ()) - data Foo5Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 a0123456789876543210 + type Foo5Sym0 :: (~>) a a + data Foo5Sym0 a0123456789876543210 where - Foo5Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) => + Foo5Sym0KindInference :: SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) => Foo5Sym0 a0123456789876543210 type instance Apply Foo5Sym0 a0123456789876543210 = Foo5Sym1 a0123456789876543210 - type Foo5Sym1 (a0123456789876543210 :: a0123456789876543210) = - Foo5 a0123456789876543210 - instance SuppressUnusedWarnings Foo4Sym0 where - suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ()) - data Foo4Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings Foo5Sym0 where + suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ()) + type Foo5Sym1 (a0123456789876543210 :: a) = + Foo5 a0123456789876543210 :: a + type Foo4Sym0 :: forall a. (~>) a a + data Foo4Sym0 a0123456789876543210 where - Foo4Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) => + Foo4Sym0KindInference :: SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) => Foo4Sym0 a0123456789876543210 type instance Apply Foo4Sym0 a0123456789876543210 = Foo4Sym1 a0123456789876543210 - type Foo4Sym1 (a0123456789876543210 :: a0123456789876543210) = - Foo4 a0123456789876543210 - instance SuppressUnusedWarnings Foo3Sym0 where - suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ()) - data Foo3Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210) + instance SuppressUnusedWarnings Foo4Sym0 where + suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ()) + type Foo4Sym1 (a0123456789876543210 :: a) = + Foo4 a0123456789876543210 :: a + type Foo3Sym0 :: (~>) a ((~>) b a) + data Foo3Sym0 a0123456789876543210 where - Foo3Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) => + Foo3Sym0KindInference :: SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) => Foo3Sym0 a0123456789876543210 type instance Apply Foo3Sym0 a0123456789876543210 = Foo3Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foo3Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo3Sym1KindInference) ()) - data Foo3Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings Foo3Sym0 where + suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ()) + type Foo3Sym1 :: a -> (~>) b a + data Foo3Sym1 a0123456789876543210 a0123456789876543210 where - Foo3Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo3Sym1 a0123456789876543210) arg) (Foo3Sym2 a0123456789876543210 arg) => + Foo3Sym1KindInference :: SameKind (Apply (Foo3Sym1 a0123456789876543210) arg) (Foo3Sym2 a0123456789876543210 arg) => Foo3Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Foo3Sym1 a0123456789876543210) a0123456789876543210 = Foo3Sym2 a0123456789876543210 a0123456789876543210 - type Foo3Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - Foo3 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings Foo2Sym0 where - suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ()) - data Foo2Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) a0123456789876543210) + instance SuppressUnusedWarnings (Foo3Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo3Sym1KindInference) ()) + type Foo3Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Foo3 a0123456789876543210 a0123456789876543210 :: a + type Foo2Sym0 :: (~>) a ((~>) (Maybe a) a) + data Foo2Sym0 a0123456789876543210 where - Foo2Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) => + Foo2Sym0KindInference :: SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) => Foo2Sym0 a0123456789876543210 type instance Apply Foo2Sym0 a0123456789876543210 = Foo2Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foo2Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo2Sym1KindInference) ()) - data Foo2Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) (Maybe a0123456789876543210) a0123456789876543210 + instance SuppressUnusedWarnings Foo2Sym0 where + suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ()) + type Foo2Sym1 :: a -> (~>) (Maybe a) a + data Foo2Sym1 a0123456789876543210 a0123456789876543210 where - Foo2Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo2Sym1 a0123456789876543210) arg) (Foo2Sym2 a0123456789876543210 arg) => + Foo2Sym1KindInference :: SameKind (Apply (Foo2Sym1 a0123456789876543210) arg) (Foo2Sym2 a0123456789876543210 arg) => Foo2Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Foo2Sym1 a0123456789876543210) a0123456789876543210 = Foo2Sym2 a0123456789876543210 a0123456789876543210 - type Foo2Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) = - Foo2 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings Foo1Sym0 where - suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ()) - data Foo1Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) a0123456789876543210) + instance SuppressUnusedWarnings (Foo2Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo2Sym1KindInference) ()) + type Foo2Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: Maybe a) = + Foo2 a0123456789876543210 a0123456789876543210 :: a + type Foo1Sym0 :: (~>) a ((~>) (Maybe a) a) + data Foo1Sym0 a0123456789876543210 where - Foo1Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) => + Foo1Sym0KindInference :: SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) => Foo1Sym0 a0123456789876543210 type instance Apply Foo1Sym0 a0123456789876543210 = Foo1Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foo1Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo1Sym1KindInference) ()) - data Foo1Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) (Maybe a0123456789876543210) a0123456789876543210 + instance SuppressUnusedWarnings Foo1Sym0 where + suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ()) + type Foo1Sym1 :: a -> (~>) (Maybe a) a + data Foo1Sym1 a0123456789876543210 a0123456789876543210 where - Foo1Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo1Sym1 a0123456789876543210) arg) (Foo1Sym2 a0123456789876543210 arg) => + Foo1Sym1KindInference :: SameKind (Apply (Foo1Sym1 a0123456789876543210) arg) (Foo1Sym2 a0123456789876543210 arg) => Foo1Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Foo1Sym1 a0123456789876543210) a0123456789876543210 = Foo1Sym2 a0123456789876543210 a0123456789876543210 - type Foo1Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) = - Foo1 a0123456789876543210 a0123456789876543210 - type family Foo5 (a :: a) :: a where + instance SuppressUnusedWarnings (Foo1Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo1Sym1KindInference) ()) + type Foo1Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: Maybe a) = + Foo1 a0123456789876543210 a0123456789876543210 :: a + type Foo5 :: a -> a + type family Foo5 a where Foo5 x = Case_0123456789876543210 x x - type family Foo4 (a :: a) :: a where + type Foo4 :: forall a. a -> a + type family Foo4 a where Foo4 x = Case_0123456789876543210 x x - type family Foo3 (a :: a) (a :: b) :: a where + type Foo3 :: a -> b -> a + type family Foo3 a a where Foo3 a b = Case_0123456789876543210 a b (Let0123456789876543210Scrutinee_0123456789876543210Sym2 a b) - type family Foo2 (a :: a) (a :: Maybe a) :: a where + type Foo2 :: a -> Maybe a -> a + type family Foo2 a a where Foo2 d _ = Case_0123456789876543210 d (Let0123456789876543210Scrutinee_0123456789876543210Sym1 d) - type family Foo1 (a :: a) (a :: Maybe a) :: a where + type Foo1 :: a -> Maybe a -> a + type family Foo1 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) diff --git a/tests/compile-and-dump/Singletons/Classes.golden b/tests/compile-and-dump/Singletons/Classes.golden index af7ac143..2394af80 100644 --- a/tests/compile-and-dump/Singletons/Classes.golden +++ b/tests/compile-and-dump/Singletons/Classes.golden @@ -61,232 +61,225 @@ Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations (==) G G = True (==) F G = False (==) G F = False - type ASym0 = A - type BSym0 = B - type FSym0 = F - type GSym0 = G - instance SuppressUnusedWarnings FooCompareSym0 where - suppressUnusedWarnings = snd (((,) FooCompareSym0KindInference) ()) - data FooCompareSym0 :: (~>) Foo ((~>) Foo Ordering) + type ASym0 = A :: Foo + type BSym0 = B :: Foo + type FSym0 = F :: Foo2 + type GSym0 = G :: Foo2 + type FooCompareSym0 :: (~>) Foo ((~>) Foo Ordering) + data FooCompareSym0 a0123456789876543210 where - FooCompareSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FooCompareSym0 arg) (FooCompareSym1 arg) => + FooCompareSym0KindInference :: SameKind (Apply FooCompareSym0 arg) (FooCompareSym1 arg) => FooCompareSym0 a0123456789876543210 type instance Apply FooCompareSym0 a0123456789876543210 = FooCompareSym1 a0123456789876543210 - instance SuppressUnusedWarnings (FooCompareSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) FooCompareSym1KindInference) ()) - data FooCompareSym1 (a0123456789876543210 :: Foo) :: (~>) Foo Ordering + instance SuppressUnusedWarnings FooCompareSym0 where + suppressUnusedWarnings = snd (((,) FooCompareSym0KindInference) ()) + type FooCompareSym1 :: Foo -> (~>) Foo Ordering + data FooCompareSym1 a0123456789876543210 a0123456789876543210 where - FooCompareSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (FooCompareSym1 a0123456789876543210) arg) (FooCompareSym2 a0123456789876543210 arg) => + FooCompareSym1KindInference :: SameKind (Apply (FooCompareSym1 a0123456789876543210) arg) (FooCompareSym2 a0123456789876543210 arg) => FooCompareSym1 a0123456789876543210 a0123456789876543210 type instance Apply (FooCompareSym1 a0123456789876543210) a0123456789876543210 = FooCompareSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (FooCompareSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) FooCompareSym1KindInference) ()) type FooCompareSym2 (a0123456789876543210 :: Foo) (a0123456789876543210 :: Foo) = - FooCompare a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings ConstSym0 where - suppressUnusedWarnings = snd (((,) ConstSym0KindInference) ()) - data ConstSym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210) + FooCompare a0123456789876543210 a0123456789876543210 :: Ordering + type ConstSym0 :: (~>) a ((~>) b a) + data ConstSym0 a0123456789876543210 where - ConstSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ConstSym0 arg) (ConstSym1 arg) => + ConstSym0KindInference :: SameKind (Apply ConstSym0 arg) (ConstSym1 arg) => ConstSym0 a0123456789876543210 type instance Apply ConstSym0 a0123456789876543210 = ConstSym1 a0123456789876543210 - instance SuppressUnusedWarnings (ConstSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) ConstSym1KindInference) ()) - data ConstSym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ConstSym0 where + suppressUnusedWarnings = snd (((,) ConstSym0KindInference) ()) + type ConstSym1 :: a -> (~>) b a + data ConstSym1 a0123456789876543210 a0123456789876543210 where - ConstSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ConstSym1 a0123456789876543210) arg) (ConstSym2 a0123456789876543210 arg) => + ConstSym1KindInference :: SameKind (Apply (ConstSym1 a0123456789876543210) arg) (ConstSym2 a0123456789876543210 arg) => ConstSym1 a0123456789876543210 a0123456789876543210 type instance Apply (ConstSym1 a0123456789876543210) a0123456789876543210 = ConstSym2 a0123456789876543210 a0123456789876543210 - type ConstSym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - Const a0123456789876543210 a0123456789876543210 - type family FooCompare (a :: Foo) (a :: Foo) :: Ordering where + instance SuppressUnusedWarnings (ConstSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) ConstSym1KindInference) ()) + type ConstSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Const a0123456789876543210 a0123456789876543210 :: a + type FooCompare :: Foo -> Foo -> Ordering + type family FooCompare a a 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 + type Const :: a -> b -> a + type family Const a a where Const x _ = x + type MycompareSym0 :: forall a. (~>) a ((~>) a Ordering) + data MycompareSym0 a0123456789876543210 + where + MycompareSym0KindInference :: SameKind (Apply MycompareSym0 arg) (MycompareSym1 arg) => + MycompareSym0 a0123456789876543210 + type instance Apply MycompareSym0 a0123456789876543210 = MycompareSym1 a0123456789876543210 instance SuppressUnusedWarnings MycompareSym0 where suppressUnusedWarnings = snd (((,) MycompareSym0KindInference) ()) - data MycompareSym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) a0123456789876543210 Ordering) + type MycompareSym1 :: forall a. a -> (~>) a Ordering + data MycompareSym1 a0123456789876543210 a0123456789876543210 where - MycompareSym0KindInference :: forall arg0123456789876543210 - arg. SameKind (Apply MycompareSym0 arg) (MycompareSym1 arg) => - MycompareSym0 arg0123456789876543210 - type instance Apply MycompareSym0 arg0123456789876543210 = MycompareSym1 arg0123456789876543210 - instance SuppressUnusedWarnings (MycompareSym1 arg0123456789876543210) where + MycompareSym1KindInference :: SameKind (Apply (MycompareSym1 a0123456789876543210) arg) (MycompareSym2 a0123456789876543210 arg) => + MycompareSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (MycompareSym1 a0123456789876543210) a0123456789876543210 = MycompareSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (MycompareSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) MycompareSym1KindInference) ()) - data MycompareSym1 (arg0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 Ordering + type MycompareSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + Mycompare a0123456789876543210 a0123456789876543210 :: Ordering + type (<=>@#@$) :: forall a. (~>) a ((~>) a Ordering) + data (<=>@#@$) a0123456789876543210 where - MycompareSym1KindInference :: forall arg0123456789876543210 - arg0123456789876543210 - arg. SameKind (Apply (MycompareSym1 arg0123456789876543210) arg) (MycompareSym2 arg0123456789876543210 arg) => - MycompareSym1 arg0123456789876543210 arg0123456789876543210 - type instance Apply (MycompareSym1 arg0123456789876543210) arg0123456789876543210 = MycompareSym2 arg0123456789876543210 arg0123456789876543210 - type MycompareSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) = - Mycompare arg0123456789876543210 arg0123456789876543210 + (:<=>@#@$###) :: SameKind (Apply (<=>@#@$) arg) ((<=>@#@$$) arg) => + (<=>@#@$) a0123456789876543210 + type instance Apply (<=>@#@$) a0123456789876543210 = (<=>@#@$$) a0123456789876543210 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 <=>@#@$ - instance SuppressUnusedWarnings ((<=>@#@$$) arg0123456789876543210) where - suppressUnusedWarnings = snd (((,) (:<=>@#@$$###)) ()) - data (<=>@#@$$) (arg0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 Ordering + type (<=>@#@$$) :: forall a. a -> (~>) a Ordering + data (<=>@#@$$) a0123456789876543210 a0123456789876543210 where - (:<=>@#@$$###) :: forall arg0123456789876543210 - arg0123456789876543210 - arg. SameKind (Apply ((<=>@#@$$) arg0123456789876543210) arg) ((<=>@#@$$$) arg0123456789876543210 arg) => - (<=>@#@$$) arg0123456789876543210 arg0123456789876543210 - type instance Apply ((<=>@#@$$) arg0123456789876543210) arg0123456789876543210 = (<=>@#@$$$) arg0123456789876543210 arg0123456789876543210 + (:<=>@#@$$###) :: SameKind (Apply ((<=>@#@$$) a0123456789876543210) arg) ((<=>@#@$$$) a0123456789876543210 arg) => + (<=>@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((<=>@#@$$) a0123456789876543210) a0123456789876543210 = (<=>@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((<=>@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (:<=>@#@$$###)) ()) infix 4 <=>@#@$$ - type (<=>@#@$$$) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) = - (<=>) arg0123456789876543210 arg0123456789876543210 + type (<=>@#@$$$) (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + (<=>) a0123456789876543210 a0123456789876543210 :: Ordering infix 4 <=>@#@$$$ - type family TFHelper_0123456789876543210 (a :: a) (a :: a) :: Ordering where + type TFHelper_0123456789876543210 :: a -> a -> Ordering + type family TFHelper_0123456789876543210 a a where TFHelper_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply MycompareSym0 a_0123456789876543210) a_0123456789876543210 - instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ()) - data TFHelper_0123456789876543210Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) a0123456789876543210 Ordering) + type TFHelper_0123456789876543210Sym0 :: (~>) a ((~>) a Ordering) + data TFHelper_0123456789876543210Sym0 a0123456789876543210 where - TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) => + TFHelper_0123456789876543210Sym0KindInference :: SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) => TFHelper_0123456789876543210Sym0 a0123456789876543210 type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ()) - data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 Ordering + = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ()) + type TFHelper_0123456789876543210Sym1 :: a -> (~>) a Ordering + data TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) => + TFHelper_0123456789876543210Sym1KindInference :: SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) => TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: a0123456789876543210) = - TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ()) + type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering class PMyOrd a 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 + type Mycompare_0123456789876543210 :: Nat -> Nat -> Ordering + type family Mycompare_0123456789876543210 a a 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 - instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ()) - data Mycompare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering) + type Mycompare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering) + data Mycompare_0123456789876543210Sym0 a0123456789876543210 where - Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) => + Mycompare_0123456789876543210Sym0KindInference :: SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) => Mycompare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ()) - data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Nat Ordering + = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ()) + type Mycompare_0123456789876543210Sym1 :: Nat -> (~>) Nat Ordering + data Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) => + Mycompare_0123456789876543210Sym1KindInference :: SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) => Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ()) type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = - Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering instance PMyOrd Nat where type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a - type family Mycompare_0123456789876543210 (a :: ()) (a :: ()) :: Ordering where + type Mycompare_0123456789876543210 :: () -> () -> Ordering + type family Mycompare_0123456789876543210 a a where Mycompare_0123456789876543210 _ a_0123456789876543210 = Apply (Apply ConstSym0 EQSym0) a_0123456789876543210 - instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ()) - data Mycompare_0123456789876543210Sym0 :: (~>) () ((~>) () Ordering) + type Mycompare_0123456789876543210Sym0 :: (~>) () ((~>) () Ordering) + data Mycompare_0123456789876543210Sym0 a0123456789876543210 where - Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) => + Mycompare_0123456789876543210Sym0KindInference :: SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) => Mycompare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ()) - data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: ()) :: (~>) () Ordering + = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ()) + type Mycompare_0123456789876543210Sym1 :: () -> (~>) () Ordering + data Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) => + Mycompare_0123456789876543210Sym1KindInference :: SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) => Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ()) type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: ()) (a0123456789876543210 :: ()) = - Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering instance PMyOrd () where type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a - type family Mycompare_0123456789876543210 (a :: Foo) (a :: Foo) :: Ordering where + type Mycompare_0123456789876543210 :: Foo -> Foo -> Ordering + type family Mycompare_0123456789876543210 a a where Mycompare_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply FooCompareSym0 a_0123456789876543210) a_0123456789876543210 - instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ()) - data Mycompare_0123456789876543210Sym0 :: (~>) Foo ((~>) Foo Ordering) + type Mycompare_0123456789876543210Sym0 :: (~>) Foo ((~>) Foo Ordering) + data Mycompare_0123456789876543210Sym0 a0123456789876543210 where - Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) => + Mycompare_0123456789876543210Sym0KindInference :: SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) => Mycompare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ()) - data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: Foo) :: (~>) Foo Ordering + = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ()) + type Mycompare_0123456789876543210Sym1 :: Foo -> (~>) Foo Ordering + data Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) => + Mycompare_0123456789876543210Sym1KindInference :: SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) => Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ()) type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: Foo) (a0123456789876543210 :: Foo) = - Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering instance PMyOrd Foo where type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a - type family TFHelper_0123456789876543210 (a :: Foo2) (a :: Foo2) :: Bool where + type TFHelper_0123456789876543210 :: Foo2 -> Foo2 -> Bool + type family TFHelper_0123456789876543210 a a where TFHelper_0123456789876543210 F F = TrueSym0 TFHelper_0123456789876543210 G G = TrueSym0 TFHelper_0123456789876543210 F G = FalseSym0 TFHelper_0123456789876543210 G F = FalseSym0 - instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ()) - data TFHelper_0123456789876543210Sym0 :: (~>) Foo2 ((~>) Foo2 Bool) + type TFHelper_0123456789876543210Sym0 :: (~>) Foo2 ((~>) Foo2 Bool) + data TFHelper_0123456789876543210Sym0 a0123456789876543210 where - TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) => + TFHelper_0123456789876543210Sym0KindInference :: SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) => TFHelper_0123456789876543210Sym0 a0123456789876543210 type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ()) - data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: Foo2) :: (~>) Foo2 Bool + = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ()) + type TFHelper_0123456789876543210Sym1 :: Foo2 -> (~>) Foo2 Bool + data TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) => + TFHelper_0123456789876543210Sym1KindInference :: SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) => TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ()) type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: Foo2) (a0123456789876543210 :: Foo2) = - TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210 + TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Bool instance PEq Foo2 where type (==) a a = Apply (Apply TFHelper_0123456789876543210Sym0 a) a infix 4 %<=> @@ -432,58 +425,59 @@ Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations compare F F = EQ compare F _ = LT compare _ _ = GT - type family Mycompare_0123456789876543210 (a :: Foo2) (a :: Foo2) :: Ordering where + type Mycompare_0123456789876543210 :: Foo2 -> Foo2 -> Ordering + type family Mycompare_0123456789876543210 a a where Mycompare_0123456789876543210 'F 'F = EQSym0 Mycompare_0123456789876543210 'F _ = LTSym0 Mycompare_0123456789876543210 _ _ = GTSym0 - instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ()) - data Mycompare_0123456789876543210Sym0 :: (~>) Foo2 ((~>) Foo2 Ordering) + type Mycompare_0123456789876543210Sym0 :: (~>) Foo2 ((~>) Foo2 Ordering) + data Mycompare_0123456789876543210Sym0 a0123456789876543210 where - Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) => + Mycompare_0123456789876543210Sym0KindInference :: SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) => Mycompare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ()) - data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: Foo2) :: (~>) Foo2 Ordering + = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ()) + type Mycompare_0123456789876543210Sym1 :: Foo2 + -> (~>) Foo2 Ordering + data Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) => + Mycompare_0123456789876543210Sym1KindInference :: SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) => Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ()) type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: Foo2) (a0123456789876543210 :: Foo2) = - Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering instance PMyOrd Foo2 where type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a - type family Compare_0123456789876543210 (a :: Foo2) (a :: Foo2) :: Ordering where + type Compare_0123456789876543210 :: Foo2 -> Foo2 -> Ordering + type family Compare_0123456789876543210 a a where Compare_0123456789876543210 'F 'F = EQSym0 Compare_0123456789876543210 'F _ = LTSym0 Compare_0123456789876543210 _ _ = GTSym0 - instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) - data Compare_0123456789876543210Sym0 :: (~>) Foo2 ((~>) Foo2 Ordering) + type Compare_0123456789876543210Sym0 :: (~>) Foo2 ((~>) Foo2 Ordering) + data Compare_0123456789876543210Sym0 a0123456789876543210 where - Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => + Compare_0123456789876543210Sym0KindInference :: SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => Compare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) - data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Foo2) :: (~>) Foo2 Ordering + = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) + type Compare_0123456789876543210Sym1 :: Foo2 -> (~>) Foo2 Ordering + data Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => + Compare_0123456789876543210Sym1KindInference :: SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Foo2) (a0123456789876543210 :: Foo2) = - Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering instance POrd Foo2 where type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations @@ -502,43 +496,44 @@ Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations mycompare Zero' (Succ' _) = LT mycompare (Succ' _) Zero' = GT mycompare (Succ' n) (Succ' m) = (m `mycompare` n) - type Zero'Sym0 = Zero' + type Zero'Sym0 = Zero' :: Nat' + type Succ'Sym0 :: (~>) Nat' Nat' + data Succ'Sym0 a0123456789876543210 + where + Succ'Sym0KindInference :: SameKind (Apply Succ'Sym0 arg) (Succ'Sym1 arg) => + Succ'Sym0 a0123456789876543210 + type instance Apply Succ'Sym0 a0123456789876543210 = Succ'Sym1 a0123456789876543210 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'Sym1 t0123456789876543210 - type Succ'Sym1 (t0123456789876543210 :: Nat') = - Succ' t0123456789876543210 - type family Mycompare_0123456789876543210 (a :: Nat') (a :: Nat') :: Ordering where + type Succ'Sym1 (a0123456789876543210 :: Nat') = + Succ' a0123456789876543210 :: Nat' + type Mycompare_0123456789876543210 :: Nat' -> Nat' -> Ordering + type family Mycompare_0123456789876543210 a a 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 - instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ()) - data Mycompare_0123456789876543210Sym0 :: (~>) Nat' ((~>) Nat' Ordering) + type Mycompare_0123456789876543210Sym0 :: (~>) Nat' ((~>) Nat' Ordering) + data Mycompare_0123456789876543210Sym0 a0123456789876543210 where - Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) => + Mycompare_0123456789876543210Sym0KindInference :: SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) => Mycompare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ()) - data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: Nat') :: (~>) Nat' Ordering + = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ()) + type Mycompare_0123456789876543210Sym1 :: Nat' + -> (~>) Nat' Ordering + data Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) => + Mycompare_0123456789876543210Sym1KindInference :: SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) => Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ()) type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: Nat') (a0123456789876543210 :: Nat') = - Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering instance PMyOrd Nat' where type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a data SNat' :: Nat' -> GHC.Types.Type diff --git a/tests/compile-and-dump/Singletons/Classes2.golden b/tests/compile-and-dump/Singletons/Classes2.golden index cd4bea59..c949cf77 100644 --- a/tests/compile-and-dump/Singletons/Classes2.golden +++ b/tests/compile-and-dump/Singletons/Classes2.golden @@ -14,43 +14,44 @@ Singletons/Classes2.hs:(0,0)-(0,0): Splicing declarations mycompare ZeroFoo (SuccFoo _) = LT mycompare (SuccFoo _) ZeroFoo = GT mycompare (SuccFoo n) (SuccFoo m) = (m `mycompare` n) - type ZeroFooSym0 = ZeroFoo + type ZeroFooSym0 = ZeroFoo :: NatFoo + type SuccFooSym0 :: (~>) NatFoo NatFoo + data SuccFooSym0 a0123456789876543210 + where + SuccFooSym0KindInference :: SameKind (Apply SuccFooSym0 arg) (SuccFooSym1 arg) => + SuccFooSym0 a0123456789876543210 + type instance Apply SuccFooSym0 a0123456789876543210 = SuccFooSym1 a0123456789876543210 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 = SuccFooSym1 t0123456789876543210 - type SuccFooSym1 (t0123456789876543210 :: NatFoo) = - SuccFoo t0123456789876543210 - type family Mycompare_0123456789876543210 (a :: NatFoo) (a :: NatFoo) :: Ordering where + type SuccFooSym1 (a0123456789876543210 :: NatFoo) = + SuccFoo a0123456789876543210 :: NatFoo + type Mycompare_0123456789876543210 :: NatFoo -> NatFoo -> Ordering + type family Mycompare_0123456789876543210 a a 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 - instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ()) - data Mycompare_0123456789876543210Sym0 :: (~>) NatFoo ((~>) NatFoo Ordering) + type Mycompare_0123456789876543210Sym0 :: (~>) NatFoo ((~>) NatFoo Ordering) + data Mycompare_0123456789876543210Sym0 a0123456789876543210 where - Mycompare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) => + Mycompare_0123456789876543210Sym0KindInference :: SameKind (Apply Mycompare_0123456789876543210Sym0 arg) (Mycompare_0123456789876543210Sym1 arg) => Mycompare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Mycompare_0123456789876543210Sym0 a0123456789876543210 = Mycompare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Mycompare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ()) - data Mycompare_0123456789876543210Sym1 (a0123456789876543210 :: NatFoo) :: (~>) NatFoo Ordering + = snd (((,) Mycompare_0123456789876543210Sym0KindInference) ()) + type Mycompare_0123456789876543210Sym1 :: NatFoo + -> (~>) NatFoo Ordering + data Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Mycompare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) => + Mycompare_0123456789876543210Sym1KindInference :: SameKind (Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) arg) (Mycompare_0123456789876543210Sym2 a0123456789876543210 arg) => Mycompare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Mycompare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Mycompare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Mycompare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Mycompare_0123456789876543210Sym1KindInference) ()) type Mycompare_0123456789876543210Sym2 (a0123456789876543210 :: NatFoo) (a0123456789876543210 :: NatFoo) = - Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Mycompare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering instance PMyOrd NatFoo where type Mycompare a a = Apply (Apply Mycompare_0123456789876543210Sym0 a) a data SNatFoo :: NatFoo -> GHC.Types.Type diff --git a/tests/compile-and-dump/Singletons/Contains.golden b/tests/compile-and-dump/Singletons/Contains.golden index eecbe254..a11449c2 100644 --- a/tests/compile-and-dump/Singletons/Contains.golden +++ b/tests/compile-and-dump/Singletons/Contains.golden @@ -7,27 +7,26 @@ Singletons/Contains.hs:(0,0)-(0,0): Splicing declarations contains :: Eq a => a -> [a] -> Bool contains _ [] = False contains elt (h : t) = ((elt == h) || (contains elt) t) - instance SuppressUnusedWarnings ContainsSym0 where - suppressUnusedWarnings = snd (((,) ContainsSym0KindInference) ()) - data ContainsSym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) [a0123456789876543210] Bool) + type ContainsSym0 :: (~>) a ((~>) [a] Bool) + data ContainsSym0 a0123456789876543210 where - ContainsSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ContainsSym0 arg) (ContainsSym1 arg) => + ContainsSym0KindInference :: SameKind (Apply ContainsSym0 arg) (ContainsSym1 arg) => ContainsSym0 a0123456789876543210 type instance Apply ContainsSym0 a0123456789876543210 = ContainsSym1 a0123456789876543210 - instance SuppressUnusedWarnings (ContainsSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) ContainsSym1KindInference) ()) - data ContainsSym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) [a0123456789876543210] Bool + instance SuppressUnusedWarnings ContainsSym0 where + suppressUnusedWarnings = snd (((,) ContainsSym0KindInference) ()) + type ContainsSym1 :: a -> (~>) [a] Bool + data ContainsSym1 a0123456789876543210 a0123456789876543210 where - ContainsSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ContainsSym1 a0123456789876543210) arg) (ContainsSym2 a0123456789876543210 arg) => + ContainsSym1KindInference :: SameKind (Apply (ContainsSym1 a0123456789876543210) arg) (ContainsSym2 a0123456789876543210 arg) => ContainsSym1 a0123456789876543210 a0123456789876543210 type instance Apply (ContainsSym1 a0123456789876543210) a0123456789876543210 = ContainsSym2 a0123456789876543210 a0123456789876543210 - type ContainsSym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: [a0123456789876543210]) = - Contains a0123456789876543210 a0123456789876543210 - type family Contains (a :: a) (a :: [a]) :: Bool where + instance SuppressUnusedWarnings (ContainsSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) ContainsSym1KindInference) ()) + type ContainsSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: [a]) = + Contains a0123456789876543210 a0123456789876543210 :: Bool + type Contains :: a -> [a] -> Bool + type family Contains a a where Contains _ '[] = FalseSym0 Contains elt ('(:) h t) = Apply (Apply (||@#@$) (Apply (Apply (==@#@$) elt) h)) (Apply (Apply ContainsSym0 elt) t) sContains :: diff --git a/tests/compile-and-dump/Singletons/DataValues.golden b/tests/compile-and-dump/Singletons/DataValues.golden index d16b230f..e62df9dd 100644 --- a/tests/compile-and-dump/Singletons/DataValues.golden +++ b/tests/compile-and-dump/Singletons/DataValues.golden @@ -16,27 +16,24 @@ Singletons/DataValues.hs:(0,0)-(0,0): Splicing declarations complex = (Pair ((Pair (Just Zero)) Zero)) False tuple = (False, Just Zero, True) aList = [Zero, Succ Zero, Succ (Succ Zero)] + type PairSym0 :: forall a b. (~>) a ((~>) b (Pair a b)) + data PairSym0 a0123456789876543210 + where + PairSym0KindInference :: SameKind (Apply PairSym0 arg) (PairSym1 arg) => + PairSym0 a0123456789876543210 + type instance Apply PairSym0 a0123456789876543210 = PairSym1 a0123456789876543210 instance SuppressUnusedWarnings PairSym0 where suppressUnusedWarnings = snd (((,) PairSym0KindInference) ()) - data PairSym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210)) + type PairSym1 :: forall a b. a -> (~>) b (Pair a b) + data PairSym1 a0123456789876543210 a0123456789876543210 where - PairSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply PairSym0 arg) (PairSym1 arg) => - PairSym0 t0123456789876543210 - type instance Apply PairSym0 t0123456789876543210 = PairSym1 t0123456789876543210 - instance SuppressUnusedWarnings (PairSym1 t0123456789876543210) where + PairSym1KindInference :: SameKind (Apply (PairSym1 a0123456789876543210) arg) (PairSym2 a0123456789876543210 arg) => + PairSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (PairSym1 a0123456789876543210) a0123456789876543210 = PairSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (PairSym1 a0123456789876543210) 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 = PairSym2 t0123456789876543210 t0123456789876543210 - type PairSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) = - Pair t0123456789876543210 t0123456789876543210 + type PairSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Pair a0123456789876543210 a0123456789876543210 :: Pair a b type AListSym0 = AList type TupleSym0 = Tuple type ComplexSym0 = Complex @@ -49,44 +46,41 @@ Singletons/DataValues.hs:(0,0)-(0,0): Splicing declarations 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) NilSym0) - type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Pair a b) (a :: Symbol) :: Symbol where + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> Pair a b -> Symbol -> Symbol + type family ShowsPrec_0123456789876543210 a a a 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 - instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) - data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210 - b0123456789876543210. - (~>) GHC.Types.Nat ((~>) (Pair a0123456789876543210 b0123456789876543210) ((~>) Symbol Symbol)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) (Pair a b) ((~>) Symbol Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210 - b0123456789876543210. - (~>) (Pair a0123456789876543210 b0123456789876543210) ((~>) Symbol Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) (Pair a b) ((~>) Symbol Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Pair a0123456789876543210 b0123456789876543210) :: (~>) Symbol Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> Pair a b -> (~>) Symbol Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 - 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) ()) + type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Pair a b) (a0123456789876543210 :: Symbol) = + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Symbol instance PShow (Pair a b) where type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a sAList :: Sing AListSym0 diff --git a/tests/compile-and-dump/Singletons/EmptyShowDeriving.golden b/tests/compile-and-dump/Singletons/EmptyShowDeriving.golden index f34c1ce1..8245bc26 100644 --- a/tests/compile-and-dump/Singletons/EmptyShowDeriving.golden +++ b/tests/compile-and-dump/Singletons/EmptyShowDeriving.golden @@ -7,40 +7,41 @@ Singletons/EmptyShowDeriving.hs:(0,0)-(0,0): Splicing declarations 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 + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> Foo -> GHC.Types.Symbol -> GHC.Types.Symbol + type family ShowsPrec_0123456789876543210 a a a where ShowsPrec_0123456789876543210 _ v_0123456789876543210 a_0123456789876543210 = Apply (Case_0123456789876543210 v_0123456789876543210 a_0123456789876543210 v_0123456789876543210) a_0123456789876543210 - instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) - data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Foo ((~>) GHC.Types.Symbol GHC.Types.Symbol)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Foo ((~>) GHC.Types.Symbol GHC.Types.Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Foo ((~>) GHC.Types.Symbol GHC.Types.Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) Foo ((~>) GHC.Types.Symbol GHC.Types.Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo) :: (~>) GHC.Types.Symbol GHC.Types.Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> Foo -> (~>) GHC.Types.Symbol GHC.Types.Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo) (a0123456789876543210 :: GHC.Types.Symbol) = - ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: GHC.Types.Symbol instance PShow Foo where type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a data SFoo :: Foo -> GHC.Types.Type diff --git a/tests/compile-and-dump/Singletons/EnumDeriving.golden b/tests/compile-and-dump/Singletons/EnumDeriving.golden index b4ae5261..6a6adc4c 100644 --- a/tests/compile-and-dump/Singletons/EnumDeriving.golden +++ b/tests/compile-and-dump/Singletons/EnumDeriving.golden @@ -9,11 +9,11 @@ Singletons/EnumDeriving.hs:(0,0)-(0,0): Splicing declarations = 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 BarSym0 = Bar :: Foo + type BazSym0 = Baz :: Foo + type BumSym0 = Bum :: Foo + type Q1Sym0 = Q1 :: Quux + type Q2Sym0 = Q2 :: Quux type family Case_0123456789876543210 n t where Case_0123456789876543210 n 'True = BumSym0 Case_0123456789876543210 n 'False = Apply ErrorSym0 "toEnum: bad argument" @@ -23,34 +23,36 @@ Singletons/EnumDeriving.hs:(0,0)-(0,0): Splicing declarations 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 + type ToEnum_0123456789876543210 :: GHC.Types.Nat -> Foo + type family ToEnum_0123456789876543210 a where ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0)) - instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ()) - data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat Foo + type ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat Foo + data ToEnum_0123456789876543210Sym0 a0123456789876543210 where - ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) => + ToEnum_0123456789876543210Sym0KindInference :: SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) => ToEnum_0123456789876543210Sym0 a0123456789876543210 type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ()) type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) = - ToEnum_0123456789876543210 a0123456789876543210 - type family FromEnum_0123456789876543210 (a :: Foo) :: GHC.Types.Nat where + ToEnum_0123456789876543210 a0123456789876543210 :: Foo + type FromEnum_0123456789876543210 :: Foo -> GHC.Types.Nat + type family FromEnum_0123456789876543210 a 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 - instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ()) - data FromEnum_0123456789876543210Sym0 :: (~>) Foo GHC.Types.Nat + type FromEnum_0123456789876543210Sym0 :: (~>) Foo GHC.Types.Nat + data FromEnum_0123456789876543210Sym0 a0123456789876543210 where - FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) => + FromEnum_0123456789876543210Sym0KindInference :: SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) => FromEnum_0123456789876543210Sym0 a0123456789876543210 type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ()) type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: Foo) = - FromEnum_0123456789876543210 a0123456789876543210 + FromEnum_0123456789876543210 a0123456789876543210 :: GHC.Types.Nat instance PEnum Foo where type ToEnum a = Apply ToEnum_0123456789876543210Sym0 a type FromEnum a = Apply FromEnum_0123456789876543210Sym0 a @@ -140,33 +142,35 @@ Singletons/EnumDeriving.hs:0:0:: Splicing declarations 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 + type ToEnum_0123456789876543210 :: GHC.Types.Nat -> Quux + type family ToEnum_0123456789876543210 a where ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0)) - instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ()) - data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat Quux + type ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat Quux + data ToEnum_0123456789876543210Sym0 a0123456789876543210 where - ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) => + ToEnum_0123456789876543210Sym0KindInference :: SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) => ToEnum_0123456789876543210Sym0 a0123456789876543210 type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ()) type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) = - ToEnum_0123456789876543210 a0123456789876543210 - type family FromEnum_0123456789876543210 (a :: Quux) :: GHC.Types.Nat where + ToEnum_0123456789876543210 a0123456789876543210 :: Quux + type FromEnum_0123456789876543210 :: Quux -> GHC.Types.Nat + type family FromEnum_0123456789876543210 a where FromEnum_0123456789876543210 'Q1 = Data.Singletons.Prelude.Num.FromInteger 0 FromEnum_0123456789876543210 'Q2 = Data.Singletons.Prelude.Num.FromInteger 1 - instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ()) - data FromEnum_0123456789876543210Sym0 :: (~>) Quux GHC.Types.Nat + type FromEnum_0123456789876543210Sym0 :: (~>) Quux GHC.Types.Nat + data FromEnum_0123456789876543210Sym0 a0123456789876543210 where - FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) => + FromEnum_0123456789876543210Sym0KindInference :: SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) => FromEnum_0123456789876543210Sym0 a0123456789876543210 type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ()) type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: Quux) = - FromEnum_0123456789876543210 a0123456789876543210 + FromEnum_0123456789876543210 a0123456789876543210 :: GHC.Types.Nat instance PEnum Quux where type ToEnum a = Apply ToEnum_0123456789876543210Sym0 a type FromEnum a = Apply FromEnum_0123456789876543210Sym0 a diff --git a/tests/compile-and-dump/Singletons/EqInstances.golden b/tests/compile-and-dump/Singletons/EqInstances.golden index 8829b322..6f47635e 100644 --- a/tests/compile-and-dump/Singletons/EqInstances.golden +++ b/tests/compile-and-dump/Singletons/EqInstances.golden @@ -7,7 +7,8 @@ Singletons/EqInstances.hs:0:0:: Splicing declarations (%==) ((:%+:) _ _) SFLeaf = SFalse (%==) ((:%+:) a a) ((:%+:) b b) = ((%&&) (((%==) a) b)) (((%==) a) b) - type family Equals_0123456789876543210 (a :: Foo) (b :: Foo) :: Bool where + type Equals_0123456789876543210 :: Foo -> Foo -> Bool + type family Equals_0123456789876543210 a b where Equals_0123456789876543210 'FLeaf 'FLeaf = TrueSym0 Equals_0123456789876543210 ('(:+:) a a) ('(:+:) b b) = (&&) ((==) a b) ((==) a b) Equals_0123456789876543210 (_ :: Foo) (_ :: Foo) = FalseSym0 @@ -15,7 +16,8 @@ Singletons/EqInstances.hs:0:0:: Splicing declarations type (==) a b = Equals_0123456789876543210 a b instance SEq Empty where (%==) _ _ = STrue - type family Equals_0123456789876543210 (a :: Empty) (b :: Empty) :: Bool where + type Equals_0123456789876543210 :: Empty -> Empty -> Bool + type family Equals_0123456789876543210 a b 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.golden b/tests/compile-and-dump/Singletons/Error.golden index ab79e75e..3e512cf3 100644 --- a/tests/compile-and-dump/Singletons/Error.golden +++ b/tests/compile-and-dump/Singletons/Error.golden @@ -7,18 +7,18 @@ Singletons/Error.hs:(0,0)-(0,0): Splicing declarations head :: [a] -> a head (a : _) = a head [] = error "Data.Singletons.List.head: empty list" - instance SuppressUnusedWarnings HeadSym0 where - suppressUnusedWarnings = snd (((,) HeadSym0KindInference) ()) - data HeadSym0 :: forall a0123456789876543210. - (~>) [a0123456789876543210] a0123456789876543210 + type HeadSym0 :: (~>) [a] a + data HeadSym0 a0123456789876543210 where - HeadSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply HeadSym0 arg) (HeadSym1 arg) => + HeadSym0KindInference :: SameKind (Apply HeadSym0 arg) (HeadSym1 arg) => HeadSym0 a0123456789876543210 type instance Apply HeadSym0 a0123456789876543210 = HeadSym1 a0123456789876543210 - type HeadSym1 (a0123456789876543210 :: [a0123456789876543210]) = - Head a0123456789876543210 - type family Head (a :: [a]) :: a where + instance SuppressUnusedWarnings HeadSym0 where + suppressUnusedWarnings = snd (((,) HeadSym0KindInference) ()) + type HeadSym1 (a0123456789876543210 :: [a]) = + Head a0123456789876543210 :: a + type Head :: [a] -> a + type family Head a where Head ('(:) a _) = a Head '[] = Apply ErrorSym0 "Data.Singletons.List.head: empty list" sHead :: diff --git a/tests/compile-and-dump/Singletons/Fixity.golden b/tests/compile-and-dump/Singletons/Fixity.golden index d4be1ecb..02272dca 100644 --- a/tests/compile-and-dump/Singletons/Fixity.golden +++ b/tests/compile-and-dump/Singletons/Fixity.golden @@ -16,53 +16,50 @@ Singletons/Fixity.hs:(0,0)-(0,0): Splicing declarations (====) :: a -> a -> a (====) a _ = a infix 4 ==== - instance SuppressUnusedWarnings (====@#@$) where - suppressUnusedWarnings = snd (((,) (:====@#@$###)) ()) - data (====@#@$) :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) a0123456789876543210 a0123456789876543210) + type (====@#@$) :: (~>) a ((~>) a a) + data (====@#@$) a0123456789876543210 where - (:====@#@$###) :: forall a0123456789876543210 - arg. SameKind (Apply (====@#@$) arg) ((====@#@$$) arg) => + (:====@#@$###) :: SameKind (Apply (====@#@$) arg) ((====@#@$$) arg) => (====@#@$) a0123456789876543210 type instance Apply (====@#@$) a0123456789876543210 = (====@#@$$) a0123456789876543210 + instance SuppressUnusedWarnings (====@#@$) where + suppressUnusedWarnings = snd (((,) (:====@#@$###)) ()) infix 4 ====@#@$ - instance SuppressUnusedWarnings ((====@#@$$) a0123456789876543210) where - suppressUnusedWarnings = snd (((,) (:====@#@$$###)) ()) - data (====@#@$$) (a0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 a0123456789876543210 + type (====@#@$$) :: a -> (~>) a a + data (====@#@$$) a0123456789876543210 a0123456789876543210 where - (:====@#@$$###) :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply ((====@#@$$) a0123456789876543210) arg) ((====@#@$$$) a0123456789876543210 arg) => + (:====@#@$$###) :: SameKind (Apply ((====@#@$$) a0123456789876543210) arg) ((====@#@$$$) a0123456789876543210 arg) => (====@#@$$) a0123456789876543210 a0123456789876543210 type instance Apply ((====@#@$$) a0123456789876543210) a0123456789876543210 = (====@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((====@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (:====@#@$$###)) ()) infix 4 ====@#@$$ - type (====@#@$$$) (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: a0123456789876543210) = - (====) a0123456789876543210 a0123456789876543210 + type (====@#@$$$) (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + (====) a0123456789876543210 a0123456789876543210 :: a infix 4 ====@#@$$$ - type family (====) (a :: a) (a :: a) :: a where + type (====) :: a -> a -> a + type family (====) a a where (====) a _ = a + type (<=>@#@$) :: forall a. (~>) a ((~>) a Ordering) + data (<=>@#@$) a0123456789876543210 + where + (:<=>@#@$###) :: SameKind (Apply (<=>@#@$) arg) ((<=>@#@$$) arg) => + (<=>@#@$) a0123456789876543210 + type instance Apply (<=>@#@$) a0123456789876543210 = (<=>@#@$$) a0123456789876543210 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 <=>@#@$ - instance SuppressUnusedWarnings ((<=>@#@$$) arg0123456789876543210) where - suppressUnusedWarnings = snd (((,) (:<=>@#@$$###)) ()) - data (<=>@#@$$) (arg0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 Ordering + type (<=>@#@$$) :: forall a. a -> (~>) a Ordering + data (<=>@#@$$) a0123456789876543210 a0123456789876543210 where - (:<=>@#@$$###) :: forall arg0123456789876543210 - arg0123456789876543210 - arg. SameKind (Apply ((<=>@#@$$) arg0123456789876543210) arg) ((<=>@#@$$$) arg0123456789876543210 arg) => - (<=>@#@$$) arg0123456789876543210 arg0123456789876543210 - type instance Apply ((<=>@#@$$) arg0123456789876543210) arg0123456789876543210 = (<=>@#@$$$) arg0123456789876543210 arg0123456789876543210 + (:<=>@#@$$###) :: SameKind (Apply ((<=>@#@$$) a0123456789876543210) arg) ((<=>@#@$$$) a0123456789876543210 arg) => + (<=>@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((<=>@#@$$) a0123456789876543210) a0123456789876543210 = (<=>@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((<=>@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (:<=>@#@$$###)) ()) infix 4 <=>@#@$$ - type (<=>@#@$$$) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) = - (<=>) arg0123456789876543210 arg0123456789876543210 + type (<=>@#@$$$) (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + (<=>) a0123456789876543210 a0123456789876543210 :: Ordering infix 4 <=>@#@$$$ class PMyOrd a where type (<=>) (arg :: a) (arg :: a) :: Ordering diff --git a/tests/compile-and-dump/Singletons/FunDeps.golden b/tests/compile-and-dump/Singletons/FunDeps.golden index a09b68be..1a887c19 100644 --- a/tests/compile-and-dump/Singletons/FunDeps.golden +++ b/tests/compile-and-dump/Singletons/FunDeps.golden @@ -22,58 +22,58 @@ Singletons/FunDeps.hs:(0,0)-(0,0): Splicing declarations type T1Sym0 = T1 type family T1 where T1 = Apply MethSym0 TrueSym0 + type MethSym0 :: forall a. (~>) a a + data MethSym0 a0123456789876543210 + where + MethSym0KindInference :: SameKind (Apply MethSym0 arg) (MethSym1 arg) => + MethSym0 a0123456789876543210 + type instance Apply MethSym0 a0123456789876543210 = MethSym1 a0123456789876543210 instance SuppressUnusedWarnings MethSym0 where suppressUnusedWarnings = snd (((,) MethSym0KindInference) ()) - data MethSym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 a0123456789876543210 + type MethSym1 (a0123456789876543210 :: a) = + Meth a0123456789876543210 :: a + type L2rSym0 :: forall a b. (~>) a b + data L2rSym0 a0123456789876543210 where - MethSym0KindInference :: forall arg0123456789876543210 - arg. SameKind (Apply MethSym0 arg) (MethSym1 arg) => - MethSym0 arg0123456789876543210 - type instance Apply MethSym0 arg0123456789876543210 = MethSym1 arg0123456789876543210 - type MethSym1 (arg0123456789876543210 :: a0123456789876543210) = - Meth arg0123456789876543210 + L2rSym0KindInference :: SameKind (Apply L2rSym0 arg) (L2rSym1 arg) => + L2rSym0 a0123456789876543210 + type instance Apply L2rSym0 a0123456789876543210 = L2rSym1 a0123456789876543210 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 = L2rSym1 arg0123456789876543210 - type L2rSym1 (arg0123456789876543210 :: a0123456789876543210) = - L2r arg0123456789876543210 + type L2rSym1 (a0123456789876543210 :: a) = + L2r a0123456789876543210 :: b class PFD a b | a -> b where type Meth (arg :: a) :: a type L2r (arg :: a) :: b - type family Meth_0123456789876543210 (a :: Bool) :: Bool where + type Meth_0123456789876543210 :: Bool -> Bool + type family Meth_0123456789876543210 a where Meth_0123456789876543210 a_0123456789876543210 = Apply NotSym0 a_0123456789876543210 - instance SuppressUnusedWarnings Meth_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Meth_0123456789876543210Sym0KindInference) ()) - data Meth_0123456789876543210Sym0 :: (~>) Bool Bool + type Meth_0123456789876543210Sym0 :: (~>) Bool Bool + data Meth_0123456789876543210Sym0 a0123456789876543210 where - Meth_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Meth_0123456789876543210Sym0 arg) (Meth_0123456789876543210Sym1 arg) => + Meth_0123456789876543210Sym0KindInference :: SameKind (Apply Meth_0123456789876543210Sym0 arg) (Meth_0123456789876543210Sym1 arg) => Meth_0123456789876543210Sym0 a0123456789876543210 type instance Apply Meth_0123456789876543210Sym0 a0123456789876543210 = Meth_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Meth_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) Meth_0123456789876543210Sym0KindInference) ()) type Meth_0123456789876543210Sym1 (a0123456789876543210 :: Bool) = - Meth_0123456789876543210 a0123456789876543210 - type family L2r_0123456789876543210 (a :: Bool) :: Nat where + Meth_0123456789876543210 a0123456789876543210 :: Bool + type L2r_0123456789876543210 :: Bool -> Nat + type family L2r_0123456789876543210 a where L2r_0123456789876543210 'False = FromInteger 0 L2r_0123456789876543210 'True = FromInteger 1 - instance SuppressUnusedWarnings L2r_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) L2r_0123456789876543210Sym0KindInference) ()) - data L2r_0123456789876543210Sym0 :: (~>) Bool Nat + type L2r_0123456789876543210Sym0 :: (~>) Bool Nat + data L2r_0123456789876543210Sym0 a0123456789876543210 where - L2r_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply L2r_0123456789876543210Sym0 arg) (L2r_0123456789876543210Sym1 arg) => + L2r_0123456789876543210Sym0KindInference :: SameKind (Apply L2r_0123456789876543210Sym0 arg) (L2r_0123456789876543210Sym1 arg) => L2r_0123456789876543210Sym0 a0123456789876543210 type instance Apply L2r_0123456789876543210Sym0 a0123456789876543210 = L2r_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings L2r_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) L2r_0123456789876543210Sym0KindInference) ()) type L2r_0123456789876543210Sym1 (a0123456789876543210 :: Bool) = - L2r_0123456789876543210 a0123456789876543210 + L2r_0123456789876543210 a0123456789876543210 :: Nat instance PFD Bool Nat where type Meth a = Apply Meth_0123456789876543210Sym0 a type L2r a = Apply L2r_0123456789876543210Sym0 a diff --git a/tests/compile-and-dump/Singletons/FunctorLikeDeriving.golden b/tests/compile-and-dump/Singletons/FunctorLikeDeriving.golden index 857db247..16555daf 100644 --- a/tests/compile-and-dump/Singletons/FunctorLikeDeriving.golden +++ b/tests/compile-and-dump/Singletons/FunctorLikeDeriving.golden @@ -9,1235 +9,926 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations = MkT1 x a (Maybe a) (Maybe (Maybe a)) | MkT2 (Maybe x) deriving (Functor, Foldable, Traversable) data Empty (a :: Type) deriving (Functor, Foldable, Traversable) + type MkT1Sym0 :: forall x a. + (~>) x ((~>) a ((~>) (Maybe a) ((~>) (Maybe (Maybe a)) (T x a)))) + data MkT1Sym0 a0123456789876543210 + where + MkT1Sym0KindInference :: SameKind (Apply MkT1Sym0 arg) (MkT1Sym1 arg) => + MkT1Sym0 a0123456789876543210 + type instance Apply MkT1Sym0 a0123456789876543210 = MkT1Sym1 a0123456789876543210 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 - instance SuppressUnusedWarnings (MkT1Sym1 t0123456789876543210) where + type MkT1Sym1 :: forall x a. + x -> (~>) a ((~>) (Maybe a) ((~>) (Maybe (Maybe a)) (T x a))) + data MkT1Sym1 a0123456789876543210 a0123456789876543210 + where + MkT1Sym1KindInference :: SameKind (Apply (MkT1Sym1 a0123456789876543210) arg) (MkT1Sym2 a0123456789876543210 arg) => + MkT1Sym1 a0123456789876543210 a0123456789876543210 + type instance Apply (MkT1Sym1 a0123456789876543210) a0123456789876543210 = MkT1Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (MkT1Sym1 a0123456789876543210) 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 (MkT1Sym2 t0123456789876543210 t0123456789876543210) where + type MkT1Sym2 :: forall x a. + x -> a -> (~>) (Maybe a) ((~>) (Maybe (Maybe a)) (T x a)) + data MkT1Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 + where + MkT1Sym2KindInference :: SameKind (Apply (MkT1Sym2 a0123456789876543210 a0123456789876543210) arg) (MkT1Sym3 a0123456789876543210 a0123456789876543210 arg) => + MkT1Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (MkT1Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = MkT1Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (MkT1Sym2 a0123456789876543210 a0123456789876543210) 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 (MkT1Sym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where + type MkT1Sym3 :: forall x a. + x -> a -> Maybe a -> (~>) (Maybe (Maybe a)) (T x a) + data MkT1Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + where + MkT1Sym3KindInference :: SameKind (Apply (MkT1Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) arg) (MkT1Sym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 arg) => + MkT1Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (MkT1Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) a0123456789876543210 = MkT1Sym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (MkT1Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) 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 = MkT1Sym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 - type MkT1Sym4 (t0123456789876543210 :: x0123456789876543210) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: Maybe a0123456789876543210) (t0123456789876543210 :: Maybe (Maybe a0123456789876543210)) = - MkT1 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 + type MkT1Sym4 (a0123456789876543210 :: x) (a0123456789876543210 :: a) (a0123456789876543210 :: Maybe a) (a0123456789876543210 :: Maybe (Maybe a)) = + MkT1 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: T x a + type MkT2Sym0 :: forall x a. (~>) (Maybe x) (T x a) + data MkT2Sym0 a0123456789876543210 + where + MkT2Sym0KindInference :: SameKind (Apply MkT2Sym0 arg) (MkT2Sym1 arg) => + MkT2Sym0 a0123456789876543210 + type instance Apply MkT2Sym0 a0123456789876543210 = MkT2Sym1 a0123456789876543210 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 = MkT2Sym1 t0123456789876543210 - type MkT2Sym1 (t0123456789876543210 :: Maybe x0123456789876543210) = - MkT2 t0123456789876543210 + type MkT2Sym1 (a0123456789876543210 :: Maybe x) = + MkT2 a0123456789876543210 :: T x a type family Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 where Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: 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 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) 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_0123456789876543210Sym3KindInference :: 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 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) 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_0123456789876543210Sym4KindInference :: 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 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) data Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym5KindInference :: forall _f_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n_01234567898765432100123456789876543210 - 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_0123456789876543210Sym5KindInference :: 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 n_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) type Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 type family Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 n_0123456789876543210 where Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - type family Fmap_0123456789876543210 (a :: (~>) a b) (a :: T x a) :: T x b where + type Fmap_0123456789876543210 :: (~>) a b -> T x a -> T x b + type family Fmap_0123456789876543210 a a 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) - instance SuppressUnusedWarnings Fmap_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Fmap_0123456789876543210Sym0KindInference) ()) - data Fmap_0123456789876543210Sym0 :: forall a0123456789876543210 - b0123456789876543210 - x0123456789876543210. - (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) (T x0123456789876543210 a0123456789876543210) (T x0123456789876543210 b0123456789876543210)) + type Fmap_0123456789876543210Sym0 :: (~>) ((~>) a b) ((~>) (T x a) (T x b)) + data Fmap_0123456789876543210Sym0 a0123456789876543210 where - Fmap_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Fmap_0123456789876543210Sym0 arg) (Fmap_0123456789876543210Sym1 arg) => + Fmap_0123456789876543210Sym0KindInference :: SameKind (Apply Fmap_0123456789876543210Sym0 arg) (Fmap_0123456789876543210Sym1 arg) => Fmap_0123456789876543210Sym0 a0123456789876543210 type instance Apply Fmap_0123456789876543210Sym0 a0123456789876543210 = Fmap_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Fmap_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Fmap_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Fmap_0123456789876543210Sym1KindInference) ()) - data Fmap_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: forall x0123456789876543210. - (~>) (T x0123456789876543210 a0123456789876543210) (T x0123456789876543210 b0123456789876543210) + = snd (((,) Fmap_0123456789876543210Sym0KindInference) ()) + type Fmap_0123456789876543210Sym1 :: (~>) a b + -> (~>) (T x a) (T x b) + data Fmap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Fmap_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Fmap_0123456789876543210Sym1 a0123456789876543210) arg) (Fmap_0123456789876543210Sym2 a0123456789876543210 arg) => + Fmap_0123456789876543210Sym1KindInference :: SameKind (Apply (Fmap_0123456789876543210Sym1 a0123456789876543210) arg) (Fmap_0123456789876543210Sym2 a0123456789876543210 arg) => Fmap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Fmap_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Fmap_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - type Fmap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: T x0123456789876543210 a0123456789876543210) = - Fmap_0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Fmap_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Fmap_0123456789876543210Sym1KindInference) ()) + type Fmap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a b) (a0123456789876543210 :: T x a) = + Fmap_0123456789876543210 a0123456789876543210 a0123456789876543210 :: T x b type family Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 where Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: 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 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) 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_0123456789876543210Sym3KindInference :: 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 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) 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_0123456789876543210Sym4KindInference :: 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 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) data Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym5KindInference :: forall _z_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n_01234567898765432100123456789876543210 - 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_0123456789876543210Sym5KindInference :: 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 n_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) type Lambda_0123456789876543210Sym6 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 type family Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 where Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = _z_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: 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 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) 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_0123456789876543210Sym3KindInference :: 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 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) 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_0123456789876543210Sym4KindInference :: 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 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) data Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym5KindInference :: forall _z_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n_01234567898765432100123456789876543210 - 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_0123456789876543210Sym5KindInference :: 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 n_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) type Lambda_0123456789876543210Sym6 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 type family Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 n_0123456789876543210 where Lambda_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = n_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _z_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall _z_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - type family TFHelper_0123456789876543210 (a :: a) (a :: T x b) :: T x a where + type TFHelper_0123456789876543210 :: a -> T x b -> T x a + type family TFHelper_0123456789876543210 a 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) - instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ()) - data TFHelper_0123456789876543210Sym0 :: forall a0123456789876543210 - x0123456789876543210 - b0123456789876543210. - (~>) a0123456789876543210 ((~>) (T x0123456789876543210 b0123456789876543210) (T x0123456789876543210 a0123456789876543210)) + type TFHelper_0123456789876543210Sym0 :: (~>) a ((~>) (T x b) (T x a)) + data TFHelper_0123456789876543210Sym0 a0123456789876543210 where - TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) => + TFHelper_0123456789876543210Sym0KindInference :: SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) => TFHelper_0123456789876543210Sym0 a0123456789876543210 type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ()) - data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall x0123456789876543210 - b0123456789876543210. - (~>) (T x0123456789876543210 b0123456789876543210) (T x0123456789876543210 a0123456789876543210) + = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ()) + type TFHelper_0123456789876543210Sym1 :: a -> (~>) (T x b) (T x a) + data TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) => + TFHelper_0123456789876543210Sym1KindInference :: SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) => TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: T x0123456789876543210 b0123456789876543210) = - TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ()) + type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: T x b) = + TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210 :: T x a 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 n_0123456789876543210 where Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = MemptySym0 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: 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 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) 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_0123456789876543210Sym3KindInference :: 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 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) 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_0123456789876543210Sym4KindInference :: 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 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) data Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym5KindInference :: forall _f_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n_01234567898765432100123456789876543210 - 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_0123456789876543210Sym5KindInference :: 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 n_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) type Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 type family Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 n_0123456789876543210 where Lambda_0123456789876543210 _f_0123456789876543210 a_0123456789876543210 n_0123456789876543210 = MemptySym0 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall _f_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 = Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n_01234567898765432100123456789876543210 - type family FoldMap_0123456789876543210 (a :: (~>) a m) (a :: T x a) :: m where + type FoldMap_0123456789876543210 :: (~>) a m -> T x a -> m + type family FoldMap_0123456789876543210 a a 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 - instance SuppressUnusedWarnings FoldMap_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) FoldMap_0123456789876543210Sym0KindInference) ()) - data FoldMap_0123456789876543210Sym0 :: forall a0123456789876543210 - m0123456789876543210 - x0123456789876543210. - (~>) ((~>) a0123456789876543210 m0123456789876543210) ((~>) (T x0123456789876543210 a0123456789876543210) m0123456789876543210) + type FoldMap_0123456789876543210Sym0 :: (~>) ((~>) a m) ((~>) (T x a) m) + data FoldMap_0123456789876543210Sym0 a0123456789876543210 where - FoldMap_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FoldMap_0123456789876543210Sym0 arg) (FoldMap_0123456789876543210Sym1 arg) => + FoldMap_0123456789876543210Sym0KindInference :: SameKind (Apply FoldMap_0123456789876543210Sym0 arg) (FoldMap_0123456789876543210Sym1 arg) => FoldMap_0123456789876543210Sym0 a0123456789876543210 type instance Apply FoldMap_0123456789876543210Sym0 a0123456789876543210 = FoldMap_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (FoldMap_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings FoldMap_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) FoldMap_0123456789876543210Sym1KindInference) ()) - data FoldMap_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 m0123456789876543210) :: forall x0123456789876543210. - (~>) (T x0123456789876543210 a0123456789876543210) m0123456789876543210 + = snd (((,) FoldMap_0123456789876543210Sym0KindInference) ()) + type FoldMap_0123456789876543210Sym1 :: (~>) a m -> (~>) (T x a) m + data FoldMap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - FoldMap_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (FoldMap_0123456789876543210Sym1 a0123456789876543210) arg) (FoldMap_0123456789876543210Sym2 a0123456789876543210 arg) => + FoldMap_0123456789876543210Sym1KindInference :: SameKind (Apply (FoldMap_0123456789876543210Sym1 a0123456789876543210) arg) (FoldMap_0123456789876543210Sym2 a0123456789876543210 arg) => FoldMap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (FoldMap_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = FoldMap_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - type FoldMap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 m0123456789876543210) (a0123456789876543210 :: T x0123456789876543210 a0123456789876543210) = - FoldMap_0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (FoldMap_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) FoldMap_0123456789876543210Sym1KindInference) ()) + type FoldMap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a m) (a0123456789876543210 :: T x a) = + FoldMap_0123456789876543210 a0123456789876543210 a0123456789876543210 :: m type family Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 where Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = n2_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: 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 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) 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_0123456789876543210Sym3KindInference :: 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 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) 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_0123456789876543210Sym4KindInference :: 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 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) 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_0123456789876543210Sym5KindInference :: 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 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym6KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) data Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym6KindInference :: forall _f_01234567898765432100123456789876543210 - _z_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n1_01234567898765432100123456789876543210 - 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_0123456789876543210Sym6KindInference :: 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 n1_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n1_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym7KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym6KindInference) ()) data Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym7KindInference :: forall _f_01234567898765432100123456789876543210 - _z_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n1_01234567898765432100123456789876543210 - n2_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => + Lambda_0123456789876543210Sym7KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym7KindInference) ()) type Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 type family Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 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 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: 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 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) 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_0123456789876543210Sym3KindInference :: 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 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) 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_0123456789876543210Sym4KindInference :: 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 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) 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_0123456789876543210Sym5KindInference :: 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 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym6KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) data Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym6KindInference :: forall _f_01234567898765432100123456789876543210 - _z_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n1_01234567898765432100123456789876543210 - 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_0123456789876543210Sym6KindInference :: 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 n1_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n1_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym7KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym6KindInference) ()) data Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym7KindInference :: forall _f_01234567898765432100123456789876543210 - _z_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n1_01234567898765432100123456789876543210 - n2_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => + Lambda_0123456789876543210Sym7KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym7KindInference) ()) type Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 type family Lambda_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 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 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 n1_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 n1_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 n1_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 n1_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 n1_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: 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 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210) _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) 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_0123456789876543210Sym3KindInference :: 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 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) _z_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) 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_0123456789876543210Sym4KindInference :: 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 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) 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_0123456789876543210Sym5KindInference :: 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 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym6KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) 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_0123456789876543210Sym6KindInference :: 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 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym7 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym7KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym6KindInference) ()) 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_0123456789876543210Sym7KindInference :: 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 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym8 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym8 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym8KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym7KindInference) ()) data Lambda_0123456789876543210Sym8 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym8KindInference :: forall n1_01234567898765432100123456789876543210 - n2_01234567898765432100123456789876543210 - _f_01234567898765432100123456789876543210 - _z_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n1_01234567898765432100123456789876543210 - 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_0123456789876543210Sym8KindInference :: 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 n1_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym8 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n1_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym9 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym9 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym8 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym9KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym8KindInference) ()) data Lambda_0123456789876543210Sym9 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym9KindInference :: forall n1_01234567898765432100123456789876543210 - n2_01234567898765432100123456789876543210 - _f_01234567898765432100123456789876543210 - _z_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n1_01234567898765432100123456789876543210 - n2_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym9 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym10 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => + Lambda_0123456789876543210Sym9KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym9 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym10 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => Lambda_0123456789876543210Sym9 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym9 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym10 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym9 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym9KindInference) ()) type Lambda_0123456789876543210Sym10 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 type family Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 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 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: 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 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) 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_0123456789876543210Sym3KindInference :: 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 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) 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_0123456789876543210Sym4KindInference :: 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 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) 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_0123456789876543210Sym5KindInference :: 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 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym6KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym5KindInference) ()) data Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym6KindInference :: forall _f_01234567898765432100123456789876543210 - _z_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n1_01234567898765432100123456789876543210 - 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_0123456789876543210Sym6KindInference :: 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 n1_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n1_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym6 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym7KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym6KindInference) ()) data Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym7KindInference :: forall _f_01234567898765432100123456789876543210 - _z_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n1_01234567898765432100123456789876543210 - n2_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => + Lambda_0123456789876543210Sym7KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym7 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym7KindInference) ()) type Lambda_0123456789876543210Sym8 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 type family Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 where Lambda_0123456789876543210 _f_0123456789876543210 _z_0123456789876543210 a_0123456789876543210 n1_0123456789876543210 n2_0123456789876543210 = n2_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 _f_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 _f_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: 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 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) data Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym3KindInference :: forall _f_01234567898765432100123456789876543210 - _z_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n1_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + Lambda_0123456789876543210Sym3KindInference :: 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 n1_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n1_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) data Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym4KindInference :: forall _f_01234567898765432100123456789876543210 - _z_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n1_01234567898765432100123456789876543210 - n2_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => + Lambda_0123456789876543210Sym4KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 arg) => Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) type Lambda_0123456789876543210Sym5 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 = Lambda_0123456789876543210 _f_01234567898765432100123456789876543210 _z_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n1_01234567898765432100123456789876543210 n2_01234567898765432100123456789876543210 - type family Foldr_0123456789876543210 (a :: (~>) a ((~>) b b)) (a :: b) (a :: T x a) :: b where + type Foldr_0123456789876543210 :: (~>) a ((~>) b b) + -> b -> T x a -> b + type family Foldr_0123456789876543210 a a a 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 - instance SuppressUnusedWarnings Foldr_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Foldr_0123456789876543210Sym0KindInference) ()) - data Foldr_0123456789876543210Sym0 :: forall a0123456789876543210 - b0123456789876543210 - x0123456789876543210. - (~>) ((~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)) ((~>) b0123456789876543210 ((~>) (T x0123456789876543210 a0123456789876543210) b0123456789876543210)) + type Foldr_0123456789876543210Sym0 :: (~>) ((~>) a ((~>) b b)) ((~>) b ((~>) (T x a) b)) + data Foldr_0123456789876543210Sym0 a0123456789876543210 where - Foldr_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foldr_0123456789876543210Sym0 arg) (Foldr_0123456789876543210Sym1 arg) => + Foldr_0123456789876543210Sym0KindInference :: SameKind (Apply Foldr_0123456789876543210Sym0 arg) (Foldr_0123456789876543210Sym1 arg) => Foldr_0123456789876543210Sym0 a0123456789876543210 type instance Apply Foldr_0123456789876543210Sym0 a0123456789876543210 = Foldr_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foldr_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Foldr_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Foldr_0123456789876543210Sym1KindInference) ()) - data Foldr_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)) :: forall x0123456789876543210. - (~>) b0123456789876543210 ((~>) (T x0123456789876543210 a0123456789876543210) b0123456789876543210) + = snd (((,) Foldr_0123456789876543210Sym0KindInference) ()) + type Foldr_0123456789876543210Sym1 :: (~>) a ((~>) b b) + -> (~>) b ((~>) (T x a) b) + data Foldr_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Foldr_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foldr_0123456789876543210Sym1 a0123456789876543210) arg) (Foldr_0123456789876543210Sym2 a0123456789876543210 arg) => + Foldr_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (Foldr_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) Foldr_0123456789876543210Sym2KindInference) ()) - data Foldr_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210)) (a0123456789876543210 :: b0123456789876543210) :: forall x0123456789876543210. - (~>) (T x0123456789876543210 a0123456789876543210) b0123456789876543210 + = snd (((,) Foldr_0123456789876543210Sym1KindInference) ()) + type Foldr_0123456789876543210Sym2 :: (~>) a ((~>) b b) + -> b -> (~>) (T x a) b + data Foldr_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - Foldr_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foldr_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (Foldr_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + Foldr_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 - 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) ()) + type Foldr_0123456789876543210Sym3 (a0123456789876543210 :: (~>) a ((~>) b b)) (a0123456789876543210 :: b) (a0123456789876543210 :: T x a) = + Foldr_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: b 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 + type Traverse_0123456789876543210 :: (~>) a (f b) + -> T x a -> f (T x b) + type family Traverse_0123456789876543210 a a 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) - instance SuppressUnusedWarnings Traverse_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Traverse_0123456789876543210Sym0KindInference) ()) - data Traverse_0123456789876543210Sym0 :: forall a0123456789876543210 - f0123456789876543210 - b0123456789876543210 - 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) => + type Traverse_0123456789876543210Sym0 :: (~>) ((~>) a (f b)) ((~>) (T x a) (f (T x b))) + data Traverse_0123456789876543210Sym0 a0123456789876543210 + where + Traverse_0123456789876543210Sym0KindInference :: SameKind (Apply Traverse_0123456789876543210Sym0 arg) (Traverse_0123456789876543210Sym1 arg) => Traverse_0123456789876543210Sym0 a0123456789876543210 type instance Apply Traverse_0123456789876543210Sym0 a0123456789876543210 = Traverse_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Traverse_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Traverse_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Traverse_0123456789876543210Sym1KindInference) ()) - data Traverse_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 (f0123456789876543210 b0123456789876543210)) :: forall x0123456789876543210. - (~>) (T x0123456789876543210 a0123456789876543210) (f0123456789876543210 (T x0123456789876543210 b0123456789876543210)) + = snd (((,) Traverse_0123456789876543210Sym0KindInference) ()) + type Traverse_0123456789876543210Sym1 :: (~>) a (f b) + -> (~>) (T x a) (f (T x b)) + data Traverse_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Traverse_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Traverse_0123456789876543210Sym1 a0123456789876543210) arg) (Traverse_0123456789876543210Sym2 a0123456789876543210 arg) => + Traverse_0123456789876543210Sym1KindInference :: SameKind (Apply (Traverse_0123456789876543210Sym1 a0123456789876543210) arg) (Traverse_0123456789876543210Sym2 a0123456789876543210 arg) => Traverse_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Traverse_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Traverse_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - 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) ()) + type Traverse_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a (f b)) (a0123456789876543210 :: T x a) = + Traverse_0123456789876543210 a0123456789876543210 a0123456789876543210 :: f (T x b) 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 + type Fmap_0123456789876543210 :: (~>) a b -> Empty a -> Empty b + type family Fmap_0123456789876543210 a a where Fmap_0123456789876543210 _ v_0123456789876543210 = Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210 - instance SuppressUnusedWarnings Fmap_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Fmap_0123456789876543210Sym0KindInference) ()) - data Fmap_0123456789876543210Sym0 :: forall a0123456789876543210 - b0123456789876543210. - (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) (Empty a0123456789876543210) (Empty b0123456789876543210)) + type Fmap_0123456789876543210Sym0 :: (~>) ((~>) a b) ((~>) (Empty a) (Empty b)) + data Fmap_0123456789876543210Sym0 a0123456789876543210 where - Fmap_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Fmap_0123456789876543210Sym0 arg) (Fmap_0123456789876543210Sym1 arg) => + Fmap_0123456789876543210Sym0KindInference :: SameKind (Apply Fmap_0123456789876543210Sym0 arg) (Fmap_0123456789876543210Sym1 arg) => Fmap_0123456789876543210Sym0 a0123456789876543210 type instance Apply Fmap_0123456789876543210Sym0 a0123456789876543210 = Fmap_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Fmap_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Fmap_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Fmap_0123456789876543210Sym1KindInference) ()) - data Fmap_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) (Empty a0123456789876543210) (Empty b0123456789876543210) + = snd (((,) Fmap_0123456789876543210Sym0KindInference) ()) + type Fmap_0123456789876543210Sym1 :: (~>) a b + -> (~>) (Empty a) (Empty b) + data Fmap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Fmap_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Fmap_0123456789876543210Sym1 a0123456789876543210) arg) (Fmap_0123456789876543210Sym2 a0123456789876543210 arg) => + Fmap_0123456789876543210Sym1KindInference :: SameKind (Apply (Fmap_0123456789876543210Sym1 a0123456789876543210) arg) (Fmap_0123456789876543210Sym2 a0123456789876543210 arg) => Fmap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Fmap_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Fmap_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - type Fmap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: Empty a0123456789876543210) = - Fmap_0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Fmap_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Fmap_0123456789876543210Sym1KindInference) ()) + type Fmap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a b) (a0123456789876543210 :: Empty a) = + Fmap_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Empty b type family Case_0123456789876543210 v_0123456789876543210 t where - type family TFHelper_0123456789876543210 (a :: a) (a :: Empty b) :: Empty a where + type TFHelper_0123456789876543210 :: a -> Empty b -> Empty a + type family TFHelper_0123456789876543210 a a where TFHelper_0123456789876543210 _ v_0123456789876543210 = Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210 - instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ()) - data TFHelper_0123456789876543210Sym0 :: forall a0123456789876543210 - b0123456789876543210. - (~>) a0123456789876543210 ((~>) (Empty b0123456789876543210) (Empty a0123456789876543210)) + type TFHelper_0123456789876543210Sym0 :: (~>) a ((~>) (Empty b) (Empty a)) + data TFHelper_0123456789876543210Sym0 a0123456789876543210 where - TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) => + TFHelper_0123456789876543210Sym0KindInference :: SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) => TFHelper_0123456789876543210Sym0 a0123456789876543210 type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ()) - data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) (Empty b0123456789876543210) (Empty a0123456789876543210) + = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ()) + type TFHelper_0123456789876543210Sym1 :: a + -> (~>) (Empty b) (Empty a) + data TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) => + TFHelper_0123456789876543210Sym1KindInference :: SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) => TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: Empty b0123456789876543210) = - TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ()) + type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: Empty b) = + TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Empty a 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 + type FoldMap_0123456789876543210 :: (~>) a m -> Empty a -> m + type family FoldMap_0123456789876543210 a a where FoldMap_0123456789876543210 _ _ = MemptySym0 - instance SuppressUnusedWarnings FoldMap_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) FoldMap_0123456789876543210Sym0KindInference) ()) - data FoldMap_0123456789876543210Sym0 :: forall a0123456789876543210 - m0123456789876543210. - (~>) ((~>) a0123456789876543210 m0123456789876543210) ((~>) (Empty a0123456789876543210) m0123456789876543210) + type FoldMap_0123456789876543210Sym0 :: (~>) ((~>) a m) ((~>) (Empty a) m) + data FoldMap_0123456789876543210Sym0 a0123456789876543210 where - FoldMap_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FoldMap_0123456789876543210Sym0 arg) (FoldMap_0123456789876543210Sym1 arg) => + FoldMap_0123456789876543210Sym0KindInference :: SameKind (Apply FoldMap_0123456789876543210Sym0 arg) (FoldMap_0123456789876543210Sym1 arg) => FoldMap_0123456789876543210Sym0 a0123456789876543210 type instance Apply FoldMap_0123456789876543210Sym0 a0123456789876543210 = FoldMap_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (FoldMap_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings FoldMap_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) FoldMap_0123456789876543210Sym1KindInference) ()) - data FoldMap_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 m0123456789876543210) :: (~>) (Empty a0123456789876543210) m0123456789876543210 + = snd (((,) FoldMap_0123456789876543210Sym0KindInference) ()) + type FoldMap_0123456789876543210Sym1 :: (~>) a m + -> (~>) (Empty a) m + data FoldMap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - FoldMap_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (FoldMap_0123456789876543210Sym1 a0123456789876543210) arg) (FoldMap_0123456789876543210Sym2 a0123456789876543210 arg) => + FoldMap_0123456789876543210Sym1KindInference :: SameKind (Apply (FoldMap_0123456789876543210Sym1 a0123456789876543210) arg) (FoldMap_0123456789876543210Sym2 a0123456789876543210 arg) => FoldMap_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (FoldMap_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = FoldMap_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - type FoldMap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 m0123456789876543210) (a0123456789876543210 :: Empty a0123456789876543210) = - FoldMap_0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (FoldMap_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) FoldMap_0123456789876543210Sym1KindInference) ()) + type FoldMap_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a m) (a0123456789876543210 :: Empty a) = + FoldMap_0123456789876543210 a0123456789876543210 a0123456789876543210 :: m 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 + type Traverse_0123456789876543210 :: (~>) a (f b) + -> Empty a -> f (Empty b) + type family Traverse_0123456789876543210 a a where Traverse_0123456789876543210 _ v_0123456789876543210 = Apply PureSym0 (Case_0123456789876543210 v_0123456789876543210 v_0123456789876543210) - instance SuppressUnusedWarnings Traverse_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Traverse_0123456789876543210Sym0KindInference) ()) - data Traverse_0123456789876543210Sym0 :: forall a0123456789876543210 - f0123456789876543210 - b0123456789876543210. - (~>) ((~>) a0123456789876543210 (f0123456789876543210 b0123456789876543210)) ((~>) (Empty a0123456789876543210) (f0123456789876543210 (Empty b0123456789876543210))) + type Traverse_0123456789876543210Sym0 :: (~>) ((~>) a (f b)) ((~>) (Empty a) (f (Empty b))) + data Traverse_0123456789876543210Sym0 a0123456789876543210 where - Traverse_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Traverse_0123456789876543210Sym0 arg) (Traverse_0123456789876543210Sym1 arg) => + Traverse_0123456789876543210Sym0KindInference :: SameKind (Apply Traverse_0123456789876543210Sym0 arg) (Traverse_0123456789876543210Sym1 arg) => Traverse_0123456789876543210Sym0 a0123456789876543210 type instance Apply Traverse_0123456789876543210Sym0 a0123456789876543210 = Traverse_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Traverse_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Traverse_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Traverse_0123456789876543210Sym1KindInference) ()) - data Traverse_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 (f0123456789876543210 b0123456789876543210)) :: (~>) (Empty a0123456789876543210) (f0123456789876543210 (Empty b0123456789876543210)) + = snd (((,) Traverse_0123456789876543210Sym0KindInference) ()) + type Traverse_0123456789876543210Sym1 :: (~>) a (f b) + -> (~>) (Empty a) (f (Empty b)) + data Traverse_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Traverse_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Traverse_0123456789876543210Sym1 a0123456789876543210) arg) (Traverse_0123456789876543210Sym2 a0123456789876543210 arg) => + Traverse_0123456789876543210Sym1KindInference :: SameKind (Apply (Traverse_0123456789876543210Sym1 a0123456789876543210) arg) (Traverse_0123456789876543210Sym2 a0123456789876543210 arg) => Traverse_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Traverse_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Traverse_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - type Traverse_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 (f0123456789876543210 b0123456789876543210)) (a0123456789876543210 :: Empty a0123456789876543210) = - Traverse_0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Traverse_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Traverse_0123456789876543210Sym1KindInference) ()) + type Traverse_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a (f b)) (a0123456789876543210 :: Empty a) = + Traverse_0123456789876543210 a0123456789876543210 a0123456789876543210 :: f (Empty b) instance PTraversable Empty where type Traverse a a = Apply (Apply Traverse_0123456789876543210Sym0 a) a data ST :: forall x a. T x a -> Type @@ -1271,7 +962,7 @@ Singletons/FunctorLikeDeriving.hs:(0,0)-(0,0): Splicing declarations 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 + data SEmpty :: forall a. Empty (a :: Type) -> Type type instance Sing @(Empty a) = SEmpty instance SingKind a => SingKind (Empty a) where type Demote (Empty a) = Empty (Demote a) diff --git a/tests/compile-and-dump/Singletons/HigherOrder.golden b/tests/compile-and-dump/Singletons/HigherOrder.golden index 8708be63..2beb3fa3 100644 --- a/tests/compile-and-dump/Singletons/HigherOrder.golden +++ b/tests/compile-and-dump/Singletons/HigherOrder.golden @@ -40,75 +40,63 @@ Singletons/HigherOrder.hs:(0,0)-(0,0): Splicing declarations = ((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 LeftSym0 :: forall a b. (~>) a (Either a b) + data LeftSym0 a0123456789876543210 + where + LeftSym0KindInference :: SameKind (Apply LeftSym0 arg) (LeftSym1 arg) => + LeftSym0 a0123456789876543210 + type instance Apply LeftSym0 a0123456789876543210 = LeftSym1 a0123456789876543210 instance SuppressUnusedWarnings LeftSym0 where suppressUnusedWarnings = snd (((,) LeftSym0KindInference) ()) - data LeftSym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 (Either a0123456789876543210 b0123456789876543210) + type LeftSym1 (a0123456789876543210 :: a) = + Left a0123456789876543210 :: Either a b + type RightSym0 :: forall a b. (~>) b (Either a b) + data RightSym0 a0123456789876543210 where - LeftSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply LeftSym0 arg) (LeftSym1 arg) => - LeftSym0 t0123456789876543210 - type instance Apply LeftSym0 t0123456789876543210 = LeftSym1 t0123456789876543210 - type LeftSym1 (t0123456789876543210 :: a0123456789876543210) = - Left t0123456789876543210 + RightSym0KindInference :: SameKind (Apply RightSym0 arg) (RightSym1 arg) => + RightSym0 a0123456789876543210 + type instance Apply RightSym0 a0123456789876543210 = RightSym1 a0123456789876543210 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 = RightSym1 t0123456789876543210 - type RightSym1 (t0123456789876543210 :: b0123456789876543210) = - Right t0123456789876543210 + type RightSym1 (a0123456789876543210 :: b) = + Right a0123456789876543210 :: Either a b 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 n b where Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 n b = Case_0123456789876543210 n b a_0123456789876543210 a_0123456789876543210 b - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) n0123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) data Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 b0123456789876543210 where - Lambda_0123456789876543210Sym3KindInference :: forall a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - n0123456789876543210 - b0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210) arg) (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 arg) => + Lambda_0123456789876543210Sym3KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210) arg) (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 arg) => Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 b0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 b0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) type Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 b0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 n0123456789876543210 b0123456789876543210 type family Case_0123456789876543210 n b ns bs t where @@ -116,206 +104,186 @@ Singletons/HigherOrder.hs:(0,0)-(0,0): Splicing declarations Case_0123456789876543210 n b ns bs 'False = n type family Lambda_0123456789876543210 ns bs n b where Lambda_0123456789876543210 ns bs n b = Case_0123456789876543210 n b ns bs b - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 ns0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 ns0123456789876543210 = Lambda_0123456789876543210Sym1 ns0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 ns0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 ns0123456789876543210 bs0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall ns0123456789876543210 - bs0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 ns0123456789876543210) arg) (Lambda_0123456789876543210Sym2 ns0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 ns0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall ns0123456789876543210 - bs0123456789876543210 - n0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210) arg) (Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210) arg) (Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 arg) => Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210) n0123456789876543210 = Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 n0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 ns0123456789876543210 bs0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) data Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 b0123456789876543210 where - Lambda_0123456789876543210Sym3KindInference :: forall ns0123456789876543210 - bs0123456789876543210 - n0123456789876543210 - b0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 n0123456789876543210) arg) (Lambda_0123456789876543210Sym4 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 arg) => + Lambda_0123456789876543210Sym3KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 n0123456789876543210) arg) (Lambda_0123456789876543210Sym4 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 arg) => Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 b0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 n0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210Sym4 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 b0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 ns0123456789876543210 bs0123456789876543210 n0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) type Lambda_0123456789876543210Sym4 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 b0123456789876543210 = Lambda_0123456789876543210 ns0123456789876543210 bs0123456789876543210 n0123456789876543210 b0123456789876543210 - instance SuppressUnusedWarnings EtadSym0 where - suppressUnusedWarnings = snd (((,) EtadSym0KindInference) ()) - data EtadSym0 :: (~>) [Nat] ((~>) [Bool] [Nat]) + type EtadSym0 :: (~>) [Nat] ((~>) [Bool] [Nat]) + data EtadSym0 a0123456789876543210 where - EtadSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply EtadSym0 arg) (EtadSym1 arg) => + EtadSym0KindInference :: SameKind (Apply EtadSym0 arg) (EtadSym1 arg) => EtadSym0 a0123456789876543210 type instance Apply EtadSym0 a0123456789876543210 = EtadSym1 a0123456789876543210 - instance SuppressUnusedWarnings (EtadSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) EtadSym1KindInference) ()) - data EtadSym1 (a0123456789876543210 :: [Nat]) :: (~>) [Bool] [Nat] + instance SuppressUnusedWarnings EtadSym0 where + suppressUnusedWarnings = snd (((,) EtadSym0KindInference) ()) + type EtadSym1 :: [Nat] -> (~>) [Bool] [Nat] + data EtadSym1 a0123456789876543210 a0123456789876543210 where - EtadSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (EtadSym1 a0123456789876543210) arg) (EtadSym2 a0123456789876543210 arg) => + EtadSym1KindInference :: SameKind (Apply (EtadSym1 a0123456789876543210) arg) (EtadSym2 a0123456789876543210 arg) => EtadSym1 a0123456789876543210 a0123456789876543210 type instance Apply (EtadSym1 a0123456789876543210) a0123456789876543210 = EtadSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (EtadSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) EtadSym1KindInference) ()) type EtadSym2 (a0123456789876543210 :: [Nat]) (a0123456789876543210 :: [Bool]) = - Etad a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings SplungeSym0 where - suppressUnusedWarnings = snd (((,) SplungeSym0KindInference) ()) - data SplungeSym0 :: (~>) [Nat] ((~>) [Bool] [Nat]) + Etad a0123456789876543210 a0123456789876543210 :: [Nat] + type SplungeSym0 :: (~>) [Nat] ((~>) [Bool] [Nat]) + data SplungeSym0 a0123456789876543210 where - SplungeSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply SplungeSym0 arg) (SplungeSym1 arg) => + SplungeSym0KindInference :: SameKind (Apply SplungeSym0 arg) (SplungeSym1 arg) => SplungeSym0 a0123456789876543210 type instance Apply SplungeSym0 a0123456789876543210 = SplungeSym1 a0123456789876543210 - instance SuppressUnusedWarnings (SplungeSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) SplungeSym1KindInference) ()) - data SplungeSym1 (a0123456789876543210 :: [Nat]) :: (~>) [Bool] [Nat] + instance SuppressUnusedWarnings SplungeSym0 where + suppressUnusedWarnings = snd (((,) SplungeSym0KindInference) ()) + type SplungeSym1 :: [Nat] -> (~>) [Bool] [Nat] + data SplungeSym1 a0123456789876543210 a0123456789876543210 where - SplungeSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (SplungeSym1 a0123456789876543210) arg) (SplungeSym2 a0123456789876543210 arg) => + SplungeSym1KindInference :: SameKind (Apply (SplungeSym1 a0123456789876543210) arg) (SplungeSym2 a0123456789876543210 arg) => SplungeSym1 a0123456789876543210 a0123456789876543210 type instance Apply (SplungeSym1 a0123456789876543210) a0123456789876543210 = SplungeSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (SplungeSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) SplungeSym1KindInference) ()) type SplungeSym2 (a0123456789876543210 :: [Nat]) (a0123456789876543210 :: [Bool]) = - Splunge a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings FooSym0 where - suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) - data FooSym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) ((~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)) ((~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)) + Splunge a0123456789876543210 a0123456789876543210 :: [Nat] + type FooSym0 :: (~>) ((~>) ((~>) a b) ((~>) a b)) ((~>) ((~>) a b) ((~>) a b)) + data FooSym0 a0123456789876543210 where - FooSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) => + FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) => FooSym0 a0123456789876543210 type instance Apply FooSym0 a0123456789876543210 = FooSym1 a0123456789876543210 - instance SuppressUnusedWarnings (FooSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) FooSym1KindInference) ()) - data FooSym1 (a0123456789876543210 :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)) :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210) + instance SuppressUnusedWarnings FooSym0 where + suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) + type FooSym1 :: (~>) ((~>) a b) ((~>) a b) + -> (~>) ((~>) a b) ((~>) a b) + data FooSym1 a0123456789876543210 a0123456789876543210 where - FooSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (FooSym1 a0123456789876543210) arg) (FooSym2 a0123456789876543210 arg) => + FooSym1KindInference :: SameKind (Apply (FooSym1 a0123456789876543210) arg) (FooSym2 a0123456789876543210 arg) => FooSym1 a0123456789876543210 a0123456789876543210 type instance Apply (FooSym1 a0123456789876543210) a0123456789876543210 = FooSym2 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings (FooSym2 a0123456789876543210 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) FooSym2KindInference) ()) - data FooSym2 (a0123456789876543210 :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)) (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) a0123456789876543210 b0123456789876543210 + instance SuppressUnusedWarnings (FooSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) FooSym1KindInference) ()) + type FooSym2 :: (~>) ((~>) a b) ((~>) a b) -> (~>) a b -> (~>) a b + data FooSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - FooSym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (FooSym2 a0123456789876543210 a0123456789876543210) arg) (FooSym3 a0123456789876543210 a0123456789876543210 arg) => + FooSym2KindInference :: SameKind (Apply (FooSym2 a0123456789876543210 a0123456789876543210) arg) (FooSym3 a0123456789876543210 a0123456789876543210 arg) => FooSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 type instance Apply (FooSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = FooSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 - type FooSym3 (a0123456789876543210 :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)) (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: a0123456789876543210) = - Foo a0123456789876543210 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings ZipWithSym0 where - suppressUnusedWarnings = snd (((,) ZipWithSym0KindInference) ()) - data ZipWithSym0 :: forall a0123456789876543210 - b0123456789876543210 - c0123456789876543210. - (~>) ((~>) a0123456789876543210 ((~>) b0123456789876543210 c0123456789876543210)) ((~>) [a0123456789876543210] ((~>) [b0123456789876543210] [c0123456789876543210])) + instance SuppressUnusedWarnings (FooSym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) FooSym2KindInference) ()) + type FooSym3 (a0123456789876543210 :: (~>) ((~>) a b) ((~>) a b)) (a0123456789876543210 :: (~>) a b) (a0123456789876543210 :: a) = + Foo a0123456789876543210 a0123456789876543210 a0123456789876543210 :: b + type ZipWithSym0 :: (~>) ((~>) a ((~>) b c)) ((~>) [a] ((~>) [b] [c])) + data ZipWithSym0 a0123456789876543210 where - ZipWithSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ZipWithSym0 arg) (ZipWithSym1 arg) => + ZipWithSym0KindInference :: SameKind (Apply ZipWithSym0 arg) (ZipWithSym1 arg) => ZipWithSym0 a0123456789876543210 type instance Apply ZipWithSym0 a0123456789876543210 = ZipWithSym1 a0123456789876543210 - instance SuppressUnusedWarnings (ZipWithSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) ZipWithSym1KindInference) ()) - data ZipWithSym1 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) b0123456789876543210 c0123456789876543210)) :: (~>) [a0123456789876543210] ((~>) [b0123456789876543210] [c0123456789876543210]) + instance SuppressUnusedWarnings ZipWithSym0 where + suppressUnusedWarnings = snd (((,) ZipWithSym0KindInference) ()) + type ZipWithSym1 :: (~>) a ((~>) b c) -> (~>) [a] ((~>) [b] [c]) + data ZipWithSym1 a0123456789876543210 a0123456789876543210 where - ZipWithSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ZipWithSym1 a0123456789876543210) arg) (ZipWithSym2 a0123456789876543210 arg) => + ZipWithSym1KindInference :: SameKind (Apply (ZipWithSym1 a0123456789876543210) arg) (ZipWithSym2 a0123456789876543210 arg) => ZipWithSym1 a0123456789876543210 a0123456789876543210 type instance Apply (ZipWithSym1 a0123456789876543210) a0123456789876543210 = ZipWithSym2 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings (ZipWithSym2 a0123456789876543210 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) ZipWithSym2KindInference) ()) - data ZipWithSym2 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) b0123456789876543210 c0123456789876543210)) (a0123456789876543210 :: [a0123456789876543210]) :: (~>) [b0123456789876543210] [c0123456789876543210] + instance SuppressUnusedWarnings (ZipWithSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) ZipWithSym1KindInference) ()) + type ZipWithSym2 :: (~>) a ((~>) b c) -> [a] -> (~>) [b] [c] + data ZipWithSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ZipWithSym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ZipWithSym2 a0123456789876543210 a0123456789876543210) arg) (ZipWithSym3 a0123456789876543210 a0123456789876543210 arg) => + ZipWithSym2KindInference :: SameKind (Apply (ZipWithSym2 a0123456789876543210 a0123456789876543210) arg) (ZipWithSym3 a0123456789876543210 a0123456789876543210 arg) => ZipWithSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 type instance Apply (ZipWithSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ZipWithSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 - type ZipWithSym3 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) b0123456789876543210 c0123456789876543210)) (a0123456789876543210 :: [a0123456789876543210]) (a0123456789876543210 :: [b0123456789876543210]) = - ZipWith a0123456789876543210 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings LiftMaybeSym0 where - suppressUnusedWarnings = snd (((,) LiftMaybeSym0KindInference) ()) - data LiftMaybeSym0 :: forall a0123456789876543210 - b0123456789876543210. - (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) (Maybe a0123456789876543210) (Maybe b0123456789876543210)) + instance SuppressUnusedWarnings (ZipWithSym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) ZipWithSym2KindInference) ()) + type ZipWithSym3 (a0123456789876543210 :: (~>) a ((~>) b c)) (a0123456789876543210 :: [a]) (a0123456789876543210 :: [b]) = + ZipWith a0123456789876543210 a0123456789876543210 a0123456789876543210 :: [c] + type LiftMaybeSym0 :: (~>) ((~>) a b) ((~>) (Maybe a) (Maybe b)) + data LiftMaybeSym0 a0123456789876543210 where - LiftMaybeSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply LiftMaybeSym0 arg) (LiftMaybeSym1 arg) => + LiftMaybeSym0KindInference :: SameKind (Apply LiftMaybeSym0 arg) (LiftMaybeSym1 arg) => LiftMaybeSym0 a0123456789876543210 type instance Apply LiftMaybeSym0 a0123456789876543210 = LiftMaybeSym1 a0123456789876543210 - instance SuppressUnusedWarnings (LiftMaybeSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) LiftMaybeSym1KindInference) ()) - data LiftMaybeSym1 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) (Maybe a0123456789876543210) (Maybe b0123456789876543210) + instance SuppressUnusedWarnings LiftMaybeSym0 where + suppressUnusedWarnings = snd (((,) LiftMaybeSym0KindInference) ()) + type LiftMaybeSym1 :: (~>) a b -> (~>) (Maybe a) (Maybe b) + data LiftMaybeSym1 a0123456789876543210 a0123456789876543210 where - LiftMaybeSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (LiftMaybeSym1 a0123456789876543210) arg) (LiftMaybeSym2 a0123456789876543210 arg) => + LiftMaybeSym1KindInference :: SameKind (Apply (LiftMaybeSym1 a0123456789876543210) arg) (LiftMaybeSym2 a0123456789876543210 arg) => LiftMaybeSym1 a0123456789876543210 a0123456789876543210 type instance Apply (LiftMaybeSym1 a0123456789876543210) a0123456789876543210 = LiftMaybeSym2 a0123456789876543210 a0123456789876543210 - type LiftMaybeSym2 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) = - LiftMaybe a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings MapSym0 where - suppressUnusedWarnings = snd (((,) MapSym0KindInference) ()) - data MapSym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) [a0123456789876543210] [b0123456789876543210]) + instance SuppressUnusedWarnings (LiftMaybeSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) LiftMaybeSym1KindInference) ()) + type LiftMaybeSym2 (a0123456789876543210 :: (~>) a b) (a0123456789876543210 :: Maybe a) = + LiftMaybe a0123456789876543210 a0123456789876543210 :: Maybe b + type MapSym0 :: (~>) ((~>) a b) ((~>) [a] [b]) + data MapSym0 a0123456789876543210 where - MapSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply MapSym0 arg) (MapSym1 arg) => + MapSym0KindInference :: SameKind (Apply MapSym0 arg) (MapSym1 arg) => MapSym0 a0123456789876543210 type instance Apply MapSym0 a0123456789876543210 = MapSym1 a0123456789876543210 - instance SuppressUnusedWarnings (MapSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) MapSym1KindInference) ()) - data MapSym1 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) [a0123456789876543210] [b0123456789876543210] + instance SuppressUnusedWarnings MapSym0 where + suppressUnusedWarnings = snd (((,) MapSym0KindInference) ()) + type MapSym1 :: (~>) a b -> (~>) [a] [b] + data MapSym1 a0123456789876543210 a0123456789876543210 where - MapSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (MapSym1 a0123456789876543210) arg) (MapSym2 a0123456789876543210 arg) => + MapSym1KindInference :: SameKind (Apply (MapSym1 a0123456789876543210) arg) (MapSym2 a0123456789876543210 arg) => MapSym1 a0123456789876543210 a0123456789876543210 type instance Apply (MapSym1 a0123456789876543210) a0123456789876543210 = MapSym2 a0123456789876543210 a0123456789876543210 - type MapSym2 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: [a0123456789876543210]) = - Map a0123456789876543210 a0123456789876543210 - type family Etad (a :: [Nat]) (a :: [Bool]) :: [Nat] where + instance SuppressUnusedWarnings (MapSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) MapSym1KindInference) ()) + type MapSym2 (a0123456789876543210 :: (~>) a b) (a0123456789876543210 :: [a]) = + Map a0123456789876543210 a0123456789876543210 :: [b] + type Etad :: [Nat] -> [Bool] -> [Nat] + type family Etad a a 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 + type Splunge :: [Nat] -> [Bool] -> [Nat] + type family Splunge a a 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 + type Foo :: (~>) ((~>) a b) ((~>) a b) -> (~>) a b -> a -> b + type family Foo a a a where Foo f g a = Apply (Apply f g) a - type family ZipWith (a :: (~>) a ((~>) b c)) (a :: [a]) (a :: [b]) :: [c] where + type ZipWith :: (~>) a ((~>) b c) -> [a] -> [b] -> [c] + type family ZipWith a a a where ZipWith f ('(:) x xs) ('(:) y ys) = Apply (Apply (:@#@$) (Apply (Apply f x) y)) (Apply (Apply (Apply ZipWithSym0 f) xs) ys) ZipWith _ '[] '[] = NilSym0 ZipWith _ ('(:) _ _) '[] = NilSym0 ZipWith _ '[] ('(:) _ _) = NilSym0 - type family LiftMaybe (a :: (~>) a b) (a :: Maybe a) :: Maybe b where + type LiftMaybe :: (~>) a b -> Maybe a -> Maybe b + type family LiftMaybe a a where LiftMaybe f ('Just x) = Apply JustSym0 (Apply f x) LiftMaybe _ 'Nothing = NothingSym0 - type family Map (a :: (~>) a b) (a :: [a]) :: [b] where + type Map :: (~>) a b -> [a] -> [b] + type family Map a a where Map _ '[] = NilSym0 Map f ('(:) h t) = Apply (Apply (:@#@$) (Apply f h)) (Apply (Apply MapSym0 f) t) sEtad :: diff --git a/tests/compile-and-dump/Singletons/LambdaCase.golden b/tests/compile-and-dump/Singletons/LambdaCase.golden index 67683a2d..059829e9 100644 --- a/tests/compile-and-dump/Singletons/LambdaCase.golden +++ b/tests/compile-and-dump/Singletons/LambdaCase.golden @@ -33,36 +33,30 @@ Singletons/LambdaCase.hs:(0,0)-(0,0): Splicing declarations Case_0123456789876543210 x_0123456789876543210 a b '(p, _) = p type family Lambda_0123456789876543210 a b x_0123456789876543210 where Lambda_0123456789876543210 a b x_0123456789876543210 = Case_0123456789876543210 x_0123456789876543210 a b x_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 a0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 a0123456789876543210 = Lambda_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - b0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) arg) (Lambda_0123456789876543210Sym2 a0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 x_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - b0123456789876543210 - x_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 arg) => Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 x_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) x_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 x_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 x_01234567898765432100123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 x_01234567898765432100123456789876543210 type family Case_0123456789876543210 x_0123456789876543210 d t where @@ -70,25 +64,22 @@ Singletons/LambdaCase.hs:(0,0)-(0,0): Splicing declarations Case_0123456789876543210 x_0123456789876543210 d 'Nothing = d type family Lambda_0123456789876543210 d x_0123456789876543210 where Lambda_0123456789876543210 d x_0123456789876543210 = Case_0123456789876543210 x_0123456789876543210 d x_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 d0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 d0123456789876543210 = Lambda_0123456789876543210Sym1 d0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 d0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 d0123456789876543210 x_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall d0123456789876543210 - x_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 d0123456789876543210) arg) (Lambda_0123456789876543210Sym2 d0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 d0123456789876543210) arg) (Lambda_0123456789876543210Sym2 d0123456789876543210 arg) => Lambda_0123456789876543210Sym1 d0123456789876543210 x_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym1 d0123456789876543210) x_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 d0123456789876543210 x_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 d0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) type Lambda_0123456789876543210Sym2 d0123456789876543210 x_01234567898765432100123456789876543210 = Lambda_0123456789876543210 d0123456789876543210 x_01234567898765432100123456789876543210 type family Case_0123456789876543210 x_0123456789876543210 d x t where @@ -96,104 +87,94 @@ Singletons/LambdaCase.hs:(0,0)-(0,0): Splicing declarations Case_0123456789876543210 x_0123456789876543210 d x 'Nothing = d type family Lambda_0123456789876543210 d x x_0123456789876543210 where Lambda_0123456789876543210 d x x_0123456789876543210 = Case_0123456789876543210 x_0123456789876543210 d x x_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 d0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 d0123456789876543210 = Lambda_0123456789876543210Sym1 d0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 d0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 d0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall d0123456789876543210 - x0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 d0123456789876543210) arg) (Lambda_0123456789876543210Sym2 d0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 d0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210 x_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall d0123456789876543210 - x0123456789876543210 - x_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym3 d0123456789876543210 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym3 d0123456789876543210 x0123456789876543210 arg) => Lambda_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210 x_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210) x_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 d0123456789876543210 x0123456789876543210 x_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 d0123456789876543210 x0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 d0123456789876543210 x0123456789876543210 x_01234567898765432100123456789876543210 = Lambda_0123456789876543210 d0123456789876543210 x0123456789876543210 x_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings Foo3Sym0 where - suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ()) - data Foo3Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210) + type Foo3Sym0 :: (~>) a ((~>) b a) + data Foo3Sym0 a0123456789876543210 where - Foo3Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) => + Foo3Sym0KindInference :: SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) => Foo3Sym0 a0123456789876543210 type instance Apply Foo3Sym0 a0123456789876543210 = Foo3Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foo3Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo3Sym1KindInference) ()) - data Foo3Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings Foo3Sym0 where + suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ()) + type Foo3Sym1 :: a -> (~>) b a + data Foo3Sym1 a0123456789876543210 a0123456789876543210 where - Foo3Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo3Sym1 a0123456789876543210) arg) (Foo3Sym2 a0123456789876543210 arg) => + Foo3Sym1KindInference :: SameKind (Apply (Foo3Sym1 a0123456789876543210) arg) (Foo3Sym2 a0123456789876543210 arg) => Foo3Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Foo3Sym1 a0123456789876543210) a0123456789876543210 = Foo3Sym2 a0123456789876543210 a0123456789876543210 - type Foo3Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - Foo3 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings Foo2Sym0 where - suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ()) - data Foo2Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) a0123456789876543210) + instance SuppressUnusedWarnings (Foo3Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo3Sym1KindInference) ()) + type Foo3Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Foo3 a0123456789876543210 a0123456789876543210 :: a + type Foo2Sym0 :: (~>) a ((~>) (Maybe a) a) + data Foo2Sym0 a0123456789876543210 where - Foo2Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) => + Foo2Sym0KindInference :: SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) => Foo2Sym0 a0123456789876543210 type instance Apply Foo2Sym0 a0123456789876543210 = Foo2Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foo2Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo2Sym1KindInference) ()) - data Foo2Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) (Maybe a0123456789876543210) a0123456789876543210 + instance SuppressUnusedWarnings Foo2Sym0 where + suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ()) + type Foo2Sym1 :: a -> (~>) (Maybe a) a + data Foo2Sym1 a0123456789876543210 a0123456789876543210 where - Foo2Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo2Sym1 a0123456789876543210) arg) (Foo2Sym2 a0123456789876543210 arg) => + Foo2Sym1KindInference :: SameKind (Apply (Foo2Sym1 a0123456789876543210) arg) (Foo2Sym2 a0123456789876543210 arg) => Foo2Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Foo2Sym1 a0123456789876543210) a0123456789876543210 = Foo2Sym2 a0123456789876543210 a0123456789876543210 - type Foo2Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) = - Foo2 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings Foo1Sym0 where - suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ()) - data Foo1Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) (Maybe a0123456789876543210) a0123456789876543210) + instance SuppressUnusedWarnings (Foo2Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo2Sym1KindInference) ()) + type Foo2Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: Maybe a) = + Foo2 a0123456789876543210 a0123456789876543210 :: a + type Foo1Sym0 :: (~>) a ((~>) (Maybe a) a) + data Foo1Sym0 a0123456789876543210 where - Foo1Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) => + Foo1Sym0KindInference :: SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) => Foo1Sym0 a0123456789876543210 type instance Apply Foo1Sym0 a0123456789876543210 = Foo1Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foo1Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo1Sym1KindInference) ()) - data Foo1Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) (Maybe a0123456789876543210) a0123456789876543210 + instance SuppressUnusedWarnings Foo1Sym0 where + suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ()) + type Foo1Sym1 :: a -> (~>) (Maybe a) a + data Foo1Sym1 a0123456789876543210 a0123456789876543210 where - Foo1Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo1Sym1 a0123456789876543210) arg) (Foo1Sym2 a0123456789876543210 arg) => + Foo1Sym1KindInference :: SameKind (Apply (Foo1Sym1 a0123456789876543210) arg) (Foo1Sym2 a0123456789876543210 arg) => Foo1Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Foo1Sym1 a0123456789876543210) a0123456789876543210 = Foo1Sym2 a0123456789876543210 a0123456789876543210 - type Foo1Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: Maybe a0123456789876543210) = - Foo1 a0123456789876543210 a0123456789876543210 - type family Foo3 (a :: a) (a :: b) :: a where + instance SuppressUnusedWarnings (Foo1Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo1Sym1KindInference) ()) + type Foo1Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: Maybe a) = + Foo1 a0123456789876543210 a0123456789876543210 :: a + type Foo3 :: a -> b -> a + type family Foo3 a 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 + type Foo2 :: a -> Maybe a -> a + type family Foo2 a a where Foo2 d _ = Apply (Apply Lambda_0123456789876543210Sym0 d) (Apply JustSym0 d) - type family Foo1 (a :: a) (a :: Maybe a) :: a where + type Foo1 :: a -> Maybe a -> a + type family Foo1 a a where Foo1 d x = Apply (Apply (Apply Lambda_0123456789876543210Sym0 d) x) x sFoo3 :: forall a b (t :: a) (t :: b). diff --git a/tests/compile-and-dump/Singletons/Lambdas.golden b/tests/compile-and-dump/Singletons/Lambdas.golden index f8ec9f69..fc3f062d 100644 --- a/tests/compile-and-dump/Singletons/Lambdas.golden +++ b/tests/compile-and-dump/Singletons/Lambdas.golden @@ -40,202 +40,168 @@ Singletons/Lambdas.hs:(0,0)-(0,0): Splicing declarations data Foo a b = Foo a b foo8 :: Foo a b -> a foo8 x = (\ (Foo a _) -> a) x + type FooSym0 :: forall a b. (~>) a ((~>) b (Foo a b)) + data FooSym0 a0123456789876543210 + where + FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) => + FooSym0 a0123456789876543210 + type instance Apply FooSym0 a0123456789876543210 = FooSym1 a0123456789876543210 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 - instance SuppressUnusedWarnings (FooSym1 t0123456789876543210) where + type FooSym1 :: forall a b. a -> (~>) b (Foo a b) + data FooSym1 a0123456789876543210 a0123456789876543210 + where + FooSym1KindInference :: SameKind (Apply (FooSym1 a0123456789876543210) arg) (FooSym2 a0123456789876543210 arg) => + FooSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (FooSym1 a0123456789876543210) a0123456789876543210 = FooSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (FooSym1 a0123456789876543210) 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 = FooSym2 t0123456789876543210 t0123456789876543210 - type FooSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) = - Foo t0123456789876543210 t0123456789876543210 + type FooSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Foo a0123456789876543210 a0123456789876543210 :: Foo a b type family Case_0123456789876543210 arg_0123456789876543210 x t where Case_0123456789876543210 arg_0123456789876543210 x (Foo a _) = a type family Lambda_0123456789876543210 x arg_0123456789876543210 where Lambda_0123456789876543210 x arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x arg_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 x0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 x0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210 - arg_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => Lambda_0123456789876543210Sym1 x0123456789876543210 arg_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 arg_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) type Lambda_0123456789876543210Sym2 x0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 type family Case_0123456789876543210 arg_0123456789876543210 x y t where Case_0123456789876543210 arg_0123456789876543210 x y '(_, b) = b type family Lambda_0123456789876543210 x y arg_0123456789876543210 where Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x y arg_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 x0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210 - y0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210 - y0123456789876543210 - arg_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) => Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 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 arg_0123456789876543210 where Lambda_0123456789876543210 x a b arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x a b arg_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 x0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 x0123456789876543210 a0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 x0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 a0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 a0123456789876543210 arg) => Lambda_0123456789876543210Sym2 x0123456789876543210 a0123456789876543210 b0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 a0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210Sym3 x0123456789876543210 a0123456789876543210 b0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 x0123456789876543210 a0123456789876543210 b0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 x0123456789876543210 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) data Lambda_0123456789876543210Sym3 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym3KindInference :: forall x0123456789876543210 - a0123456789876543210 - b0123456789876543210 - arg_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym4 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg) => + Lambda_0123456789876543210Sym3KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym4 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg) => Lambda_0123456789876543210Sym3 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 a0123456789876543210 b0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 x0123456789876543210 a0123456789876543210 b0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) type Lambda_0123456789876543210Sym4 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 a0123456789876543210 b0123456789876543210 arg_01234567898765432100123456789876543210 type family Lambda_0123456789876543210 a b x where Lambda_0123456789876543210 a b x = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) a) b - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 a0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 a0123456789876543210 = Lambda_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - b0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) arg) (Lambda_0123456789876543210Sym2 a0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 arg) => Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 x0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 x0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 x0123456789876543210 type family Lambda_0123456789876543210 x y x where Lambda_0123456789876543210 x y x = x - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 x0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210 - y0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210 - y0123456789876543210 - x0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) => Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 x0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 x0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 x0123456789876543210 type family Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210 x y z t where @@ -243,404 +209,344 @@ Singletons/Lambdas.hs:(0,0)-(0,0): Splicing declarations _) = x type family Lambda_0123456789876543210 x y z arg_0123456789876543210 arg_0123456789876543210 where Lambda_0123456789876543210 x y z arg_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210 x y z (Apply (Apply Tuple2Sym0 arg_0123456789876543210) arg_0123456789876543210) - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 x0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210 - y0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) => Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 z0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) z0123456789876543210 = Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 z0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 z0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) data Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym3KindInference :: forall x0123456789876543210 - y0123456789876543210 - z0123456789876543210 - arg_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 z0123456789876543210) arg) (Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg) => + Lambda_0123456789876543210Sym3KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 z0123456789876543210) arg) (Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg) => Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 z0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 z0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) data Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym4KindInference :: forall x0123456789876543210 - y0123456789876543210 - z0123456789876543210 - arg_01234567898765432100123456789876543210 - arg_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 arg) => + Lambda_0123456789876543210Sym4KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym5 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 arg) => Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) type Lambda_0123456789876543210Sym5 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 z0123456789876543210 arg_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 type family Lambda_0123456789876543210 x y where Lambda_0123456789876543210 x y = y - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 x0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210 - y0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym1 x0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) type Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 type family Case_0123456789876543210 arg_0123456789876543210 x y t where Case_0123456789876543210 arg_0123456789876543210 x y _ = x type family Lambda_0123456789876543210 x y arg_0123456789876543210 where Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x y arg_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 x0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210 - y0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210 - y0123456789876543210 - arg_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) => Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 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 arg_0123456789876543210 where Lambda_0123456789876543210 x a_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x a_0123456789876543210 arg_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 x0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210 - a_01234567898765432100123456789876543210 - arg_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 a_01234567898765432100123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 a_01234567898765432100123456789876543210 arg) => Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 x0123456789876543210 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 x0123456789876543210 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 x0123456789876543210 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 type family Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 x y where Lambda_0123456789876543210 a_0123456789876543210 a_0123456789876543210 x y = x - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - x0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 arg) => Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) data Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 where - Lambda_0123456789876543210Sym3KindInference :: forall a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - x0123456789876543210 - y0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym3KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 arg) => Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) type Lambda_0123456789876543210Sym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 y0123456789876543210 - instance SuppressUnusedWarnings Foo8Sym0 where - suppressUnusedWarnings = snd (((,) Foo8Sym0KindInference) ()) - data Foo8Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) (Foo a0123456789876543210 b0123456789876543210) a0123456789876543210 + type Foo8Sym0 :: (~>) (Foo a b) a + data Foo8Sym0 a0123456789876543210 where - Foo8Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo8Sym0 arg) (Foo8Sym1 arg) => + Foo8Sym0KindInference :: SameKind (Apply Foo8Sym0 arg) (Foo8Sym1 arg) => Foo8Sym0 a0123456789876543210 type instance Apply Foo8Sym0 a0123456789876543210 = Foo8Sym1 a0123456789876543210 - type Foo8Sym1 (a0123456789876543210 :: Foo a0123456789876543210 b0123456789876543210) = - Foo8 a0123456789876543210 - instance SuppressUnusedWarnings Foo7Sym0 where - suppressUnusedWarnings = snd (((,) Foo7Sym0KindInference) ()) - data Foo7Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210) + instance SuppressUnusedWarnings Foo8Sym0 where + suppressUnusedWarnings = snd (((,) Foo8Sym0KindInference) ()) + type Foo8Sym1 (a0123456789876543210 :: Foo a b) = + Foo8 a0123456789876543210 :: a + type Foo7Sym0 :: (~>) a ((~>) b b) + data Foo7Sym0 a0123456789876543210 where - Foo7Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo7Sym0 arg) (Foo7Sym1 arg) => + Foo7Sym0KindInference :: SameKind (Apply Foo7Sym0 arg) (Foo7Sym1 arg) => Foo7Sym0 a0123456789876543210 type instance Apply Foo7Sym0 a0123456789876543210 = Foo7Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foo7Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo7Sym1KindInference) ()) - data Foo7Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 b0123456789876543210 + instance SuppressUnusedWarnings Foo7Sym0 where + suppressUnusedWarnings = snd (((,) Foo7Sym0KindInference) ()) + type Foo7Sym1 :: a -> (~>) b b + data Foo7Sym1 a0123456789876543210 a0123456789876543210 where - Foo7Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo7Sym1 a0123456789876543210) arg) (Foo7Sym2 a0123456789876543210 arg) => + Foo7Sym1KindInference :: SameKind (Apply (Foo7Sym1 a0123456789876543210) arg) (Foo7Sym2 a0123456789876543210 arg) => Foo7Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Foo7Sym1 a0123456789876543210) a0123456789876543210 = Foo7Sym2 a0123456789876543210 a0123456789876543210 - type Foo7Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - Foo7 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings Foo6Sym0 where - suppressUnusedWarnings = snd (((,) Foo6Sym0KindInference) ()) - data Foo6Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210) + instance SuppressUnusedWarnings (Foo7Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo7Sym1KindInference) ()) + type Foo7Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Foo7 a0123456789876543210 a0123456789876543210 :: b + type Foo6Sym0 :: (~>) a ((~>) b a) + data Foo6Sym0 a0123456789876543210 where - Foo6Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo6Sym0 arg) (Foo6Sym1 arg) => + Foo6Sym0KindInference :: SameKind (Apply Foo6Sym0 arg) (Foo6Sym1 arg) => Foo6Sym0 a0123456789876543210 type instance Apply Foo6Sym0 a0123456789876543210 = Foo6Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foo6Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo6Sym1KindInference) ()) - data Foo6Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings Foo6Sym0 where + suppressUnusedWarnings = snd (((,) Foo6Sym0KindInference) ()) + type Foo6Sym1 :: a -> (~>) b a + data Foo6Sym1 a0123456789876543210 a0123456789876543210 where - Foo6Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo6Sym1 a0123456789876543210) arg) (Foo6Sym2 a0123456789876543210 arg) => + Foo6Sym1KindInference :: SameKind (Apply (Foo6Sym1 a0123456789876543210) arg) (Foo6Sym2 a0123456789876543210 arg) => Foo6Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Foo6Sym1 a0123456789876543210) a0123456789876543210 = Foo6Sym2 a0123456789876543210 a0123456789876543210 - type Foo6Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - Foo6 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings Foo5Sym0 where - suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ()) - data Foo5Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210) + instance SuppressUnusedWarnings (Foo6Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo6Sym1KindInference) ()) + type Foo6Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Foo6 a0123456789876543210 a0123456789876543210 :: a + type Foo5Sym0 :: (~>) a ((~>) b b) + data Foo5Sym0 a0123456789876543210 where - Foo5Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) => + Foo5Sym0KindInference :: SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) => Foo5Sym0 a0123456789876543210 type instance Apply Foo5Sym0 a0123456789876543210 = Foo5Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foo5Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo5Sym1KindInference) ()) - data Foo5Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 b0123456789876543210 + instance SuppressUnusedWarnings Foo5Sym0 where + suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ()) + type Foo5Sym1 :: a -> (~>) b b + data Foo5Sym1 a0123456789876543210 a0123456789876543210 where - Foo5Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo5Sym1 a0123456789876543210) arg) (Foo5Sym2 a0123456789876543210 arg) => + Foo5Sym1KindInference :: SameKind (Apply (Foo5Sym1 a0123456789876543210) arg) (Foo5Sym2 a0123456789876543210 arg) => Foo5Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Foo5Sym1 a0123456789876543210) a0123456789876543210 = Foo5Sym2 a0123456789876543210 a0123456789876543210 - type Foo5Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - Foo5 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings Foo4Sym0 where - suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ()) - data Foo4Sym0 :: forall a0123456789876543210 - b0123456789876543210 - c0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 a0123456789876543210)) + instance SuppressUnusedWarnings (Foo5Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo5Sym1KindInference) ()) + type Foo5Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Foo5 a0123456789876543210 a0123456789876543210 :: b + type Foo4Sym0 :: (~>) a ((~>) b ((~>) c a)) + data Foo4Sym0 a0123456789876543210 where - Foo4Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) => + Foo4Sym0KindInference :: SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) => Foo4Sym0 a0123456789876543210 type instance Apply Foo4Sym0 a0123456789876543210 = Foo4Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foo4Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo4Sym1KindInference) ()) - data Foo4Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210 - c0123456789876543210. - (~>) b0123456789876543210 ((~>) c0123456789876543210 a0123456789876543210) + instance SuppressUnusedWarnings Foo4Sym0 where + suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ()) + type Foo4Sym1 :: a -> (~>) b ((~>) c a) + data Foo4Sym1 a0123456789876543210 a0123456789876543210 where - Foo4Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo4Sym1 a0123456789876543210) arg) (Foo4Sym2 a0123456789876543210 arg) => + Foo4Sym1KindInference :: SameKind (Apply (Foo4Sym1 a0123456789876543210) arg) (Foo4Sym2 a0123456789876543210 arg) => Foo4Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Foo4Sym1 a0123456789876543210) a0123456789876543210 = Foo4Sym2 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings (Foo4Sym2 a0123456789876543210 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo4Sym2KindInference) ()) - data Foo4Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210. - (~>) c0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Foo4Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo4Sym1KindInference) ()) + type Foo4Sym2 :: a -> b -> (~>) c a + data Foo4Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - Foo4Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo4Sym2 a0123456789876543210 a0123456789876543210) arg) (Foo4Sym3 a0123456789876543210 a0123456789876543210 arg) => + Foo4Sym2KindInference :: SameKind (Apply (Foo4Sym2 a0123456789876543210 a0123456789876543210) arg) (Foo4Sym3 a0123456789876543210 a0123456789876543210 arg) => Foo4Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 type instance Apply (Foo4Sym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = Foo4Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 - type Foo4Sym3 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) (a0123456789876543210 :: c0123456789876543210) = - Foo4 a0123456789876543210 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings Foo3Sym0 where - suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ()) - data Foo3Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Foo4Sym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo4Sym2KindInference) ()) + type Foo4Sym3 (a0123456789876543210 :: a) (a0123456789876543210 :: b) (a0123456789876543210 :: c) = + Foo4 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: a + type Foo3Sym0 :: (~>) a a + data Foo3Sym0 a0123456789876543210 where - Foo3Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) => + Foo3Sym0KindInference :: SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) => Foo3Sym0 a0123456789876543210 type instance Apply Foo3Sym0 a0123456789876543210 = Foo3Sym1 a0123456789876543210 - type Foo3Sym1 (a0123456789876543210 :: a0123456789876543210) = - Foo3 a0123456789876543210 - instance SuppressUnusedWarnings Foo2Sym0 where - suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ()) - data Foo2Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210) + instance SuppressUnusedWarnings Foo3Sym0 where + suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ()) + type Foo3Sym1 (a0123456789876543210 :: a) = + Foo3 a0123456789876543210 :: a + type Foo2Sym0 :: (~>) a ((~>) b a) + data Foo2Sym0 a0123456789876543210 where - Foo2Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) => + Foo2Sym0KindInference :: SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) => Foo2Sym0 a0123456789876543210 type instance Apply Foo2Sym0 a0123456789876543210 = Foo2Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foo2Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo2Sym1KindInference) ()) - data Foo2Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings Foo2Sym0 where + suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ()) + type Foo2Sym1 :: a -> (~>) b a + data Foo2Sym1 a0123456789876543210 a0123456789876543210 where - Foo2Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo2Sym1 a0123456789876543210) arg) (Foo2Sym2 a0123456789876543210 arg) => + Foo2Sym1KindInference :: SameKind (Apply (Foo2Sym1 a0123456789876543210) arg) (Foo2Sym2 a0123456789876543210 arg) => Foo2Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Foo2Sym1 a0123456789876543210) a0123456789876543210 = Foo2Sym2 a0123456789876543210 a0123456789876543210 - type Foo2Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - Foo2 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings Foo1Sym0 where - suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ()) - data Foo1Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210) + instance SuppressUnusedWarnings (Foo2Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo2Sym1KindInference) ()) + type Foo2Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Foo2 a0123456789876543210 a0123456789876543210 :: a + type Foo1Sym0 :: (~>) a ((~>) b a) + data Foo1Sym0 a0123456789876543210 where - Foo1Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) => + Foo1Sym0KindInference :: SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) => Foo1Sym0 a0123456789876543210 type instance Apply Foo1Sym0 a0123456789876543210 = Foo1Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foo1Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo1Sym1KindInference) ()) - data Foo1Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings Foo1Sym0 where + suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ()) + type Foo1Sym1 :: a -> (~>) b a + data Foo1Sym1 a0123456789876543210 a0123456789876543210 where - Foo1Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo1Sym1 a0123456789876543210) arg) (Foo1Sym2 a0123456789876543210 arg) => + Foo1Sym1KindInference :: SameKind (Apply (Foo1Sym1 a0123456789876543210) arg) (Foo1Sym2 a0123456789876543210 arg) => Foo1Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Foo1Sym1 a0123456789876543210) a0123456789876543210 = Foo1Sym2 a0123456789876543210 a0123456789876543210 - type Foo1Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - Foo1 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings Foo0Sym0 where - suppressUnusedWarnings = snd (((,) Foo0Sym0KindInference) ()) - data Foo0Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210) + instance SuppressUnusedWarnings (Foo1Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo1Sym1KindInference) ()) + type Foo1Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Foo1 a0123456789876543210 a0123456789876543210 :: a + type Foo0Sym0 :: (~>) a ((~>) b a) + data Foo0Sym0 a0123456789876543210 where - Foo0Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo0Sym0 arg) (Foo0Sym1 arg) => + Foo0Sym0KindInference :: SameKind (Apply Foo0Sym0 arg) (Foo0Sym1 arg) => Foo0Sym0 a0123456789876543210 type instance Apply Foo0Sym0 a0123456789876543210 = Foo0Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foo0Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo0Sym1KindInference) ()) - data Foo0Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings Foo0Sym0 where + suppressUnusedWarnings = snd (((,) Foo0Sym0KindInference) ()) + type Foo0Sym1 :: a -> (~>) b a + data Foo0Sym1 a0123456789876543210 a0123456789876543210 where - Foo0Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo0Sym1 a0123456789876543210) arg) (Foo0Sym2 a0123456789876543210 arg) => + Foo0Sym1KindInference :: SameKind (Apply (Foo0Sym1 a0123456789876543210) arg) (Foo0Sym2 a0123456789876543210 arg) => Foo0Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Foo0Sym1 a0123456789876543210) a0123456789876543210 = Foo0Sym2 a0123456789876543210 a0123456789876543210 - type Foo0Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - Foo0 a0123456789876543210 a0123456789876543210 - type family Foo8 (a :: Foo a b) :: a where + instance SuppressUnusedWarnings (Foo0Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo0Sym1KindInference) ()) + type Foo0Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Foo0 a0123456789876543210 a0123456789876543210 :: a + type Foo8 :: Foo a b -> a + type family Foo8 a where Foo8 x = Apply (Apply Lambda_0123456789876543210Sym0 x) x - type family Foo7 (a :: a) (a :: b) :: b where + type Foo7 :: a -> b -> b + type family Foo7 a a 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 + type Foo6 :: a -> b -> a + type family Foo6 a a where Foo6 a b = Apply (Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) b) a) b - type family Foo5 (a :: a) (a :: b) :: b where + type Foo5 :: a -> b -> b + type family Foo5 a a where Foo5 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) y - type family Foo4 (a :: a) (a :: b) (a :: c) :: a where + type Foo4 :: a -> b -> c -> a + type family Foo4 a a 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 + type Foo3 :: a -> a + type family Foo3 a where Foo3 x = Apply (Apply Lambda_0123456789876543210Sym0 x) x - type family Foo2 (a :: a) (a :: b) :: a where + type Foo2 :: a -> b -> a + type family Foo2 a a where Foo2 x y = Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) y) y - type family Foo1 (a :: a) (a :: b) :: a where + type Foo1 :: a -> b -> a + type family Foo1 a 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 + type Foo0 :: a -> b -> a + type family Foo0 a 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) diff --git a/tests/compile-and-dump/Singletons/LambdasComprehensive.golden b/tests/compile-and-dump/Singletons/LambdasComprehensive.golden index cb906a78..ed871a54 100644 --- a/tests/compile-and-dump/Singletons/LambdasComprehensive.golden +++ b/tests/compile-and-dump/Singletons/LambdasComprehensive.golden @@ -14,22 +14,23 @@ Singletons/LambdasComprehensive.hs:(0,0)-(0,0): Splicing declarations bar = (map ((either_ pred) Succ)) [Left Zero, Right (Succ Zero)] type family Lambda_0123456789876543210 x where Lambda_0123456789876543210 x = Apply (Apply (Apply Either_Sym0 PredSym0) SuccSym0) x - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 x0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) type Lambda_0123456789876543210Sym1 x0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 - type BarSym0 = Bar - type FooSym0 = Foo - type family Bar :: [Nat] where + type BarSym0 = Bar :: [Nat] + type FooSym0 = Foo :: [Nat] + type Bar :: [Nat] + type family Bar where Bar = Apply (Apply MapSym0 (Apply (Apply Either_Sym0 PredSym0) SuccSym0)) (Apply (Apply (:@#@$) (Apply LeftSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply RightSym0 (Apply SuccSym0 ZeroSym0))) NilSym0)) - type family Foo :: [Nat] where + type Foo :: [Nat] + type family Foo where Foo = Apply (Apply MapSym0 Lambda_0123456789876543210Sym0) (Apply (Apply (:@#@$) (Apply LeftSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply RightSym0 (Apply SuccSym0 ZeroSym0))) NilSym0)) sBar :: Sing (BarSym0 :: [Nat]) sFoo :: Sing (FooSym0 :: [Nat]) diff --git a/tests/compile-and-dump/Singletons/LetStatements.golden b/tests/compile-and-dump/Singletons/LetStatements.golden index 13e7bbb0..293093c8 100644 --- a/tests/compile-and-dump/Singletons/LetStatements.golden +++ b/tests/compile-and-dump/Singletons/LetStatements.golden @@ -195,39 +195,36 @@ Singletons/LetStatements.hs:(0,0)-(0,0): Splicing declarations type family Case_0123456789876543210 x t where Case_0123456789876543210 x '(y_0123456789876543210, _) = y_0123456789876543210 - instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210ZSym0KindInference) ()) data Let0123456789876543210ZSym0 x0123456789876543210 where - Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) => + Let0123456789876543210ZSym0KindInference :: SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) => Let0123456789876543210ZSym0 x0123456789876543210 type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210ZSym1 x0123456789876543210 + instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210ZSym0KindInference) ()) type Let0123456789876543210ZSym1 x0123456789876543210 = Let0123456789876543210Z x0123456789876543210 - instance SuppressUnusedWarnings Let0123456789876543210YSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210YSym0KindInference) ()) data Let0123456789876543210YSym0 x0123456789876543210 where - Let0123456789876543210YSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) => + Let0123456789876543210YSym0KindInference :: SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) => Let0123456789876543210YSym0 x0123456789876543210 type instance Apply Let0123456789876543210YSym0 x0123456789876543210 = Let0123456789876543210YSym1 x0123456789876543210 + instance SuppressUnusedWarnings Let0123456789876543210YSym0 where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210YSym0KindInference) ()) type Let0123456789876543210YSym1 x0123456789876543210 = Let0123456789876543210Y x0123456789876543210 + data Let0123456789876543210X_0123456789876543210Sym0 x0123456789876543210 + where + Let0123456789876543210X_0123456789876543210Sym0KindInference :: SameKind (Apply Let0123456789876543210X_0123456789876543210Sym0 arg) (Let0123456789876543210X_0123456789876543210Sym1 arg) => + Let0123456789876543210X_0123456789876543210Sym0 x0123456789876543210 + type instance Apply Let0123456789876543210X_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210X_0123456789876543210Sym1 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_0123456789876543210Sym1 x0123456789876543210 type Let0123456789876543210X_0123456789876543210Sym1 x0123456789876543210 = Let0123456789876543210X_0123456789876543210 x0123456789876543210 type family Let0123456789876543210Z x where @@ -236,359 +233,311 @@ Singletons/LetStatements.hs:(0,0)-(0,0): Splicing declarations Let0123456789876543210Y x = Case_0123456789876543210 x (Let0123456789876543210X_0123456789876543210Sym1 x) type family Let0123456789876543210X_0123456789876543210 x where Let0123456789876543210X_0123456789876543210 x = Apply (Apply Tuple2Sym0 (Apply SuccSym0 x)) x - instance SuppressUnusedWarnings Let0123456789876543210BarSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210BarSym0KindInference) ()) data Let0123456789876543210BarSym0 x0123456789876543210 where - Let0123456789876543210BarSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210BarSym0 arg) (Let0123456789876543210BarSym1 arg) => + Let0123456789876543210BarSym0KindInference :: SameKind (Apply Let0123456789876543210BarSym0 arg) (Let0123456789876543210BarSym1 arg) => Let0123456789876543210BarSym0 x0123456789876543210 type instance Apply Let0123456789876543210BarSym0 x0123456789876543210 = Let0123456789876543210BarSym1 x0123456789876543210 + instance SuppressUnusedWarnings Let0123456789876543210BarSym0 where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210BarSym0KindInference) ()) type Let0123456789876543210BarSym1 x0123456789876543210 = - Let0123456789876543210Bar x0123456789876543210 + Let0123456789876543210Bar x0123456789876543210 :: a0123456789876543210 type family Let0123456789876543210Bar x :: a where Let0123456789876543210Bar x = x - instance SuppressUnusedWarnings (<<<%%%%%%%%%%%%%%%%%%%%@#@$) where - suppressUnusedWarnings - = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###)) ()) data (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 where - (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###) :: forall x0123456789876543210 - arg. SameKind (Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) arg) => + (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###) :: SameKind (Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) arg) => (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 type instance Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 - instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) where + instance SuppressUnusedWarnings (<<<%%%%%%%%%%%%%%%%%%%%@#@$) where suppressUnusedWarnings - = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###)) ()) + = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###)) ()) data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 :: (~>) Nat ((~>) Nat Nat) where - (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###) :: forall x0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 arg) => + (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###) :: SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 arg) => (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 a0123456789876543210 type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) where suppressUnusedWarnings - = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###)) ()) + = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###)) ()) data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 (a0123456789876543210 :: Nat) :: (~>) Nat Nat where - (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###) :: forall x0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 arg) => + (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###) :: SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 arg) => (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210 a0123456789876543210 type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###)) ()) type (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = - (<<<%%%%%%%%%%%%%%%%%%%%) x0123456789876543210 a0123456789876543210 a0123456789876543210 + (<<<%%%%%%%%%%%%%%%%%%%%) x0123456789876543210 a0123456789876543210 a0123456789876543210 :: Nat type family (<<<%%%%%%%%%%%%%%%%%%%%) x (a :: Nat) (a :: Nat) :: Nat where (<<<%%%%%%%%%%%%%%%%%%%%) x 'Zero m = m (<<<%%%%%%%%%%%%%%%%%%%%) x ('Succ n) m = Apply SuccSym0 (Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) n) x) - instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210ZSym0KindInference) ()) data Let0123456789876543210ZSym0 x0123456789876543210 where - Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) => + Let0123456789876543210ZSym0KindInference :: SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) => Let0123456789876543210ZSym0 x0123456789876543210 type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210ZSym1 x0123456789876543210 - type Let0123456789876543210ZSym1 x0123456789876543210 = - Let0123456789876543210Z x0123456789876543210 - instance SuppressUnusedWarnings (<<<%%%%%%%%%%%%%%%%%%%%@#@$) where + instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where suppressUnusedWarnings - = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###)) ()) + = snd (((,) Let0123456789876543210ZSym0KindInference) ()) + type Let0123456789876543210ZSym1 x0123456789876543210 = + Let0123456789876543210Z x0123456789876543210 :: Nat data (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 where - (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###) :: forall x0123456789876543210 - arg. SameKind (Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) arg) => + (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###) :: SameKind (Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) arg) => (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 type instance Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 - instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) where + instance SuppressUnusedWarnings (<<<%%%%%%%%%%%%%%%%%%%%@#@$) where suppressUnusedWarnings - = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###)) ()) + = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###)) ()) data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 :: (~>) Nat ((~>) Nat Nat) where - (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###) :: forall x0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 arg) => + (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###) :: SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 arg) => (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 a0123456789876543210 type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) where suppressUnusedWarnings - = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###)) ()) + = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###)) ()) data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 (a0123456789876543210 :: Nat) :: (~>) Nat Nat where - (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###) :: forall x0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 arg) => + (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###) :: SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 arg) => (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210 a0123456789876543210 type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###)) ()) type (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = - (<<<%%%%%%%%%%%%%%%%%%%%) x0123456789876543210 a0123456789876543210 a0123456789876543210 + (<<<%%%%%%%%%%%%%%%%%%%%) x0123456789876543210 a0123456789876543210 a0123456789876543210 :: Nat 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) - instance SuppressUnusedWarnings (<<<%%%%%%%%%%%%%%%%%%%%@#@$) where - suppressUnusedWarnings - = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###)) ()) data (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 where - (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###) :: forall x0123456789876543210 - arg. SameKind (Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) arg) => + (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###) :: SameKind (Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) arg) => (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 type instance Apply (<<<%%%%%%%%%%%%%%%%%%%%@#@$) x0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 - instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) where + instance SuppressUnusedWarnings (<<<%%%%%%%%%%%%%%%%%%%%@#@$) where suppressUnusedWarnings - = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###)) ()) + = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$###)) ()) data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 :: (~>) Nat ((~>) Nat Nat) where - (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###) :: forall x0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 arg) => + (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###) :: SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 arg) => (<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210 a0123456789876543210 type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x0123456789876543210) where suppressUnusedWarnings - = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###)) ()) + = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$###)) ()) data (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 (a0123456789876543210 :: Nat) :: (~>) Nat Nat where - (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###) :: forall x0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 arg) => + (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###) :: SameKind (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) arg) ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 arg) => (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210 a0123456789876543210 type instance Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) a0123456789876543210 = (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$$) x0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) (:<<<%%%%%%%%%%%%%%%%%%%%@#@$$$###)) ()) type (<<<%%%%%%%%%%%%%%%%%%%%@#@$$$$) x0123456789876543210 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = - (<<<%%%%%%%%%%%%%%%%%%%%) x0123456789876543210 a0123456789876543210 a0123456789876543210 + (<<<%%%%%%%%%%%%%%%%%%%%) x0123456789876543210 a0123456789876543210 a0123456789876543210 :: Nat 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 x where Lambda_0123456789876543210 a_0123456789876543210 x x = x - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) 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_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall a_01234567898765432100123456789876543210 - x0123456789876543210 - x0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 x0123456789876543210 arg) => Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210 x0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 x0123456789876543210 x0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 x0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 a_01234567898765432100123456789876543210 x0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 x0123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210ZSym0KindInference) ()) data Let0123456789876543210ZSym0 x0123456789876543210 where - Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) => + Let0123456789876543210ZSym0KindInference :: SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) => Let0123456789876543210ZSym0 x0123456789876543210 type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210ZSym1 x0123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210ZSym1 x0123456789876543210) where + instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where suppressUnusedWarnings - = snd (((,) Let0123456789876543210ZSym1KindInference) ()) + = snd (((,) Let0123456789876543210ZSym0KindInference) ()) data Let0123456789876543210ZSym1 x0123456789876543210 :: (~>) Nat Nat where - Let0123456789876543210ZSym1KindInference :: forall x0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Let0123456789876543210ZSym1 x0123456789876543210) arg) (Let0123456789876543210ZSym2 x0123456789876543210 arg) => + Let0123456789876543210ZSym1KindInference :: SameKind (Apply (Let0123456789876543210ZSym1 x0123456789876543210) arg) (Let0123456789876543210ZSym2 x0123456789876543210 arg) => Let0123456789876543210ZSym1 x0123456789876543210 a0123456789876543210 type instance Apply (Let0123456789876543210ZSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210ZSym2 x0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Let0123456789876543210ZSym1 x0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210ZSym1KindInference) ()) type Let0123456789876543210ZSym2 x0123456789876543210 (a0123456789876543210 :: Nat) = - Let0123456789876543210Z x0123456789876543210 a0123456789876543210 + Let0123456789876543210Z x0123456789876543210 a0123456789876543210 :: Nat 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 x where Lambda_0123456789876543210 x x = x - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 x0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 x0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210 - x0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => Lambda_0123456789876543210Sym1 x0123456789876543210 x0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 x0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) type Lambda_0123456789876543210Sym2 x0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210ZSym0KindInference) ()) data Let0123456789876543210ZSym0 x0123456789876543210 where - Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) => + Let0123456789876543210ZSym0KindInference :: SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) => Let0123456789876543210ZSym0 x0123456789876543210 type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210ZSym1 x0123456789876543210 + instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210ZSym0KindInference) ()) type Let0123456789876543210ZSym1 x0123456789876543210 = - Let0123456789876543210Z x0123456789876543210 + Let0123456789876543210Z x0123456789876543210 :: Nat type family Let0123456789876543210Z x :: Nat where Let0123456789876543210Z x = Apply (Apply Lambda_0123456789876543210Sym0 x) ZeroSym0 - instance SuppressUnusedWarnings Let0123456789876543210XSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210XSym0KindInference) ()) data Let0123456789876543210XSym0 x0123456789876543210 where - Let0123456789876543210XSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210XSym0 arg) (Let0123456789876543210XSym1 arg) => + Let0123456789876543210XSym0KindInference :: SameKind (Apply Let0123456789876543210XSym0 arg) (Let0123456789876543210XSym1 arg) => Let0123456789876543210XSym0 x0123456789876543210 type instance Apply Let0123456789876543210XSym0 x0123456789876543210 = Let0123456789876543210XSym1 x0123456789876543210 + instance SuppressUnusedWarnings Let0123456789876543210XSym0 where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210XSym0KindInference) ()) type Let0123456789876543210XSym1 x0123456789876543210 = - Let0123456789876543210X x0123456789876543210 + Let0123456789876543210X x0123456789876543210 :: Nat type family Let0123456789876543210X x :: Nat where Let0123456789876543210X x = ZeroSym0 - instance SuppressUnusedWarnings Let0123456789876543210FSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210FSym0KindInference) ()) data Let0123456789876543210FSym0 x0123456789876543210 where - Let0123456789876543210FSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) => + Let0123456789876543210FSym0KindInference :: SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) => Let0123456789876543210FSym0 x0123456789876543210 type instance Apply Let0123456789876543210FSym0 x0123456789876543210 = Let0123456789876543210FSym1 x0123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210FSym1 x0123456789876543210) where + instance SuppressUnusedWarnings Let0123456789876543210FSym0 where suppressUnusedWarnings - = snd (((,) Let0123456789876543210FSym1KindInference) ()) + = snd (((,) Let0123456789876543210FSym0KindInference) ()) data Let0123456789876543210FSym1 x0123456789876543210 :: (~>) Nat Nat where - Let0123456789876543210FSym1KindInference :: forall x0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Let0123456789876543210FSym1 x0123456789876543210) arg) (Let0123456789876543210FSym2 x0123456789876543210 arg) => + Let0123456789876543210FSym1KindInference :: SameKind (Apply (Let0123456789876543210FSym1 x0123456789876543210) arg) (Let0123456789876543210FSym2 x0123456789876543210 arg) => Let0123456789876543210FSym1 x0123456789876543210 a0123456789876543210 type instance Apply (Let0123456789876543210FSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210FSym2 x0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Let0123456789876543210FSym1 x0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210FSym1KindInference) ()) type Let0123456789876543210FSym2 x0123456789876543210 (a0123456789876543210 :: Nat) = - Let0123456789876543210F x0123456789876543210 a0123456789876543210 + Let0123456789876543210F x0123456789876543210 a0123456789876543210 :: Nat type family Let0123456789876543210F x (a :: Nat) :: Nat where Let0123456789876543210F x y = Apply SuccSym0 y - instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210ZSym0KindInference) ()) data Let0123456789876543210ZSym0 x0123456789876543210 where - Let0123456789876543210ZSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) => + Let0123456789876543210ZSym0KindInference :: SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) => Let0123456789876543210ZSym0 x0123456789876543210 type instance Apply Let0123456789876543210ZSym0 x0123456789876543210 = Let0123456789876543210ZSym1 x0123456789876543210 - type Let0123456789876543210ZSym1 x0123456789876543210 = - Let0123456789876543210Z x0123456789876543210 - type family Let0123456789876543210Z x :: Nat where - Let0123456789876543210Z x = Apply (Let0123456789876543210FSym1 x) x instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where suppressUnusedWarnings = snd (((,) Let0123456789876543210ZSym0KindInference) ()) + type Let0123456789876543210ZSym1 x0123456789876543210 = + Let0123456789876543210Z x0123456789876543210 :: Nat + type family Let0123456789876543210Z x :: Nat where + Let0123456789876543210Z x = Apply (Let0123456789876543210FSym1 x) x data Let0123456789876543210ZSym0 y0123456789876543210 where - Let0123456789876543210ZSym0KindInference :: forall y0123456789876543210 - arg. SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) => + Let0123456789876543210ZSym0KindInference :: SameKind (Apply Let0123456789876543210ZSym0 arg) (Let0123456789876543210ZSym1 arg) => Let0123456789876543210ZSym0 y0123456789876543210 type instance Apply Let0123456789876543210ZSym0 y0123456789876543210 = Let0123456789876543210ZSym1 y0123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210ZSym1 y0123456789876543210) where + instance SuppressUnusedWarnings Let0123456789876543210ZSym0 where suppressUnusedWarnings - = snd (((,) Let0123456789876543210ZSym1KindInference) ()) + = snd (((,) Let0123456789876543210ZSym0KindInference) ()) data Let0123456789876543210ZSym1 y0123456789876543210 x0123456789876543210 where - Let0123456789876543210ZSym1KindInference :: forall y0123456789876543210 - x0123456789876543210 - arg. SameKind (Apply (Let0123456789876543210ZSym1 y0123456789876543210) arg) (Let0123456789876543210ZSym2 y0123456789876543210 arg) => + Let0123456789876543210ZSym1KindInference :: SameKind (Apply (Let0123456789876543210ZSym1 y0123456789876543210) arg) (Let0123456789876543210ZSym2 y0123456789876543210 arg) => Let0123456789876543210ZSym1 y0123456789876543210 x0123456789876543210 type instance Apply (Let0123456789876543210ZSym1 y0123456789876543210) x0123456789876543210 = Let0123456789876543210ZSym2 y0123456789876543210 x0123456789876543210 + instance SuppressUnusedWarnings (Let0123456789876543210ZSym1 y0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210ZSym1KindInference) ()) type Let0123456789876543210ZSym2 y0123456789876543210 x0123456789876543210 = - Let0123456789876543210Z y0123456789876543210 x0123456789876543210 + Let0123456789876543210Z y0123456789876543210 x0123456789876543210 :: Nat type family Let0123456789876543210Z y x :: Nat where Let0123456789876543210Z y x = Apply SuccSym0 y - instance SuppressUnusedWarnings Let0123456789876543210FSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210FSym0KindInference) ()) data Let0123456789876543210FSym0 x0123456789876543210 where - Let0123456789876543210FSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) => + Let0123456789876543210FSym0KindInference :: SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) => Let0123456789876543210FSym0 x0123456789876543210 type instance Apply Let0123456789876543210FSym0 x0123456789876543210 = Let0123456789876543210FSym1 x0123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210FSym1 x0123456789876543210) where + instance SuppressUnusedWarnings Let0123456789876543210FSym0 where suppressUnusedWarnings - = snd (((,) Let0123456789876543210FSym1KindInference) ()) + = snd (((,) Let0123456789876543210FSym0KindInference) ()) data Let0123456789876543210FSym1 x0123456789876543210 :: (~>) Nat Nat where - Let0123456789876543210FSym1KindInference :: forall x0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Let0123456789876543210FSym1 x0123456789876543210) arg) (Let0123456789876543210FSym2 x0123456789876543210 arg) => + Let0123456789876543210FSym1KindInference :: SameKind (Apply (Let0123456789876543210FSym1 x0123456789876543210) arg) (Let0123456789876543210FSym2 x0123456789876543210 arg) => Let0123456789876543210FSym1 x0123456789876543210 a0123456789876543210 type instance Apply (Let0123456789876543210FSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210FSym2 x0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Let0123456789876543210FSym1 x0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210FSym1KindInference) ()) type Let0123456789876543210FSym2 x0123456789876543210 (a0123456789876543210 :: Nat) = - Let0123456789876543210F x0123456789876543210 a0123456789876543210 + Let0123456789876543210F x0123456789876543210 a0123456789876543210 :: Nat type family Let0123456789876543210F x (a :: Nat) :: Nat where Let0123456789876543210F x y = Apply SuccSym0 (Let0123456789876543210ZSym2 y x) - instance SuppressUnusedWarnings Let0123456789876543210FSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210FSym0KindInference) ()) data Let0123456789876543210FSym0 x0123456789876543210 where - Let0123456789876543210FSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) => + Let0123456789876543210FSym0KindInference :: SameKind (Apply Let0123456789876543210FSym0 arg) (Let0123456789876543210FSym1 arg) => Let0123456789876543210FSym0 x0123456789876543210 type instance Apply Let0123456789876543210FSym0 x0123456789876543210 = Let0123456789876543210FSym1 x0123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210FSym1 x0123456789876543210) where + instance SuppressUnusedWarnings Let0123456789876543210FSym0 where suppressUnusedWarnings - = snd (((,) Let0123456789876543210FSym1KindInference) ()) + = snd (((,) Let0123456789876543210FSym0KindInference) ()) data Let0123456789876543210FSym1 x0123456789876543210 :: (~>) Nat Nat where - Let0123456789876543210FSym1KindInference :: forall x0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Let0123456789876543210FSym1 x0123456789876543210) arg) (Let0123456789876543210FSym2 x0123456789876543210 arg) => + Let0123456789876543210FSym1KindInference :: SameKind (Apply (Let0123456789876543210FSym1 x0123456789876543210) arg) (Let0123456789876543210FSym2 x0123456789876543210 arg) => Let0123456789876543210FSym1 x0123456789876543210 a0123456789876543210 type instance Apply (Let0123456789876543210FSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210FSym2 x0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Let0123456789876543210FSym1 x0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210FSym1KindInference) ()) type Let0123456789876543210FSym2 x0123456789876543210 (a0123456789876543210 :: Nat) = - Let0123456789876543210F x0123456789876543210 a0123456789876543210 + Let0123456789876543210F x0123456789876543210 a0123456789876543210 :: Nat type family Let0123456789876543210F x (a :: Nat) :: Nat where Let0123456789876543210F x y = Apply SuccSym0 y - instance SuppressUnusedWarnings Let0123456789876543210YSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210YSym0KindInference) ()) data Let0123456789876543210YSym0 x0123456789876543210 where - Let0123456789876543210YSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) => + Let0123456789876543210YSym0KindInference :: SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) => Let0123456789876543210YSym0 x0123456789876543210 type instance Apply Let0123456789876543210YSym0 x0123456789876543210 = Let0123456789876543210YSym1 x0123456789876543210 + instance SuppressUnusedWarnings Let0123456789876543210YSym0 where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210YSym0KindInference) ()) type Let0123456789876543210YSym1 x0123456789876543210 = - Let0123456789876543210Y x0123456789876543210 + Let0123456789876543210Y x0123456789876543210 :: Nat type family Let0123456789876543210Y x :: Nat where Let0123456789876543210Y x = Apply SuccSym0 x type Let0123456789876543210ZSym0 = Let0123456789876543210Z @@ -597,191 +546,203 @@ Singletons/LetStatements.hs:(0,0)-(0,0): Splicing declarations Let0123456789876543210Z = Apply SuccSym0 Let0123456789876543210YSym0 type family Let0123456789876543210Y where Let0123456789876543210Y = Apply SuccSym0 ZeroSym0 - instance SuppressUnusedWarnings Let0123456789876543210YSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210YSym0KindInference) ()) data Let0123456789876543210YSym0 x0123456789876543210 where - Let0123456789876543210YSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) => + Let0123456789876543210YSym0KindInference :: SameKind (Apply Let0123456789876543210YSym0 arg) (Let0123456789876543210YSym1 arg) => Let0123456789876543210YSym0 x0123456789876543210 type instance Apply Let0123456789876543210YSym0 x0123456789876543210 = Let0123456789876543210YSym1 x0123456789876543210 + instance SuppressUnusedWarnings Let0123456789876543210YSym0 where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210YSym0KindInference) ()) type Let0123456789876543210YSym1 x0123456789876543210 = - Let0123456789876543210Y x0123456789876543210 + Let0123456789876543210Y x0123456789876543210 :: Nat type family Let0123456789876543210Y x :: Nat where Let0123456789876543210Y x = Apply SuccSym0 ZeroSym0 - instance SuppressUnusedWarnings Foo14Sym0 where - suppressUnusedWarnings = snd (((,) Foo14Sym0KindInference) ()) - data Foo14Sym0 :: (~>) Nat (Nat, Nat) + type Foo14Sym0 :: (~>) Nat (Nat, Nat) + data Foo14Sym0 a0123456789876543210 where - Foo14Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo14Sym0 arg) (Foo14Sym1 arg) => + Foo14Sym0KindInference :: SameKind (Apply Foo14Sym0 arg) (Foo14Sym1 arg) => Foo14Sym0 a0123456789876543210 type instance Apply Foo14Sym0 a0123456789876543210 = Foo14Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Foo14Sym0 where + suppressUnusedWarnings = snd (((,) Foo14Sym0KindInference) ()) type Foo14Sym1 (a0123456789876543210 :: Nat) = - Foo14 a0123456789876543210 - instance SuppressUnusedWarnings Foo13_Sym0 where - suppressUnusedWarnings = snd (((,) Foo13_Sym0KindInference) ()) - data Foo13_Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 a0123456789876543210 + Foo14 a0123456789876543210 :: (Nat, Nat) + type Foo13_Sym0 :: (~>) a a + data Foo13_Sym0 a0123456789876543210 where - Foo13_Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo13_Sym0 arg) (Foo13_Sym1 arg) => + Foo13_Sym0KindInference :: SameKind (Apply Foo13_Sym0 arg) (Foo13_Sym1 arg) => Foo13_Sym0 a0123456789876543210 type instance Apply Foo13_Sym0 a0123456789876543210 = Foo13_Sym1 a0123456789876543210 - type Foo13_Sym1 (a0123456789876543210 :: a0123456789876543210) = - Foo13_ a0123456789876543210 - instance SuppressUnusedWarnings Foo13Sym0 where - suppressUnusedWarnings = snd (((,) Foo13Sym0KindInference) ()) - data Foo13Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings Foo13_Sym0 where + suppressUnusedWarnings = snd (((,) Foo13_Sym0KindInference) ()) + type Foo13_Sym1 (a0123456789876543210 :: a) = + Foo13_ a0123456789876543210 :: a + type Foo13Sym0 :: forall a. (~>) a a + data Foo13Sym0 a0123456789876543210 where - Foo13Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo13Sym0 arg) (Foo13Sym1 arg) => + Foo13Sym0KindInference :: SameKind (Apply Foo13Sym0 arg) (Foo13Sym1 arg) => Foo13Sym0 a0123456789876543210 type instance Apply Foo13Sym0 a0123456789876543210 = Foo13Sym1 a0123456789876543210 - type Foo13Sym1 (a0123456789876543210 :: a0123456789876543210) = - Foo13 a0123456789876543210 - instance SuppressUnusedWarnings Foo12Sym0 where - suppressUnusedWarnings = snd (((,) Foo12Sym0KindInference) ()) - data Foo12Sym0 :: (~>) Nat Nat + instance SuppressUnusedWarnings Foo13Sym0 where + suppressUnusedWarnings = snd (((,) Foo13Sym0KindInference) ()) + type Foo13Sym1 (a0123456789876543210 :: a) = + Foo13 a0123456789876543210 :: a + type Foo12Sym0 :: (~>) Nat Nat + data Foo12Sym0 a0123456789876543210 where - Foo12Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo12Sym0 arg) (Foo12Sym1 arg) => + Foo12Sym0KindInference :: SameKind (Apply Foo12Sym0 arg) (Foo12Sym1 arg) => Foo12Sym0 a0123456789876543210 type instance Apply Foo12Sym0 a0123456789876543210 = Foo12Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Foo12Sym0 where + suppressUnusedWarnings = snd (((,) Foo12Sym0KindInference) ()) type Foo12Sym1 (a0123456789876543210 :: Nat) = - Foo12 a0123456789876543210 - instance SuppressUnusedWarnings Foo11Sym0 where - suppressUnusedWarnings = snd (((,) Foo11Sym0KindInference) ()) - data Foo11Sym0 :: (~>) Nat Nat + Foo12 a0123456789876543210 :: Nat + type Foo11Sym0 :: (~>) Nat Nat + data Foo11Sym0 a0123456789876543210 where - Foo11Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo11Sym0 arg) (Foo11Sym1 arg) => + Foo11Sym0KindInference :: SameKind (Apply Foo11Sym0 arg) (Foo11Sym1 arg) => Foo11Sym0 a0123456789876543210 type instance Apply Foo11Sym0 a0123456789876543210 = Foo11Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Foo11Sym0 where + suppressUnusedWarnings = snd (((,) Foo11Sym0KindInference) ()) type Foo11Sym1 (a0123456789876543210 :: Nat) = - Foo11 a0123456789876543210 - instance SuppressUnusedWarnings Foo10Sym0 where - suppressUnusedWarnings = snd (((,) Foo10Sym0KindInference) ()) - data Foo10Sym0 :: (~>) Nat Nat + Foo11 a0123456789876543210 :: Nat + type Foo10Sym0 :: (~>) Nat Nat + data Foo10Sym0 a0123456789876543210 where - Foo10Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo10Sym0 arg) (Foo10Sym1 arg) => + Foo10Sym0KindInference :: SameKind (Apply Foo10Sym0 arg) (Foo10Sym1 arg) => Foo10Sym0 a0123456789876543210 type instance Apply Foo10Sym0 a0123456789876543210 = Foo10Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Foo10Sym0 where + suppressUnusedWarnings = snd (((,) Foo10Sym0KindInference) ()) type Foo10Sym1 (a0123456789876543210 :: Nat) = - Foo10 a0123456789876543210 - instance SuppressUnusedWarnings Foo9Sym0 where - suppressUnusedWarnings = snd (((,) Foo9Sym0KindInference) ()) - data Foo9Sym0 :: (~>) Nat Nat + Foo10 a0123456789876543210 :: Nat + type Foo9Sym0 :: (~>) Nat Nat + data Foo9Sym0 a0123456789876543210 where - Foo9Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo9Sym0 arg) (Foo9Sym1 arg) => + Foo9Sym0KindInference :: SameKind (Apply Foo9Sym0 arg) (Foo9Sym1 arg) => Foo9Sym0 a0123456789876543210 type instance Apply Foo9Sym0 a0123456789876543210 = Foo9Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Foo9Sym0 where + suppressUnusedWarnings = snd (((,) Foo9Sym0KindInference) ()) type Foo9Sym1 (a0123456789876543210 :: Nat) = - Foo9 a0123456789876543210 - instance SuppressUnusedWarnings Foo8Sym0 where - suppressUnusedWarnings = snd (((,) Foo8Sym0KindInference) ()) - data Foo8Sym0 :: (~>) Nat Nat + Foo9 a0123456789876543210 :: Nat + type Foo8Sym0 :: (~>) Nat Nat + data Foo8Sym0 a0123456789876543210 where - Foo8Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo8Sym0 arg) (Foo8Sym1 arg) => + Foo8Sym0KindInference :: SameKind (Apply Foo8Sym0 arg) (Foo8Sym1 arg) => Foo8Sym0 a0123456789876543210 type instance Apply Foo8Sym0 a0123456789876543210 = Foo8Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Foo8Sym0 where + suppressUnusedWarnings = snd (((,) Foo8Sym0KindInference) ()) type Foo8Sym1 (a0123456789876543210 :: Nat) = - Foo8 a0123456789876543210 - instance SuppressUnusedWarnings Foo7Sym0 where - suppressUnusedWarnings = snd (((,) Foo7Sym0KindInference) ()) - data Foo7Sym0 :: (~>) Nat Nat + Foo8 a0123456789876543210 :: Nat + type Foo7Sym0 :: (~>) Nat Nat + data Foo7Sym0 a0123456789876543210 where - Foo7Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo7Sym0 arg) (Foo7Sym1 arg) => + Foo7Sym0KindInference :: SameKind (Apply Foo7Sym0 arg) (Foo7Sym1 arg) => Foo7Sym0 a0123456789876543210 type instance Apply Foo7Sym0 a0123456789876543210 = Foo7Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Foo7Sym0 where + suppressUnusedWarnings = snd (((,) Foo7Sym0KindInference) ()) type Foo7Sym1 (a0123456789876543210 :: Nat) = - Foo7 a0123456789876543210 - instance SuppressUnusedWarnings Foo6Sym0 where - suppressUnusedWarnings = snd (((,) Foo6Sym0KindInference) ()) - data Foo6Sym0 :: (~>) Nat Nat + Foo7 a0123456789876543210 :: Nat + type Foo6Sym0 :: (~>) Nat Nat + data Foo6Sym0 a0123456789876543210 where - Foo6Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo6Sym0 arg) (Foo6Sym1 arg) => + Foo6Sym0KindInference :: SameKind (Apply Foo6Sym0 arg) (Foo6Sym1 arg) => Foo6Sym0 a0123456789876543210 type instance Apply Foo6Sym0 a0123456789876543210 = Foo6Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Foo6Sym0 where + suppressUnusedWarnings = snd (((,) Foo6Sym0KindInference) ()) type Foo6Sym1 (a0123456789876543210 :: Nat) = - Foo6 a0123456789876543210 - instance SuppressUnusedWarnings Foo5Sym0 where - suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ()) - data Foo5Sym0 :: (~>) Nat Nat + Foo6 a0123456789876543210 :: Nat + type Foo5Sym0 :: (~>) Nat Nat + data Foo5Sym0 a0123456789876543210 where - Foo5Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) => + Foo5Sym0KindInference :: SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) => Foo5Sym0 a0123456789876543210 type instance Apply Foo5Sym0 a0123456789876543210 = Foo5Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Foo5Sym0 where + suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ()) type Foo5Sym1 (a0123456789876543210 :: Nat) = - Foo5 a0123456789876543210 - instance SuppressUnusedWarnings Foo4Sym0 where - suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ()) - data Foo4Sym0 :: (~>) Nat Nat + Foo5 a0123456789876543210 :: Nat + type Foo4Sym0 :: (~>) Nat Nat + data Foo4Sym0 a0123456789876543210 where - Foo4Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) => + Foo4Sym0KindInference :: SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) => Foo4Sym0 a0123456789876543210 type instance Apply Foo4Sym0 a0123456789876543210 = Foo4Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Foo4Sym0 where + suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ()) type Foo4Sym1 (a0123456789876543210 :: Nat) = - Foo4 a0123456789876543210 - instance SuppressUnusedWarnings Foo3Sym0 where - suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ()) - data Foo3Sym0 :: (~>) Nat Nat + Foo4 a0123456789876543210 :: Nat + type Foo3Sym0 :: (~>) Nat Nat + data Foo3Sym0 a0123456789876543210 where - Foo3Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) => + Foo3Sym0KindInference :: SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) => Foo3Sym0 a0123456789876543210 type instance Apply Foo3Sym0 a0123456789876543210 = Foo3Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Foo3Sym0 where + suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ()) type Foo3Sym1 (a0123456789876543210 :: Nat) = - Foo3 a0123456789876543210 - type Foo2Sym0 = Foo2 - instance SuppressUnusedWarnings Foo1Sym0 where - suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ()) - data Foo1Sym0 :: (~>) Nat Nat + Foo3 a0123456789876543210 :: Nat + type Foo2Sym0 = Foo2 :: Nat + type Foo1Sym0 :: (~>) Nat Nat + data Foo1Sym0 a0123456789876543210 where - Foo1Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) => + Foo1Sym0KindInference :: SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) => Foo1Sym0 a0123456789876543210 type instance Apply Foo1Sym0 a0123456789876543210 = Foo1Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Foo1Sym0 where + suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ()) type Foo1Sym1 (a0123456789876543210 :: Nat) = - Foo1 a0123456789876543210 - type family Foo14 (a :: Nat) :: (Nat, Nat) where + Foo1 a0123456789876543210 :: Nat + type Foo14 :: Nat -> (Nat, Nat) + type family Foo14 a where Foo14 x = Apply (Apply Tuple2Sym0 (Let0123456789876543210ZSym1 x)) (Let0123456789876543210YSym1 x) - type family Foo13_ (a :: a) :: a where + type Foo13_ :: a -> a + type family Foo13_ a where Foo13_ y = y - type family Foo13 (a :: a) :: a where + type Foo13 :: forall a. a -> a + type family Foo13 a where Foo13 x = Apply Foo13_Sym0 (Let0123456789876543210BarSym1 x) - type family Foo12 (a :: Nat) :: Nat where + type Foo12 :: Nat -> Nat + type family Foo12 a where Foo12 x = Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) x) (Apply SuccSym0 (Apply SuccSym0 ZeroSym0)) - type family Foo11 (a :: Nat) :: Nat where + type Foo11 :: Nat -> Nat + type family Foo11 a where Foo11 x = Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) (Apply SuccSym0 ZeroSym0)) (Let0123456789876543210ZSym1 x) - type family Foo10 (a :: Nat) :: Nat where + type Foo10 :: Nat -> Nat + type family Foo10 a where Foo10 x = Apply (Apply ((<<<%%%%%%%%%%%%%%%%%%%%@#@$$) x) (Apply SuccSym0 ZeroSym0)) x - type family Foo9 (a :: Nat) :: Nat where + type Foo9 :: Nat -> Nat + type family Foo9 a where Foo9 x = Apply (Let0123456789876543210ZSym1 x) x - type family Foo8 (a :: Nat) :: Nat where + type Foo8 :: Nat -> Nat + type family Foo8 a where Foo8 x = Let0123456789876543210ZSym1 x - type family Foo7 (a :: Nat) :: Nat where + type Foo7 :: Nat -> Nat + type family Foo7 a where Foo7 x = Let0123456789876543210XSym1 x - type family Foo6 (a :: Nat) :: Nat where + type Foo6 :: Nat -> Nat + type family Foo6 a where Foo6 x = Let0123456789876543210ZSym1 x - type family Foo5 (a :: Nat) :: Nat where + type Foo5 :: Nat -> Nat + type family Foo5 a where Foo5 x = Apply (Let0123456789876543210FSym1 x) x - type family Foo4 (a :: Nat) :: Nat where + type Foo4 :: Nat -> Nat + type family Foo4 a where Foo4 x = Apply (Let0123456789876543210FSym1 x) x - type family Foo3 (a :: Nat) :: Nat where + type Foo3 :: Nat -> Nat + type family Foo3 a where Foo3 x = Let0123456789876543210YSym1 x - type family Foo2 :: Nat where + type Foo2 :: Nat + type family Foo2 where Foo2 = Let0123456789876543210ZSym0 - type family Foo1 (a :: Nat) :: Nat where + type Foo1 :: Nat -> Nat + type family Foo1 a where Foo1 x = Let0123456789876543210YSym1 x sFoo14 :: forall (t :: Nat). Sing t -> Sing (Apply Foo14Sym0 t :: (Nat, Nat)) diff --git a/tests/compile-and-dump/Singletons/Maybe.golden b/tests/compile-and-dump/Singletons/Maybe.golden index 6058551b..35ce426e 100644 --- a/tests/compile-and-dump/Singletons/Maybe.golden +++ b/tests/compile-and-dump/Singletons/Maybe.golden @@ -7,58 +7,57 @@ Singletons/Maybe.hs:(0,0)-(0,0): Splicing declarations data Maybe a = Nothing | Just a deriving (Eq, Show) - type NothingSym0 = Nothing + type NothingSym0 = Nothing :: Maybe a + type JustSym0 :: forall a. (~>) a (Maybe a) + data JustSym0 a0123456789876543210 + where + JustSym0KindInference :: SameKind (Apply JustSym0 arg) (JustSym1 arg) => + JustSym0 a0123456789876543210 + type instance Apply JustSym0 a0123456789876543210 = JustSym1 a0123456789876543210 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 = JustSym1 t0123456789876543210 - type JustSym1 (t0123456789876543210 :: a0123456789876543210) = - Just t0123456789876543210 - type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Maybe a) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where + type JustSym1 (a0123456789876543210 :: a) = + Just a0123456789876543210 :: Maybe a + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> Maybe a -> GHC.Types.Symbol -> GHC.Types.Symbol + type family ShowsPrec_0123456789876543210 a a a 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 - 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)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) (Maybe a) ((~>) GHC.Types.Symbol GHC.Types.Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210. - (~>) (Maybe a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) (Maybe a) ((~>) GHC.Types.Symbol GHC.Types.Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Maybe a0123456789876543210) :: (~>) GHC.Types.Symbol GHC.Types.Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> Maybe a -> (~>) GHC.Types.Symbol GHC.Types.Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 - 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) ()) + type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Maybe a) (a0123456789876543210 :: GHC.Types.Symbol) = + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: GHC.Types.Symbol 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 + type Equals_0123456789876543210 :: Maybe a -> Maybe a -> Bool + type family Equals_0123456789876543210 a b where Equals_0123456789876543210 Nothing Nothing = TrueSym0 Equals_0123456789876543210 (Just a) (Just b) = (==) a b Equals_0123456789876543210 (_ :: Maybe a) (_ :: Maybe a) = FalseSym0 diff --git a/tests/compile-and-dump/Singletons/Nat.golden b/tests/compile-and-dump/Singletons/Nat.golden index c4bd2d50..82a31818 100644 --- a/tests/compile-and-dump/Singletons/Nat.golden +++ b/tests/compile-and-dump/Singletons/Nat.golden @@ -24,118 +24,121 @@ Singletons/Nat.hs:(0,0)-(0,0): Splicing declarations pred :: Nat -> Nat pred Zero = Zero pred (Succ n) = n - type ZeroSym0 = Zero + type ZeroSym0 = Zero :: Nat + type SuccSym0 :: (~>) Nat Nat + data SuccSym0 a0123456789876543210 + where + SuccSym0KindInference :: SameKind (Apply SuccSym0 arg) (SuccSym1 arg) => + SuccSym0 a0123456789876543210 + type instance Apply SuccSym0 a0123456789876543210 = SuccSym1 a0123456789876543210 instance SuppressUnusedWarnings SuccSym0 where suppressUnusedWarnings = snd (((,) SuccSym0KindInference) ()) - data SuccSym0 :: (~>) Nat Nat + type SuccSym1 (a0123456789876543210 :: Nat) = + Succ a0123456789876543210 :: Nat + type PredSym0 :: (~>) Nat Nat + data PredSym0 a0123456789876543210 where - SuccSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply SuccSym0 arg) (SuccSym1 arg) => - SuccSym0 t0123456789876543210 - type instance Apply SuccSym0 t0123456789876543210 = SuccSym1 t0123456789876543210 - type SuccSym1 (t0123456789876543210 :: Nat) = - Succ t0123456789876543210 - instance SuppressUnusedWarnings PredSym0 where - suppressUnusedWarnings = snd (((,) PredSym0KindInference) ()) - data PredSym0 :: (~>) Nat Nat - where - PredSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply PredSym0 arg) (PredSym1 arg) => + PredSym0KindInference :: SameKind (Apply PredSym0 arg) (PredSym1 arg) => PredSym0 a0123456789876543210 type instance Apply PredSym0 a0123456789876543210 = PredSym1 a0123456789876543210 + instance SuppressUnusedWarnings PredSym0 where + suppressUnusedWarnings = snd (((,) PredSym0KindInference) ()) type PredSym1 (a0123456789876543210 :: Nat) = - Pred a0123456789876543210 - instance SuppressUnusedWarnings PlusSym0 where - suppressUnusedWarnings = snd (((,) PlusSym0KindInference) ()) - data PlusSym0 :: (~>) Nat ((~>) Nat Nat) + Pred a0123456789876543210 :: Nat + type PlusSym0 :: (~>) Nat ((~>) Nat Nat) + data PlusSym0 a0123456789876543210 where - PlusSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply PlusSym0 arg) (PlusSym1 arg) => + PlusSym0KindInference :: SameKind (Apply PlusSym0 arg) (PlusSym1 arg) => PlusSym0 a0123456789876543210 type instance Apply PlusSym0 a0123456789876543210 = PlusSym1 a0123456789876543210 - instance SuppressUnusedWarnings (PlusSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) PlusSym1KindInference) ()) - data PlusSym1 (a0123456789876543210 :: Nat) :: (~>) Nat Nat + instance SuppressUnusedWarnings PlusSym0 where + suppressUnusedWarnings = snd (((,) PlusSym0KindInference) ()) + type PlusSym1 :: Nat -> (~>) Nat Nat + data PlusSym1 a0123456789876543210 a0123456789876543210 where - PlusSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (PlusSym1 a0123456789876543210) arg) (PlusSym2 a0123456789876543210 arg) => + PlusSym1KindInference :: SameKind (Apply (PlusSym1 a0123456789876543210) arg) (PlusSym2 a0123456789876543210 arg) => PlusSym1 a0123456789876543210 a0123456789876543210 type instance Apply (PlusSym1 a0123456789876543210) a0123456789876543210 = PlusSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (PlusSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) PlusSym1KindInference) ()) type PlusSym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = - Plus a0123456789876543210 a0123456789876543210 - type family Pred (a :: Nat) :: Nat where + Plus a0123456789876543210 a0123456789876543210 :: Nat + type Pred :: Nat -> Nat + type family Pred a where Pred Zero = ZeroSym0 Pred (Succ n) = n - type family Plus (a :: Nat) (a :: Nat) :: Nat where + type Plus :: Nat -> Nat -> Nat + type family Plus a a 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 + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> Nat -> GHC.Types.Symbol -> GHC.Types.Symbol + type family ShowsPrec_0123456789876543210 a a a 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 - instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) - data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Nat ((~>) GHC.Types.Symbol GHC.Types.Symbol)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Nat ((~>) GHC.Types.Symbol GHC.Types.Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Nat ((~>) GHC.Types.Symbol GHC.Types.Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) Nat ((~>) GHC.Types.Symbol GHC.Types.Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Nat) :: (~>) GHC.Types.Symbol GHC.Types.Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> Nat -> (~>) GHC.Types.Symbol GHC.Types.Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Nat) (a0123456789876543210 :: GHC.Types.Symbol) = - ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: GHC.Types.Symbol 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 + type Compare_0123456789876543210 :: Nat -> Nat -> Ordering + type family Compare_0123456789876543210 a a where Compare_0123456789876543210 Zero Zero = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) NilSym0 Compare_0123456789876543210 (Succ a_0123456789876543210) (Succ b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) NilSym0) Compare_0123456789876543210 Zero (Succ _) = LTSym0 Compare_0123456789876543210 (Succ _) Zero = GTSym0 - instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) - data Compare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering) + type Compare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering) + data Compare_0123456789876543210Sym0 a0123456789876543210 where - Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => + Compare_0123456789876543210Sym0KindInference :: SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => Compare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) - data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Nat Ordering + = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) + type Compare_0123456789876543210Sym1 :: Nat -> (~>) Nat Ordering + data Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => + Compare_0123456789876543210Sym1KindInference :: SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = - Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering instance POrd Nat where type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a - type family Equals_0123456789876543210 (a :: Nat) (b :: Nat) :: Bool where + type Equals_0123456789876543210 :: Nat -> Nat -> Bool + type family Equals_0123456789876543210 a b where Equals_0123456789876543210 Zero Zero = TrueSym0 Equals_0123456789876543210 (Succ a) (Succ b) = (==) a b Equals_0123456789876543210 (_ :: Nat) (_ :: Nat) = FalseSym0 diff --git a/tests/compile-and-dump/Singletons/Operators.golden b/tests/compile-and-dump/Singletons/Operators.golden index 10fbc143..668c1afc 100644 --- a/tests/compile-and-dump/Singletons/Operators.golden +++ b/tests/compile-and-dump/Singletons/Operators.golden @@ -22,59 +22,59 @@ Singletons/Operators.hs:(0,0)-(0,0): Splicing declarations (+) :: Nat -> Nat -> Nat (+) Zero m = m (+) (Succ n) m = Succ (n + m) - type FLeafSym0 = FLeaf + type FLeafSym0 = FLeaf :: Foo + type (:+:@#@$) :: (~>) Foo ((~>) Foo Foo) + data (:+:@#@$) a0123456789876543210 + where + (::+:@#@$###) :: SameKind (Apply (:+:@#@$) arg) ((:+:@#@$$) arg) => + (:+:@#@$) a0123456789876543210 + type instance Apply (:+:@#@$) a0123456789876543210 = (:+:@#@$$) a0123456789876543210 instance SuppressUnusedWarnings (:+:@#@$) where suppressUnusedWarnings = snd (((,) (::+:@#@$###)) ()) - data (:+:@#@$) :: (~>) Foo ((~>) Foo Foo) + type (:+:@#@$$) :: Foo -> (~>) Foo Foo + data (:+:@#@$$) a0123456789876543210 a0123456789876543210 where - (::+:@#@$###) :: forall t0123456789876543210 - arg. SameKind (Apply (:+:@#@$) arg) ((:+:@#@$$) arg) => - (:+:@#@$) t0123456789876543210 - type instance Apply (:+:@#@$) t0123456789876543210 = (:+:@#@$$) t0123456789876543210 - instance SuppressUnusedWarnings ((:+:@#@$$) t0123456789876543210) where + (::+:@#@$$###) :: SameKind (Apply ((:+:@#@$$) a0123456789876543210) arg) ((:+:@#@$$$) a0123456789876543210 arg) => + (:+:@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((:+:@#@$$) a0123456789876543210) a0123456789876543210 = (:+:@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((:+:@#@$$) a0123456789876543210) 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 - type (:+:@#@$$$) (t0123456789876543210 :: Foo) (t0123456789876543210 :: Foo) = - (:+:) t0123456789876543210 t0123456789876543210 - instance SuppressUnusedWarnings (+@#@$) where - suppressUnusedWarnings = snd (((,) (:+@#@$###)) ()) - data (+@#@$) :: (~>) Nat ((~>) Nat Nat) + type (:+:@#@$$$) (a0123456789876543210 :: Foo) (a0123456789876543210 :: Foo) = + (:+:) a0123456789876543210 a0123456789876543210 :: Foo + type (+@#@$) :: (~>) Nat ((~>) Nat Nat) + data (+@#@$) a0123456789876543210 where - (:+@#@$###) :: forall a0123456789876543210 - arg. SameKind (Apply (+@#@$) arg) ((+@#@$$) arg) => + (:+@#@$###) :: SameKind (Apply (+@#@$) arg) ((+@#@$$) arg) => (+@#@$) a0123456789876543210 type instance Apply (+@#@$) a0123456789876543210 = (+@#@$$) a0123456789876543210 - instance SuppressUnusedWarnings ((+@#@$$) a0123456789876543210) where - suppressUnusedWarnings = snd (((,) (:+@#@$$###)) ()) - data (+@#@$$) (a0123456789876543210 :: Nat) :: (~>) Nat Nat + instance SuppressUnusedWarnings (+@#@$) where + suppressUnusedWarnings = snd (((,) (:+@#@$###)) ()) + type (+@#@$$) :: Nat -> (~>) Nat Nat + data (+@#@$$) a0123456789876543210 a0123456789876543210 where - (:+@#@$$###) :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply ((+@#@$$) a0123456789876543210) arg) ((+@#@$$$) a0123456789876543210 arg) => + (:+@#@$$###) :: SameKind (Apply ((+@#@$$) a0123456789876543210) arg) ((+@#@$$$) a0123456789876543210 arg) => (+@#@$$) a0123456789876543210 a0123456789876543210 type instance Apply ((+@#@$$) a0123456789876543210) a0123456789876543210 = (+@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((+@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (:+@#@$$###)) ()) type (+@#@$$$) (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = - (+) a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings ChildSym0 where - suppressUnusedWarnings = snd (((,) ChildSym0KindInference) ()) - data ChildSym0 :: (~>) Foo Foo + (+) a0123456789876543210 a0123456789876543210 :: Nat + type ChildSym0 :: (~>) Foo Foo + data ChildSym0 a0123456789876543210 where - ChildSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ChildSym0 arg) (ChildSym1 arg) => + ChildSym0KindInference :: SameKind (Apply ChildSym0 arg) (ChildSym1 arg) => ChildSym0 a0123456789876543210 type instance Apply ChildSym0 a0123456789876543210 = ChildSym1 a0123456789876543210 + instance SuppressUnusedWarnings ChildSym0 where + suppressUnusedWarnings = snd (((,) ChildSym0KindInference) ()) type ChildSym1 (a0123456789876543210 :: Foo) = - Child a0123456789876543210 - type family (+) (a :: Nat) (a :: Nat) :: Nat where + Child a0123456789876543210 :: Foo + type (+) :: Nat -> Nat -> Nat + type family (+) a a where (+) 'Zero m = m (+) ('Succ n) m = Apply SuccSym0 (Apply (Apply (+@#@$) n) m) - type family Child (a :: Foo) :: Foo where + type Child :: Foo -> Foo + type family Child a where Child FLeaf = FLeafSym0 Child ((:+:) a _) = a (%+) :: diff --git a/tests/compile-and-dump/Singletons/OrdDeriving.golden b/tests/compile-and-dump/Singletons/OrdDeriving.golden index ce2eed21..935c3326 100644 --- a/tests/compile-and-dump/Singletons/OrdDeriving.golden +++ b/tests/compile-and-dump/Singletons/OrdDeriving.golden @@ -23,346 +23,270 @@ Singletons/OrdDeriving.hs:(0,0)-(0,0): Splicing declarations E a b c d | F a b c d deriving (Eq, Ord) - type ZeroSym0 = Zero + type ZeroSym0 = Zero :: Nat + type SuccSym0 :: (~>) Nat Nat + data SuccSym0 a0123456789876543210 + where + SuccSym0KindInference :: SameKind (Apply SuccSym0 arg) (SuccSym1 arg) => + SuccSym0 a0123456789876543210 + type instance Apply SuccSym0 a0123456789876543210 = SuccSym1 a0123456789876543210 instance SuppressUnusedWarnings SuccSym0 where suppressUnusedWarnings = snd (((,) SuccSym0KindInference) ()) - data SuccSym0 :: (~>) Nat Nat + type SuccSym1 (a0123456789876543210 :: Nat) = + Succ a0123456789876543210 :: Nat + type ASym0 :: forall a b c d. + (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d)))) + data ASym0 a0123456789876543210 where - SuccSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply SuccSym0 arg) (SuccSym1 arg) => - SuccSym0 t0123456789876543210 - type instance Apply SuccSym0 t0123456789876543210 = SuccSym1 t0123456789876543210 - type SuccSym1 (t0123456789876543210 :: Nat) = - Succ t0123456789876543210 + ASym0KindInference :: SameKind (Apply ASym0 arg) (ASym1 arg) => + ASym0 a0123456789876543210 + type instance Apply ASym0 a0123456789876543210 = ASym1 a0123456789876543210 instance SuppressUnusedWarnings ASym0 where suppressUnusedWarnings = snd (((,) ASym0KindInference) ()) - data ASym0 :: forall a0123456789876543210 - b0123456789876543210 - c0123456789876543210 - d0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))) + type ASym1 :: forall a b c d. + a -> (~>) b ((~>) c ((~>) d (Foo a b c d))) + data ASym1 a0123456789876543210 a0123456789876543210 where - ASym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply ASym0 arg) (ASym1 arg) => - ASym0 t0123456789876543210 - type instance Apply ASym0 t0123456789876543210 = ASym1 t0123456789876543210 - instance SuppressUnusedWarnings (ASym1 t0123456789876543210) where + ASym1KindInference :: SameKind (Apply (ASym1 a0123456789876543210) arg) (ASym2 a0123456789876543210 arg) => + ASym1 a0123456789876543210 a0123456789876543210 + type instance Apply (ASym1 a0123456789876543210) a0123456789876543210 = ASym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ASym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) ASym1KindInference) ()) - data ASym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210 - c0123456789876543210 - d0123456789876543210. - (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))) + type ASym2 :: forall a b c d. + a -> b -> (~>) c ((~>) d (Foo a b c d)) + data ASym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (ASym2 t0123456789876543210 t0123456789876543210) where + ASym2KindInference :: SameKind (Apply (ASym2 a0123456789876543210 a0123456789876543210) arg) (ASym3 a0123456789876543210 a0123456789876543210 arg) => + ASym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (ASym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ASym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ASym2 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) ASym2KindInference) ()) - data ASym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210 - d0123456789876543210. - (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)) + type ASym3 :: forall a b c d. a -> b -> c -> (~>) d (Foo a b c d) + data ASym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (ASym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where + ASym3KindInference :: SameKind (Apply (ASym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) arg) (ASym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 arg) => + ASym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (ASym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ASym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ASym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) ASym3KindInference) ()) - data ASym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210. - (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) + type ASym4 (a0123456789876543210 :: a) (a0123456789876543210 :: b) (a0123456789876543210 :: c) (a0123456789876543210 :: d) = + A a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Foo a b c d + type BSym0 :: forall a b c d. + (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d)))) + data BSym0 a0123456789876543210 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 = ASym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 - type ASym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) = - A t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 + BSym0KindInference :: SameKind (Apply BSym0 arg) (BSym1 arg) => + BSym0 a0123456789876543210 + type instance Apply BSym0 a0123456789876543210 = BSym1 a0123456789876543210 instance SuppressUnusedWarnings BSym0 where suppressUnusedWarnings = snd (((,) BSym0KindInference) ()) - data BSym0 :: forall a0123456789876543210 - b0123456789876543210 - c0123456789876543210 - d0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))) + type BSym1 :: forall a b c d. + a -> (~>) b ((~>) c ((~>) d (Foo a b c d))) + data BSym1 a0123456789876543210 a0123456789876543210 where - BSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply BSym0 arg) (BSym1 arg) => - BSym0 t0123456789876543210 - type instance Apply BSym0 t0123456789876543210 = BSym1 t0123456789876543210 - instance SuppressUnusedWarnings (BSym1 t0123456789876543210) where + BSym1KindInference :: SameKind (Apply (BSym1 a0123456789876543210) arg) (BSym2 a0123456789876543210 arg) => + BSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (BSym1 a0123456789876543210) a0123456789876543210 = BSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (BSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) BSym1KindInference) ()) - data BSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210 - c0123456789876543210 - d0123456789876543210. - (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))) + type BSym2 :: forall a b c d. + a -> b -> (~>) c ((~>) d (Foo a b c d)) + data BSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (BSym2 t0123456789876543210 t0123456789876543210) where + BSym2KindInference :: SameKind (Apply (BSym2 a0123456789876543210 a0123456789876543210) arg) (BSym3 a0123456789876543210 a0123456789876543210 arg) => + BSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (BSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = BSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (BSym2 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) BSym2KindInference) ()) - data BSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210 - d0123456789876543210. - (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)) + type BSym3 :: forall a b c d. a -> b -> c -> (~>) d (Foo a b c d) + data BSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (BSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where + BSym3KindInference :: SameKind (Apply (BSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) arg) (BSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 arg) => + BSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (BSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) a0123456789876543210 = BSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (BSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) BSym3KindInference) ()) - data BSym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210. - (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) + type BSym4 (a0123456789876543210 :: a) (a0123456789876543210 :: b) (a0123456789876543210 :: c) (a0123456789876543210 :: d) = + B a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Foo a b c d + type CSym0 :: forall a b c d. + (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d)))) + data CSym0 a0123456789876543210 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 = BSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 - type BSym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) = - B t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 + CSym0KindInference :: SameKind (Apply CSym0 arg) (CSym1 arg) => + CSym0 a0123456789876543210 + type instance Apply CSym0 a0123456789876543210 = CSym1 a0123456789876543210 instance SuppressUnusedWarnings CSym0 where suppressUnusedWarnings = snd (((,) CSym0KindInference) ()) - data CSym0 :: forall a0123456789876543210 - b0123456789876543210 - c0123456789876543210 - d0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))) + type CSym1 :: forall a b c d. + a -> (~>) b ((~>) c ((~>) d (Foo a b c d))) + data CSym1 a0123456789876543210 a0123456789876543210 where - CSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply CSym0 arg) (CSym1 arg) => - CSym0 t0123456789876543210 - type instance Apply CSym0 t0123456789876543210 = CSym1 t0123456789876543210 - instance SuppressUnusedWarnings (CSym1 t0123456789876543210) where + CSym1KindInference :: SameKind (Apply (CSym1 a0123456789876543210) arg) (CSym2 a0123456789876543210 arg) => + CSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (CSym1 a0123456789876543210) a0123456789876543210 = CSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (CSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) CSym1KindInference) ()) - data CSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210 - c0123456789876543210 - d0123456789876543210. - (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))) + type CSym2 :: forall a b c d. + a -> b -> (~>) c ((~>) d (Foo a b c d)) + data CSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (CSym2 t0123456789876543210 t0123456789876543210) where + CSym2KindInference :: SameKind (Apply (CSym2 a0123456789876543210 a0123456789876543210) arg) (CSym3 a0123456789876543210 a0123456789876543210 arg) => + CSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (CSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = CSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (CSym2 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) CSym2KindInference) ()) - data CSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210 - d0123456789876543210. - (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)) + type CSym3 :: forall a b c d. a -> b -> c -> (~>) d (Foo a b c d) + data CSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (CSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where + CSym3KindInference :: SameKind (Apply (CSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) arg) (CSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 arg) => + CSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (CSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) a0123456789876543210 = CSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (CSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) CSym3KindInference) ()) - data CSym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210. - (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) + type CSym4 (a0123456789876543210 :: a) (a0123456789876543210 :: b) (a0123456789876543210 :: c) (a0123456789876543210 :: d) = + C a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Foo a b c d + type DSym0 :: forall a b c d. + (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d)))) + data DSym0 a0123456789876543210 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 = CSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 - type CSym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) = - C t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 + DSym0KindInference :: SameKind (Apply DSym0 arg) (DSym1 arg) => + DSym0 a0123456789876543210 + type instance Apply DSym0 a0123456789876543210 = DSym1 a0123456789876543210 instance SuppressUnusedWarnings DSym0 where suppressUnusedWarnings = snd (((,) DSym0KindInference) ()) - data DSym0 :: forall a0123456789876543210 - b0123456789876543210 - c0123456789876543210 - d0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))) + type DSym1 :: forall a b c d. + a -> (~>) b ((~>) c ((~>) d (Foo a b c d))) + data DSym1 a0123456789876543210 a0123456789876543210 where - DSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply DSym0 arg) (DSym1 arg) => - DSym0 t0123456789876543210 - type instance Apply DSym0 t0123456789876543210 = DSym1 t0123456789876543210 - instance SuppressUnusedWarnings (DSym1 t0123456789876543210) where + DSym1KindInference :: SameKind (Apply (DSym1 a0123456789876543210) arg) (DSym2 a0123456789876543210 arg) => + DSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (DSym1 a0123456789876543210) a0123456789876543210 = DSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (DSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) DSym1KindInference) ()) - data DSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210 - c0123456789876543210 - d0123456789876543210. - (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))) + type DSym2 :: forall a b c d. + a -> b -> (~>) c ((~>) d (Foo a b c d)) + data DSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (DSym2 t0123456789876543210 t0123456789876543210) where + DSym2KindInference :: SameKind (Apply (DSym2 a0123456789876543210 a0123456789876543210) arg) (DSym3 a0123456789876543210 a0123456789876543210 arg) => + DSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (DSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = DSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (DSym2 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) DSym2KindInference) ()) - data DSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210 - d0123456789876543210. - (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)) + type DSym3 :: forall a b c d. a -> b -> c -> (~>) d (Foo a b c d) + data DSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (DSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where + DSym3KindInference :: SameKind (Apply (DSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) arg) (DSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 arg) => + DSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (DSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) a0123456789876543210 = DSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (DSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) DSym3KindInference) ()) - data DSym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210. - (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) + type DSym4 (a0123456789876543210 :: a) (a0123456789876543210 :: b) (a0123456789876543210 :: c) (a0123456789876543210 :: d) = + D a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Foo a b c d + type ESym0 :: forall a b c d. + (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d)))) + data ESym0 a0123456789876543210 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 = DSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 - type DSym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) = - D t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 + ESym0KindInference :: SameKind (Apply ESym0 arg) (ESym1 arg) => + ESym0 a0123456789876543210 + type instance Apply ESym0 a0123456789876543210 = ESym1 a0123456789876543210 instance SuppressUnusedWarnings ESym0 where suppressUnusedWarnings = snd (((,) ESym0KindInference) ()) - data ESym0 :: forall a0123456789876543210 - b0123456789876543210 - c0123456789876543210 - d0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))) + type ESym1 :: forall a b c d. + a -> (~>) b ((~>) c ((~>) d (Foo a b c d))) + data ESym1 a0123456789876543210 a0123456789876543210 where - ESym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply ESym0 arg) (ESym1 arg) => - ESym0 t0123456789876543210 - type instance Apply ESym0 t0123456789876543210 = ESym1 t0123456789876543210 - instance SuppressUnusedWarnings (ESym1 t0123456789876543210) where + ESym1KindInference :: SameKind (Apply (ESym1 a0123456789876543210) arg) (ESym2 a0123456789876543210 arg) => + ESym1 a0123456789876543210 a0123456789876543210 + type instance Apply (ESym1 a0123456789876543210) a0123456789876543210 = ESym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ESym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) ESym1KindInference) ()) - data ESym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210 - c0123456789876543210 - d0123456789876543210. - (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))) + type ESym2 :: forall a b c d. + a -> b -> (~>) c ((~>) d (Foo a b c d)) + data ESym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (ESym2 t0123456789876543210 t0123456789876543210) where + ESym2KindInference :: SameKind (Apply (ESym2 a0123456789876543210 a0123456789876543210) arg) (ESym3 a0123456789876543210 a0123456789876543210 arg) => + ESym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (ESym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ESym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ESym2 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) ESym2KindInference) ()) - data ESym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210 - d0123456789876543210. - (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)) + type ESym3 :: forall a b c d. a -> b -> c -> (~>) d (Foo a b c d) + data ESym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (ESym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where + ESym3KindInference :: SameKind (Apply (ESym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) arg) (ESym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 arg) => + ESym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (ESym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ESym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ESym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) ESym3KindInference) ()) - data ESym3 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) :: forall d0123456789876543210. - (~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) + type ESym4 (a0123456789876543210 :: a) (a0123456789876543210 :: b) (a0123456789876543210 :: c) (a0123456789876543210 :: d) = + E a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Foo a b c d + type FSym0 :: forall a b c d. + (~>) a ((~>) b ((~>) c ((~>) d (Foo a b c d)))) + data FSym0 a0123456789876543210 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 = ESym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 - type ESym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) = - E t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 + FSym0KindInference :: SameKind (Apply FSym0 arg) (FSym1 arg) => + FSym0 a0123456789876543210 + type instance Apply FSym0 a0123456789876543210 = FSym1 a0123456789876543210 instance SuppressUnusedWarnings FSym0 where suppressUnusedWarnings = snd (((,) FSym0KindInference) ()) - data FSym0 :: forall a0123456789876543210 - b0123456789876543210 - c0123456789876543210 - d0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)))) + type FSym1 :: forall a b c d. + a -> (~>) b ((~>) c ((~>) d (Foo a b c d))) + data FSym1 a0123456789876543210 a0123456789876543210 where - FSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply FSym0 arg) (FSym1 arg) => - FSym0 t0123456789876543210 - type instance Apply FSym0 t0123456789876543210 = FSym1 t0123456789876543210 - instance SuppressUnusedWarnings (FSym1 t0123456789876543210) where + FSym1KindInference :: SameKind (Apply (FSym1 a0123456789876543210) arg) (FSym2 a0123456789876543210 arg) => + FSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (FSym1 a0123456789876543210) a0123456789876543210 = FSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (FSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) FSym1KindInference) ()) - data FSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210 - c0123456789876543210 - d0123456789876543210. - (~>) b0123456789876543210 ((~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210))) + type FSym2 :: forall a b c d. + a -> b -> (~>) c ((~>) d (Foo a b c d)) + data FSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (FSym2 t0123456789876543210 t0123456789876543210) where + FSym2KindInference :: SameKind (Apply (FSym2 a0123456789876543210 a0123456789876543210) arg) (FSym3 a0123456789876543210 a0123456789876543210 arg) => + FSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (FSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = FSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (FSym2 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) FSym2KindInference) ()) - data FSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) :: forall c0123456789876543210 - d0123456789876543210. - (~>) c0123456789876543210 ((~>) d0123456789876543210 (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210)) + type FSym3 :: forall a b c d. a -> b -> c -> (~>) d (Foo a b c d) + data FSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (FSym3 t0123456789876543210 t0123456789876543210 t0123456789876543210) where + FSym3KindInference :: SameKind (Apply (FSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) arg) (FSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 arg) => + FSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (FSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) a0123456789876543210 = FSym4 a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (FSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210) 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 = FSym4 t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 - type FSym4 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) (t0123456789876543210 :: c0123456789876543210) (t0123456789876543210 :: d0123456789876543210) = - F t0123456789876543210 t0123456789876543210 t0123456789876543210 t0123456789876543210 - type family Compare_0123456789876543210 (a :: Nat) (a :: Nat) :: Ordering where + type FSym4 (a0123456789876543210 :: a) (a0123456789876543210 :: b) (a0123456789876543210 :: c) (a0123456789876543210 :: d) = + F a0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Foo a b c d + type Compare_0123456789876543210 :: Nat -> Nat -> Ordering + type family Compare_0123456789876543210 a a where Compare_0123456789876543210 Zero Zero = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) NilSym0 Compare_0123456789876543210 (Succ a_0123456789876543210) (Succ b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) NilSym0) Compare_0123456789876543210 Zero (Succ _) = LTSym0 Compare_0123456789876543210 (Succ _) Zero = GTSym0 - instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) - data Compare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering) + type Compare_0123456789876543210Sym0 :: (~>) Nat ((~>) Nat Ordering) + data Compare_0123456789876543210Sym0 a0123456789876543210 where - Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => + Compare_0123456789876543210Sym0KindInference :: SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => Compare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) - data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Nat Ordering + = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) + type Compare_0123456789876543210Sym1 :: Nat -> (~>) Nat Ordering + data Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => + Compare_0123456789876543210Sym1KindInference :: SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = - Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering 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 + type Compare_0123456789876543210 :: Foo a b c d + -> Foo a b c d -> Ordering + type family Compare_0123456789876543210 a a 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)) NilSym0)))) 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)) NilSym0)))) 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)) NilSym0)))) @@ -399,40 +323,39 @@ Singletons/OrdDeriving.hs:(0,0)-(0,0): Splicing declarations Compare_0123456789876543210 (F _ _ _ _) (C _ _ _ _) = GTSym0 Compare_0123456789876543210 (F _ _ _ _) (D _ _ _ _) = GTSym0 Compare_0123456789876543210 (F _ _ _ _) (E _ _ _ _) = GTSym0 - 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) + type Compare_0123456789876543210Sym0 :: (~>) (Foo a b c d) ((~>) (Foo a b c d) Ordering) + data Compare_0123456789876543210Sym0 a0123456789876543210 where - Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => + Compare_0123456789876543210Sym0KindInference :: SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => Compare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) - data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) :: (~>) (Foo a0123456789876543210 b0123456789876543210 c0123456789876543210 d0123456789876543210) Ordering + = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) + type Compare_0123456789876543210Sym1 :: Foo a b c d + -> (~>) (Foo a b c d) Ordering + data Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => + Compare_0123456789876543210Sym1KindInference :: SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - 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) ()) + type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Foo a b c d) (a0123456789876543210 :: Foo a b c d) = + Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering 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 + type Equals_0123456789876543210 :: Nat -> Nat -> Bool + type family Equals_0123456789876543210 a b 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 + type Equals_0123456789876543210 :: Foo a b c d + -> Foo a b c d -> Bool + type family Equals_0123456789876543210 a b 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))) diff --git a/tests/compile-and-dump/Singletons/OverloadedStrings.golden b/tests/compile-and-dump/Singletons/OverloadedStrings.golden index 07ac07bc..26c274b3 100644 --- a/tests/compile-and-dump/Singletons/OverloadedStrings.golden +++ b/tests/compile-and-dump/Singletons/OverloadedStrings.golden @@ -9,20 +9,22 @@ Singletons/OverloadedStrings.hs:(0,0)-(0,0): Splicing declarations symId x = x foo :: Symbol foo = symId "foo" - type FooSym0 = Foo - instance SuppressUnusedWarnings SymIdSym0 where - suppressUnusedWarnings = snd (((,) SymIdSym0KindInference) ()) - data SymIdSym0 :: (~>) Symbol Symbol + type FooSym0 = Foo :: Symbol + type SymIdSym0 :: (~>) Symbol Symbol + data SymIdSym0 a0123456789876543210 where - SymIdSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply SymIdSym0 arg) (SymIdSym1 arg) => + SymIdSym0KindInference :: SameKind (Apply SymIdSym0 arg) (SymIdSym1 arg) => SymIdSym0 a0123456789876543210 type instance Apply SymIdSym0 a0123456789876543210 = SymIdSym1 a0123456789876543210 + instance SuppressUnusedWarnings SymIdSym0 where + suppressUnusedWarnings = snd (((,) SymIdSym0KindInference) ()) type SymIdSym1 (a0123456789876543210 :: Symbol) = - SymId a0123456789876543210 - type family Foo :: Symbol where + SymId a0123456789876543210 :: Symbol + type Foo :: Symbol + type family Foo where Foo = Apply SymIdSym0 (Data.Singletons.Prelude.IsString.FromString "foo") - type family SymId (a :: Symbol) :: Symbol where + type SymId :: Symbol -> Symbol + type family SymId a where SymId x = x sFoo :: Sing (FooSym0 :: Symbol) sSymId :: diff --git a/tests/compile-and-dump/Singletons/PatternMatching.golden b/tests/compile-and-dump/Singletons/PatternMatching.golden index b62bcb6b..8f0952b1 100644 --- a/tests/compile-and-dump/Singletons/PatternMatching.golden +++ b/tests/compile-and-dump/Singletons/PatternMatching.golden @@ -16,27 +16,24 @@ Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations complex = (Pair ((Pair (Just Zero)) Zero)) False tuple = (False, Just Zero, True) aList = [Zero, Succ Zero, Succ (Succ Zero)] + type PairSym0 :: forall a b. (~>) a ((~>) b (Pair a b)) + data PairSym0 a0123456789876543210 + where + PairSym0KindInference :: SameKind (Apply PairSym0 arg) (PairSym1 arg) => + PairSym0 a0123456789876543210 + type instance Apply PairSym0 a0123456789876543210 = PairSym1 a0123456789876543210 instance SuppressUnusedWarnings PairSym0 where suppressUnusedWarnings = snd (((,) PairSym0KindInference) ()) - data PairSym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210)) + type PairSym1 :: forall a b. a -> (~>) b (Pair a b) + data PairSym1 a0123456789876543210 a0123456789876543210 where - PairSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply PairSym0 arg) (PairSym1 arg) => - PairSym0 t0123456789876543210 - type instance Apply PairSym0 t0123456789876543210 = PairSym1 t0123456789876543210 - instance SuppressUnusedWarnings (PairSym1 t0123456789876543210) where + PairSym1KindInference :: SameKind (Apply (PairSym1 a0123456789876543210) arg) (PairSym2 a0123456789876543210 arg) => + PairSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (PairSym1 a0123456789876543210) a0123456789876543210 = PairSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (PairSym1 a0123456789876543210) 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 = PairSym2 t0123456789876543210 t0123456789876543210 - type PairSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) = - Pair t0123456789876543210 t0123456789876543210 + type PairSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Pair a0123456789876543210 a0123456789876543210 :: Pair a b type AListSym0 = AList type TupleSym0 = Tuple type ComplexSym0 = Complex @@ -49,44 +46,41 @@ Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations 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) NilSym0) - type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Pair a b) (a :: Symbol) :: Symbol where + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> Pair a b -> Symbol -> Symbol + type family ShowsPrec_0123456789876543210 a a a 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 - instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) - data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210 - b0123456789876543210. - (~>) GHC.Types.Nat ((~>) (Pair a0123456789876543210 b0123456789876543210) ((~>) Symbol Symbol)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) (Pair a b) ((~>) Symbol Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210 - b0123456789876543210. - (~>) (Pair a0123456789876543210 b0123456789876543210) ((~>) Symbol Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) (Pair a b) ((~>) Symbol Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Pair a0123456789876543210 b0123456789876543210) :: (~>) Symbol Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> Pair a b -> (~>) Symbol Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 - 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) ()) + type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Pair a b) (a0123456789876543210 :: Symbol) = + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Symbol instance PShow (Pair a b) where type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a sAList :: Sing AListSym0 @@ -220,25 +214,22 @@ Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations silly x = case x of { _ -> () } type family Case_0123456789876543210 x t where Case_0123456789876543210 x _ = Tuple0Sym0 - instance SuppressUnusedWarnings Let0123456789876543210TSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210TSym0KindInference) ()) data Let0123456789876543210TSym0 x0123456789876543210 where - Let0123456789876543210TSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210TSym0 arg) (Let0123456789876543210TSym1 arg) => + Let0123456789876543210TSym0KindInference :: SameKind (Apply Let0123456789876543210TSym0 arg) (Let0123456789876543210TSym1 arg) => Let0123456789876543210TSym0 x0123456789876543210 type instance Apply Let0123456789876543210TSym0 x0123456789876543210 = Let0123456789876543210TSym1 x0123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210TSym1 x0123456789876543210) where + instance SuppressUnusedWarnings Let0123456789876543210TSym0 where suppressUnusedWarnings - = snd (((,) Let0123456789876543210TSym1KindInference) ()) + = snd (((,) Let0123456789876543210TSym0KindInference) ()) data Let0123456789876543210TSym1 x0123456789876543210 y0123456789876543210 where - Let0123456789876543210TSym1KindInference :: forall x0123456789876543210 - y0123456789876543210 - arg. SameKind (Apply (Let0123456789876543210TSym1 x0123456789876543210) arg) (Let0123456789876543210TSym2 x0123456789876543210 arg) => + Let0123456789876543210TSym1KindInference :: SameKind (Apply (Let0123456789876543210TSym1 x0123456789876543210) arg) (Let0123456789876543210TSym2 x0123456789876543210 arg) => Let0123456789876543210TSym1 x0123456789876543210 y0123456789876543210 type instance Apply (Let0123456789876543210TSym1 x0123456789876543210) y0123456789876543210 = Let0123456789876543210TSym2 x0123456789876543210 y0123456789876543210 + instance SuppressUnusedWarnings (Let0123456789876543210TSym1 x0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210TSym1KindInference) ()) type Let0123456789876543210TSym2 x0123456789876543210 y0123456789876543210 = Let0123456789876543210T x0123456789876543210 y0123456789876543210 type family Let0123456789876543210T x y where @@ -247,61 +238,46 @@ Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations Case_0123456789876543210 arg_0123456789876543210 a b x y _ = a type family Lambda_0123456789876543210 a b x y arg_0123456789876543210 where Lambda_0123456789876543210 a b x y arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 a b x y arg_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 a0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 a0123456789876543210 = Lambda_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 a0123456789876543210 b0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - b0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) arg) (Lambda_0123456789876543210Sym2 a0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 arg) => Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210 x0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 x0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a0123456789876543210 b0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) 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_0123456789876543210Sym3KindInference :: 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 a0123456789876543210 b0123456789876543210 x0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym4 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a0123456789876543210 b0123456789876543210 x0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) data Lambda_0123456789876543210Sym4 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym4KindInference :: forall a0123456789876543210 - b0123456789876543210 - x0123456789876543210 - y0123456789876543210 - arg_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym4 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym5 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg) => + Lambda_0123456789876543210Sym4KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym4 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym5 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg) => Lambda_0123456789876543210Sym4 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym4 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym5 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym4 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym4KindInference) ()) type Lambda_0123456789876543210Sym5 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 b0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 type family Case_0123456789876543210 x y t where @@ -311,36 +287,30 @@ Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations Case_0123456789876543210 arg_0123456789876543210 x y _ = x type family Lambda_0123456789876543210 x y arg_0123456789876543210 where Lambda_0123456789876543210 x y arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x y arg_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 x0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 x0123456789876543210 y0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210 - y0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall x0123456789876543210 - y0123456789876543210 - arg_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg) => Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 x0123456789876543210 y0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 y0123456789876543210 arg_01234567898765432100123456789876543210 type family Case_0123456789876543210 t where @@ -373,68 +343,65 @@ Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations Case_0123456789876543210 ('Pair _ y_0123456789876543210) = y_0123456789876543210 type family Case_0123456789876543210 t where Case_0123456789876543210 ('Pair y_0123456789876543210 _) = y_0123456789876543210 - instance SuppressUnusedWarnings SillySym0 where - suppressUnusedWarnings = snd (((,) SillySym0KindInference) ()) - data SillySym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 () + type SillySym0 :: (~>) a () + data SillySym0 a0123456789876543210 where - SillySym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply SillySym0 arg) (SillySym1 arg) => + SillySym0KindInference :: SameKind (Apply SillySym0 arg) (SillySym1 arg) => SillySym0 a0123456789876543210 type instance Apply SillySym0 a0123456789876543210 = SillySym1 a0123456789876543210 - type SillySym1 (a0123456789876543210 :: a0123456789876543210) = - Silly a0123456789876543210 - instance SuppressUnusedWarnings Foo2Sym0 where - suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ()) - data Foo2Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) (a0123456789876543210, - b0123456789876543210) a0123456789876543210 + instance SuppressUnusedWarnings SillySym0 where + suppressUnusedWarnings = snd (((,) SillySym0KindInference) ()) + type SillySym1 (a0123456789876543210 :: a) = + Silly a0123456789876543210 :: () + type Foo2Sym0 :: (~>) (a, b) a + data Foo2Sym0 a0123456789876543210 where - Foo2Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) => + Foo2Sym0KindInference :: SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) => Foo2Sym0 a0123456789876543210 type instance Apply Foo2Sym0 a0123456789876543210 = Foo2Sym1 a0123456789876543210 - type Foo2Sym1 (a0123456789876543210 :: (a0123456789876543210, - b0123456789876543210)) = - Foo2 a0123456789876543210 - instance SuppressUnusedWarnings Foo1Sym0 where - suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ()) - data Foo1Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) (a0123456789876543210, - b0123456789876543210) a0123456789876543210 + instance SuppressUnusedWarnings Foo2Sym0 where + suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ()) + type Foo2Sym1 (a0123456789876543210 :: (a, b)) = + Foo2 a0123456789876543210 :: a + type Foo1Sym0 :: (~>) (a, b) a + data Foo1Sym0 a0123456789876543210 where - Foo1Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) => + Foo1Sym0KindInference :: SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) => Foo1Sym0 a0123456789876543210 type instance Apply Foo1Sym0 a0123456789876543210 = Foo1Sym1 a0123456789876543210 - type Foo1Sym1 (a0123456789876543210 :: (a0123456789876543210, - b0123456789876543210)) = - Foo1 a0123456789876543210 + instance SuppressUnusedWarnings Foo1Sym0 where + suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ()) + type Foo1Sym1 (a0123456789876543210 :: (a, b)) = + Foo1 a0123456789876543210 :: a type BlimySym0 = Blimy - type LszSym0 = Lsz + type LszSym0 = Lsz :: Nat type X_0123456789876543210Sym0 = X_0123456789876543210 type TtSym0 = Tt type TjzSym0 = Tjz type TfSym0 = Tf type X_0123456789876543210Sym0 = X_0123456789876543210 - type FlsSym0 = Fls + type FlsSym0 = Fls :: Bool 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 + type Silly :: a -> () + type family Silly a where Silly x = Case_0123456789876543210 x x - type family Foo2 (a :: (a, b)) :: a where + type Foo2 :: (a, b) -> a + type family Foo2 a where Foo2 '(x, y) = Case_0123456789876543210 x y (Let0123456789876543210TSym2 x y) - type family Foo1 (a :: (a, b)) :: a where + type Foo1 :: (a, b) -> a + type family Foo1 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 + type Lsz :: Nat + type family Lsz where Lsz = Case_0123456789876543210 X_0123456789876543210Sym0 type family X_0123456789876543210 where X_0123456789876543210 = AListSym0 @@ -446,7 +413,8 @@ Singletons/PatternMatching.hs:(0,0)-(0,0): Splicing declarations Tf = Case_0123456789876543210 X_0123456789876543210Sym0 type family X_0123456789876543210 where X_0123456789876543210 = TupleSym0 - type family Fls :: Bool where + type Fls :: Bool + type family Fls where Fls = Case_0123456789876543210 X_0123456789876543210Sym0 type family Zz where Zz = Case_0123456789876543210 X_0123456789876543210Sym0 diff --git a/tests/compile-and-dump/Singletons/PolyKinds.golden b/tests/compile-and-dump/Singletons/PolyKinds.golden index bb9d1031..cc562170 100644 --- a/tests/compile-and-dump/Singletons/PolyKinds.golden +++ b/tests/compile-and-dump/Singletons/PolyKinds.golden @@ -5,18 +5,16 @@ Singletons/PolyKinds.hs:(0,0)-(0,0): Splicing declarations ======> class Cls (a :: k) where fff :: Proxy (a :: k) -> () + type FffSym0 :: forall k (a :: k). (~>) (Proxy (a :: k)) () + data FffSym0 a0123456789876543210 + where + FffSym0KindInference :: SameKind (Apply FffSym0 arg) (FffSym1 arg) => + FffSym0 a0123456789876543210 + type instance Apply FffSym0 a0123456789876543210 = FffSym1 a0123456789876543210 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 = FffSym1 arg0123456789876543210 - type FffSym1 (arg0123456789876543210 :: Proxy (a0123456789876543210 :: k0123456789876543210)) = - Fff arg0123456789876543210 + type FffSym1 (a0123456789876543210 :: Proxy (a :: k)) = + Fff a0123456789876543210 :: () class PCls (a :: k) where type Fff (arg :: Proxy (a :: k)) :: () class SCls (a :: k) where diff --git a/tests/compile-and-dump/Singletons/PolyKindsApp.golden b/tests/compile-and-dump/Singletons/PolyKindsApp.golden index eb58336a..6fcc7eda 100644 --- a/tests/compile-and-dump/Singletons/PolyKindsApp.golden +++ b/tests/compile-and-dump/Singletons/PolyKindsApp.golden @@ -5,7 +5,7 @@ Singletons/PolyKindsApp.hs:(0,0)-(0,0): Splicing declarations ======> class Cls (a :: k -> Type) where fff :: (a :: k -> Type) (b :: k) - type FffSym0 = Fff + type FffSym0 = Fff :: (a :: k -> Type) (b :: k) class PCls (a :: k -> Type) where type Fff :: (a :: k -> Type) (b :: k) class SCls (a :: k -> Type) where diff --git a/tests/compile-and-dump/Singletons/Records.golden b/tests/compile-and-dump/Singletons/Records.golden index 0542a359..b975e517 100644 --- a/tests/compile-and-dump/Singletons/Records.golden +++ b/tests/compile-and-dump/Singletons/Records.golden @@ -3,52 +3,50 @@ Singletons/Records.hs:(0,0)-(0,0): Splicing declarations [d| data Record a = MkRecord {field1 :: a, field2 :: Bool} |] ======> data Record a = MkRecord {field1 :: a, field2 :: Bool} - instance SuppressUnusedWarnings Field2Sym0 where - suppressUnusedWarnings = snd (((,) Field2Sym0KindInference) ()) - data Field2Sym0 :: forall a0123456789876543210. - (~>) (Record a0123456789876543210) Bool + type Field2Sym0 :: forall a. (~>) (Record a) Bool + data Field2Sym0 a0123456789876543210 where - Field2Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Field2Sym0 arg) (Field2Sym1 arg) => + Field2Sym0KindInference :: SameKind (Apply Field2Sym0 arg) (Field2Sym1 arg) => Field2Sym0 a0123456789876543210 type instance Apply Field2Sym0 a0123456789876543210 = Field2Sym1 a0123456789876543210 - type Field2Sym1 (a0123456789876543210 :: Record a0123456789876543210) = - Field2 a0123456789876543210 - instance SuppressUnusedWarnings Field1Sym0 where - suppressUnusedWarnings = snd (((,) Field1Sym0KindInference) ()) - data Field1Sym0 :: forall a0123456789876543210. - (~>) (Record a0123456789876543210) a0123456789876543210 + instance SuppressUnusedWarnings Field2Sym0 where + suppressUnusedWarnings = snd (((,) Field2Sym0KindInference) ()) + type Field2Sym1 (a0123456789876543210 :: Record a) = + Field2 a0123456789876543210 :: Bool + type Field1Sym0 :: forall a. (~>) (Record a) a + data Field1Sym0 a0123456789876543210 where - Field1Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Field1Sym0 arg) (Field1Sym1 arg) => + Field1Sym0KindInference :: SameKind (Apply Field1Sym0 arg) (Field1Sym1 arg) => Field1Sym0 a0123456789876543210 type instance Apply Field1Sym0 a0123456789876543210 = Field1Sym1 a0123456789876543210 - type Field1Sym1 (a0123456789876543210 :: Record a0123456789876543210) = - Field1 a0123456789876543210 - type family Field2 (a :: Record a) :: Bool where + instance SuppressUnusedWarnings Field1Sym0 where + suppressUnusedWarnings = snd (((,) Field1Sym0KindInference) ()) + type Field1Sym1 (a0123456789876543210 :: Record a) = + Field1 a0123456789876543210 :: a + type Field2 :: forall a. Record a -> Bool + type family Field2 a where Field2 (MkRecord _ field) = field - type family Field1 (a :: Record a) :: a where + type Field1 :: forall a. Record a -> a + type family Field1 a where Field1 (MkRecord field _) = field + type MkRecordSym0 :: forall a. (~>) a ((~>) Bool (Record a)) + data MkRecordSym0 a0123456789876543210 + where + MkRecordSym0KindInference :: SameKind (Apply MkRecordSym0 arg) (MkRecordSym1 arg) => + MkRecordSym0 a0123456789876543210 + type instance Apply MkRecordSym0 a0123456789876543210 = MkRecordSym1 a0123456789876543210 instance SuppressUnusedWarnings MkRecordSym0 where suppressUnusedWarnings = snd (((,) MkRecordSym0KindInference) ()) - data MkRecordSym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) Bool (Record a0123456789876543210)) + type MkRecordSym1 :: forall a. a -> (~>) Bool (Record a) + data MkRecordSym1 a0123456789876543210 a0123456789876543210 where - MkRecordSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply MkRecordSym0 arg) (MkRecordSym1 arg) => - MkRecordSym0 t0123456789876543210 - type instance Apply MkRecordSym0 t0123456789876543210 = MkRecordSym1 t0123456789876543210 - instance SuppressUnusedWarnings (MkRecordSym1 t0123456789876543210) where + MkRecordSym1KindInference :: SameKind (Apply (MkRecordSym1 a0123456789876543210) arg) (MkRecordSym2 a0123456789876543210 arg) => + MkRecordSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (MkRecordSym1 a0123456789876543210) a0123456789876543210 = MkRecordSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (MkRecordSym1 a0123456789876543210) 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 = MkRecordSym2 t0123456789876543210 t0123456789876543210 - type MkRecordSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: Bool) = - MkRecord t0123456789876543210 t0123456789876543210 + type MkRecordSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: Bool) = + MkRecord a0123456789876543210 a0123456789876543210 :: Record a data SRecord :: forall a. Record a -> GHC.Types.Type where SMkRecord :: forall a (n :: a) (n :: Bool). diff --git a/tests/compile-and-dump/Singletons/ReturnFunc.golden b/tests/compile-and-dump/Singletons/ReturnFunc.golden index b7b29485..b8df84cc 100644 --- a/tests/compile-and-dump/Singletons/ReturnFunc.golden +++ b/tests/compile-and-dump/Singletons/ReturnFunc.golden @@ -13,62 +13,60 @@ Singletons/ReturnFunc.hs:(0,0)-(0,0): Splicing declarations id x = x idFoo :: c -> a -> a idFoo _ = id - instance SuppressUnusedWarnings IdFooSym0 where - suppressUnusedWarnings = snd (((,) IdFooSym0KindInference) ()) - data IdFooSym0 :: forall c0123456789876543210 a0123456789876543210. - (~>) c0123456789876543210 ((~>) a0123456789876543210 a0123456789876543210) + type IdFooSym0 :: (~>) c ((~>) a a) + data IdFooSym0 a0123456789876543210 where - IdFooSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply IdFooSym0 arg) (IdFooSym1 arg) => + IdFooSym0KindInference :: SameKind (Apply IdFooSym0 arg) (IdFooSym1 arg) => IdFooSym0 a0123456789876543210 type instance Apply IdFooSym0 a0123456789876543210 = IdFooSym1 a0123456789876543210 - instance SuppressUnusedWarnings (IdFooSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) IdFooSym1KindInference) ()) - data IdFooSym1 (a0123456789876543210 :: c0123456789876543210) :: forall a0123456789876543210. - (~>) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings IdFooSym0 where + suppressUnusedWarnings = snd (((,) IdFooSym0KindInference) ()) + type IdFooSym1 :: c -> (~>) a a + data IdFooSym1 a0123456789876543210 a0123456789876543210 where - IdFooSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (IdFooSym1 a0123456789876543210) arg) (IdFooSym2 a0123456789876543210 arg) => + IdFooSym1KindInference :: SameKind (Apply (IdFooSym1 a0123456789876543210) arg) (IdFooSym2 a0123456789876543210 arg) => IdFooSym1 a0123456789876543210 a0123456789876543210 type instance Apply (IdFooSym1 a0123456789876543210) a0123456789876543210 = IdFooSym2 a0123456789876543210 a0123456789876543210 - type IdFooSym2 (a0123456789876543210 :: c0123456789876543210) (a0123456789876543210 :: a0123456789876543210) = - IdFoo a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings IdSym0 where - suppressUnusedWarnings = snd (((,) IdSym0KindInference) ()) - data IdSym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (IdFooSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) IdFooSym1KindInference) ()) + type IdFooSym2 (a0123456789876543210 :: c) (a0123456789876543210 :: a) = + IdFoo a0123456789876543210 a0123456789876543210 :: a + type IdSym0 :: (~>) a a + data IdSym0 a0123456789876543210 where - IdSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply IdSym0 arg) (IdSym1 arg) => + IdSym0KindInference :: SameKind (Apply IdSym0 arg) (IdSym1 arg) => IdSym0 a0123456789876543210 type instance Apply IdSym0 a0123456789876543210 = IdSym1 a0123456789876543210 - type IdSym1 (a0123456789876543210 :: a0123456789876543210) = - Id a0123456789876543210 - instance SuppressUnusedWarnings ReturnFuncSym0 where - suppressUnusedWarnings = snd (((,) ReturnFuncSym0KindInference) ()) - data ReturnFuncSym0 :: (~>) Nat ((~>) Nat Nat) + instance SuppressUnusedWarnings IdSym0 where + suppressUnusedWarnings = snd (((,) IdSym0KindInference) ()) + type IdSym1 (a0123456789876543210 :: a) = + Id a0123456789876543210 :: a + type ReturnFuncSym0 :: (~>) Nat ((~>) Nat Nat) + data ReturnFuncSym0 a0123456789876543210 where - ReturnFuncSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ReturnFuncSym0 arg) (ReturnFuncSym1 arg) => + ReturnFuncSym0KindInference :: SameKind (Apply ReturnFuncSym0 arg) (ReturnFuncSym1 arg) => ReturnFuncSym0 a0123456789876543210 type instance Apply ReturnFuncSym0 a0123456789876543210 = ReturnFuncSym1 a0123456789876543210 - instance SuppressUnusedWarnings (ReturnFuncSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) ReturnFuncSym1KindInference) ()) - data ReturnFuncSym1 (a0123456789876543210 :: Nat) :: (~>) Nat Nat + instance SuppressUnusedWarnings ReturnFuncSym0 where + suppressUnusedWarnings = snd (((,) ReturnFuncSym0KindInference) ()) + type ReturnFuncSym1 :: Nat -> (~>) Nat Nat + data ReturnFuncSym1 a0123456789876543210 a0123456789876543210 where - ReturnFuncSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ReturnFuncSym1 a0123456789876543210) arg) (ReturnFuncSym2 a0123456789876543210 arg) => + ReturnFuncSym1KindInference :: SameKind (Apply (ReturnFuncSym1 a0123456789876543210) arg) (ReturnFuncSym2 a0123456789876543210 arg) => ReturnFuncSym1 a0123456789876543210 a0123456789876543210 type instance Apply (ReturnFuncSym1 a0123456789876543210) a0123456789876543210 = ReturnFuncSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ReturnFuncSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) ReturnFuncSym1KindInference) ()) type ReturnFuncSym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = - ReturnFunc a0123456789876543210 a0123456789876543210 - type family IdFoo (a :: c) (a :: a) :: a where + ReturnFunc a0123456789876543210 a0123456789876543210 :: Nat + type IdFoo :: c -> a -> a + type family IdFoo a a where IdFoo _ a_0123456789876543210 = Apply IdSym0 a_0123456789876543210 - type family Id (a :: a) :: a where + type Id :: a -> a + type family Id a where Id x = x - type family ReturnFunc (a :: Nat) (a :: Nat) :: Nat where + type ReturnFunc :: Nat -> Nat -> Nat + type family ReturnFunc a a where ReturnFunc _ a_0123456789876543210 = Apply SuccSym0 a_0123456789876543210 sIdFoo :: forall c a (t :: c) (t :: a). diff --git a/tests/compile-and-dump/Singletons/Sections.golden b/tests/compile-and-dump/Singletons/Sections.golden index d743c77d..7146a2c1 100644 --- a/tests/compile-and-dump/Singletons/Sections.golden +++ b/tests/compile-and-dump/Singletons/Sections.golden @@ -21,46 +21,48 @@ Singletons/Sections.hs:(0,0)-(0,0): Splicing declarations foo3 = ((zipWith (+)) [Succ Zero, Succ Zero]) [Zero, Succ Zero] type family Lambda_0123456789876543210 lhs_0123456789876543210 where Lambda_0123456789876543210 lhs_0123456789876543210 = Apply (Apply (+@#@$) lhs_0123456789876543210) (Apply SuccSym0 ZeroSym0) - instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym0 lhs_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym0KindInference :: forall lhs_01234567898765432100123456789876543210 - arg. SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => + Lambda_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 lhs_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 lhs_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 lhs_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) type Lambda_0123456789876543210Sym1 lhs_01234567898765432100123456789876543210 = Lambda_0123456789876543210 lhs_01234567898765432100123456789876543210 - type Foo3Sym0 = Foo3 - type Foo2Sym0 = Foo2 - type Foo1Sym0 = Foo1 - instance SuppressUnusedWarnings (+@#@$) where - suppressUnusedWarnings = snd (((,) (:+@#@$###)) ()) - data (+@#@$) :: (~>) Nat ((~>) Nat Nat) + type Foo3Sym0 = Foo3 :: [Nat] + type Foo2Sym0 = Foo2 :: [Nat] + type Foo1Sym0 = Foo1 :: [Nat] + type (+@#@$) :: (~>) Nat ((~>) Nat Nat) + data (+@#@$) a0123456789876543210 where - (:+@#@$###) :: forall a0123456789876543210 - arg. SameKind (Apply (+@#@$) arg) ((+@#@$$) arg) => + (:+@#@$###) :: SameKind (Apply (+@#@$) arg) ((+@#@$$) arg) => (+@#@$) a0123456789876543210 type instance Apply (+@#@$) a0123456789876543210 = (+@#@$$) a0123456789876543210 - instance SuppressUnusedWarnings ((+@#@$$) a0123456789876543210) where - suppressUnusedWarnings = snd (((,) (:+@#@$$###)) ()) - data (+@#@$$) (a0123456789876543210 :: Nat) :: (~>) Nat Nat + instance SuppressUnusedWarnings (+@#@$) where + suppressUnusedWarnings = snd (((,) (:+@#@$###)) ()) + type (+@#@$$) :: Nat -> (~>) Nat Nat + data (+@#@$$) a0123456789876543210 a0123456789876543210 where - (:+@#@$$###) :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply ((+@#@$$) a0123456789876543210) arg) ((+@#@$$$) a0123456789876543210 arg) => + (:+@#@$$###) :: SameKind (Apply ((+@#@$$) a0123456789876543210) arg) ((+@#@$$$) a0123456789876543210 arg) => (+@#@$$) a0123456789876543210 a0123456789876543210 type instance Apply ((+@#@$$) a0123456789876543210) a0123456789876543210 = (+@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((+@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (:+@#@$$###)) ()) type (+@#@$$$) (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = - (+) a0123456789876543210 a0123456789876543210 - type family Foo3 :: [Nat] where + (+) a0123456789876543210 a0123456789876543210 :: Nat + type Foo3 :: [Nat] + type family Foo3 where Foo3 = Apply (Apply (Apply ZipWithSym0 (+@#@$)) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) NilSym0))) (Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) NilSym0)) - type family Foo2 :: [Nat] where + type Foo2 :: [Nat] + type family Foo2 where Foo2 = Apply (Apply MapSym0 Lambda_0123456789876543210Sym0) (Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) NilSym0)) - type family Foo1 :: [Nat] where + type Foo1 :: [Nat] + type family Foo1 where Foo1 = Apply (Apply MapSym0 (Apply (+@#@$) (Apply SuccSym0 ZeroSym0))) (Apply (Apply (:@#@$) ZeroSym0) (Apply (Apply (:@#@$) (Apply SuccSym0 ZeroSym0)) NilSym0)) - type family (+) (a :: Nat) (a :: Nat) :: Nat where + type (+) :: Nat -> Nat -> Nat + type family (+) a a where (+) 'Zero m = m (+) ('Succ n) m = Apply SuccSym0 (Apply (Apply (+@#@$) n) m) sFoo3 :: Sing (Foo3Sym0 :: [Nat]) diff --git a/tests/compile-and-dump/Singletons/ShowDeriving.golden b/tests/compile-and-dump/Singletons/ShowDeriving.golden index 9ced7059..42866f6b 100644 --- a/tests/compile-and-dump/Singletons/ShowDeriving.golden +++ b/tests/compile-and-dump/Singletons/ShowDeriving.golden @@ -24,250 +24,244 @@ Singletons/ShowDeriving.hs:(0,0)-(0,0): Splicing declarations data Foo3 = MkFoo3 {getFoo3a :: Bool, *** :: Bool} deriving Show - instance SuppressUnusedWarnings (***@#@$) where - suppressUnusedWarnings = snd (((,) (:***@#@$###)) ()) - data (***@#@$) :: (~>) Foo3 Bool + type (***@#@$) :: (~>) Foo3 Bool + data (***@#@$) a0123456789876543210 where - (:***@#@$###) :: forall a0123456789876543210 - arg. SameKind (Apply (***@#@$) arg) ((***@#@$$) arg) => + (:***@#@$###) :: SameKind (Apply (***@#@$) arg) ((***@#@$$) arg) => (***@#@$) a0123456789876543210 type instance Apply (***@#@$) a0123456789876543210 = (***@#@$$) a0123456789876543210 + instance SuppressUnusedWarnings (***@#@$) where + suppressUnusedWarnings = snd (((,) (:***@#@$###)) ()) type (***@#@$$) (a0123456789876543210 :: Foo3) = - (***) a0123456789876543210 - instance SuppressUnusedWarnings GetFoo3aSym0 where - suppressUnusedWarnings = snd (((,) GetFoo3aSym0KindInference) ()) - data GetFoo3aSym0 :: (~>) Foo3 Bool + (***) a0123456789876543210 :: Bool + type GetFoo3aSym0 :: (~>) Foo3 Bool + data GetFoo3aSym0 a0123456789876543210 where - GetFoo3aSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply GetFoo3aSym0 arg) (GetFoo3aSym1 arg) => + GetFoo3aSym0KindInference :: SameKind (Apply GetFoo3aSym0 arg) (GetFoo3aSym1 arg) => GetFoo3aSym0 a0123456789876543210 type instance Apply GetFoo3aSym0 a0123456789876543210 = GetFoo3aSym1 a0123456789876543210 + instance SuppressUnusedWarnings GetFoo3aSym0 where + suppressUnusedWarnings = snd (((,) GetFoo3aSym0KindInference) ()) type GetFoo3aSym1 (a0123456789876543210 :: Foo3) = - GetFoo3a a0123456789876543210 - type family (***) (a :: Foo3) :: Bool where + GetFoo3a a0123456789876543210 :: Bool + type (***) :: Foo3 -> Bool + type family (***) a where (***) (MkFoo3 _ field) = field - type family GetFoo3a (a :: Foo3) :: Bool where + type GetFoo3a :: Foo3 -> Bool + type family GetFoo3a a where GetFoo3a (MkFoo3 field _) = field - type MkFoo1Sym0 = MkFoo1 + type MkFoo1Sym0 = MkFoo1 :: Foo1 + type MkFoo2aSym0 :: forall a. (~>) a ((~>) a (Foo2 a)) + data MkFoo2aSym0 a0123456789876543210 + where + MkFoo2aSym0KindInference :: SameKind (Apply MkFoo2aSym0 arg) (MkFoo2aSym1 arg) => + MkFoo2aSym0 a0123456789876543210 + type instance Apply MkFoo2aSym0 a0123456789876543210 = MkFoo2aSym1 a0123456789876543210 instance SuppressUnusedWarnings MkFoo2aSym0 where suppressUnusedWarnings = snd (((,) MkFoo2aSym0KindInference) ()) - data MkFoo2aSym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) a0123456789876543210 (Foo2 a0123456789876543210)) + type MkFoo2aSym1 :: forall a. a -> (~>) a (Foo2 a) + data MkFoo2aSym1 a0123456789876543210 a0123456789876543210 where - MkFoo2aSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply MkFoo2aSym0 arg) (MkFoo2aSym1 arg) => - MkFoo2aSym0 t0123456789876543210 - type instance Apply MkFoo2aSym0 t0123456789876543210 = MkFoo2aSym1 t0123456789876543210 - instance SuppressUnusedWarnings (MkFoo2aSym1 t0123456789876543210) where + MkFoo2aSym1KindInference :: SameKind (Apply (MkFoo2aSym1 a0123456789876543210) arg) (MkFoo2aSym2 a0123456789876543210 arg) => + MkFoo2aSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (MkFoo2aSym1 a0123456789876543210) a0123456789876543210 = MkFoo2aSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (MkFoo2aSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) MkFoo2aSym1KindInference) ()) - data MkFoo2aSym1 (t0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 (Foo2 a0123456789876543210) + type MkFoo2aSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + MkFoo2a a0123456789876543210 a0123456789876543210 :: Foo2 a + type MkFoo2bSym0 :: forall a. (~>) a ((~>) a (Foo2 a)) + data MkFoo2bSym0 a0123456789876543210 where - MkFoo2aSym1KindInference :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply (MkFoo2aSym1 t0123456789876543210) arg) (MkFoo2aSym2 t0123456789876543210 arg) => - MkFoo2aSym1 t0123456789876543210 t0123456789876543210 - type instance Apply (MkFoo2aSym1 t0123456789876543210) t0123456789876543210 = MkFoo2aSym2 t0123456789876543210 t0123456789876543210 - type MkFoo2aSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: a0123456789876543210) = - MkFoo2a t0123456789876543210 t0123456789876543210 + MkFoo2bSym0KindInference :: SameKind (Apply MkFoo2bSym0 arg) (MkFoo2bSym1 arg) => + MkFoo2bSym0 a0123456789876543210 + type instance Apply MkFoo2bSym0 a0123456789876543210 = MkFoo2bSym1 a0123456789876543210 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` - instance SuppressUnusedWarnings (MkFoo2bSym1 t0123456789876543210) where - suppressUnusedWarnings = snd (((,) MkFoo2bSym1KindInference) ()) - data MkFoo2bSym1 (t0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 (Foo2 a0123456789876543210) + type MkFoo2bSym1 :: forall a. a -> (~>) a (Foo2 a) + data MkFoo2bSym1 a0123456789876543210 a0123456789876543210 where - MkFoo2bSym1KindInference :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply (MkFoo2bSym1 t0123456789876543210) arg) (MkFoo2bSym2 t0123456789876543210 arg) => - MkFoo2bSym1 t0123456789876543210 t0123456789876543210 - type instance Apply (MkFoo2bSym1 t0123456789876543210) t0123456789876543210 = MkFoo2bSym2 t0123456789876543210 t0123456789876543210 + MkFoo2bSym1KindInference :: SameKind (Apply (MkFoo2bSym1 a0123456789876543210) arg) (MkFoo2bSym2 a0123456789876543210 arg) => + MkFoo2bSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (MkFoo2bSym1 a0123456789876543210) a0123456789876543210 = MkFoo2bSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (MkFoo2bSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) MkFoo2bSym1KindInference) ()) infixl 5 `MkFoo2bSym1` - type MkFoo2bSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: a0123456789876543210) = - MkFoo2b t0123456789876543210 t0123456789876543210 + type MkFoo2bSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + MkFoo2b a0123456789876543210 a0123456789876543210 :: Foo2 a infixl 5 `MkFoo2bSym2` + type (:*:@#@$) :: forall a. (~>) a ((~>) a (Foo2 a)) + data (:*:@#@$) a0123456789876543210 + where + (::*:@#@$###) :: SameKind (Apply (:*:@#@$) arg) ((:*:@#@$$) arg) => + (:*:@#@$) a0123456789876543210 + type instance Apply (:*:@#@$) a0123456789876543210 = (:*:@#@$$) a0123456789876543210 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 :*:@#@$ - instance SuppressUnusedWarnings ((:*:@#@$$) t0123456789876543210) where - suppressUnusedWarnings = snd (((,) (::*:@#@$$###)) ()) - data (:*:@#@$$) (t0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 (Foo2 a0123456789876543210) + type (:*:@#@$$) :: forall a. a -> (~>) a (Foo2 a) + data (:*:@#@$$) a0123456789876543210 a0123456789876543210 where - (::*:@#@$$###) :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply ((:*:@#@$$) t0123456789876543210) arg) ((:*:@#@$$$) t0123456789876543210 arg) => - (:*:@#@$$) t0123456789876543210 t0123456789876543210 - type instance Apply ((:*:@#@$$) t0123456789876543210) t0123456789876543210 = (:*:@#@$$$) t0123456789876543210 t0123456789876543210 + (::*:@#@$$###) :: SameKind (Apply ((:*:@#@$$) a0123456789876543210) arg) ((:*:@#@$$$) a0123456789876543210 arg) => + (:*:@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((:*:@#@$$) a0123456789876543210) a0123456789876543210 = (:*:@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((:*:@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (::*:@#@$$###)) ()) infixl 5 :*:@#@$$ - type (:*:@#@$$$) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: a0123456789876543210) = - (:*:) t0123456789876543210 t0123456789876543210 + type (:*:@#@$$$) (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + (:*:) a0123456789876543210 a0123456789876543210 :: Foo2 a infixl 5 :*:@#@$$$ + type (:&:@#@$) :: forall a. (~>) a ((~>) a (Foo2 a)) + data (:&:@#@$) a0123456789876543210 + where + (::&:@#@$###) :: SameKind (Apply (:&:@#@$) arg) ((:&:@#@$$) arg) => + (:&:@#@$) a0123456789876543210 + type instance Apply (:&:@#@$) a0123456789876543210 = (:&:@#@$$) a0123456789876543210 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 :&:@#@$ - instance SuppressUnusedWarnings ((:&:@#@$$) t0123456789876543210) where - suppressUnusedWarnings = snd (((,) (::&:@#@$$###)) ()) - data (:&:@#@$$) (t0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 (Foo2 a0123456789876543210) + type (:&:@#@$$) :: forall a. a -> (~>) a (Foo2 a) + data (:&:@#@$$) a0123456789876543210 a0123456789876543210 where - (::&:@#@$$###) :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply ((:&:@#@$$) t0123456789876543210) arg) ((:&:@#@$$$) t0123456789876543210 arg) => - (:&:@#@$$) t0123456789876543210 t0123456789876543210 - type instance Apply ((:&:@#@$$) t0123456789876543210) t0123456789876543210 = (:&:@#@$$$) t0123456789876543210 t0123456789876543210 + (::&:@#@$$###) :: SameKind (Apply ((:&:@#@$$) a0123456789876543210) arg) ((:&:@#@$$$) a0123456789876543210 arg) => + (:&:@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((:&:@#@$$) a0123456789876543210) a0123456789876543210 = (:&:@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((:&:@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (::&:@#@$$###)) ()) infixl 5 :&:@#@$$ - type (:&:@#@$$$) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: a0123456789876543210) = - (:&:) t0123456789876543210 t0123456789876543210 + type (:&:@#@$$$) (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + (:&:) a0123456789876543210 a0123456789876543210 :: Foo2 a infixl 5 :&:@#@$$$ + type MkFoo3Sym0 :: (~>) Bool ((~>) Bool Foo3) + data MkFoo3Sym0 a0123456789876543210 + where + MkFoo3Sym0KindInference :: SameKind (Apply MkFoo3Sym0 arg) (MkFoo3Sym1 arg) => + MkFoo3Sym0 a0123456789876543210 + type instance Apply MkFoo3Sym0 a0123456789876543210 = MkFoo3Sym1 a0123456789876543210 instance SuppressUnusedWarnings MkFoo3Sym0 where suppressUnusedWarnings = snd (((,) MkFoo3Sym0KindInference) ()) - data MkFoo3Sym0 :: (~>) Bool ((~>) Bool Foo3) + type MkFoo3Sym1 :: Bool -> (~>) Bool Foo3 + data MkFoo3Sym1 a0123456789876543210 a0123456789876543210 where - MkFoo3Sym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply MkFoo3Sym0 arg) (MkFoo3Sym1 arg) => - MkFoo3Sym0 t0123456789876543210 - type instance Apply MkFoo3Sym0 t0123456789876543210 = MkFoo3Sym1 t0123456789876543210 - instance SuppressUnusedWarnings (MkFoo3Sym1 t0123456789876543210) where + MkFoo3Sym1KindInference :: SameKind (Apply (MkFoo3Sym1 a0123456789876543210) arg) (MkFoo3Sym2 a0123456789876543210 arg) => + MkFoo3Sym1 a0123456789876543210 a0123456789876543210 + type instance Apply (MkFoo3Sym1 a0123456789876543210) a0123456789876543210 = MkFoo3Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (MkFoo3Sym1 a0123456789876543210) 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 = MkFoo3Sym2 t0123456789876543210 t0123456789876543210 - type MkFoo3Sym2 (t0123456789876543210 :: Bool) (t0123456789876543210 :: Bool) = - MkFoo3 t0123456789876543210 t0123456789876543210 - type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: Foo1) (a :: Symbol) :: Symbol where + type MkFoo3Sym2 (a0123456789876543210 :: Bool) (a0123456789876543210 :: Bool) = + MkFoo3 a0123456789876543210 a0123456789876543210 :: Foo3 + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> Foo1 -> Symbol -> Symbol + type family ShowsPrec_0123456789876543210 a a a where ShowsPrec_0123456789876543210 _ MkFoo1 a_0123456789876543210 = Apply (Apply ShowStringSym0 "MkFoo1") a_0123456789876543210 - instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) - data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Foo1 ((~>) Symbol Symbol)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Foo1 ((~>) Symbol Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Foo1 ((~>) Symbol Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) Foo1 ((~>) Symbol Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo1) :: (~>) Symbol Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> Foo1 -> (~>) Symbol Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo1) (a0123456789876543210 :: Symbol) = - ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Symbol 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 + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> Foo2 a -> Symbol -> Symbol + type family ShowsPrec_0123456789876543210 a a a 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 - instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) - data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210. - (~>) GHC.Types.Nat ((~>) (Foo2 a0123456789876543210) ((~>) Symbol Symbol)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) (Foo2 a) ((~>) Symbol Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210. - (~>) (Foo2 a0123456789876543210) ((~>) Symbol Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) (Foo2 a) ((~>) Symbol Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo2 a0123456789876543210) :: (~>) Symbol Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> Foo2 a -> (~>) Symbol Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 - 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) ()) + type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo2 a) (a0123456789876543210 :: Symbol) = + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Symbol 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 + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> Foo3 -> Symbol -> Symbol + type family ShowsPrec_0123456789876543210 a a a 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 - instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) - data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Foo3 ((~>) Symbol Symbol)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Foo3 ((~>) Symbol Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Foo3 ((~>) Symbol Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) Foo3 ((~>) Symbol Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo3) :: (~>) Symbol Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> Foo3 -> (~>) Symbol Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Foo3) (a0123456789876543210 :: Symbol) = - ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Symbol instance PShow Foo3 where type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a infixl 5 :%&: diff --git a/tests/compile-and-dump/Singletons/StandaloneDeriving.golden b/tests/compile-and-dump/Singletons/StandaloneDeriving.golden index 6d23f124..1cebb964 100644 --- a/tests/compile-and-dump/Singletons/StandaloneDeriving.golden +++ b/tests/compile-and-dump/Singletons/StandaloneDeriving.golden @@ -25,169 +25,168 @@ Singletons/StandaloneDeriving.hs:(0,0)-(0,0): Splicing declarations deriving instance Show S deriving instance Bounded S deriving instance Enum S + type (:*:@#@$) :: forall a b. (~>) a ((~>) b (T a b)) + data (:*:@#@$) a0123456789876543210 + where + (::*:@#@$###) :: SameKind (Apply (:*:@#@$) arg) ((:*:@#@$$) arg) => + (:*:@#@$) a0123456789876543210 + type instance Apply (:*:@#@$) a0123456789876543210 = (:*:@#@$$) a0123456789876543210 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 :*:@#@$ - instance SuppressUnusedWarnings ((:*:@#@$$) t0123456789876543210) where - suppressUnusedWarnings = snd (((,) (::*:@#@$$###)) ()) - data (:*:@#@$$) (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 (T a0123456789876543210 b0123456789876543210) + type (:*:@#@$$) :: forall a b. a -> (~>) b (T a b) + data (:*:@#@$$) a0123456789876543210 a0123456789876543210 where - (::*:@#@$$###) :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply ((:*:@#@$$) t0123456789876543210) arg) ((:*:@#@$$$) t0123456789876543210 arg) => - (:*:@#@$$) t0123456789876543210 t0123456789876543210 - type instance Apply ((:*:@#@$$) t0123456789876543210) t0123456789876543210 = (:*:@#@$$$) t0123456789876543210 t0123456789876543210 + (::*:@#@$$###) :: SameKind (Apply ((:*:@#@$$) a0123456789876543210) arg) ((:*:@#@$$$) a0123456789876543210 arg) => + (:*:@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((:*:@#@$$) a0123456789876543210) a0123456789876543210 = (:*:@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((:*:@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (::*:@#@$$###)) ()) infixl 6 :*:@#@$$ - type (:*:@#@$$$) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) = - (:*:) t0123456789876543210 t0123456789876543210 + type (:*:@#@$$$) (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + (:*:) a0123456789876543210 a0123456789876543210 :: T a b infixl 6 :*:@#@$$$ - type S1Sym0 = S1 - type S2Sym0 = S2 - type family Compare_0123456789876543210 (a :: T a ()) (a :: T a ()) :: Ordering where + type S1Sym0 = S1 :: S + type S2Sym0 = S2 :: S + type Compare_0123456789876543210 :: T a () -> T a () -> Ordering + type family Compare_0123456789876543210 a a 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)) NilSym0)) - instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) - data Compare_0123456789876543210Sym0 :: forall a0123456789876543210. - (~>) (T a0123456789876543210 ()) ((~>) (T a0123456789876543210 ()) Ordering) + type Compare_0123456789876543210Sym0 :: (~>) (T a ()) ((~>) (T a ()) Ordering) + data Compare_0123456789876543210Sym0 a0123456789876543210 where - Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => + Compare_0123456789876543210Sym0KindInference :: SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => Compare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) - data Compare_0123456789876543210Sym1 (a0123456789876543210 :: T a0123456789876543210 ()) :: (~>) (T a0123456789876543210 ()) Ordering + = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) + type Compare_0123456789876543210Sym1 :: T a () + -> (~>) (T a ()) Ordering + data Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => + Compare_0123456789876543210Sym1KindInference :: SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - type Compare_0123456789876543210Sym2 (a0123456789876543210 :: T a0123456789876543210 ()) (a0123456789876543210 :: T a0123456789876543210 ()) = - Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) + type Compare_0123456789876543210Sym2 (a0123456789876543210 :: T a ()) (a0123456789876543210 :: T a ()) = + Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering 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 + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> T a () -> Symbol -> Symbol + type family ShowsPrec_0123456789876543210 a a a 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 - instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) - data ShowsPrec_0123456789876543210Sym0 :: forall a0123456789876543210. - (~>) GHC.Types.Nat ((~>) (T a0123456789876543210 ()) ((~>) Symbol Symbol)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) (T a ()) ((~>) Symbol Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210. - (~>) (T a0123456789876543210 ()) ((~>) Symbol Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) (T a ()) ((~>) Symbol Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: T a0123456789876543210 ()) :: (~>) Symbol Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> T a () -> (~>) Symbol Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 - 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) ()) + type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: T a ()) (a0123456789876543210 :: Symbol) = + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Symbol 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 + type Compare_0123456789876543210 :: S -> S -> Ordering + type family Compare_0123456789876543210 a a where Compare_0123456789876543210 S1 S1 = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) NilSym0 Compare_0123456789876543210 S2 S2 = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) NilSym0 Compare_0123456789876543210 S1 S2 = LTSym0 Compare_0123456789876543210 S2 S1 = GTSym0 - instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) - data Compare_0123456789876543210Sym0 :: (~>) S ((~>) S Ordering) + type Compare_0123456789876543210Sym0 :: (~>) S ((~>) S Ordering) + data Compare_0123456789876543210Sym0 a0123456789876543210 where - Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => + Compare_0123456789876543210Sym0KindInference :: SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => Compare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) - data Compare_0123456789876543210Sym1 (a0123456789876543210 :: S) :: (~>) S Ordering + = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) + type Compare_0123456789876543210Sym1 :: S -> (~>) S Ordering + data Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => + Compare_0123456789876543210Sym1KindInference :: SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) type Compare_0123456789876543210Sym2 (a0123456789876543210 :: S) (a0123456789876543210 :: S) = - Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering 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 + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> S -> Symbol -> Symbol + type family ShowsPrec_0123456789876543210 a a a where ShowsPrec_0123456789876543210 _ S1 a_0123456789876543210 = Apply (Apply ShowStringSym0 "S1") a_0123456789876543210 ShowsPrec_0123456789876543210 _ S2 a_0123456789876543210 = Apply (Apply ShowStringSym0 "S2") a_0123456789876543210 - instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) - data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) S ((~>) Symbol Symbol)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) S ((~>) Symbol Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) S ((~>) Symbol Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) S ((~>) Symbol Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: S) :: (~>) Symbol Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> S -> (~>) Symbol Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: S) (a0123456789876543210 :: Symbol) = - ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Symbol instance PShow S where type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a - type family MinBound_0123456789876543210 :: S where + type MinBound_0123456789876543210 :: S + type family MinBound_0123456789876543210 where MinBound_0123456789876543210 = S1Sym0 type MinBound_0123456789876543210Sym0 = - MinBound_0123456789876543210 - type family MaxBound_0123456789876543210 :: S where + MinBound_0123456789876543210 :: S + type MaxBound_0123456789876543210 :: S + type family MaxBound_0123456789876543210 where MaxBound_0123456789876543210 = S2Sym0 type MaxBound_0123456789876543210Sym0 = - MaxBound_0123456789876543210 + MaxBound_0123456789876543210 :: S instance PBounded S where type MinBound = MinBound_0123456789876543210Sym0 type MaxBound = MaxBound_0123456789876543210Sym0 @@ -197,42 +196,46 @@ Singletons/StandaloneDeriving.hs:(0,0)-(0,0): Splicing declarations 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 + type ToEnum_0123456789876543210 :: GHC.Types.Nat -> S + type family ToEnum_0123456789876543210 a where ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (FromInteger 0)) - instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ()) - data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat S + type ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat S + data ToEnum_0123456789876543210Sym0 a0123456789876543210 where - ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) => + ToEnum_0123456789876543210Sym0KindInference :: SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) => ToEnum_0123456789876543210Sym0 a0123456789876543210 type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ()) type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) = - ToEnum_0123456789876543210 a0123456789876543210 - type family FromEnum_0123456789876543210 (a :: S) :: GHC.Types.Nat where + ToEnum_0123456789876543210 a0123456789876543210 :: S + type FromEnum_0123456789876543210 :: S -> GHC.Types.Nat + type family FromEnum_0123456789876543210 a where FromEnum_0123456789876543210 S1 = FromInteger 0 FromEnum_0123456789876543210 S2 = FromInteger 1 - instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ()) - data FromEnum_0123456789876543210Sym0 :: (~>) S GHC.Types.Nat + type FromEnum_0123456789876543210Sym0 :: (~>) S GHC.Types.Nat + data FromEnum_0123456789876543210Sym0 a0123456789876543210 where - FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) => + FromEnum_0123456789876543210Sym0KindInference :: SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) => FromEnum_0123456789876543210Sym0 a0123456789876543210 type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ()) type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: S) = - FromEnum_0123456789876543210 a0123456789876543210 + FromEnum_0123456789876543210 a0123456789876543210 :: GHC.Types.Nat 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 + type Equals_0123456789876543210 :: T a () -> T a () -> Bool + type family Equals_0123456789876543210 a b 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 + type Equals_0123456789876543210 :: S -> S -> Bool + type family Equals_0123456789876543210 a b where Equals_0123456789876543210 S1 S1 = TrueSym0 Equals_0123456789876543210 S2 S2 = TrueSym0 Equals_0123456789876543210 (_ :: S) (_ :: S) = FalseSym0 diff --git a/tests/compile-and-dump/Singletons/Star.golden b/tests/compile-and-dump/Singletons/Star.golden index d7d6de11..d210963f 100644 --- a/tests/compile-and-dump/Singletons/Star.golden +++ b/tests/compile-and-dump/Singletons/Star.golden @@ -9,39 +9,39 @@ Singletons/Star.hs:0:0:: Splicing declarations 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 NatSym0 = Nat :: Type + type IntSym0 = Int :: Type + type StringSym0 = String :: Type + type MaybeSym0 :: (~>) Type Type + data MaybeSym0 a0123456789876543210 + where + MaybeSym0KindInference :: SameKind (Apply MaybeSym0 arg) (MaybeSym1 arg) => + MaybeSym0 a0123456789876543210 + type instance Apply MaybeSym0 a0123456789876543210 = MaybeSym1 a0123456789876543210 instance SuppressUnusedWarnings MaybeSym0 where suppressUnusedWarnings = snd (((,) MaybeSym0KindInference) ()) - data MaybeSym0 :: (~>) Type Type + type MaybeSym1 (a0123456789876543210 :: Type) = + Maybe a0123456789876543210 :: Type + type VecSym0 :: (~>) Type ((~>) Nat Type) + data VecSym0 a0123456789876543210 where - MaybeSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply MaybeSym0 arg) (MaybeSym1 arg) => - MaybeSym0 t0123456789876543210 - type instance Apply MaybeSym0 t0123456789876543210 = MaybeSym1 t0123456789876543210 - type MaybeSym1 (t0123456789876543210 :: Type) = - Maybe t0123456789876543210 + VecSym0KindInference :: SameKind (Apply VecSym0 arg) (VecSym1 arg) => + VecSym0 a0123456789876543210 + type instance Apply VecSym0 a0123456789876543210 = VecSym1 a0123456789876543210 instance SuppressUnusedWarnings VecSym0 where suppressUnusedWarnings = snd (((,) VecSym0KindInference) ()) - data VecSym0 :: (~>) Type ((~>) Nat Type) + type VecSym1 :: Type -> (~>) Nat Type + data VecSym1 a0123456789876543210 a0123456789876543210 where - VecSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply VecSym0 arg) (VecSym1 arg) => - VecSym0 t0123456789876543210 - type instance Apply VecSym0 t0123456789876543210 = VecSym1 t0123456789876543210 - instance SuppressUnusedWarnings (VecSym1 t0123456789876543210) where + VecSym1KindInference :: SameKind (Apply (VecSym1 a0123456789876543210) arg) (VecSym2 a0123456789876543210 arg) => + VecSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (VecSym1 a0123456789876543210) a0123456789876543210 = VecSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (VecSym1 a0123456789876543210) 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 = VecSym2 t0123456789876543210 t0123456789876543210 - type VecSym2 (t0123456789876543210 :: Type) (t0123456789876543210 :: Nat) = - Vec t0123456789876543210 t0123456789876543210 - type family Equals_0123456789876543210 (a :: Type) (b :: Type) :: Bool where + type VecSym2 (a0123456789876543210 :: Type) (a0123456789876543210 :: Nat) = + Vec a0123456789876543210 a0123456789876543210 :: Type + type Equals_0123456789876543210 :: Type -> Type -> Bool + type family Equals_0123456789876543210 a b where Equals_0123456789876543210 Nat Nat = TrueSym0 Equals_0123456789876543210 Int Int = TrueSym0 Equals_0123456789876543210 String String = TrueSym0 @@ -50,7 +50,8 @@ Singletons/Star.hs:0:0:: Splicing declarations 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 + type Compare_0123456789876543210 :: Type -> Type -> Ordering + type family Compare_0123456789876543210 a a where Compare_0123456789876543210 Nat Nat = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) NilSym0 Compare_0123456789876543210 Int Int = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) NilSym0 Compare_0123456789876543210 String String = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) NilSym0 @@ -76,67 +77,67 @@ Singletons/Star.hs:0:0:: Splicing declarations Compare_0123456789876543210 (Vec _ _) Int = GTSym0 Compare_0123456789876543210 (Vec _ _) String = GTSym0 Compare_0123456789876543210 (Vec _ _) (Maybe _) = GTSym0 - instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) - data Compare_0123456789876543210Sym0 :: (~>) Type ((~>) Type Ordering) + type Compare_0123456789876543210Sym0 :: (~>) Type ((~>) Type Ordering) + data Compare_0123456789876543210Sym0 a0123456789876543210 where - Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => + Compare_0123456789876543210Sym0KindInference :: SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => Compare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) - data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Type) :: (~>) Type Ordering + = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) + type Compare_0123456789876543210Sym1 :: Type -> (~>) Type Ordering + data Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => + Compare_0123456789876543210Sym1KindInference :: SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Type) (a0123456789876543210 :: Type) = - Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering 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 + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> Type -> Symbol -> Symbol + type family ShowsPrec_0123456789876543210 a a a 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 - instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) - data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Type ((~>) Symbol Symbol)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) Type ((~>) Symbol Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) Type ((~>) Symbol Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) Type ((~>) Symbol Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Type) :: (~>) Symbol Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> Type -> (~>) Symbol Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Type) (a0123456789876543210 :: Symbol) = - ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Symbol instance PShow Type where type ShowsPrec a a a = Apply (Apply (Apply ShowsPrec_0123456789876543210Sym0 a) a) a data SRep :: Type -> Type diff --git a/tests/compile-and-dump/Singletons/T124.golden b/tests/compile-and-dump/Singletons/T124.golden index d72326ea..aabd8f9e 100644 --- a/tests/compile-and-dump/Singletons/T124.golden +++ b/tests/compile-and-dump/Singletons/T124.golden @@ -7,17 +7,18 @@ Singletons/T124.hs:(0,0)-(0,0): Splicing declarations foo :: Bool -> () foo True = () foo False = () - instance SuppressUnusedWarnings FooSym0 where - suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) - data FooSym0 :: (~>) Bool () + type FooSym0 :: (~>) Bool () + data FooSym0 a0123456789876543210 where - FooSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) => + FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) => FooSym0 a0123456789876543210 type instance Apply FooSym0 a0123456789876543210 = FooSym1 a0123456789876543210 + instance SuppressUnusedWarnings FooSym0 where + suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) type FooSym1 (a0123456789876543210 :: Bool) = - Foo a0123456789876543210 - type family Foo (a :: Bool) :: () where + Foo a0123456789876543210 :: () + type Foo :: Bool -> () + type family Foo a where Foo 'True = Tuple0Sym0 Foo 'False = Tuple0Sym0 sFoo :: forall (t :: Bool). Sing t -> Sing (Apply FooSym0 t :: ()) diff --git a/tests/compile-and-dump/Singletons/T136.golden b/tests/compile-and-dump/Singletons/T136.golden index 15cbdec4..3f90bf41 100644 --- a/tests/compile-and-dump/Singletons/T136.golden +++ b/tests/compile-and-dump/Singletons/T136.golden @@ -29,36 +29,38 @@ Singletons/T136.hs:(0,0)-(0,0): Splicing declarations fromEnum [] = 0 fromEnum (False : as) = (2 * fromEnum as) fromEnum (True : as) = (1 + (2 * fromEnum as)) - type family Succ_0123456789876543210 (a :: [Bool]) :: [Bool] where + type Succ_0123456789876543210 :: [Bool] -> [Bool] + type family Succ_0123456789876543210 a where Succ_0123456789876543210 '[] = Apply (Apply (:@#@$) TrueSym0) NilSym0 Succ_0123456789876543210 ('(:) 'False as) = Apply (Apply (:@#@$) TrueSym0) as Succ_0123456789876543210 ('(:) 'True as) = Apply (Apply (:@#@$) FalseSym0) (Apply SuccSym0 as) - instance SuppressUnusedWarnings Succ_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Succ_0123456789876543210Sym0KindInference) ()) - data Succ_0123456789876543210Sym0 :: (~>) [Bool] [Bool] + type Succ_0123456789876543210Sym0 :: (~>) [Bool] [Bool] + data Succ_0123456789876543210Sym0 a0123456789876543210 where - Succ_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Succ_0123456789876543210Sym0 arg) (Succ_0123456789876543210Sym1 arg) => + Succ_0123456789876543210Sym0KindInference :: SameKind (Apply Succ_0123456789876543210Sym0 arg) (Succ_0123456789876543210Sym1 arg) => Succ_0123456789876543210Sym0 a0123456789876543210 type instance Apply Succ_0123456789876543210Sym0 a0123456789876543210 = Succ_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Succ_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) Succ_0123456789876543210Sym0KindInference) ()) type Succ_0123456789876543210Sym1 (a0123456789876543210 :: [Bool]) = - Succ_0123456789876543210 a0123456789876543210 - type family Pred_0123456789876543210 (a :: [Bool]) :: [Bool] where + Succ_0123456789876543210 a0123456789876543210 :: [Bool] + type Pred_0123456789876543210 :: [Bool] -> [Bool] + type family Pred_0123456789876543210 a 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 - instance SuppressUnusedWarnings Pred_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Pred_0123456789876543210Sym0KindInference) ()) - data Pred_0123456789876543210Sym0 :: (~>) [Bool] [Bool] + type Pred_0123456789876543210Sym0 :: (~>) [Bool] [Bool] + data Pred_0123456789876543210Sym0 a0123456789876543210 where - Pred_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Pred_0123456789876543210Sym0 arg) (Pred_0123456789876543210Sym1 arg) => + Pred_0123456789876543210Sym0KindInference :: SameKind (Apply Pred_0123456789876543210Sym0 arg) (Pred_0123456789876543210Sym1 arg) => Pred_0123456789876543210Sym0 a0123456789876543210 type instance Apply Pred_0123456789876543210Sym0 a0123456789876543210 = Pred_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Pred_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) Pred_0123456789876543210Sym0KindInference) ()) type Pred_0123456789876543210Sym1 (a0123456789876543210 :: [Bool]) = - Pred_0123456789876543210 a0123456789876543210 + Pred_0123456789876543210 a0123456789876543210 :: [Bool] type family Case_0123456789876543210 i arg_0123456789876543210 t where Case_0123456789876543210 i arg_0123456789876543210 'True = NilSym0 Case_0123456789876543210 i arg_0123456789876543210 'False = Apply SuccSym0 (Apply ToEnumSym0 (Apply PredSym0 i)) @@ -67,34 +69,36 @@ Singletons/T136.hs:(0,0)-(0,0): Splicing declarations 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 + type ToEnum_0123456789876543210 :: GHC.Types.Nat -> [Bool] + type family ToEnum_0123456789876543210 a where ToEnum_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 arg_0123456789876543210 - instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ()) - data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat [Bool] + type ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat [Bool] + data ToEnum_0123456789876543210Sym0 a0123456789876543210 where - ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) => + ToEnum_0123456789876543210Sym0KindInference :: SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) => ToEnum_0123456789876543210Sym0 a0123456789876543210 type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ()) type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) = - ToEnum_0123456789876543210 a0123456789876543210 - type family FromEnum_0123456789876543210 (a :: [Bool]) :: GHC.Types.Nat where + ToEnum_0123456789876543210 a0123456789876543210 :: [Bool] + type FromEnum_0123456789876543210 :: [Bool] -> GHC.Types.Nat + type family FromEnum_0123456789876543210 a 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)) - instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ()) - data FromEnum_0123456789876543210Sym0 :: (~>) [Bool] GHC.Types.Nat + type FromEnum_0123456789876543210Sym0 :: (~>) [Bool] GHC.Types.Nat + data FromEnum_0123456789876543210Sym0 a0123456789876543210 where - FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) => + FromEnum_0123456789876543210Sym0KindInference :: SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) => FromEnum_0123456789876543210Sym0 a0123456789876543210 type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ()) type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: [Bool]) = - FromEnum_0123456789876543210 a0123456789876543210 + FromEnum_0123456789876543210 a0123456789876543210 :: GHC.Types.Nat instance PEnum [Bool] where type Succ a = Apply Succ_0123456789876543210Sym0 a type Pred a = Apply Pred_0123456789876543210Sym0 a diff --git a/tests/compile-and-dump/Singletons/T136b.golden b/tests/compile-and-dump/Singletons/T136b.golden index c60d8942..f523893e 100644 --- a/tests/compile-and-dump/Singletons/T136b.golden +++ b/tests/compile-and-dump/Singletons/T136b.golden @@ -5,17 +5,16 @@ Singletons/T136b.hs:(0,0)-(0,0): Splicing declarations ======> class C a where meth :: a -> a + type MethSym0 :: forall a. (~>) a a + data MethSym0 a0123456789876543210 + where + MethSym0KindInference :: SameKind (Apply MethSym0 arg) (MethSym1 arg) => + MethSym0 a0123456789876543210 + type instance Apply MethSym0 a0123456789876543210 = MethSym1 a0123456789876543210 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 = MethSym1 arg0123456789876543210 - type MethSym1 (arg0123456789876543210 :: a0123456789876543210) = - Meth arg0123456789876543210 + type MethSym1 (a0123456789876543210 :: a) = + Meth a0123456789876543210 :: a class PC a where type Meth (arg :: a) :: a class SC a where @@ -29,19 +28,20 @@ Singletons/T136b.hs:(0,0)-(0,0): Splicing declarations ======> instance C Bool where meth = not - type family Meth_0123456789876543210 (a :: Bool) :: Bool where + type Meth_0123456789876543210 :: Bool -> Bool + type family Meth_0123456789876543210 a where Meth_0123456789876543210 a_0123456789876543210 = Apply NotSym0 a_0123456789876543210 - instance SuppressUnusedWarnings Meth_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Meth_0123456789876543210Sym0KindInference) ()) - data Meth_0123456789876543210Sym0 :: (~>) Bool Bool + type Meth_0123456789876543210Sym0 :: (~>) Bool Bool + data Meth_0123456789876543210Sym0 a0123456789876543210 where - Meth_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Meth_0123456789876543210Sym0 arg) (Meth_0123456789876543210Sym1 arg) => + Meth_0123456789876543210Sym0KindInference :: SameKind (Apply Meth_0123456789876543210Sym0 arg) (Meth_0123456789876543210Sym1 arg) => Meth_0123456789876543210Sym0 a0123456789876543210 type instance Apply Meth_0123456789876543210Sym0 a0123456789876543210 = Meth_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings Meth_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) Meth_0123456789876543210Sym0KindInference) ()) type Meth_0123456789876543210Sym1 (a0123456789876543210 :: Bool) = - Meth_0123456789876543210 a0123456789876543210 + Meth_0123456789876543210 a0123456789876543210 :: Bool instance PC Bool where type Meth a = Apply Meth_0123456789876543210Sym0 a instance SC Bool where diff --git a/tests/compile-and-dump/Singletons/T145.golden b/tests/compile-and-dump/Singletons/T145.golden index cad60c10..fc77f4c2 100644 --- a/tests/compile-and-dump/Singletons/T145.golden +++ b/tests/compile-and-dump/Singletons/T145.golden @@ -5,26 +5,24 @@ Singletons/T145.hs:(0,0)-(0,0): Splicing declarations ======> class Column (f :: Type -> Type) where col :: f a -> a -> Bool + type ColSym0 :: forall f a. (~>) (f a) ((~>) a Bool) + data ColSym0 a0123456789876543210 + where + ColSym0KindInference :: SameKind (Apply ColSym0 arg) (ColSym1 arg) => + ColSym0 a0123456789876543210 + type instance Apply ColSym0 a0123456789876543210 = ColSym1 a0123456789876543210 instance SuppressUnusedWarnings ColSym0 where suppressUnusedWarnings = snd (((,) ColSym0KindInference) ()) - data ColSym0 :: forall f0123456789876543210 a0123456789876543210. - (~>) (f0123456789876543210 a0123456789876543210) ((~>) a0123456789876543210 Bool) + type ColSym1 :: forall f a. f a -> (~>) a Bool + data ColSym1 a0123456789876543210 a0123456789876543210 where - ColSym0KindInference :: forall arg0123456789876543210 - arg. SameKind (Apply ColSym0 arg) (ColSym1 arg) => - ColSym0 arg0123456789876543210 - type instance Apply ColSym0 arg0123456789876543210 = ColSym1 arg0123456789876543210 - instance SuppressUnusedWarnings (ColSym1 arg0123456789876543210) where + ColSym1KindInference :: SameKind (Apply (ColSym1 a0123456789876543210) arg) (ColSym2 a0123456789876543210 arg) => + ColSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (ColSym1 a0123456789876543210) a0123456789876543210 = ColSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ColSym1 a0123456789876543210) 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 = ColSym2 arg0123456789876543210 arg0123456789876543210 - type ColSym2 (arg0123456789876543210 :: f0123456789876543210 a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) = - Col arg0123456789876543210 arg0123456789876543210 + type ColSym2 (a0123456789876543210 :: f a) (a0123456789876543210 :: a) = + Col a0123456789876543210 a0123456789876543210 :: Bool class PColumn (f :: Type -> Type) where type Col (arg :: f a) (arg :: a) :: Bool class SColumn (f :: Type -> Type) where diff --git a/tests/compile-and-dump/Singletons/T150.golden b/tests/compile-and-dump/Singletons/T150.golden index f31ea8c7..d9ed42c9 100644 --- a/tests/compile-and-dump/Singletons/T150.golden +++ b/tests/compile-and-dump/Singletons/T150.golden @@ -70,196 +70,175 @@ Singletons/T150.hs:(0,0)-(0,0): Splicing declarations HNil :: HList '[] HCons :: x -> (HList xs) -> HList ('(:) x xs) data Obj :: Type where Obj :: a -> Obj - type FZSym0 = FZ + type FZSym0 = FZ :: Fin ('Succ n) + type FSSym0 :: (~>) (Fin n) (Fin ('Succ n)) + data FSSym0 a0123456789876543210 + where + FSSym0KindInference :: SameKind (Apply FSSym0 arg) (FSSym1 arg) => + FSSym0 a0123456789876543210 + type instance Apply FSSym0 a0123456789876543210 = FSSym1 a0123456789876543210 instance SuppressUnusedWarnings FSSym0 where suppressUnusedWarnings = snd (((,) FSSym0KindInference) ()) - data FSSym0 :: forall n0123456789876543210. - (~>) (Fin n0123456789876543210) (Fin ('Succ n0123456789876543210)) + type FSSym1 (a0123456789876543210 :: Fin n) = + FS a0123456789876543210 :: Fin ('Succ n) + type MkFoo1Sym0 = MkFoo1 :: Foo Bool + type MkFoo2Sym0 = MkFoo2 :: Foo Ordering + type VNilSym0 = VNil :: Vec 'Zero a + type VConsSym0 :: (~>) a ((~>) (Vec n a) (Vec ('Succ n) a)) + data VConsSym0 a0123456789876543210 where - FSSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply FSSym0 arg) (FSSym1 arg) => - FSSym0 t0123456789876543210 - type instance Apply FSSym0 t0123456789876543210 = FSSym1 t0123456789876543210 - type FSSym1 (t0123456789876543210 :: Fin n0123456789876543210) = - FS t0123456789876543210 - type MkFoo1Sym0 = MkFoo1 - type MkFoo2Sym0 = MkFoo2 - type VNilSym0 = VNil + VConsSym0KindInference :: SameKind (Apply VConsSym0 arg) (VConsSym1 arg) => + VConsSym0 a0123456789876543210 + type instance Apply VConsSym0 a0123456789876543210 = VConsSym1 a0123456789876543210 instance SuppressUnusedWarnings VConsSym0 where suppressUnusedWarnings = snd (((,) VConsSym0KindInference) ()) - data VConsSym0 :: forall a0123456789876543210 n0123456789876543210. - (~>) a0123456789876543210 ((~>) (Vec n0123456789876543210 a0123456789876543210) (Vec ('Succ n0123456789876543210) a0123456789876543210)) + type VConsSym1 :: a -> (~>) (Vec n a) (Vec ('Succ n) a) + data VConsSym1 a0123456789876543210 a0123456789876543210 where - VConsSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply VConsSym0 arg) (VConsSym1 arg) => - VConsSym0 t0123456789876543210 - type instance Apply VConsSym0 t0123456789876543210 = VConsSym1 t0123456789876543210 - instance SuppressUnusedWarnings (VConsSym1 t0123456789876543210) where + VConsSym1KindInference :: SameKind (Apply (VConsSym1 a0123456789876543210) arg) (VConsSym2 a0123456789876543210 arg) => + VConsSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (VConsSym1 a0123456789876543210) a0123456789876543210 = VConsSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (VConsSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) VConsSym1KindInference) ()) - data VConsSym1 (t0123456789876543210 :: a0123456789876543210) :: forall n0123456789876543210. - (~>) (Vec n0123456789876543210 a0123456789876543210) (Vec ('Succ n0123456789876543210) a0123456789876543210) + type VConsSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: Vec n a) = + VCons a0123456789876543210 a0123456789876543210 :: Vec ('Succ n) a + type ReflexiveSym0 = Reflexive :: Equal a a + type HNilSym0 = HNil :: HList '[] + type HConsSym0 :: (~>) x ((~>) (HList xs) (HList ('(:) x xs))) + data HConsSym0 a0123456789876543210 where - VConsSym1KindInference :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply (VConsSym1 t0123456789876543210) arg) (VConsSym2 t0123456789876543210 arg) => - VConsSym1 t0123456789876543210 t0123456789876543210 - type instance Apply (VConsSym1 t0123456789876543210) t0123456789876543210 = VConsSym2 t0123456789876543210 t0123456789876543210 - type VConsSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: Vec n0123456789876543210 a0123456789876543210) = - VCons t0123456789876543210 t0123456789876543210 - type ReflexiveSym0 = Reflexive - type HNilSym0 = HNil + HConsSym0KindInference :: SameKind (Apply HConsSym0 arg) (HConsSym1 arg) => + HConsSym0 a0123456789876543210 + type instance Apply HConsSym0 a0123456789876543210 = HConsSym1 a0123456789876543210 instance SuppressUnusedWarnings HConsSym0 where suppressUnusedWarnings = snd (((,) HConsSym0KindInference) ()) - data HConsSym0 :: forall x0123456789876543210 - xs0123456789876543210. - (~>) x0123456789876543210 ((~>) (HList xs0123456789876543210) (HList ('(:) x0123456789876543210 xs0123456789876543210))) + type HConsSym1 :: x -> (~>) (HList xs) (HList ('(:) x xs)) + data HConsSym1 a0123456789876543210 a0123456789876543210 where - HConsSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply HConsSym0 arg) (HConsSym1 arg) => - HConsSym0 t0123456789876543210 - type instance Apply HConsSym0 t0123456789876543210 = HConsSym1 t0123456789876543210 - instance SuppressUnusedWarnings (HConsSym1 t0123456789876543210) where + HConsSym1KindInference :: SameKind (Apply (HConsSym1 a0123456789876543210) arg) (HConsSym2 a0123456789876543210 arg) => + HConsSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (HConsSym1 a0123456789876543210) a0123456789876543210 = HConsSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (HConsSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) HConsSym1KindInference) ()) - data HConsSym1 (t0123456789876543210 :: x0123456789876543210) :: forall xs0123456789876543210. - (~>) (HList xs0123456789876543210) (HList ('(:) x0123456789876543210 xs0123456789876543210)) + type HConsSym2 (a0123456789876543210 :: x) (a0123456789876543210 :: HList xs) = + HCons a0123456789876543210 a0123456789876543210 :: HList ('(:) x xs) + type ObjSym0 :: (~>) a Obj + data ObjSym0 a0123456789876543210 where - HConsSym1KindInference :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply (HConsSym1 t0123456789876543210) arg) (HConsSym2 t0123456789876543210 arg) => - HConsSym1 t0123456789876543210 t0123456789876543210 - type instance Apply (HConsSym1 t0123456789876543210) t0123456789876543210 = HConsSym2 t0123456789876543210 t0123456789876543210 - type HConsSym2 (t0123456789876543210 :: x0123456789876543210) (t0123456789876543210 :: HList xs0123456789876543210) = - HCons t0123456789876543210 t0123456789876543210 + ObjSym0KindInference :: SameKind (Apply ObjSym0 arg) (ObjSym1 arg) => + ObjSym0 a0123456789876543210 + type instance Apply ObjSym0 a0123456789876543210 = ObjSym1 a0123456789876543210 instance SuppressUnusedWarnings ObjSym0 where suppressUnusedWarnings = snd (((,) ObjSym0KindInference) ()) - data ObjSym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 Obj - where - ObjSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply ObjSym0 arg) (ObjSym1 arg) => - ObjSym0 t0123456789876543210 - type instance Apply ObjSym0 t0123456789876543210 = ObjSym1 t0123456789876543210 - type ObjSym1 (t0123456789876543210 :: a0123456789876543210) = - Obj t0123456789876543210 + type ObjSym1 (a0123456789876543210 :: a) = + Obj a0123456789876543210 :: Obj type family Case_0123456789876543210 n t where - instance SuppressUnusedWarnings TransitivitySym0 where - suppressUnusedWarnings - = snd (((,) TransitivitySym0KindInference) ()) - data TransitivitySym0 :: forall a0123456789876543210 - b0123456789876543210 - c0123456789876543210. - (~>) (Equal a0123456789876543210 b0123456789876543210) ((~>) (Equal b0123456789876543210 c0123456789876543210) (Equal a0123456789876543210 c0123456789876543210)) + type TransitivitySym0 :: (~>) (Equal a b) ((~>) (Equal b c) (Equal a c)) + data TransitivitySym0 a0123456789876543210 where - TransitivitySym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply TransitivitySym0 arg) (TransitivitySym1 arg) => + TransitivitySym0KindInference :: SameKind (Apply TransitivitySym0 arg) (TransitivitySym1 arg) => TransitivitySym0 a0123456789876543210 type instance Apply TransitivitySym0 a0123456789876543210 = TransitivitySym1 a0123456789876543210 - instance SuppressUnusedWarnings (TransitivitySym1 a0123456789876543210) where + instance SuppressUnusedWarnings TransitivitySym0 where suppressUnusedWarnings - = snd (((,) TransitivitySym1KindInference) ()) - data TransitivitySym1 (a0123456789876543210 :: Equal a0123456789876543210 b0123456789876543210) :: forall c0123456789876543210. - (~>) (Equal b0123456789876543210 c0123456789876543210) (Equal a0123456789876543210 c0123456789876543210) + = snd (((,) TransitivitySym0KindInference) ()) + type TransitivitySym1 :: Equal a b -> (~>) (Equal b c) (Equal a c) + data TransitivitySym1 a0123456789876543210 a0123456789876543210 where - TransitivitySym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (TransitivitySym1 a0123456789876543210) arg) (TransitivitySym2 a0123456789876543210 arg) => + TransitivitySym1KindInference :: SameKind (Apply (TransitivitySym1 a0123456789876543210) arg) (TransitivitySym2 a0123456789876543210 arg) => TransitivitySym1 a0123456789876543210 a0123456789876543210 type instance Apply (TransitivitySym1 a0123456789876543210) a0123456789876543210 = TransitivitySym2 a0123456789876543210 a0123456789876543210 - type TransitivitySym2 (a0123456789876543210 :: Equal a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: Equal b0123456789876543210 c0123456789876543210) = - Transitivity a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings SymmetrySym0 where - suppressUnusedWarnings = snd (((,) SymmetrySym0KindInference) ()) - data SymmetrySym0 :: forall a0123456789876543210 - b0123456789876543210. - (~>) (Equal a0123456789876543210 b0123456789876543210) (Equal b0123456789876543210 a0123456789876543210) + instance SuppressUnusedWarnings (TransitivitySym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) TransitivitySym1KindInference) ()) + type TransitivitySym2 (a0123456789876543210 :: Equal a b) (a0123456789876543210 :: Equal b c) = + Transitivity a0123456789876543210 a0123456789876543210 :: Equal a c + type SymmetrySym0 :: (~>) (Equal a b) (Equal b a) + data SymmetrySym0 a0123456789876543210 where - SymmetrySym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply SymmetrySym0 arg) (SymmetrySym1 arg) => + SymmetrySym0KindInference :: SameKind (Apply SymmetrySym0 arg) (SymmetrySym1 arg) => SymmetrySym0 a0123456789876543210 type instance Apply SymmetrySym0 a0123456789876543210 = SymmetrySym1 a0123456789876543210 - type SymmetrySym1 (a0123456789876543210 :: Equal a0123456789876543210 b0123456789876543210) = - Symmetry a0123456789876543210 - instance SuppressUnusedWarnings MapVecSym0 where - suppressUnusedWarnings = snd (((,) MapVecSym0KindInference) ()) - data MapVecSym0 :: forall a0123456789876543210 - b0123456789876543210 - n0123456789876543210. - (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) (Vec n0123456789876543210 a0123456789876543210) (Vec n0123456789876543210 b0123456789876543210)) + instance SuppressUnusedWarnings SymmetrySym0 where + suppressUnusedWarnings = snd (((,) SymmetrySym0KindInference) ()) + type SymmetrySym1 (a0123456789876543210 :: Equal a b) = + Symmetry a0123456789876543210 :: Equal b a + type MapVecSym0 :: (~>) ((~>) a b) ((~>) (Vec n a) (Vec n b)) + data MapVecSym0 a0123456789876543210 where - MapVecSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply MapVecSym0 arg) (MapVecSym1 arg) => + MapVecSym0KindInference :: SameKind (Apply MapVecSym0 arg) (MapVecSym1 arg) => MapVecSym0 a0123456789876543210 type instance Apply MapVecSym0 a0123456789876543210 = MapVecSym1 a0123456789876543210 - instance SuppressUnusedWarnings (MapVecSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) MapVecSym1KindInference) ()) - data MapVecSym1 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: forall n0123456789876543210. - (~>) (Vec n0123456789876543210 a0123456789876543210) (Vec n0123456789876543210 b0123456789876543210) + instance SuppressUnusedWarnings MapVecSym0 where + suppressUnusedWarnings = snd (((,) MapVecSym0KindInference) ()) + type MapVecSym1 :: (~>) a b -> (~>) (Vec n a) (Vec n b) + data MapVecSym1 a0123456789876543210 a0123456789876543210 where - MapVecSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (MapVecSym1 a0123456789876543210) arg) (MapVecSym2 a0123456789876543210 arg) => + MapVecSym1KindInference :: SameKind (Apply (MapVecSym1 a0123456789876543210) arg) (MapVecSym2 a0123456789876543210 arg) => MapVecSym1 a0123456789876543210 a0123456789876543210 type instance Apply (MapVecSym1 a0123456789876543210) a0123456789876543210 = MapVecSym2 a0123456789876543210 a0123456789876543210 - type MapVecSym2 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: Vec n0123456789876543210 a0123456789876543210) = - MapVec a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings (!@#@$) where - suppressUnusedWarnings = snd (((,) (:!@#@$###)) ()) - data (!@#@$) :: forall n0123456789876543210 a0123456789876543210. - (~>) (Vec n0123456789876543210 a0123456789876543210) ((~>) (Fin n0123456789876543210) a0123456789876543210) + instance SuppressUnusedWarnings (MapVecSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) MapVecSym1KindInference) ()) + type MapVecSym2 (a0123456789876543210 :: (~>) a b) (a0123456789876543210 :: Vec n a) = + MapVec a0123456789876543210 a0123456789876543210 :: Vec n b + type (!@#@$) :: (~>) (Vec n a) ((~>) (Fin n) a) + data (!@#@$) a0123456789876543210 where - (:!@#@$###) :: forall a0123456789876543210 - arg. SameKind (Apply (!@#@$) arg) ((!@#@$$) arg) => + (:!@#@$###) :: SameKind (Apply (!@#@$) arg) ((!@#@$$) arg) => (!@#@$) a0123456789876543210 type instance Apply (!@#@$) a0123456789876543210 = (!@#@$$) a0123456789876543210 - instance SuppressUnusedWarnings ((!@#@$$) a0123456789876543210) where - suppressUnusedWarnings = snd (((,) (:!@#@$$###)) ()) - data (!@#@$$) (a0123456789876543210 :: Vec n0123456789876543210 a0123456789876543210) :: (~>) (Fin n0123456789876543210) a0123456789876543210 + instance SuppressUnusedWarnings (!@#@$) where + suppressUnusedWarnings = snd (((,) (:!@#@$###)) ()) + type (!@#@$$) :: Vec n a -> (~>) (Fin n) a + data (!@#@$$) a0123456789876543210 a0123456789876543210 where - (:!@#@$$###) :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply ((!@#@$$) a0123456789876543210) arg) ((!@#@$$$) a0123456789876543210 arg) => + (:!@#@$$###) :: SameKind (Apply ((!@#@$$) a0123456789876543210) arg) ((!@#@$$$) a0123456789876543210 arg) => (!@#@$$) a0123456789876543210 a0123456789876543210 type instance Apply ((!@#@$$) a0123456789876543210) a0123456789876543210 = (!@#@$$$) a0123456789876543210 a0123456789876543210 - type (!@#@$$$) (a0123456789876543210 :: Vec n0123456789876543210 a0123456789876543210) (a0123456789876543210 :: Fin n0123456789876543210) = - (!) a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings TailVecSym0 where - suppressUnusedWarnings = snd (((,) TailVecSym0KindInference) ()) - data TailVecSym0 :: forall n0123456789876543210 - a0123456789876543210. - (~>) (Vec ('Succ n0123456789876543210) a0123456789876543210) (Vec n0123456789876543210 a0123456789876543210) + instance SuppressUnusedWarnings ((!@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (:!@#@$$###)) ()) + type (!@#@$$$) (a0123456789876543210 :: Vec n a) (a0123456789876543210 :: Fin n) = + (!) a0123456789876543210 a0123456789876543210 :: a + type TailVecSym0 :: (~>) (Vec ('Succ n) a) (Vec n a) + data TailVecSym0 a0123456789876543210 where - TailVecSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply TailVecSym0 arg) (TailVecSym1 arg) => + TailVecSym0KindInference :: SameKind (Apply TailVecSym0 arg) (TailVecSym1 arg) => TailVecSym0 a0123456789876543210 type instance Apply TailVecSym0 a0123456789876543210 = TailVecSym1 a0123456789876543210 - type TailVecSym1 (a0123456789876543210 :: Vec ('Succ n0123456789876543210) a0123456789876543210) = - TailVec a0123456789876543210 - instance SuppressUnusedWarnings HeadVecSym0 where - suppressUnusedWarnings = snd (((,) HeadVecSym0KindInference) ()) - data HeadVecSym0 :: forall n0123456789876543210 - a0123456789876543210. - (~>) (Vec ('Succ n0123456789876543210) a0123456789876543210) a0123456789876543210 + instance SuppressUnusedWarnings TailVecSym0 where + suppressUnusedWarnings = snd (((,) TailVecSym0KindInference) ()) + type TailVecSym1 (a0123456789876543210 :: Vec ('Succ n) a) = + TailVec a0123456789876543210 :: Vec n a + type HeadVecSym0 :: (~>) (Vec ('Succ n) a) a + data HeadVecSym0 a0123456789876543210 where - HeadVecSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply HeadVecSym0 arg) (HeadVecSym1 arg) => + HeadVecSym0KindInference :: SameKind (Apply HeadVecSym0 arg) (HeadVecSym1 arg) => HeadVecSym0 a0123456789876543210 type instance Apply HeadVecSym0 a0123456789876543210 = HeadVecSym1 a0123456789876543210 - type HeadVecSym1 (a0123456789876543210 :: Vec ('Succ n0123456789876543210) a0123456789876543210) = - HeadVec a0123456789876543210 - type family Transitivity (a :: Equal a b) (a :: Equal b c) :: Equal a c where + instance SuppressUnusedWarnings HeadVecSym0 where + suppressUnusedWarnings = snd (((,) HeadVecSym0KindInference) ()) + type HeadVecSym1 (a0123456789876543210 :: Vec ('Succ n) a) = + HeadVec a0123456789876543210 :: a + type Transitivity :: Equal a b -> Equal b c -> Equal a c + type family Transitivity a a where Transitivity Reflexive Reflexive = ReflexiveSym0 - type family Symmetry (a :: Equal a b) :: Equal b a where + type Symmetry :: Equal a b -> Equal b a + type family Symmetry a where Symmetry Reflexive = ReflexiveSym0 - type family MapVec (a :: (~>) a b) (a :: Vec n a) :: Vec n b where + type MapVec :: (~>) a b -> Vec n a -> Vec n b + type family MapVec a a where MapVec _ VNil = VNilSym0 MapVec f (VCons x xs) = Apply (Apply VConsSym0 (Apply f x)) (Apply (Apply MapVecSym0 f) xs) - type family (!) (a :: Vec n a) (a :: Fin n) :: a where + type (!) :: Vec n a -> Fin n -> a + type family (!) a a where (!) (VCons x _) FZ = x (!) (VCons _ xs) (FS n) = Apply (Apply (!@#@$) xs) n (!) VNil n = Case_0123456789876543210 n n - type family TailVec (a :: Vec ('Succ n) a) :: Vec n a where + type TailVec :: Vec ('Succ n) a -> Vec n a + type family TailVec a where TailVec (VCons _ xs) = xs - type family HeadVec (a :: Vec ('Succ n) a) :: a where + type HeadVec :: Vec ('Succ n) a -> a + type family HeadVec a where HeadVec (VCons x _) = x sTransitivity :: forall a b c (t :: Equal a b) (t :: Equal b c). @@ -317,27 +296,27 @@ Singletons/T150.hs:(0,0)-(0,0): Splicing declarations sing = (singFun1 @TailVecSym0) sTailVec instance SingI (HeadVecSym0 :: (~>) (Vec ('Succ n) a) a) where sing = (singFun1 @HeadVecSym0) sHeadVec - data SFin :: forall a. Fin a -> Type + data SFin :: forall a. Fin (a :: Nat) -> Type where SFZ :: forall n. SFin (FZ :: Fin ('Succ n)) SFS :: forall n (n :: Fin n). (Sing n) -> SFin (FS n :: Fin ('Succ n)) type instance Sing @(Fin a) = SFin - data SFoo :: forall a. Foo a -> Type + data SFoo :: forall a. Foo (a :: Type) -> Type where SMkFoo1 :: SFoo (MkFoo1 :: Foo Bool) SMkFoo2 :: SFoo (MkFoo2 :: Foo Ordering) type instance Sing @(Foo a) = SFoo - data SVec :: forall a a. Vec a a -> Type + data SVec :: forall a a. Vec (a :: Nat) (a :: Type) -> Type where SVNil :: forall a. SVec (VNil :: Vec 'Zero a) SVCons :: forall a n (n :: a) (n :: Vec n a). (Sing n) -> (Sing n) -> SVec (VCons n n :: Vec ('Succ n) a) type instance Sing @(Vec a a) = SVec - data SEqual :: forall a a. Equal a a -> Type + data SEqual :: forall a a. Equal (a :: Type) (a :: Type) -> Type where SReflexive :: forall a. SEqual (Reflexive :: Equal a a) type instance Sing @(Equal a a) = SEqual - data SHList :: forall a. HList a -> Type + data SHList :: forall a. HList (a :: [Type]) -> Type where SHNil :: SHList (HNil :: HList '[]) SHCons :: forall x xs (n :: x) (n :: HList xs). diff --git a/tests/compile-and-dump/Singletons/T159.golden b/tests/compile-and-dump/Singletons/T159.golden index 791268bb..e115c505 100644 --- a/tests/compile-and-dump/Singletons/T159.golden +++ b/tests/compile-and-dump/Singletons/T159.golden @@ -1,13 +1,14 @@ 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 + type ASym0 = 'A :: T0 + type BSym0 = 'B :: T0 + type CSym0 = 'C :: T0 + type DSym0 = 'D :: T0 + type ESym0 = 'E :: T0 + type FSym0 = 'F :: T0 + type ST0 :: T0 -> GHC.Types.Type + data ST0 z where SA :: ST0 ('A :: T0) SB :: ST0 ('B :: T0) @@ -42,52 +43,51 @@ Singletons/T159.hs:0:0:: Splicing declarations sing = SE instance SingI 'F where sing = SF - type N1Sym0 = 'N1 + type N1Sym0 = 'N1 :: T1 + type C1Sym0 :: (~>) T0 ((~>) T1 T1) + data C1Sym0 a0123456789876543210 + where + C1Sym0KindInference :: SameKind (Apply C1Sym0 arg) (C1Sym1 arg) => + C1Sym0 a0123456789876543210 + type instance Apply C1Sym0 a0123456789876543210 = C1Sym1 a0123456789876543210 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` - instance SuppressUnusedWarnings (C1Sym1 t0123456789876543210) where - suppressUnusedWarnings = snd (((,) C1Sym1KindInference) ()) - data C1Sym1 (t0123456789876543210 :: T0) :: (~>) T1 T1 + type C1Sym1 :: T0 -> (~>) T1 T1 + data C1Sym1 a0123456789876543210 a0123456789876543210 where - C1Sym1KindInference :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply (C1Sym1 t0123456789876543210) arg) (C1Sym2 t0123456789876543210 arg) => - C1Sym1 t0123456789876543210 t0123456789876543210 - type instance Apply (C1Sym1 t0123456789876543210) t0123456789876543210 = C1Sym2 t0123456789876543210 t0123456789876543210 + C1Sym1KindInference :: SameKind (Apply (C1Sym1 a0123456789876543210) arg) (C1Sym2 a0123456789876543210 arg) => + C1Sym1 a0123456789876543210 a0123456789876543210 + type instance Apply (C1Sym1 a0123456789876543210) a0123456789876543210 = C1Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (C1Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) C1Sym1KindInference) ()) infixr 5 `C1Sym1` - type C1Sym2 (t0123456789876543210 :: T0) (t0123456789876543210 :: T1) = - 'C1 t0123456789876543210 t0123456789876543210 + type C1Sym2 (a0123456789876543210 :: T0) (a0123456789876543210 :: T1) = + 'C1 a0123456789876543210 a0123456789876543210 :: T1 infixr 5 `C1Sym2` + type (:&&@#@$) :: (~>) T0 ((~>) T1 T1) + data (:&&@#@$) a0123456789876543210 + where + (::&&@#@$###) :: SameKind (Apply (:&&@#@$) arg) ((:&&@#@$$) arg) => + (:&&@#@$) a0123456789876543210 + type instance Apply (:&&@#@$) a0123456789876543210 = (:&&@#@$$) a0123456789876543210 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 :&&@#@$ - instance SuppressUnusedWarnings ((:&&@#@$$) t0123456789876543210) where - suppressUnusedWarnings = snd (((,) (::&&@#@$$###)) ()) - data (:&&@#@$$) (t0123456789876543210 :: T0) :: (~>) T1 T1 + type (:&&@#@$$) :: T0 -> (~>) T1 T1 + data (:&&@#@$$) a0123456789876543210 a0123456789876543210 where - (::&&@#@$$###) :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply ((:&&@#@$$) t0123456789876543210) arg) ((:&&@#@$$$) t0123456789876543210 arg) => - (:&&@#@$$) t0123456789876543210 t0123456789876543210 - type instance Apply ((:&&@#@$$) t0123456789876543210) t0123456789876543210 = (:&&@#@$$$) t0123456789876543210 t0123456789876543210 + (::&&@#@$$###) :: SameKind (Apply ((:&&@#@$$) a0123456789876543210) arg) ((:&&@#@$$$) a0123456789876543210 arg) => + (:&&@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((:&&@#@$$) a0123456789876543210) a0123456789876543210 = (:&&@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((:&&@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (::&&@#@$$###)) ()) infixr 5 :&&@#@$$ - type (:&&@#@$$$) (t0123456789876543210 :: T0) (t0123456789876543210 :: T1) = - '(:&&) t0123456789876543210 t0123456789876543210 + type (:&&@#@$$$) (a0123456789876543210 :: T0) (a0123456789876543210 :: T1) = + '(:&&) a0123456789876543210 a0123456789876543210 :: T1 infixr 5 :&&@#@$$$ - data ST1 :: T1 -> GHC.Types.Type + type ST1 :: T1 -> GHC.Types.Type + data ST1 z where SN1 :: ST1 ('N1 :: T1) SC1 :: forall (n :: T0) (n :: T1). @@ -140,50 +140,48 @@ Singletons/T159.hs:(0,0)-(0,0): Splicing declarations data T2 = N2 | C2 T0 T2 | T0 :|| T2 infixr 5 `C2` infixr 5 :|| - type N2Sym0 = N2 + type N2Sym0 = N2 :: T2 + type C2Sym0 :: (~>) T0 ((~>) T2 T2) + data C2Sym0 a0123456789876543210 + where + C2Sym0KindInference :: SameKind (Apply C2Sym0 arg) (C2Sym1 arg) => + C2Sym0 a0123456789876543210 + type instance Apply C2Sym0 a0123456789876543210 = C2Sym1 a0123456789876543210 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` - instance SuppressUnusedWarnings (C2Sym1 t0123456789876543210) where - suppressUnusedWarnings = snd (((,) C2Sym1KindInference) ()) - data C2Sym1 (t0123456789876543210 :: T0) :: (~>) T2 T2 + type C2Sym1 :: T0 -> (~>) T2 T2 + data C2Sym1 a0123456789876543210 a0123456789876543210 where - C2Sym1KindInference :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply (C2Sym1 t0123456789876543210) arg) (C2Sym2 t0123456789876543210 arg) => - C2Sym1 t0123456789876543210 t0123456789876543210 - type instance Apply (C2Sym1 t0123456789876543210) t0123456789876543210 = C2Sym2 t0123456789876543210 t0123456789876543210 + C2Sym1KindInference :: SameKind (Apply (C2Sym1 a0123456789876543210) arg) (C2Sym2 a0123456789876543210 arg) => + C2Sym1 a0123456789876543210 a0123456789876543210 + type instance Apply (C2Sym1 a0123456789876543210) a0123456789876543210 = C2Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (C2Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) C2Sym1KindInference) ()) infixr 5 `C2Sym1` - type C2Sym2 (t0123456789876543210 :: T0) (t0123456789876543210 :: T2) = - C2 t0123456789876543210 t0123456789876543210 + type C2Sym2 (a0123456789876543210 :: T0) (a0123456789876543210 :: T2) = + C2 a0123456789876543210 a0123456789876543210 :: T2 infixr 5 `C2Sym2` + type (:||@#@$) :: (~>) T0 ((~>) T2 T2) + data (:||@#@$) a0123456789876543210 + where + (::||@#@$###) :: SameKind (Apply (:||@#@$) arg) ((:||@#@$$) arg) => + (:||@#@$) a0123456789876543210 + type instance Apply (:||@#@$) a0123456789876543210 = (:||@#@$$) a0123456789876543210 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 :||@#@$ - instance SuppressUnusedWarnings ((:||@#@$$) t0123456789876543210) where - suppressUnusedWarnings = snd (((,) (::||@#@$$###)) ()) - data (:||@#@$$) (t0123456789876543210 :: T0) :: (~>) T2 T2 + type (:||@#@$$) :: T0 -> (~>) T2 T2 + data (:||@#@$$) a0123456789876543210 a0123456789876543210 where - (::||@#@$$###) :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply ((:||@#@$$) t0123456789876543210) arg) ((:||@#@$$$) t0123456789876543210 arg) => - (:||@#@$$) t0123456789876543210 t0123456789876543210 - type instance Apply ((:||@#@$$) t0123456789876543210) t0123456789876543210 = (:||@#@$$$) t0123456789876543210 t0123456789876543210 + (::||@#@$$###) :: SameKind (Apply ((:||@#@$$) a0123456789876543210) arg) ((:||@#@$$$) a0123456789876543210 arg) => + (:||@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((:||@#@$$) a0123456789876543210) a0123456789876543210 = (:||@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((:||@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (::||@#@$$###)) ()) infixr 5 :||@#@$$ - type (:||@#@$$$) (t0123456789876543210 :: T0) (t0123456789876543210 :: T2) = - (:||) t0123456789876543210 t0123456789876543210 + type (:||@#@$$$) (a0123456789876543210 :: T0) (a0123456789876543210 :: T2) = + (:||) a0123456789876543210 a0123456789876543210 :: T2 infixr 5 :||@#@$$$ infixr 5 :%|| infixr 5 `SC2` diff --git a/tests/compile-and-dump/Singletons/T160.golden b/tests/compile-and-dump/Singletons/T160.golden index 86528780..d3a7d49f 100644 --- a/tests/compile-and-dump/Singletons/T160.golden +++ b/tests/compile-and-dump/Singletons/T160.golden @@ -5,18 +5,17 @@ Singletons/T160.hs:(0,0)-(0,0): Splicing declarations ======> foo :: (Num a, Eq a) => a -> a foo x = if (x == 0) then 1 else (typeError $ ShowType x) + data Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 + where + Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) => + Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 + type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym1 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_0123456789876543210Sym1 x0123456789876543210 type Let0123456789876543210Scrutinee_0123456789876543210Sym1 x0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210 type family Let0123456789876543210Scrutinee_0123456789876543210 x where @@ -24,18 +23,18 @@ Singletons/T160.hs:(0,0)-(0,0): Splicing declarations type family Case_0123456789876543210 x t where Case_0123456789876543210 x 'True = FromInteger 1 Case_0123456789876543210 x 'False = Apply (Apply ($@#@$) TypeErrorSym0) (Apply ShowTypeSym0 x) - instance SuppressUnusedWarnings FooSym0 where - suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) - data FooSym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 a0123456789876543210 + type FooSym0 :: (~>) a a + data FooSym0 a0123456789876543210 where - FooSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) => + FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) => FooSym0 a0123456789876543210 type instance Apply FooSym0 a0123456789876543210 = FooSym1 a0123456789876543210 - type FooSym1 (a0123456789876543210 :: a0123456789876543210) = - Foo a0123456789876543210 - type family Foo (a :: a) :: a where + instance SuppressUnusedWarnings FooSym0 where + suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) + type FooSym1 (a0123456789876543210 :: a) = + Foo a0123456789876543210 :: a + type Foo :: a -> a + type family Foo a where Foo x = Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x) sFoo :: forall a (t :: a). diff --git a/tests/compile-and-dump/Singletons/T163.golden b/tests/compile-and-dump/Singletons/T163.golden index b965c1eb..ed22c112 100644 --- a/tests/compile-and-dump/Singletons/T163.golden +++ b/tests/compile-and-dump/Singletons/T163.golden @@ -2,28 +2,26 @@ Singletons/T163.hs:0:0:: Splicing declarations singletons [d| data a + b = L a | R b |] ======> data (+) a b = L a | R b + type LSym0 :: forall a b. (~>) a ((+) a b) + data LSym0 a0123456789876543210 + where + LSym0KindInference :: SameKind (Apply LSym0 arg) (LSym1 arg) => + LSym0 a0123456789876543210 + type instance Apply LSym0 a0123456789876543210 = LSym1 a0123456789876543210 instance SuppressUnusedWarnings LSym0 where suppressUnusedWarnings = snd (((,) LSym0KindInference) ()) - data LSym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((+) a0123456789876543210 b0123456789876543210) + type LSym1 (a0123456789876543210 :: a) = + L a0123456789876543210 :: (+) a b + type RSym0 :: forall a b. (~>) b ((+) a b) + data RSym0 a0123456789876543210 where - LSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply LSym0 arg) (LSym1 arg) => - LSym0 t0123456789876543210 - type instance Apply LSym0 t0123456789876543210 = LSym1 t0123456789876543210 - type LSym1 (t0123456789876543210 :: a0123456789876543210) = - L t0123456789876543210 + RSym0KindInference :: SameKind (Apply RSym0 arg) (RSym1 arg) => + RSym0 a0123456789876543210 + type instance Apply RSym0 a0123456789876543210 = RSym1 a0123456789876543210 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 = RSym1 t0123456789876543210 - type RSym1 (t0123456789876543210 :: b0123456789876543210) = - R t0123456789876543210 + type RSym1 (a0123456789876543210 :: b) = + R a0123456789876543210 :: (+) a b data (%+) :: forall a b. (+) a b -> GHC.Types.Type where SL :: forall a b (n :: a). (Sing n) -> (%+) (L n :: (+) a b) diff --git a/tests/compile-and-dump/Singletons/T166.golden b/tests/compile-and-dump/Singletons/T166.golden index 6f61eb5f..1ea45096 100644 --- a/tests/compile-and-dump/Singletons/T166.golden +++ b/tests/compile-and-dump/Singletons/T166.golden @@ -5,85 +5,77 @@ Singletons/T166.hs:(0,0)-(0,0): Splicing declarations foo :: a -> [Bool] foo x s = foosPrec 0 x s |] ======> + type FoosPrecSym0 :: forall a. + (~>) Nat ((~>) a ((~>) [Bool] [Bool])) + data FoosPrecSym0 a0123456789876543210 + where + FoosPrecSym0KindInference :: SameKind (Apply FoosPrecSym0 arg) (FoosPrecSym1 arg) => + FoosPrecSym0 a0123456789876543210 + type instance Apply FoosPrecSym0 a0123456789876543210 = FoosPrecSym1 a0123456789876543210 instance SuppressUnusedWarnings FoosPrecSym0 where suppressUnusedWarnings = snd (((,) FoosPrecSym0KindInference) ()) - data FoosPrecSym0 :: forall a0123456789876543210. - (~>) Nat ((~>) a0123456789876543210 ((~>) [Bool] [Bool])) + type FoosPrecSym1 :: forall a. Nat -> (~>) a ((~>) [Bool] [Bool]) + data FoosPrecSym1 a0123456789876543210 a0123456789876543210 where - FoosPrecSym0KindInference :: forall arg0123456789876543210 - arg. SameKind (Apply FoosPrecSym0 arg) (FoosPrecSym1 arg) => - FoosPrecSym0 arg0123456789876543210 - type instance Apply FoosPrecSym0 arg0123456789876543210 = FoosPrecSym1 arg0123456789876543210 - instance SuppressUnusedWarnings (FoosPrecSym1 arg0123456789876543210) where + FoosPrecSym1KindInference :: SameKind (Apply (FoosPrecSym1 a0123456789876543210) arg) (FoosPrecSym2 a0123456789876543210 arg) => + FoosPrecSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (FoosPrecSym1 a0123456789876543210) a0123456789876543210 = FoosPrecSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (FoosPrecSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) FoosPrecSym1KindInference) ()) - data FoosPrecSym1 (arg0123456789876543210 :: Nat) :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) [Bool] [Bool]) + type FoosPrecSym2 :: forall a. Nat -> a -> (~>) [Bool] [Bool] + data FoosPrecSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (FoosPrecSym2 arg0123456789876543210 arg0123456789876543210) where + FoosPrecSym2KindInference :: SameKind (Apply (FoosPrecSym2 a0123456789876543210 a0123456789876543210) arg) (FoosPrecSym3 a0123456789876543210 a0123456789876543210 arg) => + FoosPrecSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (FoosPrecSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = FoosPrecSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (FoosPrecSym2 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) FoosPrecSym2KindInference) ()) - data FoosPrecSym2 (arg0123456789876543210 :: Nat) (arg0123456789876543210 :: a0123456789876543210) :: (~>) [Bool] [Bool] + type FoosPrecSym3 (a0123456789876543210 :: Nat) (a0123456789876543210 :: a) (a0123456789876543210 :: [Bool]) = + FoosPrec a0123456789876543210 a0123456789876543210 a0123456789876543210 :: [Bool] + type FooSym0 :: forall a. (~>) a [Bool] + data FooSym0 a0123456789876543210 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 = FoosPrecSym3 arg0123456789876543210 arg0123456789876543210 arg0123456789876543210 - type FoosPrecSym3 (arg0123456789876543210 :: Nat) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: [Bool]) = - FoosPrec arg0123456789876543210 arg0123456789876543210 arg0123456789876543210 + FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) => + FooSym0 a0123456789876543210 + type instance Apply FooSym0 a0123456789876543210 = FooSym1 a0123456789876543210 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 = FooSym1 arg0123456789876543210 - type FooSym1 (arg0123456789876543210 :: a0123456789876543210) = - Foo arg0123456789876543210 + type FooSym1 (a0123456789876543210 :: a) = + Foo a0123456789876543210 :: [Bool] type family Lambda_0123456789876543210 x s where Lambda_0123456789876543210 x s = Apply (Apply (Apply FoosPrecSym0 (Data.Singletons.Prelude.Num.FromInteger 0)) x) s - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 x0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 x0123456789876543210 s0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210 - s0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => Lambda_0123456789876543210Sym1 x0123456789876543210 s0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) s0123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 s0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) type Lambda_0123456789876543210Sym2 x0123456789876543210 s0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 s0123456789876543210 - type family Foo_0123456789876543210 (a :: a) :: [Bool] where + type Foo_0123456789876543210 :: a -> [Bool] + type family Foo_0123456789876543210 a where Foo_0123456789876543210 x = Apply Lambda_0123456789876543210Sym0 x - instance SuppressUnusedWarnings Foo_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Foo_0123456789876543210Sym0KindInference) ()) - data Foo_0123456789876543210Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 [Bool] + type Foo_0123456789876543210Sym0 :: (~>) a [Bool] + data Foo_0123456789876543210Sym0 a0123456789876543210 where - Foo_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo_0123456789876543210Sym0 arg) (Foo_0123456789876543210Sym1 arg) => + Foo_0123456789876543210Sym0KindInference :: SameKind (Apply Foo_0123456789876543210Sym0 arg) (Foo_0123456789876543210Sym1 arg) => Foo_0123456789876543210Sym0 a0123456789876543210 type instance Apply Foo_0123456789876543210Sym0 a0123456789876543210 = Foo_0123456789876543210Sym1 a0123456789876543210 - type Foo_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) = - Foo_0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings Foo_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) Foo_0123456789876543210Sym0KindInference) ()) + type Foo_0123456789876543210Sym1 (a0123456789876543210 :: a) = + Foo_0123456789876543210 a0123456789876543210 :: [Bool] class PFoo a where type FoosPrec (arg :: Nat) (arg :: a) (arg :: [Bool]) :: [Bool] type Foo (arg :: a) :: [Bool] diff --git a/tests/compile-and-dump/Singletons/T167.golden b/tests/compile-and-dump/Singletons/T167.golden index d7d0a817..a751e3e6 100644 --- a/tests/compile-and-dump/Singletons/T167.golden +++ b/tests/compile-and-dump/Singletons/T167.golden @@ -8,121 +8,112 @@ Singletons/T167.hs:(0,0)-(0,0): Splicing declarations instance Foo a => Foo [a] where foosPrec _ = fooList |] ======> + type FoosPrecSym0 :: forall a. + (~>) Nat ((~>) a ((~>) [Bool] [Bool])) + data FoosPrecSym0 a0123456789876543210 + where + FoosPrecSym0KindInference :: SameKind (Apply FoosPrecSym0 arg) (FoosPrecSym1 arg) => + FoosPrecSym0 a0123456789876543210 + type instance Apply FoosPrecSym0 a0123456789876543210 = FoosPrecSym1 a0123456789876543210 instance SuppressUnusedWarnings FoosPrecSym0 where suppressUnusedWarnings = snd (((,) FoosPrecSym0KindInference) ()) - data FoosPrecSym0 :: forall a0123456789876543210. - (~>) Nat ((~>) a0123456789876543210 ((~>) [Bool] [Bool])) + type FoosPrecSym1 :: forall a. Nat -> (~>) a ((~>) [Bool] [Bool]) + data FoosPrecSym1 a0123456789876543210 a0123456789876543210 where - FoosPrecSym0KindInference :: forall arg0123456789876543210 - arg. SameKind (Apply FoosPrecSym0 arg) (FoosPrecSym1 arg) => - FoosPrecSym0 arg0123456789876543210 - type instance Apply FoosPrecSym0 arg0123456789876543210 = FoosPrecSym1 arg0123456789876543210 - instance SuppressUnusedWarnings (FoosPrecSym1 arg0123456789876543210) where + FoosPrecSym1KindInference :: SameKind (Apply (FoosPrecSym1 a0123456789876543210) arg) (FoosPrecSym2 a0123456789876543210 arg) => + FoosPrecSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (FoosPrecSym1 a0123456789876543210) a0123456789876543210 = FoosPrecSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (FoosPrecSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) FoosPrecSym1KindInference) ()) - data FoosPrecSym1 (arg0123456789876543210 :: Nat) :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) [Bool] [Bool]) + type FoosPrecSym2 :: forall a. Nat -> a -> (~>) [Bool] [Bool] + data FoosPrecSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 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 (FoosPrecSym2 arg0123456789876543210 arg0123456789876543210) where + FoosPrecSym2KindInference :: SameKind (Apply (FoosPrecSym2 a0123456789876543210 a0123456789876543210) arg) (FoosPrecSym3 a0123456789876543210 a0123456789876543210 arg) => + FoosPrecSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 + type instance Apply (FoosPrecSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = FoosPrecSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (FoosPrecSym2 a0123456789876543210 a0123456789876543210) where suppressUnusedWarnings = snd (((,) FoosPrecSym2KindInference) ()) - data FoosPrecSym2 (arg0123456789876543210 :: Nat) (arg0123456789876543210 :: a0123456789876543210) :: (~>) [Bool] [Bool] + type FoosPrecSym3 (a0123456789876543210 :: Nat) (a0123456789876543210 :: a) (a0123456789876543210 :: [Bool]) = + FoosPrec a0123456789876543210 a0123456789876543210 a0123456789876543210 :: [Bool] + type FooListSym0 :: forall a. (~>) a ((~>) [Bool] [Bool]) + data FooListSym0 a0123456789876543210 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 = FoosPrecSym3 arg0123456789876543210 arg0123456789876543210 arg0123456789876543210 - type FoosPrecSym3 (arg0123456789876543210 :: Nat) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: [Bool]) = - FoosPrec arg0123456789876543210 arg0123456789876543210 arg0123456789876543210 + FooListSym0KindInference :: SameKind (Apply FooListSym0 arg) (FooListSym1 arg) => + FooListSym0 a0123456789876543210 + type instance Apply FooListSym0 a0123456789876543210 = FooListSym1 a0123456789876543210 instance SuppressUnusedWarnings FooListSym0 where suppressUnusedWarnings = snd (((,) FooListSym0KindInference) ()) - data FooListSym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) [Bool] [Bool]) + type FooListSym1 :: forall a. a -> (~>) [Bool] [Bool] + data FooListSym1 a0123456789876543210 a0123456789876543210 where - FooListSym0KindInference :: forall arg0123456789876543210 - arg. SameKind (Apply FooListSym0 arg) (FooListSym1 arg) => - FooListSym0 arg0123456789876543210 - type instance Apply FooListSym0 arg0123456789876543210 = FooListSym1 arg0123456789876543210 - instance SuppressUnusedWarnings (FooListSym1 arg0123456789876543210) where + FooListSym1KindInference :: SameKind (Apply (FooListSym1 a0123456789876543210) arg) (FooListSym2 a0123456789876543210 arg) => + FooListSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (FooListSym1 a0123456789876543210) a0123456789876543210 = FooListSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (FooListSym1 a0123456789876543210) 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 = FooListSym2 arg0123456789876543210 arg0123456789876543210 - type FooListSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: [Bool]) = - FooList arg0123456789876543210 arg0123456789876543210 - type family FooList_0123456789876543210 (a :: a) (a :: [Bool]) :: [Bool] where + type FooListSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: [Bool]) = + FooList a0123456789876543210 a0123456789876543210 :: [Bool] + type FooList_0123456789876543210 :: a -> [Bool] -> [Bool] + type family FooList_0123456789876543210 a a where FooList_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply UndefinedSym0 a_0123456789876543210) a_0123456789876543210 - instance SuppressUnusedWarnings FooList_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) FooList_0123456789876543210Sym0KindInference) ()) - data FooList_0123456789876543210Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) [Bool] [Bool]) + type FooList_0123456789876543210Sym0 :: (~>) a ((~>) [Bool] [Bool]) + data FooList_0123456789876543210Sym0 a0123456789876543210 where - FooList_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FooList_0123456789876543210Sym0 arg) (FooList_0123456789876543210Sym1 arg) => + FooList_0123456789876543210Sym0KindInference :: SameKind (Apply FooList_0123456789876543210Sym0 arg) (FooList_0123456789876543210Sym1 arg) => FooList_0123456789876543210Sym0 a0123456789876543210 type instance Apply FooList_0123456789876543210Sym0 a0123456789876543210 = FooList_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (FooList_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings FooList_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) FooList_0123456789876543210Sym1KindInference) ()) - data FooList_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: (~>) [Bool] [Bool] + = snd (((,) FooList_0123456789876543210Sym0KindInference) ()) + type FooList_0123456789876543210Sym1 :: a -> (~>) [Bool] [Bool] + data FooList_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - FooList_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (FooList_0123456789876543210Sym1 a0123456789876543210) arg) (FooList_0123456789876543210Sym2 a0123456789876543210 arg) => + FooList_0123456789876543210Sym1KindInference :: SameKind (Apply (FooList_0123456789876543210Sym1 a0123456789876543210) arg) (FooList_0123456789876543210Sym2 a0123456789876543210 arg) => FooList_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (FooList_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = FooList_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - type FooList_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: [Bool]) = - FooList_0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (FooList_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) FooList_0123456789876543210Sym1KindInference) ()) + type FooList_0123456789876543210Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: [Bool]) = + FooList_0123456789876543210 a0123456789876543210 a0123456789876543210 :: [Bool] class PFoo a 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 + type FoosPrec_0123456789876543210 :: Nat -> [a] -> [Bool] -> [Bool] + type family FoosPrec_0123456789876543210 a a a where FoosPrec_0123456789876543210 _ a_0123456789876543210 a_0123456789876543210 = Apply (Apply FooListSym0 a_0123456789876543210) a_0123456789876543210 - instance SuppressUnusedWarnings FoosPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) FoosPrec_0123456789876543210Sym0KindInference) ()) - data FoosPrec_0123456789876543210Sym0 :: forall a0123456789876543210. - (~>) Nat ((~>) [a0123456789876543210] ((~>) [Bool] [Bool])) + type FoosPrec_0123456789876543210Sym0 :: (~>) Nat ((~>) [a] ((~>) [Bool] [Bool])) + data FoosPrec_0123456789876543210Sym0 a0123456789876543210 where - FoosPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FoosPrec_0123456789876543210Sym0 arg) (FoosPrec_0123456789876543210Sym1 arg) => + FoosPrec_0123456789876543210Sym0KindInference :: SameKind (Apply FoosPrec_0123456789876543210Sym0 arg) (FoosPrec_0123456789876543210Sym1 arg) => FoosPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply FoosPrec_0123456789876543210Sym0 a0123456789876543210 = FoosPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (FoosPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings FoosPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) FoosPrec_0123456789876543210Sym1KindInference) ()) - data FoosPrec_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: forall a0123456789876543210. - (~>) [a0123456789876543210] ((~>) [Bool] [Bool]) + = snd (((,) FoosPrec_0123456789876543210Sym0KindInference) ()) + type FoosPrec_0123456789876543210Sym1 :: Nat + -> (~>) [a] ((~>) [Bool] [Bool]) + data FoosPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - FoosPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (FoosPrec_0123456789876543210Sym1 a0123456789876543210) arg) (FoosPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + FoosPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (FoosPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) FoosPrec_0123456789876543210Sym2KindInference) ()) - data FoosPrec_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: [a0123456789876543210]) :: (~>) [Bool] [Bool] + = snd (((,) FoosPrec_0123456789876543210Sym1KindInference) ()) + type FoosPrec_0123456789876543210Sym2 :: Nat + -> [a] -> (~>) [Bool] [Bool] + data FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - FoosPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (FoosPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (FoosPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + FoosPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 - 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) ()) + type FoosPrec_0123456789876543210Sym3 (a0123456789876543210 :: Nat) (a0123456789876543210 :: [a]) (a0123456789876543210 :: [Bool]) = + FoosPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: [Bool] instance PFoo [a] where type FoosPrec a a a = Apply (Apply (Apply FoosPrec_0123456789876543210Sym0 a) a) a class SFoo a where diff --git a/tests/compile-and-dump/Singletons/T172.golden b/tests/compile-and-dump/Singletons/T172.golden index d384343b..4806f717 100644 --- a/tests/compile-and-dump/Singletons/T172.golden +++ b/tests/compile-and-dump/Singletons/T172.golden @@ -3,26 +3,26 @@ Singletons/T172.hs:(0,0)-(0,0): Splicing declarations [d| ($>) :: Nat -> Nat -> Nat ($>) = (+) |] ======> - instance SuppressUnusedWarnings ($>@#@$) where - suppressUnusedWarnings = snd (((,) (:$>@#@$###)) ()) - data ($>@#@$) :: (~>) Nat ((~>) Nat Nat) + type ($>@#@$) :: (~>) Nat ((~>) Nat Nat) + data ($>@#@$) a0123456789876543210 where - (:$>@#@$###) :: forall a0123456789876543210 - arg. SameKind (Apply ($>@#@$) arg) (($>@#@$$) arg) => + (:$>@#@$###) :: SameKind (Apply ($>@#@$) arg) (($>@#@$$) arg) => ($>@#@$) a0123456789876543210 type instance Apply ($>@#@$) a0123456789876543210 = ($>@#@$$) a0123456789876543210 - instance SuppressUnusedWarnings (($>@#@$$) a0123456789876543210) where - suppressUnusedWarnings = snd (((,) (:$>@#@$$###)) ()) - data ($>@#@$$) (a0123456789876543210 :: Nat) :: (~>) Nat Nat + instance SuppressUnusedWarnings ($>@#@$) where + suppressUnusedWarnings = snd (((,) (:$>@#@$###)) ()) + type ($>@#@$$) :: Nat -> (~>) Nat Nat + data ($>@#@$$) a0123456789876543210 a0123456789876543210 where - (:$>@#@$$###) :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (($>@#@$$) a0123456789876543210) arg) (($>@#@$$$) a0123456789876543210 arg) => + (:$>@#@$$###) :: SameKind (Apply (($>@#@$$) a0123456789876543210) arg) (($>@#@$$$) a0123456789876543210 arg) => ($>@#@$$) a0123456789876543210 a0123456789876543210 type instance Apply (($>@#@$$) a0123456789876543210) a0123456789876543210 = ($>@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (($>@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (:$>@#@$$###)) ()) type ($>@#@$$$) (a0123456789876543210 :: Nat) (a0123456789876543210 :: Nat) = - ($>) a0123456789876543210 a0123456789876543210 - type family ($>) (a :: Nat) (a :: Nat) :: Nat where + ($>) a0123456789876543210 a0123456789876543210 :: Nat + type ($>) :: Nat -> Nat -> Nat + type family ($>) a a where ($>) a_0123456789876543210 a_0123456789876543210 = Apply (Apply (+@#@$) a_0123456789876543210) a_0123456789876543210 (%$>) :: forall (t :: Nat) (t :: Nat). diff --git a/tests/compile-and-dump/Singletons/T175.golden b/tests/compile-and-dump/Singletons/T175.golden index d4fee78f..12ea1d1b 100644 --- a/tests/compile-and-dump/Singletons/T175.golden +++ b/tests/compile-and-dump/Singletons/T175.golden @@ -18,16 +18,18 @@ Singletons/T175.hs:(0,0)-(0,0): Splicing declarations class Foo a => Bar2 a quux2 :: Bar2 a => a quux2 = baz - type Quux2Sym0 = Quux2 - type family Quux2 :: a where + type Quux2Sym0 = Quux2 :: a + type Quux2 :: a + type family Quux2 where Quux2 = BazSym0 - type BazSym0 = Baz + type BazSym0 = Baz :: a class PFoo a where type Baz :: a - type Quux1Sym0 = Quux1 - type family Quux1_0123456789876543210 :: a where + type Quux1Sym0 = Quux1 :: a + type Quux1_0123456789876543210 :: a + type family Quux1_0123456789876543210 where Quux1_0123456789876543210 = BazSym0 - type Quux1_0123456789876543210Sym0 = Quux1_0123456789876543210 + type Quux1_0123456789876543210Sym0 = Quux1_0123456789876543210 :: a class PBar1 a where type Quux1 :: a type Quux1 = Quux1_0123456789876543210Sym0 diff --git a/tests/compile-and-dump/Singletons/T176.golden b/tests/compile-and-dump/Singletons/T176.golden index 2d5d3c19..ca98a00d 100644 --- a/tests/compile-and-dump/Singletons/T176.golden +++ b/tests/compile-and-dump/Singletons/T176.golden @@ -26,100 +26,91 @@ Singletons/T176.hs:(0,0)-(0,0): Splicing declarations Case_0123456789876543210 arg_0123456789876543210 x _ = Baz1Sym0 type family Lambda_0123456789876543210 x arg_0123456789876543210 where Lambda_0123456789876543210 x arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 x arg_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 x0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 x0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210 - arg_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => Lambda_0123456789876543210Sym1 x0123456789876543210 arg_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 x0123456789876543210 arg_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) type Lambda_0123456789876543210Sym2 x0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 arg_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings Quux2Sym0 where - suppressUnusedWarnings = snd (((,) Quux2Sym0KindInference) ()) - data Quux2Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 a0123456789876543210 + type Quux2Sym0 :: (~>) a a + data Quux2Sym0 a0123456789876543210 where - Quux2Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Quux2Sym0 arg) (Quux2Sym1 arg) => + Quux2Sym0KindInference :: SameKind (Apply Quux2Sym0 arg) (Quux2Sym1 arg) => Quux2Sym0 a0123456789876543210 type instance Apply Quux2Sym0 a0123456789876543210 = Quux2Sym1 a0123456789876543210 - type Quux2Sym1 (a0123456789876543210 :: a0123456789876543210) = - Quux2 a0123456789876543210 - instance SuppressUnusedWarnings Quux1Sym0 where - suppressUnusedWarnings = snd (((,) Quux1Sym0KindInference) ()) - data Quux1Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings Quux2Sym0 where + suppressUnusedWarnings = snd (((,) Quux2Sym0KindInference) ()) + type Quux2Sym1 (a0123456789876543210 :: a) = + Quux2 a0123456789876543210 :: a + type Quux1Sym0 :: (~>) a a + data Quux1Sym0 a0123456789876543210 where - Quux1Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Quux1Sym0 arg) (Quux1Sym1 arg) => + Quux1Sym0KindInference :: SameKind (Apply Quux1Sym0 arg) (Quux1Sym1 arg) => Quux1Sym0 a0123456789876543210 type instance Apply Quux1Sym0 a0123456789876543210 = Quux1Sym1 a0123456789876543210 - type Quux1Sym1 (a0123456789876543210 :: a0123456789876543210) = - Quux1 a0123456789876543210 - type family Quux2 (a :: a) :: a where + instance SuppressUnusedWarnings Quux1Sym0 where + suppressUnusedWarnings = snd (((,) Quux1Sym0KindInference) ()) + type Quux1Sym1 (a0123456789876543210 :: a) = + Quux1 a0123456789876543210 :: a + type Quux2 :: a -> a + type family Quux2 a where Quux2 x = Apply (Apply Bar2Sym0 x) Baz2Sym0 - type family Quux1 (a :: a) :: a where + type Quux1 :: a -> a + type family Quux1 a where Quux1 x = Apply (Apply Bar1Sym0 x) (Apply Lambda_0123456789876543210Sym0 x) + type Bar1Sym0 :: forall a b. (~>) a ((~>) ((~>) a b) b) + data Bar1Sym0 a0123456789876543210 + where + Bar1Sym0KindInference :: SameKind (Apply Bar1Sym0 arg) (Bar1Sym1 arg) => + Bar1Sym0 a0123456789876543210 + type instance Apply Bar1Sym0 a0123456789876543210 = Bar1Sym1 a0123456789876543210 instance SuppressUnusedWarnings Bar1Sym0 where suppressUnusedWarnings = snd (((,) Bar1Sym0KindInference) ()) - data Bar1Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) ((~>) a0123456789876543210 b0123456789876543210) b0123456789876543210) + type Bar1Sym1 :: forall a b. a -> (~>) ((~>) a b) b + data Bar1Sym1 a0123456789876543210 a0123456789876543210 where - Bar1Sym0KindInference :: forall arg0123456789876543210 - arg. SameKind (Apply Bar1Sym0 arg) (Bar1Sym1 arg) => - Bar1Sym0 arg0123456789876543210 - type instance Apply Bar1Sym0 arg0123456789876543210 = Bar1Sym1 arg0123456789876543210 - instance SuppressUnusedWarnings (Bar1Sym1 arg0123456789876543210) where + Bar1Sym1KindInference :: SameKind (Apply (Bar1Sym1 a0123456789876543210) arg) (Bar1Sym2 a0123456789876543210 arg) => + Bar1Sym1 a0123456789876543210 a0123456789876543210 + type instance Apply (Bar1Sym1 a0123456789876543210) a0123456789876543210 = Bar1Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Bar1Sym1 a0123456789876543210) 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 = Bar1Sym2 arg0123456789876543210 arg0123456789876543210 - type Bar1Sym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) = - Bar1 arg0123456789876543210 arg0123456789876543210 - type Baz1Sym0 = Baz1 + type Bar1Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: (~>) a b) = + Bar1 a0123456789876543210 a0123456789876543210 :: b + type Baz1Sym0 = Baz1 :: a class PFoo1 a where type Bar1 (arg :: a) (arg :: (~>) a b) :: b type Baz1 :: a + type Bar2Sym0 :: forall a b. (~>) a ((~>) b b) + data Bar2Sym0 a0123456789876543210 + where + Bar2Sym0KindInference :: SameKind (Apply Bar2Sym0 arg) (Bar2Sym1 arg) => + Bar2Sym0 a0123456789876543210 + type instance Apply Bar2Sym0 a0123456789876543210 = Bar2Sym1 a0123456789876543210 instance SuppressUnusedWarnings Bar2Sym0 where suppressUnusedWarnings = snd (((,) Bar2Sym0KindInference) ()) - data Bar2Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210) + type Bar2Sym1 :: forall a b. a -> (~>) b b + data Bar2Sym1 a0123456789876543210 a0123456789876543210 where - Bar2Sym0KindInference :: forall arg0123456789876543210 - arg. SameKind (Apply Bar2Sym0 arg) (Bar2Sym1 arg) => - Bar2Sym0 arg0123456789876543210 - type instance Apply Bar2Sym0 arg0123456789876543210 = Bar2Sym1 arg0123456789876543210 - instance SuppressUnusedWarnings (Bar2Sym1 arg0123456789876543210) where + Bar2Sym1KindInference :: SameKind (Apply (Bar2Sym1 a0123456789876543210) arg) (Bar2Sym2 a0123456789876543210 arg) => + Bar2Sym1 a0123456789876543210 a0123456789876543210 + type instance Apply (Bar2Sym1 a0123456789876543210) a0123456789876543210 = Bar2Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Bar2Sym1 a0123456789876543210) 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 = Bar2Sym2 arg0123456789876543210 arg0123456789876543210 - type Bar2Sym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: b0123456789876543210) = - Bar2 arg0123456789876543210 arg0123456789876543210 - type Baz2Sym0 = Baz2 + type Bar2Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Bar2 a0123456789876543210 a0123456789876543210 :: b + type Baz2Sym0 = Baz2 :: a class PFoo2 a where type Bar2 (arg :: a) (arg :: b) :: b type Baz2 :: a diff --git a/tests/compile-and-dump/Singletons/T178.golden b/tests/compile-and-dump/Singletons/T178.golden index 5ad2f633..0c6d4f4c 100644 --- a/tests/compile-and-dump/Singletons/T178.golden +++ b/tests/compile-and-dump/Singletons/T178.golden @@ -15,13 +15,15 @@ Singletons/T178.hs:(0,0)-(0,0): Splicing declarations empty :: U empty = [] type USym0 = U - type StrSym0 = Str - type OptSym0 = Opt - type ManySym0 = Many - type EmptySym0 = Empty - type family Empty :: [(Symbol, Occ)] where + type StrSym0 = Str :: Occ + type OptSym0 = Opt :: Occ + type ManySym0 = Many :: Occ + type EmptySym0 = Empty :: [(Symbol, Occ)] + type Empty :: [(Symbol, Occ)] + type family Empty where Empty = NilSym0 - type family Compare_0123456789876543210 (a :: Occ) (a :: Occ) :: Ordering where + type Compare_0123456789876543210 :: Occ -> Occ -> Ordering + type family Compare_0123456789876543210 a a where Compare_0123456789876543210 Str Str = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) NilSym0 Compare_0123456789876543210 Opt Opt = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) NilSym0 Compare_0123456789876543210 Many Many = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) NilSym0 @@ -31,68 +33,69 @@ Singletons/T178.hs:(0,0)-(0,0): Splicing declarations Compare_0123456789876543210 Opt Many = LTSym0 Compare_0123456789876543210 Many Str = GTSym0 Compare_0123456789876543210 Many Opt = GTSym0 - instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) - data Compare_0123456789876543210Sym0 :: (~>) Occ ((~>) Occ Ordering) + type Compare_0123456789876543210Sym0 :: (~>) Occ ((~>) Occ Ordering) + data Compare_0123456789876543210Sym0 a0123456789876543210 where - Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => + Compare_0123456789876543210Sym0KindInference :: SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => Compare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) - data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Occ) :: (~>) Occ Ordering + = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) + type Compare_0123456789876543210Sym1 :: Occ -> (~>) Occ Ordering + data Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => + Compare_0123456789876543210Sym1KindInference :: SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Occ) (a0123456789876543210 :: Occ) = - Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering 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 + type ShowsPrec_0123456789876543210 :: Nat + -> Occ -> Symbol -> Symbol + type family ShowsPrec_0123456789876543210 a a a 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 - instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) - data ShowsPrec_0123456789876543210Sym0 :: (~>) Nat ((~>) Occ ((~>) Symbol Symbol)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) Nat ((~>) Occ ((~>) Symbol Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: Nat) :: (~>) Occ ((~>) Symbol Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: Nat + -> (~>) Occ ((~>) Symbol Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Occ) :: (~>) Symbol Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: Nat + -> Occ -> (~>) Symbol Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: Nat) (a0123456789876543210 :: Occ) (a0123456789876543210 :: Symbol) = - ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Symbol 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 + type Equals_0123456789876543210 :: Occ -> Occ -> Bool + type family Equals_0123456789876543210 a b where Equals_0123456789876543210 Str Str = TrueSym0 Equals_0123456789876543210 Opt Opt = TrueSym0 Equals_0123456789876543210 Many Many = TrueSym0 diff --git a/tests/compile-and-dump/Singletons/T183.golden b/tests/compile-and-dump/Singletons/T183.golden index 7f863d6e..4ab393fb 100644 --- a/tests/compile-and-dump/Singletons/T183.golden +++ b/tests/compile-and-dump/Singletons/T183.golden @@ -57,68 +57,57 @@ Singletons/T183.hs:(0,0)-(0,0): Splicing declarations g :: a -> b -> a g y _ = y in (g x) () - instance SuppressUnusedWarnings Let0123456789876543210GSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210GSym0KindInference) ()) data Let0123456789876543210GSym0 x0123456789876543210 where - Let0123456789876543210GSym0KindInference :: forall x0123456789876543210 - arg. SameKind (Apply Let0123456789876543210GSym0 arg) (Let0123456789876543210GSym1 arg) => + Let0123456789876543210GSym0KindInference :: SameKind (Apply Let0123456789876543210GSym0 arg) (Let0123456789876543210GSym1 arg) => Let0123456789876543210GSym0 x0123456789876543210 type instance Apply Let0123456789876543210GSym0 x0123456789876543210 = Let0123456789876543210GSym1 x0123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210GSym1 x0123456789876543210) where + instance SuppressUnusedWarnings Let0123456789876543210GSym0 where suppressUnusedWarnings - = snd (((,) Let0123456789876543210GSym1KindInference) ()) - data Let0123456789876543210GSym1 x0123456789876543210 :: forall a - b0123456789876543210. - (~>) a ((~>) b0123456789876543210 a) + = snd (((,) Let0123456789876543210GSym0KindInference) ()) + data Let0123456789876543210GSym1 x0123456789876543210 :: (~>) a ((~>) b0123456789876543210 a) where - Let0123456789876543210GSym1KindInference :: forall x0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Let0123456789876543210GSym1 x0123456789876543210) arg) (Let0123456789876543210GSym2 x0123456789876543210 arg) => + Let0123456789876543210GSym1KindInference :: SameKind (Apply (Let0123456789876543210GSym1 x0123456789876543210) arg) (Let0123456789876543210GSym2 x0123456789876543210 arg) => Let0123456789876543210GSym1 x0123456789876543210 a0123456789876543210 type instance Apply (Let0123456789876543210GSym1 x0123456789876543210) a0123456789876543210 = Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (Let0123456789876543210GSym1 x0123456789876543210) where suppressUnusedWarnings - = snd (((,) Let0123456789876543210GSym2KindInference) ()) - data Let0123456789876543210GSym2 x0123456789876543210 (a0123456789876543210 :: a) :: forall b0123456789876543210. - (~>) b0123456789876543210 a + = snd (((,) Let0123456789876543210GSym1KindInference) ()) + data Let0123456789876543210GSym2 x0123456789876543210 (a0123456789876543210 :: a) :: (~>) b0123456789876543210 a where - Let0123456789876543210GSym2KindInference :: forall x0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210) arg) (Let0123456789876543210GSym3 x0123456789876543210 a0123456789876543210 arg) => + Let0123456789876543210GSym2KindInference :: SameKind (Apply (Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210) arg) (Let0123456789876543210GSym3 x0123456789876543210 a0123456789876543210 arg) => Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210 a0123456789876543210 type instance Apply (Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210) a0123456789876543210 = Let0123456789876543210GSym3 x0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Let0123456789876543210GSym2 x0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210GSym2KindInference) ()) type Let0123456789876543210GSym3 x0123456789876543210 (a0123456789876543210 :: a) (a0123456789876543210 :: b0123456789876543210) = - Let0123456789876543210G x0123456789876543210 a0123456789876543210 a0123456789876543210 + Let0123456789876543210G x0123456789876543210 a0123456789876543210 a0123456789876543210 :: a type family Let0123456789876543210G x (a :: a) (a :: b) :: a where Let0123456789876543210G x y _ = y - instance SuppressUnusedWarnings Let0123456789876543210XSym0 where - suppressUnusedWarnings - = snd (((,) Let0123456789876543210XSym0KindInference) ()) data Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210 where - Let0123456789876543210XSym0KindInference :: forall wild_01234567898765432100123456789876543210 - arg. SameKind (Apply Let0123456789876543210XSym0 arg) (Let0123456789876543210XSym1 arg) => + Let0123456789876543210XSym0KindInference :: SameKind (Apply Let0123456789876543210XSym0 arg) (Let0123456789876543210XSym1 arg) => Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210 type instance Apply Let0123456789876543210XSym0 wild_01234567898765432100123456789876543210 = Let0123456789876543210XSym1 wild_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings Let0123456789876543210XSym0 where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210XSym0KindInference) ()) type Let0123456789876543210XSym1 wild_01234567898765432100123456789876543210 = Let0123456789876543210X wild_01234567898765432100123456789876543210 type family Let0123456789876543210X wild_0123456789876543210 where Let0123456789876543210X wild_0123456789876543210 = Apply JustSym0 (wild_0123456789876543210 :: a) :: Maybe a + data Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 + where + Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) => + Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 + type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym1 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_0123456789876543210Sym1 x0123456789876543210 type Let0123456789876543210Scrutinee_0123456789876543210Sym1 x0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 x0123456789876543210 type family Let0123456789876543210Scrutinee_0123456789876543210 x where @@ -130,209 +119,197 @@ Singletons/T183.hs:(0,0)-(0,0): Splicing declarations y :: b) = Apply (Apply Tuple2Sym0 (y :: b)) (x :: a) type family Lambda_0123456789876543210 a_0123456789876543210 arg_0123456789876543210 where Lambda_0123456789876543210 a_0123456789876543210 arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 a_0123456789876543210 arg_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 a_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall a_01234567898765432100123456789876543210 - arg_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) arg) (Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 arg) => Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a_01234567898765432100123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) type Lambda_0123456789876543210Sym2 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 a_01234567898765432100123456789876543210 arg_01234567898765432100123456789876543210 + data Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 + where + Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) => + Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 + type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 x0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym1 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_0123456789876543210Sym1 x0123456789876543210 type Let0123456789876543210Scrutinee_0123456789876543210Sym1 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 - instance SuppressUnusedWarnings Foo9Sym0 where - suppressUnusedWarnings = snd (((,) Foo9Sym0KindInference) ()) - data Foo9Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 a0123456789876543210 + type Foo9Sym0 :: (~>) a a + data Foo9Sym0 a0123456789876543210 where - Foo9Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo9Sym0 arg) (Foo9Sym1 arg) => + Foo9Sym0KindInference :: SameKind (Apply Foo9Sym0 arg) (Foo9Sym1 arg) => Foo9Sym0 a0123456789876543210 type instance Apply Foo9Sym0 a0123456789876543210 = Foo9Sym1 a0123456789876543210 - type Foo9Sym1 (a0123456789876543210 :: a0123456789876543210) = - Foo9 a0123456789876543210 - instance SuppressUnusedWarnings Foo8Sym0 where - suppressUnusedWarnings = snd (((,) Foo8Sym0KindInference) ()) - data Foo8Sym0 :: forall a0123456789876543210. - (~>) (Maybe a0123456789876543210) (Maybe a0123456789876543210) + instance SuppressUnusedWarnings Foo9Sym0 where + suppressUnusedWarnings = snd (((,) Foo9Sym0KindInference) ()) + type Foo9Sym1 (a0123456789876543210 :: a) = + Foo9 a0123456789876543210 :: a + type Foo8Sym0 :: forall a. (~>) (Maybe a) (Maybe a) + data Foo8Sym0 a0123456789876543210 where - Foo8Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo8Sym0 arg) (Foo8Sym1 arg) => + Foo8Sym0KindInference :: SameKind (Apply Foo8Sym0 arg) (Foo8Sym1 arg) => Foo8Sym0 a0123456789876543210 type instance Apply Foo8Sym0 a0123456789876543210 = Foo8Sym1 a0123456789876543210 - type Foo8Sym1 (a0123456789876543210 :: Maybe a0123456789876543210) = - Foo8 a0123456789876543210 - instance SuppressUnusedWarnings Foo7Sym0 where - suppressUnusedWarnings = snd (((,) Foo7Sym0KindInference) ()) - data Foo7Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210) + instance SuppressUnusedWarnings Foo8Sym0 where + suppressUnusedWarnings = snd (((,) Foo8Sym0KindInference) ()) + type Foo8Sym1 (a0123456789876543210 :: Maybe a) = + Foo8 a0123456789876543210 :: Maybe a + type Foo7Sym0 :: (~>) a ((~>) b a) + data Foo7Sym0 a0123456789876543210 where - Foo7Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo7Sym0 arg) (Foo7Sym1 arg) => + Foo7Sym0KindInference :: SameKind (Apply Foo7Sym0 arg) (Foo7Sym1 arg) => Foo7Sym0 a0123456789876543210 type instance Apply Foo7Sym0 a0123456789876543210 = Foo7Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Foo7Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Foo7Sym1KindInference) ()) - data Foo7Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings Foo7Sym0 where + suppressUnusedWarnings = snd (((,) Foo7Sym0KindInference) ()) + type Foo7Sym1 :: a -> (~>) b a + data Foo7Sym1 a0123456789876543210 a0123456789876543210 where - Foo7Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Foo7Sym1 a0123456789876543210) arg) (Foo7Sym2 a0123456789876543210 arg) => + Foo7Sym1KindInference :: SameKind (Apply (Foo7Sym1 a0123456789876543210) arg) (Foo7Sym2 a0123456789876543210 arg) => Foo7Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Foo7Sym1 a0123456789876543210) a0123456789876543210 = Foo7Sym2 a0123456789876543210 a0123456789876543210 - type Foo7Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - Foo7 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings Foo6Sym0 where - suppressUnusedWarnings = snd (((,) Foo6Sym0KindInference) ()) - data Foo6Sym0 :: forall a0123456789876543210. - (~>) (Maybe (Maybe a0123456789876543210)) (Maybe (Maybe a0123456789876543210)) + instance SuppressUnusedWarnings (Foo7Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Foo7Sym1KindInference) ()) + type Foo7Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Foo7 a0123456789876543210 a0123456789876543210 :: a + type Foo6Sym0 :: (~>) (Maybe (Maybe a)) (Maybe (Maybe a)) + data Foo6Sym0 a0123456789876543210 where - Foo6Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo6Sym0 arg) (Foo6Sym1 arg) => + Foo6Sym0KindInference :: SameKind (Apply Foo6Sym0 arg) (Foo6Sym1 arg) => Foo6Sym0 a0123456789876543210 type instance Apply Foo6Sym0 a0123456789876543210 = Foo6Sym1 a0123456789876543210 - type Foo6Sym1 (a0123456789876543210 :: Maybe (Maybe a0123456789876543210)) = - Foo6 a0123456789876543210 - instance SuppressUnusedWarnings Foo5Sym0 where - suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ()) - data Foo5Sym0 :: forall a0123456789876543210. - (~>) (Maybe (Maybe a0123456789876543210)) (Maybe (Maybe a0123456789876543210)) + instance SuppressUnusedWarnings Foo6Sym0 where + suppressUnusedWarnings = snd (((,) Foo6Sym0KindInference) ()) + type Foo6Sym1 (a0123456789876543210 :: Maybe (Maybe a)) = + Foo6 a0123456789876543210 :: Maybe (Maybe a) + type Foo5Sym0 :: (~>) (Maybe (Maybe a)) (Maybe (Maybe a)) + data Foo5Sym0 a0123456789876543210 where - Foo5Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) => + Foo5Sym0KindInference :: SameKind (Apply Foo5Sym0 arg) (Foo5Sym1 arg) => Foo5Sym0 a0123456789876543210 type instance Apply Foo5Sym0 a0123456789876543210 = Foo5Sym1 a0123456789876543210 - type Foo5Sym1 (a0123456789876543210 :: Maybe (Maybe a0123456789876543210)) = - Foo5 a0123456789876543210 - instance SuppressUnusedWarnings Foo4Sym0 where - suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ()) - data Foo4Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) (a0123456789876543210, - b0123456789876543210) (b0123456789876543210, a0123456789876543210) + instance SuppressUnusedWarnings Foo5Sym0 where + suppressUnusedWarnings = snd (((,) Foo5Sym0KindInference) ()) + type Foo5Sym1 (a0123456789876543210 :: Maybe (Maybe a)) = + Foo5 a0123456789876543210 :: Maybe (Maybe a) + type Foo4Sym0 :: (~>) (a, b) (b, a) + data Foo4Sym0 a0123456789876543210 where - Foo4Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) => + Foo4Sym0KindInference :: SameKind (Apply Foo4Sym0 arg) (Foo4Sym1 arg) => Foo4Sym0 a0123456789876543210 type instance Apply Foo4Sym0 a0123456789876543210 = Foo4Sym1 a0123456789876543210 - type Foo4Sym1 (a0123456789876543210 :: (a0123456789876543210, - b0123456789876543210)) = - Foo4 a0123456789876543210 - instance SuppressUnusedWarnings Foo3Sym0 where - suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ()) - data Foo3Sym0 :: forall a0123456789876543210. - (~>) (Maybe a0123456789876543210) a0123456789876543210 + instance SuppressUnusedWarnings Foo4Sym0 where + suppressUnusedWarnings = snd (((,) Foo4Sym0KindInference) ()) + type Foo4Sym1 (a0123456789876543210 :: (a, b)) = + Foo4 a0123456789876543210 :: (b, a) + type Foo3Sym0 :: forall a. (~>) (Maybe a) a + data Foo3Sym0 a0123456789876543210 where - Foo3Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) => + Foo3Sym0KindInference :: SameKind (Apply Foo3Sym0 arg) (Foo3Sym1 arg) => Foo3Sym0 a0123456789876543210 type instance Apply Foo3Sym0 a0123456789876543210 = Foo3Sym1 a0123456789876543210 - type Foo3Sym1 (a0123456789876543210 :: Maybe a0123456789876543210) = - Foo3 a0123456789876543210 - instance SuppressUnusedWarnings Foo2Sym0 where - suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ()) - data Foo2Sym0 :: forall a0123456789876543210. - (~>) (Maybe a0123456789876543210) a0123456789876543210 + instance SuppressUnusedWarnings Foo3Sym0 where + suppressUnusedWarnings = snd (((,) Foo3Sym0KindInference) ()) + type Foo3Sym1 (a0123456789876543210 :: Maybe a) = + Foo3 a0123456789876543210 :: a + type Foo2Sym0 :: forall a. (~>) (Maybe a) a + data Foo2Sym0 a0123456789876543210 where - Foo2Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) => + Foo2Sym0KindInference :: SameKind (Apply Foo2Sym0 arg) (Foo2Sym1 arg) => Foo2Sym0 a0123456789876543210 type instance Apply Foo2Sym0 a0123456789876543210 = Foo2Sym1 a0123456789876543210 - type Foo2Sym1 (a0123456789876543210 :: Maybe a0123456789876543210) = - Foo2 a0123456789876543210 - instance SuppressUnusedWarnings Foo1Sym0 where - suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ()) - data Foo1Sym0 :: forall a0123456789876543210. - (~>) (Maybe a0123456789876543210) a0123456789876543210 + instance SuppressUnusedWarnings Foo2Sym0 where + suppressUnusedWarnings = snd (((,) Foo2Sym0KindInference) ()) + type Foo2Sym1 (a0123456789876543210 :: Maybe a) = + Foo2 a0123456789876543210 :: a + type Foo1Sym0 :: (~>) (Maybe a) a + data Foo1Sym0 a0123456789876543210 where - Foo1Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) => + Foo1Sym0KindInference :: SameKind (Apply Foo1Sym0 arg) (Foo1Sym1 arg) => Foo1Sym0 a0123456789876543210 type instance Apply Foo1Sym0 a0123456789876543210 = Foo1Sym1 a0123456789876543210 - type Foo1Sym1 (a0123456789876543210 :: Maybe a0123456789876543210) = - Foo1 a0123456789876543210 - instance SuppressUnusedWarnings GSym0 where - suppressUnusedWarnings = snd (((,) GSym0KindInference) ()) + instance SuppressUnusedWarnings Foo1Sym0 where + suppressUnusedWarnings = snd (((,) Foo1Sym0KindInference) ()) + type Foo1Sym1 (a0123456789876543210 :: Maybe a) = + Foo1 a0123456789876543210 :: a data GSym0 a0123456789876543210 where - GSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply GSym0 arg) (GSym1 arg) => + GSym0KindInference :: SameKind (Apply GSym0 arg) (GSym1 arg) => GSym0 a0123456789876543210 type instance Apply GSym0 a0123456789876543210 = GSym1 a0123456789876543210 + instance SuppressUnusedWarnings GSym0 where + suppressUnusedWarnings = snd (((,) GSym0KindInference) ()) type GSym1 a0123456789876543210 = G a0123456789876543210 - instance SuppressUnusedWarnings F3Sym0 where - suppressUnusedWarnings = snd (((,) F3Sym0KindInference) ()) data F3Sym0 a0123456789876543210 where - F3Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply F3Sym0 arg) (F3Sym1 arg) => + F3Sym0KindInference :: SameKind (Apply F3Sym0 arg) (F3Sym1 arg) => F3Sym0 a0123456789876543210 type instance Apply F3Sym0 a0123456789876543210 = F3Sym1 a0123456789876543210 + instance SuppressUnusedWarnings F3Sym0 where + suppressUnusedWarnings = snd (((,) F3Sym0KindInference) ()) type F3Sym1 a0123456789876543210 = F3 a0123456789876543210 - instance SuppressUnusedWarnings F2Sym0 where - suppressUnusedWarnings = snd (((,) F2Sym0KindInference) ()) data F2Sym0 a0123456789876543210 where - F2Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply F2Sym0 arg) (F2Sym1 arg) => + F2Sym0KindInference :: SameKind (Apply F2Sym0 arg) (F2Sym1 arg) => F2Sym0 a0123456789876543210 type instance Apply F2Sym0 a0123456789876543210 = F2Sym1 a0123456789876543210 + instance SuppressUnusedWarnings F2Sym0 where + suppressUnusedWarnings = snd (((,) F2Sym0KindInference) ()) type F2Sym1 a0123456789876543210 = F2 a0123456789876543210 - instance SuppressUnusedWarnings F1Sym0 where - suppressUnusedWarnings = snd (((,) F1Sym0KindInference) ()) data F1Sym0 a0123456789876543210 where - F1Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply F1Sym0 arg) (F1Sym1 arg) => + F1Sym0KindInference :: SameKind (Apply F1Sym0 arg) (F1Sym1 arg) => F1Sym0 a0123456789876543210 type instance Apply F1Sym0 a0123456789876543210 = F1Sym1 a0123456789876543210 + instance SuppressUnusedWarnings F1Sym0 where + suppressUnusedWarnings = snd (((,) F1Sym0KindInference) ()) type F1Sym1 a0123456789876543210 = F1 a0123456789876543210 - type family Foo9 (a :: a) :: a where + type Foo9 :: a -> a + type family Foo9 a where Foo9 (x :: a) = Apply (Apply (Let0123456789876543210GSym1 x) x) Tuple0Sym0 - type family Foo8 (a :: Maybe a) :: Maybe a where + type Foo8 :: forall a. Maybe a -> Maybe a + type family Foo8 a where Foo8 ('Just (wild_0123456789876543210 :: a) :: Maybe a) = Let0123456789876543210XSym1 wild_0123456789876543210 - type family Foo7 (a :: a) (a :: b) :: a where + type Foo7 :: a -> b -> a + type family Foo7 a a where Foo7 (x :: a) (wild_0123456789876543210 :: b) = x :: a - type family Foo6 (a :: Maybe (Maybe a)) :: Maybe (Maybe a) where + type Foo6 :: Maybe (Maybe a) -> Maybe (Maybe a) + type family Foo6 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 + type Foo5 :: Maybe (Maybe a) -> Maybe (Maybe a) + type family Foo5 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 + type Foo4 :: (a, b) -> (b, a) + type family Foo4 a where Foo4 a_0123456789876543210 = Apply (Apply Lambda_0123456789876543210Sym0 a_0123456789876543210) a_0123456789876543210 - type family Foo3 (a :: Maybe a) :: a where + type Foo3 :: forall a. Maybe a -> a + type family Foo3 a where Foo3 ('Just x) = x :: a - type family Foo2 (a :: Maybe a) :: a where + type Foo2 :: forall a. Maybe a -> a + type family Foo2 a where Foo2 ('Just x :: Maybe a) = x :: a - type family Foo1 (a :: Maybe a) :: a where + type Foo1 :: Maybe a -> a + type family Foo1 a where Foo1 ('Just x :: Maybe a) = x :: a type family G a where G x = Case_0123456789876543210 x (Let0123456789876543210Scrutinee_0123456789876543210Sym1 x) diff --git a/tests/compile-and-dump/Singletons/T184.golden b/tests/compile-and-dump/Singletons/T184.golden index 9d4631e1..1ac7fba1 100644 --- a/tests/compile-and-dump/Singletons/T184.golden +++ b/tests/compile-and-dump/Singletons/T184.golden @@ -27,173 +27,142 @@ Singletons/T184.hs:(0,0)-(0,0): Splicing declarations trues xs = [x | x <- xs, x] type family Lambda_0123456789876543210 xs x where Lambda_0123456789876543210 xs x = Apply (Apply (>>@#@$) (Apply GuardSym0 x)) (Apply ReturnSym0 x) - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 xs0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 xs0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210 - x0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) => Lambda_0123456789876543210Sym1 xs0123456789876543210 x0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym2 xs0123456789876543210 x0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) type Lambda_0123456789876543210Sym2 xs0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 x0123456789876543210 type family Lambda_0123456789876543210 x xs ys y where Lambda_0123456789876543210 x xs ys y = Apply ReturnSym0 (Apply (Apply Tuple2Sym0 x) y) - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 x0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 x0123456789876543210 = Lambda_0123456789876543210Sym1 x0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 x0123456789876543210 xs0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall x0123456789876543210 - xs0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 x0123456789876543210) arg) (Lambda_0123456789876543210Sym2 x0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 x0123456789876543210 xs0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 x0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym3 x0123456789876543210 xs0123456789876543210 arg) => Lambda_0123456789876543210Sym2 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 x0123456789876543210 xs0123456789876543210) ys0123456789876543210 = Lambda_0123456789876543210Sym3 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 x0123456789876543210 xs0123456789876543210 ys0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 x0123456789876543210 xs0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) data Lambda_0123456789876543210Sym3 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 where - Lambda_0123456789876543210Sym3KindInference :: forall x0123456789876543210 - xs0123456789876543210 - ys0123456789876543210 - y0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym4 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 arg) => + Lambda_0123456789876543210Sym3KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym4 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 arg) => Lambda_0123456789876543210Sym3 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym3 x0123456789876543210 xs0123456789876543210 ys0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym4 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 x0123456789876543210 xs0123456789876543210 ys0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) type Lambda_0123456789876543210Sym4 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 = Lambda_0123456789876543210 x0123456789876543210 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 type family Lambda_0123456789876543210 xs ys x where Lambda_0123456789876543210 xs ys x = Apply (Apply (>>=@#@$) ys) (Apply (Apply (Apply Lambda_0123456789876543210Sym0 x) xs) ys) - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 xs0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210 - ys0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) => Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 type family Lambda_0123456789876543210 xs ys x where Lambda_0123456789876543210 xs ys x = Apply ReturnSym0 x - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 xs0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210 - ys0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) => Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 x0123456789876543210 type family Lambda_0123456789876543210 xs ys y where Lambda_0123456789876543210 xs ys y = Apply ReturnSym0 y - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 xs0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210 - ys0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall xs0123456789876543210 - ys0123456789876543210 - y0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) => Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) y0123456789876543210 = Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 y0123456789876543210 type family Case_0123456789876543210 arg_0123456789876543210 xs ys t where @@ -201,202 +170,171 @@ Singletons/T184.hs:(0,0)-(0,0): Splicing declarations y) = Apply ReturnSym0 (Apply (Apply Tuple2Sym0 x) y) type family Lambda_0123456789876543210 xs ys arg_0123456789876543210 where Lambda_0123456789876543210 xs ys arg_0123456789876543210 = Case_0123456789876543210 arg_0123456789876543210 xs ys arg_0123456789876543210 - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 xs0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 xs0123456789876543210 = Lambda_0123456789876543210Sym1 xs0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 xs0123456789876543210 ys0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall xs0123456789876543210 - ys0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 xs0123456789876543210) arg) (Lambda_0123456789876543210Sym2 xs0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 xs0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 arg_01234567898765432100123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall xs0123456789876543210 - ys0123456789876543210 - arg_01234567898765432100123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg) (Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg) => Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210 arg_01234567898765432100123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg_01234567898765432100123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 xs0123456789876543210 ys0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 xs0123456789876543210 ys0123456789876543210 arg_01234567898765432100123456789876543210 = Lambda_0123456789876543210 xs0123456789876543210 ys0123456789876543210 arg_01234567898765432100123456789876543210 type family Lambda_0123456789876543210 a ma mb b where Lambda_0123456789876543210 a ma mb b = Apply (Apply (>>@#@$) (Apply GuardSym0 b)) (Apply ReturnSym0 a) - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 a0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 a0123456789876543210 = Lambda_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 a0123456789876543210 ma0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - ma0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 a0123456789876543210) arg) (Lambda_0123456789876543210Sym2 a0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 ma0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 ma0123456789876543210) arg) (Lambda_0123456789876543210Sym3 a0123456789876543210 ma0123456789876543210 arg) => Lambda_0123456789876543210Sym2 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 a0123456789876543210 ma0123456789876543210) mb0123456789876543210 = Lambda_0123456789876543210Sym3 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a0123456789876543210 ma0123456789876543210 mb0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 a0123456789876543210 ma0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) data Lambda_0123456789876543210Sym3 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 b0123456789876543210 where - Lambda_0123456789876543210Sym3KindInference :: forall a0123456789876543210 - ma0123456789876543210 - mb0123456789876543210 - b0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym3 a0123456789876543210 ma0123456789876543210 mb0123456789876543210) arg) (Lambda_0123456789876543210Sym4 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 arg) => + Lambda_0123456789876543210Sym3KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym3 a0123456789876543210 ma0123456789876543210 mb0123456789876543210) arg) (Lambda_0123456789876543210Sym4 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 arg) => Lambda_0123456789876543210Sym3 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 b0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym3 a0123456789876543210 ma0123456789876543210 mb0123456789876543210) b0123456789876543210 = Lambda_0123456789876543210Sym4 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 b0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym3 a0123456789876543210 ma0123456789876543210 mb0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym3KindInference) ()) type Lambda_0123456789876543210Sym4 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 b0123456789876543210 = Lambda_0123456789876543210 a0123456789876543210 ma0123456789876543210 mb0123456789876543210 b0123456789876543210 type family Lambda_0123456789876543210 ma mb a where Lambda_0123456789876543210 ma mb a = Apply (Apply (>>=@#@$) mb) (Apply (Apply (Apply Lambda_0123456789876543210Sym0 a) ma) mb) - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 ma0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 ma0123456789876543210 = Lambda_0123456789876543210Sym1 ma0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 ma0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 ma0123456789876543210 mb0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall ma0123456789876543210 - mb0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 ma0123456789876543210) arg) (Lambda_0123456789876543210Sym2 ma0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 ma0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) 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_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210) arg) (Lambda_0123456789876543210Sym3 ma0123456789876543210 mb0123456789876543210 arg) => Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210) a0123456789876543210 = Lambda_0123456789876543210Sym3 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 ma0123456789876543210 mb0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 = Lambda_0123456789876543210 ma0123456789876543210 mb0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings TruesSym0 where - suppressUnusedWarnings = snd (((,) TruesSym0KindInference) ()) - data TruesSym0 :: (~>) [Bool] [Bool] + type TruesSym0 :: (~>) [Bool] [Bool] + data TruesSym0 a0123456789876543210 where - TruesSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply TruesSym0 arg) (TruesSym1 arg) => + TruesSym0KindInference :: SameKind (Apply TruesSym0 arg) (TruesSym1 arg) => TruesSym0 a0123456789876543210 type instance Apply TruesSym0 a0123456789876543210 = TruesSym1 a0123456789876543210 + instance SuppressUnusedWarnings TruesSym0 where + suppressUnusedWarnings = snd (((,) TruesSym0KindInference) ()) type TruesSym1 (a0123456789876543210 :: [Bool]) = - Trues a0123456789876543210 - instance SuppressUnusedWarnings CartProdSym0 where - suppressUnusedWarnings = snd (((,) CartProdSym0KindInference) ()) - data CartProdSym0 :: forall a0123456789876543210 - b0123456789876543210. - (~>) [a0123456789876543210] ((~>) [b0123456789876543210] [(a0123456789876543210, - b0123456789876543210)]) + Trues a0123456789876543210 :: [Bool] + type CartProdSym0 :: (~>) [a] ((~>) [b] [(a, b)]) + data CartProdSym0 a0123456789876543210 where - CartProdSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply CartProdSym0 arg) (CartProdSym1 arg) => + CartProdSym0KindInference :: SameKind (Apply CartProdSym0 arg) (CartProdSym1 arg) => CartProdSym0 a0123456789876543210 type instance Apply CartProdSym0 a0123456789876543210 = CartProdSym1 a0123456789876543210 - instance SuppressUnusedWarnings (CartProdSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) CartProdSym1KindInference) ()) - data CartProdSym1 (a0123456789876543210 :: [a0123456789876543210]) :: forall b0123456789876543210. - (~>) [b0123456789876543210] [(a0123456789876543210, - b0123456789876543210)] + instance SuppressUnusedWarnings CartProdSym0 where + suppressUnusedWarnings = snd (((,) CartProdSym0KindInference) ()) + type CartProdSym1 :: [a] -> (~>) [b] [(a, b)] + data CartProdSym1 a0123456789876543210 a0123456789876543210 where - CartProdSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (CartProdSym1 a0123456789876543210) arg) (CartProdSym2 a0123456789876543210 arg) => + CartProdSym1KindInference :: SameKind (Apply (CartProdSym1 a0123456789876543210) arg) (CartProdSym2 a0123456789876543210 arg) => CartProdSym1 a0123456789876543210 a0123456789876543210 type instance Apply (CartProdSym1 a0123456789876543210) a0123456789876543210 = CartProdSym2 a0123456789876543210 a0123456789876543210 - type CartProdSym2 (a0123456789876543210 :: [a0123456789876543210]) (a0123456789876543210 :: [b0123456789876543210]) = - CartProd a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings Zip'Sym0 where - suppressUnusedWarnings = snd (((,) Zip'Sym0KindInference) ()) - data Zip'Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) [a0123456789876543210] ((~>) [b0123456789876543210] [(a0123456789876543210, - b0123456789876543210)]) + instance SuppressUnusedWarnings (CartProdSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) CartProdSym1KindInference) ()) + type CartProdSym2 (a0123456789876543210 :: [a]) (a0123456789876543210 :: [b]) = + CartProd a0123456789876543210 a0123456789876543210 :: [(a, b)] + type Zip'Sym0 :: (~>) [a] ((~>) [b] [(a, b)]) + data Zip'Sym0 a0123456789876543210 where - Zip'Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Zip'Sym0 arg) (Zip'Sym1 arg) => + Zip'Sym0KindInference :: SameKind (Apply Zip'Sym0 arg) (Zip'Sym1 arg) => Zip'Sym0 a0123456789876543210 type instance Apply Zip'Sym0 a0123456789876543210 = Zip'Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Zip'Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) Zip'Sym1KindInference) ()) - data Zip'Sym1 (a0123456789876543210 :: [a0123456789876543210]) :: forall b0123456789876543210. - (~>) [b0123456789876543210] [(a0123456789876543210, - b0123456789876543210)] + instance SuppressUnusedWarnings Zip'Sym0 where + suppressUnusedWarnings = snd (((,) Zip'Sym0KindInference) ()) + type Zip'Sym1 :: [a] -> (~>) [b] [(a, b)] + data Zip'Sym1 a0123456789876543210 a0123456789876543210 where - Zip'Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Zip'Sym1 a0123456789876543210) arg) (Zip'Sym2 a0123456789876543210 arg) => + Zip'Sym1KindInference :: SameKind (Apply (Zip'Sym1 a0123456789876543210) arg) (Zip'Sym2 a0123456789876543210 arg) => Zip'Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Zip'Sym1 a0123456789876543210) a0123456789876543210 = Zip'Sym2 a0123456789876543210 a0123456789876543210 - type Zip'Sym2 (a0123456789876543210 :: [a0123456789876543210]) (a0123456789876543210 :: [b0123456789876543210]) = - Zip' a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings BoogieSym0 where - suppressUnusedWarnings = snd (((,) BoogieSym0KindInference) ()) - data BoogieSym0 :: forall a0123456789876543210. - (~>) (Maybe a0123456789876543210) ((~>) (Maybe Bool) (Maybe a0123456789876543210)) + instance SuppressUnusedWarnings (Zip'Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) Zip'Sym1KindInference) ()) + type Zip'Sym2 (a0123456789876543210 :: [a]) (a0123456789876543210 :: [b]) = + Zip' a0123456789876543210 a0123456789876543210 :: [(a, b)] + type BoogieSym0 :: (~>) (Maybe a) ((~>) (Maybe Bool) (Maybe a)) + data BoogieSym0 a0123456789876543210 where - BoogieSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply BoogieSym0 arg) (BoogieSym1 arg) => + BoogieSym0KindInference :: SameKind (Apply BoogieSym0 arg) (BoogieSym1 arg) => BoogieSym0 a0123456789876543210 type instance Apply BoogieSym0 a0123456789876543210 = BoogieSym1 a0123456789876543210 - instance SuppressUnusedWarnings (BoogieSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) BoogieSym1KindInference) ()) - data BoogieSym1 (a0123456789876543210 :: Maybe a0123456789876543210) :: (~>) (Maybe Bool) (Maybe a0123456789876543210) + instance SuppressUnusedWarnings BoogieSym0 where + suppressUnusedWarnings = snd (((,) BoogieSym0KindInference) ()) + type BoogieSym1 :: Maybe a -> (~>) (Maybe Bool) (Maybe a) + data BoogieSym1 a0123456789876543210 a0123456789876543210 where - BoogieSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (BoogieSym1 a0123456789876543210) arg) (BoogieSym2 a0123456789876543210 arg) => + BoogieSym1KindInference :: SameKind (Apply (BoogieSym1 a0123456789876543210) arg) (BoogieSym2 a0123456789876543210 arg) => BoogieSym1 a0123456789876543210 a0123456789876543210 type instance Apply (BoogieSym1 a0123456789876543210) a0123456789876543210 = BoogieSym2 a0123456789876543210 a0123456789876543210 - type BoogieSym2 (a0123456789876543210 :: Maybe a0123456789876543210) (a0123456789876543210 :: Maybe Bool) = - Boogie a0123456789876543210 a0123456789876543210 - type family Trues (a :: [Bool]) :: [Bool] where + instance SuppressUnusedWarnings (BoogieSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) BoogieSym1KindInference) ()) + type BoogieSym2 (a0123456789876543210 :: Maybe a) (a0123456789876543210 :: Maybe Bool) = + Boogie a0123456789876543210 a0123456789876543210 :: Maybe a + type Trues :: [Bool] -> [Bool] + type family Trues a where Trues xs = Apply (Apply (>>=@#@$) xs) (Apply Lambda_0123456789876543210Sym0 xs) - type family CartProd (a :: [a]) (a :: [b]) :: [(a, b)] where + type CartProd :: [a] -> [b] -> [(a, b)] + type family CartProd a a where CartProd xs ys = Apply (Apply (>>=@#@$) xs) (Apply (Apply Lambda_0123456789876543210Sym0 xs) ys) - type family Zip' (a :: [a]) (a :: [b]) :: [(a, b)] where + type Zip' :: [a] -> [b] -> [(a, b)] + type family Zip' a a 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 + type Boogie :: Maybe a -> Maybe Bool -> Maybe a + type family Boogie a 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]) diff --git a/tests/compile-and-dump/Singletons/T187.golden b/tests/compile-and-dump/Singletons/T187.golden index f71455cb..b887fc45 100644 --- a/tests/compile-and-dump/Singletons/T187.golden +++ b/tests/compile-and-dump/Singletons/T187.golden @@ -8,32 +8,34 @@ Singletons/T187.hs:(0,0)-(0,0): Splicing declarations data Empty deriving instance Eq Empty deriving instance Ord Empty - type family Compare_0123456789876543210 (a :: Empty) (a :: Empty) :: Ordering where + type Compare_0123456789876543210 :: Empty -> Empty -> Ordering + type family Compare_0123456789876543210 a a where Compare_0123456789876543210 _ _ = EQSym0 - instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) - data Compare_0123456789876543210Sym0 :: (~>) Empty ((~>) Empty Ordering) + type Compare_0123456789876543210Sym0 :: (~>) Empty ((~>) Empty Ordering) + data Compare_0123456789876543210Sym0 a0123456789876543210 where - Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => + Compare_0123456789876543210Sym0KindInference :: SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => Compare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) - data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Empty) :: (~>) Empty Ordering + = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) + type Compare_0123456789876543210Sym1 :: Empty + -> (~>) Empty Ordering + data Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => + Compare_0123456789876543210Sym1KindInference :: SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Empty) (a0123456789876543210 :: Empty) = - Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering instance POrd Empty where type Compare a a = Apply (Apply Compare_0123456789876543210Sym0 a) a - type family Equals_0123456789876543210 (a :: Empty) (b :: Empty) :: Bool where + type Equals_0123456789876543210 :: Empty -> Empty -> Bool + type family Equals_0123456789876543210 a b 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/T190.golden b/tests/compile-and-dump/Singletons/T190.golden index 70d09060..1d2f661b 100644 --- a/tests/compile-and-dump/Singletons/T190.golden +++ b/tests/compile-and-dump/Singletons/T190.golden @@ -7,112 +7,118 @@ Singletons/T190.hs:0:0:: Splicing declarations data T = T deriving (Eq, Ord, Enum, Bounded, Show) - type TSym0 = T - type family Compare_0123456789876543210 (a :: T) (a :: T) :: Ordering where + type TSym0 = T :: T + type Compare_0123456789876543210 :: T -> T -> Ordering + type family Compare_0123456789876543210 a a where Compare_0123456789876543210 T T = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) NilSym0 - instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) - data Compare_0123456789876543210Sym0 :: (~>) T ((~>) T Ordering) + type Compare_0123456789876543210Sym0 :: (~>) T ((~>) T Ordering) + data Compare_0123456789876543210Sym0 a0123456789876543210 where - Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => + Compare_0123456789876543210Sym0KindInference :: SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => Compare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) - data Compare_0123456789876543210Sym1 (a0123456789876543210 :: T) :: (~>) T Ordering + = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) + type Compare_0123456789876543210Sym1 :: T -> (~>) T Ordering + data Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => + Compare_0123456789876543210Sym1KindInference :: SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) type Compare_0123456789876543210Sym2 (a0123456789876543210 :: T) (a0123456789876543210 :: T) = - Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 + Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering 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 + type ToEnum_0123456789876543210 :: GHC.Types.Nat -> T + type family ToEnum_0123456789876543210 a where ToEnum_0123456789876543210 n = Case_0123456789876543210 n (Apply (Apply (==@#@$) n) (Data.Singletons.Prelude.Num.FromInteger 0)) - instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ()) - data ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat T + type ToEnum_0123456789876543210Sym0 :: (~>) GHC.Types.Nat T + data ToEnum_0123456789876543210Sym0 a0123456789876543210 where - ToEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) => + ToEnum_0123456789876543210Sym0KindInference :: SameKind (Apply ToEnum_0123456789876543210Sym0 arg) (ToEnum_0123456789876543210Sym1 arg) => ToEnum_0123456789876543210Sym0 a0123456789876543210 type instance Apply ToEnum_0123456789876543210Sym0 a0123456789876543210 = ToEnum_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings ToEnum_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) ToEnum_0123456789876543210Sym0KindInference) ()) type ToEnum_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) = - ToEnum_0123456789876543210 a0123456789876543210 - type family FromEnum_0123456789876543210 (a :: T) :: GHC.Types.Nat where + ToEnum_0123456789876543210 a0123456789876543210 :: T + type FromEnum_0123456789876543210 :: T -> GHC.Types.Nat + type family FromEnum_0123456789876543210 a where FromEnum_0123456789876543210 T = Data.Singletons.Prelude.Num.FromInteger 0 - instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ()) - data FromEnum_0123456789876543210Sym0 :: (~>) T GHC.Types.Nat + type FromEnum_0123456789876543210Sym0 :: (~>) T GHC.Types.Nat + data FromEnum_0123456789876543210Sym0 a0123456789876543210 where - FromEnum_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) => + FromEnum_0123456789876543210Sym0KindInference :: SameKind (Apply FromEnum_0123456789876543210Sym0 arg) (FromEnum_0123456789876543210Sym1 arg) => FromEnum_0123456789876543210Sym0 a0123456789876543210 type instance Apply FromEnum_0123456789876543210Sym0 a0123456789876543210 = FromEnum_0123456789876543210Sym1 a0123456789876543210 + instance SuppressUnusedWarnings FromEnum_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) FromEnum_0123456789876543210Sym0KindInference) ()) type FromEnum_0123456789876543210Sym1 (a0123456789876543210 :: T) = - FromEnum_0123456789876543210 a0123456789876543210 + FromEnum_0123456789876543210 a0123456789876543210 :: GHC.Types.Nat instance PEnum T where type ToEnum a = Apply ToEnum_0123456789876543210Sym0 a type FromEnum a = Apply FromEnum_0123456789876543210Sym0 a - type family MinBound_0123456789876543210 :: T where + type MinBound_0123456789876543210 :: T + type family MinBound_0123456789876543210 where MinBound_0123456789876543210 = TSym0 type MinBound_0123456789876543210Sym0 = - MinBound_0123456789876543210 - type family MaxBound_0123456789876543210 :: T where + MinBound_0123456789876543210 :: T + type MaxBound_0123456789876543210 :: T + type family MaxBound_0123456789876543210 where MaxBound_0123456789876543210 = TSym0 type MaxBound_0123456789876543210Sym0 = - MaxBound_0123456789876543210 + MaxBound_0123456789876543210 :: T 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 + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> T -> GHC.Types.Symbol -> GHC.Types.Symbol + type family ShowsPrec_0123456789876543210 a a a where ShowsPrec_0123456789876543210 _ T a_0123456789876543210 = Apply (Apply ShowStringSym0 "T") a_0123456789876543210 - instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) - data ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) T ((~>) GHC.Types.Symbol GHC.Types.Symbol)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) T ((~>) GHC.Types.Symbol GHC.Types.Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: (~>) T ((~>) GHC.Types.Symbol GHC.Types.Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) T ((~>) GHC.Types.Symbol GHC.Types.Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: T) :: (~>) GHC.Types.Symbol GHC.Types.Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> T -> (~>) GHC.Types.Symbol GHC.Types.Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: T) (a0123456789876543210 :: GHC.Types.Symbol) = - ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: GHC.Types.Symbol 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 + type Equals_0123456789876543210 :: T -> T -> Bool + type family Equals_0123456789876543210 a b where Equals_0123456789876543210 T T = TrueSym0 Equals_0123456789876543210 (_ :: T) (_ :: T) = FalseSym0 instance PEq T where diff --git a/tests/compile-and-dump/Singletons/T197.golden b/tests/compile-and-dump/Singletons/T197.golden index 99c56424..348cf602 100644 --- a/tests/compile-and-dump/Singletons/T197.golden +++ b/tests/compile-and-dump/Singletons/T197.golden @@ -8,29 +8,29 @@ Singletons/T197.hs:(0,0)-(0,0): Splicing declarations infixl 5 $$: ($$:) :: Bool -> Bool -> Bool ($$:) _ _ = False - instance SuppressUnusedWarnings ($$:@#@$) where - suppressUnusedWarnings = snd (((,) (:$$:@#@$###)) ()) - data ($$:@#@$) :: (~>) Bool ((~>) Bool Bool) + type ($$:@#@$) :: (~>) Bool ((~>) Bool Bool) + data ($$:@#@$) a0123456789876543210 where - (:$$:@#@$###) :: forall a0123456789876543210 - arg. SameKind (Apply ($$:@#@$) arg) (($$:@#@$$) arg) => + (:$$:@#@$###) :: SameKind (Apply ($$:@#@$) arg) (($$:@#@$$) arg) => ($$:@#@$) a0123456789876543210 type instance Apply ($$:@#@$) a0123456789876543210 = ($$:@#@$$) a0123456789876543210 + instance SuppressUnusedWarnings ($$:@#@$) where + suppressUnusedWarnings = snd (((,) (:$$:@#@$###)) ()) infixl 5 $$:@#@$ - instance SuppressUnusedWarnings (($$:@#@$$) a0123456789876543210) where - suppressUnusedWarnings = snd (((,) (:$$:@#@$$###)) ()) - data ($$:@#@$$) (a0123456789876543210 :: Bool) :: (~>) Bool Bool + type ($$:@#@$$) :: Bool -> (~>) Bool Bool + data ($$:@#@$$) a0123456789876543210 a0123456789876543210 where - (:$$:@#@$$###) :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (($$:@#@$$) a0123456789876543210) arg) (($$:@#@$$$) a0123456789876543210 arg) => + (:$$:@#@$$###) :: SameKind (Apply (($$:@#@$$) a0123456789876543210) arg) (($$:@#@$$$) a0123456789876543210 arg) => ($$:@#@$$) a0123456789876543210 a0123456789876543210 type instance Apply (($$:@#@$$) a0123456789876543210) a0123456789876543210 = ($$:@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (($$:@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (:$$:@#@$$###)) ()) infixl 5 $$:@#@$$ type ($$:@#@$$$) (a0123456789876543210 :: Bool) (a0123456789876543210 :: Bool) = - ($$:) a0123456789876543210 a0123456789876543210 + ($$:) a0123456789876543210 a0123456789876543210 :: Bool infixl 5 $$:@#@$$$ - type family ($$:) (a :: Bool) (a :: Bool) :: Bool where + type ($$:) :: Bool -> Bool -> Bool + type family ($$:) a a where ($$:) _ _ = FalseSym0 infixl 5 %$$: (%$$:) :: diff --git a/tests/compile-and-dump/Singletons/T197b.golden b/tests/compile-and-dump/Singletons/T197b.golden index 688b90c2..f3ad2fad 100644 --- a/tests/compile-and-dump/Singletons/T197b.golden +++ b/tests/compile-and-dump/Singletons/T197b.golden @@ -9,51 +9,44 @@ Singletons/T197b.hs:(0,0)-(0,0): Splicing declarations data Pair a b = MkPair a b infixr 9 `Pair` infixr 9 `MkPair` + type (:*:@#@$) :: forall a b. (~>) a ((~>) b ((:*:) a b)) + data (:*:@#@$) a0123456789876543210 + where + (::*:@#@$###) :: SameKind (Apply (:*:@#@$) arg) ((:*:@#@$$) arg) => + (:*:@#@$) a0123456789876543210 + type instance Apply (:*:@#@$) a0123456789876543210 = (:*:@#@$$) a0123456789876543210 instance SuppressUnusedWarnings (:*:@#@$) where suppressUnusedWarnings = snd (((,) (::*:@#@$###)) ()) - data (:*:@#@$) :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 ((:*:) a0123456789876543210 b0123456789876543210)) + type (:*:@#@$$) :: forall a b. a -> (~>) b ((:*:) a b) + data (:*:@#@$$) a0123456789876543210 a0123456789876543210 where - (::*:@#@$###) :: forall t0123456789876543210 - arg. SameKind (Apply (:*:@#@$) arg) ((:*:@#@$$) arg) => - (:*:@#@$) t0123456789876543210 - type instance Apply (:*:@#@$) t0123456789876543210 = (:*:@#@$$) t0123456789876543210 - instance SuppressUnusedWarnings ((:*:@#@$$) t0123456789876543210) where + (::*:@#@$$###) :: SameKind (Apply ((:*:@#@$$) a0123456789876543210) arg) ((:*:@#@$$$) a0123456789876543210 arg) => + (:*:@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((:*:@#@$$) a0123456789876543210) a0123456789876543210 = (:*:@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((:*:@#@$$) a0123456789876543210) where suppressUnusedWarnings = snd (((,) (::*:@#@$$###)) ()) - data (:*:@#@$$) (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 ((:*:) a0123456789876543210 b0123456789876543210) + type (:*:@#@$$$) (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + (:*:) a0123456789876543210 a0123456789876543210 :: (:*:) a b + type MkPairSym0 :: forall a b. (~>) a ((~>) b (Pair a b)) + data MkPairSym0 a0123456789876543210 where - (::*:@#@$$###) :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply ((:*:@#@$$) t0123456789876543210) arg) ((:*:@#@$$$) t0123456789876543210 arg) => - (:*:@#@$$) t0123456789876543210 t0123456789876543210 - type instance Apply ((:*:@#@$$) t0123456789876543210) t0123456789876543210 = (:*:@#@$$$) t0123456789876543210 t0123456789876543210 - type (:*:@#@$$$) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) = - (:*:) t0123456789876543210 t0123456789876543210 + MkPairSym0KindInference :: SameKind (Apply MkPairSym0 arg) (MkPairSym1 arg) => + MkPairSym0 a0123456789876543210 + type instance Apply MkPairSym0 a0123456789876543210 = MkPairSym1 a0123456789876543210 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` - instance SuppressUnusedWarnings (MkPairSym1 t0123456789876543210) where - suppressUnusedWarnings = snd (((,) MkPairSym1KindInference) ()) - data MkPairSym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 (Pair a0123456789876543210 b0123456789876543210) + type MkPairSym1 :: forall a b. a -> (~>) b (Pair a b) + data MkPairSym1 a0123456789876543210 a0123456789876543210 where - MkPairSym1KindInference :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply (MkPairSym1 t0123456789876543210) arg) (MkPairSym2 t0123456789876543210 arg) => - MkPairSym1 t0123456789876543210 t0123456789876543210 - type instance Apply (MkPairSym1 t0123456789876543210) t0123456789876543210 = MkPairSym2 t0123456789876543210 t0123456789876543210 + MkPairSym1KindInference :: SameKind (Apply (MkPairSym1 a0123456789876543210) arg) (MkPairSym2 a0123456789876543210 arg) => + MkPairSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (MkPairSym1 a0123456789876543210) a0123456789876543210 = MkPairSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (MkPairSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) MkPairSym1KindInference) ()) infixr 9 `MkPairSym1` - type MkPairSym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) = - MkPair t0123456789876543210 t0123456789876543210 + type MkPairSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + MkPair a0123456789876543210 a0123456789876543210 :: Pair a b infixr 9 `MkPairSym2` infixr 9 `SMkPair` data (%:*:) :: forall a b. (:*:) a b -> GHC.Types.Type diff --git a/tests/compile-and-dump/Singletons/T200.golden b/tests/compile-and-dump/Singletons/T200.golden index 9b4b6d25..0d6a7227 100644 --- a/tests/compile-and-dump/Singletons/T200.golden +++ b/tests/compile-and-dump/Singletons/T200.golden @@ -18,95 +18,93 @@ Singletons/T200.hs:(0,0)-(0,0): Splicing declarations ($$:) x y = (x :$$: y) (<>:) :: ErrorMessage -> ErrorMessage -> ErrorMessage (<>:) x y = (x :<>: y) + type (:$$:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage) + data (:$$:@#@$) a0123456789876543210 + where + (::$$:@#@$###) :: SameKind (Apply (:$$:@#@$) arg) ((:$$:@#@$$) arg) => + (:$$:@#@$) a0123456789876543210 + type instance Apply (:$$:@#@$) a0123456789876543210 = (:$$:@#@$$) a0123456789876543210 instance SuppressUnusedWarnings (:$$:@#@$) where suppressUnusedWarnings = snd (((,) (::$$:@#@$###)) ()) - data (:$$:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage) + type (:$$:@#@$$) :: ErrorMessage -> (~>) ErrorMessage ErrorMessage + data (:$$:@#@$$) a0123456789876543210 a0123456789876543210 where - (::$$:@#@$###) :: forall t0123456789876543210 - arg. SameKind (Apply (:$$:@#@$) arg) ((:$$:@#@$$) arg) => - (:$$:@#@$) t0123456789876543210 - type instance Apply (:$$:@#@$) t0123456789876543210 = (:$$:@#@$$) t0123456789876543210 - instance SuppressUnusedWarnings ((:$$:@#@$$) t0123456789876543210) where + (::$$:@#@$$###) :: SameKind (Apply ((:$$:@#@$$) a0123456789876543210) arg) ((:$$:@#@$$$) a0123456789876543210 arg) => + (:$$:@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((:$$:@#@$$) a0123456789876543210) a0123456789876543210 = (:$$:@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((:$$:@#@$$) a0123456789876543210) where suppressUnusedWarnings = snd (((,) (::$$:@#@$$###)) ()) - data (:$$:@#@$$) (t0123456789876543210 :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage + type (:$$:@#@$$$) (a0123456789876543210 :: ErrorMessage) (a0123456789876543210 :: ErrorMessage) = + (:$$:) a0123456789876543210 a0123456789876543210 :: ErrorMessage + type (:<>:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage) + data (:<>:@#@$) a0123456789876543210 where - (::$$:@#@$$###) :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply ((:$$:@#@$$) t0123456789876543210) arg) ((:$$:@#@$$$) t0123456789876543210 arg) => - (:$$:@#@$$) t0123456789876543210 t0123456789876543210 - type instance Apply ((:$$:@#@$$) t0123456789876543210) t0123456789876543210 = (:$$:@#@$$$) t0123456789876543210 t0123456789876543210 - type (:$$:@#@$$$) (t0123456789876543210 :: ErrorMessage) (t0123456789876543210 :: ErrorMessage) = - (:$$:) t0123456789876543210 t0123456789876543210 + (::<>:@#@$###) :: SameKind (Apply (:<>:@#@$) arg) ((:<>:@#@$$) arg) => + (:<>:@#@$) a0123456789876543210 + type instance Apply (:<>:@#@$) a0123456789876543210 = (:<>:@#@$$) a0123456789876543210 instance SuppressUnusedWarnings (:<>:@#@$) where suppressUnusedWarnings = snd (((,) (::<>:@#@$###)) ()) - data (:<>:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage) + type (:<>:@#@$$) :: ErrorMessage -> (~>) ErrorMessage ErrorMessage + data (:<>:@#@$$) a0123456789876543210 a0123456789876543210 where - (::<>:@#@$###) :: forall t0123456789876543210 - arg. SameKind (Apply (:<>:@#@$) arg) ((:<>:@#@$$) arg) => - (:<>:@#@$) t0123456789876543210 - type instance Apply (:<>:@#@$) t0123456789876543210 = (:<>:@#@$$) t0123456789876543210 - instance SuppressUnusedWarnings ((:<>:@#@$$) t0123456789876543210) where + (::<>:@#@$$###) :: SameKind (Apply ((:<>:@#@$$) a0123456789876543210) arg) ((:<>:@#@$$$) a0123456789876543210 arg) => + (:<>:@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((:<>:@#@$$) a0123456789876543210) a0123456789876543210 = (:<>:@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((:<>:@#@$$) a0123456789876543210) where suppressUnusedWarnings = snd (((,) (::<>:@#@$$###)) ()) - data (:<>:@#@$$) (t0123456789876543210 :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage + type (:<>:@#@$$$) (a0123456789876543210 :: ErrorMessage) (a0123456789876543210 :: ErrorMessage) = + (:<>:) a0123456789876543210 a0123456789876543210 :: ErrorMessage + type EMSym0 :: (~>) [Bool] ErrorMessage + data EMSym0 a0123456789876543210 where - (::<>:@#@$$###) :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply ((:<>:@#@$$) t0123456789876543210) arg) ((:<>:@#@$$$) t0123456789876543210 arg) => - (:<>:@#@$$) t0123456789876543210 t0123456789876543210 - type instance Apply ((:<>:@#@$$) t0123456789876543210) t0123456789876543210 = (:<>:@#@$$$) t0123456789876543210 t0123456789876543210 - type (:<>:@#@$$$) (t0123456789876543210 :: ErrorMessage) (t0123456789876543210 :: ErrorMessage) = - (:<>:) t0123456789876543210 t0123456789876543210 + EMSym0KindInference :: SameKind (Apply EMSym0 arg) (EMSym1 arg) => + EMSym0 a0123456789876543210 + type instance Apply EMSym0 a0123456789876543210 = EMSym1 a0123456789876543210 instance SuppressUnusedWarnings EMSym0 where suppressUnusedWarnings = snd (((,) EMSym0KindInference) ()) - data EMSym0 :: (~>) [Bool] ErrorMessage + type EMSym1 (a0123456789876543210 :: [Bool]) = + EM a0123456789876543210 :: ErrorMessage + type (<>:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage) + data (<>:@#@$) a0123456789876543210 where - EMSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply EMSym0 arg) (EMSym1 arg) => - EMSym0 t0123456789876543210 - type instance Apply EMSym0 t0123456789876543210 = EMSym1 t0123456789876543210 - type EMSym1 (t0123456789876543210 :: [Bool]) = - EM t0123456789876543210 - instance SuppressUnusedWarnings (<>:@#@$) where - suppressUnusedWarnings = snd (((,) (:<>:@#@$###)) ()) - data (<>:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage) - where - (:<>:@#@$###) :: forall a0123456789876543210 - arg. SameKind (Apply (<>:@#@$) arg) ((<>:@#@$$) arg) => + (:<>:@#@$###) :: SameKind (Apply (<>:@#@$) arg) ((<>:@#@$$) arg) => (<>:@#@$) a0123456789876543210 type instance Apply (<>:@#@$) a0123456789876543210 = (<>:@#@$$) a0123456789876543210 - instance SuppressUnusedWarnings ((<>:@#@$$) a0123456789876543210) where - suppressUnusedWarnings = snd (((,) (:<>:@#@$$###)) ()) - data (<>:@#@$$) (a0123456789876543210 :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage + instance SuppressUnusedWarnings (<>:@#@$) where + suppressUnusedWarnings = snd (((,) (:<>:@#@$###)) ()) + type (<>:@#@$$) :: ErrorMessage -> (~>) ErrorMessage ErrorMessage + data (<>:@#@$$) a0123456789876543210 a0123456789876543210 where - (:<>:@#@$$###) :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply ((<>:@#@$$) a0123456789876543210) arg) ((<>:@#@$$$) a0123456789876543210 arg) => + (:<>:@#@$$###) :: SameKind (Apply ((<>:@#@$$) a0123456789876543210) arg) ((<>:@#@$$$) a0123456789876543210 arg) => (<>:@#@$$) a0123456789876543210 a0123456789876543210 type instance Apply ((<>:@#@$$) a0123456789876543210) a0123456789876543210 = (<>:@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((<>:@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (:<>:@#@$$###)) ()) type (<>:@#@$$$) (a0123456789876543210 :: ErrorMessage) (a0123456789876543210 :: ErrorMessage) = - (<>:) a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings ($$:@#@$) where - suppressUnusedWarnings = snd (((,) (:$$:@#@$###)) ()) - data ($$:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage) + (<>:) a0123456789876543210 a0123456789876543210 :: ErrorMessage + type ($$:@#@$) :: (~>) ErrorMessage ((~>) ErrorMessage ErrorMessage) + data ($$:@#@$) a0123456789876543210 where - (:$$:@#@$###) :: forall a0123456789876543210 - arg. SameKind (Apply ($$:@#@$) arg) (($$:@#@$$) arg) => + (:$$:@#@$###) :: SameKind (Apply ($$:@#@$) arg) (($$:@#@$$) arg) => ($$:@#@$) a0123456789876543210 type instance Apply ($$:@#@$) a0123456789876543210 = ($$:@#@$$) a0123456789876543210 - instance SuppressUnusedWarnings (($$:@#@$$) a0123456789876543210) where - suppressUnusedWarnings = snd (((,) (:$$:@#@$$###)) ()) - data ($$:@#@$$) (a0123456789876543210 :: ErrorMessage) :: (~>) ErrorMessage ErrorMessage + instance SuppressUnusedWarnings ($$:@#@$) where + suppressUnusedWarnings = snd (((,) (:$$:@#@$###)) ()) + type ($$:@#@$$) :: ErrorMessage -> (~>) ErrorMessage ErrorMessage + data ($$:@#@$$) a0123456789876543210 a0123456789876543210 where - (:$$:@#@$$###) :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (($$:@#@$$) a0123456789876543210) arg) (($$:@#@$$$) a0123456789876543210 arg) => + (:$$:@#@$$###) :: SameKind (Apply (($$:@#@$$) a0123456789876543210) arg) (($$:@#@$$$) a0123456789876543210 arg) => ($$:@#@$$) a0123456789876543210 a0123456789876543210 type instance Apply (($$:@#@$$) a0123456789876543210) a0123456789876543210 = ($$:@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (($$:@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (:$$:@#@$$###)) ()) type ($$:@#@$$$) (a0123456789876543210 :: ErrorMessage) (a0123456789876543210 :: ErrorMessage) = - ($$:) a0123456789876543210 a0123456789876543210 - type family (<>:) (a :: ErrorMessage) (a :: ErrorMessage) :: ErrorMessage where + ($$:) a0123456789876543210 a0123456789876543210 :: ErrorMessage + type (<>:) :: ErrorMessage -> ErrorMessage -> ErrorMessage + type family (<>:) a a where (<>:) x y = Apply (Apply (:<>:@#@$) x) y - type family ($$:) (a :: ErrorMessage) (a :: ErrorMessage) :: ErrorMessage where + type ($$:) :: ErrorMessage -> ErrorMessage -> ErrorMessage + type family ($$:) a a where ($$:) x y = Apply (Apply (:$$:@#@$) x) y (%<>:) :: forall (t :: ErrorMessage) (t :: ErrorMessage). diff --git a/tests/compile-and-dump/Singletons/T204.golden b/tests/compile-and-dump/Singletons/T204.golden index c19a502b..38133153 100644 --- a/tests/compile-and-dump/Singletons/T204.golden +++ b/tests/compile-and-dump/Singletons/T204.golden @@ -15,46 +15,42 @@ Singletons/T204.hs:(0,0)-(0,0): Splicing declarations ======> data Ratio1 a = a :% a data Ratio2 a = a :%% a + type (:%@#@$) :: forall a. (~>) a ((~>) a (Ratio1 a)) + data (:%@#@$) a0123456789876543210 + where + (::%@#@$###) :: SameKind (Apply (:%@#@$) arg) ((:%@#@$$) arg) => + (:%@#@$) a0123456789876543210 + type instance Apply (:%@#@$) a0123456789876543210 = (:%@#@$$) a0123456789876543210 instance SuppressUnusedWarnings (:%@#@$) where suppressUnusedWarnings = snd (((,) (::%@#@$###)) ()) - data (:%@#@$) :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) a0123456789876543210 (Ratio1 a0123456789876543210)) + type (:%@#@$$) :: forall a. a -> (~>) a (Ratio1 a) + data (:%@#@$$) a0123456789876543210 a0123456789876543210 where - (::%@#@$###) :: forall t0123456789876543210 - arg. SameKind (Apply (:%@#@$) arg) ((:%@#@$$) arg) => - (:%@#@$) t0123456789876543210 - type instance Apply (:%@#@$) t0123456789876543210 = (:%@#@$$) t0123456789876543210 - instance SuppressUnusedWarnings ((:%@#@$$) t0123456789876543210) where + (::%@#@$$###) :: SameKind (Apply ((:%@#@$$) a0123456789876543210) arg) ((:%@#@$$$) a0123456789876543210 arg) => + (:%@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((:%@#@$$) a0123456789876543210) a0123456789876543210 = (:%@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((:%@#@$$) a0123456789876543210) where suppressUnusedWarnings = snd (((,) (::%@#@$$###)) ()) - data (:%@#@$$) (t0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 (Ratio1 a0123456789876543210) + type (:%@#@$$$) (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + (:%) a0123456789876543210 a0123456789876543210 :: Ratio1 a + type (:%%@#@$) :: forall a. (~>) a ((~>) a (Ratio2 a)) + data (:%%@#@$) a0123456789876543210 where - (::%@#@$$###) :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply ((:%@#@$$) t0123456789876543210) arg) ((:%@#@$$$) t0123456789876543210 arg) => - (:%@#@$$) t0123456789876543210 t0123456789876543210 - type instance Apply ((:%@#@$$) t0123456789876543210) t0123456789876543210 = (:%@#@$$$) t0123456789876543210 t0123456789876543210 - type (:%@#@$$$) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: a0123456789876543210) = - (:%) t0123456789876543210 t0123456789876543210 + (::%%@#@$###) :: SameKind (Apply (:%%@#@$) arg) ((:%%@#@$$) arg) => + (:%%@#@$) a0123456789876543210 + type instance Apply (:%%@#@$) a0123456789876543210 = (:%%@#@$$) a0123456789876543210 instance SuppressUnusedWarnings (:%%@#@$) where suppressUnusedWarnings = snd (((,) (::%%@#@$###)) ()) - data (:%%@#@$) :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) a0123456789876543210 (Ratio2 a0123456789876543210)) + type (:%%@#@$$) :: forall a. a -> (~>) a (Ratio2 a) + data (:%%@#@$$) a0123456789876543210 a0123456789876543210 where - (::%%@#@$###) :: forall t0123456789876543210 - arg. SameKind (Apply (:%%@#@$) arg) ((:%%@#@$$) arg) => - (:%%@#@$) t0123456789876543210 - type instance Apply (:%%@#@$) t0123456789876543210 = (:%%@#@$$) t0123456789876543210 - instance SuppressUnusedWarnings ((:%%@#@$$) t0123456789876543210) where + (::%%@#@$$###) :: SameKind (Apply ((:%%@#@$$) a0123456789876543210) arg) ((:%%@#@$$$) a0123456789876543210 arg) => + (:%%@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((:%%@#@$$) a0123456789876543210) a0123456789876543210 = (:%%@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((:%%@#@$$) a0123456789876543210) where suppressUnusedWarnings = snd (((,) (::%%@#@$$###)) ()) - data (:%%@#@$$) (t0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 (Ratio2 a0123456789876543210) - where - (::%%@#@$$###) :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply ((:%%@#@$$) t0123456789876543210) arg) ((:%%@#@$$$) t0123456789876543210 arg) => - (:%%@#@$$) t0123456789876543210 t0123456789876543210 - type instance Apply ((:%%@#@$$) t0123456789876543210) t0123456789876543210 = (:%%@#@$$$) t0123456789876543210 t0123456789876543210 - type (:%%@#@$$$) (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: a0123456789876543210) = - (:%%) t0123456789876543210 t0123456789876543210 + type (:%%@#@$$$) (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + (:%%) a0123456789876543210 a0123456789876543210 :: Ratio2 a data SRatio1 :: forall a. Ratio1 a -> GHC.Types.Type where (:^%) :: forall a (n :: a) (n :: a). diff --git a/tests/compile-and-dump/Singletons/T209.golden b/tests/compile-and-dump/Singletons/T209.golden index efa7d497..cf000d39 100644 --- a/tests/compile-and-dump/Singletons/T209.golden +++ b/tests/compile-and-dump/Singletons/T209.golden @@ -17,39 +17,35 @@ Singletons/T209.hs:(0,0)-(0,0): Splicing declarations = Hm deriving anyclass (C Bool) deriving anyclass instance C a a => C a (Maybe a) - type HmSym0 = Hm - instance SuppressUnusedWarnings MSym0 where - suppressUnusedWarnings = snd (((,) MSym0KindInference) ()) - data MSym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 ((~>) Bool Bool)) + type HmSym0 = Hm :: Hm + type MSym0 :: (~>) a ((~>) b ((~>) Bool Bool)) + data MSym0 a0123456789876543210 where - MSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply MSym0 arg) (MSym1 arg) => + MSym0KindInference :: SameKind (Apply MSym0 arg) (MSym1 arg) => MSym0 a0123456789876543210 type instance Apply MSym0 a0123456789876543210 = MSym1 a0123456789876543210 - instance SuppressUnusedWarnings (MSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) MSym1KindInference) ()) - data MSym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 ((~>) Bool Bool) + instance SuppressUnusedWarnings MSym0 where + suppressUnusedWarnings = snd (((,) MSym0KindInference) ()) + type MSym1 :: a -> (~>) b ((~>) Bool Bool) + data MSym1 a0123456789876543210 a0123456789876543210 where - MSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (MSym1 a0123456789876543210) arg) (MSym2 a0123456789876543210 arg) => + MSym1KindInference :: SameKind (Apply (MSym1 a0123456789876543210) arg) (MSym2 a0123456789876543210 arg) => MSym1 a0123456789876543210 a0123456789876543210 type instance Apply (MSym1 a0123456789876543210) a0123456789876543210 = MSym2 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings (MSym2 a0123456789876543210 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) MSym2KindInference) ()) - data MSym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) :: (~>) Bool Bool + instance SuppressUnusedWarnings (MSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) MSym1KindInference) ()) + type MSym2 :: a -> b -> (~>) Bool Bool + data MSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - MSym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (MSym2 a0123456789876543210 a0123456789876543210) arg) (MSym3 a0123456789876543210 a0123456789876543210 arg) => + MSym2KindInference :: SameKind (Apply (MSym2 a0123456789876543210 a0123456789876543210) arg) (MSym3 a0123456789876543210 a0123456789876543210 arg) => MSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 type instance Apply (MSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = MSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 - type MSym3 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) (a0123456789876543210 :: Bool) = - M a0123456789876543210 a0123456789876543210 a0123456789876543210 - type family M (a :: a) (a :: b) (a :: Bool) :: Bool where + instance SuppressUnusedWarnings (MSym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) MSym2KindInference) ()) + type MSym3 (a0123456789876543210 :: a) (a0123456789876543210 :: b) (a0123456789876543210 :: Bool) = + M a0123456789876543210 a0123456789876543210 a0123456789876543210 :: Bool + type M :: a -> b -> Bool -> Bool + type family M a a a where M _ _ x = x class PC a b instance PC Bool Hm diff --git a/tests/compile-and-dump/Singletons/T216.golden b/tests/compile-and-dump/Singletons/T216.golden index 6035b610..397f4bff 100644 --- a/tests/compile-and-dump/Singletons/T216.golden +++ b/tests/compile-and-dump/Singletons/T216.golden @@ -1,56 +1,42 @@ Singletons/T216.hs:0:0:: Splicing declarations genDefunSymbols [''MyProxy, ''Symmetry] ======> - instance SuppressUnusedWarnings MyProxySym0 where - suppressUnusedWarnings = snd (((,) MyProxySym0KindInference) ()) - data MyProxySym0 :: forall (k0123456789876543210 :: Type). - (~>) Type ((~>) k0123456789876543210 Type) + data MyProxySym0 :: (~>) Type ((~>) k0123456789876543210 Type) where - MyProxySym0KindInference :: forall k0123456789876543210 - arg. SameKind (Apply MyProxySym0 arg) (MyProxySym1 arg) => + MyProxySym0KindInference :: SameKind (Apply MyProxySym0 arg) (MyProxySym1 arg) => MyProxySym0 k0123456789876543210 type instance Apply MyProxySym0 k0123456789876543210 = MyProxySym1 k0123456789876543210 + instance SuppressUnusedWarnings MyProxySym0 where + suppressUnusedWarnings = snd (((,) MyProxySym0KindInference) ()) + data MyProxySym1 (k0123456789876543210 :: Type) :: (~>) k0123456789876543210 Type + where + MyProxySym1KindInference :: SameKind (Apply (MyProxySym1 k0123456789876543210) arg) (MyProxySym2 k0123456789876543210 arg) => + MyProxySym1 k0123456789876543210 e + type instance Apply (MyProxySym1 k0123456789876543210) e = MyProxySym2 k0123456789876543210 e instance SuppressUnusedWarnings (MyProxySym1 k0123456789876543210) where suppressUnusedWarnings = snd (((,) MyProxySym1KindInference) ()) - data MyProxySym1 (k0123456789876543210 :: Type) :: (~>) k0123456789876543210 Type + type MyProxySym2 (k0123456789876543210 :: Type) (e :: k0123456789876543210) = + MyProxy k0123456789876543210 e :: Type + data SymmetrySym0 :: (~>) t0123456789876543210 ((~>) t0123456789876543210 ((~>) ((:~:) a0123456789876543210 y0123456789876543210) Type)) where - MyProxySym1KindInference :: forall k0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (MyProxySym1 k0123456789876543210) arg) (MyProxySym2 k0123456789876543210 arg) => - MyProxySym1 k0123456789876543210 a0123456789876543210 - type instance Apply (MyProxySym1 k0123456789876543210) a0123456789876543210 = MyProxySym2 k0123456789876543210 a0123456789876543210 - type MyProxySym2 (k0123456789876543210 :: Type) (a0123456789876543210 :: k0123456789876543210) = - MyProxy k0123456789876543210 a0123456789876543210 + SymmetrySym0KindInference :: SameKind (Apply SymmetrySym0 arg) (SymmetrySym1 arg) => + SymmetrySym0 a0123456789876543210 + type instance Apply SymmetrySym0 a0123456789876543210 = SymmetrySym1 a0123456789876543210 instance SuppressUnusedWarnings SymmetrySym0 where suppressUnusedWarnings = snd (((,) SymmetrySym0KindInference) ()) - data SymmetrySym0 :: forall t0123456789876543210 - (a0123456789876543210 :: t0123456789876543210) - (y0123456789876543210 :: t0123456789876543210). - (~>) t0123456789876543210 ((~>) t0123456789876543210 ((~>) ((:~:) a0123456789876543210 y0123456789876543210) Type)) + data SymmetrySym1 (a0123456789876543210 :: 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 + SymmetrySym1KindInference :: SameKind (Apply (SymmetrySym1 a0123456789876543210) arg) (SymmetrySym2 a0123456789876543210 arg) => + SymmetrySym1 a0123456789876543210 y0123456789876543210 + type instance Apply (SymmetrySym1 a0123456789876543210) y0123456789876543210 = SymmetrySym2 a0123456789876543210 y0123456789876543210 instance SuppressUnusedWarnings (SymmetrySym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) SymmetrySym1KindInference) ()) - data SymmetrySym1 (a0123456789876543210 :: t0123456789876543210) :: forall (y0123456789876543210 :: t0123456789876543210). - (~>) t0123456789876543210 ((~>) ((:~:) a0123456789876543210 y0123456789876543210) Type) + data SymmetrySym2 (a0123456789876543210 :: t0123456789876543210) (y0123456789876543210 :: 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 + SymmetrySym2KindInference :: SameKind (Apply (SymmetrySym2 a0123456789876543210 y0123456789876543210) arg) (SymmetrySym3 a0123456789876543210 y0123456789876543210 arg) => + SymmetrySym2 a0123456789876543210 y0123456789876543210 e + type instance Apply (SymmetrySym2 a0123456789876543210 y0123456789876543210) e = SymmetrySym3 a0123456789876543210 y0123456789876543210 e instance SuppressUnusedWarnings (SymmetrySym2 a0123456789876543210 y0123456789876543210) 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 a0123456789876543210 y0123456789876543210) e0123456789876543210 = SymmetrySym3 a0123456789876543210 y0123456789876543210 e0123456789876543210 - type SymmetrySym3 (a0123456789876543210 :: t0123456789876543210) (y0123456789876543210 :: t0123456789876543210) (e0123456789876543210 :: (:~:) a0123456789876543210 y0123456789876543210) = - Symmetry a0123456789876543210 y0123456789876543210 e0123456789876543210 + type SymmetrySym3 (a0123456789876543210 :: t0123456789876543210) (y0123456789876543210 :: t0123456789876543210) (e :: (:~:) a0123456789876543210 y0123456789876543210) = + Symmetry a0123456789876543210 y0123456789876543210 e :: Type diff --git a/tests/compile-and-dump/Singletons/T229.golden b/tests/compile-and-dump/Singletons/T229.golden index 7b08818e..5145de35 100644 --- a/tests/compile-and-dump/Singletons/T229.golden +++ b/tests/compile-and-dump/Singletons/T229.golden @@ -5,17 +5,18 @@ Singletons/T229.hs:(0,0)-(0,0): Splicing declarations ======> ___foo :: Bool -> Bool ___foo _ = True - instance SuppressUnusedWarnings US___fooSym0 where - suppressUnusedWarnings = snd (((,) US___fooSym0KindInference) ()) - data US___fooSym0 :: (~>) Bool Bool + type US___fooSym0 :: (~>) Bool Bool + data US___fooSym0 a0123456789876543210 where - US___fooSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply US___fooSym0 arg) (US___fooSym1 arg) => + US___fooSym0KindInference :: SameKind (Apply US___fooSym0 arg) (US___fooSym1 arg) => US___fooSym0 a0123456789876543210 type instance Apply US___fooSym0 a0123456789876543210 = US___fooSym1 a0123456789876543210 + instance SuppressUnusedWarnings US___fooSym0 where + suppressUnusedWarnings = snd (((,) US___fooSym0KindInference) ()) type US___fooSym1 (a0123456789876543210 :: Bool) = - US___foo a0123456789876543210 - type family US___foo (a :: Bool) :: Bool where + US___foo a0123456789876543210 :: Bool + type US___foo :: Bool -> Bool + type family US___foo a where US___foo _ = TrueSym0 ___sfoo :: forall (t :: Bool). Sing t -> Sing (Apply US___fooSym0 t :: Bool) diff --git a/tests/compile-and-dump/Singletons/T249.golden b/tests/compile-and-dump/Singletons/T249.golden index 35b39bd5..4c79134c 100644 --- a/tests/compile-and-dump/Singletons/T249.golden +++ b/tests/compile-and-dump/Singletons/T249.golden @@ -7,39 +7,36 @@ Singletons/T249.hs:(0,0)-(0,0): Splicing declarations data Foo1 a = MkFoo1 a data Foo2 a where MkFoo2 :: x -> Foo2 x data Foo3 a where MkFoo3 :: forall x. x -> Foo3 x + type MkFoo1Sym0 :: forall a. (~>) a (Foo1 a) + data MkFoo1Sym0 a0123456789876543210 + where + MkFoo1Sym0KindInference :: SameKind (Apply MkFoo1Sym0 arg) (MkFoo1Sym1 arg) => + MkFoo1Sym0 a0123456789876543210 + type instance Apply MkFoo1Sym0 a0123456789876543210 = MkFoo1Sym1 a0123456789876543210 instance SuppressUnusedWarnings MkFoo1Sym0 where suppressUnusedWarnings = snd (((,) MkFoo1Sym0KindInference) ()) - data MkFoo1Sym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 (Foo1 a0123456789876543210) + type MkFoo1Sym1 (a0123456789876543210 :: a) = + MkFoo1 a0123456789876543210 :: Foo1 a + type MkFoo2Sym0 :: (~>) x (Foo2 x) + data MkFoo2Sym0 a0123456789876543210 where - MkFoo1Sym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply MkFoo1Sym0 arg) (MkFoo1Sym1 arg) => - MkFoo1Sym0 t0123456789876543210 - type instance Apply MkFoo1Sym0 t0123456789876543210 = MkFoo1Sym1 t0123456789876543210 - type MkFoo1Sym1 (t0123456789876543210 :: a0123456789876543210) = - MkFoo1 t0123456789876543210 + MkFoo2Sym0KindInference :: SameKind (Apply MkFoo2Sym0 arg) (MkFoo2Sym1 arg) => + MkFoo2Sym0 a0123456789876543210 + type instance Apply MkFoo2Sym0 a0123456789876543210 = MkFoo2Sym1 a0123456789876543210 instance SuppressUnusedWarnings MkFoo2Sym0 where suppressUnusedWarnings = snd (((,) MkFoo2Sym0KindInference) ()) - data MkFoo2Sym0 :: forall x0123456789876543210. - (~>) x0123456789876543210 (Foo2 x0123456789876543210) + type MkFoo2Sym1 (a0123456789876543210 :: x) = + MkFoo2 a0123456789876543210 :: Foo2 x + type MkFoo3Sym0 :: forall x. (~>) x (Foo3 x) + data MkFoo3Sym0 a0123456789876543210 where - MkFoo2Sym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply MkFoo2Sym0 arg) (MkFoo2Sym1 arg) => - MkFoo2Sym0 t0123456789876543210 - type instance Apply MkFoo2Sym0 t0123456789876543210 = MkFoo2Sym1 t0123456789876543210 - type MkFoo2Sym1 (t0123456789876543210 :: x0123456789876543210) = - MkFoo2 t0123456789876543210 + MkFoo3Sym0KindInference :: SameKind (Apply MkFoo3Sym0 arg) (MkFoo3Sym1 arg) => + MkFoo3Sym0 a0123456789876543210 + type instance Apply MkFoo3Sym0 a0123456789876543210 = MkFoo3Sym1 a0123456789876543210 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 = MkFoo3Sym1 t0123456789876543210 - type MkFoo3Sym1 (t0123456789876543210 :: x0123456789876543210) = - MkFoo3 t0123456789876543210 + type MkFoo3Sym1 (a0123456789876543210 :: x) = + MkFoo3 a0123456789876543210 :: Foo3 x data SFoo1 :: forall a. Foo1 a -> Type where SMkFoo1 :: forall a (n :: a). diff --git a/tests/compile-and-dump/Singletons/T271.golden b/tests/compile-and-dump/Singletons/T271.golden index cca735b3..54edcd8c 100644 --- a/tests/compile-and-dump/Singletons/T271.golden +++ b/tests/compile-and-dump/Singletons/T271.golden @@ -13,93 +13,96 @@ Singletons/T271.hs:(0,0)-(0,0): Splicing declarations data Identity :: Type -> Type where Identity :: a -> Identity a deriving (Eq, Ord) + type ConstantSym0 :: forall (a :: Type) (b :: Type). + (~>) a (Constant (a :: Type) (b :: Type)) + data ConstantSym0 a0123456789876543210 + where + ConstantSym0KindInference :: SameKind (Apply ConstantSym0 arg) (ConstantSym1 arg) => + ConstantSym0 a0123456789876543210 + type instance Apply ConstantSym0 a0123456789876543210 = ConstantSym1 a0123456789876543210 instance SuppressUnusedWarnings ConstantSym0 where suppressUnusedWarnings = snd (((,) ConstantSym0KindInference) ()) - data ConstantSym0 :: forall (a0123456789876543210 :: Type) - (b0123456789876543210 :: Type). - (~>) a0123456789876543210 (Constant (a0123456789876543210 :: Type) (b0123456789876543210 :: Type)) + type ConstantSym1 (a0123456789876543210 :: a) = + Constant a0123456789876543210 :: Constant (a :: Type) (b :: Type) + type IdentitySym0 :: (~>) a (Identity a) + data IdentitySym0 a0123456789876543210 where - ConstantSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply ConstantSym0 arg) (ConstantSym1 arg) => - ConstantSym0 t0123456789876543210 - type instance Apply ConstantSym0 t0123456789876543210 = ConstantSym1 t0123456789876543210 - type ConstantSym1 (t0123456789876543210 :: a0123456789876543210) = - Constant t0123456789876543210 + IdentitySym0KindInference :: SameKind (Apply IdentitySym0 arg) (IdentitySym1 arg) => + IdentitySym0 a0123456789876543210 + type instance Apply IdentitySym0 a0123456789876543210 = IdentitySym1 a0123456789876543210 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 = IdentitySym1 t0123456789876543210 - type IdentitySym1 (t0123456789876543210 :: a0123456789876543210) = - Identity t0123456789876543210 - type family Compare_0123456789876543210 (a :: Constant a b) (a :: Constant a b) :: Ordering where + type IdentitySym1 (a0123456789876543210 :: a) = + Identity a0123456789876543210 :: Identity a + type Compare_0123456789876543210 :: Constant a b + -> Constant a b -> Ordering + type family Compare_0123456789876543210 a a where Compare_0123456789876543210 (Constant a_0123456789876543210) (Constant b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) NilSym0) - instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) - data Compare_0123456789876543210Sym0 :: forall a0123456789876543210 - b0123456789876543210. - (~>) (Constant a0123456789876543210 b0123456789876543210) ((~>) (Constant a0123456789876543210 b0123456789876543210) Ordering) + type Compare_0123456789876543210Sym0 :: (~>) (Constant a b) ((~>) (Constant a b) Ordering) + data Compare_0123456789876543210Sym0 a0123456789876543210 where - Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => + Compare_0123456789876543210Sym0KindInference :: SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => Compare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) - data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Constant a0123456789876543210 b0123456789876543210) :: (~>) (Constant a0123456789876543210 b0123456789876543210) Ordering + = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) + type Compare_0123456789876543210Sym1 :: Constant a b + -> (~>) (Constant a b) Ordering + data Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => + Compare_0123456789876543210Sym1KindInference :: SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - 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) ()) + type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Constant a b) (a0123456789876543210 :: Constant a b) = + Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering 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 + type Compare_0123456789876543210 :: Identity a + -> Identity a -> Ordering + type family Compare_0123456789876543210 a a where Compare_0123456789876543210 (Identity a_0123456789876543210) (Identity b_0123456789876543210) = Apply (Apply (Apply FoldlSym0 ThenCmpSym0) EQSym0) (Apply (Apply (:@#@$) (Apply (Apply CompareSym0 a_0123456789876543210) b_0123456789876543210)) NilSym0) - instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) - data Compare_0123456789876543210Sym0 :: forall a0123456789876543210. - (~>) (Identity a0123456789876543210) ((~>) (Identity a0123456789876543210) Ordering) + type Compare_0123456789876543210Sym0 :: (~>) (Identity a) ((~>) (Identity a) Ordering) + data Compare_0123456789876543210Sym0 a0123456789876543210 where - Compare_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => + Compare_0123456789876543210Sym0KindInference :: SameKind (Apply Compare_0123456789876543210Sym0 arg) (Compare_0123456789876543210Sym1 arg) => Compare_0123456789876543210Sym0 a0123456789876543210 type instance Apply Compare_0123456789876543210Sym0 a0123456789876543210 = Compare_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Compare_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) - data Compare_0123456789876543210Sym1 (a0123456789876543210 :: Identity a0123456789876543210) :: (~>) (Identity a0123456789876543210) Ordering + = snd (((,) Compare_0123456789876543210Sym0KindInference) ()) + type Compare_0123456789876543210Sym1 :: Identity a + -> (~>) (Identity a) Ordering + data Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Compare_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => + Compare_0123456789876543210Sym1KindInference :: SameKind (Apply (Compare_0123456789876543210Sym1 a0123456789876543210) arg) (Compare_0123456789876543210Sym2 a0123456789876543210 arg) => Compare_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Compare_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Compare_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Identity a0123456789876543210) (a0123456789876543210 :: Identity a0123456789876543210) = - Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Compare_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Compare_0123456789876543210Sym1KindInference) ()) + type Compare_0123456789876543210Sym2 (a0123456789876543210 :: Identity a) (a0123456789876543210 :: Identity a) = + Compare_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Ordering 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 + type Equals_0123456789876543210 :: Constant a b + -> Constant a b -> Bool + type family Equals_0123456789876543210 a b 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 + type Equals_0123456789876543210 :: Identity a -> Identity a -> Bool + type family Equals_0123456789876543210 a b 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 + data SConstant :: forall a b. + Constant (a :: Type) (b :: Type) -> Type where SConstant :: forall (a :: Type) (b :: Type) (n :: a). (Sing n) @@ -111,7 +114,7 @@ Singletons/T271.hs:(0,0)-(0,0): Splicing declarations toSing (Constant (b :: Demote a)) = case toSing b :: SomeSing a of { SomeSing c -> SomeSing (SConstant c) } - data SIdentity :: forall a. Identity a -> Type + data SIdentity :: forall a. Identity (a :: Type) -> Type where SIdentity :: forall a (n :: a). (Sing n) -> SIdentity (Identity n :: Identity a) diff --git a/tests/compile-and-dump/Singletons/T287.golden b/tests/compile-and-dump/Singletons/T287.golden index 889e0fd3..8e5b4feb 100644 --- a/tests/compile-and-dump/Singletons/T287.golden +++ b/tests/compile-and-dump/Singletons/T287.golden @@ -10,87 +10,79 @@ Singletons/T287.hs:(0,0)-(0,0): Splicing declarations (<<>>) :: a -> a -> a instance S b => S (a -> b) where (<<>>) f g = \ x -> (f x <<>> g x) + type (<<>>@#@$) :: forall a. (~>) a ((~>) a a) + data (<<>>@#@$) a0123456789876543210 + where + (:<<>>@#@$###) :: SameKind (Apply (<<>>@#@$) arg) ((<<>>@#@$$) arg) => + (<<>>@#@$) a0123456789876543210 + type instance Apply (<<>>@#@$) a0123456789876543210 = (<<>>@#@$$) a0123456789876543210 instance SuppressUnusedWarnings (<<>>@#@$) where suppressUnusedWarnings = snd (((,) (:<<>>@#@$###)) ()) - data (<<>>@#@$) :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) a0123456789876543210 a0123456789876543210) + type (<<>>@#@$$) :: forall a. a -> (~>) a a + data (<<>>@#@$$) a0123456789876543210 a0123456789876543210 where - (:<<>>@#@$###) :: forall arg0123456789876543210 - arg. SameKind (Apply (<<>>@#@$) arg) ((<<>>@#@$$) arg) => - (<<>>@#@$) arg0123456789876543210 - type instance Apply (<<>>@#@$) arg0123456789876543210 = (<<>>@#@$$) arg0123456789876543210 - instance SuppressUnusedWarnings ((<<>>@#@$$) arg0123456789876543210) where + (:<<>>@#@$$###) :: SameKind (Apply ((<<>>@#@$$) a0123456789876543210) arg) ((<<>>@#@$$$) a0123456789876543210 arg) => + (<<>>@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((<<>>@#@$$) a0123456789876543210) a0123456789876543210 = (<<>>@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((<<>>@#@$$) a0123456789876543210) 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 - type (<<>>@#@$$$) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) = - (<<>>) arg0123456789876543210 arg0123456789876543210 + type (<<>>@#@$$$) (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + (<<>>) a0123456789876543210 a0123456789876543210 :: a class PS a where type (<<>>) (arg :: a) (arg :: a) :: a type family Lambda_0123456789876543210 f g x where Lambda_0123456789876543210 f g x = Apply (Apply (<<>>@#@$) (Apply f x)) (Apply g x) - 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_0123456789876543210Sym0KindInference :: SameKind (Apply Lambda_0123456789876543210Sym0 arg) (Lambda_0123456789876543210Sym1 arg) => Lambda_0123456789876543210Sym0 f0123456789876543210 type instance Apply Lambda_0123456789876543210Sym0 f0123456789876543210 = Lambda_0123456789876543210Sym1 f0123456789876543210 - instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 f0123456789876543210) where + instance SuppressUnusedWarnings Lambda_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym0KindInference) ()) data Lambda_0123456789876543210Sym1 f0123456789876543210 g0123456789876543210 where - Lambda_0123456789876543210Sym1KindInference :: forall f0123456789876543210 - g0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym1 f0123456789876543210) arg) (Lambda_0123456789876543210Sym2 f0123456789876543210 arg) => + Lambda_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210) where + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym1 f0123456789876543210) where suppressUnusedWarnings - = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) + = snd (((,) Lambda_0123456789876543210Sym1KindInference) ()) data Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210 x0123456789876543210 where - Lambda_0123456789876543210Sym2KindInference :: forall f0123456789876543210 - g0123456789876543210 - x0123456789876543210 - arg. SameKind (Apply (Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210) arg) (Lambda_0123456789876543210Sym3 f0123456789876543210 g0123456789876543210 arg) => + Lambda_0123456789876543210Sym2KindInference :: SameKind (Apply (Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210) arg) (Lambda_0123456789876543210Sym3 f0123456789876543210 g0123456789876543210 arg) => Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210 x0123456789876543210 type instance Apply (Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210) x0123456789876543210 = Lambda_0123456789876543210Sym3 f0123456789876543210 g0123456789876543210 x0123456789876543210 + instance SuppressUnusedWarnings (Lambda_0123456789876543210Sym2 f0123456789876543210 g0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Lambda_0123456789876543210Sym2KindInference) ()) type Lambda_0123456789876543210Sym3 f0123456789876543210 g0123456789876543210 x0123456789876543210 = Lambda_0123456789876543210 f0123456789876543210 g0123456789876543210 x0123456789876543210 - type family TFHelper_0123456789876543210 (a :: (~>) a b) (a :: (~>) a b) :: (~>) a b where + type TFHelper_0123456789876543210 :: (~>) a b + -> (~>) a b -> (~>) a b + type family TFHelper_0123456789876543210 a a where TFHelper_0123456789876543210 f g = Apply (Apply Lambda_0123456789876543210Sym0 f) g - instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ()) - data TFHelper_0123456789876543210Sym0 :: forall a0123456789876543210 - b0123456789876543210. - (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210)) + type TFHelper_0123456789876543210Sym0 :: (~>) ((~>) a b) ((~>) ((~>) a b) ((~>) a b)) + data TFHelper_0123456789876543210Sym0 a0123456789876543210 where - TFHelper_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) => + TFHelper_0123456789876543210Sym0KindInference :: SameKind (Apply TFHelper_0123456789876543210Sym0 arg) (TFHelper_0123456789876543210Sym1 arg) => TFHelper_0123456789876543210Sym0 a0123456789876543210 type instance Apply TFHelper_0123456789876543210Sym0 a0123456789876543210 = TFHelper_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings TFHelper_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ()) - data TFHelper_0123456789876543210Sym1 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) :: (~>) ((~>) a0123456789876543210 b0123456789876543210) ((~>) a0123456789876543210 b0123456789876543210) + = snd (((,) TFHelper_0123456789876543210Sym0KindInference) ()) + type TFHelper_0123456789876543210Sym1 :: (~>) a b + -> (~>) ((~>) a b) ((~>) a b) + data TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - TFHelper_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) => + TFHelper_0123456789876543210Sym1KindInference :: SameKind (Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) arg) (TFHelper_0123456789876543210Sym2 a0123456789876543210 arg) => TFHelper_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (TFHelper_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = TFHelper_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) (a0123456789876543210 :: (~>) a0123456789876543210 b0123456789876543210) = - TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (TFHelper_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) TFHelper_0123456789876543210Sym1KindInference) ()) + type TFHelper_0123456789876543210Sym2 (a0123456789876543210 :: (~>) a b) (a0123456789876543210 :: (~>) a b) = + TFHelper_0123456789876543210 a0123456789876543210 a0123456789876543210 :: (~>) a b instance PS ((~>) a b) where type (<<>>) a a = Apply (Apply TFHelper_0123456789876543210Sym0 a) a class SS a where diff --git a/tests/compile-and-dump/Singletons/T29.golden b/tests/compile-and-dump/Singletons/T29.golden index fc1fe2fb..e18b8cda 100644 --- a/tests/compile-and-dump/Singletons/T29.golden +++ b/tests/compile-and-dump/Singletons/T29.golden @@ -17,53 +17,57 @@ Singletons/T29.hs:(0,0)-(0,0): Splicing declarations baz x = (not $! x) ban :: Bool -> Bool ban x = ((not . (not . not)) $! x) - instance SuppressUnusedWarnings BanSym0 where - suppressUnusedWarnings = snd (((,) BanSym0KindInference) ()) - data BanSym0 :: (~>) Bool Bool + type BanSym0 :: (~>) Bool Bool + data BanSym0 a0123456789876543210 where - BanSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply BanSym0 arg) (BanSym1 arg) => + BanSym0KindInference :: SameKind (Apply BanSym0 arg) (BanSym1 arg) => BanSym0 a0123456789876543210 type instance Apply BanSym0 a0123456789876543210 = BanSym1 a0123456789876543210 + instance SuppressUnusedWarnings BanSym0 where + suppressUnusedWarnings = snd (((,) BanSym0KindInference) ()) type BanSym1 (a0123456789876543210 :: Bool) = - Ban a0123456789876543210 - instance SuppressUnusedWarnings BazSym0 where - suppressUnusedWarnings = snd (((,) BazSym0KindInference) ()) - data BazSym0 :: (~>) Bool Bool + Ban a0123456789876543210 :: Bool + type BazSym0 :: (~>) Bool Bool + data BazSym0 a0123456789876543210 where - BazSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply BazSym0 arg) (BazSym1 arg) => + BazSym0KindInference :: SameKind (Apply BazSym0 arg) (BazSym1 arg) => BazSym0 a0123456789876543210 type instance Apply BazSym0 a0123456789876543210 = BazSym1 a0123456789876543210 + instance SuppressUnusedWarnings BazSym0 where + suppressUnusedWarnings = snd (((,) BazSym0KindInference) ()) type BazSym1 (a0123456789876543210 :: Bool) = - Baz a0123456789876543210 - instance SuppressUnusedWarnings BarSym0 where - suppressUnusedWarnings = snd (((,) BarSym0KindInference) ()) - data BarSym0 :: (~>) Bool Bool + Baz a0123456789876543210 :: Bool + type BarSym0 :: (~>) Bool Bool + data BarSym0 a0123456789876543210 where - BarSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) => + BarSym0KindInference :: SameKind (Apply BarSym0 arg) (BarSym1 arg) => BarSym0 a0123456789876543210 type instance Apply BarSym0 a0123456789876543210 = BarSym1 a0123456789876543210 + instance SuppressUnusedWarnings BarSym0 where + suppressUnusedWarnings = snd (((,) BarSym0KindInference) ()) type BarSym1 (a0123456789876543210 :: Bool) = - Bar a0123456789876543210 - instance SuppressUnusedWarnings FooSym0 where - suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) - data FooSym0 :: (~>) Bool Bool + Bar a0123456789876543210 :: Bool + type FooSym0 :: (~>) Bool Bool + data FooSym0 a0123456789876543210 where - FooSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) => + FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) => FooSym0 a0123456789876543210 type instance Apply FooSym0 a0123456789876543210 = FooSym1 a0123456789876543210 + instance SuppressUnusedWarnings FooSym0 where + suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) type FooSym1 (a0123456789876543210 :: Bool) = - Foo a0123456789876543210 - type family Ban (a :: Bool) :: Bool where + Foo a0123456789876543210 :: Bool + type Ban :: Bool -> Bool + type family Ban a where Ban x = Apply (Apply ($!@#@$) (Apply (Apply (.@#@$) NotSym0) (Apply (Apply (.@#@$) NotSym0) NotSym0))) x - type family Baz (a :: Bool) :: Bool where + type Baz :: Bool -> Bool + type family Baz a where Baz x = Apply (Apply ($!@#@$) NotSym0) x - type family Bar (a :: Bool) :: Bool where + type Bar :: Bool -> Bool + type family Bar a where Bar x = Apply (Apply ($@#@$) (Apply (Apply (.@#@$) NotSym0) (Apply (Apply (.@#@$) NotSym0) NotSym0))) x - type family Foo (a :: Bool) :: Bool where + type Foo :: Bool -> Bool + type family Foo a where Foo x = Apply (Apply ($@#@$) NotSym0) x sBan :: forall (t :: Bool). Sing t -> Sing (Apply BanSym0 t :: Bool) diff --git a/tests/compile-and-dump/Singletons/T297.golden b/tests/compile-and-dump/Singletons/T297.golden index 09ff5204..3b7fee10 100644 --- a/tests/compile-and-dump/Singletons/T297.golden +++ b/tests/compile-and-dump/Singletons/T297.golden @@ -18,21 +18,22 @@ Singletons/T297.hs:(0,0)-(0,0): Splicing declarations z = MyProxy in z in x - type MyProxySym0 = MyProxy - type Let0123456789876543210ZSym0 = Let0123456789876543210Z - type family Let0123456789876543210Z :: MyProxy a where + type MyProxySym0 = MyProxy :: MyProxy (a :: Type) + type Let0123456789876543210ZSym0 = + Let0123456789876543210Z :: MyProxy a + type Let0123456789876543210Z :: MyProxy a + type family Let0123456789876543210Z where Let0123456789876543210Z = MyProxySym0 type Let0123456789876543210XSym0 = Let0123456789876543210X type family Let0123456789876543210X where Let0123456789876543210X = Let0123456789876543210ZSym0 - instance SuppressUnusedWarnings FSym0 where - suppressUnusedWarnings = snd (((,) FSym0KindInference) ()) data FSym0 a0123456789876543210 where - FSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FSym0 arg) (FSym1 arg) => + FSym0KindInference :: SameKind (Apply FSym0 arg) (FSym1 arg) => FSym0 a0123456789876543210 type instance Apply FSym0 a0123456789876543210 = FSym1 a0123456789876543210 + instance SuppressUnusedWarnings FSym0 where + suppressUnusedWarnings = snd (((,) FSym0KindInference) ()) type FSym1 a0123456789876543210 = F a0123456789876543210 type family F a where F MyProxy = Let0123456789876543210XSym0 @@ -48,7 +49,7 @@ Singletons/T297.hs:(0,0)-(0,0): Splicing declarations in sX instance SingI FSym0 where sing = (singFun1 @FSym0) sF - data SMyProxy :: forall a. MyProxy a -> Type + data SMyProxy :: forall a. MyProxy (a :: Type) -> Type where SMyProxy :: forall (a :: Type). SMyProxy (MyProxy :: MyProxy (a :: Type)) diff --git a/tests/compile-and-dump/Singletons/T312.golden b/tests/compile-and-dump/Singletons/T312.golden index 5b8ff299..77175b10 100644 --- a/tests/compile-and-dump/Singletons/T312.golden +++ b/tests/compile-and-dump/Singletons/T312.golden @@ -19,149 +19,124 @@ Singletons/T312.hs:(0,0)-(0,0): Splicing declarations where h :: forall c. c -> b -> b h _ x = x + type BarSym0 :: forall a b. (~>) a ((~>) b b) + data BarSym0 a0123456789876543210 + where + BarSym0KindInference :: SameKind (Apply BarSym0 arg) (BarSym1 arg) => + BarSym0 a0123456789876543210 + type instance Apply BarSym0 a0123456789876543210 = BarSym1 a0123456789876543210 instance SuppressUnusedWarnings BarSym0 where suppressUnusedWarnings = snd (((,) BarSym0KindInference) ()) - data BarSym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210) + type BarSym1 :: forall a b. a -> (~>) b b + data BarSym1 a0123456789876543210 a0123456789876543210 where - BarSym0KindInference :: forall arg0123456789876543210 - arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) => - BarSym0 arg0123456789876543210 - type instance Apply BarSym0 arg0123456789876543210 = BarSym1 arg0123456789876543210 - instance SuppressUnusedWarnings (BarSym1 arg0123456789876543210) where + BarSym1KindInference :: SameKind (Apply (BarSym1 a0123456789876543210) arg) (BarSym2 a0123456789876543210 arg) => + BarSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (BarSym1 a0123456789876543210) a0123456789876543210 = BarSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (BarSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) BarSym1KindInference) ()) - data BarSym1 (arg0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 b0123456789876543210 + type BarSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Bar a0123456789876543210 a0123456789876543210 :: b + type BazSym0 :: forall a b. (~>) a ((~>) b b) + data BazSym0 a0123456789876543210 where - BarSym1KindInference :: forall arg0123456789876543210 - arg0123456789876543210 - arg. SameKind (Apply (BarSym1 arg0123456789876543210) arg) (BarSym2 arg0123456789876543210 arg) => - BarSym1 arg0123456789876543210 arg0123456789876543210 - type instance Apply (BarSym1 arg0123456789876543210) arg0123456789876543210 = BarSym2 arg0123456789876543210 arg0123456789876543210 - type BarSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: b0123456789876543210) = - Bar arg0123456789876543210 arg0123456789876543210 + BazSym0KindInference :: SameKind (Apply BazSym0 arg) (BazSym1 arg) => + BazSym0 a0123456789876543210 + type instance Apply BazSym0 a0123456789876543210 = BazSym1 a0123456789876543210 instance SuppressUnusedWarnings BazSym0 where suppressUnusedWarnings = snd (((,) BazSym0KindInference) ()) - data BazSym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210) + type BazSym1 :: forall a b. a -> (~>) b b + data BazSym1 a0123456789876543210 a0123456789876543210 where - BazSym0KindInference :: forall arg0123456789876543210 - arg. SameKind (Apply BazSym0 arg) (BazSym1 arg) => - BazSym0 arg0123456789876543210 - type instance Apply BazSym0 arg0123456789876543210 = BazSym1 arg0123456789876543210 - instance SuppressUnusedWarnings (BazSym1 arg0123456789876543210) where + BazSym1KindInference :: SameKind (Apply (BazSym1 a0123456789876543210) arg) (BazSym2 a0123456789876543210 arg) => + BazSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (BazSym1 a0123456789876543210) a0123456789876543210 = BazSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (BazSym1 a0123456789876543210) 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 = BazSym2 arg0123456789876543210 arg0123456789876543210 - type BazSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: b0123456789876543210) = - Baz arg0123456789876543210 arg0123456789876543210 - type family Bar_0123456789876543210 (a :: a) (a :: b) :: b where + type BazSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Baz a0123456789876543210 a0123456789876543210 :: b + type Bar_0123456789876543210 :: a -> b -> b + type family Bar_0123456789876543210 a a where Bar_0123456789876543210 _ x = x - instance SuppressUnusedWarnings Bar_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Bar_0123456789876543210Sym0KindInference) ()) - data Bar_0123456789876543210Sym0 :: forall a0123456789876543210 - b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210) + type Bar_0123456789876543210Sym0 :: (~>) a ((~>) b b) + data Bar_0123456789876543210Sym0 a0123456789876543210 where - Bar_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Bar_0123456789876543210Sym0 arg) (Bar_0123456789876543210Sym1 arg) => + Bar_0123456789876543210Sym0KindInference :: SameKind (Apply Bar_0123456789876543210Sym0 arg) (Bar_0123456789876543210Sym1 arg) => Bar_0123456789876543210Sym0 a0123456789876543210 type instance Apply Bar_0123456789876543210Sym0 a0123456789876543210 = Bar_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Bar_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Bar_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Bar_0123456789876543210Sym1KindInference) ()) - data Bar_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 b0123456789876543210 + = snd (((,) Bar_0123456789876543210Sym0KindInference) ()) + type Bar_0123456789876543210Sym1 :: a -> (~>) b b + data Bar_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Bar_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Bar_0123456789876543210Sym1 a0123456789876543210) arg) (Bar_0123456789876543210Sym2 a0123456789876543210 arg) => + Bar_0123456789876543210Sym1KindInference :: SameKind (Apply (Bar_0123456789876543210Sym1 a0123456789876543210) arg) (Bar_0123456789876543210Sym2 a0123456789876543210 arg) => Bar_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Bar_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Bar_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - type Bar_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - Bar_0123456789876543210 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings Let0123456789876543210HSym0 where + instance SuppressUnusedWarnings (Bar_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) Let0123456789876543210HSym0KindInference) ()) + = snd (((,) Bar_0123456789876543210Sym1KindInference) ()) + type Bar_0123456789876543210Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Bar_0123456789876543210 a0123456789876543210 a0123456789876543210 :: b data Let0123456789876543210HSym0 a_01234567898765432100123456789876543210 where - Let0123456789876543210HSym0KindInference :: forall a_01234567898765432100123456789876543210 - arg. SameKind (Apply Let0123456789876543210HSym0 arg) (Let0123456789876543210HSym1 arg) => + Let0123456789876543210HSym0KindInference :: SameKind (Apply Let0123456789876543210HSym0 arg) (Let0123456789876543210HSym1 arg) => Let0123456789876543210HSym0 a_01234567898765432100123456789876543210 type instance Apply Let0123456789876543210HSym0 a_01234567898765432100123456789876543210 = Let0123456789876543210HSym1 a_01234567898765432100123456789876543210 - instance SuppressUnusedWarnings (Let0123456789876543210HSym1 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings Let0123456789876543210HSym0 where suppressUnusedWarnings - = snd (((,) Let0123456789876543210HSym1KindInference) ()) + = snd (((,) Let0123456789876543210HSym0KindInference) ()) data Let0123456789876543210HSym1 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 where - Let0123456789876543210HSym1KindInference :: forall a_01234567898765432100123456789876543210 - a_01234567898765432100123456789876543210 - arg. SameKind (Apply (Let0123456789876543210HSym1 a_01234567898765432100123456789876543210) arg) (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 arg) => + Let0123456789876543210HSym1KindInference :: 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 (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where + instance SuppressUnusedWarnings (Let0123456789876543210HSym1 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Let0123456789876543210HSym2KindInference) ()) - data Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 :: forall c0123456789876543210 - b0123456789876543210. - (~>) c0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210) + = snd (((,) Let0123456789876543210HSym1KindInference) ()) + data Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 :: (~>) 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) => + Let0123456789876543210HSym2KindInference :: 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 (Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (Let0123456789876543210HSym2 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210) where suppressUnusedWarnings - = snd (((,) Let0123456789876543210HSym3KindInference) ()) - data Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 (a0123456789876543210 :: c0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 b0123456789876543210 + = snd (((,) Let0123456789876543210HSym2KindInference) ()) + data Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 (a0123456789876543210 :: c0123456789876543210) :: (~>) 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) => + Let0123456789876543210HSym3KindInference :: 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 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210) a0123456789876543210 = Let0123456789876543210HSym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Let0123456789876543210HSym3 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Let0123456789876543210HSym3KindInference) ()) type Let0123456789876543210HSym4 a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 (a0123456789876543210 :: c0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - Let0123456789876543210H a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210 a0123456789876543210 + Let0123456789876543210H a_01234567898765432100123456789876543210 a_01234567898765432100123456789876543210 a0123456789876543210 a0123456789876543210 :: b0123456789876543210 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 + type Baz_0123456789876543210 :: a -> b -> b + type family Baz_0123456789876543210 a a where Baz_0123456789876543210 a_0123456789876543210 a_0123456789876543210 = Apply (Apply (Let0123456789876543210HSym2 a_0123456789876543210 a_0123456789876543210) a_0123456789876543210) a_0123456789876543210 - instance SuppressUnusedWarnings Baz_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Baz_0123456789876543210Sym0KindInference) ()) - data Baz_0123456789876543210Sym0 :: forall a0123456789876543210 - b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 b0123456789876543210) + type Baz_0123456789876543210Sym0 :: (~>) a ((~>) b b) + data Baz_0123456789876543210Sym0 a0123456789876543210 where - Baz_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Baz_0123456789876543210Sym0 arg) (Baz_0123456789876543210Sym1 arg) => + Baz_0123456789876543210Sym0KindInference :: SameKind (Apply Baz_0123456789876543210Sym0 arg) (Baz_0123456789876543210Sym1 arg) => Baz_0123456789876543210Sym0 a0123456789876543210 type instance Apply Baz_0123456789876543210Sym0 a0123456789876543210 = Baz_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (Baz_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings Baz_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Baz_0123456789876543210Sym1KindInference) ()) - data Baz_0123456789876543210Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 b0123456789876543210 + = snd (((,) Baz_0123456789876543210Sym0KindInference) ()) + type Baz_0123456789876543210Sym1 :: a -> (~>) b b + data Baz_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Baz_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Baz_0123456789876543210Sym1 a0123456789876543210) arg) (Baz_0123456789876543210Sym2 a0123456789876543210 arg) => + Baz_0123456789876543210Sym1KindInference :: SameKind (Apply (Baz_0123456789876543210Sym1 a0123456789876543210) arg) (Baz_0123456789876543210Sym2 a0123456789876543210 arg) => Baz_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Baz_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Baz_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 - type Baz_0123456789876543210Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - Baz_0123456789876543210 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (Baz_0123456789876543210Sym1 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) Baz_0123456789876543210Sym1KindInference) ()) + type Baz_0123456789876543210Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Baz_0123456789876543210 a0123456789876543210 a0123456789876543210 :: b class PFoo a where type Bar (arg :: a) (arg :: b) :: b type Baz (arg :: a) (arg :: b) :: b diff --git a/tests/compile-and-dump/Singletons/T313.golden b/tests/compile-and-dump/Singletons/T313.golden index cff515db..d8a68eca 100644 --- a/tests/compile-and-dump/Singletons/T313.golden +++ b/tests/compile-and-dump/Singletons/T313.golden @@ -22,42 +22,38 @@ Singletons/T313.hs:(0,0)-(0,0): Splicing declarations type PFoo4 a = Maybe a instance PC a where type PFoo4 a = Maybe a - instance SuppressUnusedWarnings PFoo1Sym0 where - suppressUnusedWarnings = snd (((,) PFoo1Sym0KindInference) ()) data PFoo1Sym0 a0123456789876543210 where - PFoo1Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply PFoo1Sym0 arg) (PFoo1Sym1 arg) => + PFoo1Sym0KindInference :: SameKind (Apply PFoo1Sym0 arg) (PFoo1Sym1 arg) => PFoo1Sym0 a0123456789876543210 type instance Apply PFoo1Sym0 a0123456789876543210 = PFoo1Sym1 a0123456789876543210 + instance SuppressUnusedWarnings PFoo1Sym0 where + suppressUnusedWarnings = snd (((,) PFoo1Sym0KindInference) ()) type PFoo1Sym1 a0123456789876543210 = PFoo1 a0123456789876543210 - instance SuppressUnusedWarnings PFoo3Sym0 where - suppressUnusedWarnings = snd (((,) PFoo3Sym0KindInference) ()) data PFoo3Sym0 a0123456789876543210 where - PFoo3Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply PFoo3Sym0 arg) (PFoo3Sym1 arg) => + PFoo3Sym0KindInference :: SameKind (Apply PFoo3Sym0 arg) (PFoo3Sym1 arg) => PFoo3Sym0 a0123456789876543210 type instance Apply PFoo3Sym0 a0123456789876543210 = PFoo3Sym1 a0123456789876543210 + instance SuppressUnusedWarnings PFoo3Sym0 where + suppressUnusedWarnings = snd (((,) PFoo3Sym0KindInference) ()) type PFoo3Sym1 a0123456789876543210 = PFoo3 a0123456789876543210 - instance SuppressUnusedWarnings PFoo2Sym0 where - suppressUnusedWarnings = snd (((,) PFoo2Sym0KindInference) ()) data PFoo2Sym0 :: (~>) Type Type where - PFoo2Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply PFoo2Sym0 arg) (PFoo2Sym1 arg) => + PFoo2Sym0KindInference :: SameKind (Apply PFoo2Sym0 arg) (PFoo2Sym1 arg) => PFoo2Sym0 a0123456789876543210 type instance Apply PFoo2Sym0 a0123456789876543210 = PFoo2Sym1 a0123456789876543210 + instance SuppressUnusedWarnings PFoo2Sym0 where + suppressUnusedWarnings = snd (((,) PFoo2Sym0KindInference) ()) type PFoo2Sym1 (a0123456789876543210 :: Type) = - PFoo2 a0123456789876543210 - instance SuppressUnusedWarnings PFoo4Sym0 where - suppressUnusedWarnings = snd (((,) PFoo4Sym0KindInference) ()) - data PFoo4Sym0 :: (~>) Type Type + PFoo2 a0123456789876543210 :: Type + data PFoo4Sym0 a0123456789876543210 where - PFoo4Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply PFoo4Sym0 arg) (PFoo4Sym1 arg) => + PFoo4Sym0KindInference :: SameKind (Apply PFoo4Sym0 arg) (PFoo4Sym1 arg) => PFoo4Sym0 a0123456789876543210 type instance Apply PFoo4Sym0 a0123456789876543210 = PFoo4Sym1 a0123456789876543210 + instance SuppressUnusedWarnings PFoo4Sym0 where + suppressUnusedWarnings = snd (((,) PFoo4Sym0KindInference) ()) type PFoo4Sym1 (a0123456789876543210 :: Type) = PFoo4 a0123456789876543210 class PPC (a :: Type) @@ -86,42 +82,38 @@ Singletons/T313.hs:(0,0)-(0,0): Splicing declarations type SFoo4 a = Maybe a instance SC a where type SFoo4 a = Maybe a - instance SuppressUnusedWarnings SFoo1Sym0 where - suppressUnusedWarnings = snd (((,) SFoo1Sym0KindInference) ()) data SFoo1Sym0 a0123456789876543210 where - SFoo1Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply SFoo1Sym0 arg) (SFoo1Sym1 arg) => + SFoo1Sym0KindInference :: SameKind (Apply SFoo1Sym0 arg) (SFoo1Sym1 arg) => SFoo1Sym0 a0123456789876543210 type instance Apply SFoo1Sym0 a0123456789876543210 = SFoo1Sym1 a0123456789876543210 + instance SuppressUnusedWarnings SFoo1Sym0 where + suppressUnusedWarnings = snd (((,) SFoo1Sym0KindInference) ()) type SFoo1Sym1 a0123456789876543210 = SFoo1 a0123456789876543210 - instance SuppressUnusedWarnings SFoo3Sym0 where - suppressUnusedWarnings = snd (((,) SFoo3Sym0KindInference) ()) data SFoo3Sym0 a0123456789876543210 where - SFoo3Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply SFoo3Sym0 arg) (SFoo3Sym1 arg) => + SFoo3Sym0KindInference :: SameKind (Apply SFoo3Sym0 arg) (SFoo3Sym1 arg) => SFoo3Sym0 a0123456789876543210 type instance Apply SFoo3Sym0 a0123456789876543210 = SFoo3Sym1 a0123456789876543210 + instance SuppressUnusedWarnings SFoo3Sym0 where + suppressUnusedWarnings = snd (((,) SFoo3Sym0KindInference) ()) type SFoo3Sym1 a0123456789876543210 = SFoo3 a0123456789876543210 - instance SuppressUnusedWarnings SFoo2Sym0 where - suppressUnusedWarnings = snd (((,) SFoo2Sym0KindInference) ()) data SFoo2Sym0 :: (~>) Type Type where - SFoo2Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply SFoo2Sym0 arg) (SFoo2Sym1 arg) => + SFoo2Sym0KindInference :: SameKind (Apply SFoo2Sym0 arg) (SFoo2Sym1 arg) => SFoo2Sym0 a0123456789876543210 type instance Apply SFoo2Sym0 a0123456789876543210 = SFoo2Sym1 a0123456789876543210 + instance SuppressUnusedWarnings SFoo2Sym0 where + suppressUnusedWarnings = snd (((,) SFoo2Sym0KindInference) ()) type SFoo2Sym1 (a0123456789876543210 :: Type) = - SFoo2 a0123456789876543210 - instance SuppressUnusedWarnings SFoo4Sym0 where - suppressUnusedWarnings = snd (((,) SFoo4Sym0KindInference) ()) - data SFoo4Sym0 :: (~>) Type Type + SFoo2 a0123456789876543210 :: Type + data SFoo4Sym0 a0123456789876543210 where - SFoo4Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply SFoo4Sym0 arg) (SFoo4Sym1 arg) => + SFoo4Sym0KindInference :: SameKind (Apply SFoo4Sym0 arg) (SFoo4Sym1 arg) => SFoo4Sym0 a0123456789876543210 type instance Apply SFoo4Sym0 a0123456789876543210 = SFoo4Sym1 a0123456789876543210 + instance SuppressUnusedWarnings SFoo4Sym0 where + suppressUnusedWarnings = snd (((,) SFoo4Sym0KindInference) ()) type SFoo4Sym1 (a0123456789876543210 :: Type) = SFoo4 a0123456789876543210 class PSC (a :: Type) diff --git a/tests/compile-and-dump/Singletons/T316.golden b/tests/compile-and-dump/Singletons/T316.golden index 46240460..74f6140b 100644 --- a/tests/compile-and-dump/Singletons/T316.golden +++ b/tests/compile-and-dump/Singletons/T316.golden @@ -3,38 +3,38 @@ Singletons/T316.hs:(0,0)-(0,0): Splicing declarations [d| replaceAllGTypes :: (a -> Type -> a) -> [Type] -> [a] -> [a] replaceAllGTypes f types as = zipWith f as types |] ======> - instance SuppressUnusedWarnings ReplaceAllGTypesSym0 where - suppressUnusedWarnings - = snd (((,) ReplaceAllGTypesSym0KindInference) ()) - data ReplaceAllGTypesSym0 :: forall a0123456789876543210. - (~>) ((~>) a0123456789876543210 ((~>) Type a0123456789876543210)) ((~>) [Type] ((~>) [a0123456789876543210] [a0123456789876543210])) + type ReplaceAllGTypesSym0 :: (~>) ((~>) a ((~>) Type a)) ((~>) [Type] ((~>) [a] [a])) + data ReplaceAllGTypesSym0 a0123456789876543210 where - ReplaceAllGTypesSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ReplaceAllGTypesSym0 arg) (ReplaceAllGTypesSym1 arg) => + ReplaceAllGTypesSym0KindInference :: SameKind (Apply ReplaceAllGTypesSym0 arg) (ReplaceAllGTypesSym1 arg) => ReplaceAllGTypesSym0 a0123456789876543210 type instance Apply ReplaceAllGTypesSym0 a0123456789876543210 = ReplaceAllGTypesSym1 a0123456789876543210 - instance SuppressUnusedWarnings (ReplaceAllGTypesSym1 a0123456789876543210) where + instance SuppressUnusedWarnings ReplaceAllGTypesSym0 where suppressUnusedWarnings - = snd (((,) ReplaceAllGTypesSym1KindInference) ()) - data ReplaceAllGTypesSym1 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) Type a0123456789876543210)) :: (~>) [Type] ((~>) [a0123456789876543210] [a0123456789876543210]) + = snd (((,) ReplaceAllGTypesSym0KindInference) ()) + type ReplaceAllGTypesSym1 :: (~>) a ((~>) Type a) + -> (~>) [Type] ((~>) [a] [a]) + data ReplaceAllGTypesSym1 a0123456789876543210 a0123456789876543210 where - ReplaceAllGTypesSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ReplaceAllGTypesSym1 a0123456789876543210) arg) (ReplaceAllGTypesSym2 a0123456789876543210 arg) => + ReplaceAllGTypesSym1KindInference :: SameKind (Apply (ReplaceAllGTypesSym1 a0123456789876543210) arg) (ReplaceAllGTypesSym2 a0123456789876543210 arg) => ReplaceAllGTypesSym1 a0123456789876543210 a0123456789876543210 type instance Apply (ReplaceAllGTypesSym1 a0123456789876543210) a0123456789876543210 = ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210 - instance SuppressUnusedWarnings (ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ReplaceAllGTypesSym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ReplaceAllGTypesSym2KindInference) ()) - data ReplaceAllGTypesSym2 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) Type a0123456789876543210)) (a0123456789876543210 :: [Type]) :: (~>) [a0123456789876543210] [a0123456789876543210] + = snd (((,) ReplaceAllGTypesSym1KindInference) ()) + type ReplaceAllGTypesSym2 :: (~>) a ((~>) Type a) + -> [Type] -> (~>) [a] [a] + data ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ReplaceAllGTypesSym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210) arg) (ReplaceAllGTypesSym3 a0123456789876543210 a0123456789876543210 arg) => + ReplaceAllGTypesSym2KindInference :: SameKind (Apply (ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210) arg) (ReplaceAllGTypesSym3 a0123456789876543210 a0123456789876543210 arg) => ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 type instance Apply (ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210) a0123456789876543210 = ReplaceAllGTypesSym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 - type ReplaceAllGTypesSym3 (a0123456789876543210 :: (~>) a0123456789876543210 ((~>) Type a0123456789876543210)) (a0123456789876543210 :: [Type]) (a0123456789876543210 :: [a0123456789876543210]) = - ReplaceAllGTypes a0123456789876543210 a0123456789876543210 a0123456789876543210 - type family ReplaceAllGTypes (a :: (~>) a ((~>) Type a)) (a :: [Type]) (a :: [a]) :: [a] where + instance SuppressUnusedWarnings (ReplaceAllGTypesSym2 a0123456789876543210 a0123456789876543210) where + suppressUnusedWarnings + = snd (((,) ReplaceAllGTypesSym2KindInference) ()) + type ReplaceAllGTypesSym3 (a0123456789876543210 :: (~>) a ((~>) Type a)) (a0123456789876543210 :: [Type]) (a0123456789876543210 :: [a]) = + ReplaceAllGTypes a0123456789876543210 a0123456789876543210 a0123456789876543210 :: [a] + type ReplaceAllGTypes :: (~>) a ((~>) Type a) + -> [Type] -> [a] -> [a] + type family ReplaceAllGTypes a a a where ReplaceAllGTypes f types as = Apply (Apply (Apply ZipWithSym0 f) as) types diff --git a/tests/compile-and-dump/Singletons/T322.golden b/tests/compile-and-dump/Singletons/T322.golden index 90e8d220..d74320af 100644 --- a/tests/compile-and-dump/Singletons/T322.golden +++ b/tests/compile-and-dump/Singletons/T322.golden @@ -8,29 +8,29 @@ Singletons/T322.hs:(0,0)-(0,0): Splicing declarations (!) :: Bool -> Bool -> Bool (!) = (||) infixr 2 ! - instance SuppressUnusedWarnings (!@#@$) where - suppressUnusedWarnings = snd (((,) (:!@#@$###)) ()) - data (!@#@$) :: (~>) Bool ((~>) Bool Bool) + type (!@#@$) :: (~>) Bool ((~>) Bool Bool) + data (!@#@$) a0123456789876543210 where - (:!@#@$###) :: forall a0123456789876543210 - arg. SameKind (Apply (!@#@$) arg) ((!@#@$$) arg) => + (:!@#@$###) :: SameKind (Apply (!@#@$) arg) ((!@#@$$) arg) => (!@#@$) a0123456789876543210 type instance Apply (!@#@$) a0123456789876543210 = (!@#@$$) a0123456789876543210 + instance SuppressUnusedWarnings (!@#@$) where + suppressUnusedWarnings = snd (((,) (:!@#@$###)) ()) infixr 2 !@#@$ - instance SuppressUnusedWarnings ((!@#@$$) a0123456789876543210) where - suppressUnusedWarnings = snd (((,) (:!@#@$$###)) ()) - data (!@#@$$) (a0123456789876543210 :: Bool) :: (~>) Bool Bool + type (!@#@$$) :: Bool -> (~>) Bool Bool + data (!@#@$$) a0123456789876543210 a0123456789876543210 where - (:!@#@$$###) :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply ((!@#@$$) a0123456789876543210) arg) ((!@#@$$$) a0123456789876543210 arg) => + (:!@#@$$###) :: SameKind (Apply ((!@#@$$) a0123456789876543210) arg) ((!@#@$$$) a0123456789876543210 arg) => (!@#@$$) a0123456789876543210 a0123456789876543210 type instance Apply ((!@#@$$) a0123456789876543210) a0123456789876543210 = (!@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((!@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (:!@#@$$###)) ()) infixr 2 !@#@$$ type (!@#@$$$) (a0123456789876543210 :: Bool) (a0123456789876543210 :: Bool) = - (!) a0123456789876543210 a0123456789876543210 + (!) a0123456789876543210 a0123456789876543210 :: Bool infixr 2 !@#@$$$ - type family (!) (a :: Bool) (a :: Bool) :: Bool where + type (!) :: Bool -> Bool -> Bool + type family (!) a a where (!) a_0123456789876543210 a_0123456789876543210 = Apply (Apply (||@#@$) a_0123456789876543210) a_0123456789876543210 infixr 2 %! (%!) :: diff --git a/tests/compile-and-dump/Singletons/T326.golden b/tests/compile-and-dump/Singletons/T326.golden index a1e675b9..cd39b74b 100644 --- a/tests/compile-and-dump/Singletons/T326.golden +++ b/tests/compile-and-dump/Singletons/T326.golden @@ -1,58 +1,56 @@ Singletons/T326.hs:0:0:: Splicing declarations genPromotions [''C1] ======> + type (<%>@#@$) :: forall a. (~>) a ((~>) a a) + data (<%>@#@$) a0123456789876543210 + where + (:<%>@#@$###) :: SameKind (Apply (<%>@#@$) arg) ((<%>@#@$$) arg) => + (<%>@#@$) a0123456789876543210 + type instance Apply (<%>@#@$) a0123456789876543210 = (<%>@#@$$) a0123456789876543210 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 infixl 9 <%>@#@$ - instance SuppressUnusedWarnings ((<%>@#@$$) arg0123456789876543210) where - suppressUnusedWarnings = snd (((,) (:<%>@#@$$###)) ()) - data (<%>@#@$$) (arg0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 a0123456789876543210 + type (<%>@#@$$) :: forall a. a -> (~>) a a + data (<%>@#@$$) a0123456789876543210 a0123456789876543210 where - (:<%>@#@$$###) :: forall arg0123456789876543210 - arg0123456789876543210 - arg. SameKind (Apply ((<%>@#@$$) arg0123456789876543210) arg) ((<%>@#@$$$) arg0123456789876543210 arg) => - (<%>@#@$$) arg0123456789876543210 arg0123456789876543210 - type instance Apply ((<%>@#@$$) arg0123456789876543210) arg0123456789876543210 = (<%>@#@$$$) arg0123456789876543210 arg0123456789876543210 + (:<%>@#@$$###) :: SameKind (Apply ((<%>@#@$$) a0123456789876543210) arg) ((<%>@#@$$$) a0123456789876543210 arg) => + (<%>@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((<%>@#@$$) a0123456789876543210) a0123456789876543210 = (<%>@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((<%>@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (:<%>@#@$$###)) ()) infixl 9 <%>@#@$$ - type (<%>@#@$$$) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) = - (<%>) arg0123456789876543210 arg0123456789876543210 + type (<%>@#@$$$) (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + (<%>) a0123456789876543210 a0123456789876543210 :: a infixl 9 <%>@#@$$$ + type PC1 :: GHC.Types.Type -> Constraint class PC1 (a :: GHC.Types.Type) where type (<%>) (arg :: a) (arg :: a) :: a infixl 9 <%> Singletons/T326.hs:0:0:: Splicing declarations genSingletons [''C2] ======> + type (<%%>@#@$) :: forall a. (~>) a ((~>) a a) + data (<%%>@#@$) a0123456789876543210 + where + (:<%%>@#@$###) :: SameKind (Apply (<%%>@#@$) arg) ((<%%>@#@$$) arg) => + (<%%>@#@$) a0123456789876543210 + type instance Apply (<%%>@#@$) a0123456789876543210 = (<%%>@#@$$) a0123456789876543210 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 infixl 9 <%%>@#@$ - instance SuppressUnusedWarnings ((<%%>@#@$$) arg0123456789876543210) where - suppressUnusedWarnings = snd (((,) (:<%%>@#@$$###)) ()) - data (<%%>@#@$$) (arg0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 a0123456789876543210 + type (<%%>@#@$$) :: forall a. a -> (~>) a a + data (<%%>@#@$$) a0123456789876543210 a0123456789876543210 where - (:<%%>@#@$$###) :: forall arg0123456789876543210 - arg0123456789876543210 - arg. SameKind (Apply ((<%%>@#@$$) arg0123456789876543210) arg) ((<%%>@#@$$$) arg0123456789876543210 arg) => - (<%%>@#@$$) arg0123456789876543210 arg0123456789876543210 - type instance Apply ((<%%>@#@$$) arg0123456789876543210) arg0123456789876543210 = (<%%>@#@$$$) arg0123456789876543210 arg0123456789876543210 + (:<%%>@#@$$###) :: SameKind (Apply ((<%%>@#@$$) a0123456789876543210) arg) ((<%%>@#@$$$) a0123456789876543210 arg) => + (<%%>@#@$$) a0123456789876543210 a0123456789876543210 + type instance Apply ((<%%>@#@$$) a0123456789876543210) a0123456789876543210 = (<%%>@#@$$$) a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ((<%%>@#@$$) a0123456789876543210) where + suppressUnusedWarnings = snd (((,) (:<%%>@#@$$###)) ()) infixl 9 <%%>@#@$$ - type (<%%>@#@$$$) (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) = - (<%%>) arg0123456789876543210 arg0123456789876543210 + type (<%%>@#@$$$) (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + (<%%>) a0123456789876543210 a0123456789876543210 :: a infixl 9 <%%>@#@$$$ + type PC2 :: GHC.Types.Type -> Constraint class PC2 (a :: GHC.Types.Type) where type (<%%>) (arg :: a) (arg :: a) :: a infixl 9 <%%> @@ -60,6 +58,7 @@ Singletons/T326.hs:0:0:: Splicing declarations (%<%%>) :: forall (t :: a) (t :: a). Sing t -> Sing t -> Sing (Apply (Apply (<%%>@#@$) t) t :: a) + type SC2 :: GHC.Types.Type -> Constraint infixl 9 %<%%> instance SC2 a => SingI ((<%%>@#@$) :: (~>) a ((~>) a a)) where sing = (singFun2 @(<%%>@#@$)) (%<%%>) diff --git a/tests/compile-and-dump/Singletons/T33.golden b/tests/compile-and-dump/Singletons/T33.golden index af2898f8..170eb5e5 100644 --- a/tests/compile-and-dump/Singletons/T33.golden +++ b/tests/compile-and-dump/Singletons/T33.golden @@ -5,17 +5,18 @@ Singletons/T33.hs:(0,0)-(0,0): Splicing declarations ======> foo :: (Bool, Bool) -> () foo ~(_, _) = () - instance SuppressUnusedWarnings FooSym0 where - suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) - data FooSym0 :: (~>) (Bool, Bool) () + type FooSym0 :: (~>) (Bool, Bool) () + data FooSym0 a0123456789876543210 where - FooSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) => + FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) => FooSym0 a0123456789876543210 type instance Apply FooSym0 a0123456789876543210 = FooSym1 a0123456789876543210 + instance SuppressUnusedWarnings FooSym0 where + suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) type FooSym1 (a0123456789876543210 :: (Bool, Bool)) = - Foo a0123456789876543210 - type family Foo (a :: (Bool, Bool)) :: () where + Foo a0123456789876543210 :: () + type Foo :: (Bool, Bool) -> () + type family Foo a where Foo '(_, _) = Tuple0Sym0 sFoo :: forall (t :: (Bool, Bool)). Sing t -> Sing (Apply FooSym0 t :: ()) diff --git a/tests/compile-and-dump/Singletons/T332.golden b/tests/compile-and-dump/Singletons/T332.golden index 5a20f21f..9272c8bc 100644 --- a/tests/compile-and-dump/Singletons/T332.golden +++ b/tests/compile-and-dump/Singletons/T332.golden @@ -8,18 +8,20 @@ Singletons/T332.hs:(0,0)-(0,0): Splicing declarations data Foo = MkFoo f :: Foo -> () f MkFoo {} = () - instance SuppressUnusedWarnings FSym0 where - suppressUnusedWarnings = snd (((,) FSym0KindInference) ()) - data FSym0 :: (~>) Foo () + type FSym0 :: (~>) Foo () + data FSym0 a0123456789876543210 where - FSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FSym0 arg) (FSym1 arg) => + FSym0KindInference :: SameKind (Apply FSym0 arg) (FSym1 arg) => FSym0 a0123456789876543210 type instance Apply FSym0 a0123456789876543210 = FSym1 a0123456789876543210 - type FSym1 (a0123456789876543210 :: Foo) = F a0123456789876543210 - type family F (a :: Foo) :: () where + instance SuppressUnusedWarnings FSym0 where + suppressUnusedWarnings = snd (((,) FSym0KindInference) ()) + type FSym1 (a0123456789876543210 :: Foo) = + F a0123456789876543210 :: () + type F :: Foo -> () + type family F a where F MkFoo = Tuple0Sym0 - type MkFooSym0 = MkFoo + type MkFooSym0 = MkFoo :: Foo Singletons/T332.hs:(0,0)-(0,0): Splicing declarations singletons [d| b :: Bar -> () @@ -30,17 +32,19 @@ Singletons/T332.hs:(0,0)-(0,0): Splicing declarations data Bar = MkBar b :: Bar -> () b MkBar {} = () - type MkBarSym0 = MkBar - instance SuppressUnusedWarnings BSym0 where - suppressUnusedWarnings = snd (((,) BSym0KindInference) ()) - data BSym0 :: (~>) Bar () + type MkBarSym0 = MkBar :: Bar + type BSym0 :: (~>) Bar () + data BSym0 a0123456789876543210 where - BSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply BSym0 arg) (BSym1 arg) => + BSym0KindInference :: SameKind (Apply BSym0 arg) (BSym1 arg) => BSym0 a0123456789876543210 type instance Apply BSym0 a0123456789876543210 = BSym1 a0123456789876543210 - type BSym1 (a0123456789876543210 :: Bar) = B a0123456789876543210 - type family B (a :: Bar) :: () where + instance SuppressUnusedWarnings BSym0 where + suppressUnusedWarnings = snd (((,) BSym0KindInference) ()) + type BSym1 (a0123456789876543210 :: Bar) = + B a0123456789876543210 :: () + type B :: Bar -> () + type family B a where B MkBar = Tuple0Sym0 sB :: forall (t :: Bar). Sing t -> Sing (Apply BSym0 t :: ()) sB SMkBar = STuple0 diff --git a/tests/compile-and-dump/Singletons/T342.golden b/tests/compile-and-dump/Singletons/T342.golden index 928790c5..78765bb6 100644 --- a/tests/compile-and-dump/Singletons/T342.golden +++ b/tests/compile-and-dump/Singletons/T342.golden @@ -6,12 +6,11 @@ Singletons/T342.hs:(0,0)-(0,0): Splicing declarations pure $ syn : defuns ======> type MyId a = a - instance SuppressUnusedWarnings MyIdSym0 where - suppressUnusedWarnings = snd (((,) MyIdSym0KindInference) ()) data MyIdSym0 a0123456789876543210 where - MyIdSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply MyIdSym0 arg) (MyIdSym1 arg) => + MyIdSym0KindInference :: SameKind (Apply MyIdSym0 arg) (MyIdSym1 arg) => MyIdSym0 a0123456789876543210 type instance Apply MyIdSym0 a0123456789876543210 = MyIdSym1 a0123456789876543210 + instance SuppressUnusedWarnings MyIdSym0 where + suppressUnusedWarnings = snd (((,) MyIdSym0KindInference) ()) type MyIdSym1 a0123456789876543210 = MyId a0123456789876543210 diff --git a/tests/compile-and-dump/Singletons/T353.golden b/tests/compile-and-dump/Singletons/T353.golden index 86420b22..4383f5a2 100644 --- a/tests/compile-and-dump/Singletons/T353.golden +++ b/tests/compile-and-dump/Singletons/T353.golden @@ -7,98 +7,81 @@ Singletons/T353.hs:(0,0)-(0,0): Splicing declarations ======> 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 - 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)) + data SymmetrySym0 :: (~>) (Proxy t0123456789876543210) ((~>) (Proxy t0123456789876543210) ((~>) ((:~:) (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) (y0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210))) Type)) where - SymmetrySym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply SymmetrySym0 arg) (SymmetrySym1 arg) => + SymmetrySym0KindInference :: SameKind (Apply SymmetrySym0 arg) (SymmetrySym1 arg) => SymmetrySym0 a0123456789876543210 type instance Apply SymmetrySym0 a0123456789876543210 = SymmetrySym1 a0123456789876543210 - 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) + instance SuppressUnusedWarnings SymmetrySym0 where + suppressUnusedWarnings = snd (((,) SymmetrySym0KindInference) ()) + data SymmetrySym1 (a0123456789876543210 :: 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) => + SymmetrySym1KindInference :: SameKind (Apply (SymmetrySym1 a0123456789876543210) arg) (SymmetrySym2 a0123456789876543210 arg) => SymmetrySym1 a0123456789876543210 y0123456789876543210 type instance Apply (SymmetrySym1 a0123456789876543210) y0123456789876543210 = SymmetrySym2 a0123456789876543210 y0123456789876543210 - instance SuppressUnusedWarnings (SymmetrySym2 a0123456789876543210 y0123456789876543210) where - suppressUnusedWarnings = snd (((,) SymmetrySym2KindInference) ()) - data SymmetrySym2 (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) (y0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) :: (~>) ((:~:) (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) (y0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210))) Type + instance SuppressUnusedWarnings (SymmetrySym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) SymmetrySym1KindInference) ()) + data SymmetrySym2 (a0123456789876543210 :: Proxy t0123456789876543210) (y0123456789876543210 :: Proxy t0123456789876543210) :: (~>) ((:~:) (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) => + SymmetrySym2KindInference :: SameKind (Apply (SymmetrySym2 a0123456789876543210 y0123456789876543210) arg) (SymmetrySym3 a0123456789876543210 y0123456789876543210 arg) => SymmetrySym2 a0123456789876543210 y0123456789876543210 e0123456789876543210 type instance Apply (SymmetrySym2 a0123456789876543210 y0123456789876543210) e0123456789876543210 = SymmetrySym3 a0123456789876543210 y0123456789876543210 e0123456789876543210 + instance SuppressUnusedWarnings (SymmetrySym2 a0123456789876543210 y0123456789876543210) where + suppressUnusedWarnings = snd (((,) SymmetrySym2KindInference) ()) type SymmetrySym3 (a0123456789876543210 :: Proxy t0123456789876543210) (y0123456789876543210 :: Proxy t0123456789876543210) (e0123456789876543210 :: (:~:) (a0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210)) (y0123456789876543210 :: Proxy (t0123456789876543210 :: k0123456789876543210))) = - Symmetry a0123456789876543210 y0123456789876543210 e0123456789876543210 + Symmetry a0123456789876543210 y0123456789876543210 e0123456789876543210 :: Type Singletons/T353.hs:0:0:: Splicing declarations genDefunSymbols [''Prod] ======> + type MkProdSym0 :: forall k + (f :: k -> Type) + (g :: k -> Type) + (p :: k). + (~>) (f p) ((~>) (g p) (Prod (f :: k -> Type) (g :: k + -> Type) (p :: k))) + data MkProdSym0 a0123456789876543210 + where + MkProdSym0KindInference :: SameKind (Apply MkProdSym0 arg) (MkProdSym1 arg) => + MkProdSym0 a0123456789876543210 + type instance Apply MkProdSym0 a0123456789876543210 = MkProdSym1 a0123456789876543210 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))) + type MkProdSym1 :: forall k + (f :: k -> Type) + (g :: k -> Type) + (p :: k). + f p -> (~>) (g p) (Prod (f :: k -> Type) (g :: k -> Type) (p :: k)) + data MkProdSym1 a0123456789876543210 a0123456789876543210 where - MkProdSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply MkProdSym0 arg) (MkProdSym1 arg) => - MkProdSym0 t0123456789876543210 - type instance Apply MkProdSym0 t0123456789876543210 = MkProdSym1 t0123456789876543210 - instance SuppressUnusedWarnings (MkProdSym1 t0123456789876543210) where + MkProdSym1KindInference :: SameKind (Apply (MkProdSym1 a0123456789876543210) arg) (MkProdSym2 a0123456789876543210 arg) => + MkProdSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (MkProdSym1 a0123456789876543210) a0123456789876543210 = MkProdSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (MkProdSym1 a0123456789876543210) 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 = MkProdSym2 t0123456789876543210 t0123456789876543210 - type MkProdSym2 (t0123456789876543210 :: f0123456789876543210 p0123456789876543210) (t0123456789876543210 :: g0123456789876543210 p0123456789876543210) = - 'MkProd t0123456789876543210 t0123456789876543210 + type MkProdSym2 (a0123456789876543210 :: f p) (a0123456789876543210 :: g p) = + 'MkProd a0123456789876543210 a0123456789876543210 :: Prod (f :: k + -> Type) (g :: k + -> Type) (p :: k) Singletons/T353.hs:0:0:: Splicing declarations genDefunSymbols [''Foo] ======> + type MkFooSym0 :: forall k k (a :: k) (b :: k). + (~>) (Proxy a) ((~>) (Proxy b) (Foo (a :: k) (b :: k))) + data MkFooSym0 a0123456789876543210 + where + MkFooSym0KindInference :: SameKind (Apply MkFooSym0 arg) (MkFooSym1 arg) => + MkFooSym0 a0123456789876543210 + type instance Apply MkFooSym0 a0123456789876543210 = MkFooSym1 a0123456789876543210 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))) + type MkFooSym1 :: forall k k (a :: k) (b :: k). + Proxy a -> (~>) (Proxy b) (Foo (a :: k) (b :: k)) + data MkFooSym1 a0123456789876543210 a0123456789876543210 where - MkFooSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply MkFooSym0 arg) (MkFooSym1 arg) => - MkFooSym0 t0123456789876543210 - type instance Apply MkFooSym0 t0123456789876543210 = MkFooSym1 t0123456789876543210 - instance SuppressUnusedWarnings (MkFooSym1 t0123456789876543210) where + MkFooSym1KindInference :: SameKind (Apply (MkFooSym1 a0123456789876543210) arg) (MkFooSym2 a0123456789876543210 arg) => + MkFooSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (MkFooSym1 a0123456789876543210) a0123456789876543210 = MkFooSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (MkFooSym1 a0123456789876543210) 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 = MkFooSym2 t0123456789876543210 t0123456789876543210 - type MkFooSym2 (t0123456789876543210 :: Proxy a0123456789876543210) (t0123456789876543210 :: Proxy b0123456789876543210) = - 'MkFoo t0123456789876543210 t0123456789876543210 + type MkFooSym2 (a0123456789876543210 :: Proxy a) (a0123456789876543210 :: Proxy b) = + 'MkFoo a0123456789876543210 a0123456789876543210 :: Foo (a :: k) (b :: k) diff --git a/tests/compile-and-dump/Singletons/T358.golden b/tests/compile-and-dump/Singletons/T358.golden index 58bef789..85a46fc4 100644 --- a/tests/compile-and-dump/Singletons/T358.golden +++ b/tests/compile-and-dump/Singletons/T358.golden @@ -25,71 +25,67 @@ Singletons/T358.hs:(0,0)-(0,0): Splicing declarations method2b :: forall b. b -> [a] method2a _ = [] method2b _ = [] - type Method1Sym0 = Method1 + type Method1Sym0 = Method1 :: f a class PC1 (f :: k -> Type) where type Method1 :: f a + type Method2aSym0 :: forall b a. (~>) b a + data Method2aSym0 a0123456789876543210 + where + Method2aSym0KindInference :: SameKind (Apply Method2aSym0 arg) (Method2aSym1 arg) => + Method2aSym0 a0123456789876543210 + type instance Apply Method2aSym0 a0123456789876543210 = Method2aSym1 a0123456789876543210 instance SuppressUnusedWarnings Method2aSym0 where suppressUnusedWarnings = snd (((,) Method2aSym0KindInference) ()) - data Method2aSym0 :: forall b0123456789876543210 - a0123456789876543210. - (~>) b0123456789876543210 a0123456789876543210 + type Method2aSym1 (a0123456789876543210 :: b) = + Method2a a0123456789876543210 :: a + type Method2bSym0 :: forall b a. (~>) b a + data Method2bSym0 a0123456789876543210 where - Method2aSym0KindInference :: forall arg0123456789876543210 - arg. SameKind (Apply Method2aSym0 arg) (Method2aSym1 arg) => - Method2aSym0 arg0123456789876543210 - type instance Apply Method2aSym0 arg0123456789876543210 = Method2aSym1 arg0123456789876543210 - type Method2aSym1 (arg0123456789876543210 :: b0123456789876543210) = - Method2a arg0123456789876543210 + Method2bSym0KindInference :: SameKind (Apply Method2bSym0 arg) (Method2bSym1 arg) => + Method2bSym0 a0123456789876543210 + type instance Apply Method2bSym0 a0123456789876543210 = Method2bSym1 a0123456789876543210 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 = Method2bSym1 arg0123456789876543210 - type Method2bSym1 (arg0123456789876543210 :: b0123456789876543210) = - Method2b arg0123456789876543210 + type Method2bSym1 (a0123456789876543210 :: b) = + Method2b a0123456789876543210 :: a class PC2 a where type Method2a (arg :: b) :: a type Method2b (arg :: b) :: a - type family Method1_0123456789876543210 :: [a] where + type Method1_0123456789876543210 :: [a] + type family Method1_0123456789876543210 where Method1_0123456789876543210 = NilSym0 - type Method1_0123456789876543210Sym0 = Method1_0123456789876543210 + type Method1_0123456789876543210Sym0 = + Method1_0123456789876543210 :: [a] instance PC1 [] where type Method1 = Method1_0123456789876543210Sym0 - type family Method2a_0123456789876543210 (a :: b) :: [a] where + type Method2a_0123456789876543210 :: b -> [a] + type family Method2a_0123456789876543210 a where Method2a_0123456789876543210 _ = NilSym0 - instance SuppressUnusedWarnings Method2a_0123456789876543210Sym0 where - suppressUnusedWarnings - = snd (((,) Method2a_0123456789876543210Sym0KindInference) ()) - data Method2a_0123456789876543210Sym0 :: forall b0123456789876543210 - a0123456789876543210. - (~>) b0123456789876543210 [a0123456789876543210] + type Method2a_0123456789876543210Sym0 :: (~>) b [a] + data Method2a_0123456789876543210Sym0 a0123456789876543210 where - Method2a_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Method2a_0123456789876543210Sym0 arg) (Method2a_0123456789876543210Sym1 arg) => + Method2a_0123456789876543210Sym0KindInference :: SameKind (Apply Method2a_0123456789876543210Sym0 arg) (Method2a_0123456789876543210Sym1 arg) => Method2a_0123456789876543210Sym0 a0123456789876543210 type instance Apply Method2a_0123456789876543210Sym0 a0123456789876543210 = Method2a_0123456789876543210Sym1 a0123456789876543210 - type Method2a_0123456789876543210Sym1 (a0123456789876543210 :: b0123456789876543210) = - Method2a_0123456789876543210 a0123456789876543210 - type family Method2b_0123456789876543210 (a :: b) :: [a] where - Method2b_0123456789876543210 _ = NilSym0 - instance SuppressUnusedWarnings Method2b_0123456789876543210Sym0 where + instance SuppressUnusedWarnings Method2a_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) Method2b_0123456789876543210Sym0KindInference) ()) - data Method2b_0123456789876543210Sym0 :: forall b0123456789876543210 - a0123456789876543210. - (~>) b0123456789876543210 [a0123456789876543210] + = snd (((,) Method2a_0123456789876543210Sym0KindInference) ()) + type Method2a_0123456789876543210Sym1 (a0123456789876543210 :: b) = + Method2a_0123456789876543210 a0123456789876543210 :: [a] + type Method2b_0123456789876543210 :: b -> [a] + type family Method2b_0123456789876543210 a where + Method2b_0123456789876543210 _ = NilSym0 + type Method2b_0123456789876543210Sym0 :: (~>) b [a] + data Method2b_0123456789876543210Sym0 a0123456789876543210 where - Method2b_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Method2b_0123456789876543210Sym0 arg) (Method2b_0123456789876543210Sym1 arg) => + Method2b_0123456789876543210Sym0KindInference :: SameKind (Apply Method2b_0123456789876543210Sym0 arg) (Method2b_0123456789876543210Sym1 arg) => Method2b_0123456789876543210Sym0 a0123456789876543210 type instance Apply Method2b_0123456789876543210Sym0 a0123456789876543210 = Method2b_0123456789876543210Sym1 a0123456789876543210 - type Method2b_0123456789876543210Sym1 (a0123456789876543210 :: b0123456789876543210) = - Method2b_0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings Method2b_0123456789876543210Sym0 where + suppressUnusedWarnings + = snd (((,) Method2b_0123456789876543210Sym0KindInference) ()) + type Method2b_0123456789876543210Sym1 (a0123456789876543210 :: b) = + Method2b_0123456789876543210 a0123456789876543210 :: [a] instance PC2 [a] where type Method2a a = Apply Method2a_0123456789876543210Sym0 a type Method2b a = Apply Method2b_0123456789876543210Sym0 a diff --git a/tests/compile-and-dump/Singletons/T367.golden b/tests/compile-and-dump/Singletons/T367.golden index 9971e97e..b9381169 100644 --- a/tests/compile-and-dump/Singletons/T367.golden +++ b/tests/compile-and-dump/Singletons/T367.golden @@ -3,31 +3,28 @@ Singletons/T367.hs:(0,0)-(0,0): Splicing declarations [d| const' :: a -> b -> a const' x _ = x |] ======> - instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Const'Sym0 where - Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings - = snd (((,) Const'Sym0KindInference) ()) - data Const'Sym0 :: forall a0123456789876543210 - b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210) + type Const'Sym0 :: (~>) a ((~>) b a) + data Const'Sym0 a0123456789876543210 where - Const'Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Const'Sym0 arg) (Const'Sym1 arg) => + Const'Sym0KindInference :: SameKind (Apply Const'Sym0 arg) (Const'Sym1 arg) => Const'Sym0 a0123456789876543210 type instance Apply Const'Sym0 a0123456789876543210 = Const'Sym1 a0123456789876543210 - instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Const'Sym1 a0123456789876543210) where + instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Const'Sym0 where Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings - = snd (((,) Const'Sym1KindInference) ()) - data Const'Sym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 a0123456789876543210 + = snd (((,) Const'Sym0KindInference) ()) + type Const'Sym1 :: a -> (~>) b a + data Const'Sym1 a0123456789876543210 a0123456789876543210 where - Const'Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Const'Sym1 a0123456789876543210) arg) (Const'Sym2 a0123456789876543210 arg) => + Const'Sym1KindInference :: SameKind (Apply (Const'Sym1 a0123456789876543210) arg) (Const'Sym2 a0123456789876543210 arg) => Const'Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Const'Sym1 a0123456789876543210) a0123456789876543210 = Const'Sym2 a0123456789876543210 a0123456789876543210 - type Const'Sym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - Const' a0123456789876543210 a0123456789876543210 - type family Const' (a :: a) (a :: b) :: a where + instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Const'Sym1 a0123456789876543210) where + Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings + = snd (((,) Const'Sym1KindInference) ()) + type Const'Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + Const' a0123456789876543210 a0123456789876543210 :: a + type Const' :: a -> b -> a + type family Const' a a where Const' x _ = x sConst' :: forall a b (t :: a) (t :: b). diff --git a/tests/compile-and-dump/Singletons/T371.golden b/tests/compile-and-dump/Singletons/T371.golden index 8067c5b0..bf844916 100644 --- a/tests/compile-and-dump/Singletons/T371.golden +++ b/tests/compile-and-dump/Singletons/T371.golden @@ -13,109 +13,105 @@ Singletons/T371.hs:(0,0)-(0,0): Splicing declarations data Y (a :: Type) = Y1 | Y2 (X a) deriving Show - type X1Sym0 = X1 + type X1Sym0 = X1 :: X (a :: Type) + type X2Sym0 :: forall (a :: Type). (~>) (Y a) (X (a :: Type)) + data X2Sym0 a0123456789876543210 + where + X2Sym0KindInference :: SameKind (Apply X2Sym0 arg) (X2Sym1 arg) => + X2Sym0 a0123456789876543210 + type instance Apply X2Sym0 a0123456789876543210 = X2Sym1 a0123456789876543210 instance SuppressUnusedWarnings X2Sym0 where suppressUnusedWarnings = snd (((,) X2Sym0KindInference) ()) - data X2Sym0 :: forall (a0123456789876543210 :: Type). - (~>) (Y a0123456789876543210) (X (a0123456789876543210 :: Type)) + type X2Sym1 (a0123456789876543210 :: Y a) = + X2 a0123456789876543210 :: X (a :: Type) + type Y1Sym0 = Y1 :: Y (a :: Type) + type Y2Sym0 :: forall (a :: Type). (~>) (X a) (Y (a :: Type)) + data Y2Sym0 a0123456789876543210 where - X2Sym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply X2Sym0 arg) (X2Sym1 arg) => - X2Sym0 t0123456789876543210 - type instance Apply X2Sym0 t0123456789876543210 = X2Sym1 t0123456789876543210 - type X2Sym1 (t0123456789876543210 :: Y a0123456789876543210) = - X2 t0123456789876543210 - type Y1Sym0 = Y1 + Y2Sym0KindInference :: SameKind (Apply Y2Sym0 arg) (Y2Sym1 arg) => + Y2Sym0 a0123456789876543210 + type instance Apply Y2Sym0 a0123456789876543210 = Y2Sym1 a0123456789876543210 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 = Y2Sym1 t0123456789876543210 - type Y2Sym1 (t0123456789876543210 :: X a0123456789876543210) = - Y2 t0123456789876543210 - type family ShowsPrec_0123456789876543210 (a :: GHC.Types.Nat) (a :: X a) (a :: GHC.Types.Symbol) :: GHC.Types.Symbol where + type Y2Sym1 (a0123456789876543210 :: X a) = + Y2 a0123456789876543210 :: Y (a :: Type) + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> X a -> GHC.Types.Symbol -> GHC.Types.Symbol + type family ShowsPrec_0123456789876543210 a a a 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 - 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)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) (X a) ((~>) GHC.Types.Symbol GHC.Types.Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210. - (~>) (X a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) (X a) ((~>) GHC.Types.Symbol GHC.Types.Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: X a0123456789876543210) :: (~>) GHC.Types.Symbol GHC.Types.Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> X a -> (~>) GHC.Types.Symbol GHC.Types.Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 - 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) ()) + type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: X a) (a0123456789876543210 :: GHC.Types.Symbol) = + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: GHC.Types.Symbol 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 + type ShowsPrec_0123456789876543210 :: GHC.Types.Nat + -> Y a -> GHC.Types.Symbol -> GHC.Types.Symbol + type family ShowsPrec_0123456789876543210 a a a 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 - 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)) + type ShowsPrec_0123456789876543210Sym0 :: (~>) GHC.Types.Nat ((~>) (Y a) ((~>) GHC.Types.Symbol GHC.Types.Symbol)) + data ShowsPrec_0123456789876543210Sym0 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => + ShowsPrec_0123456789876543210Sym0KindInference :: SameKind (Apply ShowsPrec_0123456789876543210Sym0 arg) (ShowsPrec_0123456789876543210Sym1 arg) => ShowsPrec_0123456789876543210Sym0 a0123456789876543210 type instance Apply ShowsPrec_0123456789876543210Sym0 a0123456789876543210 = ShowsPrec_0123456789876543210Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where + instance SuppressUnusedWarnings ShowsPrec_0123456789876543210Sym0 where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) - data ShowsPrec_0123456789876543210Sym1 (a0123456789876543210 :: GHC.Types.Nat) :: forall a0123456789876543210. - (~>) (Y a0123456789876543210) ((~>) GHC.Types.Symbol GHC.Types.Symbol) + = snd (((,) ShowsPrec_0123456789876543210Sym0KindInference) ()) + type ShowsPrec_0123456789876543210Sym1 :: GHC.Types.Nat + -> (~>) (Y a) ((~>) GHC.Types.Symbol GHC.Types.Symbol) + data ShowsPrec_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym1KindInference :: 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_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) where + instance SuppressUnusedWarnings (ShowsPrec_0123456789876543210Sym1 a0123456789876543210) where suppressUnusedWarnings - = snd (((,) ShowsPrec_0123456789876543210Sym2KindInference) ()) - data ShowsPrec_0123456789876543210Sym2 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Y a0123456789876543210) :: (~>) GHC.Types.Symbol GHC.Types.Symbol + = snd (((,) ShowsPrec_0123456789876543210Sym1KindInference) ()) + type ShowsPrec_0123456789876543210Sym2 :: GHC.Types.Nat + -> Y a -> (~>) GHC.Types.Symbol GHC.Types.Symbol + data ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 a0123456789876543210 where - ShowsPrec_0123456789876543210Sym2KindInference :: forall a0123456789876543210 - a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ShowsPrec_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210) arg) (ShowsPrec_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 arg) => + ShowsPrec_0123456789876543210Sym2KindInference :: 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_0123456789876543210Sym3 a0123456789876543210 a0123456789876543210 a0123456789876543210 - 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) ()) + type ShowsPrec_0123456789876543210Sym3 (a0123456789876543210 :: GHC.Types.Nat) (a0123456789876543210 :: Y a) (a0123456789876543210 :: GHC.Types.Symbol) = + ShowsPrec_0123456789876543210 a0123456789876543210 a0123456789876543210 a0123456789876543210 :: GHC.Types.Symbol 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 + data SX :: forall a. X (a :: Type) -> Type where SX1 :: forall (a :: Type). SX (X1 :: X (a :: Type)) SX2 :: forall (a :: Type) (n :: Y a). @@ -129,7 +125,7 @@ Singletons/T371.hs:(0,0)-(0,0): Splicing declarations 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 + data SY :: forall a. Y (a :: Type) -> Type where SY1 :: forall (a :: Type). SY (Y1 :: Y (a :: Type)) SY2 :: forall (a :: Type) (n :: X a). diff --git a/tests/compile-and-dump/Singletons/T376.golden b/tests/compile-and-dump/Singletons/T376.golden index 52de2935..bedddd86 100644 --- a/tests/compile-and-dump/Singletons/T376.golden +++ b/tests/compile-and-dump/Singletons/T376.golden @@ -5,26 +5,26 @@ Singletons/T376.hs:(0,0)-(0,0): Splicing declarations ======> f :: (() -> ()) -> () -> () f g = g :: () -> () - instance SuppressUnusedWarnings FSym0 where - suppressUnusedWarnings = snd (((,) FSym0KindInference) ()) - data FSym0 :: (~>) ((~>) () ()) ((~>) () ()) + type FSym0 :: (~>) ((~>) () ()) ((~>) () ()) + data FSym0 a0123456789876543210 where - FSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FSym0 arg) (FSym1 arg) => + FSym0KindInference :: SameKind (Apply FSym0 arg) (FSym1 arg) => FSym0 a0123456789876543210 type instance Apply FSym0 a0123456789876543210 = FSym1 a0123456789876543210 - instance SuppressUnusedWarnings (FSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) FSym1KindInference) ()) - data FSym1 (a0123456789876543210 :: (~>) () ()) :: (~>) () () + instance SuppressUnusedWarnings FSym0 where + suppressUnusedWarnings = snd (((,) FSym0KindInference) ()) + type FSym1 :: (~>) () () -> (~>) () () + data FSym1 a0123456789876543210 a0123456789876543210 where - FSym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (FSym1 a0123456789876543210) arg) (FSym2 a0123456789876543210 arg) => + FSym1KindInference :: SameKind (Apply (FSym1 a0123456789876543210) arg) (FSym2 a0123456789876543210 arg) => FSym1 a0123456789876543210 a0123456789876543210 type instance Apply (FSym1 a0123456789876543210) a0123456789876543210 = FSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (FSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) FSym1KindInference) ()) type FSym2 (a0123456789876543210 :: (~>) () ()) (a0123456789876543210 :: ()) = - F a0123456789876543210 a0123456789876543210 - type family F (a :: (~>) () ()) (a :: ()) :: () where + F a0123456789876543210 a0123456789876543210 :: () + type F :: (~>) () () -> () -> () + type family F a a where F g a_0123456789876543210 = Apply (g :: (~>) () ()) a_0123456789876543210 sF :: forall (t :: (~>) () ()) (t :: ()). diff --git a/tests/compile-and-dump/Singletons/T378a.golden b/tests/compile-and-dump/Singletons/T378a.golden index bde4c1eb..7018e2ec 100644 --- a/tests/compile-and-dump/Singletons/T378a.golden +++ b/tests/compile-and-dump/Singletons/T378a.golden @@ -18,33 +18,30 @@ Singletons/T378a.hs:(0,0)-(0,0): Splicing declarations Proxy2 :: Proxy (a :: k) Proxy3 :: forall a. Proxy a Proxy4 :: forall k (a :: k). Proxy a - type Proxy1Sym0 = Proxy1 - type Proxy2Sym0 = Proxy2 - type Proxy3Sym0 = Proxy3 - type Proxy4Sym0 = Proxy4 - instance SuppressUnusedWarnings ConstBASym0 where - suppressUnusedWarnings = snd (((,) ConstBASym0KindInference) ()) - data ConstBASym0 :: forall a0123456789876543210 - b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 a0123456789876543210) + type Proxy1Sym0 = Proxy1 :: Proxy a + type Proxy2Sym0 = Proxy2 :: Proxy (a :: k) + type Proxy3Sym0 = Proxy3 :: Proxy a + type Proxy4Sym0 = Proxy4 :: Proxy a + type ConstBASym0 :: forall b a. (~>) a ((~>) b a) + data ConstBASym0 a0123456789876543210 where - ConstBASym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ConstBASym0 arg) (ConstBASym1 arg) => + ConstBASym0KindInference :: SameKind (Apply ConstBASym0 arg) (ConstBASym1 arg) => ConstBASym0 a0123456789876543210 type instance Apply ConstBASym0 a0123456789876543210 = ConstBASym1 a0123456789876543210 - instance SuppressUnusedWarnings (ConstBASym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) ConstBASym1KindInference) ()) - data ConstBASym1 (a0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings ConstBASym0 where + suppressUnusedWarnings = snd (((,) ConstBASym0KindInference) ()) + type ConstBASym1 :: forall b a. a -> (~>) b a + data ConstBASym1 a0123456789876543210 a0123456789876543210 where - ConstBASym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (ConstBASym1 a0123456789876543210) arg) (ConstBASym2 a0123456789876543210 arg) => + ConstBASym1KindInference :: SameKind (Apply (ConstBASym1 a0123456789876543210) arg) (ConstBASym2 a0123456789876543210 arg) => ConstBASym1 a0123456789876543210 a0123456789876543210 type instance Apply (ConstBASym1 a0123456789876543210) a0123456789876543210 = ConstBASym2 a0123456789876543210 a0123456789876543210 - type ConstBASym2 (a0123456789876543210 :: a0123456789876543210) (a0123456789876543210 :: b0123456789876543210) = - ConstBA a0123456789876543210 a0123456789876543210 - type family ConstBA (a :: a) (a :: b) :: a where + instance SuppressUnusedWarnings (ConstBASym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) ConstBASym1KindInference) ()) + type ConstBASym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + ConstBA a0123456789876543210 a0123456789876543210 :: a + type ConstBA :: forall b a. a -> b -> a + type family ConstBA a a where ConstBA x _ = x sConstBA :: forall b a (t :: a) (t :: b). @@ -54,7 +51,7 @@ Singletons/T378a.hs:(0,0)-(0,0): Splicing declarations sing = (singFun2 @ConstBASym0) sConstBA instance SingI d => SingI (ConstBASym1 (d :: a) :: (~>) b a) where sing = (singFun1 @(ConstBASym1 (d :: a))) (sConstBA (sing @d)) - data SProxy :: forall a. Proxy a -> Type + data SProxy :: forall a. Proxy (a :: k) -> Type where SProxy1 :: forall a. SProxy (Proxy1 :: Proxy a) SProxy2 :: forall k (a :: k). SProxy (Proxy2 :: Proxy (a :: k)) diff --git a/tests/compile-and-dump/Singletons/T378a.hs b/tests/compile-and-dump/Singletons/T378a.hs index f6a37807..b29f978d 100644 --- a/tests/compile-and-dump/Singletons/T378a.hs +++ b/tests/compile-and-dump/Singletons/T378a.hs @@ -18,12 +18,18 @@ $(singletons [d| ex1 :: [Bool] ex1 = [] @Bool +type PEx1 :: [Bool] +type PEx1 = '[] @Bool + sEx1 :: SList ('[] @Bool) sEx1 = SNil @Bool ex2 :: Bool ex2 = constBA @Ordering @Bool True LT +type PEx2 :: Bool +type PEx2 = ConstBA @Ordering @Bool True LT + sEx2 :: Sing (ConstBA True LT) sEx2 = sConstBA @Ordering @Bool STrue SLT @@ -33,6 +39,18 @@ proxyEx2 = Proxy2 @Bool @True proxyEx3 = Proxy3 @True proxyEx4 = Proxy4 @Bool @True +type ProxyEx1 :: Proxy True +type ProxyEx1 = Proxy1 @True + +type ProxyEx2 :: Proxy True +type ProxyEx2 = Proxy2 @Bool @True + +type ProxyEx3 :: Proxy True +type ProxyEx3 = Proxy3 @True + +type ProxyEx4 :: Proxy True +type ProxyEx4 = Proxy4 @Bool @True + sProxyEx1 :: SProxy (Proxy1 @True) sProxyEx1 = SProxy1 @True diff --git a/tests/compile-and-dump/Singletons/T378b.golden b/tests/compile-and-dump/Singletons/T378b.golden new file mode 100644 index 00000000..e69de29b diff --git a/tests/compile-and-dump/Singletons/T378b.hs b/tests/compile-and-dump/Singletons/T378b.hs new file mode 100644 index 00000000..aa42e394 --- /dev/null +++ b/tests/compile-and-dump/Singletons/T378b.hs @@ -0,0 +1,42 @@ +module T378b where + +import Data.Kind +import Data.Singletons.TH + +$(singletons [d| + type C :: forall b a. a -> b -> Constraint + class C x y + + type D :: forall b a. a -> b -> Type + data D x y + + f :: forall b a. a -> b -> () + f _ _ = () + + type Nat :: Type + data Nat = Z | S Nat + + -- This will only typecheck if ZSym0 is a type synonym. + -- See Note [No SAKs for fully saturated defunctionalization symbols] + -- in D.S.Promote.Defun for more information. + natMinus :: Nat -> Nat -> Nat + natMinus Z _ = Z + natMinus (S a) (S b) = natMinus a b + natMinus a Z = a + |]) + +-- Test some type variable orderings +type CExP :: Bool -> Ordering -> Constraint +type CExP = PC @Ordering @Bool + +type CExS :: Bool -> Ordering -> Constraint +type CExS = SC @Ordering @Bool + +type DExS :: D (x :: Bool) (y :: Ordering) -> Type +type DExS = SD @Ordering @Bool + +type FEx0 :: Bool ~> Ordering ~> () +type FEx0 = FSym0 @Ordering @Bool + +type FEx1 :: Bool -> Ordering ~> () +type FEx1 = FSym1 @Ordering @Bool diff --git a/tests/compile-and-dump/Singletons/T402.golden b/tests/compile-and-dump/Singletons/T402.golden index 2c045139..76bbfae6 100644 --- a/tests/compile-and-dump/Singletons/T402.golden +++ b/tests/compile-and-dump/Singletons/T402.golden @@ -2,14 +2,12 @@ Singletons/T402.hs:0:0:: Splicing declarations singletons [d| type AnyOfKind (k :: Type) = Any :: k |] ======> type AnyOfKind (k :: Type) = Any :: k - instance SuppressUnusedWarnings AnyOfKindSym0 where - suppressUnusedWarnings = snd (((,) AnyOfKindSym0KindInference) ()) - data AnyOfKindSym0 :: forall (k0123456789876543210 :: Type). - (~>) Type k0123456789876543210 + data AnyOfKindSym0 :: (~>) Type k0123456789876543210 where - AnyOfKindSym0KindInference :: forall k0123456789876543210 - arg. SameKind (Apply AnyOfKindSym0 arg) (AnyOfKindSym1 arg) => + AnyOfKindSym0KindInference :: SameKind (Apply AnyOfKindSym0 arg) (AnyOfKindSym1 arg) => AnyOfKindSym0 k0123456789876543210 type instance Apply AnyOfKindSym0 k0123456789876543210 = AnyOfKindSym1 k0123456789876543210 + instance SuppressUnusedWarnings AnyOfKindSym0 where + suppressUnusedWarnings = snd (((,) AnyOfKindSym0KindInference) ()) type AnyOfKindSym1 (k0123456789876543210 :: Type) = - AnyOfKind k0123456789876543210 + AnyOfKind k0123456789876543210 :: k0123456789876543210 diff --git a/tests/compile-and-dump/Singletons/T410.golden b/tests/compile-and-dump/Singletons/T410.golden index 7ebe2a59..bbc0389d 100644 --- a/tests/compile-and-dump/Singletons/T410.golden +++ b/tests/compile-and-dump/Singletons/T410.golden @@ -10,52 +10,50 @@ Singletons/T410.hs:(0,0)-(0,0): Splicing declarations equals :: a -> a -> Bool instance Eq () where equals () () = True + type EqualsSym0 :: forall a. (~>) a ((~>) a Bool) + data EqualsSym0 a0123456789876543210 + where + EqualsSym0KindInference :: SameKind (Apply EqualsSym0 arg) (EqualsSym1 arg) => + EqualsSym0 a0123456789876543210 + type instance Apply EqualsSym0 a0123456789876543210 = EqualsSym1 a0123456789876543210 instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings EqualsSym0 where Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings = snd (((,) EqualsSym0KindInference) ()) - data EqualsSym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 ((~>) a0123456789876543210 Bool) + type EqualsSym1 :: forall a. a -> (~>) a Bool + data EqualsSym1 a0123456789876543210 a0123456789876543210 where - EqualsSym0KindInference :: forall arg0123456789876543210 - arg. SameKind (Apply EqualsSym0 arg) (EqualsSym1 arg) => - EqualsSym0 arg0123456789876543210 - type instance Apply EqualsSym0 arg0123456789876543210 = EqualsSym1 arg0123456789876543210 - instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (EqualsSym1 arg0123456789876543210) where + EqualsSym1KindInference :: SameKind (Apply (EqualsSym1 a0123456789876543210) arg) (EqualsSym2 a0123456789876543210 arg) => + EqualsSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (EqualsSym1 a0123456789876543210) a0123456789876543210 = EqualsSym2 a0123456789876543210 a0123456789876543210 + instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (EqualsSym1 a0123456789876543210) where Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings = snd (((,) EqualsSym1KindInference) ()) - data EqualsSym1 (arg0123456789876543210 :: a0123456789876543210) :: (~>) a0123456789876543210 Bool - where - EqualsSym1KindInference :: forall arg0123456789876543210 - arg0123456789876543210 - arg. SameKind (Apply (EqualsSym1 arg0123456789876543210) arg) (EqualsSym2 arg0123456789876543210 arg) => - EqualsSym1 arg0123456789876543210 arg0123456789876543210 - type instance Apply (EqualsSym1 arg0123456789876543210) arg0123456789876543210 = EqualsSym2 arg0123456789876543210 arg0123456789876543210 - type EqualsSym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: a0123456789876543210) = - Equals arg0123456789876543210 arg0123456789876543210 + type EqualsSym2 (a0123456789876543210 :: a) (a0123456789876543210 :: a) = + Equals a0123456789876543210 a0123456789876543210 :: Bool class PEq a where type Equals (arg :: a) (arg :: a) :: Bool - type family Equals_0123456789876543210 (a :: ()) (a :: ()) :: Bool where + type Equals_0123456789876543210 :: () -> () -> Bool + type family Equals_0123456789876543210 a a where Equals_0123456789876543210 '() '() = TrueSym0 - instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Equals_0123456789876543210Sym0 where - Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings - = snd (((,) Equals_0123456789876543210Sym0KindInference) ()) - data Equals_0123456789876543210Sym0 :: (~>) () ((~>) () Bool) + type Equals_0123456789876543210Sym0 :: (~>) () ((~>) () Bool) + data Equals_0123456789876543210Sym0 a0123456789876543210 where - Equals_0123456789876543210Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply Equals_0123456789876543210Sym0 arg) (Equals_0123456789876543210Sym1 arg) => + Equals_0123456789876543210Sym0KindInference :: SameKind (Apply Equals_0123456789876543210Sym0 arg) (Equals_0123456789876543210Sym1 arg) => Equals_0123456789876543210Sym0 a0123456789876543210 type instance Apply Equals_0123456789876543210Sym0 a0123456789876543210 = Equals_0123456789876543210Sym1 a0123456789876543210 - instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Equals_0123456789876543210Sym1 a0123456789876543210) where + instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings Equals_0123456789876543210Sym0 where Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings - = snd (((,) Equals_0123456789876543210Sym1KindInference) ()) - data Equals_0123456789876543210Sym1 (a0123456789876543210 :: ()) :: (~>) () Bool + = snd (((,) Equals_0123456789876543210Sym0KindInference) ()) + type Equals_0123456789876543210Sym1 :: () -> (~>) () Bool + data Equals_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 where - Equals_0123456789876543210Sym1KindInference :: forall a0123456789876543210 - a0123456789876543210 - arg. SameKind (Apply (Equals_0123456789876543210Sym1 a0123456789876543210) arg) (Equals_0123456789876543210Sym2 a0123456789876543210 arg) => + Equals_0123456789876543210Sym1KindInference :: SameKind (Apply (Equals_0123456789876543210Sym1 a0123456789876543210) arg) (Equals_0123456789876543210Sym2 a0123456789876543210 arg) => Equals_0123456789876543210Sym1 a0123456789876543210 a0123456789876543210 type instance Apply (Equals_0123456789876543210Sym1 a0123456789876543210) a0123456789876543210 = Equals_0123456789876543210Sym2 a0123456789876543210 a0123456789876543210 + instance Data.Singletons.SuppressUnusedWarnings.SuppressUnusedWarnings (Equals_0123456789876543210Sym1 a0123456789876543210) where + Data.Singletons.SuppressUnusedWarnings.suppressUnusedWarnings + = snd (((,) Equals_0123456789876543210Sym1KindInference) ()) type Equals_0123456789876543210Sym2 (a0123456789876543210 :: ()) (a0123456789876543210 :: ()) = - Equals_0123456789876543210 a0123456789876543210 a0123456789876543210 + Equals_0123456789876543210 a0123456789876543210 a0123456789876543210 :: Bool instance PEq () where type Equals a a = Apply (Apply Equals_0123456789876543210Sym0 a) a diff --git a/tests/compile-and-dump/Singletons/T412.golden b/tests/compile-and-dump/Singletons/T412.golden index e10ba7ca..97026fac 100644 --- a/tests/compile-and-dump/Singletons/T412.golden +++ b/tests/compile-and-dump/Singletons/T412.golden @@ -25,99 +25,87 @@ Singletons/T412.hs:(0,0)-(0,0): Splicing declarations infixr 5 `D1` infixr 5 `MkD1` data D1 a b = MkD1 a b - instance SuppressUnusedWarnings T1aSym0 where - suppressUnusedWarnings = snd (((,) T1aSym0KindInference) ()) data T1aSym0 a0123456789876543210 where - T1aSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply T1aSym0 arg) (T1aSym1 arg) => + T1aSym0KindInference :: SameKind (Apply T1aSym0 arg) (T1aSym1 arg) => T1aSym0 a0123456789876543210 type instance Apply T1aSym0 a0123456789876543210 = T1aSym1 a0123456789876543210 + instance SuppressUnusedWarnings T1aSym0 where + suppressUnusedWarnings = snd (((,) T1aSym0KindInference) ()) infixl 5 `T1aSym0` - instance SuppressUnusedWarnings (T1aSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) T1aSym1KindInference) ()) data T1aSym1 a0123456789876543210 b0123456789876543210 where - T1aSym1KindInference :: forall a0123456789876543210 - b0123456789876543210 - arg. SameKind (Apply (T1aSym1 a0123456789876543210) arg) (T1aSym2 a0123456789876543210 arg) => + T1aSym1KindInference :: SameKind (Apply (T1aSym1 a0123456789876543210) arg) (T1aSym2 a0123456789876543210 arg) => T1aSym1 a0123456789876543210 b0123456789876543210 type instance Apply (T1aSym1 a0123456789876543210) b0123456789876543210 = T1aSym2 a0123456789876543210 b0123456789876543210 + instance SuppressUnusedWarnings (T1aSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) T1aSym1KindInference) ()) infixl 5 `T1aSym1` type T1aSym2 a0123456789876543210 b0123456789876543210 = T1a a0123456789876543210 b0123456789876543210 infixl 5 `T1aSym2` - instance SuppressUnusedWarnings T1bSym0 where - suppressUnusedWarnings = snd (((,) T1bSym0KindInference) ()) data T1bSym0 a0123456789876543210 where - T1bSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply T1bSym0 arg) (T1bSym1 arg) => + T1bSym0KindInference :: SameKind (Apply T1bSym0 arg) (T1bSym1 arg) => T1bSym0 a0123456789876543210 type instance Apply T1bSym0 a0123456789876543210 = T1bSym1 a0123456789876543210 + instance SuppressUnusedWarnings T1bSym0 where + suppressUnusedWarnings = snd (((,) T1bSym0KindInference) ()) infixl 5 `T1bSym0` - instance SuppressUnusedWarnings (T1bSym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) T1bSym1KindInference) ()) data T1bSym1 a0123456789876543210 b0123456789876543210 where - T1bSym1KindInference :: forall a0123456789876543210 - b0123456789876543210 - arg. SameKind (Apply (T1bSym1 a0123456789876543210) arg) (T1bSym2 a0123456789876543210 arg) => + T1bSym1KindInference :: SameKind (Apply (T1bSym1 a0123456789876543210) arg) (T1bSym2 a0123456789876543210 arg) => T1bSym1 a0123456789876543210 b0123456789876543210 type instance Apply (T1bSym1 a0123456789876543210) b0123456789876543210 = T1bSym2 a0123456789876543210 b0123456789876543210 + instance SuppressUnusedWarnings (T1bSym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) T1bSym1KindInference) ()) infixl 5 `T1bSym1` type T1bSym2 a0123456789876543210 b0123456789876543210 = T1b a0123456789876543210 b0123456789876543210 infixl 5 `T1bSym2` + type MkD1Sym0 :: forall a b. (~>) a ((~>) b (D1 a b)) + data MkD1Sym0 a0123456789876543210 + where + MkD1Sym0KindInference :: SameKind (Apply MkD1Sym0 arg) (MkD1Sym1 arg) => + MkD1Sym0 a0123456789876543210 + type instance Apply MkD1Sym0 a0123456789876543210 = MkD1Sym1 a0123456789876543210 instance SuppressUnusedWarnings MkD1Sym0 where suppressUnusedWarnings = snd (((,) MkD1Sym0KindInference) ()) - data MkD1Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 (D1 a0123456789876543210 b0123456789876543210)) - where - MkD1Sym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply MkD1Sym0 arg) (MkD1Sym1 arg) => - MkD1Sym0 t0123456789876543210 - type instance Apply MkD1Sym0 t0123456789876543210 = MkD1Sym1 t0123456789876543210 infixr 5 `MkD1Sym0` - instance SuppressUnusedWarnings (MkD1Sym1 t0123456789876543210) where - suppressUnusedWarnings = snd (((,) MkD1Sym1KindInference) ()) - data MkD1Sym1 (t0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 (D1 a0123456789876543210 b0123456789876543210) + type MkD1Sym1 :: forall a b. a -> (~>) b (D1 a b) + data MkD1Sym1 a0123456789876543210 a0123456789876543210 where - MkD1Sym1KindInference :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply (MkD1Sym1 t0123456789876543210) arg) (MkD1Sym2 t0123456789876543210 arg) => - MkD1Sym1 t0123456789876543210 t0123456789876543210 - type instance Apply (MkD1Sym1 t0123456789876543210) t0123456789876543210 = MkD1Sym2 t0123456789876543210 t0123456789876543210 + MkD1Sym1KindInference :: SameKind (Apply (MkD1Sym1 a0123456789876543210) arg) (MkD1Sym2 a0123456789876543210 arg) => + MkD1Sym1 a0123456789876543210 a0123456789876543210 + type instance Apply (MkD1Sym1 a0123456789876543210) a0123456789876543210 = MkD1Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (MkD1Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) MkD1Sym1KindInference) ()) infixr 5 `MkD1Sym1` - type MkD1Sym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) = - MkD1 t0123456789876543210 t0123456789876543210 + type MkD1Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + MkD1 a0123456789876543210 a0123456789876543210 :: D1 a b infixr 5 `MkD1Sym2` infix 6 `M1` infix 5 `PC1` + type M1Sym0 :: forall a b. (~>) a ((~>) b Bool) + data M1Sym0 a0123456789876543210 + where + M1Sym0KindInference :: SameKind (Apply M1Sym0 arg) (M1Sym1 arg) => + M1Sym0 a0123456789876543210 + type instance Apply M1Sym0 a0123456789876543210 = M1Sym1 a0123456789876543210 instance SuppressUnusedWarnings M1Sym0 where suppressUnusedWarnings = snd (((,) M1Sym0KindInference) ()) - data M1Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 Bool) - where - M1Sym0KindInference :: forall arg0123456789876543210 - arg. SameKind (Apply M1Sym0 arg) (M1Sym1 arg) => - M1Sym0 arg0123456789876543210 - type instance Apply M1Sym0 arg0123456789876543210 = M1Sym1 arg0123456789876543210 infix 6 `M1Sym0` - instance SuppressUnusedWarnings (M1Sym1 arg0123456789876543210) where - suppressUnusedWarnings = snd (((,) M1Sym1KindInference) ()) - data M1Sym1 (arg0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 Bool + type M1Sym1 :: forall a b. a -> (~>) b Bool + data M1Sym1 a0123456789876543210 a0123456789876543210 where - M1Sym1KindInference :: forall arg0123456789876543210 - arg0123456789876543210 - arg. SameKind (Apply (M1Sym1 arg0123456789876543210) arg) (M1Sym2 arg0123456789876543210 arg) => - M1Sym1 arg0123456789876543210 arg0123456789876543210 - type instance Apply (M1Sym1 arg0123456789876543210) arg0123456789876543210 = M1Sym2 arg0123456789876543210 arg0123456789876543210 + M1Sym1KindInference :: SameKind (Apply (M1Sym1 a0123456789876543210) arg) (M1Sym2 a0123456789876543210 arg) => + M1Sym1 a0123456789876543210 a0123456789876543210 + type instance Apply (M1Sym1 a0123456789876543210) a0123456789876543210 = M1Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (M1Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) M1Sym1KindInference) ()) infix 6 `M1Sym1` - type M1Sym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: b0123456789876543210) = - M1 arg0123456789876543210 arg0123456789876543210 + type M1Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + M1 a0123456789876543210 a0123456789876543210 :: Bool infix 6 `M1Sym2` class PC1 a b where type M1 (arg :: a) (arg :: b) :: Bool @@ -154,30 +142,28 @@ Singletons/T412.hs:(0,0)-(0,0): Splicing declarations Singletons/T412.hs:0:0:: Splicing declarations genSingletons [''C2, ''T2a, ''T2b, ''D2] ======> + type M2Sym0 :: forall a b. (~>) a ((~>) b Bool) + data M2Sym0 a0123456789876543210 + where + M2Sym0KindInference :: SameKind (Apply M2Sym0 arg) (M2Sym1 arg) => + M2Sym0 a0123456789876543210 + type instance Apply M2Sym0 a0123456789876543210 = M2Sym1 a0123456789876543210 instance SuppressUnusedWarnings M2Sym0 where suppressUnusedWarnings = snd (((,) M2Sym0KindInference) ()) - data M2Sym0 :: forall a0123456789876543210 b0123456789876543210. - (~>) a0123456789876543210 ((~>) b0123456789876543210 Bool) - where - M2Sym0KindInference :: forall arg0123456789876543210 - arg. SameKind (Apply M2Sym0 arg) (M2Sym1 arg) => - M2Sym0 arg0123456789876543210 - type instance Apply M2Sym0 arg0123456789876543210 = M2Sym1 arg0123456789876543210 infix 6 `M2Sym0` - instance SuppressUnusedWarnings (M2Sym1 arg0123456789876543210) where - suppressUnusedWarnings = snd (((,) M2Sym1KindInference) ()) - data M2Sym1 (arg0123456789876543210 :: a0123456789876543210) :: forall b0123456789876543210. - (~>) b0123456789876543210 Bool + type M2Sym1 :: forall a b. a -> (~>) b Bool + data M2Sym1 a0123456789876543210 a0123456789876543210 where - M2Sym1KindInference :: forall arg0123456789876543210 - arg0123456789876543210 - arg. SameKind (Apply (M2Sym1 arg0123456789876543210) arg) (M2Sym2 arg0123456789876543210 arg) => - M2Sym1 arg0123456789876543210 arg0123456789876543210 - type instance Apply (M2Sym1 arg0123456789876543210) arg0123456789876543210 = M2Sym2 arg0123456789876543210 arg0123456789876543210 + M2Sym1KindInference :: SameKind (Apply (M2Sym1 a0123456789876543210) arg) (M2Sym2 a0123456789876543210 arg) => + M2Sym1 a0123456789876543210 a0123456789876543210 + type instance Apply (M2Sym1 a0123456789876543210) a0123456789876543210 = M2Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (M2Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) M2Sym1KindInference) ()) infix 6 `M2Sym1` - type M2Sym2 (arg0123456789876543210 :: a0123456789876543210) (arg0123456789876543210 :: b0123456789876543210) = - M2 arg0123456789876543210 arg0123456789876543210 + type M2Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + M2 a0123456789876543210 a0123456789876543210 :: Bool infix 6 `M2Sym2` + type PC2 :: GHC.Types.Type -> GHC.Types.Type -> Constraint class PC2 (a :: GHC.Types.Type) (b :: GHC.Types.Type) where type M2 (arg :: a) (arg :: b) :: Bool infix 5 `PC2` @@ -186,6 +172,7 @@ Singletons/T412.hs:0:0:: Splicing declarations sM2 :: forall (t :: a) (t :: b). Sing t -> Sing t -> Sing (Apply (Apply M2Sym0 t) t :: Bool) + type SC2 :: GHC.Types.Type -> GHC.Types.Type -> Constraint infix 5 `SC2` infix 6 `sM2` instance SC2 a b => SingI (M2Sym0 :: (~>) a ((~>) b Bool)) where @@ -193,76 +180,78 @@ Singletons/T412.hs:0:0:: Splicing declarations instance (SC2 a b, SingI d) => SingI (M2Sym1 (d :: a) :: (~>) b Bool) where sing = (singFun1 @(M2Sym1 (d :: a))) (sM2 (sing @d)) - instance SuppressUnusedWarnings T2aSym0 where - suppressUnusedWarnings = snd (((,) T2aSym0KindInference) ()) + type T2aSym0 :: (~>) GHC.Types.Type ((~>) GHC.Types.Type GHC.Types.Type) data T2aSym0 a0123456789876543210 where - T2aSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply T2aSym0 arg) (T2aSym1 arg) => + T2aSym0KindInference :: SameKind (Apply T2aSym0 arg) (T2aSym1 arg) => T2aSym0 a0123456789876543210 type instance Apply T2aSym0 a0123456789876543210 = T2aSym1 a0123456789876543210 + instance SuppressUnusedWarnings T2aSym0 where + suppressUnusedWarnings = snd (((,) T2aSym0KindInference) ()) infixl 5 `T2aSym0` + type T2aSym1 :: GHC.Types.Type + -> (~>) GHC.Types.Type GHC.Types.Type + data T2aSym1 a0123456789876543210 a0123456789876543210 + where + T2aSym1KindInference :: SameKind (Apply (T2aSym1 a0123456789876543210) arg) (T2aSym2 a0123456789876543210 arg) => + T2aSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (T2aSym1 a0123456789876543210) a0123456789876543210 = T2aSym2 a0123456789876543210 a0123456789876543210 instance SuppressUnusedWarnings (T2aSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) T2aSym1KindInference) ()) - data T2aSym1 (a0123456789876543210 :: GHC.Types.Type) b0123456789876543210 - where - T2aSym1KindInference :: forall a0123456789876543210 - b0123456789876543210 - arg. SameKind (Apply (T2aSym1 a0123456789876543210) arg) (T2aSym2 a0123456789876543210 arg) => - T2aSym1 a0123456789876543210 b0123456789876543210 - type instance Apply (T2aSym1 a0123456789876543210) b0123456789876543210 = T2aSym2 a0123456789876543210 b0123456789876543210 infixl 5 `T2aSym1` - type T2aSym2 (a0123456789876543210 :: GHC.Types.Type) (b0123456789876543210 :: GHC.Types.Type) = - T2a a0123456789876543210 b0123456789876543210 + type T2aSym2 (a0123456789876543210 :: GHC.Types.Type) (a0123456789876543210 :: GHC.Types.Type) = + T2a a0123456789876543210 a0123456789876543210 :: GHC.Types.Type infixl 5 `T2aSym2` - instance SuppressUnusedWarnings T2bSym0 where - suppressUnusedWarnings = snd (((,) T2bSym0KindInference) ()) - data T2bSym0 :: (~>) GHC.Types.Type ((~>) GHC.Types.Type GHC.Types.Type) + type T2bSym0 :: (~>) GHC.Types.Type ((~>) GHC.Types.Type GHC.Types.Type) + data T2bSym0 a0123456789876543210 where - T2bSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply T2bSym0 arg) (T2bSym1 arg) => + T2bSym0KindInference :: SameKind (Apply T2bSym0 arg) (T2bSym1 arg) => T2bSym0 a0123456789876543210 type instance Apply T2bSym0 a0123456789876543210 = T2bSym1 a0123456789876543210 + instance SuppressUnusedWarnings T2bSym0 where + suppressUnusedWarnings = snd (((,) T2bSym0KindInference) ()) infixl 5 `T2bSym0` + type T2bSym1 :: GHC.Types.Type + -> (~>) GHC.Types.Type GHC.Types.Type + data T2bSym1 a0123456789876543210 a0123456789876543210 + where + T2bSym1KindInference :: SameKind (Apply (T2bSym1 a0123456789876543210) arg) (T2bSym2 a0123456789876543210 arg) => + T2bSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (T2bSym1 a0123456789876543210) a0123456789876543210 = T2bSym2 a0123456789876543210 a0123456789876543210 instance SuppressUnusedWarnings (T2bSym1 a0123456789876543210) where suppressUnusedWarnings = snd (((,) T2bSym1KindInference) ()) - data T2bSym1 (a0123456789876543210 :: GHC.Types.Type) :: (~>) GHC.Types.Type GHC.Types.Type - where - T2bSym1KindInference :: forall a0123456789876543210 - b0123456789876543210 - arg. SameKind (Apply (T2bSym1 a0123456789876543210) arg) (T2bSym2 a0123456789876543210 arg) => - T2bSym1 a0123456789876543210 b0123456789876543210 - type instance Apply (T2bSym1 a0123456789876543210) b0123456789876543210 = T2bSym2 a0123456789876543210 b0123456789876543210 infixl 5 `T2bSym1` - type T2bSym2 (a0123456789876543210 :: GHC.Types.Type) (b0123456789876543210 :: GHC.Types.Type) = - T2b a0123456789876543210 b0123456789876543210 + type T2bSym2 (a0123456789876543210 :: GHC.Types.Type) (a0123456789876543210 :: GHC.Types.Type) = + T2b a0123456789876543210 a0123456789876543210 :: GHC.Types.Type infixl 5 `T2bSym2` + type MkD2Sym0 :: forall (a :: GHC.Types.Type) + (b :: GHC.Types.Type). + (~>) a ((~>) b (D2 (a :: GHC.Types.Type) (b :: GHC.Types.Type))) + data MkD2Sym0 a0123456789876543210 + where + MkD2Sym0KindInference :: SameKind (Apply MkD2Sym0 arg) (MkD2Sym1 arg) => + MkD2Sym0 a0123456789876543210 + type instance Apply MkD2Sym0 a0123456789876543210 = MkD2Sym1 a0123456789876543210 instance SuppressUnusedWarnings MkD2Sym0 where suppressUnusedWarnings = snd (((,) MkD2Sym0KindInference) ()) - data MkD2Sym0 :: forall (a0123456789876543210 :: GHC.Types.Type) - (b0123456789876543210 :: GHC.Types.Type). - (~>) a0123456789876543210 ((~>) b0123456789876543210 (D2 (a0123456789876543210 :: GHC.Types.Type) (b0123456789876543210 :: GHC.Types.Type))) - where - MkD2Sym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply MkD2Sym0 arg) (MkD2Sym1 arg) => - MkD2Sym0 t0123456789876543210 - type instance Apply MkD2Sym0 t0123456789876543210 = MkD2Sym1 t0123456789876543210 infixr 5 `MkD2Sym0` - instance SuppressUnusedWarnings (MkD2Sym1 t0123456789876543210) where - suppressUnusedWarnings = snd (((,) MkD2Sym1KindInference) ()) - data MkD2Sym1 (t0123456789876543210 :: a0123456789876543210 :: GHC.Types.Type) :: forall (b0123456789876543210 :: GHC.Types.Type). - (~>) b0123456789876543210 (D2 (a0123456789876543210 :: GHC.Types.Type) (b0123456789876543210 :: GHC.Types.Type)) + type MkD2Sym1 :: forall (a :: GHC.Types.Type) + (b :: GHC.Types.Type). + a -> (~>) b (D2 (a :: GHC.Types.Type) (b :: GHC.Types.Type)) + data MkD2Sym1 a0123456789876543210 a0123456789876543210 where - MkD2Sym1KindInference :: forall t0123456789876543210 - t0123456789876543210 - arg. SameKind (Apply (MkD2Sym1 t0123456789876543210) arg) (MkD2Sym2 t0123456789876543210 arg) => - MkD2Sym1 t0123456789876543210 t0123456789876543210 - type instance Apply (MkD2Sym1 t0123456789876543210) t0123456789876543210 = MkD2Sym2 t0123456789876543210 t0123456789876543210 + MkD2Sym1KindInference :: SameKind (Apply (MkD2Sym1 a0123456789876543210) arg) (MkD2Sym2 a0123456789876543210 arg) => + MkD2Sym1 a0123456789876543210 a0123456789876543210 + type instance Apply (MkD2Sym1 a0123456789876543210) a0123456789876543210 = MkD2Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (MkD2Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) MkD2Sym1KindInference) ()) infixr 5 `MkD2Sym1` - type MkD2Sym2 (t0123456789876543210 :: a0123456789876543210) (t0123456789876543210 :: b0123456789876543210) = - 'MkD2 t0123456789876543210 t0123456789876543210 + type MkD2Sym2 (a0123456789876543210 :: a) (a0123456789876543210 :: b) = + 'MkD2 a0123456789876543210 a0123456789876543210 :: D2 (a :: GHC.Types.Type) (b :: GHC.Types.Type) infixr 5 `MkD2Sym2` - data SD2 :: forall a b. D2 a b -> GHC.Types.Type + type SD2 :: forall (a :: GHC.Types.Type) (b :: GHC.Types.Type). + D2 (a :: GHC.Types.Type) (b :: GHC.Types.Type) -> GHC.Types.Type + data SD2 z where SMkD2 :: forall (a :: GHC.Types.Type) (b :: GHC.Types.Type) diff --git a/tests/compile-and-dump/Singletons/T414.golden b/tests/compile-and-dump/Singletons/T414.golden index 5e01cf38..81a11e05 100644 --- a/tests/compile-and-dump/Singletons/T414.golden +++ b/tests/compile-and-dump/Singletons/T414.golden @@ -1,53 +1,76 @@ Singletons/T414.hs:(0,0)-(0,0): Splicing declarations singletons - [d| class C1 (a :: Bool) where + [d| type C3 :: Bool -> Constraint + + class C1 (a :: Bool) where type T1 a b class C2 a where - type T2 a b |] + type T2 a b + class C3 a where + type T3 a b |] ======> class C1 (a :: Bool) where type T1 a b class C2 a where type T2 a b - instance SuppressUnusedWarnings T1Sym0 where - suppressUnusedWarnings = snd (((,) T1Sym0KindInference) ()) - data T1Sym0 :: (~>) Bool ((~>) GHC.Types.Type GHC.Types.Type) + type C3 :: Bool -> Constraint + class C3 a where + type T3 a b + data T1Sym0 a0123456789876543210 where - T1Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply T1Sym0 arg) (T1Sym1 arg) => + T1Sym0KindInference :: SameKind (Apply T1Sym0 arg) (T1Sym1 arg) => T1Sym0 a0123456789876543210 type instance Apply T1Sym0 a0123456789876543210 = T1Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (T1Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) T1Sym1KindInference) ()) - data T1Sym1 (a0123456789876543210 :: Bool) :: (~>) GHC.Types.Type GHC.Types.Type + instance SuppressUnusedWarnings T1Sym0 where + suppressUnusedWarnings = snd (((,) T1Sym0KindInference) ()) + data T1Sym1 (a0123456789876543210 :: Bool) b0123456789876543210 where - T1Sym1KindInference :: forall a0123456789876543210 - b0123456789876543210 - arg. SameKind (Apply (T1Sym1 a0123456789876543210) arg) (T1Sym2 a0123456789876543210 arg) => + T1Sym1KindInference :: SameKind (Apply (T1Sym1 a0123456789876543210) arg) (T1Sym2 a0123456789876543210 arg) => T1Sym1 a0123456789876543210 b0123456789876543210 type instance Apply (T1Sym1 a0123456789876543210) b0123456789876543210 = T1Sym2 a0123456789876543210 b0123456789876543210 - type T1Sym2 (a0123456789876543210 :: Bool) (b0123456789876543210 :: GHC.Types.Type) = + instance SuppressUnusedWarnings (T1Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) T1Sym1KindInference) ()) + type T1Sym2 (a0123456789876543210 :: Bool) b0123456789876543210 = T1 a0123456789876543210 b0123456789876543210 class PC1 (a :: Bool) - instance SuppressUnusedWarnings T2Sym0 where - suppressUnusedWarnings = snd (((,) T2Sym0KindInference) ()) data T2Sym0 a0123456789876543210 where - T2Sym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply T2Sym0 arg) (T2Sym1 arg) => + T2Sym0KindInference :: SameKind (Apply T2Sym0 arg) (T2Sym1 arg) => T2Sym0 a0123456789876543210 type instance Apply T2Sym0 a0123456789876543210 = T2Sym1 a0123456789876543210 - instance SuppressUnusedWarnings (T2Sym1 a0123456789876543210) where - suppressUnusedWarnings = snd (((,) T2Sym1KindInference) ()) + instance SuppressUnusedWarnings T2Sym0 where + suppressUnusedWarnings = snd (((,) T2Sym0KindInference) ()) data T2Sym1 a0123456789876543210 b0123456789876543210 where - T2Sym1KindInference :: forall a0123456789876543210 - b0123456789876543210 - arg. SameKind (Apply (T2Sym1 a0123456789876543210) arg) (T2Sym2 a0123456789876543210 arg) => + T2Sym1KindInference :: SameKind (Apply (T2Sym1 a0123456789876543210) arg) (T2Sym2 a0123456789876543210 arg) => T2Sym1 a0123456789876543210 b0123456789876543210 type instance Apply (T2Sym1 a0123456789876543210) b0123456789876543210 = T2Sym2 a0123456789876543210 b0123456789876543210 + instance SuppressUnusedWarnings (T2Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) T2Sym1KindInference) ()) type T2Sym2 a0123456789876543210 b0123456789876543210 = T2 a0123456789876543210 b0123456789876543210 class PC2 a + type T3Sym0 :: (~>) Bool ((~>) Type Type) + data T3Sym0 a0123456789876543210 + where + T3Sym0KindInference :: SameKind (Apply T3Sym0 arg) (T3Sym1 arg) => + T3Sym0 a0123456789876543210 + type instance Apply T3Sym0 a0123456789876543210 = T3Sym1 a0123456789876543210 + instance SuppressUnusedWarnings T3Sym0 where + suppressUnusedWarnings = snd (((,) T3Sym0KindInference) ()) + type T3Sym1 :: Bool -> (~>) Type Type + data T3Sym1 a0123456789876543210 a0123456789876543210 + where + T3Sym1KindInference :: SameKind (Apply (T3Sym1 a0123456789876543210) arg) (T3Sym2 a0123456789876543210 arg) => + T3Sym1 a0123456789876543210 a0123456789876543210 + type instance Apply (T3Sym1 a0123456789876543210) a0123456789876543210 = T3Sym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (T3Sym1 a0123456789876543210) where + suppressUnusedWarnings = snd (((,) T3Sym1KindInference) ()) + type T3Sym2 (a0123456789876543210 :: Bool) (a0123456789876543210 :: Type) = + T3 a0123456789876543210 a0123456789876543210 :: Type + type PC3 :: Bool -> Constraint + class PC3 a class SC1 (a :: Bool) class SC2 a + class SC3 a + type SC3 :: Bool -> Constraint diff --git a/tests/compile-and-dump/Singletons/T414.hs b/tests/compile-and-dump/Singletons/T414.hs index 3d9cd970..d47c4269 100644 --- a/tests/compile-and-dump/Singletons/T414.hs +++ b/tests/compile-and-dump/Singletons/T414.hs @@ -1,5 +1,6 @@ module T414 where +import Data.Kind import Data.Singletons.TH $(singletons [d| @@ -8,4 +9,8 @@ $(singletons [d| class C2 a where type T2 a b + + type C3 :: Bool -> Constraint + class C3 a where + type T3 a b |]) diff --git a/tests/compile-and-dump/Singletons/T54.golden b/tests/compile-and-dump/Singletons/T54.golden index 4e37e061..2cd3da85 100644 --- a/tests/compile-and-dump/Singletons/T54.golden +++ b/tests/compile-and-dump/Singletons/T54.golden @@ -5,34 +5,35 @@ Singletons/T54.hs:(0,0)-(0,0): Splicing declarations ======> g :: Bool -> Bool g e = (case [not] of { [_] -> not }) e + data Let0123456789876543210Scrutinee_0123456789876543210Sym0 e0123456789876543210 + where + Let0123456789876543210Scrutinee_0123456789876543210Sym0KindInference :: SameKind (Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 arg) (Let0123456789876543210Scrutinee_0123456789876543210Sym1 arg) => + Let0123456789876543210Scrutinee_0123456789876543210Sym0 e0123456789876543210 + type instance Apply Let0123456789876543210Scrutinee_0123456789876543210Sym0 e0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210Sym1 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_0123456789876543210Sym1 e0123456789876543210 type Let0123456789876543210Scrutinee_0123456789876543210Sym1 e0123456789876543210 = Let0123456789876543210Scrutinee_0123456789876543210 e0123456789876543210 type family Let0123456789876543210Scrutinee_0123456789876543210 e where Let0123456789876543210Scrutinee_0123456789876543210 e = Apply (Apply (:@#@$) NotSym0) NilSym0 type family Case_0123456789876543210 e t where Case_0123456789876543210 e '[_] = NotSym0 - instance SuppressUnusedWarnings GSym0 where - suppressUnusedWarnings = snd (((,) GSym0KindInference) ()) - data GSym0 :: (~>) Bool Bool + type GSym0 :: (~>) Bool Bool + data GSym0 a0123456789876543210 where - GSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply GSym0 arg) (GSym1 arg) => + GSym0KindInference :: SameKind (Apply GSym0 arg) (GSym1 arg) => GSym0 a0123456789876543210 type instance Apply GSym0 a0123456789876543210 = GSym1 a0123456789876543210 - type GSym1 (a0123456789876543210 :: Bool) = G a0123456789876543210 - type family G (a :: Bool) :: Bool where + instance SuppressUnusedWarnings GSym0 where + suppressUnusedWarnings = snd (((,) GSym0KindInference) ()) + type GSym1 (a0123456789876543210 :: Bool) = + G a0123456789876543210 :: Bool + type G :: Bool -> Bool + type family G a 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) diff --git a/tests/compile-and-dump/Singletons/T78.golden b/tests/compile-and-dump/Singletons/T78.golden index 8b3c7232..b033165f 100644 --- a/tests/compile-and-dump/Singletons/T78.golden +++ b/tests/compile-and-dump/Singletons/T78.golden @@ -9,17 +9,18 @@ Singletons/T78.hs:(0,0)-(0,0): Splicing declarations foo (Just False) = False foo (Just True) = True foo Nothing = False - instance SuppressUnusedWarnings FooSym0 where - suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) - data FooSym0 :: (~>) (Maybe Bool) Bool + type FooSym0 :: (~>) (Maybe Bool) Bool + data FooSym0 a0123456789876543210 where - FooSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) => + FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) => FooSym0 a0123456789876543210 type instance Apply FooSym0 a0123456789876543210 = FooSym1 a0123456789876543210 + instance SuppressUnusedWarnings FooSym0 where + suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) type FooSym1 (a0123456789876543210 :: Maybe Bool) = - Foo a0123456789876543210 - type family Foo (a :: Maybe Bool) :: Bool where + Foo a0123456789876543210 :: Bool + type Foo :: Maybe Bool -> Bool + type family Foo a where Foo ('Just 'False) = FalseSym0 Foo ('Just 'True) = TrueSym0 Foo 'Nothing = FalseSym0 diff --git a/tests/compile-and-dump/Singletons/TopLevelPatterns.golden b/tests/compile-and-dump/Singletons/TopLevelPatterns.golden index f7d077cc..32322c91 100644 --- a/tests/compile-and-dump/Singletons/TopLevelPatterns.golden +++ b/tests/compile-and-dump/Singletons/TopLevelPatterns.golden @@ -5,29 +5,28 @@ Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations ======> data Bool = False | True data Foo = Bar Bool Bool - type FalseSym0 = False - type TrueSym0 = True + type FalseSym0 = False :: Bool + type TrueSym0 = True :: Bool + type BarSym0 :: (~>) Bool ((~>) Bool Foo) + data BarSym0 a0123456789876543210 + where + BarSym0KindInference :: SameKind (Apply BarSym0 arg) (BarSym1 arg) => + BarSym0 a0123456789876543210 + type instance Apply BarSym0 a0123456789876543210 = BarSym1 a0123456789876543210 instance SuppressUnusedWarnings BarSym0 where suppressUnusedWarnings = Data.Tuple.snd (((,) BarSym0KindInference) ()) - data BarSym0 :: (~>) Bool ((~>) Bool Foo) + type BarSym1 :: Bool -> (~>) Bool Foo + data BarSym1 a0123456789876543210 a0123456789876543210 where - BarSym0KindInference :: forall t0123456789876543210 - arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) => - BarSym0 t0123456789876543210 - type instance Apply BarSym0 t0123456789876543210 = BarSym1 t0123456789876543210 - instance SuppressUnusedWarnings (BarSym1 t0123456789876543210) where + BarSym1KindInference :: SameKind (Apply (BarSym1 a0123456789876543210) arg) (BarSym2 a0123456789876543210 arg) => + BarSym1 a0123456789876543210 a0123456789876543210 + type instance Apply (BarSym1 a0123456789876543210) a0123456789876543210 = BarSym2 a0123456789876543210 a0123456789876543210 + instance SuppressUnusedWarnings (BarSym1 a0123456789876543210) 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 = BarSym2 t0123456789876543210 t0123456789876543210 - type BarSym2 (t0123456789876543210 :: Bool) (t0123456789876543210 :: Bool) = - Bar t0123456789876543210 t0123456789876543210 + type BarSym2 (a0123456789876543210 :: Bool) (a0123456789876543210 :: Bool) = + Bar a0123456789876543210 a0123456789876543210 :: Foo data SBool :: Bool -> GHC.Types.Type where SFalse :: SBool (False :: Bool) @@ -125,111 +124,125 @@ Singletons/TopLevelPatterns.hs:(0,0)-(0,0): Splicing declarations type family Case_0123456789876543210 a_0123456789876543210 t where Case_0123456789876543210 a_0123456789876543210 '[y_0123456789876543210, _] = y_0123456789876543210 - type MSym0 = M - type LSym0 = L + type MSym0 = M :: Bool + type LSym0 = L :: Bool type X_0123456789876543210Sym0 = X_0123456789876543210 - type KSym0 = K - type JSym0 = J + type KSym0 = K :: Bool + type JSym0 = J :: Bool type X_0123456789876543210Sym0 = X_0123456789876543210 - instance SuppressUnusedWarnings ISym0 where - suppressUnusedWarnings - = Data.Tuple.snd (((,) ISym0KindInference) ()) - data ISym0 :: (~>) Bool Bool + type ISym0 :: (~>) Bool Bool + data ISym0 a0123456789876543210 where - ISym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply ISym0 arg) (ISym1 arg) => + ISym0KindInference :: SameKind (Apply ISym0 arg) (ISym1 arg) => ISym0 a0123456789876543210 type instance Apply ISym0 a0123456789876543210 = ISym1 a0123456789876543210 - type ISym1 (a0123456789876543210 :: Bool) = I a0123456789876543210 - instance SuppressUnusedWarnings HSym0 where + instance SuppressUnusedWarnings ISym0 where suppressUnusedWarnings - = Data.Tuple.snd (((,) HSym0KindInference) ()) - data HSym0 :: (~>) Bool Bool + = Data.Tuple.snd (((,) ISym0KindInference) ()) + type ISym1 (a0123456789876543210 :: Bool) = + I a0123456789876543210 :: Bool + type HSym0 :: (~>) Bool Bool + data HSym0 a0123456789876543210 where - HSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply HSym0 arg) (HSym1 arg) => + HSym0KindInference :: SameKind (Apply HSym0 arg) (HSym1 arg) => HSym0 a0123456789876543210 type instance Apply HSym0 a0123456789876543210 = HSym1 a0123456789876543210 - type HSym1 (a0123456789876543210 :: Bool) = H a0123456789876543210 - type X_0123456789876543210Sym0 = X_0123456789876543210 - instance SuppressUnusedWarnings GSym0 where + instance SuppressUnusedWarnings HSym0 where suppressUnusedWarnings - = Data.Tuple.snd (((,) GSym0KindInference) ()) - data GSym0 :: (~>) Bool Bool + = Data.Tuple.snd (((,) HSym0KindInference) ()) + type HSym1 (a0123456789876543210 :: Bool) = + H a0123456789876543210 :: Bool + type X_0123456789876543210Sym0 = X_0123456789876543210 + type GSym0 :: (~>) Bool Bool + data GSym0 a0123456789876543210 where - GSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply GSym0 arg) (GSym1 arg) => + GSym0KindInference :: SameKind (Apply GSym0 arg) (GSym1 arg) => GSym0 a0123456789876543210 type instance Apply GSym0 a0123456789876543210 = GSym1 a0123456789876543210 - type GSym1 (a0123456789876543210 :: Bool) = G a0123456789876543210 - instance SuppressUnusedWarnings FSym0 where + instance SuppressUnusedWarnings GSym0 where suppressUnusedWarnings - = Data.Tuple.snd (((,) FSym0KindInference) ()) - data FSym0 :: (~>) Bool Bool + = Data.Tuple.snd (((,) GSym0KindInference) ()) + type GSym1 (a0123456789876543210 :: Bool) = + G a0123456789876543210 :: Bool + type FSym0 :: (~>) Bool Bool + data FSym0 a0123456789876543210 where - FSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FSym0 arg) (FSym1 arg) => + FSym0KindInference :: SameKind (Apply FSym0 arg) (FSym1 arg) => FSym0 a0123456789876543210 type instance Apply FSym0 a0123456789876543210 = FSym1 a0123456789876543210 - type FSym1 (a0123456789876543210 :: Bool) = F a0123456789876543210 + instance SuppressUnusedWarnings FSym0 where + suppressUnusedWarnings + = Data.Tuple.snd (((,) FSym0KindInference) ()) + type FSym1 (a0123456789876543210 :: Bool) = + F a0123456789876543210 :: Bool type X_0123456789876543210Sym0 = X_0123456789876543210 type False_Sym0 = False_ - instance SuppressUnusedWarnings NotSym0 where - suppressUnusedWarnings - = Data.Tuple.snd (((,) NotSym0KindInference) ()) - data NotSym0 :: (~>) Bool Bool + type NotSym0 :: (~>) Bool Bool + data NotSym0 a0123456789876543210 where - NotSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply NotSym0 arg) (NotSym1 arg) => + NotSym0KindInference :: SameKind (Apply NotSym0 arg) (NotSym1 arg) => NotSym0 a0123456789876543210 type instance Apply NotSym0 a0123456789876543210 = NotSym1 a0123456789876543210 - type NotSym1 (a0123456789876543210 :: Bool) = - Not a0123456789876543210 - instance SuppressUnusedWarnings IdSym0 where + instance SuppressUnusedWarnings NotSym0 where suppressUnusedWarnings - = Data.Tuple.snd (((,) IdSym0KindInference) ()) - data IdSym0 :: forall a0123456789876543210. - (~>) a0123456789876543210 a0123456789876543210 + = Data.Tuple.snd (((,) NotSym0KindInference) ()) + type NotSym1 (a0123456789876543210 :: Bool) = + Not a0123456789876543210 :: Bool + type IdSym0 :: (~>) a a + data IdSym0 a0123456789876543210 where - IdSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply IdSym0 arg) (IdSym1 arg) => + IdSym0KindInference :: SameKind (Apply IdSym0 arg) (IdSym1 arg) => IdSym0 a0123456789876543210 type instance Apply IdSym0 a0123456789876543210 = IdSym1 a0123456789876543210 - type IdSym1 (a0123456789876543210 :: a0123456789876543210) = - Id a0123456789876543210 - type OtherwiseSym0 = Otherwise - type family M :: Bool where + instance SuppressUnusedWarnings IdSym0 where + suppressUnusedWarnings + = Data.Tuple.snd (((,) IdSym0KindInference) ()) + type IdSym1 (a0123456789876543210 :: a) = + Id a0123456789876543210 :: a + type OtherwiseSym0 = Otherwise :: Bool + type M :: Bool + type family M where M = Case_0123456789876543210 X_0123456789876543210Sym0 - type family L :: Bool where + type L :: Bool + type family L where L = Case_0123456789876543210 X_0123456789876543210Sym0 type family X_0123456789876543210 where X_0123456789876543210 = Apply (Apply (:@#@$) (Apply NotSym0 TrueSym0)) (Apply (Apply (:@#@$) (Apply IdSym0 FalseSym0)) NilSym0) - type family K :: Bool where + type K :: Bool + type family K where K = Case_0123456789876543210 X_0123456789876543210Sym0 - type family J :: Bool where + type J :: Bool + type family J 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 + type I :: Bool -> Bool + type family I a where I a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210 - type family H (a :: Bool) :: Bool where + type H :: Bool -> Bool + type family H a 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 + type G :: Bool -> Bool + type family G a where G a_0123456789876543210 = Apply (Case_0123456789876543210 a_0123456789876543210 X_0123456789876543210Sym0) a_0123456789876543210 - type family F (a :: Bool) :: Bool where + type F :: Bool -> Bool + type family F a 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) NilSym0) type family False_ where False_ = FalseSym0 - type family Not (a :: Bool) :: Bool where + type Not :: Bool -> Bool + type family Not a where Not 'True = FalseSym0 Not 'False = TrueSym0 - type family Id (a :: a) :: a where + type Id :: a -> a + type family Id a where Id x = x - type family Otherwise :: Bool where + type Otherwise :: Bool + type family Otherwise where Otherwise = TrueSym0 sM :: Sing (MSym0 :: Bool) sL :: Sing (LSym0 :: Bool) diff --git a/tests/compile-and-dump/Singletons/Undef.golden b/tests/compile-and-dump/Singletons/Undef.golden index 9f80b4a1..bc76af2c 100644 --- a/tests/compile-and-dump/Singletons/Undef.golden +++ b/tests/compile-and-dump/Singletons/Undef.golden @@ -9,29 +9,31 @@ Singletons/Undef.hs:(0,0)-(0,0): Splicing declarations foo = undefined bar :: Bool -> Bool bar = error "urk" - instance SuppressUnusedWarnings BarSym0 where - suppressUnusedWarnings = snd (((,) BarSym0KindInference) ()) - data BarSym0 :: (~>) Bool Bool + type BarSym0 :: (~>) Bool Bool + data BarSym0 a0123456789876543210 where - BarSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply BarSym0 arg) (BarSym1 arg) => + BarSym0KindInference :: SameKind (Apply BarSym0 arg) (BarSym1 arg) => BarSym0 a0123456789876543210 type instance Apply BarSym0 a0123456789876543210 = BarSym1 a0123456789876543210 + instance SuppressUnusedWarnings BarSym0 where + suppressUnusedWarnings = snd (((,) BarSym0KindInference) ()) type BarSym1 (a0123456789876543210 :: Bool) = - Bar a0123456789876543210 - instance SuppressUnusedWarnings FooSym0 where - suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) - data FooSym0 :: (~>) Bool Bool + Bar a0123456789876543210 :: Bool + type FooSym0 :: (~>) Bool Bool + data FooSym0 a0123456789876543210 where - FooSym0KindInference :: forall a0123456789876543210 - arg. SameKind (Apply FooSym0 arg) (FooSym1 arg) => + FooSym0KindInference :: SameKind (Apply FooSym0 arg) (FooSym1 arg) => FooSym0 a0123456789876543210 type instance Apply FooSym0 a0123456789876543210 = FooSym1 a0123456789876543210 + instance SuppressUnusedWarnings FooSym0 where + suppressUnusedWarnings = snd (((,) FooSym0KindInference) ()) type FooSym1 (a0123456789876543210 :: Bool) = - Foo a0123456789876543210 - type family Bar (a :: Bool) :: Bool where + Foo a0123456789876543210 :: Bool + type Bar :: Bool -> Bool + type family Bar a where Bar a_0123456789876543210 = Apply (Apply ErrorSym0 "urk") a_0123456789876543210 - type family Foo (a :: Bool) :: Bool where + type Foo :: Bool -> Bool + type family Foo a where Foo a_0123456789876543210 = Apply UndefinedSym0 a_0123456789876543210 sBar :: forall (t :: Bool). Sing t -> Sing (Apply BarSym0 t :: Bool)